Version Description
(2021-03-18) = * Fixed: Onchange feedType to csv and txt, delimiter and enclosure doesn't show is solved.
Download this release
Release Info
Developer | wahid0003 |
Plugin | CTX Feed – WooCommerce Product Feed Manager Plugin |
Version | 4.3.51 |
Comparing to | |
See all releases |
Code changes from version 4.3.50 to 4.3.51
- README.txt +4 -1
- admin/js/fancy-select.min.js +2 -2
- admin/js/jquery-sortable.min.js +2 -2
- admin/js/woo-feed-admin-pro.min.js +2 -2
- admin/js/woo-feed-admin.js +13 -10
- admin/js/woo-feed-admin.min.js +1 -1
- admin/js/woo-feed-admin.min.js.map +1 -1
- woo-feed.php +2 -2
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: Product Feed, WooCommerce, Google Shopping, Google Merchant, Facebook Cata
|
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 4.3.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -498,6 +498,9 @@ Using pro version:
|
|
498 |
|
499 |
== Changelog ==
|
500 |
|
|
|
|
|
|
|
501 |
= 4.3.50 (2021-03-17) =
|
502 |
* Tweak: WordPress 5.7 compatibility tested.
|
503 |
* Fixed: Bundled product not appearing issue solved.
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.3.51
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
498 |
|
499 |
== Changelog ==
|
500 |
|
501 |
+
= 4.3.51 (2021-03-18) =
|
502 |
+
* Fixed: Onchange feedType to csv and txt, delimiter and enclosure doesn't show is solved.
|
503 |
+
|
504 |
= 4.3.50 (2021-03-17) =
|
505 |
* Tweak: WordPress 5.7 compatibility tested.
|
506 |
* Fixed: Bundled product not appearing issue solved.
|
admin/js/fancy-select.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
"use strict";!function(v,f,m){function y(e,t){var r=this,l=v.extend(!0,{},{options:[],optgroups:[],items:[],placeholder:"",delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,maxItemShow:3,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},t),n=e[0];(n.fancySelect=r).order=0;var i=f.getComputedStyle&&f.getComputedStyle(n,null),s=i?i.getPropertyValue("direction"):n.currentStyle&&n.currentStyle.direction;s=s||e.parents("[dir]:first").attr("dir")||"",r.computedStyle=i,/android/i.test(f.navigator.userAgent)||m.createElement("input").validity;var a,o,d,c={},p={readData:function(e){var t=r.dataAttr&&e.attr(r.dataAttr);return"string"==typeof t&&t.length?JSON.parse(t):null},addOption:function(e,t){e=v(e);var n=r.hash_key(e.val());if(n||l.allowEmptyOption)if(c.hasOwnProperty(n)){if(t){var i=c[n][field_optgroup];i?v.isArray(i)?i.push(t):c[n][field_optgroup]=[i,t]:c[n][field_optgroup]=t}}else{var s=p.readData(e)||{};s[r.settings.labelField]=s[r.settings.labelField]||e.text(),s[r.settings.valueField]=s[r.settings.valueField]||n,s[r.settings.disabledField]=s[r.settings.disabledField]||e.prop("disabled"),s[r.settings.optgroupField]=s[r.settings.optgroupField]||t,s.$order=++r.order,c[n]=s,r.settings.options.push(s),e.is(":selected")&&r.settings.items.push(s)}},addGroup:function(e){var t,n,i,s,l;for((i=(e=v(e)).attr("label"))&&((s=p.readData(e)||{})[r.settings.optgroupLabelField]=i,s[r.settings.optgroupValueField]=i,s[r.settings.disabledField]=e.prop("disabled"),s.$order=++r.order,r.settings.optgroups.push(s)),t=0,n=(l=v("option",e)).length;t<n;t++)p.addOption(l[t],i)}};v.extend(r,{settings:l,$select:e,tabIndex:e.attr("tabindex")||"",tagType:1,rtl:/rtl/i.test(s),multiple:e.attr("multiple"),eventNS:".FancySelect"+ ++y.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:e.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isRendered:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:{},renderCache:{},onSearchChange:null===l.loadThrottle?r.onSearchChange:(a=r.onSearchChange,o=l.loadThrottle,function(){var e=this,t=arguments;f.clearTimeout(d),d=f.setTimeout(function(){a.apply(e,t)},o)})}),""===r.settings.placeholder&&(r.settings.placeholder=e.attr("placeholder")||e.attr("data-placeholder"),r.settings.placeholder||r.settings.allowEmptyOption||(r.settings.placeholder=e.children('option[value=""]').text())),r.settings.maxItems=r.multiple?null:1;for(var u=0,g=r.$select.children().length;u<g;u++){var h=r.$select.children()[u].tagName.toLowerCase();"optgroup"===h?p.addGroup(r.$select.children()[u]):"option"===h&&p.addOption(r.$select.children()[u])}r.$wrapper=v('<div class="fancy-picker">').addClass(e.attr("class")),r.computedStyle.hasOwnProperty("width")&&r.$wrapper.css({width:r.computedStyle.width}),r.$outputWrapper=v('<div class="fancy-picker-picked">').appendTo(r.$wrapper),r.originalPlaceholder=v('<span class="fancy-picker-placeholder">').appendTo(r.$outputWrapper),r.dataPlaceholder=v('<span class="fancy-picker-data">').appendTo(r.$outputWrapper),r.dataCountPlaceholder=v('<span class="fancy-picker-count">').appendTo(r.$outputWrapper),r.$dropdown=v('<div class="fancy-picker-ui">').appendTo(r.$wrapper),r.$dropdownContent=v('<div class="fancy-picker-content">').appendTo(r.$dropdown),r.setup()}y.count=0,v.extend(y.prototype,{setup:function(){var s=this;s.revertSettings={$children:s.$select.children().detach(),tabindex:s.$select.attr("tabindex")},s.$select.attr("tabindex",-1).hide().after(s.$wrapper),s.$select.data("FancySelect",s),s.$select.addClass("FancySelectInit"),s.settings.items.sort(function(e,t){return e[s.settings.sortField]-t[s.settings.sortField]}),s.preload&&s.render(),s.updatePlaceholder(),s.updateOriginalInput(),s.$wrapper.on("click"+s.eventNS,".fancy-picker-picked",function(e){s.$select.trigger("show"),s.isRendered||s.render(),s.$wrapper.toggleClass("active"),s.$select.trigger("shown")}),v(m).on("click"+s.eventNS,function(e){v(e.target).closest(s.$wrapper).length||(s.$select.trigger("hide"),s.$wrapper.removeClass("active"),s.$select.trigger("hidden"))}),s.$wrapper.on("click"+s.eventNS,".fancy-picker-option:not(.disabled)",function(e){e.preventDefault();var t=v(this),n=!1,i=s.hash_key(t.data("value"));s.multiple?(t.hasClass("selected")?t.removeClass("selected"):(n=!0,t.addClass("selected")),n?s.settings.items.push(s.getSelectedOptionData(i)):s.settings.items=s.settings.items.filter(function(e){return e[s.settings.valueField]!==i}),s.settings.items.sort(function(e,t){return e[s.settings.sortField]-t[s.settings.sortField]})):(s.$dropdownContent.find(".fancy-picker-option").not(t).removeClass("selected"),t.addClass("selected"),n=!0,s.settings.items=[s.getSelectedOptionData(i)],s.$wrapper.removeClass("active")),s.updatePlaceholder(),s.updateOriginalInput()}),v(f).on("resize"+s.eventNS,function(){var e=f.getComputedStyle&&f.getComputedStyle(s.$select[0],null);e.hasOwnProperty("width")&&s.$wrapper.css({width:e.width})}),s.$select.trigger("initialize")},render:function(){function s(e){return l.isSelected(e)?"fancy-picker-option selected":"fancy-picker-option"}var l=this,r=[],a=l.settings.optgroups,o=l.settings.options;if(a.length)for(var e=function(t){r.push('<div class="fancy-picker-option-group">'),r.push('<div class="fancy-picker-option-group-label">'.concat(a[t][l.settings.labelField],"</div>"));for(var e=o.filter(function(e){return e[l.settings.optgroupField]===a[t][l.settings.valueField]}),n=0;n<e.length;n++){var i=e[t];r.push('<div class="'.concat(s(i[l.settings.valueField]),'" data-value="').concat(i[l.settings.valueField],'">').concat(i[l.settings.labelField],"</div>"))}r.push("</div>")},t=0;t<a.length;t++)e(t);else for(var n=0;n<o.length;n++){var i=o[n];r.push('<div class="'.concat(s(i[l.settings.valueField]),'" data-value="').concat(i[l.settings.valueField],'">').concat(i[l.settings.labelField],"</div>"))}l.$dropdownContent.html(r.join("")),l.$select.trigger("rendered"),l.isRendered=!0},updatePlaceholder:function(){var t=this,n=[],e=t.settings.items,i=e.length>t.settings.maxItemShow?t.settings.maxItemShow-1:t.settings.maxItemShow;if(t.originalPlaceholder.text(t.settings.placeholder),e.length?t.originalPlaceholder.hide():t.originalPlaceholder.show(),e.slice(0,i).forEach(function(e){n.push("<span>".concat(e[t.settings.labelField],"</span>"))}),t.dataPlaceholder.html(n.join('<span class="fancy-picker-separator">'.concat(t.settings.delimiter,"</span>"))),e.length>t.settings.maxItemShow){var s=[];e.forEach(function(e){s.push(e[t.settings.labelField])}),t.dataCountPlaceholder.attr("title",s.join(t.settings.delimiter.trim()+" ")),t.dataCountPlaceholder.html("+"+(e.length-i)+" More …")}else t.dataCountPlaceholder.removeAttr("title"),t.dataCountPlaceholder.html("");return t.$select.trigger("placeholderChanged"),t},updateOriginalInput:function(e){var t=this,n=[],i=!1;e=!0===e;for(var s=t.settings.items,l=0;l<s.length;l++)n.push('<option value="'+s[l][t.settings.valueField]+'" selected="selected">'+s[l][t.settings.labelField]||"</option>"),i=!0;return t.$select.html(n.join("")),!e&&i&&t.$select.trigger("change"),t},getSelectedOptionData:function(t){var n=this,e=n.settings.options.filter(function(e){return e[n.settings.valueField]===t});return!!e.length&&e[0]},isSelected:function(t){var n=this;return 0<n.settings.items.filter(function(e){return e[n.settings.valueField]===t}).length},hash_key:function(e){return e+""},destroy:function(){var e=this;e.$select.trigger("destroy"),e.trigger("destroy"),e.off(),e.$select.html("").append(e.revertSettings.$children).removeAttr("tabindex").removeClass("FancySelectInit").attr({tabindex:e.revertSettings.tabindex}).show(),e.$select.removeData("FancySelect"),e.$wrapper.remove(),0==--y.count&&y.$testInput&&(y.$testInput.remove(),y.$testInput=void 0),v(f).off(e.eventNS),v(m).off(e.eventNS),v(m.body).off(e.eventNS),delete e.$select[0].fancySelect}}),v.extend(y.prototype,{bind:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},unbind:function(e,t){this._events=this._events||{},e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)},trigger:function(e){if(this._events=this._events||{},e in this._events!=!1)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}}),v.fn.fancySelect=function(e){return this.each(function(){this.fancySelect||"select"===this.tagName.toLowerCase()&&new y(v(this),e)})}}(jQuery,window,document);
|
2 |
-
//# sourceMappingURL=fancy-select.min.js.map
|
1 |
+
"use strict";!function(v,f,m){function y(e,t){var r=this,l=v.extend(!0,{},{options:[],optgroups:[],items:[],placeholder:"",delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,maxItemShow:3,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},t),n=e[0];(n.fancySelect=r).order=0;var i=f.getComputedStyle&&f.getComputedStyle(n,null),s=i?i.getPropertyValue("direction"):n.currentStyle&&n.currentStyle.direction;s=s||e.parents("[dir]:first").attr("dir")||"",r.computedStyle=i,/android/i.test(f.navigator.userAgent)||m.createElement("input").validity;var a,o,d,c={},p={readData:function(e){var t=r.dataAttr&&e.attr(r.dataAttr);return"string"==typeof t&&t.length?JSON.parse(t):null},addOption:function(e,t){e=v(e);var n=r.hash_key(e.val());if(n||l.allowEmptyOption)if(c.hasOwnProperty(n)){if(t){var i=c[n][field_optgroup];i?v.isArray(i)?i.push(t):c[n][field_optgroup]=[i,t]:c[n][field_optgroup]=t}}else{var s=p.readData(e)||{};s[r.settings.labelField]=s[r.settings.labelField]||e.text(),s[r.settings.valueField]=s[r.settings.valueField]||n,s[r.settings.disabledField]=s[r.settings.disabledField]||e.prop("disabled"),s[r.settings.optgroupField]=s[r.settings.optgroupField]||t,s.$order=++r.order,c[n]=s,r.settings.options.push(s),e.is(":selected")&&r.settings.items.push(s)}},addGroup:function(e){var t,n,i,s,l;for((i=(e=v(e)).attr("label"))&&((s=p.readData(e)||{})[r.settings.optgroupLabelField]=i,s[r.settings.optgroupValueField]=i,s[r.settings.disabledField]=e.prop("disabled"),s.$order=++r.order,r.settings.optgroups.push(s)),t=0,n=(l=v("option",e)).length;t<n;t++)p.addOption(l[t],i)}};v.extend(r,{settings:l,$select:e,tabIndex:e.attr("tabindex")||"",tagType:1,rtl:/rtl/i.test(s),multiple:e.attr("multiple"),eventNS:".FancySelect"+ ++y.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:e.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isRendered:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:{},renderCache:{},onSearchChange:null===l.loadThrottle?r.onSearchChange:(a=r.onSearchChange,o=l.loadThrottle,function(){var e=this,t=arguments;f.clearTimeout(d),d=f.setTimeout(function(){a.apply(e,t)},o)})}),""===r.settings.placeholder&&(r.settings.placeholder=e.attr("placeholder")||e.attr("data-placeholder"),r.settings.placeholder||r.settings.allowEmptyOption||(r.settings.placeholder=e.children('option[value=""]').text())),r.settings.maxItems=r.multiple?null:1;for(var u=0,g=r.$select.children().length;u<g;u++){var h=r.$select.children()[u].tagName.toLowerCase();"optgroup"===h?p.addGroup(r.$select.children()[u]):"option"===h&&p.addOption(r.$select.children()[u])}r.$wrapper=v('<div class="fancy-picker">').addClass(e.attr("class")),r.computedStyle.hasOwnProperty("width")&&r.$wrapper.css({width:r.computedStyle.width}),r.$outputWrapper=v('<div class="fancy-picker-picked">').appendTo(r.$wrapper),r.originalPlaceholder=v('<span class="fancy-picker-placeholder">').appendTo(r.$outputWrapper),r.dataPlaceholder=v('<span class="fancy-picker-data">').appendTo(r.$outputWrapper),r.dataCountPlaceholder=v('<span class="fancy-picker-count">').appendTo(r.$outputWrapper),r.$dropdown=v('<div class="fancy-picker-ui">').appendTo(r.$wrapper),r.$dropdownContent=v('<div class="fancy-picker-content">').appendTo(r.$dropdown),r.setup()}y.count=0,v.extend(y.prototype,{setup:function(){var s=this;s.revertSettings={$children:s.$select.children().detach(),tabindex:s.$select.attr("tabindex")},s.$select.attr("tabindex",-1).hide().after(s.$wrapper),s.$select.data("FancySelect",s),s.$select.addClass("FancySelectInit"),s.settings.items.sort(function(e,t){return e[s.settings.sortField]-t[s.settings.sortField]}),s.preload&&s.render(),s.updatePlaceholder(),s.updateOriginalInput(),s.$wrapper.on("click"+s.eventNS,".fancy-picker-picked",function(e){s.$select.trigger("show"),s.isRendered||s.render(),s.$wrapper.toggleClass("active"),s.$select.trigger("shown")}),v(m).on("click"+s.eventNS,function(e){v(e.target).closest(s.$wrapper).length||(s.$select.trigger("hide"),s.$wrapper.removeClass("active"),s.$select.trigger("hidden"))}),s.$wrapper.on("click"+s.eventNS,".fancy-picker-option:not(.disabled)",function(e){e.preventDefault();var t=v(this),n=!1,i=s.hash_key(t.data("value"));s.multiple?(t.hasClass("selected")?t.removeClass("selected"):(n=!0,t.addClass("selected")),n?s.settings.items.push(s.getSelectedOptionData(i)):s.settings.items=s.settings.items.filter(function(e){return e[s.settings.valueField]!==i}),s.settings.items.sort(function(e,t){return e[s.settings.sortField]-t[s.settings.sortField]})):(s.$dropdownContent.find(".fancy-picker-option").not(t).removeClass("selected"),t.addClass("selected"),n=!0,s.settings.items=[s.getSelectedOptionData(i)],s.$wrapper.removeClass("active")),s.updatePlaceholder(),s.updateOriginalInput()}),v(f).on("resize"+s.eventNS,function(){var e=f.getComputedStyle&&f.getComputedStyle(s.$select[0],null);e.hasOwnProperty("width")&&s.$wrapper.css({width:e.width})}),s.$select.trigger("initialize")},render:function(){function s(e){return l.isSelected(e)?"fancy-picker-option selected":"fancy-picker-option"}var l=this,r=[],a=l.settings.optgroups,o=l.settings.options;if(a.length)for(var e=function(t){r.push('<div class="fancy-picker-option-group">'),r.push('<div class="fancy-picker-option-group-label">'.concat(a[t][l.settings.labelField],"</div>"));for(var e=o.filter(function(e){return e[l.settings.optgroupField]===a[t][l.settings.valueField]}),n=0;n<e.length;n++){var i=e[t];r.push('<div class="'.concat(s(i[l.settings.valueField]),'" data-value="').concat(i[l.settings.valueField],'">').concat(i[l.settings.labelField],"</div>"))}r.push("</div>")},t=0;t<a.length;t++)e(t);else for(var n=0;n<o.length;n++){var i=o[n];r.push('<div class="'.concat(s(i[l.settings.valueField]),'" data-value="').concat(i[l.settings.valueField],'">').concat(i[l.settings.labelField],"</div>"))}l.$dropdownContent.html(r.join("")),l.$select.trigger("rendered"),l.isRendered=!0},updatePlaceholder:function(){var t=this,n=[],e=t.settings.items,i=e.length>t.settings.maxItemShow?t.settings.maxItemShow-1:t.settings.maxItemShow;if(t.originalPlaceholder.text(t.settings.placeholder),e.length?t.originalPlaceholder.hide():t.originalPlaceholder.show(),e.slice(0,i).forEach(function(e){n.push("<span>".concat(e[t.settings.labelField],"</span>"))}),t.dataPlaceholder.html(n.join('<span class="fancy-picker-separator">'.concat(t.settings.delimiter,"</span>"))),e.length>t.settings.maxItemShow){var s=[];e.forEach(function(e){s.push(e[t.settings.labelField])}),t.dataCountPlaceholder.attr("title",s.join(t.settings.delimiter.trim()+" ")),t.dataCountPlaceholder.html("+"+(e.length-i)+" More …")}else t.dataCountPlaceholder.removeAttr("title"),t.dataCountPlaceholder.html("");return t.$select.trigger("placeholderChanged"),t},updateOriginalInput:function(e){var t=this,n=[],i=!1;e=!0===e;for(var s=t.settings.items,l=0;l<s.length;l++)n.push('<option value="'+s[l][t.settings.valueField]+'" selected="selected">'+s[l][t.settings.labelField]||"</option>"),i=!0;return t.$select.html(n.join("")),!e&&i&&t.$select.trigger("change"),t},getSelectedOptionData:function(t){var n=this,e=n.settings.options.filter(function(e){return e[n.settings.valueField]===t});return!!e.length&&e[0]},isSelected:function(t){var n=this;return 0<n.settings.items.filter(function(e){return e[n.settings.valueField]===t}).length},hash_key:function(e){return e+""},destroy:function(){var e=this;e.$select.trigger("destroy"),e.trigger("destroy"),e.off(),e.$select.html("").append(e.revertSettings.$children).removeAttr("tabindex").removeClass("FancySelectInit").attr({tabindex:e.revertSettings.tabindex}).show(),e.$select.removeData("FancySelect"),e.$wrapper.remove(),0==--y.count&&y.$testInput&&(y.$testInput.remove(),y.$testInput=void 0),v(f).off(e.eventNS),v(m).off(e.eventNS),v(m.body).off(e.eventNS),delete e.$select[0].fancySelect}}),v.extend(y.prototype,{bind:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},unbind:function(e,t){this._events=this._events||{},e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)},trigger:function(e){if(this._events=this._events||{},e in this._events!=!1)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}}),v.fn.fancySelect=function(e){return this.each(function(){this.fancySelect||"select"===this.tagName.toLowerCase()&&new y(v(this),e)})}}(jQuery,window,document);
|
2 |
+
//# sourceMappingURL=fancy-select.min.js.map
|
admin/js/jquery-sortable.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(u,s,a){var o={drag:!0,drop:!0,exclude:"",nested:!0,vertical:!0},n={afterMove:function(){},containerPath:"",containerSelector:"ol, ul",distance:0,delay:0,handle:"",itemPath:"",itemSelector:"li",bodyClass:"dragging",draggedClass:"dragged",isValidTarget:function(){return!0},onCancel:function(){},onDrag:function(t,e){t.css(e)},onDragStart:function(t,e){t.css({height:t.outerHeight(),width:t.outerWidth()}),t.addClass(e.group.options.draggedClass),u("body").addClass(e.group.options.bodyClass)},onDrop:function(t,e){t.removeClass(e.group.options.draggedClass).removeAttr("style"),u("body").removeClass(e.group.options.bodyClass)},onMousedown:function(t,e,i){if(!i.target.nodeName.match(/^(input|select|textarea)$/i))return i.preventDefault(),!0},placeholderClass:"placeholder",placeholder:'<li class="placeholder"></li>',pullPlaceholder:!0,serialize:function(t,e,i){var o=u.extend({},t.data());return i?[e]:(e[0]&&(o.children=e),delete o.subContainers,delete o.sortable,o)},tolerance:0},e={},r=0,p={left:0,top:0,bottom:0,right:0},h={start:"touchstart.sortable mousedown.sortable",drop:"touchend.sortable touchcancel.sortable mouseup.sortable",drag:"touchmove.sortable mousemove.sortable",scroll:"scroll.sortable"},l="subContainers";function c(t,e){return Math.max(0,t[0]-e[0],e[0]-t[1])+Math.max(0,t[2]-e[1],e[1]-t[3])}function t(t,e,i,o){var s=t.length,n=o?"offset":"position";for(i=i||0;s--;){var r=t[s].el?t[s].el:u(t[s]),a=r[n]();a.left+=parseInt(r.css("margin-left"),10),a.top+=parseInt(r.css("margin-top"),10),e[s]=[a.left-i,a.left+r.outerWidth()+i,a.top-i,a.top+r.outerHeight()+i]}}function f(t,e){var i=e.offset();return{left:t.left-i.left,top:t.top-i.top}}function d(t,e,i){e=[e.left,e.top],i=i&&[i.left,i.top];for(var o,s=t.length,n=[];s--;)o=t[s],n[s]=[s,c(o,e),i&&c(o,i)];return n=n.sort(function(t,e){return e[1]-t[1]||e[2]-t[2]||e[0]-t[0]})}function g(t){this.options=u.extend({},n,t),this.containers=[],this.options.rootGroup||(this.scrollProxy=u.proxy(this.scroll,this),this.dragProxy=u.proxy(this.drag,this),this.dropProxy=u.proxy(this.drop,this),this.placeholder=u(this.options.placeholder),t.isValidTarget||(this.options.isValidTarget=a))}function m(t,e){this.el=t,this.options=u.extend({},o,e),this.group=g.get(this.options),this.rootGroup=this.options.rootGroup||this.group,this.handle=this.rootGroup.options.handle||this.rootGroup.options.itemSelector;var i=this.rootGroup.options.itemPath;this.target=i?this.el.find(i):this.el,this.target.on(h.start,this.handle,u.proxy(this.dragInit,this)),this.options.drop&&this.group.containers.push(this)}g.get=function(t){return e[t.group]||(t.group===a&&(t.group=r++),e[t.group]=new g(t)),e[t.group]},g.prototype={dragInit:function(t,e){this.$document=u(e.el[0].ownerDocument);var i=u(t.target).closest(this.options.itemSelector);if(i.length){if(this.item=i,this.itemContainer=e,this.item.is(this.options.exclude)||!this.options.onMousedown(this.item,n.onMousedown,t))return;this.setPointer(t),this.toggleListeners("on"),this.setupDelayTimer(),this.dragInitDone=!0}},drag:function(t){if(!this.dragging){if(!this.distanceMet(t)||!this.delayMet)return;this.options.onDragStart(this.item,this.itemContainer,n.onDragStart,t),this.item.before(this.placeholder),this.dragging=!0}this.setPointer(t),this.options.onDrag(this.item,f(this.pointer,this.item.offsetParent()),n.onDrag,t);var e=this.getPointer(t),i=this.sameResultBox,o=this.options.tolerance;(!i||i.top-o>e.top||i.bottom+o<e.top||i.left-o>e.left||i.right+o<e.left)&&(this.searchValidTarget()||(this.placeholder.detach(),this.lastAppendedItem=a))},drop:function(t){this.toggleListeners("off"),this.dragInitDone=!1,this.dragging&&(this.placeholder.closest("html")[0]?this.placeholder.before(this.item).detach():this.options.onCancel(this.item,this.itemContainer,n.onCancel,t),this.options.onDrop(this.item,this.getContainer(this.item),n.onDrop,t),this.clearDimensions(),this.clearOffsetParent(),this.lastAppendedItem=this.sameResultBox=a,this.dragging=!1)},searchValidTarget:function(t,e){t||(t=this.relativePointer||this.pointer,e=this.lastRelativePointer||this.lastPointer);for(var i=d(this.getContainerDimensions(),t,e),o=i.length;o--;){var s=i[o][0];if(!i[o][1]||this.options.pullPlaceholder){var n=this.containers[s];if(!n.disabled){if(!this.$getOffsetParent()){var r=n.getItemOffsetParent();t=f(t,r),e=f(e,r)}if(n.searchValidTarget(t,e))return!0}}}this.sameResultBox&&(this.sameResultBox=a)},movePlaceholder:function(t,e,i,o){var s=this.lastAppendedItem;!o&&s&&s[0]===e[0]||(e[i](this.placeholder),this.lastAppendedItem=e,this.sameResultBox=o,this.options.afterMove(this.placeholder,t,e))},getContainerDimensions:function(){return this.containerDimensions||t(this.containers,this.containerDimensions=[],this.options.tolerance,!this.$getOffsetParent()),this.containerDimensions},getContainer:function(t){return t.closest(this.options.containerSelector).data(s)},$getOffsetParent:function(){if(this.offsetParent===a){var t=this.containers.length-1,e=this.containers[t].getItemOffsetParent();if(!this.options.rootGroup)for(;t--;)if(e[0]!=this.containers[t].getItemOffsetParent()[0]){e=!1;break}this.offsetParent=e}return this.offsetParent},setPointer:function(t){var e=this.getPointer(t);if(this.$getOffsetParent()){var i=f(e,this.$getOffsetParent());this.lastRelativePointer=this.relativePointer,this.relativePointer=i}this.lastPointer=this.pointer,this.pointer=e},distanceMet:function(t){var e=this.getPointer(t);return Math.max(Math.abs(this.pointer.left-e.left),Math.abs(this.pointer.top-e.top))>=this.options.distance},getPointer:function(t){var e=t.originalEvent||t.originalEvent.touches&&t.originalEvent.touches[0];return{left:t.pageX||e.pageX,top:t.pageY||e.pageY}},setupDelayTimer:function(){var t=this;this.delayMet=!this.options.delay,this.delayMet||(clearTimeout(this._mouseDelayTimer),this._mouseDelayTimer=setTimeout(function(){t.delayMet=!0},this.options.delay))},scroll:function(){this.clearDimensions(),this.clearOffsetParent()},toggleListeners:function(i){var o=this;u.each(["drag","drop","scroll"],function(t,e){o.$document[i](h[e],o[e+"Proxy"])})},clearOffsetParent:function(){this.offsetParent=a},clearDimensions:function(){this.traverse(function(t){t._clearDimensions()})},traverse:function(t){t(this);for(var e=this.containers.length;e--;)this.containers[e].traverse(t)},_clearDimensions:function(){this.containerDimensions=a},_destroy:function(){e[this.options.group]=a}},m.prototype={dragInit:function(t){var e=this.rootGroup;!this.disabled&&!e.dragInitDone&&this.options.drag&&this.isValidDrag(t)&&e.dragInit(t,this)},isValidDrag:function(t){return 1==t.which||"touchstart"==t.type&&1==t.originalEvent.touches.length},searchValidTarget:function(t,e){var i=d(this.getItemDimensions(),t,e),o=i.length,s=this.rootGroup,n=!s.options.isValidTarget||s.options.isValidTarget(s.item,this);if(!o&&n)return s.movePlaceholder(this,this.target,"append"),!0;for(;o--;){var r=i[o][0];if(!i[o][1]&&this.hasChildGroup(r)){if(this.getContainerGroup(r).searchValidTarget(t,e))return!0}else if(n)return this.movePlaceholder(r,t),!0}},movePlaceholder:function(t,e){var i=u(this.items[t]),o=this.itemDimensions[t],s="after",n=i.outerWidth(),r=i.outerHeight(),a=i.offset(),h={left:a.left,right:a.left+n,top:a.top,bottom:a.top+r};if(this.options.vertical){var l=(o[2]+o[3])/2;e.top<=l?(s="before",h.bottom-=r/2):h.top+=r/2}else{var c=(o[0]+o[1])/2;e.left<=c?(s="before",h.right-=n/2):h.left+=n/2}this.hasChildGroup(t)&&(h=p),this.rootGroup.movePlaceholder(this,i,s,h)},getItemDimensions:function(){return this.itemDimensions||(this.items=this.$getChildren(this.el,"item").filter(":not(."+this.group.options.placeholderClass+", ."+this.group.options.draggedClass+")").get(),t(this.items,this.itemDimensions=[],this.options.tolerance)),this.itemDimensions},getItemOffsetParent:function(){var t=this.el;return"relative"===t.css("position")||"absolute"===t.css("position")||"fixed"===t.css("position")?t:t.offsetParent()},hasChildGroup:function(t){return this.options.nested&&this.getContainerGroup(t)},getContainerGroup:function(t){var e=u.data(this.items[t],l);if(e===a){var i=this.$getChildren(this.items[t],"container");if(e=!1,i[0]){var o=u.extend({},this.options,{rootGroup:this.rootGroup,group:r++});e=i[s](o).data(s).group}u.data(this.items[t],l,e)}return e},$getChildren:function(t,e){var i=this.rootGroup.options,o=i[e+"Path"],s=i[e+"Selector"];return t=u(t),o&&(t=t.find(o)),t.children(s)},_serialize:function(t,e){var i=this,o=e?"item":"container",s=this.$getChildren(t,o).not(this.options.exclude).map(function(){return i._serialize(u(this),!e)}).get();return this.rootGroup.options.serialize(t,s,e)},traverse:function(i){u.each(this.items||[],function(t){var e=u.data(this,l);e&&e.traverse(i)}),i(this)},_clearDimensions:function(){this.itemDimensions=a},_destroy:function(){var e=this;this.target.off(h.start,this.handle),this.el.removeData(s),this.options.drop&&(this.group.containers=u.grep(this.group.containers,function(t){return t!=e})),u.each(this.items||[],function(){u.removeData(this,l)})}};var v={enable:function(){this.traverse(function(t){t.disabled=!1})},disable:function(){this.traverse(function(t){t.disabled=!0})},serialize:function(){return this._serialize(this.el,!0)},refresh:function(){this.traverse(function(t){t._clearDimensions()})},destroy:function(){this.traverse(function(t){t._destroy()})}};u.extend(m.prototype,v),u.fn[s]=function(i){var o=Array.prototype.slice.call(arguments,1);return this.map(function(){var t=u(this),e=t.data(s);return e&&v[i]?v[i].apply(e,o)||this:(e||i!==a&&"object"!==_typeof(i)||t.data(s,new m(t,i)),this)})}}(jQuery,(window,"wf_sortable"));
|
2 |
-
//# sourceMappingURL=jquery-sortable.min.js.map
|
1 |
+
"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(u,s,a){var o={drag:!0,drop:!0,exclude:"",nested:!0,vertical:!0},n={afterMove:function(){},containerPath:"",containerSelector:"ol, ul",distance:0,delay:0,handle:"",itemPath:"",itemSelector:"li",bodyClass:"dragging",draggedClass:"dragged",isValidTarget:function(){return!0},onCancel:function(){},onDrag:function(t,e){t.css(e)},onDragStart:function(t,e){t.css({height:t.outerHeight(),width:t.outerWidth()}),t.addClass(e.group.options.draggedClass),u("body").addClass(e.group.options.bodyClass)},onDrop:function(t,e){t.removeClass(e.group.options.draggedClass).removeAttr("style"),u("body").removeClass(e.group.options.bodyClass)},onMousedown:function(t,e,i){if(!i.target.nodeName.match(/^(input|select|textarea)$/i))return i.preventDefault(),!0},placeholderClass:"placeholder",placeholder:'<li class="placeholder"></li>',pullPlaceholder:!0,serialize:function(t,e,i){var o=u.extend({},t.data());return i?[e]:(e[0]&&(o.children=e),delete o.subContainers,delete o.sortable,o)},tolerance:0},e={},r=0,p={left:0,top:0,bottom:0,right:0},h={start:"touchstart.sortable mousedown.sortable",drop:"touchend.sortable touchcancel.sortable mouseup.sortable",drag:"touchmove.sortable mousemove.sortable",scroll:"scroll.sortable"},l="subContainers";function c(t,e){return Math.max(0,t[0]-e[0],e[0]-t[1])+Math.max(0,t[2]-e[1],e[1]-t[3])}function t(t,e,i,o){var s=t.length,n=o?"offset":"position";for(i=i||0;s--;){var r=t[s].el?t[s].el:u(t[s]),a=r[n]();a.left+=parseInt(r.css("margin-left"),10),a.top+=parseInt(r.css("margin-top"),10),e[s]=[a.left-i,a.left+r.outerWidth()+i,a.top-i,a.top+r.outerHeight()+i]}}function f(t,e){var i=e.offset();return{left:t.left-i.left,top:t.top-i.top}}function d(t,e,i){e=[e.left,e.top],i=i&&[i.left,i.top];for(var o,s=t.length,n=[];s--;)o=t[s],n[s]=[s,c(o,e),i&&c(o,i)];return n=n.sort(function(t,e){return e[1]-t[1]||e[2]-t[2]||e[0]-t[0]})}function g(t){this.options=u.extend({},n,t),this.containers=[],this.options.rootGroup||(this.scrollProxy=u.proxy(this.scroll,this),this.dragProxy=u.proxy(this.drag,this),this.dropProxy=u.proxy(this.drop,this),this.placeholder=u(this.options.placeholder),t.isValidTarget||(this.options.isValidTarget=a))}function m(t,e){this.el=t,this.options=u.extend({},o,e),this.group=g.get(this.options),this.rootGroup=this.options.rootGroup||this.group,this.handle=this.rootGroup.options.handle||this.rootGroup.options.itemSelector;var i=this.rootGroup.options.itemPath;this.target=i?this.el.find(i):this.el,this.target.on(h.start,this.handle,u.proxy(this.dragInit,this)),this.options.drop&&this.group.containers.push(this)}g.get=function(t){return e[t.group]||(t.group===a&&(t.group=r++),e[t.group]=new g(t)),e[t.group]},g.prototype={dragInit:function(t,e){this.$document=u(e.el[0].ownerDocument);var i=u(t.target).closest(this.options.itemSelector);if(i.length){if(this.item=i,this.itemContainer=e,this.item.is(this.options.exclude)||!this.options.onMousedown(this.item,n.onMousedown,t))return;this.setPointer(t),this.toggleListeners("on"),this.setupDelayTimer(),this.dragInitDone=!0}},drag:function(t){if(!this.dragging){if(!this.distanceMet(t)||!this.delayMet)return;this.options.onDragStart(this.item,this.itemContainer,n.onDragStart,t),this.item.before(this.placeholder),this.dragging=!0}this.setPointer(t),this.options.onDrag(this.item,f(this.pointer,this.item.offsetParent()),n.onDrag,t);var e=this.getPointer(t),i=this.sameResultBox,o=this.options.tolerance;(!i||i.top-o>e.top||i.bottom+o<e.top||i.left-o>e.left||i.right+o<e.left)&&(this.searchValidTarget()||(this.placeholder.detach(),this.lastAppendedItem=a))},drop:function(t){this.toggleListeners("off"),this.dragInitDone=!1,this.dragging&&(this.placeholder.closest("html")[0]?this.placeholder.before(this.item).detach():this.options.onCancel(this.item,this.itemContainer,n.onCancel,t),this.options.onDrop(this.item,this.getContainer(this.item),n.onDrop,t),this.clearDimensions(),this.clearOffsetParent(),this.lastAppendedItem=this.sameResultBox=a,this.dragging=!1)},searchValidTarget:function(t,e){t||(t=this.relativePointer||this.pointer,e=this.lastRelativePointer||this.lastPointer);for(var i=d(this.getContainerDimensions(),t,e),o=i.length;o--;){var s=i[o][0];if(!i[o][1]||this.options.pullPlaceholder){var n=this.containers[s];if(!n.disabled){if(!this.$getOffsetParent()){var r=n.getItemOffsetParent();t=f(t,r),e=f(e,r)}if(n.searchValidTarget(t,e))return!0}}}this.sameResultBox&&(this.sameResultBox=a)},movePlaceholder:function(t,e,i,o){var s=this.lastAppendedItem;!o&&s&&s[0]===e[0]||(e[i](this.placeholder),this.lastAppendedItem=e,this.sameResultBox=o,this.options.afterMove(this.placeholder,t,e))},getContainerDimensions:function(){return this.containerDimensions||t(this.containers,this.containerDimensions=[],this.options.tolerance,!this.$getOffsetParent()),this.containerDimensions},getContainer:function(t){return t.closest(this.options.containerSelector).data(s)},$getOffsetParent:function(){if(this.offsetParent===a){var t=this.containers.length-1,e=this.containers[t].getItemOffsetParent();if(!this.options.rootGroup)for(;t--;)if(e[0]!=this.containers[t].getItemOffsetParent()[0]){e=!1;break}this.offsetParent=e}return this.offsetParent},setPointer:function(t){var e=this.getPointer(t);if(this.$getOffsetParent()){var i=f(e,this.$getOffsetParent());this.lastRelativePointer=this.relativePointer,this.relativePointer=i}this.lastPointer=this.pointer,this.pointer=e},distanceMet:function(t){var e=this.getPointer(t);return Math.max(Math.abs(this.pointer.left-e.left),Math.abs(this.pointer.top-e.top))>=this.options.distance},getPointer:function(t){var e=t.originalEvent||t.originalEvent.touches&&t.originalEvent.touches[0];return{left:t.pageX||e.pageX,top:t.pageY||e.pageY}},setupDelayTimer:function(){var t=this;this.delayMet=!this.options.delay,this.delayMet||(clearTimeout(this._mouseDelayTimer),this._mouseDelayTimer=setTimeout(function(){t.delayMet=!0},this.options.delay))},scroll:function(){this.clearDimensions(),this.clearOffsetParent()},toggleListeners:function(i){var o=this;u.each(["drag","drop","scroll"],function(t,e){o.$document[i](h[e],o[e+"Proxy"])})},clearOffsetParent:function(){this.offsetParent=a},clearDimensions:function(){this.traverse(function(t){t._clearDimensions()})},traverse:function(t){t(this);for(var e=this.containers.length;e--;)this.containers[e].traverse(t)},_clearDimensions:function(){this.containerDimensions=a},_destroy:function(){e[this.options.group]=a}},m.prototype={dragInit:function(t){var e=this.rootGroup;!this.disabled&&!e.dragInitDone&&this.options.drag&&this.isValidDrag(t)&&e.dragInit(t,this)},isValidDrag:function(t){return 1==t.which||"touchstart"==t.type&&1==t.originalEvent.touches.length},searchValidTarget:function(t,e){var i=d(this.getItemDimensions(),t,e),o=i.length,s=this.rootGroup,n=!s.options.isValidTarget||s.options.isValidTarget(s.item,this);if(!o&&n)return s.movePlaceholder(this,this.target,"append"),!0;for(;o--;){var r=i[o][0];if(!i[o][1]&&this.hasChildGroup(r)){if(this.getContainerGroup(r).searchValidTarget(t,e))return!0}else if(n)return this.movePlaceholder(r,t),!0}},movePlaceholder:function(t,e){var i=u(this.items[t]),o=this.itemDimensions[t],s="after",n=i.outerWidth(),r=i.outerHeight(),a=i.offset(),h={left:a.left,right:a.left+n,top:a.top,bottom:a.top+r};if(this.options.vertical){var l=(o[2]+o[3])/2;e.top<=l?(s="before",h.bottom-=r/2):h.top+=r/2}else{var c=(o[0]+o[1])/2;e.left<=c?(s="before",h.right-=n/2):h.left+=n/2}this.hasChildGroup(t)&&(h=p),this.rootGroup.movePlaceholder(this,i,s,h)},getItemDimensions:function(){return this.itemDimensions||(this.items=this.$getChildren(this.el,"item").filter(":not(."+this.group.options.placeholderClass+", ."+this.group.options.draggedClass+")").get(),t(this.items,this.itemDimensions=[],this.options.tolerance)),this.itemDimensions},getItemOffsetParent:function(){var t=this.el;return"relative"===t.css("position")||"absolute"===t.css("position")||"fixed"===t.css("position")?t:t.offsetParent()},hasChildGroup:function(t){return this.options.nested&&this.getContainerGroup(t)},getContainerGroup:function(t){var e=u.data(this.items[t],l);if(e===a){var i=this.$getChildren(this.items[t],"container");if(e=!1,i[0]){var o=u.extend({},this.options,{rootGroup:this.rootGroup,group:r++});e=i[s](o).data(s).group}u.data(this.items[t],l,e)}return e},$getChildren:function(t,e){var i=this.rootGroup.options,o=i[e+"Path"],s=i[e+"Selector"];return t=u(t),o&&(t=t.find(o)),t.children(s)},_serialize:function(t,e){var i=this,o=e?"item":"container",s=this.$getChildren(t,o).not(this.options.exclude).map(function(){return i._serialize(u(this),!e)}).get();return this.rootGroup.options.serialize(t,s,e)},traverse:function(i){u.each(this.items||[],function(t){var e=u.data(this,l);e&&e.traverse(i)}),i(this)},_clearDimensions:function(){this.itemDimensions=a},_destroy:function(){var e=this;this.target.off(h.start,this.handle),this.el.removeData(s),this.options.drop&&(this.group.containers=u.grep(this.group.containers,function(t){return t!=e})),u.each(this.items||[],function(){u.removeData(this,l)})}};var v={enable:function(){this.traverse(function(t){t.disabled=!1})},disable:function(){this.traverse(function(t){t.disabled=!0})},serialize:function(){return this._serialize(this.el,!0)},refresh:function(){this.traverse(function(t){t._clearDimensions()})},destroy:function(){this.traverse(function(t){t._destroy()})}};u.extend(m.prototype,v),u.fn[s]=function(i){var o=Array.prototype.slice.call(arguments,1);return this.map(function(){var t=u(this),e=t.data(s);return e&&v[i]?v[i].apply(e,o)||this:(e||i!==a&&"object"!==_typeof(i)||t.data(s,new m(t,i)),this)})}}(jQuery,(window,"wf_sortable"));
|
2 |
+
//# sourceMappingURL=jquery-sortable.min.js.map
|
admin/js/woo-feed-admin-pro.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
"use strict";!function(a,o){a(o).on("load",function(){var o=a(".wapk-slider");o.length&&o.slick({autoplay:!0,dots:!0,centerMode:!0,arrows:!1,slidesToShow:1,slidesToScroll:1,lazyLoad:"progressive"})})}(jQuery,window,(document,wp.ajax,wpf_ajax_obj));
|
2 |
-
//# sourceMappingURL=woo-feed-admin-pro.min.js.map
|
1 |
+
"use strict";!function(a,o){a(o).on("load",function(){var o=a(".wapk-slider");o.length&&o.slick({autoplay:!0,dots:!0,centerMode:!0,arrows:!1,slidesToShow:1,slidesToScroll:1,lazyLoad:"progressive"})})}(jQuery,window,(document,wp.ajax,wpf_ajax_obj));
|
2 |
+
//# sourceMappingURL=woo-feed-admin-pro.min.js.map
|
admin/js/woo-feed-admin.js
CHANGED
@@ -1016,7 +1016,7 @@
|
|
1016 |
}
|
1017 |
}
|
1018 |
})
|
1019 |
-
.on('change', '#feedType,#provider', function () {
|
1020 |
let type = $('#feedType').val(),
|
1021 |
provider = $('#provider').val(),
|
1022 |
itemWrapper = $('.itemWrapper'),
|
@@ -1025,16 +1025,19 @@
|
|
1025 |
// noinspection JSUnresolvedVariable
|
1026 |
if (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {
|
1027 |
itemWrapper.hide();
|
1028 |
-
} else if (type === 'xml') {
|
1029 |
-
itemWrapper.show();
|
1030 |
-
wf_csv_txt.hide();
|
1031 |
-
} else if (type === 'csv' || type === 'txt') {
|
1032 |
-
itemWrapper.hide();
|
1033 |
-
wf_csv_txt.show();
|
1034 |
-
} else {
|
1035 |
-
itemWrapper.hide();
|
1036 |
-
wf_csv_txt.hide();
|
1037 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1038 |
})
|
1039 |
.trigger('change');
|
1040 |
});
|
1016 |
}
|
1017 |
}
|
1018 |
})
|
1019 |
+
.on('change', '#feedType,#provider', function (e) {
|
1020 |
let type = $('#feedType').val(),
|
1021 |
provider = $('#provider').val(),
|
1022 |
itemWrapper = $('.itemWrapper'),
|
1025 |
// noinspection JSUnresolvedVariable
|
1026 |
if (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {
|
1027 |
itemWrapper.hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1028 |
}
|
1029 |
+
|
1030 |
+
//when feed type is changed
|
1031 |
+
if( 'feedType' === e.target.id ) {
|
1032 |
+
if (type === 'csv' || type === 'txt') {
|
1033 |
+
itemWrapper.hide();
|
1034 |
+
wf_csv_txt.show();
|
1035 |
+
} else {
|
1036 |
+
itemWrapper.show();
|
1037 |
+
wf_csv_txt.hide();
|
1038 |
+
}
|
1039 |
+
}
|
1040 |
+
|
1041 |
})
|
1042 |
.trigger('change');
|
1043 |
});
|
admin/js/woo-feed-admin.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}!function(s,a,r,i,c){s.fn.disabled=function(n){return s(this).each(function(){var e=s(this),t="disabled";void 0!==e.prop(t)?e.prop(t,void 0===n||!0===n):!0===n?e.addClass(t):e.removeClass(t)}),self},s.fn.isDisabled=function(){var e=s(this),t="disabled";return void 0!==e.prop(t)?e.prop(t):e.hasClass(t)};function e(e){s(e.currentTarget).removeClass(function(e,t){return(t.match(/\btooltipped-\S+/g)||[]).join(" ")}).removeClass("tooltipped").removeAttr("aria-label")}function o(e,t){s(e).addClass("tooltipped tooltipped-s").attr("aria-label",t)}function l(e,t){return s.extend(!0,{},e,t)}function t(){n=s(".toClipboard"),!ClipboardJS.isSupported()||/iPhone|iPad/i.test(navigator.userAgent)?n.find("img").hide(0):(n.each(function(){s(this).on("mouseleave",e).on("blur",e)}),new ClipboardJS(".toClipboard").on("error",function(e){var t,n;o(e.trigger,(t=e.action,n="cut"===t?"X":"C",/iPhone|iPad/i.test(navigator.userAgent)?"No support :(":/Mac/i.test(navigator.userAgent)?"Press ⌘-"+n+" to "+t:"Press Ctrl-"+n+" to "+t))}).on("success",function(e){o(e.trigger,"Copied!")}))}var n,d,f={in_array:function(e,t){try{return-1!==t.indexOf(e)}catch(e){return!1}},selectize_render_item:function(e,t){return'<div class="item wapk-selectize-item">'.concat(t(e.text),"</div>")},ajax_fail:function(e){console.warn(e),alert(e.hasOwnProperty("statusText")&&e.hasOwnProperty("status")?c.ajax.error+"\n"+e.statusText+" ("+e.status+")":e)},sortable:function(e,n,a,r){return(e||s(".sorted_table")).each(function(){var e=s(this),t=e.find("tbody > tr:eq(0) > td").length||a||9;e.wf_sortable(l({containerSelector:"table",itemPath:"> tbody",itemSelector:"tr",handle:"i.wf_sortedtable",placeholder:'<tr class="placeholder"><td colspan="'.concat(t,'"></td></tr>'),onDrop:function(e,t,n,a){e.removeClass(t.group.options.draggedClass).removeAttr("style"),s("body").removeClass(t.group.options.bodyClass),r&&"function"==typeof r&&r(e,t,n,a)}},n))})},selectize:function(e,t){return(e||s("select.selectize")).not(".selectized").each(function(){var e=s(this);e.selectize(l({create:e.data("create")||!1,plugins:e.data("plugins")?e.data("plugins").split(",").map(function(e){return e.trim()}):[],render:{item:f.selectize_render_item}},t))})},fancySelect:function(e,t){return(e||s("select.fancySelect")).not(".FancySelectInit").each(function(){s(this).fancySelect(l({maxItemShow:3},t))})},reindex_config_table:function(){s("#table-1").find("tbody tr").each(function(n,e){s(e).find("[name]").each(function(e,t){s(t).attr("name",s(t).attr("name").replace(/(\[\d\])/g,"[".concat(n,"]")))})})},common:function(){f.sortable(s(".sorted_table"),{},9,f.reindex_config_table),f.selectize(),f.fancySelect(s(".outputType"))}},_={form:null,init:function(){this.form=s(".generateFeed"),this.form.length&&(f.common(),s(r).trigger(new jQuery.Event("feedEditor.init",{target:this.form})))},renderMerchantInfo:function(n,a,r){function e(e){var t;r.hasOwnProperty(e)&&(n.find(".merchant-info-section."+e+" .data").html(r[e]),"feed_file_type"===e&&((t=r[e].split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return""!==e&&e!==c.na.toLowerCase()})).length?(a.find("option").removeAttr("selected").each(function(){var e=s(this);e.val()&&!f.in_array(e.val(),t)?e.disabled(!0):e.disabled(!1)}),1===t.length&&a.find('option[value="'+t[0]+'"]').attr("selected","selected")):a.find("option").disabled(!1)))}for(var t in r)e(t);n.find(".spinner").removeClass("is-active"),a.disabled(!1),a.trigger("change"),a.parent().find(".spinner").removeClass("is-active")},renderMerchantTemplate:function(n,a){function e(t){if(a.hasOwnProperty(t))if("tabs"===t)n.html(a[t]);else{var e=s('[name="'+t+'"]');e.length&&e.each(function(){var e=s(this);e.is("select")?e.find('[value="'+a[t]+'"]').prop("selected",!0):(e.is("[type=checkbox]")||e.is("[type=radio]"))&&e.val()===a[t]?e.prop("checked",!0):e.val(a[t])}).trigger("change")}}for(var t in a)e(t);_.init()}},u=[],p=[],h=function(){function e(){_classCallCheck(this,e),this._feed=c.generator.feed,this._limit=c.generator.limit,this._progress=0,this._timer=null,this._color=!1,this._total_batch=0,this._current_batch=0,this._product_ids=[],this._progress_per_batch=0,this._refresh=!0,this._regenerate=c.generator.regenerate,a.isRegenerating=!1,this._all_btn=s(".wpf_regenerate"),this._current_btn=s("#".concat(this._feed.replace("wf_config","wf_feed_"))),this._current_btn_label=""}return _createClass(e,[{key:"init",value:function(){var n=this;""!==this._feed&&this._regenerate&&!1===a.isRegenerating&&this.generate();var e=a.location.search;return"webappick-manage-feeds"===new URLSearchParams(e).get("page")&&s("body").addClass("woo-import-popup-body"),s(r).on("click",".woo-feed-campaign-close-button",function(e){e.preventDefault(),s(this).parent(".woo-feed-promotion").hide();var t=s(this).data("condition");1===t&&i.post("woo_feed_hide_promotion",{_ajax_nonce:c.nonce,condition:t}).then(function(e){n._log(e)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red"})}),s(r).on("click",".wpf_regenerate",function(e){e.preventDefault(),n._current_btn=s(this),n._current_btn.hasClass("disabled")||!0===a.isRegenerating||(n._feed=n._current_btn.attr("id").replace("wf_feed_","wf_config"),""!==n._feed&&n.generate())}),this}},{key:"_block_button",value:function(){this._all_btn.length&&this._all_btn.addClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").addClass("wpf_spin reverse_spin"),this._current_btn_label=this._current_btn.attr("title"),this._current_btn.attr("aria-label",c.regenerate).attr("title",c.regenerate))}},{key:"_unblock_button",value:function(){this._all_btn.length&&this._all_btn.removeClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").removeClass("wpf_spin"),this._current_btn.find("span").removeClass("reverse_spin"),this._current_btn.attr("aria-label",this._current_btn_label).attr("title",this._current_btn_label))}},{key:"generate",value:function(){var t=this,n=this;a.isRegenerating=!0,this._block_button(),this._resetProgressBar(),this._progressBarActive(),this._log("Counting Total Products"),this._updateProgressStatus("Fetching products."),this._get_product_ids().then(function(e){t._progress=10,n._log({response:e}),e.success?(n._log("Total ".concat(e.total," Products found.")),n._product_ids=e.product,n._total_batch=t._product_ids.length,n._current_batch=0,n._progress_per_batch=(90-t._progress)/t._total_batch,n._process_batch(),n._updateProgressStatus("Processing Products...")):n._updateProgressStatus(e.data.message)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red",setTimeout(function(){n._stopProgressBar(),n._unblock_button()},1500)})}},{key:"_get_product_ids",value:function(){return this._progress=5,i.post("get_product_information",{_ajax_nonce:c.nonce,feed:this._feed,limit:this._limit})}},{key:"_process_batch",value:function(){var t=this,e="Processing Batch ".concat(this._current_batch+1," of ").concat(this._total_batch);this._updateProgressStatus(e),this._log(e),i.post("make_batch_feed",{_ajax_nonce:c.nonce,feed:this._feed,products:this._product_ids[this._current_batch],loop:this._current_batch}).then(function(e){t._current_batch++,t._log("Batch ".concat(t._current_batch," Completed")),t._log(e),t._current_batch<t._total_batch&&(t._process_batch(),t._progress+=t._progress_per_batch),t._current_batch===t._total_batch&&t._save_feed_file()}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_save_feed_file",value:function(){var t=this;this._log("Saving feed file"),this._updateProgressStatus("Saving feed file"),i.post("save_feed_file",{_ajax_nonce:c.nonce,feed:this._feed}).then(function(e){t._log(e),t._progress=100,t._refresh&&(a.location.href="".concat(c.pages.list.feed,"&link=").concat(e.url,"&cat=").concat(e.cat)),setTimeout(function(){t._stopProgressBar(),setTimeout(function(){t._resetProgressBar(!0),t._unblock_button()},3e3)},2500)}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_log",value:function(e){return c.wpf_debug&&console.log(e),this}},{key:"_progressBarActive",value:function(e){var t=0<arguments.length&&void 0!==e?e:0,n=this;return this._toggleProgressBar(!0),this._timer=setInterval(function(){n._updateProgressBar()},t||1e3),this}},{key:"_stopProgressBar",value:function(){return clearInterval(this._timer),this}},{key:"_resetProgressBar",value:function(e){return this._toggleProgressBar(!1),this._updateProgressStatus(""),clearInterval(this._timer),this._color=!1,this._timer=null,this._progress=0,e&&this._updateProgressBar(),this}},{key:"_toggleProgressBar",value:function(e){var t=s("#feed_progress_table");return e?t.show():t.hide(),this}},{key:"_updateProgressStatus",value:function(e){return s(".feed-progress-status").text(e),this}},{key:"_updateProgressBar",value:function(){var e=s(".feed-progress-percentage"),t=s(".feed-progress-bar-fill"),n="".concat(Math.round(this._progress),"%");t.css({width:n}),e.text(n)}}]),e}();a.wf={helper:f,feedEditor:_,generator:h},s(a).on("load",function(){null!==s(location).attr("href").match(/webappick.*feed/g)&&s("#wpbody-content").addClass("woofeed-body-content");var e=a.location.search;"edit-feed"===new URLSearchParams(e).get("action")&&s(".itemWrapper").show(),t(),postboxes.add_postbox_toggles(pagenow),(new h).init(),""!==c.generator.feed&&c.generator.regenerate,_.init(),f.common(),s(".wfmasterTooltip").hover(function(){var e=s(this),t=e.attr("wftitle");e.data("tipText",t).removeAttr("wftitle"),s('<p class="wftooltip"></p>').text(t).appendTo("body").fadeIn("slow")},function(){var e=s(this);e.attr("wftitle",e.data("tipText")),s(".wftooltip").remove()}).mousemove(function(e){s(".wftooltip").css({top:e.pageY+10,left:e.pageX+20})}),s(".generateFeed").validate(),s(r).on("click","[data-toggle_slide]",function(e){e.preventDefault(),s(s(this).data("toggle_slide")).slideToggle("fast")}).on("click","#wf_newRow",function(){var e=s("#table-1 tbody"),t=s("#feed_config_template").text().trim().replace(/__idx__/g,e.find("tr").length);e.append(t),f.fancySelect(s(".outputType"))}).on("click",".single-feed-delete",function(e){e.preventDefault(),confirm(c.form.del_confirm)&&(a.location.href=s(this).attr("val"))}).on("click",".wf_clean_cache_wrapper",function(e){e.preventDefault();var t=s(".woo-feed-clean-cache-nonce").val(),n=s(".woo-feed-cache-loader");n.show(),i.post("clear_cache_data",{_ajax_clean_nonce:t}).then(function(e){e.success&&n.hide()}).fail(function(e){console.log("something wrong")})}).on("click","#woo-feed-copy-status-btn",function(e){e.preventDefault();var t=s("#woo-feed-copy-status-btn"),n=s("#woo-feed-status-area");t.val("Copied"),n.css("visibility","visible"),n.select(),r.execCommand("copy")}).on("change",".wf_attr.wf_attributes",function(e){e.preventDefault(),s(".fancy-picker-picked").trigger("click");var t,n,a=s(this).val(),r=s(this).parents("tr").find(".outputType"),o=s(this).parents("tr").find(".fancy-picker-content .fancy-picker-option"),i=s(this).parents("tr").find(".fancy-picker-data span");n=["price","current_price","sale_price","price_with_tax","current_price_with_tax","sale_price_with_tax"].includes(a)?(t="for_price","Price"):""!==a&&-1!==a.indexOf("wf_taxo")?(t="for_custom_taxo","parent_if_empty"):(t="for_all","Default"),o.removeClass("selected"),"for_custom_taxo"===t||"for_price"===t?o.each(function(e){n===s(this).text()&&(s(this).addClass("selected"),i.text(n),r.find("option").text(n),r.find("option").val(s(this).data("value")))}):o.each(function(e){"parent_if_empty"!==s(this).text()&&"for_all"===t&&(s(this).addClass("selected"),i.text(n),r.find("option").text(n),r.find("option").val(s(this).data("value")))})}).on("click","#doaction, #doaction2",function(){return confirm(c.form.del_confirm_multi)}).on("change",".dType",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".value_attribute").hide(),n.find(".value_pattern").show()):"attribute"===t?(n.find(".value_attribute").show(),n.find(".value_pattern").hide()):"remove"===t&&(n.find(".value_attribute").hide(),n.find(".value_pattern").hide())}).on("click",".delRow",function(e){e.preventDefault(),s(this).closest("tr").remove(),f.reindex_config_table()}).on("submit","#generateFeed",function(){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(c.form.generate,"</b>"))}).on("submit","#updatefeed",function(e,t){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(t&&t.save?c.form.save:c.form.generate,"</b>"))}).on("change",".ftporsftp",function(){var e=s(this).val(),t=s(".ssh2_status");"sftp"===e?(t.show().css("color","dodgerblue").text(c.form.sftp_checking),i.post("get_ssh2_status",{_ajax_nonce:c.nonce,server:e}).then(function(e){"exists"===e?(t.css("color","#2CC185").text(c.form.sftp_available),setTimeout(function(){t.hide()},1500)):t.show().css("color","red").text(c.form.sftp_warning)}).fail(function(e){t.hide(),f.ajax_fail(e)})):t.hide()}).on("click",'[name="save_feed_config"]',function(e){e.preventDefault(),s("#updatefeed").trigger("submit",{save:!0})}).on("change","#provider",function(e){e.preventDefault();var t=s(this).val(),n=s("#feedType"),a=s("#providerPage"),r=s("#feed_merchant_info");a.html('<h3><span style="float:none;margin: -3px 0 0;" class="spinner is-active"></span> '+c.form.loading_tmpl+"</h3>"),r.find(".spinner").addClass("is-active"),n.disabled(!0),n.parent().find(".spinner").addClass("is-active"),r.find(".merchant-info-section .data").html(""),u.hasOwnProperty(t)?_.renderMerchantInfo(r,n,u[t]):i.send("woo_feed_get_merchant_info",{type:"GET",data:{nonce:c.nonce,provider:t}}).then(function(e){u[t]=e,_.renderMerchantInfo(r,n,e)}).fail(f.ajax_fail),p.hasOwnProperty(t)?_.renderMerchantTemplate(a,p[t]):i.post("get_feed_merchant",{_ajax_nonce:c.nonce,merchant:t}).then(function(e){p[t]=e,_.renderMerchantTemplate(a,e),"bing"===t&&(s("#delimiter option").removeAttr("selected"),s('#delimiter option[value="tab"]').attr("selected","selected"),s("#enclosure option").removeAttr("selected"),s('#enclosure option[value=" "]').attr("selected","selected")),"google_product_review"!==t&&s('.wf_attributes option[value="reviewer_name"]').hide()}).fail(f.ajax_fail)}).on("change",".woo_feed_status_input",function(){var e=s(this);i.post("update_feed_status",{_ajax_nonce:c.nonce,feedName:e.val(),status:e[0].checked?1:0})}),s(r).on("change",'[name="is_outOfStock"], [name="product_visibility"]',function(){var e=s(".out-of-stock-visibility");"n"===s('[name="is_outOfStock"]:checked').val()&&"1"===s('[name="product_visibility"]:checked').val()?e.show():e.hide()}).on("change",".attr_type",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".wf_attr").hide(),n.find(".wf_attr").val(""),n.find(".wf_default").show()):(n.find(".wf_attr").show(),n.find(".wf_default").hide(),n.find(".wf_default").val(""))}).on("change",".wf_mattributes, .attr_type",function(){var e=s(this).closest("tr"),t=e.find(".wf_mattributes"),n=e.find(".attr_type"),a=e.find("td:eq(4)"),r=s("#provider").val();if(c.form.google_category.hasOwnProperty(t.val())&&"pattern"===n.val()&&f.in_array(r,c.form.google_category[t.val()])){if(0===a.find("select.selectize").length){a.find("input.wf_default").remove(),a.append('<span class="wf_default wf_attributes"><select name="default[]" class="selectize"></select></span>'),a.append('<span style="font-size:x-small;"><a style="color: red" href="http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category" target="_blank">'.concat(c.learn_more,"</a></span>")),d||a.append('<span class="spinner is-active" style="margin: 0;"></span>');var o=a.find(".wf_attributes select");f.selectize(o,{preload:!0,placeholder:c.form.select_category,load:function(e,t){d?t(d):i.send("get_google_categories",{type:"GET",data:{_ajax_nonce:c.nonce,action:"get_google_categories",provider:r}}).then(function(e){t(d=e),a.find(".spinner").remove()}).fail(f.ajax_fail)}})}}else"current_category"!==t.val()&&0===a.find("input.wf_default").length&&(a.find("span").remove(),a.append('<input autocomplete="off" class="wf_default wf_attributes" type="text" name="default[]" value="">'),"pattern"!==n.val()&&a.find("input.wf_default").hide())}).on("change","#feedType,#provider",function(){var e=s("#feedType").val(),t=s("#provider").val(),n=s(".itemWrapper"),a=s(".wf_csvtxt");""!==e&&f.in_array(t,c.form.item_wrapper_hidden)?n.hide():"xml"===e?(n.show(),a.hide()):"csv"===e||"txt"===e?(n.hide(),a.show()):(n.hide(),a.hide())}).trigger("change")})}(jQuery,window,document,wp.ajax,wpf_ajax_obj);
|
2 |
//# sourceMappingURL=woo-feed-admin.min.js.map
|
1 |
+
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}!function(s,a,r,i,c){s.fn.disabled=function(n){return s(this).each(function(){var e=s(this),t="disabled";void 0!==e.prop(t)?e.prop(t,void 0===n||!0===n):!0===n?e.addClass(t):e.removeClass(t)}),self},s.fn.isDisabled=function(){var e=s(this),t="disabled";return void 0!==e.prop(t)?e.prop(t):e.hasClass(t)};function e(e){s(e.currentTarget).removeClass(function(e,t){return(t.match(/\btooltipped-\S+/g)||[]).join(" ")}).removeClass("tooltipped").removeAttr("aria-label")}function o(e,t){s(e).addClass("tooltipped tooltipped-s").attr("aria-label",t)}function l(e,t){return s.extend(!0,{},e,t)}function t(){n=s(".toClipboard"),!ClipboardJS.isSupported()||/iPhone|iPad/i.test(navigator.userAgent)?n.find("img").hide(0):(n.each(function(){s(this).on("mouseleave",e).on("blur",e)}),new ClipboardJS(".toClipboard").on("error",function(e){var t,n;o(e.trigger,(t=e.action,n="cut"===t?"X":"C",/iPhone|iPad/i.test(navigator.userAgent)?"No support :(":/Mac/i.test(navigator.userAgent)?"Press ⌘-"+n+" to "+t:"Press Ctrl-"+n+" to "+t))}).on("success",function(e){o(e.trigger,"Copied!")}))}var n,f,d={in_array:function(e,t){try{return-1!==t.indexOf(e)}catch(e){return!1}},selectize_render_item:function(e,t){return'<div class="item wapk-selectize-item">'.concat(t(e.text),"</div>")},ajax_fail:function(e){console.warn(e),alert(e.hasOwnProperty("statusText")&&e.hasOwnProperty("status")?c.ajax.error+"\n"+e.statusText+" ("+e.status+")":e)},sortable:function(e,n,a,r){return(e||s(".sorted_table")).each(function(){var e=s(this),t=e.find("tbody > tr:eq(0) > td").length||a||9;e.wf_sortable(l({containerSelector:"table",itemPath:"> tbody",itemSelector:"tr",handle:"i.wf_sortedtable",placeholder:'<tr class="placeholder"><td colspan="'.concat(t,'"></td></tr>'),onDrop:function(e,t,n,a){e.removeClass(t.group.options.draggedClass).removeAttr("style"),s("body").removeClass(t.group.options.bodyClass),r&&"function"==typeof r&&r(e,t,n,a)}},n))})},selectize:function(e,t){return(e||s("select.selectize")).not(".selectized").each(function(){var e=s(this);e.selectize(l({create:e.data("create")||!1,plugins:e.data("plugins")?e.data("plugins").split(",").map(function(e){return e.trim()}):[],render:{item:d.selectize_render_item}},t))})},fancySelect:function(e,t){return(e||s("select.fancySelect")).not(".FancySelectInit").each(function(){s(this).fancySelect(l({maxItemShow:3},t))})},reindex_config_table:function(){s("#table-1").find("tbody tr").each(function(n,e){s(e).find("[name]").each(function(e,t){s(t).attr("name",s(t).attr("name").replace(/(\[\d\])/g,"[".concat(n,"]")))})})},common:function(){d.sortable(s(".sorted_table"),{},9,d.reindex_config_table),d.selectize(),d.fancySelect(s(".outputType"))}},_={form:null,init:function(){this.form=s(".generateFeed"),this.form.length&&(d.common(),s(r).trigger(new jQuery.Event("feedEditor.init",{target:this.form})))},renderMerchantInfo:function(n,a,r){function e(e){var t;r.hasOwnProperty(e)&&(n.find(".merchant-info-section."+e+" .data").html(r[e]),"feed_file_type"===e&&((t=r[e].split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return""!==e&&e!==c.na.toLowerCase()})).length?(a.find("option").removeAttr("selected").each(function(){var e=s(this);e.val()&&!d.in_array(e.val(),t)?e.disabled(!0):e.disabled(!1)}),1===t.length&&a.find('option[value="'+t[0]+'"]').attr("selected","selected")):a.find("option").disabled(!1)))}for(var t in r)e(t);n.find(".spinner").removeClass("is-active"),a.disabled(!1),a.trigger("change"),a.parent().find(".spinner").removeClass("is-active")},renderMerchantTemplate:function(n,a){function e(t){if(a.hasOwnProperty(t))if("tabs"===t)n.html(a[t]);else{var e=s('[name="'+t+'"]');e.length&&e.each(function(){var e=s(this);e.is("select")?e.find('[value="'+a[t]+'"]').prop("selected",!0):(e.is("[type=checkbox]")||e.is("[type=radio]"))&&e.val()===a[t]?e.prop("checked",!0):e.val(a[t])}).trigger("change")}}for(var t in a)e(t);_.init()}},u=[],p=[],h=function(){function e(){_classCallCheck(this,e),this._feed=c.generator.feed,this._limit=c.generator.limit,this._progress=0,this._timer=null,this._color=!1,this._total_batch=0,this._current_batch=0,this._product_ids=[],this._progress_per_batch=0,this._refresh=!0,this._regenerate=c.generator.regenerate,a.isRegenerating=!1,this._all_btn=s(".wpf_regenerate"),this._current_btn=s("#".concat(this._feed.replace("wf_config","wf_feed_"))),this._current_btn_label=""}return _createClass(e,[{key:"init",value:function(){var n=this;""!==this._feed&&this._regenerate&&!1===a.isRegenerating&&this.generate();var e=a.location.search;return"webappick-manage-feeds"===new URLSearchParams(e).get("page")&&s("body").addClass("woo-import-popup-body"),s(r).on("click",".woo-feed-campaign-close-button",function(e){e.preventDefault(),s(this).parent(".woo-feed-promotion").hide();var t=s(this).data("condition");1===t&&i.post("woo_feed_hide_promotion",{_ajax_nonce:c.nonce,condition:t}).then(function(e){n._log(e)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red"})}),s(r).on("click",".wpf_regenerate",function(e){e.preventDefault(),n._current_btn=s(this),n._current_btn.hasClass("disabled")||!0===a.isRegenerating||(n._feed=n._current_btn.attr("id").replace("wf_feed_","wf_config"),""!==n._feed&&n.generate())}),this}},{key:"_block_button",value:function(){this._all_btn.length&&this._all_btn.addClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").addClass("wpf_spin reverse_spin"),this._current_btn_label=this._current_btn.attr("title"),this._current_btn.attr("aria-label",c.regenerate).attr("title",c.regenerate))}},{key:"_unblock_button",value:function(){this._all_btn.length&&this._all_btn.removeClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").removeClass("wpf_spin"),this._current_btn.find("span").removeClass("reverse_spin"),this._current_btn.attr("aria-label",this._current_btn_label).attr("title",this._current_btn_label))}},{key:"generate",value:function(){var t=this,n=this;a.isRegenerating=!0,this._block_button(),this._resetProgressBar(),this._progressBarActive(),this._log("Counting Total Products"),this._updateProgressStatus("Fetching products."),this._get_product_ids().then(function(e){t._progress=10,n._log({response:e}),e.success?(n._log("Total ".concat(e.total," Products found.")),n._product_ids=e.product,n._total_batch=t._product_ids.length,n._current_batch=0,n._progress_per_batch=(90-t._progress)/t._total_batch,n._process_batch(),n._updateProgressStatus("Processing Products...")):n._updateProgressStatus(e.data.message)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red",setTimeout(function(){n._stopProgressBar(),n._unblock_button()},1500)})}},{key:"_get_product_ids",value:function(){return this._progress=5,i.post("get_product_information",{_ajax_nonce:c.nonce,feed:this._feed,limit:this._limit})}},{key:"_process_batch",value:function(){var t=this,e="Processing Batch ".concat(this._current_batch+1," of ").concat(this._total_batch);this._updateProgressStatus(e),this._log(e),i.post("make_batch_feed",{_ajax_nonce:c.nonce,feed:this._feed,products:this._product_ids[this._current_batch],loop:this._current_batch}).then(function(e){t._current_batch++,t._log("Batch ".concat(t._current_batch," Completed")),t._log(e),t._current_batch<t._total_batch&&(t._process_batch(),t._progress+=t._progress_per_batch),t._current_batch===t._total_batch&&t._save_feed_file()}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_save_feed_file",value:function(){var t=this;this._log("Saving feed file"),this._updateProgressStatus("Saving feed file"),i.post("save_feed_file",{_ajax_nonce:c.nonce,feed:this._feed}).then(function(e){t._log(e),t._progress=100,t._refresh&&(a.location.href="".concat(c.pages.list.feed,"&link=").concat(e.url,"&cat=").concat(e.cat)),setTimeout(function(){t._stopProgressBar(),setTimeout(function(){t._resetProgressBar(!0),t._unblock_button()},3e3)},2500)}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_log",value:function(e){return c.wpf_debug&&console.log(e),this}},{key:"_progressBarActive",value:function(e){var t=0<arguments.length&&void 0!==e?e:0,n=this;return this._toggleProgressBar(!0),this._timer=setInterval(function(){n._updateProgressBar()},t||1e3),this}},{key:"_stopProgressBar",value:function(){return clearInterval(this._timer),this}},{key:"_resetProgressBar",value:function(e){return this._toggleProgressBar(!1),this._updateProgressStatus(""),clearInterval(this._timer),this._color=!1,this._timer=null,this._progress=0,e&&this._updateProgressBar(),this}},{key:"_toggleProgressBar",value:function(e){var t=s("#feed_progress_table");return e?t.show():t.hide(),this}},{key:"_updateProgressStatus",value:function(e){return s(".feed-progress-status").text(e),this}},{key:"_updateProgressBar",value:function(){var e=s(".feed-progress-percentage"),t=s(".feed-progress-bar-fill"),n="".concat(Math.round(this._progress),"%");t.css({width:n}),e.text(n)}}]),e}();a.wf={helper:d,feedEditor:_,generator:h},s(a).on("load",function(){null!==s(location).attr("href").match(/webappick.*feed/g)&&s("#wpbody-content").addClass("woofeed-body-content");var e=a.location.search;"edit-feed"===new URLSearchParams(e).get("action")&&s(".itemWrapper").show(),t(),postboxes.add_postbox_toggles(pagenow),(new h).init(),""!==c.generator.feed&&c.generator.regenerate,_.init(),d.common(),s(".wfmasterTooltip").hover(function(){var e=s(this),t=e.attr("wftitle");e.data("tipText",t).removeAttr("wftitle"),s('<p class="wftooltip"></p>').text(t).appendTo("body").fadeIn("slow")},function(){var e=s(this);e.attr("wftitle",e.data("tipText")),s(".wftooltip").remove()}).mousemove(function(e){s(".wftooltip").css({top:e.pageY+10,left:e.pageX+20})}),s(".generateFeed").validate(),s(r).on("click","[data-toggle_slide]",function(e){e.preventDefault(),s(s(this).data("toggle_slide")).slideToggle("fast")}).on("click","#wf_newRow",function(){var e=s("#table-1 tbody"),t=s("#feed_config_template").text().trim().replace(/__idx__/g,e.find("tr").length);e.append(t),d.fancySelect(s(".outputType"))}).on("click",".single-feed-delete",function(e){e.preventDefault(),confirm(c.form.del_confirm)&&(a.location.href=s(this).attr("val"))}).on("click",".wf_clean_cache_wrapper",function(e){e.preventDefault();var t=s(".woo-feed-clean-cache-nonce").val(),n=s(".woo-feed-cache-loader");n.show(),i.post("clear_cache_data",{_ajax_clean_nonce:t}).then(function(e){e.success&&n.hide()}).fail(function(e){console.log("something wrong")})}).on("click","#woo-feed-copy-status-btn",function(e){e.preventDefault();var t=s("#woo-feed-copy-status-btn"),n=s("#woo-feed-status-area");t.val("Copied"),n.css("visibility","visible"),n.select(),r.execCommand("copy")}).on("change",".wf_attr.wf_attributes",function(e){e.preventDefault(),s(".fancy-picker-picked").trigger("click");var t,n,a=s(this).val(),r=s(this).parents("tr").find(".outputType"),o=s(this).parents("tr").find(".fancy-picker-content .fancy-picker-option"),i=s(this).parents("tr").find(".fancy-picker-data span");n=["price","current_price","sale_price","price_with_tax","current_price_with_tax","sale_price_with_tax"].includes(a)?(t="for_price","Price"):""!==a&&-1!==a.indexOf("wf_taxo")?(t="for_custom_taxo","parent_if_empty"):(t="for_all","Default"),o.removeClass("selected"),"for_custom_taxo"===t||"for_price"===t?o.each(function(e){n===s(this).text()&&(s(this).addClass("selected"),i.text(n),r.find("option").text(n),r.find("option").val(s(this).data("value")))}):o.each(function(e){"parent_if_empty"!==s(this).text()&&"for_all"===t&&(s(this).addClass("selected"),i.text(n),r.find("option").text(n),r.find("option").val(s(this).data("value")))})}).on("click","#doaction, #doaction2",function(){return confirm(c.form.del_confirm_multi)}).on("change",".dType",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".value_attribute").hide(),n.find(".value_pattern").show()):"attribute"===t?(n.find(".value_attribute").show(),n.find(".value_pattern").hide()):"remove"===t&&(n.find(".value_attribute").hide(),n.find(".value_pattern").hide())}).on("click",".delRow",function(e){e.preventDefault(),s(this).closest("tr").remove(),d.reindex_config_table()}).on("submit","#generateFeed",function(){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(c.form.generate,"</b>"))}).on("submit","#updatefeed",function(e,t){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(t&&t.save?c.form.save:c.form.generate,"</b>"))}).on("change",".ftporsftp",function(){var e=s(this).val(),t=s(".ssh2_status");"sftp"===e?(t.show().css("color","dodgerblue").text(c.form.sftp_checking),i.post("get_ssh2_status",{_ajax_nonce:c.nonce,server:e}).then(function(e){"exists"===e?(t.css("color","#2CC185").text(c.form.sftp_available),setTimeout(function(){t.hide()},1500)):t.show().css("color","red").text(c.form.sftp_warning)}).fail(function(e){t.hide(),d.ajax_fail(e)})):t.hide()}).on("click",'[name="save_feed_config"]',function(e){e.preventDefault(),s("#updatefeed").trigger("submit",{save:!0})}).on("change","#provider",function(e){e.preventDefault();var t=s(this).val(),n=s("#feedType"),a=s("#providerPage"),r=s("#feed_merchant_info");a.html('<h3><span style="float:none;margin: -3px 0 0;" class="spinner is-active"></span> '+c.form.loading_tmpl+"</h3>"),r.find(".spinner").addClass("is-active"),n.disabled(!0),n.parent().find(".spinner").addClass("is-active"),r.find(".merchant-info-section .data").html(""),u.hasOwnProperty(t)?_.renderMerchantInfo(r,n,u[t]):i.send("woo_feed_get_merchant_info",{type:"GET",data:{nonce:c.nonce,provider:t}}).then(function(e){u[t]=e,_.renderMerchantInfo(r,n,e)}).fail(d.ajax_fail),p.hasOwnProperty(t)?_.renderMerchantTemplate(a,p[t]):i.post("get_feed_merchant",{_ajax_nonce:c.nonce,merchant:t}).then(function(e){p[t]=e,_.renderMerchantTemplate(a,e),"bing"===t&&(s("#delimiter option").removeAttr("selected"),s('#delimiter option[value="tab"]').attr("selected","selected"),s("#enclosure option").removeAttr("selected"),s('#enclosure option[value=" "]').attr("selected","selected")),"google_product_review"!==t&&s('.wf_attributes option[value="reviewer_name"]').hide()}).fail(d.ajax_fail)}).on("change",".woo_feed_status_input",function(){var e=s(this);i.post("update_feed_status",{_ajax_nonce:c.nonce,feedName:e.val(),status:e[0].checked?1:0})}),s(r).on("change",'[name="is_outOfStock"], [name="product_visibility"]',function(){var e=s(".out-of-stock-visibility");"n"===s('[name="is_outOfStock"]:checked').val()&&"1"===s('[name="product_visibility"]:checked').val()?e.show():e.hide()}).on("change",".attr_type",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".wf_attr").hide(),n.find(".wf_attr").val(""),n.find(".wf_default").show()):(n.find(".wf_attr").show(),n.find(".wf_default").hide(),n.find(".wf_default").val(""))}).on("change",".wf_mattributes, .attr_type",function(){var e=s(this).closest("tr"),t=e.find(".wf_mattributes"),n=e.find(".attr_type"),a=e.find("td:eq(4)"),r=s("#provider").val();if(c.form.google_category.hasOwnProperty(t.val())&&"pattern"===n.val()&&d.in_array(r,c.form.google_category[t.val()])){if(0===a.find("select.selectize").length){a.find("input.wf_default").remove(),a.append('<span class="wf_default wf_attributes"><select name="default[]" class="selectize"></select></span>'),a.append('<span style="font-size:x-small;"><a style="color: red" href="http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category" target="_blank">'.concat(c.learn_more,"</a></span>")),f||a.append('<span class="spinner is-active" style="margin: 0;"></span>');var o=a.find(".wf_attributes select");d.selectize(o,{preload:!0,placeholder:c.form.select_category,load:function(e,t){f?t(f):i.send("get_google_categories",{type:"GET",data:{_ajax_nonce:c.nonce,action:"get_google_categories",provider:r}}).then(function(e){t(f=e),a.find(".spinner").remove()}).fail(d.ajax_fail)}})}}else"current_category"!==t.val()&&0===a.find("input.wf_default").length&&(a.find("span").remove(),a.append('<input autocomplete="off" class="wf_default wf_attributes" type="text" name="default[]" value="">'),"pattern"!==n.val()&&a.find("input.wf_default").hide())}).on("change","#feedType,#provider",function(e){var t=s("#feedType").val(),n=s("#provider").val(),a=s(".itemWrapper"),r=s(".wf_csvtxt");""!==t&&d.in_array(n,c.form.item_wrapper_hidden)&&a.hide(),"feedType"===e.target.id&&("csv"===t||"txt"===t?(a.hide(),r.show()):(a.show(),r.hide()))}).trigger("change")})}(jQuery,window,document,wp.ajax,wpf_ajax_obj);
|
2 |
//# sourceMappingURL=woo-feed-admin.min.js.map
|
admin/js/woo-feed-admin.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["woo-feed-admin.js"],"names":["_defineProperties","target","props","descriptor","i","_createClass","Constructor","protoProps","staticProps","prototype","window","wpAjax","self","prop","showTooltip","$","hasClass","currentTarget","clearTooltip","removeClass","actionMsg","className","match","index","action","removeAttr","actionKey","elem","addClass","attr","msg","extend","_default","_args","clip","$copyBtn","feedGenerator","left","event","trigger","test","navigator","on","console","googleCategories","in_array","needle","haystack","sortable","escape","data","text","ajax_fail","column_count","find","warn","wf_sortable","selectize_render_item","e","hasOwnProperty","opts","ajax","error","statusText","status","el","config","column","_onDrop","each","this","length","selectize","itemPath","create","concat","plugins","$item","container","containerSelector","group","options","bodyClass","itemSelector","handle","onDrop","fancySelect","maxItemShow","split","map","s","trim","helper","render","item","replace","x","form","merchantInfo","document","jQuery","k","init","renderMerchantInfo","opt","feedType","r","types","html","t","toLowerCase","na","disabled","val","_loop2","feedForm","contentSettings","renderMerchantTemplate","feedEditor","is","merchantInfoCache","tooltip","css","top","isRegenerating","_feed","_current_btn","feed","_limit","generator","limit","_progress","_product_ids","_progress_per_batch","_refresh","_all_btn","generate","condition","then","_current_btn_label","response","_color","preventDefault","parent","hide","_ajax_nonce","_log","_updateProgressStatus","message","key","regenerate","_block_button","value","_this","product","setTimeout","_stopProgressBar","_process_batch","_current_batch","_total_batch","post","_save_feed_file","fail","_resetProgressBar","_unblock_button","refreshInterval","arguments","undefined","clearInterval","_timer","_updateProgressBar","update","table","show","width","bar","wf","current_page_url_query","page_action","postboxes","add_postbox_toggles","pagenow","template","common","hover","title","appendTo","userAgent","merchantTemplateCache","remove","ClipboardJS","clipboard","slideToggle","loader","tbody","confirm","del_confirm","href","button","status_area","execCommand","success","current_attribute_value","fancyOption","fancyDataPicker","selectIf","price_attributes","selectKey","outputSelect","parents","includes","indexOf","row","type","reindex_config_table","valid","server","validate","save","sftp_available","send","provider","merchant","nonce","checked","outOfStockVisibilityRow","valueColumn","append","attribute","select","load","google_category","query","preload","cb","itemWrapper","wf_csv_txt"],"mappings":"yHAAA,SAAAA,kBAAAC,EAAAC,+BACA,IAAAC,EAAAD,EAAAE,kHADA,SAAAC,aAAAC,EAAAC,EAAAC,GAWC,OAFDD,GAAAP,kBAAAM,EAAAG,UAAAF,GARAC,GAAAE,kBAAAC,EAAAH,GAUCF,gFA0BGM,IAAAA,EAAAA,EAAAA,MACAC,EAAAD,gBAEA,IAAAA,EAAAA,KAAAC,GAHAD,EAAAA,KAAAA,OAAAA,IAAAA,IAAAA,IAAAA,4EAYF,IAAAE,EAAAA,EAAAA,MAEAC,EAAA,WACA,YAHA,IAAAH,EAAAC,KAAAA,GAAAD,EAAAC,KAAAA,GAAAD,EAAAI,SAAAH,IAUQI,SAWRC,EAXuBC,GAAaC,EAAAA,EAAAA,eAAuBC,YAAUC,SAAMC,EAAhBC,GAAvB,OAA+EL,EAAAA,MAAAA,sBAAAA,IAAAA,KAAAA,OADpHC,YAAA,cAAAK,WAAAC,cAKGC,SAAFZ,EAAAA,EAAAA,GACAA,EAEDY,GAAAC,SAAA,2BAAAC,KAAA,aAAAC,GAiCyB,SAAAC,EAAAC,EAAAC,GAAA,OAvBvBlB,EAAAgB,QAAA,EAAA,GAAAC,EAAAC,GAHAb,SA8MEc,IAEAtB,EAAAA,EAAAA,4GAxRL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5K,KAAA,oBAAAiB,SAuFC2J,EAAUb,KAAI,QAAKxB,SAtFpB8C,EAAAA,OAAA,sGAEO,YAoFAtB,EAtFPpG,OAGCgH,EAAAA,KAAAA,oBAAAA,UAKDW,GAAAA,SAAQ,sBAAR,WAAA,IAAAvB,EAAAtM,EAAA,aAAAkG,MAAA4G,EAyFQ9M,EAAA,aApMJiD,MA9SJ2K,EAAA5N,EAAA,gBA8ZCqM,EAz7BLrM,EAy7BcoF","file":"woo-feed-admin.min.js","sourcesContent":["// noinspection JSUnresolvedletiable\r\n/**!\r\n * WooFeed Scripts\r\n * @version 3.3.6\r\n * @package WooFeed\r\n * @copyright 2020 WebAppick\r\n *\r\n */\r\n/* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\r\n// noinspection JSUnresolvedVariable\r\n(function($, window, document, wpAjax, opts) {\r\n\t\"use strict\";\r\n\t/**\r\n\t * All of the code for your admin-facing JavaScript source\r\n\t * should reside in this file.\r\n\t *\r\n\t * Note: It has been assumed you will write jQuery code here, so the\r\n\t * $ function reference has been prepared for usage within the scope\r\n\t * of this function.\r\n\t *\r\n\t * This enables you to define handlers, for when the DOM is ready:\r\n\t */\r\n\r\n\t/**\r\n\t * disable element utility\r\n\t *\r\n\t * @since 3.1.9\r\n\t *\r\n\t * @param {*} status\r\n\t * @returns {jQuery|HTMLElement}\r\n\t */\r\n\t$.fn.disabled = function(status) {\r\n\t\t$(this).each(function() {\r\n\t\t\tlet self = $(this),\r\n\t\t\t\tprop = 'disabled';\r\n\r\n\t\t\tif (typeof self.prop(prop) !== 'undefined') {\r\n\t\t\t\tself.prop(prop, status === void 0 || status === true);\r\n\t\t\t} else {\r\n\t\t\t\t!0 === status ? self.addClass(prop) : self.removeClass(prop);\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn self; // method chaining\r\n\t};\r\n\t\r\n\t/**\r\n\t * Check if a HTMLElement or jQuery is disabled\r\n\t */\r\n\t$.fn.isDisabled = function() {\r\n\t\tlet self = $(this),\r\n\t\t\tprop = 'disabled';\r\n\t\treturn typeof self.prop(prop) !== 'undefined' ? self.prop(prop) : self.hasClass(prop);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Clear Tooltip for clip board js\r\n\t * @param {Object} event\r\n\t */\r\n\tconst clearTooltip = (event) => {\r\n\t\t$(event.currentTarget).removeClass( (index, className) => (className.match(/\\btooltipped-\\S+/g) || []).join(' ') ).removeClass('tooltipped').removeAttr('aria-label');\r\n\t};\r\n\r\n\tconst showTooltip = (elem, msg) => {\r\n\t\t$(elem).addClass('tooltipped tooltipped-s').attr('aria-label', msg);\r\n\t};\r\n\r\n\tconst fallbackMessage = (action) =>{\r\n\t\tlet actionMsg,\r\n\t\t\tactionKey = action === 'cut' ? 'X' : 'C';\r\n\r\n\t\tif (/iPhone|iPad/i.test(navigator.userAgent)) {\r\n\t\t\tactionMsg = 'No support :(';\r\n\t\t} else if (/Mac/i.test(navigator.userAgent)) {\r\n\t\t\tactionMsg = 'Press ⌘-' + actionKey + ' to ' + action;\r\n\t\t} else {\r\n\t\t\tactionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;\r\n\t\t}\r\n\r\n\t\treturn actionMsg;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Alias of jQuery.extend()\r\n\t * @param {Object} _default\r\n\t * @param {Object} _args\r\n\t */\r\n\tconst extend = (_default, _args) => $.extend(true, {}, _default, _args);\r\n\t\r\n\tlet $copyBtn,\r\n\t\tclipboard,\r\n\t\tgoogleCategories,\r\n\t\thelper = {\r\n\t\t\tin_array: (needle, haystack) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\treturn haystack.indexOf(needle) !== -1;\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tselectize_render_item: (data, escape) => `<div class=\"item wapk-selectize-item\">${ escape(data.text)}</div>`, // phpcs:ignore WordPressVIPMinimum.JS.StringConcat.Found,\r\n\t\t\tajax_fail: e => {\r\n\t\t\t\tconsole.warn(e);\r\n\t\t\t\talert(e.hasOwnProperty('statusText') && e.hasOwnProperty('status') ? opts.ajax.error + '\\n' + e.statusText + ' (' + e.status + ')' : e);\r\n\t\t\t},\r\n\t\t\t/**\r\n\t\t\t * Initialize Sortable\r\n\t\t\t * @param {jQuery|HTMLElement} el\r\n\t\t\t * @param {object} config\r\n\t\t\t * @param {int|boolean} column\r\n\t\t\t * @param {function} onDrop\r\n\t\t\t * @return {jQuery|HTMLElement}\r\n\t\t\t */\r\n\t\t\tsortable: (el, config, column, onDrop) => {\r\n\t\t\t\treturn (el || $('.sorted_table')).each(function() {\r\n\t\t\t\t\tlet self = $(this),\r\n\t\t\t\t\t\tcolumn_count = self.find('tbody > tr:eq(0) > td').length || column || 9;\r\n\t\t\t\t\tself.wf_sortable(extend({\r\n\t\t\t\t\t\tcontainerSelector: 'table',\r\n\t\t\t\t\t\titemPath: '> tbody',\r\n\t\t\t\t\t\titemSelector: 'tr',\r\n\t\t\t\t\t\thandle: 'i.wf_sortedtable',\r\n\t\t\t\t\t\tplaceholder: `<tr class=\"placeholder\"><td colspan=\"${column_count}\"></td></tr>`,\r\n\t\t\t\t\t\tonDrop: ($item, container, _super, event) => {\r\n\t\t\t\t\t\t\t$item.removeClass(container.group.options.draggedClass).removeAttr('style');\r\n\t\t\t\t\t\t\t$(\"body\").removeClass(container.group.options.bodyClass);\r\n\t\t\t\t\t\t\tif ( onDrop && 'function' === typeof( onDrop ) ) {\r\n\t\t\t\t\t\t\t\tonDrop( $item, container, _super, event );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tselectize: (el, config) => {\r\n\t\t\t\treturn (el || $('select.selectize')).not('.selectized').each(function() {\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.selectize(extend({\r\n\t\t\t\t\t\tcreate: self.data('create') || false,\r\n\t\t\t\t\t\tplugins: self.data('plugins') ? self.data('plugins').split(',').map(function(s) {\r\n\t\t\t\t\t\t\treturn s.trim();\r\n\t\t\t\t\t\t}) : [],\r\n\t\t\t\t\t\t//['remove_button'],\r\n\t\t\t\t\t\trender: {\r\n\t\t\t\t\t\t\titem: helper.selectize_render_item\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tfancySelect: (el, config) => {\r\n\t\t\t\treturn (el || $('select.fancySelect')).not('.FancySelectInit').each(function() {\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.fancySelect(extend({\r\n\t\t\t\t\t\tmaxItemShow: 3\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\treindex_config_table: () => {\r\n\t\t\t\t$('#table-1').find('tbody tr').each( ( x, el ) => {\r\n\t\t\t\t\t$(el).find('[name]').each( ( x1, el ) => {\r\n\t\t\t\t\t\t$(el).attr('name', $(el).attr('name').replace(/(\\[\\d\\])/g, `[${x}]`));\r\n\t\t\t\t\t} );\r\n\t\t\t\t} );\r\n\t\t\t},\r\n\t\t\tcommon: () => {\r\n\t\t\t\thelper.sortable( $('.sorted_table'), {}, 9, helper.reindex_config_table );\r\n\t\t\t\thelper.selectize();\r\n\t\t\t\thelper.fancySelect($('.outputType'));\r\n\t\t\t}\r\n\t\t},\r\n\t\t// helper functions\r\n\t\tfeedEditor = {\r\n\t\t\t/**\r\n\t\t\t * The Editor Form Elem.\r\n\t\t\t * @type {jQuery|HTMLElement}\r\n\t\t\t */\r\n\t\t\tform: null,\r\n\r\n\t\t\t/**\r\n\t\t\t * Initialize The Feed Editor {Tabs...}\r\n\t\t\t * @returns {void}\r\n\t\t\t */\r\n\t\t\tinit: function () {\r\n\t\t\t\tlet self = this;\r\n\t\t\t\tself.form = $('.generateFeed');\r\n\t\t\t\tif (!self.form.length) return;\r\n\t\t\t\thelper.common();\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t$(document).trigger(new jQuery.Event('feedEditor.init', {\r\n\t\t\t\t\ttarget: this.form\r\n\t\t\t\t}));\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Render Merchant info ajax response and handle allowed feed type for selected merchant\r\n\t\t\t * @param {jQuery|HTMLElement} merchantInfo jQuery dom object\r\n\t\t\t * @param {jQuery|HTMLElement} feedType jQuery dom object\r\n\t\t\t * @param {Object} r ajax response object\r\n\t\t\t */\r\n\t\t\trenderMerchantInfo: function (merchantInfo, feedType, r) {\r\n\t\t\t\tfor (let k in r) {\r\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\r\n\t\t\t\t\t\tmerchantInfo.find('.merchant-info-section.' + k + ' .data').html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\r\n\r\n\t\t\t\t\t\tif ('feed_file_type' === k) {\r\n\t\t\t\t\t\t\t(function() {\r\n\t\t\t\t\t\t\t\tlet types = r[k].split(\",\").map(function(t) {\r\n\t\t\t\t\t\t\t\t\treturn t.trim().toLowerCase();\r\n\t\t\t\t\t\t\t\t}).filter(function(t) {\r\n\t\t\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\t\t\treturn t !== '' && t !== opts.na.toLowerCase();\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\tif (types.length) {\r\n\t\t\t\t\t\t\t\t\tfeedType.find('option').removeAttr('selected').each(function() {\r\n\t\t\t\t\t\t\t\t\t\tlet opt = $(this);\r\n\t\t\t\t\t\t\t\t\t\topt.val() && !helper.in_array(opt.val(), types) ? opt.disabled(!0) : opt.disabled(!1);\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\tif (types.length === 1) feedType.find('option[value=\"' + types[0] + '\"]').attr('selected', 'selected');\r\n\t\t\t\t\t\t\t\t} else feedType.find('option').disabled(!1);\r\n\t\t\t\t\t\t\t})();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmerchantInfo.find('.spinner').removeClass('is-active');\r\n\t\t\t\tfeedType.disabled(!1);\r\n\t\t\t\tfeedType.trigger('change');\r\n\t\t\t\tfeedType.parent().find('.spinner').removeClass('is-active');\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Render Feed Template Tabs and settings while creating new feed.\r\n\t\t\t * @param {jQuery|HTMLElement} feedForm feed from query dom object\r\n\t\t\t * @param {object} r merchant template ajax response object\r\n\t\t\t */\r\n\t\t\trenderMerchantTemplate: function (feedForm, r) {\r\n\t\t\t\tlet _loop = function _loop(k) {\r\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\r\n\t\t\t\t\t\tif ('tabs' === k) {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedFunction\r\n\t\t\t\t\t\t\tfeedForm.html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlet contentSettings = $('[name=\"' + k + '\"]');\r\n\r\n\t\t\t\t\t\t\tif (contentSettings.length) {\r\n\t\t\t\t\t\t\t\tcontentSettings.each(function() {\r\n\t\t\t\t\t\t\t\t\tlet elem = $(this);\r\n\r\n\t\t\t\t\t\t\t\t\tif (elem.is('select')) {\r\n\t\t\t\t\t\t\t\t\t\telem.find('[value=\"' + r[k] + '\"]').prop('selected', true);\r\n\t\t\t\t\t\t\t\t\t} else if ((elem.is('[type=checkbox]') || elem.is('[type=radio]')) && elem.val() === r[k]) {\r\n\t\t\t\t\t\t\t\t\t\telem.prop('checked', true);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\telem.val(r[k]); // type=text\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}).trigger('change');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tfor (let k in r) {\r\n\t\t\t\t\t_loop(k);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfeedEditor.init();\r\n\t\t\t}\r\n\t\t},\r\n\t\t// Feed Editor Table\r\n\t\tmerchantInfoCache = [],\r\n\t\tmerchantTemplateCache = [],\r\n\t\ttooltip = () => {\r\n\t\t\t// Tooltip only Text\r\n\t\t\t$('.wfmasterTooltip')\r\n\t\t\t\t.hover(function () {\r\n\t\t\t\t\t// Hover over code\r\n\t\t\t\t\tlet self = $(this), title = self.attr('wftitle');\r\n\t\t\t\t\tself.data('tipText', title).removeAttr('wftitle');\r\n\t\t\t\t\t$('<p class=\"wftooltip\"></p>').text(title).appendTo('body').fadeIn('slow');\r\n\t\t\t\t}, function () {\r\n\t\t\t\t\t// Hover out code\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.attr('wftitle', self.data('tipText'));\r\n\t\t\t\t\t$('.wftooltip').remove();\r\n\t\t\t\t})\r\n\t\t\t\t.mousemove(function (e) {\r\n\t\t\t\t\t$('.wftooltip').css({\r\n\t\t\t\t\t\ttop: e.pageY + 10,\r\n\t\t\t\t\t\tleft: e.pageX + 20\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t},\r\n\t\tclip = () => {\r\n\t\t\t$copyBtn = $('.toClipboard');\r\n\t\t\tif (!ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent)) {\r\n\t\t\t\t$copyBtn.find('img').hide(0);\r\n\t\t\t} else {\r\n\t\t\t\t$copyBtn.each(function() {\r\n\t\t\t\t\t$(this).on('mouseleave', clearTooltip).on('blur', clearTooltip);\r\n\t\t\t\t});\r\n\t\t\t\tclipboard = new ClipboardJS('.toClipboard');\r\n\t\t\t\tclipboard.on('error', function(event) {\r\n\t\t\t\t\tshowTooltip(event.trigger, fallbackMessage(event.action));\r\n\t\t\t\t}).on('success', function(event) {\r\n\t\t\t\t\tshowTooltip(event.trigger, 'Copied!');\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t/**\r\n\t * Feed Generator Module\r\n\t */\r\n\tclass feedGenerator {\r\n\t\t\r\n\t\t/**\r\n\t\t * Constructor\r\n\t\t * @constructor\r\n\t\t */\r\n\t\tconstructor() {\r\n\t\t\tthis._feed = opts.generator.feed; // wf_config+xxxx\r\n\t\t\tthis._limit = opts.generator.limit;\r\n\t\t\tthis._progress = 0;\r\n\t\t\tthis._timer = null;\r\n\t\t\tthis._color = false;\r\n\t\t\t// batch info\r\n\t\t\tthis._total_batch = 0;\r\n\t\t\tthis._current_batch = 0;\r\n\t\t\tthis._product_ids = [];\r\n\t\t\tthis._progress_per_batch = 0;\r\n\t\t\tthis._refresh = true;\r\n\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\tthis._regenerate = opts.generator.regenerate;\r\n\t\t\twindow.isRegenerating = false;\r\n\t\t\tthis._all_btn = $('.wpf_regenerate');\r\n\t\t\tthis._current_btn = $(`#${this._feed.replace( 'wf_config', 'wf_feed_' )}`);\r\n\t\t\tthis._current_btn_label = '';\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Init Hooks (Event)\r\n\t\t * @return {feedGenerator}\r\n\t\t */\r\n\t\tinit() {\r\n\t\t\tlet self = this;\r\n\t\t\tif ( '' !== this._feed && this._regenerate && false === window.isRegenerating ) {\r\n\t\t\t\tthis.generate();\r\n\t\t\t}\r\n\r\n\t\t\t//thickbox body add feed plugin class to make it unique and custom style\r\n\t\t\tlet current_page_query = window.location.search;\r\n\t\t\tlet params = new URLSearchParams(current_page_query);\r\n\t\t\tlet page_name = params.get(\"page\");\r\n\t\t\tif( \"webappick-manage-feeds\" === page_name ) {\r\n\t\t\t\t$('body').addClass('woo-import-popup-body');\r\n\t\t\t}\r\n\r\n\t\t\t$(document).on('click', '.woo-feed-campaign-close-button', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t$(this).parent('.woo-feed-promotion').hide();\r\n\t\t\t\tlet condition = $(this).data('condition');\r\n\t\t\t\tif(1 === condition) {\r\n\t\t\t\t\twpAjax.post( 'woo_feed_hide_promotion', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tcondition: condition,\r\n\t\t\t\t\t} ).then( response => {\r\n\t\t\t\t\t\tself._log( response );\r\n\t\t\t\t\t} ).fail( error => {\r\n\t\t\t\t\t\tself._log( error );\r\n\t\t\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\t\t\tself._color = 'red';\r\n\t\t\t\t\t} );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t$(document).on('click', '.wpf_regenerate', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tself._current_btn = $( this );\r\n\t\t\t\tif( self._current_btn.hasClass('disabled') || window.isRegenerating === true ) return;\r\n\t\t\t\tself._feed = self._current_btn.attr('id').replace( 'wf_feed_', 'wf_config' );\r\n\t\t\t\tif( '' !== self._feed ) {\r\n\t\t\t\t\tself.generate();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t_block_button() {\r\n\t\t\tif ( this._all_btn.length ) {\r\n\t\t\t\tthis._all_btn.addClass('disabled');\r\n\t\t\t}\r\n\t\t\tif ( this._current_btn.length ) {\r\n\t\t\t\tthis._current_btn.find('span').addClass('wpf_spin reverse_spin');\r\n\t\t\t\tthis._current_btn_label = this._current_btn.attr('title');\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tthis._current_btn.attr( 'aria-label', opts.regenerate ).attr( 'title', opts.regenerate );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t_unblock_button() {\r\n\t\t\tif ( this._all_btn.length ) {\r\n\t\t\t\tthis._all_btn.removeClass('disabled');\r\n\t\t\t}\r\n\t\t\tif ( this._current_btn.length ) {\r\n\t\t\t\tthis._current_btn.find('span').removeClass('wpf_spin');\r\n\t\t\t\tthis._current_btn.find('span').removeClass('reverse_spin');\r\n\t\t\t\tthis._current_btn.attr( 'aria-label', this._current_btn_label ).attr( 'title', this._current_btn_label );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Generate Feed\r\n\t\t * @return void\r\n\t\t */\r\n\t\tgenerate() {\r\n\t\t\tlet self = this;\r\n\t\t\twindow.isRegenerating = true;\r\n\t\t\tthis._block_button();\r\n\t\t\tthis._resetProgressBar();\r\n\t\t\tthis._progressBarActive();\r\n\t\t\tthis._log( 'Counting Total Products' );\r\n\t\t\tthis._updateProgressStatus( 'Fetching products.' );\r\n\t\t\tthis._get_product_ids().then( response => {\r\n\t\t\t\tthis._progress = 10;\r\n\t\t\t\tself._log( {response} );\r\n\t\t\t\tif(response.success) {\r\n\t\t\t\t\tself._log( `Total ${response.total} Products found.` );\r\n\t\t\t\t\tself._product_ids = response.product;\r\n\t\t\t\t\tself._total_batch = this._product_ids.length;\r\n\t\t\t\t\tself._current_batch = 0;\r\n\t\t\t\t\tself._progress_per_batch = ( 90 - this._progress ) / this._total_batch;\r\n\t\t\t\t\tself._process_batch();\r\n\t\t\t\t\tself._updateProgressStatus( 'Processing Products...' );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself._updateProgressStatus( response.data.message );\r\n\t\t\t\t}\r\n\t\t\t}).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Get Product Ids\r\n\t\t * @returns {$.promise}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_get_product_ids() {\r\n\t\t\tthis._progress = 5;\r\n\t\t\treturn wpAjax.post( 'get_product_information', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t\tlimit: this._limit,\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Run the Batch\r\n\t\t * @private\r\n\t\t */\r\n\t\t_process_batch() {\r\n\t\t\tlet self = this;\r\n\t\t\tlet status = `Processing Batch ${this._current_batch+1} of ${this._total_batch}`;\r\n\t\t\tthis._updateProgressStatus( status );\r\n\t\t\tthis._log( status );\r\n\t\t\twpAjax.post( 'make_batch_feed', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t\tproducts: this._product_ids[this._current_batch],\r\n\t\t\t\tloop: this._current_batch,\r\n\t\t\t} ).then( response => {\r\n\t\t\t\tself._current_batch++;\r\n\t\t\t\tself._log( `Batch ${self._current_batch} Completed` );\r\n\t\t\t\tself._log( response );\r\n\t\t\t\tif ( self._current_batch < self._total_batch ) {\r\n\t\t\t\t\tself._process_batch();\r\n\t\t\t\t\tself._progress += self._progress_per_batch;\r\n\t\t\t\t}\r\n\t\t\t\tif ( self._current_batch === self._total_batch ) {\r\n\t\t\t\t\tself._save_feed_file();\r\n\t\t\t\t}\r\n\t\t\t} ).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Save Feed Data from temp to feed file\r\n\t\t * @private\r\n\t\t */\r\n\t\t_save_feed_file() {\r\n\t\t\tlet self = this;\r\n\t\t\tthis._log( 'Saving feed file' );\r\n\t\t\tthis._updateProgressStatus( 'Saving feed file' );\r\n\t\t\twpAjax.post( 'save_feed_file', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t} ).then( response => {\r\n\t\t\t\tself._log( response );\r\n\t\t\t\tself._progress = 100;\r\n\t\t\t\tif ( self._refresh ) {\r\n\t\t\t\t\twindow.location.href = `${opts.pages.list.feed}&link=${response.url}&cat=${response.cat}`;\r\n\t\t\t\t}\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\t\tself._resetProgressBar( true );\r\n\t\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t\t}, 3000 );\r\n\t\t\t\t}, 2500 );\r\n\t\t\t} ).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Console log wrapper with debug settings.\r\n\t\t * @param data\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_log( data ) {\r\n\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\tif ( opts.wpf_debug ) {\r\n\t\t\t\tconsole.log( data );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Run the progressbar refresh interval\r\n\t\t * @param {int} refreshInterval\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_progressBarActive( refreshInterval = 0 ) {\r\n\t\t\tlet self = this;\r\n\t\t\tthis._toggleProgressBar( true );\r\n\t\t\tthis._timer = setInterval( function(){\r\n\t\t\t\tself._updateProgressBar();\r\n\t\t\t}, refreshInterval || 1000 );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Stop Progressbar\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_stopProgressBar() {\r\n\t\t\tclearInterval( this._timer );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Reset Progressbar\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_resetProgressBar( update ) {\r\n\t\t\tthis._toggleProgressBar( false );\r\n\t\t\tthis._updateProgressStatus( '' );\r\n\t\t\tclearInterval( this._timer );\r\n\t\t\tthis._color = false;\r\n\t\t\tthis._timer = null;\r\n\t\t\tthis._progress = 0;\r\n\t\t\tif ( update ) {\r\n\t\t\t\tthis._updateProgressBar();\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Show hide the progress bar el\r\n\t\t * @param status\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_toggleProgressBar( status ) {\r\n\t\t\tlet table = $('#feed_progress_table');\r\n\t\t\tif ( status ) {\r\n\t\t\t\ttable.show();\r\n\t\t\t} else {\r\n\t\t\t\ttable.hide();\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Update Progress bar text status\r\n\t\t * @param {string} status\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_updateProgressStatus( status ) {\r\n\t\t\t$( '.feed-progress-status' ).text( status );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Update Progress Data\r\n\t\t * hooked with setInterval\r\n\t\t * @private\r\n\t\t */\r\n\t\t_updateProgressBar() {\r\n\t\t\tlet percentage = $( '.feed-progress-percentage' ),\r\n\t\t\t\tbar = $( '.feed-progress-bar-fill' ),\r\n\t\t\t\t_progress = `${Math.round( this._progress )}%`;\r\n\t\t\tbar.css( {\r\n\t\t\t\twidth: _progress,\r\n\t\t\t} );\r\n\t\t\tpercentage.text( _progress );\r\n\t\t}\r\n\t}\r\n\t// expose to the global scope\r\n\twindow.wf = {\r\n\t\thelper: helper,\r\n\t\tfeedEditor: feedEditor,\r\n\t\tgenerator: feedGenerator,\r\n\t};\r\n\t$(window).on('load', function() {\r\n\t\t// Template loading ui conflict\r\n\t\tif ($(location).attr(\"href\").match(/webappick.*feed/g) !== null) {\r\n\t\t\t$('#wpbody-content').addClass('woofeed-body-content');\r\n\t\t}\r\n\r\n\t\t// on edit page show item wrapper dropdown\r\n\t\tlet current_page_url_query = window.location.search;\r\n\t\tlet urlParams = new URLSearchParams(current_page_url_query);\r\n\t\tlet page_action = urlParams.get('action');\r\n\t\tif ( page_action === 'edit-feed' ) {\r\n\t\t\t$('.itemWrapper').show();\r\n\t\t}\r\n\r\n\t\t// ClipBoardJS\r\n\t\tclip();\r\n\t\t// postbox toggle\r\n\t\tpostboxes.add_postbox_toggles(pagenow);\r\n\t\t// initialize generator\r\n\t\tlet generator = new feedGenerator();\r\n\t\tgenerator.init();\r\n\t\t// noinspection JSUnresolvedVariable\r\n\t\tif( '' !== opts.generator.feed && opts.generator.regenerate ) {\r\n\t\t\r\n\t\t}\r\n\t\t// initialize editor\r\n\t\tfeedEditor.init();\r\n\t\thelper.common(); // Generate Feed Add Table Row\r\n\t\ttooltip();\r\n\t\t// validate feed editor\r\n\t\t$(\".generateFeed\").validate();\r\n\t\t// document events\r\n\t\t$(document)\r\n\t\t\t.on('click', '[data-toggle_slide]', function(e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$($(this).data('toggle_slide')).slideToggle('fast');\r\n\t\t\t})\r\n\t\t\t// XML Feed Wrapper\r\n\t\t\t.on('click', '#wf_newRow', function () {\r\n\t\t\t\tlet tbody = $('#table-1 tbody'),\r\n\t\t\t\t\ttemplate = $('#feed_config_template').text().trim().replace(/__idx__/g, tbody.find('tr').length);\r\n\t\t\t\ttbody.append(template);\r\n\t\t\t\thelper.fancySelect($('.outputType'));\r\n\t\t\t})\r\n\t\t\t// feed delete alert.\r\n\t\t\t.on('click', '.single-feed-delete', function (event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (confirm(opts.form.del_confirm)) {\r\n\t\t\t\t\twindow.location.href = $(this).attr('val');\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// clear cache data.\r\n\t\t\t.on('click', '.wf_clean_cache_wrapper', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tvar nonce = $('.woo-feed-clean-cache-nonce').val();\r\n\t\t\t\tvar loader = $('.woo-feed-cache-loader');\r\n\r\n\t\t\t\t//show loader\r\n\t\t\t\tloader.show();\r\n\r\n\t\t\t\t// passed cache nonce\r\n\t\t\t\twpAjax.post('clear_cache_data', {\r\n\t\t\t\t\t_ajax_clean_nonce: nonce\r\n\t\t\t\t}).then(function (response) {\r\n\t\t\t\t\tif( response.success ) {\r\n\t\t\t\t\t\tloader.hide(); //hide loader\r\n\t\t\t\t\t}\r\n\t\t\t\t}).fail(function (e) {\r\n\t\t\t\t\tconsole.log('something wrong');\r\n\t\t\t\t});\r\n\r\n\t\t\t})// Copy Status\r\n\t\t\t.on('click', '#woo-feed-copy-status-btn', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tlet button = $('#woo-feed-copy-status-btn');\r\n\t\t\t\tlet status_area = $('#woo-feed-status-area');\r\n\t\t\t\tbutton.val('Copied');\r\n\t\t\t\tstatus_area.css('visibility','visible');\r\n\t\t\t\tstatus_area.select();\r\n\r\n\t\t\t\tdocument.execCommand('copy');\r\n\t\t\t})\r\n\t\t\t// feed value dropdown change.\r\n\t\t\t.on('change', '.wf_attr.wf_attributes', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t$('.fancy-picker-picked').trigger(\"click\"); // trigger fancy select box clicked\r\n\r\n\t\t\t\t// price attributes\r\n\t\t\t\tvar price_attributes = ['price', 'current_price', 'sale_price', 'price_with_tax', 'current_price_with_tax', 'sale_price_with_tax'];\r\n\t\t\t\t// current value\r\n\t\t\t\tvar current_attribute_value = $(this).val();\r\n\t\t\t\tvar outputSelect = $(this).parents('tr').find('.outputType');\r\n\t\t\t\tvar fancyOption = $(this).parents('tr').find('.fancy-picker-content .fancy-picker-option');\r\n\t\t\t\tvar fancyDataPicker = $(this).parents('tr').find('.fancy-picker-data span');\r\n\t\t\t\tvar selectIf, selectKey;\r\n\r\n\t\t\t\t// when any attribute is selected, pick the key\r\n\t\t\t\tif( price_attributes.includes(current_attribute_value) ) {\r\n\t\t\t\t\t// when select any price attribute\r\n\t\t\t\t\tselectIf = 'for_price';\r\n\t\t\t\t\tselectKey = \"Price\";\r\n\t\t\t\t} else if ( \"\" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {\r\n\r\n\t\t\t\t\t// when select any custom taxonomy\r\n\t\t\t\t\tselectIf = 'for_custom_taxo';\r\n\t\t\t\t\tselectKey = \"parent_if_empty\";\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tselectIf = 'for_all';\r\n\t\t\t\t\tselectKey = 'Default';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// remove selected class from old selected option\r\n\t\t\t\tfancyOption.removeClass('selected');\r\n\r\n\t\t\t\t// when value dropdown is selected as price or any custom taxonomy\r\n\t\t\t\tif( selectIf === 'for_custom_taxo' || selectIf === 'for_price' ) {\r\n\r\n\t\t\t\t\t// update \"Option Type\" when select key matches\r\n\t\t\t\t\tfancyOption.each(function(item) {\r\n\t\t\t\t\t\tif( selectKey === $(this).text() ) {\r\n\t\t\t\t\t\t\t$(this).addClass('selected');\r\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// update \"Option Type\" when select key matches\r\n\t\t\t\t\tfancyOption.each(function(item) {\r\n\t\t\t\t\t\tif( \"parent_if_empty\" !== $(this).text() && \"for_all\" === selectIf ) {\r\n\t\t\t\t\t\t\t$(this).addClass('selected');\r\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t})\r\n\t\t\t// bulk delete alert.\r\n\t\t\t.on('click', '#doaction, #doaction2', function () {\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\treturn confirm(opts.form.del_confirm_multi);\r\n\t\t\t})\r\n\t\t\t// Generate Feed Table Row Delete\r\n\t\t\t.on('change', '.dType', function () {\r\n\t\t\t\tlet self = $(this),\r\n\t\t\t\t\ttype = self.val(),\r\n\t\t\t\t\trow = self.closest('tr');\r\n\t\t\t\t\r\n\t\t\t\tif (type === 'pattern') {\r\n\t\t\t\t\trow.find('.value_attribute').hide();\r\n\t\t\t\t\trow.find('.value_pattern').show();\r\n\t\t\t\t} else if (type === 'attribute') {\r\n\t\t\t\t\trow.find('.value_attribute').show();\r\n\t\t\t\t\trow.find('.value_pattern').hide();\r\n\t\t\t\t} else if (type === 'remove') {\r\n\t\t\t\t\trow.find('.value_attribute').hide();\r\n\t\t\t\t\trow.find('.value_pattern').hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Generate Feed Form Submit\r\n\t\t\t.on('click', '.delRow', function (e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$(this).closest('tr').remove();\r\n\t\t\t\thelper.reindex_config_table();\r\n\t\t\t})\r\n\t\t\t.on('submit', '#generateFeed', function () {\r\n\t\t\t\t// Feed Generating form validation\r\n\t\t\t\t$(this).validate();\r\n\t\t\t\t\r\n\t\t\t\tif ($(this).valid()) {\r\n\t\t\t\t\t$(\".makeFeedResponse\")\r\n\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Generate Update Feed Form Submit\r\n\t\t\t.on('submit', '#updatefeed', function (e, data) {\r\n\t\t\t\t// Feed Generating form validation\r\n\t\t\t\t$(this).validate();\r\n\t\t\t\t\r\n\t\t\t\tif ($(this).valid()) {\r\n\t\t\t\t\t$(\".makeFeedResponse\")\r\n\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${data && data.save ? opts.form.save : opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.ftporsftp', function () {\r\n\t\t\t\tlet server = $(this).val(),\r\n\t\t\t\t\tstatus = $('.ssh2_status');\r\n\t\t\t\t\r\n\t\t\t\tif (server === 'sftp') {\r\n\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\tstatus.show().css('color', 'dodgerblue').text(opts.form.sftp_checking);\r\n\t\t\t\t\twpAjax.post('get_ssh2_status', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tserver: server\r\n\t\t\t\t\t}).then(function (response) {\r\n\t\t\t\t\t\tif (response === 'exists') {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\tstatus.css('color', '#2CC185').text(opts.form.sftp_available);\r\n\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\tstatus.hide();\r\n\t\t\t\t\t\t\t}, 1500);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\tstatus.show().css('color', 'red').text(opts.form.sftp_warning);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).fail(function (e) {\r\n\t\t\t\t\t\tstatus.hide();\r\n\t\t\t\t\t\thelper.ajax_fail(e);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstatus.hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('click', '[name=\"save_feed_config\"]', function (e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$('#updatefeed').trigger('submit', {\r\n\t\t\t\t\tsave: true\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t\t.on('change', '#provider', function (event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\r\n\t\t\t\t//if (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.\r\n\r\n\t\t\t\tlet merchant = $(this).val(),\r\n\t\t\t\t\tfeedType = $(\"#feedType\"),\r\n\t\t\t\t\tfeedForm = $(\"#providerPage\"),\r\n\t\t\t\t\tmerchantInfo = $('#feed_merchant_info'); // set loading..\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tfeedForm.html('<h3><span style=\"float:none;margin: -3px 0 0;\" class=\"spinner is-active\"></span> ' + opts.form.loading_tmpl + '</h3>'); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t\r\n\t\t\t\tmerchantInfo.find('.spinner').addClass('is-active');\r\n\t\t\t\tfeedType.disabled(!0); // disable dropdown\r\n\t\t\t\t\r\n\t\t\t\tfeedType.parent().find('.spinner').addClass('is-active');\r\n\t\t\t\tmerchantInfo.find('.merchant-info-section .data').html(''); // remove previous data\r\n\t\t\t\t// Get Merchant info for selected Provider/Merchant\r\n\r\n\r\n\t\t\t\t\r\n\t\t\t\tif (merchantInfoCache.hasOwnProperty(merchant)) {\r\n\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twpAjax.send('woo_feed_get_merchant_info', {\r\n\t\t\t\t\t\ttype: 'GET',\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tnonce: opts.nonce,\r\n\t\t\t\t\t\t\tprovider: merchant\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\tmerchantInfoCache[merchant] = r;\r\n\t\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, r);\r\n\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t} // Get FeedForm For Selected Provider/Merchant\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (merchantTemplateCache.hasOwnProperty(merchant)) {\r\n\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, merchantTemplateCache[merchant]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twpAjax.post('get_feed_merchant', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tmerchant: merchant\r\n\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\tmerchantTemplateCache[merchant] = r;\r\n\t\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, r);\r\n\r\n\t\t\t\t\t\t//when merchant is bing, change delimiter and enclosure\r\n\t\t\t\t\t\tif( 'bing' === merchant ) {\r\n\t\t\t\t\t\t\t//delimiter value\r\n\t\t\t\t\t\t\t$(\"#delimiter option\").removeAttr('selected');\r\n\t\t\t\t\t\t\t$(\"#delimiter option[value=\\\"tab\\\"]\").attr('selected', 'selected');\r\n\r\n\t\t\t\t\t\t\t//enclosure value\r\n\t\t\t\t\t\t\t$(\"#enclosure option\").removeAttr('selected');\r\n\t\t\t\t\t\t\t$(\"#enclosure option[value=\\\" \\\"]\").attr('selected', 'selected');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//reviewer options hide\r\n\t\t\t\t\t\tif( 'google_product_review' !== merchant) {\r\n\t\t\t\t\t\t\t$('.wf_attributes option[value=\"reviewer_name\"]').hide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Feed Active and Inactive status change via ajax\r\n\t\t\t.on('change', '.woo_feed_status_input', function () {\r\n\t\t\t\tlet self = $(this);\r\n\t\t\t\twpAjax.post('update_feed_status', {\r\n\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\tfeedName: self.val(),\r\n\t\t\t\t\tstatus: self[0].checked ? 1 : 0\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t// event with trigger\r\n\t\t$(document)\r\n\t\t\t.on('change', '[name=\"is_outOfStock\"], [name=\"product_visibility\"]', function () {\r\n\t\t\t\tlet outOfStockVisibilityRow = $('.out-of-stock-visibility');\r\n\t\t\t\tif ($('[name=\"is_outOfStock\"]:checked').val() === 'n' && $('[name=\"product_visibility\"]:checked').val() === '1') {\r\n\t\t\t\t\toutOfStockVisibilityRow.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\toutOfStockVisibilityRow.hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.attr_type', function () {\r\n\t\t\t\t// Attribute type selection\r\n\t\t\t\tlet self = $(this),\r\n\t\t\t\t\ttype = self.val(),\r\n\t\t\t\t\trow = self.closest('tr');\r\n\t\t\t\t\r\n\t\t\t\tif (type === 'pattern') {\r\n\t\t\t\t\trow.find('.wf_attr').hide();\r\n\t\t\t\t\trow.find('.wf_attr').val('');\r\n\t\t\t\t\trow.find('.wf_default').show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\trow.find('.wf_attr').show();\r\n\t\t\t\t\trow.find('.wf_default').hide();\r\n\t\t\t\t\trow.find('.wf_default').val('');\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.wf_mattributes, .attr_type', function () {\r\n\t\t\t\tlet row = $(this).closest('tr'),\r\n\t\t\t\t\tattribute = row.find('.wf_mattributes'),\r\n\t\t\t\t\ttype = row.find('.attr_type'),\r\n\t\t\t\t\tvalueColumn = row.find('td:eq(4)'),\r\n\t\t\t\t\tprovider = $('#provider').val();\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (opts.form.google_category.hasOwnProperty(attribute.val()) && type.val() === 'pattern' && helper.in_array(provider, opts.form.google_category[attribute.val()])) {\r\n\t\t\t\t\tif (valueColumn.find('select.selectize').length === 0) {\r\n\t\t\t\t\t\tvalueColumn.find('input.wf_default').remove();\r\n\t\t\t\t\t\tvalueColumn.append('<span class=\"wf_default wf_attributes\"><select name=\"default[]\" class=\"selectize\"></select></span>');\r\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\tvalueColumn.append(`<span style=\"font-size:x-small;\"><a style=\"color: red\" href=\"http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category\" target=\"_blank\">${opts.learn_more}</a></span>`);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!googleCategories) {\r\n\t\t\t\t\t\t\tvalueColumn.append('<span class=\"spinner is-active\" style=\"margin: 0;\"></span>');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlet select = valueColumn.find('.wf_attributes select');\r\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\thelper.selectize(select, {\r\n\t\t\t\t\t\t\tpreload: true,\r\n\t\t\t\t\t\t\tplaceholder: opts.form.select_category,\r\n\t\t\t\t\t\t\tload: function load(query, cb) {\r\n\t\t\t\t\t\t\t\tif (!googleCategories) {\r\n\t\t\t\t\t\t\t\t\twpAjax.send('get_google_categories', {\r\n\t\t\t\t\t\t\t\t\t\ttype: 'GET',\r\n\t\t\t\t\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\t\t\t\t\t\taction: \"get_google_categories\",\r\n\t\t\t\t\t\t\t\t\t\t\tprovider: provider\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\t\t\t\t\tgoogleCategories = r;\r\n\t\t\t\t\t\t\t\t\t\tcb(googleCategories);\r\n\t\t\t\t\t\t\t\t\t\tvalueColumn.find('.spinner').remove();\r\n\t\t\t\t\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tcb(googleCategories);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (attribute.val() !== 'current_category' && valueColumn.find('input.wf_default').length === 0) {\r\n\t\t\t\t\t\tvalueColumn.find('span').remove();\r\n\t\t\t\t\t\tvalueColumn.append('<input autocomplete=\"off\" class=\"wf_default wf_attributes\" type=\"text\" name=\"default[]\" value=\"\">');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (type.val() !== 'pattern') {\r\n\t\t\t\t\t\t\tvalueColumn.find('input.wf_default').hide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '#feedType,#provider', function () {\r\n\t\t\t\tlet type = $('#feedType').val(),\r\n\t\t\t\t\tprovider = $('#provider').val(),\r\n\t\t\t\t\titemWrapper = $('.itemWrapper'),\r\n\t\t\t\t\twf_csv_txt = $('.wf_csvtxt');\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {\r\n\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t} else if (type === 'xml') {\r\n\t\t\t\t\titemWrapper.show();\r\n\t\t\t\t\twf_csv_txt.hide();\r\n\t\t\t\t} else if (type === 'csv' || type === 'txt') {\r\n\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t\twf_csv_txt.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t\twf_csv_txt.hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.trigger('change');\r\n\t});\r\n})(jQuery, window, document, wp.ajax, wpf_ajax_obj);\r\n"]}
|
1 |
+
{"version":3,"sources":["woo-feed-admin.js"],"names":["_defineProperties","target","props","descriptor","i","_createClass","Constructor","protoProps","staticProps","prototype","window","wpAjax","self","prop","showTooltip","$","hasClass","currentTarget","clearTooltip","removeClass","actionMsg","className","match","index","action","removeAttr","actionKey","elem","addClass","attr","msg","extend","_default","_args","clip","$copyBtn","feedGenerator","left","event","trigger","test","navigator","on","console","googleCategories","in_array","needle","haystack","sortable","escape","data","text","ajax_fail","column_count","find","warn","wf_sortable","selectize_render_item","e","hasOwnProperty","opts","ajax","error","statusText","status","el","config","column","_onDrop","each","this","length","selectize","itemPath","create","concat","plugins","$item","container","containerSelector","group","options","bodyClass","itemSelector","handle","onDrop","fancySelect","maxItemShow","split","map","s","trim","helper","render","item","replace","x","form","merchantInfo","document","jQuery","k","init","renderMerchantInfo","opt","feedType","r","types","html","t","toLowerCase","na","disabled","val","_loop2","feedForm","contentSettings","renderMerchantTemplate","feedEditor","is","merchantInfoCache","tooltip","css","top","isRegenerating","_feed","_current_btn","feed","_limit","generator","limit","_progress","_product_ids","_progress_per_batch","_refresh","_all_btn","generate","condition","then","_current_btn_label","response","_color","preventDefault","parent","hide","_ajax_nonce","_log","_updateProgressStatus","message","key","regenerate","_block_button","value","_this","product","setTimeout","_stopProgressBar","_process_batch","_current_batch","_total_batch","post","_save_feed_file","fail","_resetProgressBar","_unblock_button","refreshInterval","arguments","undefined","clearInterval","_timer","_updateProgressBar","update","table","show","width","bar","wf","current_page_url_query","page_action","postboxes","add_postbox_toggles","pagenow","template","common","hover","title","appendTo","userAgent","merchantTemplateCache","remove","ClipboardJS","clipboard","slideToggle","loader","tbody","confirm","del_confirm","href","button","status_area","execCommand","success","current_attribute_value","fancyOption","fancyDataPicker","selectIf","price_attributes","selectKey","outputSelect","parents","includes","indexOf","row","type","reindex_config_table","valid","server","validate","save","sftp_available","send","provider","merchant","nonce","checked","outOfStockVisibilityRow","valueColumn","append","attribute","select","load","google_category","query","preload","cb","itemWrapper","wf_csv_txt","wp","wpf_ajax_obj","item_wrapper_hidden"],"mappings":"yHAAA,SAAAA,kBAAAC,EAAAC,+BACA,IAAAC,EAAAD,EAAAE,kHADA,SAAAC,aAAAC,EAAAC,EAAAC,GAWC,OAFDD,GAAAP,kBAAAM,EAAAG,UAAAF,GARAC,GAAAE,kBAAAC,EAAAH,GAUCF,gFA0BGM,IAAAA,EAAAA,EAAAA,MACAC,EAAAD,gBAEA,IAAAA,EAAAA,KAAAC,GAHAD,EAAAA,KAAAA,OAAAA,IAAAA,IAAAA,IAAAA,4EAYF,IAAAE,EAAAA,EAAAA,MAEAC,EAAA,WACA,YAHA,IAAAH,EAAAC,KAAAA,GAAAD,EAAAC,KAAAA,GAAAD,EAAAI,SAAAH,IAUQI,SAWRC,EAXuBC,GAAaC,EAAAA,EAAAA,eAAuBC,YAAUC,SAAMC,EAAhBC,GAAvB,OAA+EL,EAAAA,MAAAA,sBAAAA,IAAAA,KAAAA,OADpHC,YAAA,cAAAK,WAAAC,cAKGC,SAAFZ,EAAAA,EAAAA,GACAA,EAEDY,GAAAC,SAAA,2BAAAC,KAAA,a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E,SAAA3G,GAEFgI,EADCR,EAAAxH,GAlQJwH,EAAA5K,KAAA,YAAAuI,WAsQEnJ,KAAAA,EAAAA,mBAWA,qBAAAiM,EAAAA,OAAA,IAAAT,EAAA5K,KAAA,oBAAAiB,SAuFC2J,EArFAD,KAAAA,QAAAA,wHADD,YAECZ,EAFDpG,OAGCgH,EAAAA,KAAAA,oBAAAjF,UAKD2F,GAAAA,SAAAA,sBAAA,SAAAjL,GAAAkL,IAAAA,EAAAA,EAAAA,aAAA3H,MAAA4G,EAAA9M,EAAA,aAAAkG,MAyFC0H,EAAA5N,EAAA,gBApFAqM,EACI9J,EAAAA,cAFL5C,KAIC0F,GAAMD,EAAA0I,SAAAC,EAAAA,EA57BX7I,KAAA8I","file":"woo-feed-admin.min.js","sourcesContent":["// noinspection JSUnresolvedletiable\r\n/**!\r\n * WooFeed Scripts\r\n * @version 3.3.6\r\n * @package WooFeed\r\n * @copyright 2020 WebAppick\r\n *\r\n */\r\n/* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\r\n// noinspection JSUnresolvedVariable\r\n(function($, window, document, wpAjax, opts) {\r\n\t\"use strict\";\r\n\t/**\r\n\t * All of the code for your admin-facing JavaScript source\r\n\t * should reside in this file.\r\n\t *\r\n\t * Note: It has been assumed you will write jQuery code here, so the\r\n\t * $ function reference has been prepared for usage within the scope\r\n\t * of this function.\r\n\t *\r\n\t * This enables you to define handlers, for when the DOM is ready:\r\n\t */\r\n\r\n\t/**\r\n\t * disable element utility\r\n\t *\r\n\t * @since 3.1.9\r\n\t *\r\n\t * @param {*} status\r\n\t * @returns {jQuery|HTMLElement}\r\n\t */\r\n\t$.fn.disabled = function(status) {\r\n\t\t$(this).each(function() {\r\n\t\t\tlet self = $(this),\r\n\t\t\t\tprop = 'disabled';\r\n\r\n\t\t\tif (typeof self.prop(prop) !== 'undefined') {\r\n\t\t\t\tself.prop(prop, status === void 0 || status === true);\r\n\t\t\t} else {\r\n\t\t\t\t!0 === status ? self.addClass(prop) : self.removeClass(prop);\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn self; // method chaining\r\n\t};\r\n\t\r\n\t/**\r\n\t * Check if a HTMLElement or jQuery is disabled\r\n\t */\r\n\t$.fn.isDisabled = function() {\r\n\t\tlet self = $(this),\r\n\t\t\tprop = 'disabled';\r\n\t\treturn typeof self.prop(prop) !== 'undefined' ? self.prop(prop) : self.hasClass(prop);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Clear Tooltip for clip board js\r\n\t * @param {Object} event\r\n\t */\r\n\tconst clearTooltip = (event) => {\r\n\t\t$(event.currentTarget).removeClass( (index, className) => (className.match(/\\btooltipped-\\S+/g) || []).join(' ') ).removeClass('tooltipped').removeAttr('aria-label');\r\n\t};\r\n\r\n\tconst showTooltip = (elem, msg) => {\r\n\t\t$(elem).addClass('tooltipped tooltipped-s').attr('aria-label', msg);\r\n\t};\r\n\r\n\tconst fallbackMessage = (action) =>{\r\n\t\tlet actionMsg,\r\n\t\t\tactionKey = action === 'cut' ? 'X' : 'C';\r\n\r\n\t\tif (/iPhone|iPad/i.test(navigator.userAgent)) {\r\n\t\t\tactionMsg = 'No support :(';\r\n\t\t} else if (/Mac/i.test(navigator.userAgent)) {\r\n\t\t\tactionMsg = 'Press ⌘-' + actionKey + ' to ' + action;\r\n\t\t} else {\r\n\t\t\tactionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;\r\n\t\t}\r\n\r\n\t\treturn actionMsg;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Alias of jQuery.extend()\r\n\t * @param {Object} _default\r\n\t * @param {Object} _args\r\n\t */\r\n\tconst extend = (_default, _args) => $.extend(true, {}, _default, _args);\r\n\t\r\n\tlet $copyBtn,\r\n\t\tclipboard,\r\n\t\tgoogleCategories,\r\n\t\thelper = {\r\n\t\t\tin_array: (needle, haystack) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\treturn haystack.indexOf(needle) !== -1;\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tselectize_render_item: (data, escape) => `<div class=\"item wapk-selectize-item\">${ escape(data.text)}</div>`, // phpcs:ignore WordPressVIPMinimum.JS.StringConcat.Found,\r\n\t\t\tajax_fail: e => {\r\n\t\t\t\tconsole.warn(e);\r\n\t\t\t\talert(e.hasOwnProperty('statusText') && e.hasOwnProperty('status') ? opts.ajax.error + '\\n' + e.statusText + ' (' + e.status + ')' : e);\r\n\t\t\t},\r\n\t\t\t/**\r\n\t\t\t * Initialize Sortable\r\n\t\t\t * @param {jQuery|HTMLElement} el\r\n\t\t\t * @param {object} config\r\n\t\t\t * @param {int|boolean} column\r\n\t\t\t * @param {function} onDrop\r\n\t\t\t * @return {jQuery|HTMLElement}\r\n\t\t\t */\r\n\t\t\tsortable: (el, config, column, onDrop) => {\r\n\t\t\t\treturn (el || $('.sorted_table')).each(function() {\r\n\t\t\t\t\tlet self = $(this),\r\n\t\t\t\t\t\tcolumn_count = self.find('tbody > tr:eq(0) > td').length || column || 9;\r\n\t\t\t\t\tself.wf_sortable(extend({\r\n\t\t\t\t\t\tcontainerSelector: 'table',\r\n\t\t\t\t\t\titemPath: '> tbody',\r\n\t\t\t\t\t\titemSelector: 'tr',\r\n\t\t\t\t\t\thandle: 'i.wf_sortedtable',\r\n\t\t\t\t\t\tplaceholder: `<tr class=\"placeholder\"><td colspan=\"${column_count}\"></td></tr>`,\r\n\t\t\t\t\t\tonDrop: ($item, container, _super, event) => {\r\n\t\t\t\t\t\t\t$item.removeClass(container.group.options.draggedClass).removeAttr('style');\r\n\t\t\t\t\t\t\t$(\"body\").removeClass(container.group.options.bodyClass);\r\n\t\t\t\t\t\t\tif ( onDrop && 'function' === typeof( onDrop ) ) {\r\n\t\t\t\t\t\t\t\tonDrop( $item, container, _super, event );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tselectize: (el, config) => {\r\n\t\t\t\treturn (el || $('select.selectize')).not('.selectized').each(function() {\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.selectize(extend({\r\n\t\t\t\t\t\tcreate: self.data('create') || false,\r\n\t\t\t\t\t\tplugins: self.data('plugins') ? self.data('plugins').split(',').map(function(s) {\r\n\t\t\t\t\t\t\treturn s.trim();\r\n\t\t\t\t\t\t}) : [],\r\n\t\t\t\t\t\t//['remove_button'],\r\n\t\t\t\t\t\trender: {\r\n\t\t\t\t\t\t\titem: helper.selectize_render_item\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tfancySelect: (el, config) => {\r\n\t\t\t\treturn (el || $('select.fancySelect')).not('.FancySelectInit').each(function() {\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.fancySelect(extend({\r\n\t\t\t\t\t\tmaxItemShow: 3\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\treindex_config_table: () => {\r\n\t\t\t\t$('#table-1').find('tbody tr').each( ( x, el ) => {\r\n\t\t\t\t\t$(el).find('[name]').each( ( x1, el ) => {\r\n\t\t\t\t\t\t$(el).attr('name', $(el).attr('name').replace(/(\\[\\d\\])/g, `[${x}]`));\r\n\t\t\t\t\t} );\r\n\t\t\t\t} );\r\n\t\t\t},\r\n\t\t\tcommon: () => {\r\n\t\t\t\thelper.sortable( $('.sorted_table'), {}, 9, helper.reindex_config_table );\r\n\t\t\t\thelper.selectize();\r\n\t\t\t\thelper.fancySelect($('.outputType'));\r\n\t\t\t}\r\n\t\t},\r\n\t\t// helper functions\r\n\t\tfeedEditor = {\r\n\t\t\t/**\r\n\t\t\t * The Editor Form Elem.\r\n\t\t\t * @type {jQuery|HTMLElement}\r\n\t\t\t */\r\n\t\t\tform: null,\r\n\r\n\t\t\t/**\r\n\t\t\t * Initialize The Feed Editor {Tabs...}\r\n\t\t\t * @returns {void}\r\n\t\t\t */\r\n\t\t\tinit: function () {\r\n\t\t\t\tlet self = this;\r\n\t\t\t\tself.form = $('.generateFeed');\r\n\t\t\t\tif (!self.form.length) return;\r\n\t\t\t\thelper.common();\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t$(document).trigger(new jQuery.Event('feedEditor.init', {\r\n\t\t\t\t\ttarget: this.form\r\n\t\t\t\t}));\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Render Merchant info ajax response and handle allowed feed type for selected merchant\r\n\t\t\t * @param {jQuery|HTMLElement} merchantInfo jQuery dom object\r\n\t\t\t * @param {jQuery|HTMLElement} feedType jQuery dom object\r\n\t\t\t * @param {Object} r ajax response object\r\n\t\t\t */\r\n\t\t\trenderMerchantInfo: function (merchantInfo, feedType, r) {\r\n\t\t\t\tfor (let k in r) {\r\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\r\n\t\t\t\t\t\tmerchantInfo.find('.merchant-info-section.' + k + ' .data').html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\r\n\r\n\t\t\t\t\t\tif ('feed_file_type' === k) {\r\n\t\t\t\t\t\t\t(function() {\r\n\t\t\t\t\t\t\t\tlet types = r[k].split(\",\").map(function(t) {\r\n\t\t\t\t\t\t\t\t\treturn t.trim().toLowerCase();\r\n\t\t\t\t\t\t\t\t}).filter(function(t) {\r\n\t\t\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\t\t\treturn t !== '' && t !== opts.na.toLowerCase();\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\tif (types.length) {\r\n\t\t\t\t\t\t\t\t\tfeedType.find('option').removeAttr('selected').each(function() {\r\n\t\t\t\t\t\t\t\t\t\tlet opt = $(this);\r\n\t\t\t\t\t\t\t\t\t\topt.val() && !helper.in_array(opt.val(), types) ? opt.disabled(!0) : opt.disabled(!1);\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\tif (types.length === 1) feedType.find('option[value=\"' + types[0] + '\"]').attr('selected', 'selected');\r\n\t\t\t\t\t\t\t\t} else feedType.find('option').disabled(!1);\r\n\t\t\t\t\t\t\t})();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmerchantInfo.find('.spinner').removeClass('is-active');\r\n\t\t\t\tfeedType.disabled(!1);\r\n\t\t\t\tfeedType.trigger('change');\r\n\t\t\t\tfeedType.parent().find('.spinner').removeClass('is-active');\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Render Feed Template Tabs and settings while creating new feed.\r\n\t\t\t * @param {jQuery|HTMLElement} feedForm feed from query dom object\r\n\t\t\t * @param {object} r merchant template ajax response object\r\n\t\t\t */\r\n\t\t\trenderMerchantTemplate: function (feedForm, r) {\r\n\t\t\t\tlet _loop = function _loop(k) {\r\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\r\n\t\t\t\t\t\tif ('tabs' === k) {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedFunction\r\n\t\t\t\t\t\t\tfeedForm.html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlet contentSettings = $('[name=\"' + k + '\"]');\r\n\r\n\t\t\t\t\t\t\tif (contentSettings.length) {\r\n\t\t\t\t\t\t\t\tcontentSettings.each(function() {\r\n\t\t\t\t\t\t\t\t\tlet elem = $(this);\r\n\r\n\t\t\t\t\t\t\t\t\tif (elem.is('select')) {\r\n\t\t\t\t\t\t\t\t\t\telem.find('[value=\"' + r[k] + '\"]').prop('selected', true);\r\n\t\t\t\t\t\t\t\t\t} else if ((elem.is('[type=checkbox]') || elem.is('[type=radio]')) && elem.val() === r[k]) {\r\n\t\t\t\t\t\t\t\t\t\telem.prop('checked', true);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\telem.val(r[k]); // type=text\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}).trigger('change');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tfor (let k in r) {\r\n\t\t\t\t\t_loop(k);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfeedEditor.init();\r\n\t\t\t}\r\n\t\t},\r\n\t\t// Feed Editor Table\r\n\t\tmerchantInfoCache = [],\r\n\t\tmerchantTemplateCache = [],\r\n\t\ttooltip = () => {\r\n\t\t\t// Tooltip only Text\r\n\t\t\t$('.wfmasterTooltip')\r\n\t\t\t\t.hover(function () {\r\n\t\t\t\t\t// Hover over code\r\n\t\t\t\t\tlet self = $(this), title = self.attr('wftitle');\r\n\t\t\t\t\tself.data('tipText', title).removeAttr('wftitle');\r\n\t\t\t\t\t$('<p class=\"wftooltip\"></p>').text(title).appendTo('body').fadeIn('slow');\r\n\t\t\t\t}, function () {\r\n\t\t\t\t\t// Hover out code\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.attr('wftitle', self.data('tipText'));\r\n\t\t\t\t\t$('.wftooltip').remove();\r\n\t\t\t\t})\r\n\t\t\t\t.mousemove(function (e) {\r\n\t\t\t\t\t$('.wftooltip').css({\r\n\t\t\t\t\t\ttop: e.pageY + 10,\r\n\t\t\t\t\t\tleft: e.pageX + 20\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t},\r\n\t\tclip = () => {\r\n\t\t\t$copyBtn = $('.toClipboard');\r\n\t\t\tif (!ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent)) {\r\n\t\t\t\t$copyBtn.find('img').hide(0);\r\n\t\t\t} else {\r\n\t\t\t\t$copyBtn.each(function() {\r\n\t\t\t\t\t$(this).on('mouseleave', clearTooltip).on('blur', clearTooltip);\r\n\t\t\t\t});\r\n\t\t\t\tclipboard = new ClipboardJS('.toClipboard');\r\n\t\t\t\tclipboard.on('error', function(event) {\r\n\t\t\t\t\tshowTooltip(event.trigger, fallbackMessage(event.action));\r\n\t\t\t\t}).on('success', function(event) {\r\n\t\t\t\t\tshowTooltip(event.trigger, 'Copied!');\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t/**\r\n\t * Feed Generator Module\r\n\t */\r\n\tclass feedGenerator {\r\n\t\t\r\n\t\t/**\r\n\t\t * Constructor\r\n\t\t * @constructor\r\n\t\t */\r\n\t\tconstructor() {\r\n\t\t\tthis._feed = opts.generator.feed; // wf_config+xxxx\r\n\t\t\tthis._limit = opts.generator.limit;\r\n\t\t\tthis._progress = 0;\r\n\t\t\tthis._timer = null;\r\n\t\t\tthis._color = false;\r\n\t\t\t// batch info\r\n\t\t\tthis._total_batch = 0;\r\n\t\t\tthis._current_batch = 0;\r\n\t\t\tthis._product_ids = [];\r\n\t\t\tthis._progress_per_batch = 0;\r\n\t\t\tthis._refresh = true;\r\n\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\tthis._regenerate = opts.generator.regenerate;\r\n\t\t\twindow.isRegenerating = false;\r\n\t\t\tthis._all_btn = $('.wpf_regenerate');\r\n\t\t\tthis._current_btn = $(`#${this._feed.replace( 'wf_config', 'wf_feed_' )}`);\r\n\t\t\tthis._current_btn_label = '';\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Init Hooks (Event)\r\n\t\t * @return {feedGenerator}\r\n\t\t */\r\n\t\tinit() {\r\n\t\t\tlet self = this;\r\n\t\t\tif ( '' !== this._feed && this._regenerate && false === window.isRegenerating ) {\r\n\t\t\t\tthis.generate();\r\n\t\t\t}\r\n\r\n\t\t\t//thickbox body add feed plugin class to make it unique and custom style\r\n\t\t\tlet current_page_query = window.location.search;\r\n\t\t\tlet params = new URLSearchParams(current_page_query);\r\n\t\t\tlet page_name = params.get(\"page\");\r\n\t\t\tif( \"webappick-manage-feeds\" === page_name ) {\r\n\t\t\t\t$('body').addClass('woo-import-popup-body');\r\n\t\t\t}\r\n\r\n\t\t\t$(document).on('click', '.woo-feed-campaign-close-button', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t$(this).parent('.woo-feed-promotion').hide();\r\n\t\t\t\tlet condition = $(this).data('condition');\r\n\t\t\t\tif(1 === condition) {\r\n\t\t\t\t\twpAjax.post( 'woo_feed_hide_promotion', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tcondition: condition,\r\n\t\t\t\t\t} ).then( response => {\r\n\t\t\t\t\t\tself._log( response );\r\n\t\t\t\t\t} ).fail( error => {\r\n\t\t\t\t\t\tself._log( error );\r\n\t\t\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\t\t\tself._color = 'red';\r\n\t\t\t\t\t} );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t$(document).on('click', '.wpf_regenerate', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tself._current_btn = $( this );\r\n\t\t\t\tif( self._current_btn.hasClass('disabled') || window.isRegenerating === true ) return;\r\n\t\t\t\tself._feed = self._current_btn.attr('id').replace( 'wf_feed_', 'wf_config' );\r\n\t\t\t\tif( '' !== self._feed ) {\r\n\t\t\t\t\tself.generate();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t_block_button() {\r\n\t\t\tif ( this._all_btn.length ) {\r\n\t\t\t\tthis._all_btn.addClass('disabled');\r\n\t\t\t}\r\n\t\t\tif ( this._current_btn.length ) {\r\n\t\t\t\tthis._current_btn.find('span').addClass('wpf_spin reverse_spin');\r\n\t\t\t\tthis._current_btn_label = this._current_btn.attr('title');\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tthis._current_btn.attr( 'aria-label', opts.regenerate ).attr( 'title', opts.regenerate );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t_unblock_button() {\r\n\t\t\tif ( this._all_btn.length ) {\r\n\t\t\t\tthis._all_btn.removeClass('disabled');\r\n\t\t\t}\r\n\t\t\tif ( this._current_btn.length ) {\r\n\t\t\t\tthis._current_btn.find('span').removeClass('wpf_spin');\r\n\t\t\t\tthis._current_btn.find('span').removeClass('reverse_spin');\r\n\t\t\t\tthis._current_btn.attr( 'aria-label', this._current_btn_label ).attr( 'title', this._current_btn_label );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Generate Feed\r\n\t\t * @return void\r\n\t\t */\r\n\t\tgenerate() {\r\n\t\t\tlet self = this;\r\n\t\t\twindow.isRegenerating = true;\r\n\t\t\tthis._block_button();\r\n\t\t\tthis._resetProgressBar();\r\n\t\t\tthis._progressBarActive();\r\n\t\t\tthis._log( 'Counting Total Products' );\r\n\t\t\tthis._updateProgressStatus( 'Fetching products.' );\r\n\t\t\tthis._get_product_ids().then( response => {\r\n\t\t\t\tthis._progress = 10;\r\n\t\t\t\tself._log( {response} );\r\n\t\t\t\tif(response.success) {\r\n\t\t\t\t\tself._log( `Total ${response.total} Products found.` );\r\n\t\t\t\t\tself._product_ids = response.product;\r\n\t\t\t\t\tself._total_batch = this._product_ids.length;\r\n\t\t\t\t\tself._current_batch = 0;\r\n\t\t\t\t\tself._progress_per_batch = ( 90 - this._progress ) / this._total_batch;\r\n\t\t\t\t\tself._process_batch();\r\n\t\t\t\t\tself._updateProgressStatus( 'Processing Products...' );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself._updateProgressStatus( response.data.message );\r\n\t\t\t\t}\r\n\t\t\t}).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Get Product Ids\r\n\t\t * @returns {$.promise}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_get_product_ids() {\r\n\t\t\tthis._progress = 5;\r\n\t\t\treturn wpAjax.post( 'get_product_information', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t\tlimit: this._limit,\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Run the Batch\r\n\t\t * @private\r\n\t\t */\r\n\t\t_process_batch() {\r\n\t\t\tlet self = this;\r\n\t\t\tlet status = `Processing Batch ${this._current_batch+1} of ${this._total_batch}`;\r\n\t\t\tthis._updateProgressStatus( status );\r\n\t\t\tthis._log( status );\r\n\t\t\twpAjax.post( 'make_batch_feed', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t\tproducts: this._product_ids[this._current_batch],\r\n\t\t\t\tloop: this._current_batch,\r\n\t\t\t} ).then( response => {\r\n\t\t\t\tself._current_batch++;\r\n\t\t\t\tself._log( `Batch ${self._current_batch} Completed` );\r\n\t\t\t\tself._log( response );\r\n\t\t\t\tif ( self._current_batch < self._total_batch ) {\r\n\t\t\t\t\tself._process_batch();\r\n\t\t\t\t\tself._progress += self._progress_per_batch;\r\n\t\t\t\t}\r\n\t\t\t\tif ( self._current_batch === self._total_batch ) {\r\n\t\t\t\t\tself._save_feed_file();\r\n\t\t\t\t}\r\n\t\t\t} ).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Save Feed Data from temp to feed file\r\n\t\t * @private\r\n\t\t */\r\n\t\t_save_feed_file() {\r\n\t\t\tlet self = this;\r\n\t\t\tthis._log( 'Saving feed file' );\r\n\t\t\tthis._updateProgressStatus( 'Saving feed file' );\r\n\t\t\twpAjax.post( 'save_feed_file', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t} ).then( response => {\r\n\t\t\t\tself._log( response );\r\n\t\t\t\tself._progress = 100;\r\n\t\t\t\tif ( self._refresh ) {\r\n\t\t\t\t\twindow.location.href = `${opts.pages.list.feed}&link=${response.url}&cat=${response.cat}`;\r\n\t\t\t\t}\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\t\tself._resetProgressBar( true );\r\n\t\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t\t}, 3000 );\r\n\t\t\t\t}, 2500 );\r\n\t\t\t} ).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Console log wrapper with debug settings.\r\n\t\t * @param data\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_log( data ) {\r\n\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\tif ( opts.wpf_debug ) {\r\n\t\t\t\tconsole.log( data );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Run the progressbar refresh interval\r\n\t\t * @param {int} refreshInterval\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_progressBarActive( refreshInterval = 0 ) {\r\n\t\t\tlet self = this;\r\n\t\t\tthis._toggleProgressBar( true );\r\n\t\t\tthis._timer = setInterval( function(){\r\n\t\t\t\tself._updateProgressBar();\r\n\t\t\t}, refreshInterval || 1000 );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Stop Progressbar\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_stopProgressBar() {\r\n\t\t\tclearInterval( this._timer );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Reset Progressbar\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_resetProgressBar( update ) {\r\n\t\t\tthis._toggleProgressBar( false );\r\n\t\t\tthis._updateProgressStatus( '' );\r\n\t\t\tclearInterval( this._timer );\r\n\t\t\tthis._color = false;\r\n\t\t\tthis._timer = null;\r\n\t\t\tthis._progress = 0;\r\n\t\t\tif ( update ) {\r\n\t\t\t\tthis._updateProgressBar();\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Show hide the progress bar el\r\n\t\t * @param status\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_toggleProgressBar( status ) {\r\n\t\t\tlet table = $('#feed_progress_table');\r\n\t\t\tif ( status ) {\r\n\t\t\t\ttable.show();\r\n\t\t\t} else {\r\n\t\t\t\ttable.hide();\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Update Progress bar text status\r\n\t\t * @param {string} status\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_updateProgressStatus( status ) {\r\n\t\t\t$( '.feed-progress-status' ).text( status );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Update Progress Data\r\n\t\t * hooked with setInterval\r\n\t\t * @private\r\n\t\t */\r\n\t\t_updateProgressBar() {\r\n\t\t\tlet percentage = $( '.feed-progress-percentage' ),\r\n\t\t\t\tbar = $( '.feed-progress-bar-fill' ),\r\n\t\t\t\t_progress = `${Math.round( this._progress )}%`;\r\n\t\t\tbar.css( {\r\n\t\t\t\twidth: _progress,\r\n\t\t\t} );\r\n\t\t\tpercentage.text( _progress );\r\n\t\t}\r\n\t}\r\n\t// expose to the global scope\r\n\twindow.wf = {\r\n\t\thelper: helper,\r\n\t\tfeedEditor: feedEditor,\r\n\t\tgenerator: feedGenerator,\r\n\t};\r\n\t$(window).on('load', function() {\r\n\t\t// Template loading ui conflict\r\n\t\tif ($(location).attr(\"href\").match(/webappick.*feed/g) !== null) {\r\n\t\t\t$('#wpbody-content').addClass('woofeed-body-content');\r\n\t\t}\r\n\r\n\t\t// on edit page show item wrapper dropdown\r\n\t\tlet current_page_url_query = window.location.search;\r\n\t\tlet urlParams = new URLSearchParams(current_page_url_query);\r\n\t\tlet page_action = urlParams.get('action');\r\n\t\tif ( page_action === 'edit-feed' ) {\r\n\t\t\t$('.itemWrapper').show();\r\n\t\t}\r\n\r\n\t\t// ClipBoardJS\r\n\t\tclip();\r\n\t\t// postbox toggle\r\n\t\tpostboxes.add_postbox_toggles(pagenow);\r\n\t\t// initialize generator\r\n\t\tlet generator = new feedGenerator();\r\n\t\tgenerator.init();\r\n\t\t// noinspection JSUnresolvedVariable\r\n\t\tif( '' !== opts.generator.feed && opts.generator.regenerate ) {\r\n\t\t\r\n\t\t}\r\n\t\t// initialize editor\r\n\t\tfeedEditor.init();\r\n\t\thelper.common(); // Generate Feed Add Table Row\r\n\t\ttooltip();\r\n\t\t// validate feed editor\r\n\t\t$(\".generateFeed\").validate();\r\n\t\t// document events\r\n\t\t$(document)\r\n\t\t\t.on('click', '[data-toggle_slide]', function(e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$($(this).data('toggle_slide')).slideToggle('fast');\r\n\t\t\t})\r\n\t\t\t// XML Feed Wrapper\r\n\t\t\t.on('click', '#wf_newRow', function () {\r\n\t\t\t\tlet tbody = $('#table-1 tbody'),\r\n\t\t\t\t\ttemplate = $('#feed_config_template').text().trim().replace(/__idx__/g, tbody.find('tr').length);\r\n\t\t\t\ttbody.append(template);\r\n\t\t\t\thelper.fancySelect($('.outputType'));\r\n\t\t\t})\r\n\t\t\t// feed delete alert.\r\n\t\t\t.on('click', '.single-feed-delete', function (event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (confirm(opts.form.del_confirm)) {\r\n\t\t\t\t\twindow.location.href = $(this).attr('val');\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// clear cache data.\r\n\t\t\t.on('click', '.wf_clean_cache_wrapper', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tvar nonce = $('.woo-feed-clean-cache-nonce').val();\r\n\t\t\t\tvar loader = $('.woo-feed-cache-loader');\r\n\r\n\t\t\t\t//show loader\r\n\t\t\t\tloader.show();\r\n\r\n\t\t\t\t// passed cache nonce\r\n\t\t\t\twpAjax.post('clear_cache_data', {\r\n\t\t\t\t\t_ajax_clean_nonce: nonce\r\n\t\t\t\t}).then(function (response) {\r\n\t\t\t\t\tif( response.success ) {\r\n\t\t\t\t\t\tloader.hide(); //hide loader\r\n\t\t\t\t\t}\r\n\t\t\t\t}).fail(function (e) {\r\n\t\t\t\t\tconsole.log('something wrong');\r\n\t\t\t\t});\r\n\r\n\t\t\t})// Copy Status\r\n\t\t\t.on('click', '#woo-feed-copy-status-btn', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tlet button = $('#woo-feed-copy-status-btn');\r\n\t\t\t\tlet status_area = $('#woo-feed-status-area');\r\n\t\t\t\tbutton.val('Copied');\r\n\t\t\t\tstatus_area.css('visibility','visible');\r\n\t\t\t\tstatus_area.select();\r\n\r\n\t\t\t\tdocument.execCommand('copy');\r\n\t\t\t})\r\n\t\t\t// feed value dropdown change.\r\n\t\t\t.on('change', '.wf_attr.wf_attributes', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t$('.fancy-picker-picked').trigger(\"click\"); // trigger fancy select box clicked\r\n\r\n\t\t\t\t// price attributes\r\n\t\t\t\tvar price_attributes = ['price', 'current_price', 'sale_price', 'price_with_tax', 'current_price_with_tax', 'sale_price_with_tax'];\r\n\t\t\t\t// current value\r\n\t\t\t\tvar current_attribute_value = $(this).val();\r\n\t\t\t\tvar outputSelect = $(this).parents('tr').find('.outputType');\r\n\t\t\t\tvar fancyOption = $(this).parents('tr').find('.fancy-picker-content .fancy-picker-option');\r\n\t\t\t\tvar fancyDataPicker = $(this).parents('tr').find('.fancy-picker-data span');\r\n\t\t\t\tvar selectIf, selectKey;\r\n\r\n\t\t\t\t// when any attribute is selected, pick the key\r\n\t\t\t\tif( price_attributes.includes(current_attribute_value) ) {\r\n\t\t\t\t\t// when select any price attribute\r\n\t\t\t\t\tselectIf = 'for_price';\r\n\t\t\t\t\tselectKey = \"Price\";\r\n\t\t\t\t} else if ( \"\" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {\r\n\r\n\t\t\t\t\t// when select any custom taxonomy\r\n\t\t\t\t\tselectIf = 'for_custom_taxo';\r\n\t\t\t\t\tselectKey = \"parent_if_empty\";\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tselectIf = 'for_all';\r\n\t\t\t\t\tselectKey = 'Default';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// remove selected class from old selected option\r\n\t\t\t\tfancyOption.removeClass('selected');\r\n\r\n\t\t\t\t// when value dropdown is selected as price or any custom taxonomy\r\n\t\t\t\tif( selectIf === 'for_custom_taxo' || selectIf === 'for_price' ) {\r\n\r\n\t\t\t\t\t// update \"Option Type\" when select key matches\r\n\t\t\t\t\tfancyOption.each(function(item) {\r\n\t\t\t\t\t\tif( selectKey === $(this).text() ) {\r\n\t\t\t\t\t\t\t$(this).addClass('selected');\r\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// update \"Option Type\" when select key matches\r\n\t\t\t\t\tfancyOption.each(function(item) {\r\n\t\t\t\t\t\tif( \"parent_if_empty\" !== $(this).text() && \"for_all\" === selectIf ) {\r\n\t\t\t\t\t\t\t$(this).addClass('selected');\r\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t})\r\n\t\t\t// bulk delete alert.\r\n\t\t\t.on('click', '#doaction, #doaction2', function () {\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\treturn confirm(opts.form.del_confirm_multi);\r\n\t\t\t})\r\n\t\t\t// Generate Feed Table Row Delete\r\n\t\t\t.on('change', '.dType', function () {\r\n\t\t\t\tlet self = $(this),\r\n\t\t\t\t\ttype = self.val(),\r\n\t\t\t\t\trow = self.closest('tr');\r\n\t\t\t\t\r\n\t\t\t\tif (type === 'pattern') {\r\n\t\t\t\t\trow.find('.value_attribute').hide();\r\n\t\t\t\t\trow.find('.value_pattern').show();\r\n\t\t\t\t} else if (type === 'attribute') {\r\n\t\t\t\t\trow.find('.value_attribute').show();\r\n\t\t\t\t\trow.find('.value_pattern').hide();\r\n\t\t\t\t} else if (type === 'remove') {\r\n\t\t\t\t\trow.find('.value_attribute').hide();\r\n\t\t\t\t\trow.find('.value_pattern').hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Generate Feed Form Submit\r\n\t\t\t.on('click', '.delRow', function (e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$(this).closest('tr').remove();\r\n\t\t\t\thelper.reindex_config_table();\r\n\t\t\t})\r\n\t\t\t.on('submit', '#generateFeed', function () {\r\n\t\t\t\t// Feed Generating form validation\r\n\t\t\t\t$(this).validate();\r\n\t\t\t\t\r\n\t\t\t\tif ($(this).valid()) {\r\n\t\t\t\t\t$(\".makeFeedResponse\")\r\n\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Generate Update Feed Form Submit\r\n\t\t\t.on('submit', '#updatefeed', function (e, data) {\r\n\t\t\t\t// Feed Generating form validation\r\n\t\t\t\t$(this).validate();\r\n\t\t\t\t\r\n\t\t\t\tif ($(this).valid()) {\r\n\t\t\t\t\t$(\".makeFeedResponse\")\r\n\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${data && data.save ? opts.form.save : opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.ftporsftp', function () {\r\n\t\t\t\tlet server = $(this).val(),\r\n\t\t\t\t\tstatus = $('.ssh2_status');\r\n\t\t\t\t\r\n\t\t\t\tif (server === 'sftp') {\r\n\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\tstatus.show().css('color', 'dodgerblue').text(opts.form.sftp_checking);\r\n\t\t\t\t\twpAjax.post('get_ssh2_status', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tserver: server\r\n\t\t\t\t\t}).then(function (response) {\r\n\t\t\t\t\t\tif (response === 'exists') {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\tstatus.css('color', '#2CC185').text(opts.form.sftp_available);\r\n\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\tstatus.hide();\r\n\t\t\t\t\t\t\t}, 1500);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\tstatus.show().css('color', 'red').text(opts.form.sftp_warning);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).fail(function (e) {\r\n\t\t\t\t\t\tstatus.hide();\r\n\t\t\t\t\t\thelper.ajax_fail(e);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstatus.hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('click', '[name=\"save_feed_config\"]', function (e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$('#updatefeed').trigger('submit', {\r\n\t\t\t\t\tsave: true\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t\t.on('change', '#provider', function (event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\r\n\t\t\t\t//if (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.\r\n\r\n\t\t\t\tlet merchant = $(this).val(),\r\n\t\t\t\t\tfeedType = $(\"#feedType\"),\r\n\t\t\t\t\tfeedForm = $(\"#providerPage\"),\r\n\t\t\t\t\tmerchantInfo = $('#feed_merchant_info'); // set loading..\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tfeedForm.html('<h3><span style=\"float:none;margin: -3px 0 0;\" class=\"spinner is-active\"></span> ' + opts.form.loading_tmpl + '</h3>'); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t\r\n\t\t\t\tmerchantInfo.find('.spinner').addClass('is-active');\r\n\t\t\t\tfeedType.disabled(!0); // disable dropdown\r\n\t\t\t\t\r\n\t\t\t\tfeedType.parent().find('.spinner').addClass('is-active');\r\n\t\t\t\tmerchantInfo.find('.merchant-info-section .data').html(''); // remove previous data\r\n\t\t\t\t// Get Merchant info for selected Provider/Merchant\r\n\r\n\r\n\t\t\t\t\r\n\t\t\t\tif (merchantInfoCache.hasOwnProperty(merchant)) {\r\n\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twpAjax.send('woo_feed_get_merchant_info', {\r\n\t\t\t\t\t\ttype: 'GET',\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tnonce: opts.nonce,\r\n\t\t\t\t\t\t\tprovider: merchant\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\tmerchantInfoCache[merchant] = r;\r\n\t\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, r);\r\n\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t} // Get FeedForm For Selected Provider/Merchant\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (merchantTemplateCache.hasOwnProperty(merchant)) {\r\n\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, merchantTemplateCache[merchant]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twpAjax.post('get_feed_merchant', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tmerchant: merchant\r\n\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\tmerchantTemplateCache[merchant] = r;\r\n\t\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, r);\r\n\r\n\t\t\t\t\t\t//when merchant is bing, change delimiter and enclosure\r\n\t\t\t\t\t\tif( 'bing' === merchant ) {\r\n\t\t\t\t\t\t\t//delimiter value\r\n\t\t\t\t\t\t\t$(\"#delimiter option\").removeAttr('selected');\r\n\t\t\t\t\t\t\t$(\"#delimiter option[value=\\\"tab\\\"]\").attr('selected', 'selected');\r\n\r\n\t\t\t\t\t\t\t//enclosure value\r\n\t\t\t\t\t\t\t$(\"#enclosure option\").removeAttr('selected');\r\n\t\t\t\t\t\t\t$(\"#enclosure option[value=\\\" \\\"]\").attr('selected', 'selected');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//reviewer options hide\r\n\t\t\t\t\t\tif( 'google_product_review' !== merchant) {\r\n\t\t\t\t\t\t\t$('.wf_attributes option[value=\"reviewer_name\"]').hide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Feed Active and Inactive status change via ajax\r\n\t\t\t.on('change', '.woo_feed_status_input', function () {\r\n\t\t\t\tlet self = $(this);\r\n\t\t\t\twpAjax.post('update_feed_status', {\r\n\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\tfeedName: self.val(),\r\n\t\t\t\t\tstatus: self[0].checked ? 1 : 0\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t// event with trigger\r\n\t\t$(document)\r\n\t\t\t.on('change', '[name=\"is_outOfStock\"], [name=\"product_visibility\"]', function () {\r\n\t\t\t\tlet outOfStockVisibilityRow = $('.out-of-stock-visibility');\r\n\t\t\t\tif ($('[name=\"is_outOfStock\"]:checked').val() === 'n' && $('[name=\"product_visibility\"]:checked').val() === '1') {\r\n\t\t\t\t\toutOfStockVisibilityRow.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\toutOfStockVisibilityRow.hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.attr_type', function () {\r\n\t\t\t\t// Attribute type selection\r\n\t\t\t\tlet self = $(this),\r\n\t\t\t\t\ttype = self.val(),\r\n\t\t\t\t\trow = self.closest('tr');\r\n\t\t\t\t\r\n\t\t\t\tif (type === 'pattern') {\r\n\t\t\t\t\trow.find('.wf_attr').hide();\r\n\t\t\t\t\trow.find('.wf_attr').val('');\r\n\t\t\t\t\trow.find('.wf_default').show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\trow.find('.wf_attr').show();\r\n\t\t\t\t\trow.find('.wf_default').hide();\r\n\t\t\t\t\trow.find('.wf_default').val('');\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.wf_mattributes, .attr_type', function () {\r\n\t\t\t\tlet row = $(this).closest('tr'),\r\n\t\t\t\t\tattribute = row.find('.wf_mattributes'),\r\n\t\t\t\t\ttype = row.find('.attr_type'),\r\n\t\t\t\t\tvalueColumn = row.find('td:eq(4)'),\r\n\t\t\t\t\tprovider = $('#provider').val();\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (opts.form.google_category.hasOwnProperty(attribute.val()) && type.val() === 'pattern' && helper.in_array(provider, opts.form.google_category[attribute.val()])) {\r\n\t\t\t\t\tif (valueColumn.find('select.selectize').length === 0) {\r\n\t\t\t\t\t\tvalueColumn.find('input.wf_default').remove();\r\n\t\t\t\t\t\tvalueColumn.append('<span class=\"wf_default wf_attributes\"><select name=\"default[]\" class=\"selectize\"></select></span>');\r\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\tvalueColumn.append(`<span style=\"font-size:x-small;\"><a style=\"color: red\" href=\"http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category\" target=\"_blank\">${opts.learn_more}</a></span>`);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!googleCategories) {\r\n\t\t\t\t\t\t\tvalueColumn.append('<span class=\"spinner is-active\" style=\"margin: 0;\"></span>');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlet select = valueColumn.find('.wf_attributes select');\r\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\thelper.selectize(select, {\r\n\t\t\t\t\t\t\tpreload: true,\r\n\t\t\t\t\t\t\tplaceholder: opts.form.select_category,\r\n\t\t\t\t\t\t\tload: function load(query, cb) {\r\n\t\t\t\t\t\t\t\tif (!googleCategories) {\r\n\t\t\t\t\t\t\t\t\twpAjax.send('get_google_categories', {\r\n\t\t\t\t\t\t\t\t\t\ttype: 'GET',\r\n\t\t\t\t\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\t\t\t\t\t\taction: \"get_google_categories\",\r\n\t\t\t\t\t\t\t\t\t\t\tprovider: provider\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\t\t\t\t\tgoogleCategories = r;\r\n\t\t\t\t\t\t\t\t\t\tcb(googleCategories);\r\n\t\t\t\t\t\t\t\t\t\tvalueColumn.find('.spinner').remove();\r\n\t\t\t\t\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tcb(googleCategories);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (attribute.val() !== 'current_category' && valueColumn.find('input.wf_default').length === 0) {\r\n\t\t\t\t\t\tvalueColumn.find('span').remove();\r\n\t\t\t\t\t\tvalueColumn.append('<input autocomplete=\"off\" class=\"wf_default wf_attributes\" type=\"text\" name=\"default[]\" value=\"\">');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (type.val() !== 'pattern') {\r\n\t\t\t\t\t\t\tvalueColumn.find('input.wf_default').hide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '#feedType,#provider', function (e) {\r\n\t\t\t\tlet type = $('#feedType').val(),\r\n\t\t\t\t\tprovider = $('#provider').val(),\r\n\t\t\t\t\titemWrapper = $('.itemWrapper'),\r\n\t\t\t\t\twf_csv_txt = $('.wf_csvtxt');\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {\r\n\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//when feed type is changed\r\n\t\t\t\tif( 'feedType' === e.target.id ) {\r\n\t\t\t\t\tif (type === 'csv' || type === 'txt') {\r\n\t\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t\t\twf_csv_txt.show();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\titemWrapper.show();\r\n\t\t\t\t\t\twf_csv_txt.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t})\r\n\t\t\t.trigger('change');\r\n\t});\r\n})(jQuery, window, document, wp.ajax, wpf_ajax_obj);\r\n"]}
|
woo-feed.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: CTX Feed
|
11 |
* Plugin URI: https://webappick.com/
|
12 |
* Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
|
13 |
-
* Version: 4.3.
|
14 |
* Author: WebAppick
|
15 |
* Author URI: https://webappick.com/
|
16 |
* License: GPL v2
|
@@ -38,7 +38,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
|
|
38 |
* @var string
|
39 |
* @since 3.1.6
|
40 |
*/
|
41 |
-
define( 'WOO_FEED_FREE_VERSION', '4.3.
|
42 |
}
|
43 |
|
44 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|
10 |
* Plugin Name: CTX Feed
|
11 |
* Plugin URI: https://webappick.com/
|
12 |
* Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
|
13 |
+
* Version: 4.3.51
|
14 |
* Author: WebAppick
|
15 |
* Author URI: https://webappick.com/
|
16 |
* License: GPL v2
|
38 |
* @var string
|
39 |
* @since 3.1.6
|
40 |
*/
|
41 |
+
define( 'WOO_FEED_FREE_VERSION', '4.3.51' );
|
42 |
}
|
43 |
|
44 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|