Version Description
(2021-06-08) = * Added: Custom fields settings has been added to setting page.
Download this release
Release Info
Developer | wahid0003 |
Plugin | CTX Feed – WooCommerce Product Feed Manager Plugin |
Version | 4.3.94 |
Comparing to | |
See all releases |
Code changes from version 4.3.93 to 4.3.94
- README.txt +4 -1
- admin/css/woo-feed-admin.css +47 -0
- admin/css/woo-feed-admin.min.css +1 -1
- admin/css/woo-feed-admin.scss +61 -0
- admin/js/fancy-select.min.js.map +1 -1
- admin/js/jquery-sortable.min.js.map +1 -1
- admin/js/woo-feed-admin-pro.min.js.map +1 -1
- admin/js/woo-feed-admin.js +50 -0
- admin/js/woo-feed-admin.min.js +1 -1
- admin/js/woo-feed-admin.min.js.map +1 -1
- admin/partials/woo-feed-settings.php +45 -25
- includes/classes/class-woo-feed-dropdown.php +15 -4
- includes/classes/class-woo-feed-products-v3.php +23 -35
- includes/helper.php +381 -238
- 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 |
|
@@ -501,6 +501,9 @@ Using pro version:
|
|
501 |
|
502 |
== Changelog ==
|
503 |
|
|
|
|
|
|
|
504 |
= 4.3.93 (2021-06-07) =
|
505 |
* Fixed: Code Enhancement.
|
506 |
* Fixed: Junk Cleaned.
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.3.94
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
501 |
|
502 |
== Changelog ==
|
503 |
|
504 |
+
= 4.3.94 (2021-06-08) =
|
505 |
+
* Added: Custom fields settings has been added to setting page.
|
506 |
+
|
507 |
= 4.3.93 (2021-06-07) =
|
508 |
* Fixed: Code Enhancement.
|
509 |
* Fixed: Junk Cleaned.
|
admin/css/woo-feed-admin.css
CHANGED
@@ -1468,3 +1468,50 @@ input[type="submit"][data-id="wf_action_submit"] {
|
|
1468 |
#taxonomy-woo-feed-brand #newwoo-feed-brand_parent,
|
1469 |
.taxonomy-woo-feed-brand .form-field.term-parent-wrap {
|
1470 |
display: none; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1468 |
#taxonomy-woo-feed-brand #newwoo-feed-brand_parent,
|
1469 |
.taxonomy-woo-feed-brand .form-field.term-parent-wrap {
|
1470 |
display: none; }
|
1471 |
+
|
1472 |
+
.wapk-admin .switch {
|
1473 |
+
position: relative;
|
1474 |
+
display: inline-block;
|
1475 |
+
width: 60px;
|
1476 |
+
height: 34px; }
|
1477 |
+
|
1478 |
+
.wapk-admin .switch input {
|
1479 |
+
opacity: 0;
|
1480 |
+
width: 0;
|
1481 |
+
height: 0; }
|
1482 |
+
|
1483 |
+
.wapk-admin .slider {
|
1484 |
+
position: absolute;
|
1485 |
+
cursor: pointer;
|
1486 |
+
top: 0;
|
1487 |
+
left: 0;
|
1488 |
+
right: 0;
|
1489 |
+
bottom: 0;
|
1490 |
+
background-color: #ccc;
|
1491 |
+
transition: .4s; }
|
1492 |
+
|
1493 |
+
.wapk-admin .slider:before {
|
1494 |
+
position: absolute;
|
1495 |
+
content: "";
|
1496 |
+
height: 26px;
|
1497 |
+
width: 26px;
|
1498 |
+
left: 4px;
|
1499 |
+
bottom: 4px;
|
1500 |
+
background-color: white;
|
1501 |
+
transition: .4s; }
|
1502 |
+
|
1503 |
+
.wapk-admin input:checked + .slider {
|
1504 |
+
background-color: #18c194; }
|
1505 |
+
|
1506 |
+
.wapk-admin input:focus + .slider {
|
1507 |
+
box-shadow: 0 0 1px #2196F3; }
|
1508 |
+
|
1509 |
+
.wapk-admin input:checked + .slider:before {
|
1510 |
+
-webkit-transform: translateX(26px);
|
1511 |
+
transform: translateX(26px); }
|
1512 |
+
|
1513 |
+
.wapk-admin .slider.round {
|
1514 |
+
border-radius: 34px; }
|
1515 |
+
|
1516 |
+
.wapk-admin .slider.round:before {
|
1517 |
+
border-radius: 50%; }
|
admin/css/woo-feed-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wpf_spin{-webkit-animation:spin 1s infinite linear;animation:spin 1s infinite linear}.wpf_spin.reverse_spin{animation-direction:reverse}.wpf_regenerate.disabled{color:#737373;box-shadow:none;cursor:not-allowed}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.wfbtn{background:#3498db;background-image:linear-gradient(125deg,#3cb0fd 0,#152f8c 140%);border-radius:17px;box-shadow:inset 0 1px 3px #666;font-family:Arial,sans-serif;color:#fff;font-size:20px;padding:10px 20px 10px 20px;border:solid #2b698f 0;text-decoration:none}.wfbtn:hover{background:#3cb0fd;background-image:linear-gradient(to bottom,#3cb0fd,#3498db);text-decoration:none}.woo_feed_manage_list_table .wf_update_interval_btn{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);border:none}.woo_feed_manage_list_table .wf_update_interval_btn:hover{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%)}.woo-feed-promotion{position:relative;display:none}.woo-feed-promotion .woo-feed-campaign-close-button{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:15px;width:24px;height:24px;border-radius:12px;background:#595d6b;line-height:24px;color:#fff;cursor:pointer;transition:.3s ease}.woo-feed-promotion .woo-feed-campaign-close-button:hover{background:#fff;color:#d61e48}.wftooltip{display:none;position:absolute;border:1px solid #333;background-color:#161616;border-radius:5px;padding:10px;color:#fff;font-size:12px}.feed-actions .makeFeedResponse{width:70%;color:green}.woo-feed-mapping-input{width:100%}.requiredIn{color:red}.generalInput{width:200px}.generalInput:not(.selectize-control){margin:5px auto}.error{color:red}.widefat td input,.widefat td select{max-width:100%}#wf_newRow{margin-left:0}.mtable tbody tr{height:25px;border:1px solid #ccc;text-align:left;-ms-flex-align:baseline;align-items:baseline;font-weight:700}.mtable th:nth-child(1){width:17px}.mtable th:nth-child(2){width:160px}.mtable th:nth-child(3){width:100px}.mtable th:nth-child(4){width:100px}.mtable th:nth-child(5){width:150px}.mtable th:nth-child(6){width:100px}.mtable th:nth-child(7){width:150px}.mtable th:nth-child(8){width:90px}.mtable th:nth-child(9){width:29px}.mtable2 tbody tr{height:25px;border:1px solid #ccc;text-align:left;-ms-flex-align:baseline;align-items:baseline;font-weight:700}.mtable2 th:nth-child(1){width:30px}.mtable2 th:nth-child(2){width:150px}.mtable2 th:nth-child(3){width:230px}.mtable2 th:nth-child(4){width:220px}.mtable2 th:nth-child(7){width:50px}.mtable2 th:nth-child(8){width:50px}.mtable2 th:nth-child(9){width:29px}.wp-admin select.wf_mattributes{width:150px;left:0;height:25px}div#wf-tab-content1 select:not([name^=output_type]){width:100%}div#wf-tab-content1 input{width:100%}div#wf-tab-content1 .dashicons{vertical-align:middle}.wf_attributes{width:150px;left:0}.wf_compare{max-width:245px;left:0}.wf_ps{width:100px;left:0}.wf_sortedtable{cursor:move}.sorted_table{position:relative}.sorted_table .dragged{position:absolute;opacity:.8;z-index:9999;background:#fff;width:100%;display:table}.sorted_table tbody tr.placeholder td{border:1px dashed #2cc185;height:46px}.wfnoempty{width:120px}.wf_tabs{position:relative;margin:0 auto;width:100%;list-style:none}.wf_tabs:after{display:table;clear:both;content:""}.wf_tabs li{float:left;width:20%;display:block;border:2px solid #ccc}.wf_tabs li>input[type=radio][name=wf_tabs]{position:absolute;top:auto;left:-9999px}.wf-tab-name{display:block;padding:15px;font-size:15px;font-weight:700;line-height:1;background:#fff;cursor:pointer;position:relative;text-align:center;text-transform:uppercase;color:#2cc185}.wf-tab-name:hover{background:#2cc185;color:#fff}.wf_tabs [id^=tab]:checked+label{background:#2cc185;color:#fff}.wf_tabs .wf-tab-content{z-index:2;display:none;width:100%;font-size:.9rem;position:absolute;left:0;background:#fff;border:2px solid #ccc}.wf_tabs [id^=tab]:checked~[id^=wf-tab-content]{display:block}[id^=wf-tab-content]{margin-bottom:40px}div#wf-tab-content2 table:first-child{padding:10px 0}div#wf-tab-content2 table:first-child td:nth-child(1){width:260px}div#wf-tab-content2 table:first-child td:nth-child(2){width:260px}table.feed-actions tr td:last-child{text-align:right}select.selectize{display:none}body.no-js select.selectize{display:block!important}.wp-list-table .option_name .wf_feed_option_name_link{font-weight:700;color:#30336b}.wp-list-table #option_name a{color:#32373c}.selectize-dropdown .active{background-color:#edf9ff}.selectize-dropdown .create{padding:5px 8px}.wapk-selectize-item{background:#0073aa!important;color:#f1f1f1!important;font-weight:700!important;border-color:#0073aa!important;padding-left:5px;padding-right:5px}.selectize-input.full #googleTaxonomyId-selectized{opacity:0;position:absolute;left:-10000px}.selectize-dropdown [data-selectable].option{cursor:default}.selectize-control.plugin-remove_button [data-value] .remove{border-left:1px solid #f1f1f1!important}.selectize-dropdown .optgroup-header{font-weight:700;background:#efefef;color:#5a5a5a}.selectize-dropdown [data-selectable].option{cursor:pointer}.wf_status_wrap label{width:55px;height:28px;box-sizing:border-box;float:left;border-radius:100px;position:relative;cursor:pointer;transition:.3s ease;background:linear-gradient(125deg,#e2e2e2 0,#ccc 140%)}input[class=woo_feed_status_input]:checked+label{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%)}input[class=woo_feed_status_input]:checked+label:before{left:29px}.wf_status_wrap label:before{transition:.3s ease;content:'';width:20px;height:20px;position:absolute;background:#fff;left:6px;top:4px;box-sizing:border-box;color:#000;border-radius:100px;box-shadow:0 1.5px 2px 0 #000}.view span.dashicons.dashicons-external{color:#22a6b3}.view span.dashicons.dashicons-sos{color:#22a6b3}.view span.dashicons.dashicons-download{color:#ee5253}.view span.dashicons.dashicons-media-code{color:#576574}.column-url,.widefat td.column-url,.widefat th.column-url{color:#1e8f9a;font-weight:700}.feed-progress-container{width:100%;color:#fff;text-align:center;font-weight:300}.feed-progress-bar{width:100%;background:#eee;padding:3px;border-radius:50px;box-shadow:inset 0 1px 3px rgba(0,0,0,.2)}.feed-progress-bar-fill{height:20px;display:block;background:linear-gradient(to right top,#10ac84,#13b389,#15ba8f,#18c194,#1ac89a,#13cba1,#0acfa9,#00d2b0,#00d2ba,#00d2c3,#00d2cb,#00d2d3);width:0;border-radius:50px;transition:width .8s ease}.feed-progress-status{float:left;font-weight:700;color:#00008b}.feed-progress-percentage{text-align:right;font-weight:bolder;color:#1dd1a1;font-family:'Arial Black',sans-serif;font-size:large}#wpbody-content.woofeed-body-content{overflow:visible!important}.clippy{position:relative;width:13px;margin-top:-3px;margin-left:3px;top:3px}.column-url .clippy{display:none}.column-url:hover .clippy{display:inline-block}.tooltipped{position:relative}.tooltipped:after{position:absolute;z-index:1000000;display:none;padding:5px 8px;font:normal normal 11px/1.5 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol";color:#fff;text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:rgba(0,0,0,.8);border-radius:3px;-webkit-font-smoothing:subpixel-antialiased}.tooltipped:before{position:absolute;z-index:1000001;display:none;width:0;height:0;color:rgba(0,0,0,.8);pointer-events:none;content:"";border:5px solid transparent}.tooltipped:hover:before{display:inline-block;text-decoration:none}.tooltipped:hover:after{display:inline-block;text-decoration:none}.tooltipped:active:before{display:inline-block;text-decoration:none}.tooltipped:active:after{display:inline-block;text-decoration:none}.tooltipped:focus:before{display:inline-block;text-decoration:none}.tooltipped:focus:after{display:inline-block;text-decoration:none}.tooltipped-multiline:hover:after{display:table-cell}.tooltipped-multiline:active:after{display:table-cell}.tooltipped-multiline:focus:after{display:table-cell}.tooltipped-multiline:after{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;word-break:break-word;word-wrap:normal;white-space:pre-line;border-collapse:separate}.tooltipped-s:after{top:100%;right:50%;margin-top:5px;-webkit-transform:translateX(50%);transform:translateX(50%)}.tooltipped-s:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-se:after{top:100%;margin-top:5px;right:auto;left:50%;margin-left:-15px}.tooltipped-se:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-sw:after{top:100%;right:50%;margin-top:5px;margin-right:-15px}.tooltipped-sw:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-n:after{right:50%;bottom:100%;margin-bottom:5px;-webkit-transform:translateX(50%);transform:translateX(50%)}.tooltipped-n:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-ne:after{bottom:100%;margin-bottom:5px;right:auto;left:50%;margin-left:-15px}.tooltipped-ne:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-nw:after{right:50%;bottom:100%;margin-bottom:5px;margin-right:-15px}.tooltipped-nw:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-w:after{right:100%;bottom:50%;margin-right:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.tooltipped-w:before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,.8)}.tooltipped-e:after{bottom:50%;left:100%;margin-left:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.tooltipped-e:before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,.8)}.tooltipped-multiline.tooltipped-s:after{right:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.tooltipped-multiline.tooltipped-n:after{right:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.tooltipped-multiline.tooltipped-w:after{right:100%}.tooltipped-multiline.tooltipped-e:after{right:100%}.tooltipped-sticky:before{display:inline-block}.tooltipped-sticky:after{display:inline-block}.tooltipped-sticky.tooltipped-multiline:after{display:table-cell}.fullscreen-overlay-enabled.dark-theme .tooltipped:after{color:#000;background:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-s:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-se:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-sw:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-n:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-ne:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-nw:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-e:before{border-right-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-w:before{border-left-color:rgba(255,255,255,.8)}@media screen and (min-width:0\0){.tooltipped-multiline:after{width:250px}}ul.tracker_collection_list{list-style:initial;padding:initial;margin:-10px 0 0 30px;font-size:11px!important}ul.tracker_collection_list li{margin:0}table.wf-info-table,table.wf-rate-table{vertical-align:middle;text-align:center;max-width:100%;font-weight:500}table.wf-info-table th,table.wf-rate-table th{text-align:center}table.wf-info-table th .woo-feed-top-header,table.wf-rate-table th .woo-feed-top-header{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}table.wf-info-table th .woo-feed-top-header .get-woo-feed-pro,table.wf-rate-table th .woo-feed-top-header .get-woo-feed-pro{margin-left:20px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons{float:right;display:-ms-flexbox;display:flex;border-radius:7px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a{padding:8px 20px;background:#576574;color:#fff;box-sizing:border-box;display:inline-block;transition:.3s ease}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-doc-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-doc-link{background:#576574;border-top-left-radius:5px;border-bottom-left-radius:5px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-video-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-video-link{background:#ee5253}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-support-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-support-link{background:#22a6b3;border-top-right-radius:5px;border-bottom-right-radius:5px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a span.dashicons,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a span.dashicons{font-size:18px;line-height:1.2}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a:hover,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a:hover{background:#30336b;box-shadow:0 0 33px 0 rgba(0,0,0,.12)}table.wf-info-table strong,table.wf-rate-table strong{font-weight:700}table.wf-info-table th:first-child img{margin:0 0 -5px 5px}table.wf-rate-table a{color:#0073aa}table.wf-rate-table a.review-star:after{content:"\f155\f155\f155\f155\f155"!important;font-family:dashicons;font-size:10px;font-weight:100;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#0073aa;text-decoration:underline}#adminmenu #toplevel_page_webappick-manage-feeds div.wp-menu-image::before{content:"";background:url(../images/woo-feed-icon.svg) no-repeat center center;background-size:20px 20px;opacity:.6}#adminmenu #toplevel_page_webappick-manage-feeds:hover div.wp-menu-image::before{opacity:1}#adminmenu #toplevel_page_webappick-manage-feeds.wp-has-current-submenu div.wp-menu-image::before{opacity:1}.wapk-admin,.wapk-admin *{box-sizing:border-box}.wapk-admin{position:relative;display:block;-webkit-hyphens:manual;-ms-hyphens:manual;-moz-hyphens:manual;hyphens:manual;color:#1b2730;margin:0 0 0 -10px}@media screen and (min-width:783px){.wapk-admin{margin:0 0 0 -20px}}.text-center{text-align:center}.wapk-admin h1,.wapk-admin h2,.wapk-admin h3,.wapk-admin h4,.wapk-admin h5,.wapk-admin h6,.wapk-admin p{color:#1b2730}.wapk-admin sup{vertical-align:baseline;position:relative;top:-6px}.wapk-admin sub{vertical-align:baseline;position:relative;top:4px}.wapk-admin .wapk-section{margin:10px 20px 0 22px;position:relative;display:block}.wapk-admin .wapk-section [class$=icon32]+h2{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin .wapk-section h1{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin .wapk-section>h2:first-child{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin>.notice{margin:10px 20px 0 22px;position:relative;display:block}.wapk-admin span.help{display:block;float:left;width:100%;font-size:.9em;color:#636363;margin-top:5px;font-weight:500}.wapk-admin span.help .dashicons{width:11px;height:12px;font-size:inherit;vertical-align:middle}.clear:after{content:"";display:table;clear:both}.wapk-feed-docs .postbox{width:355px;margin-right:20px;display:inline-block;vertical-align:top}.wapk-feed-docs .postbox .hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;cursor:pointer}.wapk-feed-docs .postbox .dashicons{color:#ccc}.wapk-feed-docs .postbox a{text-decoration:none}.wapk-feed-docs .postbox .inside{margin-bottom:0}.wapk-feed-docs .postbox ul{margin-bottom:0}.wapk-feed-docs .postbox .toggle-indicator:before{content:"\F142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.wapk-feed-docs .postbox li{width:100%;display:block;float:left}.wapk-feed-docs .postbox li span{display:inline-block;float:left;margin-right:4px}.wapk-feed-docs .postbox li a{display:inline-block;float:left;width:calc(100% - 24px)}.wapk-feed-docs .postbox.closed .toggle-indicator:before{content:"\F140"}.wapk-section #post-body.columns-2 #side-sortables{min-height:196px}#poststuff #feed_merchant_info .inside{margin:0;padding:0}#feed_merchant_info ul.data{margin-left:24px;margin-top:5px}#feed_merchant_info ul.data li{margin-bottom:5px}.merchant-info-section{padding:6px 10px 8px}.merchant-info-section.woo-feed-open-file{text-align:center}.merchant-info-section.woo-feed-open-file a{line-height:1.5;text-decoration:none}.generateFeed .wf-tab-content table:first-child{border:none;box-shadow:none}.generateFeed table th{font-weight:700}@media only screen and (max-width:850px){.wapk-feed-docs .postbox{display:block;width:auto;float:none;margin-right:auto}}.wp-submenu li span.woo-feed-docs{font-weight:700;color:#f18500}.wp-submenu li:hover span.woo-feed-docs{color:#ce7304}.wp-submenu li.current span.woo-feed-docs{color:#ce7304}.wapk-admin .wapk-feed-docs .postbox .hndle{cursor:default}.wapk-cta{position:relative;display:-ms-flexbox;display:flex;width:100%;padding:100px 15px;background:linear-gradient(45deg,#6cd5ff 33%,#c2efef 100%);-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.wapk-cta-icon .dashicons{font-size:100px;width:100px;height:auto;margin:0 10px -8px 0;color:#02658c}.wapk-cta-content{width:50%}.wapk-cta-content h2{font-size:2em;margin:.5em 0}.wapk-cta-action a.wapk-button{font-size:24px;height:auto!important;padding:10px 20px}@media (max-width:600px){.wapk-cta{display:block;text-align:center;padding:4em 0}.wapk-cta-content{width:100%;margin:2em 0}}.wapk-button{color:#00d4d4;border-color:#00d4d4;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wapk-button>svg{width:15px;margin-left:5px;fill:#00d4d4}.wapk-button>.dashicons{color:#00d4d4}.wapk-button:hover{border-color:#0bb;color:#0bb}.wapk-button:hover>svg{fill:#0bb}.wapk-button:hover>.dashicons{color:#0bb}.wapk-button:focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button:focus>svg{fill:#0bb}.wapk-button:focus>.dashicons{color:#0bb}.wapk-button:active{background:#0bb;border-color:#0bb}.wapk-button-secondary{color:#00d4d4;border-color:#00d4d4;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wapk-button-secondary>svg{width:15px;margin-left:5px;fill:#00d4d4}.wapk-button-secondary>.dashicons{color:#00d4d4}.wapk-button-secondary:hover{border-color:#0bb;color:#0bb}.wapk-button-secondary:hover>svg{fill:#0bb}.wapk-button-secondary:hover>.dashicons{color:#0bb}.wapk-button-secondary:focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button-secondary:focus>svg{fill:#0bb}.wapk-button-secondary:focus>.dashicons{color:#0bb}.wapk-button-primary{display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box;background:#00d4d4;border-color:#00d4d4;color:#fff;box-shadow:0 1px 0 #0bb;text-shadow:0 -1px 1px #0bb,1px 0 1px #0bb,0 1px 1px #0bb,-1px 0 1px #0bb}.wapk-button-primary>svg{fill:#fff}.wapk-button-primary:hover{background:#00e3e3;border-color:#00c5c5;color:#fff}.wapk-button-primary:hover>svg{fill:#fff}.wapk-button-primary:focus{background:#00e3e3;border-color:#00c5c5;color:#fff;box-shadow:0 0 0 1px #fff,0 0 0 3px #00d4d4}.wapk-button-primary:focus>svg{fill:#fff}.wapk-button-primary:active{background:#0bb;border-color:#0bb;color:#fff}.wapk-button-primary:active>svg{fill:#fff}.wapk-button-primary:disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary:disabled>svg{fill:#c7d1d1!important}.wapk-button.hover{border-color:#0bb;color:#0bb}.wapk-button.hover>svg{fill:#0bb}.wapk-button.hover>.dashicons{color:#0bb}.wapk-button.focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button.focus>svg{fill:#0bb}.wapk-button.focus>.dashicons{color:#0bb}.wapk-button.active{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:focus{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:focus>svg{fill:#0bb}.wapk-button.active:focus>.dashicons{color:#0bb}.wapk-button.active:hover{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:hover>svg{fill:#0bb}.wapk-button.active:hover>.dashicons{color:#0bb}.wapk-button.active>svg{fill:#0bb}.wapk-button.active>.dashicons{color:#0bb}.wapk-button-primary.active{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:focus{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:focus>svg{fill:#fff}.wapk-button-primary.active:hover{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:hover>svg{fill:#fff}.wapk-button-primary.active>svg{fill:#fff}.wapk-button-primary[disabled]{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary[disabled]>svg{fill:#c7d1d1!important}.wapk-button-primary.wapk-button-primary-disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary.wapk-button-primary-disabled>svg{fill:#c7d1d1!important}.wapk-button-primary.disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary.disabled>svg{fill:#c7d1d1!important}.wapk-button-primary.wapk-button-hero{box-shadow:0 2px 0 #0bb}.wapk-button-primary.wapk-button-hero:focus{box-shadow:0 2px 0 #0bb,0 1px 0 #00c5c5,0 0 2px 1px #0ee}.wapk-button-primary.wapk-button-hero:active{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-primary.wapk-button-hero.active{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-primary.wapk-button-hero.active:focus,.wapk-button-primary.wapk-button-hero.active:hover{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-group>.wapk-button.active{border-color:#00d4d4}.wapk-button.wapk-button-xl{height:30px;line-height:28px;padding:0 12px 2px}.wapk-button-group.wapk-button-xl .wapk-button{height:30px;line-height:28px;padding:0 12px 2px}.wapk-button.wapk-button-hero{font-size:18px;height:50px;line-height:48px;padding:0 36px;min-height:46px}.wapk-button-group.wapk-button-hero .wapk-button{font-size:18px;height:50px;line-height:48px;padding:0 36px;min-height:46px}@media screen and (min-width:782px){th#provider,th#status{width:80px}th#type{width:50px}th#option_name{width:100px}td.option_name.column-option_name>span:first-child{display:none}th#last_updated{width:90px}th#view{width:111px}}@media screen and (min-width:960px){th#provider,th#status{width:100px}th#type{width:80px}th#option_name{width:150px}th#last_updated{width:140px}}@media screen and (max-width:782px){table.wf-info-table{margin-top:10px}table.wf-info-table th:first-child img{margin:0 auto;display:block}.wapk-button.wapk-button-xl{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}}.wapk-feed-docs .wapk-feed-cta{margin:0}.campaign_configurator{background:#fff;padding:20px 0}.campaign_configurator table{margin:0 auto;width:51%;min-width:574px;border:none;box-shadow:none}.campaign_configurator th{min-width:120px}@media screen and (max-width:782px){.campaign_configurator{padding:0}.campaign_configurator table{width:auto;min-width:auto;max-width:100%}.campaign_configurator th{min-width:auto}}#wf-tab-content-config td>input:not([type=checkbox]):not([type=radio]),#wf-tab-content-config td>select,#wf-tab-content-config td>textarea{width:100%!important}.woo-feed-filters td>div:nth-child(2n):not(.clear):not(.selectize){width:120px;display:block}.woo-feed-filters td>div:not(.clear){float:left;margin-right:10px}.woo-feed-filters tr>td:first-child{width:290px;padding-left:40px}.woo-feed-filters,.woo-feed-ftp{margin:15px auto 25px}.wf_clean_cache_wrapper{display:-ms-flexbox;display:flex;margin-left:auto}@-webkit-keyframes LoaderClockWise{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes LoaderClockWise{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.woo-feed-cache-loader{width:18px;margin-right:5px;animation:LoaderClockWise 1s linear infinite;-webkit-animation:LoaderClockWise 1s linear infinite;display:none}.woo-feed-table-heading .woo-feed-table-heading-title{float:left;margin-right:auto;display:inline-block;line-height:30px}.woo-feed-table-heading .wf_clean_cache_wrapper{float:right;font-weight:400}.wf_clean_cache_wrapper button{background:linear-gradient(125deg,#eb4d4b 0,#ff9671 130%);color:#fff;border:none;font-weight:500;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;border-radius:3px;cursor:pointer;outline:0}.wf_clean_cache_wrapper button:hover{background:#ff7979;color:#fff}input[type=submit][data-id=wf_action_submit]{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);color:#fff;border:1px;padding:0 20px}input[type=submit][data-id=wf_action_submit]:hover{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);color:#fff}.woo-import-popup-body #TB_window{width:500px!important}.woo-import-popup-body #TB_window #TB_title{border:none;background:#fff;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:35px!important}.woo-import-popup-body #TB_window #TB_title #TB_ajaxWindowTitle{color:#30336b;font-weight:700}.woo-import-popup-body #TB_window #TB_closeWindowButton{top:-14.5px;right:-14.5px;border:none;outline:0}.woo-import-popup-body #TB_window #TB_closeWindowButton .tb-close-icon{background:#ff5e55;color:#fff;border-radius:50%}.woo-import-popup-body #TB_window #TB_closeWindowButton:focus{outline:0;border:0}.woo-import-popup-body #TB_window #TB_ajaxContent{position:relative;width:100%!important;height:auto!important;border:none;box-sizing:border-box;overflow:hidden;background:#f7fcff;padding:30px 20px}.woo-import-popup-body #TB_window #TB_ajaxContent:before{content:'';width:115%;display:block;background:#4bcffa;position:absolute;height:130%;z-index:0;left:-36%;top:-85px;-webkit-transform:rotate(115deg);transform:rotate(115deg)}.woo-import-popup-body #TB_window #TB_ajaxContent table{border:none;position:relative;z-index:1;border-radius:3px;text-align:center;padding:20px;box-shadow:0 12px 20px -17px #000}.woo-import-popup-body #TB_window #TB_ajaxContent table input{width:60%}.woo-import-popup-body #TB_window #TB_ajaxContent table input:focus{outline:2px solid #68b8f7}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=file]{padding:3px 0;cursor:pointer}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=text]{border-radius:25px;font-size:14px;padding:1px 20px;text-align:center}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=submit]{background:#17c0eb;border-radius:25px;border:0;box-shadow:1px 4px 7px -3px #45364a;font-weight:600;transition:.3s ease}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=submit]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px)}.woo-feed-notice .woo-feed-review-notice-logo{width:90px;height:90px;float:left;margin-right:5px;background:url(../images/woo-feed-logo.svg) no-repeat}.woo-feed-status-table-wrapper .woo-feed-status-table{width:100%;max-width:900px;border-collapse:collapse;border-spacing:.5rem;box-shadow:0 0 20px rgba(0,0,0,.1)}.woo-feed-status-table-wrapper .woo-feed-status-table tr:nth-child(even){background:#f1f1f1}.woo-feed-status-table-wrapper .woo-feed-status-table tr:nth-child(odd){background:#fafafc}.woo-feed-status-table-wrapper .woo-feed-status-table tr th{background:#353b48;color:#fff}.woo-feed-status-table-wrapper .woo-feed-status-table tr td,.woo-feed-status-table-wrapper .woo-feed-status-table tr th{padding:.5rem 20px;text-align:left}#taxonomy-woo-feed-brand #newwoo-feed-brand_parent,.taxonomy-woo-feed-brand .form-field.term-parent-wrap{display:none}
|
1 |
+
.wpf_spin{-webkit-animation:spin 1s infinite linear;animation:spin 1s infinite linear}.wpf_spin.reverse_spin{animation-direction:reverse}.wpf_regenerate.disabled{color:#737373;box-shadow:none;cursor:not-allowed}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.wfbtn{background:#3498db;background-image:linear-gradient(125deg,#3cb0fd 0,#152f8c 140%);border-radius:17px;box-shadow:inset 0 1px 3px #666;font-family:Arial,sans-serif;color:#fff;font-size:20px;padding:10px 20px 10px 20px;border:solid #2b698f 0;text-decoration:none}.wfbtn:hover{background:#3cb0fd;background-image:linear-gradient(to bottom,#3cb0fd,#3498db);text-decoration:none}.woo_feed_manage_list_table .wf_update_interval_btn{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);border:none}.woo_feed_manage_list_table .wf_update_interval_btn:hover{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%)}.woo-feed-promotion{position:relative;display:none}.woo-feed-promotion .woo-feed-campaign-close-button{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:15px;width:24px;height:24px;border-radius:12px;background:#595d6b;line-height:24px;color:#fff;cursor:pointer;transition:.3s ease}.woo-feed-promotion .woo-feed-campaign-close-button:hover{background:#fff;color:#d61e48}.wftooltip{display:none;position:absolute;border:1px solid #333;background-color:#161616;border-radius:5px;padding:10px;color:#fff;font-size:12px}.feed-actions .makeFeedResponse{width:70%;color:green}.woo-feed-mapping-input{width:100%}.requiredIn{color:red}.generalInput{width:200px}.generalInput:not(.selectize-control){margin:5px auto}.error{color:red}.widefat td input,.widefat td select{max-width:100%}#wf_newRow{margin-left:0}.mtable tbody tr{height:25px;border:1px solid #ccc;text-align:left;-ms-flex-align:baseline;align-items:baseline;font-weight:700}.mtable th:nth-child(1){width:17px}.mtable th:nth-child(2){width:160px}.mtable th:nth-child(3){width:100px}.mtable th:nth-child(4){width:100px}.mtable th:nth-child(5){width:150px}.mtable th:nth-child(6){width:100px}.mtable th:nth-child(7){width:150px}.mtable th:nth-child(8){width:90px}.mtable th:nth-child(9){width:29px}.mtable2 tbody tr{height:25px;border:1px solid #ccc;text-align:left;-ms-flex-align:baseline;align-items:baseline;font-weight:700}.mtable2 th:nth-child(1){width:30px}.mtable2 th:nth-child(2){width:150px}.mtable2 th:nth-child(3){width:230px}.mtable2 th:nth-child(4){width:220px}.mtable2 th:nth-child(7){width:50px}.mtable2 th:nth-child(8){width:50px}.mtable2 th:nth-child(9){width:29px}.wp-admin select.wf_mattributes{width:150px;left:0;height:25px}div#wf-tab-content1 select:not([name^=output_type]){width:100%}div#wf-tab-content1 input{width:100%}div#wf-tab-content1 .dashicons{vertical-align:middle}.wf_attributes{width:150px;left:0}.wf_compare{max-width:245px;left:0}.wf_ps{width:100px;left:0}.wf_sortedtable{cursor:move}.sorted_table{position:relative}.sorted_table .dragged{position:absolute;opacity:.8;z-index:9999;background:#fff;width:100%;display:table}.sorted_table tbody tr.placeholder td{border:1px dashed #2cc185;height:46px}.wfnoempty{width:120px}.wf_tabs{position:relative;margin:0 auto;width:100%;list-style:none}.wf_tabs:after{display:table;clear:both;content:""}.wf_tabs li{float:left;width:20%;display:block;border:2px solid #ccc}.wf_tabs li>input[type=radio][name=wf_tabs]{position:absolute;top:auto;left:-9999px}.wf-tab-name{display:block;padding:15px;font-size:15px;font-weight:700;line-height:1;background:#fff;cursor:pointer;position:relative;text-align:center;text-transform:uppercase;color:#2cc185}.wf-tab-name:hover{background:#2cc185;color:#fff}.wf_tabs [id^=tab]:checked+label{background:#2cc185;color:#fff}.wf_tabs .wf-tab-content{z-index:2;display:none;width:100%;font-size:.9rem;position:absolute;left:0;background:#fff;border:2px solid #ccc}.wf_tabs [id^=tab]:checked~[id^=wf-tab-content]{display:block}[id^=wf-tab-content]{margin-bottom:40px}div#wf-tab-content2 table:first-child{padding:10px 0}div#wf-tab-content2 table:first-child td:nth-child(1){width:260px}div#wf-tab-content2 table:first-child td:nth-child(2){width:260px}table.feed-actions tr td:last-child{text-align:right}select.selectize{display:none}body.no-js select.selectize{display:block!important}.wp-list-table .option_name .wf_feed_option_name_link{font-weight:700;color:#30336b}.wp-list-table #option_name a{color:#32373c}.selectize-dropdown .active{background-color:#edf9ff}.selectize-dropdown .create{padding:5px 8px}.wapk-selectize-item{background:#0073aa!important;color:#f1f1f1!important;font-weight:700!important;border-color:#0073aa!important;padding-left:5px;padding-right:5px}.selectize-input.full #googleTaxonomyId-selectized{opacity:0;position:absolute;left:-10000px}.selectize-dropdown [data-selectable].option{cursor:default}.selectize-control.plugin-remove_button [data-value] .remove{border-left:1px solid #f1f1f1!important}.selectize-dropdown .optgroup-header{font-weight:700;background:#efefef;color:#5a5a5a}.selectize-dropdown [data-selectable].option{cursor:pointer}.wf_status_wrap label{width:55px;height:28px;box-sizing:border-box;float:left;border-radius:100px;position:relative;cursor:pointer;transition:.3s ease;background:linear-gradient(125deg,#e2e2e2 0,#ccc 140%)}input[class=woo_feed_status_input]:checked+label{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%)}input[class=woo_feed_status_input]:checked+label:before{left:29px}.wf_status_wrap label:before{transition:.3s ease;content:'';width:20px;height:20px;position:absolute;background:#fff;left:6px;top:4px;box-sizing:border-box;color:#000;border-radius:100px;box-shadow:0 1.5px 2px 0 #000}.view span.dashicons.dashicons-external{color:#22a6b3}.view span.dashicons.dashicons-sos{color:#22a6b3}.view span.dashicons.dashicons-download{color:#ee5253}.view span.dashicons.dashicons-media-code{color:#576574}.column-url,.widefat td.column-url,.widefat th.column-url{color:#1e8f9a;font-weight:700}.feed-progress-container{width:100%;color:#fff;text-align:center;font-weight:300}.feed-progress-bar{width:100%;background:#eee;padding:3px;border-radius:50px;box-shadow:inset 0 1px 3px rgba(0,0,0,.2)}.feed-progress-bar-fill{height:20px;display:block;background:linear-gradient(to right top,#10ac84,#13b389,#15ba8f,#18c194,#1ac89a,#13cba1,#0acfa9,#00d2b0,#00d2ba,#00d2c3,#00d2cb,#00d2d3);width:0;border-radius:50px;transition:width .8s ease}.feed-progress-status{float:left;font-weight:700;color:#00008b}.feed-progress-percentage{text-align:right;font-weight:bolder;color:#1dd1a1;font-family:'Arial Black',sans-serif;font-size:large}#wpbody-content.woofeed-body-content{overflow:visible!important}.clippy{position:relative;width:13px;margin-top:-3px;margin-left:3px;top:3px}.column-url .clippy{display:none}.column-url:hover .clippy{display:inline-block}.tooltipped{position:relative}.tooltipped:after{position:absolute;z-index:1000000;display:none;padding:5px 8px;font:normal normal 11px/1.5 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol";color:#fff;text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:rgba(0,0,0,.8);border-radius:3px;-webkit-font-smoothing:subpixel-antialiased}.tooltipped:before{position:absolute;z-index:1000001;display:none;width:0;height:0;color:rgba(0,0,0,.8);pointer-events:none;content:"";border:5px solid transparent}.tooltipped:hover:before{display:inline-block;text-decoration:none}.tooltipped:hover:after{display:inline-block;text-decoration:none}.tooltipped:active:before{display:inline-block;text-decoration:none}.tooltipped:active:after{display:inline-block;text-decoration:none}.tooltipped:focus:before{display:inline-block;text-decoration:none}.tooltipped:focus:after{display:inline-block;text-decoration:none}.tooltipped-multiline:hover:after{display:table-cell}.tooltipped-multiline:active:after{display:table-cell}.tooltipped-multiline:focus:after{display:table-cell}.tooltipped-multiline:after{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;word-break:break-word;word-wrap:normal;white-space:pre-line;border-collapse:separate}.tooltipped-s:after{top:100%;right:50%;margin-top:5px;-webkit-transform:translateX(50%);transform:translateX(50%)}.tooltipped-s:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-se:after{top:100%;margin-top:5px;right:auto;left:50%;margin-left:-15px}.tooltipped-se:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-sw:after{top:100%;right:50%;margin-top:5px;margin-right:-15px}.tooltipped-sw:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-n:after{right:50%;bottom:100%;margin-bottom:5px;-webkit-transform:translateX(50%);transform:translateX(50%)}.tooltipped-n:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-ne:after{bottom:100%;margin-bottom:5px;right:auto;left:50%;margin-left:-15px}.tooltipped-ne:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-nw:after{right:50%;bottom:100%;margin-bottom:5px;margin-right:-15px}.tooltipped-nw:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-w:after{right:100%;bottom:50%;margin-right:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.tooltipped-w:before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,.8)}.tooltipped-e:after{bottom:50%;left:100%;margin-left:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.tooltipped-e:before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,.8)}.tooltipped-multiline.tooltipped-s:after{right:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.tooltipped-multiline.tooltipped-n:after{right:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.tooltipped-multiline.tooltipped-w:after{right:100%}.tooltipped-multiline.tooltipped-e:after{right:100%}.tooltipped-sticky:before{display:inline-block}.tooltipped-sticky:after{display:inline-block}.tooltipped-sticky.tooltipped-multiline:after{display:table-cell}.fullscreen-overlay-enabled.dark-theme .tooltipped:after{color:#000;background:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-s:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-se:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-sw:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-n:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-ne:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-nw:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-e:before{border-right-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-w:before{border-left-color:rgba(255,255,255,.8)}@media screen and (min-width:0\0){.tooltipped-multiline:after{width:250px}}ul.tracker_collection_list{list-style:initial;padding:initial;margin:-10px 0 0 30px;font-size:11px!important}ul.tracker_collection_list li{margin:0}table.wf-info-table,table.wf-rate-table{vertical-align:middle;text-align:center;max-width:100%;font-weight:500}table.wf-info-table th,table.wf-rate-table th{text-align:center}table.wf-info-table th .woo-feed-top-header,table.wf-rate-table th .woo-feed-top-header{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}table.wf-info-table th .woo-feed-top-header .get-woo-feed-pro,table.wf-rate-table th .woo-feed-top-header .get-woo-feed-pro{margin-left:20px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons{float:right;display:-ms-flexbox;display:flex;border-radius:7px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a{padding:8px 20px;background:#576574;color:#fff;box-sizing:border-box;display:inline-block;transition:.3s ease}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-doc-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-doc-link{background:#576574;border-top-left-radius:5px;border-bottom-left-radius:5px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-video-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-video-link{background:#ee5253}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-support-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-support-link{background:#22a6b3;border-top-right-radius:5px;border-bottom-right-radius:5px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a span.dashicons,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a span.dashicons{font-size:18px;line-height:1.2}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a:hover,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a:hover{background:#30336b;box-shadow:0 0 33px 0 rgba(0,0,0,.12)}table.wf-info-table strong,table.wf-rate-table strong{font-weight:700}table.wf-info-table th:first-child img{margin:0 0 -5px 5px}table.wf-rate-table a{color:#0073aa}table.wf-rate-table a.review-star:after{content:"\f155\f155\f155\f155\f155"!important;font-family:dashicons;font-size:10px;font-weight:100;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#0073aa;text-decoration:underline}#adminmenu #toplevel_page_webappick-manage-feeds div.wp-menu-image::before{content:"";background:url(../images/woo-feed-icon.svg) no-repeat center center;background-size:20px 20px;opacity:.6}#adminmenu #toplevel_page_webappick-manage-feeds:hover div.wp-menu-image::before{opacity:1}#adminmenu #toplevel_page_webappick-manage-feeds.wp-has-current-submenu div.wp-menu-image::before{opacity:1}.wapk-admin,.wapk-admin *{box-sizing:border-box}.wapk-admin{position:relative;display:block;-webkit-hyphens:manual;-ms-hyphens:manual;-moz-hyphens:manual;hyphens:manual;color:#1b2730;margin:0 0 0 -10px}@media screen and (min-width:783px){.wapk-admin{margin:0 0 0 -20px}}.text-center{text-align:center}.wapk-admin h1,.wapk-admin h2,.wapk-admin h3,.wapk-admin h4,.wapk-admin h5,.wapk-admin h6,.wapk-admin p{color:#1b2730}.wapk-admin sup{vertical-align:baseline;position:relative;top:-6px}.wapk-admin sub{vertical-align:baseline;position:relative;top:4px}.wapk-admin .wapk-section{margin:10px 20px 0 22px;position:relative;display:block}.wapk-admin .wapk-section [class$=icon32]+h2{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin .wapk-section h1{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin .wapk-section>h2:first-child{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin>.notice{margin:10px 20px 0 22px;position:relative;display:block}.wapk-admin span.help{display:block;float:left;width:100%;font-size:.9em;color:#636363;margin-top:5px;font-weight:500}.wapk-admin span.help .dashicons{width:11px;height:12px;font-size:inherit;vertical-align:middle}.clear:after{content:"";display:table;clear:both}.wapk-feed-docs .postbox{width:355px;margin-right:20px;display:inline-block;vertical-align:top}.wapk-feed-docs .postbox .hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;cursor:pointer}.wapk-feed-docs .postbox .dashicons{color:#ccc}.wapk-feed-docs .postbox a{text-decoration:none}.wapk-feed-docs .postbox .inside{margin-bottom:0}.wapk-feed-docs .postbox ul{margin-bottom:0}.wapk-feed-docs .postbox .toggle-indicator:before{content:"\F142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.wapk-feed-docs .postbox li{width:100%;display:block;float:left}.wapk-feed-docs .postbox li span{display:inline-block;float:left;margin-right:4px}.wapk-feed-docs .postbox li a{display:inline-block;float:left;width:calc(100% - 24px)}.wapk-feed-docs .postbox.closed .toggle-indicator:before{content:"\F140"}.wapk-section #post-body.columns-2 #side-sortables{min-height:196px}#poststuff #feed_merchant_info .inside{margin:0;padding:0}#feed_merchant_info ul.data{margin-left:24px;margin-top:5px}#feed_merchant_info ul.data li{margin-bottom:5px}.merchant-info-section{padding:6px 10px 8px}.merchant-info-section.woo-feed-open-file{text-align:center}.merchant-info-section.woo-feed-open-file a{line-height:1.5;text-decoration:none}.generateFeed .wf-tab-content table:first-child{border:none;box-shadow:none}.generateFeed table th{font-weight:700}@media only screen and (max-width:850px){.wapk-feed-docs .postbox{display:block;width:auto;float:none;margin-right:auto}}.wp-submenu li span.woo-feed-docs{font-weight:700;color:#f18500}.wp-submenu li:hover span.woo-feed-docs{color:#ce7304}.wp-submenu li.current span.woo-feed-docs{color:#ce7304}.wapk-admin .wapk-feed-docs .postbox .hndle{cursor:default}.wapk-cta{position:relative;display:-ms-flexbox;display:flex;width:100%;padding:100px 15px;background:linear-gradient(45deg,#6cd5ff 33%,#c2efef 100%);-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.wapk-cta-icon .dashicons{font-size:100px;width:100px;height:auto;margin:0 10px -8px 0;color:#02658c}.wapk-cta-content{width:50%}.wapk-cta-content h2{font-size:2em;margin:.5em 0}.wapk-cta-action a.wapk-button{font-size:24px;height:auto!important;padding:10px 20px}@media (max-width:600px){.wapk-cta{display:block;text-align:center;padding:4em 0}.wapk-cta-content{width:100%;margin:2em 0}}.wapk-button{color:#00d4d4;border-color:#00d4d4;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wapk-button>svg{width:15px;margin-left:5px;fill:#00d4d4}.wapk-button>.dashicons{color:#00d4d4}.wapk-button:hover{border-color:#0bb;color:#0bb}.wapk-button:hover>svg{fill:#0bb}.wapk-button:hover>.dashicons{color:#0bb}.wapk-button:focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button:focus>svg{fill:#0bb}.wapk-button:focus>.dashicons{color:#0bb}.wapk-button:active{background:#0bb;border-color:#0bb}.wapk-button-secondary{color:#00d4d4;border-color:#00d4d4;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wapk-button-secondary>svg{width:15px;margin-left:5px;fill:#00d4d4}.wapk-button-secondary>.dashicons{color:#00d4d4}.wapk-button-secondary:hover{border-color:#0bb;color:#0bb}.wapk-button-secondary:hover>svg{fill:#0bb}.wapk-button-secondary:hover>.dashicons{color:#0bb}.wapk-button-secondary:focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button-secondary:focus>svg{fill:#0bb}.wapk-button-secondary:focus>.dashicons{color:#0bb}.wapk-button-primary{display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box;background:#00d4d4;border-color:#00d4d4;color:#fff;box-shadow:0 1px 0 #0bb;text-shadow:0 -1px 1px #0bb,1px 0 1px #0bb,0 1px 1px #0bb,-1px 0 1px #0bb}.wapk-button-primary>svg{fill:#fff}.wapk-button-primary:hover{background:#00e3e3;border-color:#00c5c5;color:#fff}.wapk-button-primary:hover>svg{fill:#fff}.wapk-button-primary:focus{background:#00e3e3;border-color:#00c5c5;color:#fff;box-shadow:0 0 0 1px #fff,0 0 0 3px #00d4d4}.wapk-button-primary:focus>svg{fill:#fff}.wapk-button-primary:active{background:#0bb;border-color:#0bb;color:#fff}.wapk-button-primary:active>svg{fill:#fff}.wapk-button-primary:disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary:disabled>svg{fill:#c7d1d1!important}.wapk-button.hover{border-color:#0bb;color:#0bb}.wapk-button.hover>svg{fill:#0bb}.wapk-button.hover>.dashicons{color:#0bb}.wapk-button.focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button.focus>svg{fill:#0bb}.wapk-button.focus>.dashicons{color:#0bb}.wapk-button.active{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:focus{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:focus>svg{fill:#0bb}.wapk-button.active:focus>.dashicons{color:#0bb}.wapk-button.active:hover{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:hover>svg{fill:#0bb}.wapk-button.active:hover>.dashicons{color:#0bb}.wapk-button.active>svg{fill:#0bb}.wapk-button.active>.dashicons{color:#0bb}.wapk-button-primary.active{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:focus{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:focus>svg{fill:#fff}.wapk-button-primary.active:hover{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:hover>svg{fill:#fff}.wapk-button-primary.active>svg{fill:#fff}.wapk-button-primary[disabled]{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary[disabled]>svg{fill:#c7d1d1!important}.wapk-button-primary.wapk-button-primary-disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary.wapk-button-primary-disabled>svg{fill:#c7d1d1!important}.wapk-button-primary.disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary.disabled>svg{fill:#c7d1d1!important}.wapk-button-primary.wapk-button-hero{box-shadow:0 2px 0 #0bb}.wapk-button-primary.wapk-button-hero:focus{box-shadow:0 2px 0 #0bb,0 1px 0 #00c5c5,0 0 2px 1px #0ee}.wapk-button-primary.wapk-button-hero:active{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-primary.wapk-button-hero.active{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-primary.wapk-button-hero.active:focus,.wapk-button-primary.wapk-button-hero.active:hover{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-group>.wapk-button.active{border-color:#00d4d4}.wapk-button.wapk-button-xl{height:30px;line-height:28px;padding:0 12px 2px}.wapk-button-group.wapk-button-xl .wapk-button{height:30px;line-height:28px;padding:0 12px 2px}.wapk-button.wapk-button-hero{font-size:18px;height:50px;line-height:48px;padding:0 36px;min-height:46px}.wapk-button-group.wapk-button-hero .wapk-button{font-size:18px;height:50px;line-height:48px;padding:0 36px;min-height:46px}@media screen and (min-width:782px){th#provider,th#status{width:80px}th#type{width:50px}th#option_name{width:100px}td.option_name.column-option_name>span:first-child{display:none}th#last_updated{width:90px}th#view{width:111px}}@media screen and (min-width:960px){th#provider,th#status{width:100px}th#type{width:80px}th#option_name{width:150px}th#last_updated{width:140px}}@media screen and (max-width:782px){table.wf-info-table{margin-top:10px}table.wf-info-table th:first-child img{margin:0 auto;display:block}.wapk-button.wapk-button-xl{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}}.wapk-feed-docs .wapk-feed-cta{margin:0}.campaign_configurator{background:#fff;padding:20px 0}.campaign_configurator table{margin:0 auto;width:51%;min-width:574px;border:none;box-shadow:none}.campaign_configurator th{min-width:120px}@media screen and (max-width:782px){.campaign_configurator{padding:0}.campaign_configurator table{width:auto;min-width:auto;max-width:100%}.campaign_configurator th{min-width:auto}}#wf-tab-content-config td>input:not([type=checkbox]):not([type=radio]),#wf-tab-content-config td>select,#wf-tab-content-config td>textarea{width:100%!important}.woo-feed-filters td>div:nth-child(2n):not(.clear):not(.selectize){width:120px;display:block}.woo-feed-filters td>div:not(.clear){float:left;margin-right:10px}.woo-feed-filters tr>td:first-child{width:290px;padding-left:40px}.woo-feed-filters,.woo-feed-ftp{margin:15px auto 25px}.wf_clean_cache_wrapper{display:-ms-flexbox;display:flex;margin-left:auto}@-webkit-keyframes LoaderClockWise{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes LoaderClockWise{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.woo-feed-cache-loader{width:18px;margin-right:5px;animation:LoaderClockWise 1s linear infinite;-webkit-animation:LoaderClockWise 1s linear infinite;display:none}.woo-feed-table-heading .woo-feed-table-heading-title{float:left;margin-right:auto;display:inline-block;line-height:30px}.woo-feed-table-heading .wf_clean_cache_wrapper{float:right;font-weight:400}.wf_clean_cache_wrapper button{background:linear-gradient(125deg,#eb4d4b 0,#ff9671 130%);color:#fff;border:none;font-weight:500;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;border-radius:3px;cursor:pointer;outline:0}.wf_clean_cache_wrapper button:hover{background:#ff7979;color:#fff}input[type=submit][data-id=wf_action_submit]{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);color:#fff;border:1px;padding:0 20px}input[type=submit][data-id=wf_action_submit]:hover{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);color:#fff}.woo-import-popup-body #TB_window{width:500px!important}.woo-import-popup-body #TB_window #TB_title{border:none;background:#fff;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:35px!important}.woo-import-popup-body #TB_window #TB_title #TB_ajaxWindowTitle{color:#30336b;font-weight:700}.woo-import-popup-body #TB_window #TB_closeWindowButton{top:-14.5px;right:-14.5px;border:none;outline:0}.woo-import-popup-body #TB_window #TB_closeWindowButton .tb-close-icon{background:#ff5e55;color:#fff;border-radius:50%}.woo-import-popup-body #TB_window #TB_closeWindowButton:focus{outline:0;border:0}.woo-import-popup-body #TB_window #TB_ajaxContent{position:relative;width:100%!important;height:auto!important;border:none;box-sizing:border-box;overflow:hidden;background:#f7fcff;padding:30px 20px}.woo-import-popup-body #TB_window #TB_ajaxContent:before{content:'';width:115%;display:block;background:#4bcffa;position:absolute;height:130%;z-index:0;left:-36%;top:-85px;-webkit-transform:rotate(115deg);transform:rotate(115deg)}.woo-import-popup-body #TB_window #TB_ajaxContent table{border:none;position:relative;z-index:1;border-radius:3px;text-align:center;padding:20px;box-shadow:0 12px 20px -17px #000}.woo-import-popup-body #TB_window #TB_ajaxContent table input{width:60%}.woo-import-popup-body #TB_window #TB_ajaxContent table input:focus{outline:2px solid #68b8f7}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=file]{padding:3px 0;cursor:pointer}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=text]{border-radius:25px;font-size:14px;padding:1px 20px;text-align:center}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=submit]{background:#17c0eb;border-radius:25px;border:0;box-shadow:1px 4px 7px -3px #45364a;font-weight:600;transition:.3s ease}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=submit]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px)}.woo-feed-notice .woo-feed-review-notice-logo{width:90px;height:90px;float:left;margin-right:5px;background:url(../images/woo-feed-logo.svg) no-repeat}.woo-feed-status-table-wrapper .woo-feed-status-table{width:100%;max-width:900px;border-collapse:collapse;border-spacing:.5rem;box-shadow:0 0 20px rgba(0,0,0,.1)}.woo-feed-status-table-wrapper .woo-feed-status-table tr:nth-child(even){background:#f1f1f1}.woo-feed-status-table-wrapper .woo-feed-status-table tr:nth-child(odd){background:#fafafc}.woo-feed-status-table-wrapper .woo-feed-status-table tr th{background:#353b48;color:#fff}.woo-feed-status-table-wrapper .woo-feed-status-table tr td,.woo-feed-status-table-wrapper .woo-feed-status-table tr th{padding:.5rem 20px;text-align:left}#taxonomy-woo-feed-brand #newwoo-feed-brand_parent,.taxonomy-woo-feed-brand .form-field.term-parent-wrap{display:none}.wapk-admin .switch{position:relative;display:inline-block;width:60px;height:34px}.wapk-admin .switch input{opacity:0;width:0;height:0}.wapk-admin .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.4s}.wapk-admin .slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;transition:.4s}.wapk-admin input:checked+.slider{background-color:#18c194}.wapk-admin input:focus+.slider{box-shadow:0 0 1px #2196f3}.wapk-admin input:checked+.slider:before{-webkit-transform:translateX(26px);transform:translateX(26px)}.wapk-admin .slider.round{border-radius:34px}.wapk-admin .slider.round:before{border-radius:50%}
|
admin/css/woo-feed-admin.scss
CHANGED
@@ -2014,4 +2014,65 @@ input {
|
|
2014 |
#taxonomy-woo-feed-brand #newwoo-feed-brand_parent,
|
2015 |
.taxonomy-woo-feed-brand .form-field.term-parent-wrap {
|
2016 |
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017 |
}
|
2014 |
#taxonomy-woo-feed-brand #newwoo-feed-brand_parent,
|
2015 |
.taxonomy-woo-feed-brand .form-field.term-parent-wrap {
|
2016 |
display: none;
|
2017 |
+
}
|
2018 |
+
|
2019 |
+
.wapk-admin {
|
2020 |
+
.switch {
|
2021 |
+
position: relative;
|
2022 |
+
display: inline-block;
|
2023 |
+
width: 60px;
|
2024 |
+
height: 34px;
|
2025 |
+
}
|
2026 |
+
|
2027 |
+
.switch input {
|
2028 |
+
opacity: 0;
|
2029 |
+
width: 0;
|
2030 |
+
height: 0;
|
2031 |
+
}
|
2032 |
+
|
2033 |
+
.slider {
|
2034 |
+
position: absolute;
|
2035 |
+
cursor: pointer;
|
2036 |
+
top: 0;
|
2037 |
+
left: 0;
|
2038 |
+
right: 0;
|
2039 |
+
bottom: 0;
|
2040 |
+
background-color: #ccc;
|
2041 |
+
-webkit-transition: .4s;
|
2042 |
+
transition: .4s;
|
2043 |
+
}
|
2044 |
+
|
2045 |
+
.slider:before {
|
2046 |
+
position: absolute;
|
2047 |
+
content: "";
|
2048 |
+
height: 26px;
|
2049 |
+
width: 26px;
|
2050 |
+
left: 4px;
|
2051 |
+
bottom: 4px;
|
2052 |
+
background-color: white;
|
2053 |
+
-webkit-transition: .4s;
|
2054 |
+
transition: .4s;
|
2055 |
+
}
|
2056 |
+
|
2057 |
+
input:checked + .slider {
|
2058 |
+
background-color: #18c194;
|
2059 |
+
}
|
2060 |
+
|
2061 |
+
input:focus + .slider {
|
2062 |
+
box-shadow: 0 0 1px #2196F3;
|
2063 |
+
}
|
2064 |
+
|
2065 |
+
input:checked + .slider:before {
|
2066 |
+
-webkit-transform: translateX(26px);
|
2067 |
+
-ms-transform: translateX(26px);
|
2068 |
+
transform: translateX(26px);
|
2069 |
+
}
|
2070 |
+
|
2071 |
+
.slider.round {
|
2072 |
+
border-radius: 34px;
|
2073 |
+
}
|
2074 |
+
|
2075 |
+
.slider.round:before {
|
2076 |
+
border-radius: 50%;
|
2077 |
+
}
|
2078 |
}
|
admin/js/fancy-select.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["fancy-select.js"],"names":["$","window","document","FancySelect","$select","options","self","settings","extend","defaults","optgroups","items","placeholder","delimiter","splitOn","persist","diacritics","create","createOnBlur","createFilter","highlight","openOnFocus","maxOptions","maxItems","maxItemShow","hideSelected","addPrecedence","selectOnTab","preload","allowEmptyOption","closeAfterSelect","scrollDuration","loadThrottle","loadingClass","dataAttr","optgroupField","valueField","labelField","disabledField","optgroupLabelField","optgroupValueField","lockOptgroupOrder","sortField","searchField","searchConjunction","mode","wrapperClass","inputClass","dropdownClass","dropdownContentClass","dropdownParent","copyClassesToDropdown","render","select","computedStyle","dir","attr","test","navigator","createElement","debounce","delay","timeout","optionsMap","optHelper","readData","$el","data","JSON","addOption","$option","group","value","hash_key","arr","isArray","field_optgroup","option","addGroup","$optgroup","i","n","id","optgroup","$options","tabIndex","tagType","rtl","multiple","eventNS","highlightedValue","isBlurring","isOpen","isDisabled","isRequired","isInvalid","isLocked","isFocused","isInputHidden","isSetup","isRendered","isShiftDown","isCmdDown","isCtrlDown","ignoreFocus","ignoreBlur","ignoreHover","hasOptions","currentResults","lastValue","caretPos","loading","loadedSearches","$activeOption","$activeItems","userOptions","renderCache","onSearchChange","args","fn","apply","children","length","tagName","addClass","$wrapper","width","appendTo","setup","$children","tabindex","hide","after","a","b","e","trigger","target","closest","preventDefault","current","selected","removeClass","getSelectedOptionData","filter","x","sort","$dropdownContent","find","updatePlaceholder","updateOriginalInput","getComputedStyle","hasOwnProperty","optClass","isSelected","this","dropdownItems","_loop","push","concat","group_options","item","ii","_i","html","join","placeholderData","originalPlaceholder","text","slice","forEach","dataPlaceholder","title","dataCountPlaceholder","removeAttr","changed","silent","input","destroy","append","revertSettings","removeData","$testInput","off","body","fancySelect","prototype","bind","event","fct","_events","unbind","indexOf","Array","call","arguments","user_options","jQuery"],"mappings":"AAAA,cAQA,SAACA,EAAAC,EAAAC,GAWIC,SAAJA,EAAeC,EAAAC,GACd,IAAAC,EAAIA,KAAJC,EAAAA,EA+CCA,QAAQC,EAAKA,GA/CdC,CAEEJ,QAAAA,GACAK,UAAAA,GACAC,MAAAA,GACAC,YAAAA,GACAC,UAAAA,IACAC,QAAAA,KACAC,SAAAA,EACAC,YAAAA,EACAC,QAAAA,EACAC,cAAAA,EACAC,aAAAA,KACAC,WAAAA,EACAC,aAAAA,EACAC,WAAAA,IACAC,SAAAA,KACAC,YAAAA,EACAC,aAAAA,KACAC,eAAAA,EACAC,aAAAA,EACAC,SAAAA,EACAC,kBAAAA,EACAC,kBAAAA,EACAC,eAAAA,GACAC,aAAAA,IACAC,aAAAA,UACAC,SAAAA,YACAC,cAAAA,WACAC,WAAAA,QACAC,WAAAA,OACAC,cAAAA,WACAC,mBAAAA,QACAC,mBAAAA,QACAC,mBAAAA,EACAC,UAAAA,SACAC,YAAAA,CAAAA,QACAC,kBAAAA,MACAC,KAAAA,KACAC,aAAAA,oBACAC,WAAAA,kBACAC,cAAAA,qBACAC,qBAAAA,6BACAC,eAAAA,KACAC,uBAAAA,EACAC,OAAAA,IAEU3C,GA/CZ4C,EAAAA,EAgDCA,IACDA,EAAAA,YAAAA,GACA/C,MAAAA,EACA,IAAAgD,EAAIA,EAAarD,kBAAAA,EAAGA,iBAA2BA,EAA3B,MACpBsD,EAAIA,EAAMD,EAAaA,iBAAGA,aAAhBA,EAAaD,cAAAA,EAAiDA,aAAuBA,UAC/FE,EAAAA,GAAMA,EAAGnD,QAAIA,eAAJoD,KAAIA,QAAV,GACHlD,EAAAA,cAAAA,EAE2B,WAAImD,KAAWA,EAAKx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L/K,EAAAA,SAA7BuH,SA4BH,KAAJ1H,EAAMA,OAAFA,EAA6BA,aA1BlCA,EAAAA,WAAAmL,SA4BEnL,EAAAA,gBAAYmL,GASbtL,EAAAA,GAAEC,IAAQsL,EAAIjL,SACdN,EAAAA,GAAEE,IAAUqL,EAAIjL,SAChBN,EAAAA,EAAEE,MAASsL,IAAMD,EAAIjL,gBACrBA,EAAOA,QAAKF,GAAQqL,eAXnBzL,EAAAQ,OAAAL,EAACuL,UAAD,CACDC,KAAA,SAAAC,EAAAC,GACAlC,KAAAmC,QAAAnC,KAAAmC,SAAA,GACAnC,KAAAmC,QAAAA,GAAAnC,KAAAmC,QAAAA,IAAA,GACAnC,KAAAmC,QAAAA,GAAAF,KAAA9B,IA4BDiC,OAAM,SAAGH,EAAAC,GACRlC,KAAAmC,QAAAnC,KAAemC,SAAA,GAzBf9L,KAAEC,KAAQsL,UAAT,GACDvL,KAAAA,QAAEE,GAAD0L,OAAetL,KAAKmF,QAArBqG,GAAAF,QAAAI,GAAqBvG,IAErB+C,QAAA,SAAAoD,GA1OF,GA2OEjC,KAAAmC,QAAAnC,KAAAmC,SAAA,GA3OFF,KAAAjC,KAAAmC,UAAA,EA+OA,IAAA,IAAA9G,EAAA,EAAAA,EAAA2E,KAAAmC,QAAAA,GAAAF,OAAAlE,IAyBGiC,KAAAmC,QAAKA,GAAQF,GAAbpE,MAAuBA,KAAMyE,MAAMA,UAAMP,MAAUjB,KAAMyB,UAAKC,OASjEnM,EAACuH,GAADkE,YAAA,SAAmBW,GAxBnBpM,OAAAA,KAAEQ,KAAOL,WACRwL,KAAAA,aACC,WAAAhC,KAAAhC,QAAeA,eACf,IAAAxH,EAAAA,EAAAwJ,MAAaiC,MApehB,CAseGS,OAL8BpM,OAAAC","file":"fancy-select.min.js","sourcesContent":["\"use strict\";\n/**!\n * WooFeed Fancy Select\n * @version 1.0.0\n * @copyright 2020 WebAppick\n * @author Kudratullah <mhamudul.hk@gmail.com>\n */\n\n(function($, window, document) {\n\t// @TODO if multiple select has required attribute and only one item is selected then return false (user should not able to deselect the last one).\n\t// @TODO make the place holder with input field like selectize so we can set the required attribute if the select has required attribute, which can be useful for showing required warning.\n\t\"use strict\";\n\t\n\t/**\n\t * FancySelect Constructor\n\t * @param {jQuery|HTMLElement} $select\n\t * @param {Object} [options]\n\t * @constructor\n\t */\n\tlet FancySelect = function FancySelect($select, options) {\n\t\tlet self = this,\n\t\t\tdefaults = {\n\t\t\t\toptions: [],\n\t\t\t\toptgroups: [],\n\t\t\t\titems: [],\n\t\t\t\tplaceholder: '',\n\t\t\t\tdelimiter: ',',\n\t\t\t\tsplitOn: null,\n\t\t\t\tpersist: !0,\n\t\t\t\tdiacritics: !0,\n\t\t\t\tcreate: !1,\n\t\t\t\tcreateOnBlur: !1,\n\t\t\t\tcreateFilter: null,\n\t\t\t\thighlight: !0,\n\t\t\t\topenOnFocus: !0,\n\t\t\t\tmaxOptions: 1e3,\n\t\t\t\tmaxItems: null,\n\t\t\t\tmaxItemShow: 3,\n\t\t\t\thideSelected: null,\n\t\t\t\taddPrecedence: !1,\n\t\t\t\tselectOnTab: !1,\n\t\t\t\tpreload: !1,\n\t\t\t\tallowEmptyOption: !1,\n\t\t\t\tcloseAfterSelect: !1,\n\t\t\t\tscrollDuration: 60,\n\t\t\t\tloadThrottle: 300,\n\t\t\t\tloadingClass: \"loading\",\n\t\t\t\tdataAttr: \"data-data\",\n\t\t\t\toptgroupField: \"optgroup\",\n\t\t\t\tvalueField: \"value\",\n\t\t\t\tlabelField: \"text\",\n\t\t\t\tdisabledField: \"disabled\",\n\t\t\t\toptgroupLabelField: \"label\",\n\t\t\t\toptgroupValueField: \"value\",\n\t\t\t\tlockOptgroupOrder: !1,\n\t\t\t\tsortField: \"$order\",\n\t\t\t\tsearchField: [\"text\"],\n\t\t\t\tsearchConjunction: \"and\",\n\t\t\t\tmode: null,\n\t\t\t\twrapperClass: \"selectize-control\",\n\t\t\t\tinputClass: \"selectize-input\",\n\t\t\t\tdropdownClass: \"selectize-dropdown\",\n\t\t\t\tdropdownContentClass: \"selectize-dropdown-content\",\n\t\t\t\tdropdownParent: null,\n\t\t\t\tcopyClassesToDropdown: !0,\n\t\t\t\trender: {}\n\t\t\t},\n\t\t\tsettings = $.extend(true, {}, defaults, options),\n\t\t\tselect = $select[0];\n\t\tselect.fancySelect = self;\n\t\tself.order = 0;\n\t\tlet computedStyle = window.getComputedStyle && window.getComputedStyle(select, null);\n\t\tlet dir = computedStyle ? computedStyle.getPropertyValue('direction') : select.currentStyle && select.currentStyle.direction;\n\t\tdir = dir || $select.parents('[dir]:first').attr('dir') || '';\n\t\tself.computedStyle = computedStyle; // for now, android support in general is too spotty to support validity\n\n\t\tconst SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !! document.createElement('input').validity; // helper (private) methods\n\n\t\tconst debounce = function (fn, delay) {\n\t\t\tlet timeout;\n\t\t\treturn function() {\n\t\t\t\tlet self = this;\n\t\t\t\tlet args = arguments;\n\t\t\t\twindow.clearTimeout(timeout);\n\t\t\t\ttimeout = window.setTimeout(function() {\n\t\t\t\t\tfn.apply(self, args);\n\t\t\t\t}, delay);\n\t\t\t};\n\t\t};\n\t\t\n\t\tlet optionsMap = {},\n\t\t\toptHelper = {\n\t\t\t\treadData: function ($el) {\n\t\t\t\t\tlet data = self.dataAttr && $el.attr(self.dataAttr);\n\n\t\t\t\t\tif (typeof data === 'string' && data.length) {\n\t\t\t\t\t\treturn JSON.parse(data);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t},\n\t\t\t\taddOption: function ($option, group) {\n\t\t\t\t\t$option = $($option);\n\t\t\t\t\tlet value = self.hash_key($option.val());\n\t\t\t\t\tif (!value && !settings.allowEmptyOption) return; // if the option already exists, it's probably been\n\t\t\t\t\t// duplicated in another optgroup. in this case, push\n\t\t\t\t\t// the current group to the \"optgroup\" property on the\n\t\t\t\t\t// existing option so that it's rendered in both places.\n\n\t\t\t\t\tif (optionsMap.hasOwnProperty(value)) {\n\t\t\t\t\t\tif (group) {\n\t\t\t\t\t\t\tlet arr = optionsMap[value][field_optgroup];\n\n\t\t\t\t\t\t\tif (!arr) {\n\t\t\t\t\t\t\t\toptionsMap[value][field_optgroup] = group;\n\t\t\t\t\t\t\t} else if (!$.isArray(arr)) {\n\t\t\t\t\t\t\t\toptionsMap[value][field_optgroup] = [arr, group];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tarr.push(group);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet option = optHelper.readData($option) || {};\n\t\t\t\t\toption[self.settings.labelField] = option[self.settings.labelField] || $option.text();\n\t\t\t\t\toption[self.settings.valueField] = option[self.settings.valueField] || value;\n\t\t\t\t\toption[self.settings.disabledField] = option[self.settings.disabledField] || $option.prop('disabled');\n\t\t\t\t\toption[self.settings.optgroupField] = option[self.settings.optgroupField] || group;\n\t\t\t\t\toption.$order = ++self.order;\n\t\t\t\t\toptionsMap[value] = option;\n\t\t\t\t\tself.settings.options.push(option);\n\n\t\t\t\t\tif ($option.is(':selected')) {\n\t\t\t\t\t\tself.settings.items.push(option);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\taddGroup: function ($optgroup) {\n\t\t\t\t\tlet i, n, id, optgroup, $options;\n\t\t\t\t\t$optgroup = $($optgroup);\n\t\t\t\t\tid = $optgroup.attr('label');\n\n\t\t\t\t\tif (id) {\n\t\t\t\t\t\toptgroup = optHelper.readData($optgroup) || {};\n\t\t\t\t\t\toptgroup[self.settings.optgroupLabelField] = id;\n\t\t\t\t\t\toptgroup[self.settings.optgroupValueField] = id;\n\t\t\t\t\t\toptgroup[self.settings.disabledField] = $optgroup.prop('disabled');\n\t\t\t\t\t\toptgroup.$order = ++self.order;\n\t\t\t\t\t\tself.settings.optgroups.push(optgroup);\n\t\t\t\t\t}\n\n\t\t\t\t\t$options = $('option', $optgroup);\n\n\t\t\t\t\tfor (i = 0, n = $options.length; i < n; i++) {\n\t\t\t\t\t\toptHelper.addOption($options[i], id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}; // setup default state\n\t\t\n\t\t$.extend(self, {\n\t\t\tsettings: settings,\n\t\t\t$select: $select,\n\t\t\ttabIndex: $select.attr('tabindex') || '',\n\t\t\ttagType: 1,\n\t\t\trtl: /rtl/i.test(dir),\n\t\t\tmultiple: $select.attr('multiple'),\n\t\t\teventNS: '.FancySelect' + ++FancySelect.count,\n\t\t\thighlightedValue: null,\n\t\t\tisBlurring: false,\n\t\t\tisOpen: false,\n\t\t\tisDisabled: false,\n\t\t\tisRequired: $select.is('[required]'),\n\t\t\tisInvalid: false,\n\t\t\tisLocked: false,\n\t\t\tisFocused: false,\n\t\t\tisInputHidden: false,\n\t\t\tisSetup: false,\n\t\t\tisRendered: false,\n\t\t\tisShiftDown: false,\n\t\t\tisCmdDown: false,\n\t\t\tisCtrlDown: false,\n\t\t\tignoreFocus: false,\n\t\t\tignoreBlur: false,\n\t\t\tignoreHover: false,\n\t\t\thasOptions: false,\n\t\t\tcurrentResults: null,\n\t\t\tlastValue: '',\n\t\t\tcaretPos: 0,\n\t\t\tloading: 0,\n\t\t\tloadedSearches: {},\n\t\t\t$activeOption: null,\n\t\t\t$activeItems: [],\n\t\t\toptgroups: {},\n\t\t\toptions: {},\n\t\t\tuserOptions: {},\n\t\t\titems: {},\n\t\t\trenderCache: {},\n\t\t\tonSearchChange: settings.loadThrottle === null ? self.onSearchChange : debounce(self.onSearchChange, settings.loadThrottle)\n\t\t});\n\n\t\tif ('' === self.settings.placeholder) {\n\t\t\tself.settings.placeholder = $select.attr('placeholder') || $select.attr('data-placeholder');\n\n\t\t\tif (!self.settings.placeholder && !self.settings.allowEmptyOption) {\n\t\t\t\tself.settings.placeholder = $select.children('option[value=\"\"]').text();\n\t\t\t}\n\t\t}\n\n\t\tself.settings.maxItems = self.multiple ? null : 1;\n\n\t\tfor (let i = 0, n = self.$select.children().length; i < n; i++) {\n\t\t\tlet tagName = self.$select.children()[i].tagName.toLowerCase();\n\n\t\t\tif (tagName === 'optgroup') {\n\t\t\t\toptHelper.addGroup(self.$select.children()[i]);\n\t\t\t} else if (tagName === 'option') {\n\t\t\t\toptHelper.addOption(self.$select.children()[i]);\n\t\t\t}\n\t\t}\n\n\t\tself.$wrapper = $('<div class=\"fancy-picker\">').addClass($select.attr('class'));\n\n\t\tif (self.computedStyle.hasOwnProperty('width')) {\n\t\t\tself.$wrapper.css({\n\t\t\t\twidth: self.computedStyle.width\n\t\t\t});\n\t\t}\n\t\t\n\t\tself.$outputWrapper = $('<div class=\"fancy-picker-picked\">').appendTo(self.$wrapper);\n\t\tself.originalPlaceholder = $('<span class=\"fancy-picker-placeholder\">').appendTo(self.$outputWrapper);\n\t\tself.dataPlaceholder = $('<span class=\"fancy-picker-data\">').appendTo(self.$outputWrapper);\n\t\tself.dataCountPlaceholder = $('<span class=\"fancy-picker-count\">').appendTo(self.$outputWrapper);\n\t\tself.$dropdown = $('<div class=\"fancy-picker-ui\">').appendTo(self.$wrapper);\n\t\tself.$dropdownContent = $('<div class=\"fancy-picker-content\">').appendTo(self.$dropdown);\n\t\tself.setup();\n\t};\n\n\tFancySelect.count = 0;\n\t// public methods.\n\t$.extend(FancySelect.prototype, {\n\t\t/**\n\t\t * Creates all elements and sets up event bindings.\n\t\t * @return {void}\n\t\t */\n\t\tsetup: function () {\n\t\t\tlet self = this;\n\t\t\tself.revertSettings = {\n\t\t\t\t$children: self.$select.children().detach(),\n\t\t\t\ttabindex: self.$select.attr('tabindex')\n\t\t\t};\n\t\t\tself.$select.attr('tabindex', -1).hide().after(self.$wrapper);\n\t\t\tself.$select.data('FancySelect', self);\n\t\t\tself.$select.addClass('FancySelectInit');\n\t\t\t\n\t\t\tself.settings.items.sort( ( a, b ) => a[self.settings.sortField] - b[self.settings.sortField] );\n\t\t\t\n\t\t\t\n\t\t\tif (self.preload) {\n\t\t\t\tself.render();\n\t\t\t}\n\t\t\t\n\t\t\tself.updatePlaceholder();\n\t\t\tself.updateOriginalInput();\n\t\t\t\n\t\t\tself.$wrapper.on('click' + self.eventNS, '.fancy-picker-picked', function(e) {\n\t\t\t\tself.$select.trigger('show');\n\t\t\t\t\n\t\t\t\tif (!self.isRendered) {\n\t\t\t\t\tself.render();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tself.$wrapper.toggleClass('active');\n\t\t\t\tself.$select.trigger('shown');\n\t\t\t});\n\t\t\t$(document).on('click' + self.eventNS, function(e) {\n\t\t\t\tif (!$(e.target).closest(self.$wrapper).length) {\n\t\t\t\t\tself.$select.trigger('hide');\n\t\t\t\t\tself.$wrapper.removeClass('active');\n\t\t\t\t\tself.$select.trigger('hidden');\n\t\t\t\t}\n\t\t\t});\n\t\t\tself.$wrapper.on('click' + self.eventNS, '.fancy-picker-option:not(.disabled)', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tlet current = $(this),\n\t\t\t\t\tselected = false,\n\t\t\t\t\tvalue = self.hash_key(current.data('value'));\n\t\t\t\t\n\t\t\t\tif (self.multiple) {\n\t\t\t\t\tif (!current.hasClass('selected')) {\n\t\t\t\t\t\tselected = true;\n\t\t\t\t\t\tcurrent.addClass('selected');\n\t\t\t\t\t} else current.removeClass('selected');\n\t\t\t\t\t\n\t\t\t\t\tif (selected) {\n\t\t\t\t\t\tself.settings.items.push( self.getSelectedOptionData( value ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.settings.items = self.settings.items.filter( x => x[self.settings.valueField] !== value );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tself.settings.items.sort( ( a, b ) => a[self.settings.sortField] - b[self.settings.sortField] );\n\t\t\t\t} else {\n\t\t\t\t\tself.$dropdownContent.find('.fancy-picker-option').not(current).removeClass('selected');\n\t\t\t\t\tcurrent.addClass('selected');\n\t\t\t\t\tselected = true;\n\t\t\t\t\tself.settings.items = [ self.getSelectedOptionData( value ) ];\n\t\t\t\t\tself.$wrapper.removeClass('active');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tself.updatePlaceholder();\n\t\t\t\tself.updateOriginalInput();\n\t\t\t});\n\t\t\t$(window).on('resize' + self.eventNS, function() {\n\t\t\t\tlet computedStyle = window.getComputedStyle && window.getComputedStyle(self.$select[0], null);\n\t\t\t\t\n\t\t\t\tif (computedStyle.hasOwnProperty('width')) {\n\t\t\t\t\tself.$wrapper.css({\n\t\t\t\t\t\twidth: computedStyle.width\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t\tself.$select.trigger('initialize');\n\t\t},\n\t\t/**\n\t\t * Render The FancySelect UI\n\t\t * @return {void}\n\t\t */\n\t\trender: function () {\n\t\t\tlet self = this,\n\t\t\t\tdropdownItems = [];\n\t\t\tconst optgroup = self.settings.optgroups;\n\t\t\tconst options = self.settings.options;\n\t\t\tconst optClass = ( value ) => self.isSelected(value) ? 'fancy-picker-option selected' : 'fancy-picker-option';\n\t\t\tif ( optgroup.length ) {\n\t\t\t\tfor ( let i = 0; i < optgroup.length; i++ ) {\n\t\t\t\t\tdropdownItems.push( `<div class=\"fancy-picker-option-group\">` );\n\t\t\t\t\tdropdownItems.push( `<div class=\"fancy-picker-option-group-label\">${optgroup[i][self.settings.labelField]}</div>` );\n\t\t\t\t\tconst group_options = options.filter( item => item[self.settings.optgroupField] === optgroup[i][self.settings.valueField]);\n\t\t\t\t\tfor (let ii = 0; ii < group_options.length; ii++ ) {\n\t\t\t\t\t\tlet option = group_options[i];\n\t\t\t\t\t\tdropdownItems.push( `<div class=\"${optClass( option[self.settings.valueField] )}\" data-value=\"${option[self.settings.valueField]}\">${option[self.settings.labelField]}</div>` );\n\t\t\t\t\t}\n\t\t\t\t\tdropdownItems.push( `</div>` );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (let i = 0; i < options.length; i++) {\n\t\t\t\t\tlet option = options[i];\n\t\t\t\t\tdropdownItems.push( `<div class=\"${optClass( option[self.settings.valueField] )}\" data-value=\"${option[self.settings.valueField]}\">${option[self.settings.labelField]}</div>` );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tself.$dropdownContent.html(dropdownItems.join(''));\n\t\t\tself.$select.trigger('rendered');\n\t\t\tself.isRendered = true;\n\t\t},\n\t\t/**\n\t\t * Set Placeholder & Update Selected Data Placeholder\n\t\t * @return {FancySelect}\n\t\t */\n\t\tupdatePlaceholder: function () {\n\t\t\tlet self = this,\n\t\t\t\tplaceholderData = [];\n\t\t\tconst items = self.settings.items;\n\t\t\tconst maxItemShow = items.length > self.settings.maxItemShow ? self.settings.maxItemShow - 1 : self.settings.maxItemShow;\n\t\t\tself.originalPlaceholder.text(self.settings.placeholder);\n\t\t\t\n\t\t\tif (items.length) {\n\t\t\t\tself.originalPlaceholder.hide();\n\t\t\t} else {\n\t\t\t\tself.originalPlaceholder.show();\n\t\t\t}\n\t\t\t\n\t\t\titems.slice(0, maxItemShow).forEach( (item) => {\n\t\t\t\tplaceholderData.push( `<span>${item[self.settings.labelField]}</span>` );\n\t\t\t});\n\t\t\tself.dataPlaceholder.html( placeholderData.join( `<span class=\"fancy-picker-separator\">${self.settings.delimiter}</span>` ) );\n\t\t\t\n\t\t\tif (items.length > self.settings.maxItemShow) {\n\t\t\t\tlet title = [];\n\t\t\t\titems.forEach( (item) => {\n\t\t\t\t\ttitle.push(item[self.settings.labelField]);\n\t\t\t\t});\n\t\t\t\tself.dataCountPlaceholder.attr('title', title.join(self.settings.delimiter.trim() + ' '));\n\t\t\t\tself.dataCountPlaceholder.html('+' + (items.length - maxItemShow) + ' More …');\n\t\t\t} else {\n\t\t\t\tself.dataCountPlaceholder.removeAttr('title');\n\t\t\t\tself.dataCountPlaceholder.html('');\n\t\t\t}\n\t\t\t\n\t\t\tself.$select.trigger('placeholderChanged');\n\t\t\treturn self;\n\t\t},\n\t\t/**\n\t\t * Update The Original Select Tag\n\t\t * @param {boolean} ?silent\n\t\t * @return {FancySelect}\n\t\t */\n\t\tupdateOriginalInput: function (silent) {\n\t\t\tlet self = this,\n\t\t\t\toptions = [],\n\t\t\t\tchanged = false;\n\t\t\tsilent = true === silent ? true : false;\n\t\t\tconst items = self.settings.items;\n\t\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\t\toptions.push('<option value=\"' + items[i][self.settings.valueField] + '\" selected=\"selected\">' + items[i][self.settings.labelField] || '' + '</option>');\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t\t\n\t\t\tself.$select.html(options.join(''));\n\t\t\t\n\t\t\tif (!silent && changed) {\n\t\t\t\tself.$select.trigger('change');\n\t\t\t}\n\t\t\treturn self;\n\t\t},\n\t\t/**\n\t\t * Get Selected Option Data (value, label, etc.)\n\t\t * @param {string} hash_key\n\t\t * @return {object|boolean}\n\t\t */\n\t\tgetSelectedOptionData: function (hash_key) {\n\t\t\tlet self = this,\n\t\t\t\tselected = self.settings.options.filter( x => x[self.settings.valueField] === hash_key );\n\t\t\treturn selected.length ? selected[0] : false;\n\t\t},\n\t\t/**\n\t\t * Check if input is selected (in the items list )\n\t\t * @param {string} hash_key\n\t\t * @return {boolean}\n\t\t */\n\t\tisSelected: function (hash_key) {\n\t\t\tlet self = this;\n\t\t\treturn self.settings.items.filter( x => x[self.settings.valueField] === hash_key ).length > 0;\n\t\t},\n\t\t/**\n\t\t * Convert input to it's best string representation.\n\t\t * @param {string|*} input\n\t\t * @return {string}\n\t\t */\n\t\thash_key: (input) => input + '',\n\t\t/**\n\t\t * Completely destroys the control and\n\t\t * unbinds all event listeners so that it can\n\t\t * be garbage collected.\n\t\t */\n\t\tdestroy: function () {\n\t\t\tlet self = this;\n\t\t\tself.$select.trigger('destroy');\n\t\t\tself.trigger('destroy');\n\t\t\tself.off();\n\t\t\tself.$select\n\t\t\t\t.html('')\n\t\t\t\t.append(self.revertSettings.$children)\n\t\t\t\t.removeAttr('tabindex')\n\t\t\t\t.removeClass('FancySelectInit')\n\t\t\t\t.attr({tabindex: self.revertSettings.tabindex})\n\t\t\t\t.show();\n\t\t\tself.$select.removeData('FancySelect');\n\t\t\tself.$wrapper.remove();\n\t\t\t\n\t\t\tif (--FancySelect.count === 0 && FancySelect.$testInput) {\n\t\t\t\tFancySelect.$testInput.remove();\n\t\t\t\tFancySelect.$testInput = undefined;\n\t\t\t} // this doesn't fire on create feed. as fields are loaded via ajax.\n\t\t\t// add custom event with the form object (with namespace)\n\t\t\t// trigger event on form.init()\n\t\t\t// remove previous listener on from.init(). first. so multiple listener not executed.\n\t\t\t// see selectize https://github.com/selectize/selectize.js/blob/master/src/selectize.js#L2097\n\t\t\t// add event listener here...\n\t\t\t\n\t\t\t\n\t\t\t$(window).off(self.eventNS);\n\t\t\t$(document).off(self.eventNS);\n\t\t\t$(document.body).off(self.eventNS);\n\t\t\tdelete self.$select[0].fancySelect;\n\t\t},\n\t\t\n\t});\n\t\n\t/**\n\t * MicroEvent - to make any js object an event emitter\n\t *\n\t * - pure javascript - server compatible, browser compatible\n\t * - dont rely on the browser doms\n\t * - super simple - you get it immediatly, no mistery, no magic involved\n\t *\n\t * @author Jerome Etienne (https://github.com/jeromeetienne)\n\t * @link https://github.com/jeromeetienne/microevent.js\n\t */\n\t$.extend(FancySelect.prototype, {\n\t\tbind\t: function(event, fct){\n\t\t\tthis._events = this._events || {};\n\t\t\tthis._events[event] = this._events[event]\t|| [];\n\t\t\tthis._events[event].push(fct);\n\t\t},\n\t\tunbind\t: function(event, fct){\n\t\t\tthis._events = this._events || {};\n\t\t\tif( event in this._events === false )\treturn;\n\t\t\tthis._events[event].splice(this._events[event].indexOf(fct), 1);\n\t\t},\n\t\ttrigger\t: function(event /* , args... */){\n\t\t\tthis._events = this._events || {};\n\t\t\tif( event in this._events === false )\treturn;\n\t\t\tfor(let i = 0; i < this._events[event].length; i++){\n\t\t\t\tthis._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));\n\t\t\t}\n\t\t}\n\t});\n\t/**\n\t * jQuery Wrapper\n\t * @param {Object} [user_options]\n\t * @returns {jquery|HTMLElement}\n\t */\n\t$.fn.fancySelect = function(user_options) {\n\t\treturn this.each(function() {\n\t\t\tif (this.fancySelect) return;\n\t\t\tif ('select' !== this.tagName.toLowerCase()) return;\n\t\t\tnew FancySelect($(this), user_options);\n\t\t});\n\t};\n})(jQuery, window, document);\n"]}
|
1 |
+
{"version":3,"sources":["fancy-select.js"],"names":["$","window","document","FancySelect","$select","options","self","settings","extend","defaults","optgroups","items","placeholder","delimiter","splitOn","persist","diacritics","create","createOnBlur","createFilter","highlight","openOnFocus","maxOptions","maxItems","maxItemShow","hideSelected","addPrecedence","selectOnTab","preload","allowEmptyOption","closeAfterSelect","scrollDuration","loadThrottle","loadingClass","dataAttr","optgroupField","valueField","labelField","disabledField","optgroupLabelField","optgroupValueField","lockOptgroupOrder","sortField","searchField","searchConjunction","mode","wrapperClass","inputClass","dropdownClass","dropdownContentClass","dropdownParent","copyClassesToDropdown","render","select","computedStyle","dir","attr","test","navigator","createElement","debounce","delay","timeout","optionsMap","optHelper","readData","$el","data","JSON","addOption","$option","group","value","hash_key","arr","isArray","field_optgroup","option","addGroup","$optgroup","i","n","id","optgroup","$options","tabIndex","tagType","rtl","multiple","eventNS","highlightedValue","isBlurring","isOpen","isDisabled","isRequired","isInvalid","isLocked","isFocused","isInputHidden","isSetup","isRendered","isShiftDown","isCmdDown","isCtrlDown","ignoreFocus","ignoreBlur","ignoreHover","hasOptions","currentResults","lastValue","caretPos","loading","loadedSearches","$activeOption","$activeItems","userOptions","renderCache","onSearchChange","args","fn","apply","children","length","tagName","addClass","$wrapper","width","appendTo","setup","$children","tabindex","hide","after","a","b","e","trigger","target","closest","preventDefault","current","selected","removeClass","getSelectedOptionData","filter","x","sort","$dropdownContent","find","updatePlaceholder","updateOriginalInput","getComputedStyle","hasOwnProperty","optClass","isSelected","this","dropdownItems","_loop","push","concat","group_options","item","ii","_i","html","join","placeholderData","originalPlaceholder","text","slice","forEach","dataPlaceholder","title","dataCountPlaceholder","removeAttr","changed","silent","input","destroy","append","revertSettings","removeData","$testInput","off","body","fancySelect","prototype","bind","event","fct","_events","unbind","indexOf","Array","call","arguments","user_options","jQuery"],"mappings":"AAAA,cAQA,SAACA,EAAAC,EAAAC,GAWIC,SAAJA,EAAeC,EAAAC,GACd,IAAAC,EAAIA,KAAJC,EAAAA,EA+CCA,QAAQC,EAAKA,GA/CdC,CAEEJ,QAAAA,GACAK,UAAAA,GACAC,MAAAA,GACAC,YAAAA,GACAC,UAAAA,IACAC,QAAAA,KACAC,SAAAA,EACAC,YAAAA,EACAC,QAAAA,EACAC,cAAAA,EACAC,aAAAA,KACAC,WAAAA,EACAC,aAAAA,EACAC,WAAAA,IACAC,SAAAA,KACAC,YAAAA,EACAC,aAAAA,KACAC,eAAAA,EACAC,aAAAA,EACAC,SAAAA,EACAC,kBAAAA,EACAC,kBAAAA,EACAC,eAAAA,GACAC,aAAAA,IACAC,aAAAA,UACAC,SAAAA,YACAC,cAAAA,WACAC,WAAAA,QACAC,WAAAA,OACAC,cAAAA,WACAC,mBAAAA,QACAC,mBAAAA,QACAC,mBAAAA,EACAC,UAAAA,SACAC,YAAAA,CAAAA,QACAC,kBAAAA,MACAC,KAAAA,KACAC,aAAAA,oBACAC,WAAAA,kBACAC,cAAAA,qBACAC,qBAAAA,6BACAC,eAAAA,KACAC,uBAAAA,EACAC,OAAAA,IAEU3C,GA/CZ4C,EAAAA,EAgDCA,IACDA,EAAAA,YAAAA,GACA/C,MAAAA,EACA,IAAAgD,EAAIA,EAAarD,kBAAAA,EAAGA,iBAA2BA,EAA3B,MACpBsD,EAAIA,EAAMD,EAAaA,iBAAGA,aAAhBA,EAAaD,cAAAA,EAAiDA,aAAuBA,UAC/FE,EAAAA,GAAMA,EAAGnD,QAAIA,eAAJoD,KAAIA,QAAV,GACHlD,EAAAA,cAAAA,EAE2B,WAAImD,KAAWA,EAAKxD,UAAOyD,YAAyBxD,EAAWyD,cAATzD,SAAAA,SAAjF,IAEM0D,EAAWC,EAChBC,EAWDC,EAAIA,GA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BEnL,EAAAA,gBAAYmL,GASbtL,EAAAA,GAAEC,IAAQsL,EAAIjL,SACdN,EAAAA,GAAEE,IAAUqL,EAAIjL,SAChBN,EAAAA,EAAEE,MAASsL,IAAMD,EAAIjL,gBACrBA,EAAOA,QAAKF,GAAQqL,eAXnBzL,EAAAQ,OAAAL,EAACuL,UAAD,CACDC,KAAA,SAAAC,EAAAC,GACAlC,KAAAmC,QAAAnC,KAAAmC,SAAA,GACAnC,KAAAmC,QAAAA,GAAAnC,KAAAmC,QAAAA,IAAA,GACAnC,KAAAmC,QAAAA,GAAAF,KAAA9B,IA4BDiC,OAAM,SAAGH,EAAAC,GACRlC,KAAAmC,QAAAnC,KAAemC,SAAA,GAzBf9L,KAAEC,KAAQsL,UAAT,GACDvL,KAAAA,QAAEE,GAAD0L,OAAetL,KAAKmF,QAArBqG,GAAAF,QAAAI,GAAqBvG,IAErB+C,QAAA,SAAAoD,GA1OF,GA2OEjC,KAAAmC,QAAAnC,KAAAmC,SAAA,GA3OFF,KAAAjC,KAAAmC,UAAA,EA+OA,IAAA,IAAA9G,EAAA,EAAAA,EAAA2E,KAAAmC,QAAAA,GAAAF,OAAAlE,IAyBGiC,KAAAmC,QAAKA,GAAQF,GAAbpE,MAAuBA,KAAMyE,MAAMA,UAAMP,MAAUjB,KAAMyB,UAAKC,OASjEnM,EAACuH,GAADkE,YAAA,SAAmBW,GAxBnBpM,OAAAA,KAAEQ,KAAOL,WACRwL,KAAAA,aACC,WAAAhC,KAAAhC,QAAeA,eACf,IAAAxH,EAAAA,EAAAwJ,MAAaiC,MApehB,CAseGS,OAL8BpM,OAAAC","file":"fancy-select.min.js","sourcesContent":["\"use strict\";\r\n/**!\r\n * WooFeed Fancy Select\r\n * @version 1.0.0\r\n * @copyright 2020 WebAppick\r\n * @author Kudratullah <mhamudul.hk@gmail.com>\r\n */\r\n\r\n(function($, window, document) {\r\n\t// @TODO if multiple select has required attribute and only one item is selected then return false (user should not able to deselect the last one).\r\n\t// @TODO make the place holder with input field like selectize so we can set the required attribute if the select has required attribute, which can be useful for showing required warning.\r\n\t\"use strict\";\r\n\t\r\n\t/**\r\n\t * FancySelect Constructor\r\n\t * @param {jQuery|HTMLElement} $select\r\n\t * @param {Object} [options]\r\n\t * @constructor\r\n\t */\r\n\tlet FancySelect = function FancySelect($select, options) {\r\n\t\tlet self = this,\r\n\t\t\tdefaults = {\r\n\t\t\t\toptions: [],\r\n\t\t\t\toptgroups: [],\r\n\t\t\t\titems: [],\r\n\t\t\t\tplaceholder: '',\r\n\t\t\t\tdelimiter: ',',\r\n\t\t\t\tsplitOn: null,\r\n\t\t\t\tpersist: !0,\r\n\t\t\t\tdiacritics: !0,\r\n\t\t\t\tcreate: !1,\r\n\t\t\t\tcreateOnBlur: !1,\r\n\t\t\t\tcreateFilter: null,\r\n\t\t\t\thighlight: !0,\r\n\t\t\t\topenOnFocus: !0,\r\n\t\t\t\tmaxOptions: 1e3,\r\n\t\t\t\tmaxItems: null,\r\n\t\t\t\tmaxItemShow: 3,\r\n\t\t\t\thideSelected: null,\r\n\t\t\t\taddPrecedence: !1,\r\n\t\t\t\tselectOnTab: !1,\r\n\t\t\t\tpreload: !1,\r\n\t\t\t\tallowEmptyOption: !1,\r\n\t\t\t\tcloseAfterSelect: !1,\r\n\t\t\t\tscrollDuration: 60,\r\n\t\t\t\tloadThrottle: 300,\r\n\t\t\t\tloadingClass: \"loading\",\r\n\t\t\t\tdataAttr: \"data-data\",\r\n\t\t\t\toptgroupField: \"optgroup\",\r\n\t\t\t\tvalueField: \"value\",\r\n\t\t\t\tlabelField: \"text\",\r\n\t\t\t\tdisabledField: \"disabled\",\r\n\t\t\t\toptgroupLabelField: \"label\",\r\n\t\t\t\toptgroupValueField: \"value\",\r\n\t\t\t\tlockOptgroupOrder: !1,\r\n\t\t\t\tsortField: \"$order\",\r\n\t\t\t\tsearchField: [\"text\"],\r\n\t\t\t\tsearchConjunction: \"and\",\r\n\t\t\t\tmode: null,\r\n\t\t\t\twrapperClass: \"selectize-control\",\r\n\t\t\t\tinputClass: \"selectize-input\",\r\n\t\t\t\tdropdownClass: \"selectize-dropdown\",\r\n\t\t\t\tdropdownContentClass: \"selectize-dropdown-content\",\r\n\t\t\t\tdropdownParent: null,\r\n\t\t\t\tcopyClassesToDropdown: !0,\r\n\t\t\t\trender: {}\r\n\t\t\t},\r\n\t\t\tsettings = $.extend(true, {}, defaults, options),\r\n\t\t\tselect = $select[0];\r\n\t\tselect.fancySelect = self;\r\n\t\tself.order = 0;\r\n\t\tlet computedStyle = window.getComputedStyle && window.getComputedStyle(select, null);\r\n\t\tlet dir = computedStyle ? computedStyle.getPropertyValue('direction') : select.currentStyle && select.currentStyle.direction;\r\n\t\tdir = dir || $select.parents('[dir]:first').attr('dir') || '';\r\n\t\tself.computedStyle = computedStyle; // for now, android support in general is too spotty to support validity\r\n\r\n\t\tconst SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !! document.createElement('input').validity; // helper (private) methods\r\n\r\n\t\tconst debounce = function (fn, delay) {\r\n\t\t\tlet timeout;\r\n\t\t\treturn function() {\r\n\t\t\t\tlet self = this;\r\n\t\t\t\tlet args = arguments;\r\n\t\t\t\twindow.clearTimeout(timeout);\r\n\t\t\t\ttimeout = window.setTimeout(function() {\r\n\t\t\t\t\tfn.apply(self, args);\r\n\t\t\t\t}, delay);\r\n\t\t\t};\r\n\t\t};\r\n\t\t\r\n\t\tlet optionsMap = {},\r\n\t\t\toptHelper = {\r\n\t\t\t\treadData: function ($el) {\r\n\t\t\t\t\tlet data = self.dataAttr && $el.attr(self.dataAttr);\r\n\r\n\t\t\t\t\tif (typeof data === 'string' && data.length) {\r\n\t\t\t\t\t\treturn JSON.parse(data);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t},\r\n\t\t\t\taddOption: function ($option, group) {\r\n\t\t\t\t\t$option = $($option);\r\n\t\t\t\t\tlet value = self.hash_key($option.val());\r\n\t\t\t\t\tif (!value && !settings.allowEmptyOption) return; // if the option already exists, it's probably been\r\n\t\t\t\t\t// duplicated in another optgroup. in this case, push\r\n\t\t\t\t\t// the current group to the \"optgroup\" property on the\r\n\t\t\t\t\t// existing option so that it's rendered in both places.\r\n\r\n\t\t\t\t\tif (optionsMap.hasOwnProperty(value)) {\r\n\t\t\t\t\t\tif (group) {\r\n\t\t\t\t\t\t\tlet arr = optionsMap[value][field_optgroup];\r\n\r\n\t\t\t\t\t\t\tif (!arr) {\r\n\t\t\t\t\t\t\t\toptionsMap[value][field_optgroup] = group;\r\n\t\t\t\t\t\t\t} else if (!$.isArray(arr)) {\r\n\t\t\t\t\t\t\t\toptionsMap[value][field_optgroup] = [arr, group];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tarr.push(group);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet option = optHelper.readData($option) || {};\r\n\t\t\t\t\toption[self.settings.labelField] = option[self.settings.labelField] || $option.text();\r\n\t\t\t\t\toption[self.settings.valueField] = option[self.settings.valueField] || value;\r\n\t\t\t\t\toption[self.settings.disabledField] = option[self.settings.disabledField] || $option.prop('disabled');\r\n\t\t\t\t\toption[self.settings.optgroupField] = option[self.settings.optgroupField] || group;\r\n\t\t\t\t\toption.$order = ++self.order;\r\n\t\t\t\t\toptionsMap[value] = option;\r\n\t\t\t\t\tself.settings.options.push(option);\r\n\r\n\t\t\t\t\tif ($option.is(':selected')) {\r\n\t\t\t\t\t\tself.settings.items.push(option);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\taddGroup: function ($optgroup) {\r\n\t\t\t\t\tlet i, n, id, optgroup, $options;\r\n\t\t\t\t\t$optgroup = $($optgroup);\r\n\t\t\t\t\tid = $optgroup.attr('label');\r\n\r\n\t\t\t\t\tif (id) {\r\n\t\t\t\t\t\toptgroup = optHelper.readData($optgroup) || {};\r\n\t\t\t\t\t\toptgroup[self.settings.optgroupLabelField] = id;\r\n\t\t\t\t\t\toptgroup[self.settings.optgroupValueField] = id;\r\n\t\t\t\t\t\toptgroup[self.settings.disabledField] = $optgroup.prop('disabled');\r\n\t\t\t\t\t\toptgroup.$order = ++self.order;\r\n\t\t\t\t\t\tself.settings.optgroups.push(optgroup);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$options = $('option', $optgroup);\r\n\r\n\t\t\t\t\tfor (i = 0, n = $options.length; i < n; i++) {\r\n\t\t\t\t\t\toptHelper.addOption($options[i], id);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}; // setup default state\r\n\t\t\r\n\t\t$.extend(self, {\r\n\t\t\tsettings: settings,\r\n\t\t\t$select: $select,\r\n\t\t\ttabIndex: $select.attr('tabindex') || '',\r\n\t\t\ttagType: 1,\r\n\t\t\trtl: /rtl/i.test(dir),\r\n\t\t\tmultiple: $select.attr('multiple'),\r\n\t\t\teventNS: '.FancySelect' + ++FancySelect.count,\r\n\t\t\thighlightedValue: null,\r\n\t\t\tisBlurring: false,\r\n\t\t\tisOpen: false,\r\n\t\t\tisDisabled: false,\r\n\t\t\tisRequired: $select.is('[required]'),\r\n\t\t\tisInvalid: false,\r\n\t\t\tisLocked: false,\r\n\t\t\tisFocused: false,\r\n\t\t\tisInputHidden: false,\r\n\t\t\tisSetup: false,\r\n\t\t\tisRendered: false,\r\n\t\t\tisShiftDown: false,\r\n\t\t\tisCmdDown: false,\r\n\t\t\tisCtrlDown: false,\r\n\t\t\tignoreFocus: false,\r\n\t\t\tignoreBlur: false,\r\n\t\t\tignoreHover: false,\r\n\t\t\thasOptions: false,\r\n\t\t\tcurrentResults: null,\r\n\t\t\tlastValue: '',\r\n\t\t\tcaretPos: 0,\r\n\t\t\tloading: 0,\r\n\t\t\tloadedSearches: {},\r\n\t\t\t$activeOption: null,\r\n\t\t\t$activeItems: [],\r\n\t\t\toptgroups: {},\r\n\t\t\toptions: {},\r\n\t\t\tuserOptions: {},\r\n\t\t\titems: {},\r\n\t\t\trenderCache: {},\r\n\t\t\tonSearchChange: settings.loadThrottle === null ? self.onSearchChange : debounce(self.onSearchChange, settings.loadThrottle)\r\n\t\t});\r\n\r\n\t\tif ('' === self.settings.placeholder) {\r\n\t\t\tself.settings.placeholder = $select.attr('placeholder') || $select.attr('data-placeholder');\r\n\r\n\t\t\tif (!self.settings.placeholder && !self.settings.allowEmptyOption) {\r\n\t\t\t\tself.settings.placeholder = $select.children('option[value=\"\"]').text();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tself.settings.maxItems = self.multiple ? null : 1;\r\n\r\n\t\tfor (let i = 0, n = self.$select.children().length; i < n; i++) {\r\n\t\t\tlet tagName = self.$select.children()[i].tagName.toLowerCase();\r\n\r\n\t\t\tif (tagName === 'optgroup') {\r\n\t\t\t\toptHelper.addGroup(self.$select.children()[i]);\r\n\t\t\t} else if (tagName === 'option') {\r\n\t\t\t\toptHelper.addOption(self.$select.children()[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tself.$wrapper = $('<div class=\"fancy-picker\">').addClass($select.attr('class'));\r\n\r\n\t\tif (self.computedStyle.hasOwnProperty('width')) {\r\n\t\t\tself.$wrapper.css({\r\n\t\t\t\twidth: self.computedStyle.width\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tself.$outputWrapper = $('<div class=\"fancy-picker-picked\">').appendTo(self.$wrapper);\r\n\t\tself.originalPlaceholder = $('<span class=\"fancy-picker-placeholder\">').appendTo(self.$outputWrapper);\r\n\t\tself.dataPlaceholder = $('<span class=\"fancy-picker-data\">').appendTo(self.$outputWrapper);\r\n\t\tself.dataCountPlaceholder = $('<span class=\"fancy-picker-count\">').appendTo(self.$outputWrapper);\r\n\t\tself.$dropdown = $('<div class=\"fancy-picker-ui\">').appendTo(self.$wrapper);\r\n\t\tself.$dropdownContent = $('<div class=\"fancy-picker-content\">').appendTo(self.$dropdown);\r\n\t\tself.setup();\r\n\t};\r\n\r\n\tFancySelect.count = 0;\r\n\t// public methods.\r\n\t$.extend(FancySelect.prototype, {\r\n\t\t/**\r\n\t\t * Creates all elements and sets up event bindings.\r\n\t\t * @return {void}\r\n\t\t */\r\n\t\tsetup: function () {\r\n\t\t\tlet self = this;\r\n\t\t\tself.revertSettings = {\r\n\t\t\t\t$children: self.$select.children().detach(),\r\n\t\t\t\ttabindex: self.$select.attr('tabindex')\r\n\t\t\t};\r\n\t\t\tself.$select.attr('tabindex', -1).hide().after(self.$wrapper);\r\n\t\t\tself.$select.data('FancySelect', self);\r\n\t\t\tself.$select.addClass('FancySelectInit');\r\n\t\t\t\r\n\t\t\tself.settings.items.sort( ( a, b ) => a[self.settings.sortField] - b[self.settings.sortField] );\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (self.preload) {\r\n\t\t\t\tself.render();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.updatePlaceholder();\r\n\t\t\tself.updateOriginalInput();\r\n\t\t\t\r\n\t\t\tself.$wrapper.on('click' + self.eventNS, '.fancy-picker-picked', function(e) {\r\n\t\t\t\tself.$select.trigger('show');\r\n\t\t\t\t\r\n\t\t\t\tif (!self.isRendered) {\r\n\t\t\t\t\tself.render();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tself.$wrapper.toggleClass('active');\r\n\t\t\t\tself.$select.trigger('shown');\r\n\t\t\t});\r\n\t\t\t$(document).on('click' + self.eventNS, function(e) {\r\n\t\t\t\tif (!$(e.target).closest(self.$wrapper).length) {\r\n\t\t\t\t\tself.$select.trigger('hide');\r\n\t\t\t\t\tself.$wrapper.removeClass('active');\r\n\t\t\t\t\tself.$select.trigger('hidden');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tself.$wrapper.on('click' + self.eventNS, '.fancy-picker-option:not(.disabled)', function(e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tlet current = $(this),\r\n\t\t\t\t\tselected = false,\r\n\t\t\t\t\tvalue = self.hash_key(current.data('value'));\r\n\t\t\t\t\r\n\t\t\t\tif (self.multiple) {\r\n\t\t\t\t\tif (!current.hasClass('selected')) {\r\n\t\t\t\t\t\tselected = true;\r\n\t\t\t\t\t\tcurrent.addClass('selected');\r\n\t\t\t\t\t} else current.removeClass('selected');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (selected) {\r\n\t\t\t\t\t\tself.settings.items.push( self.getSelectedOptionData( value ) );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tself.settings.items = self.settings.items.filter( x => x[self.settings.valueField] !== value );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.settings.items.sort( ( a, b ) => a[self.settings.sortField] - b[self.settings.sortField] );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself.$dropdownContent.find('.fancy-picker-option').not(current).removeClass('selected');\r\n\t\t\t\t\tcurrent.addClass('selected');\r\n\t\t\t\t\tselected = true;\r\n\t\t\t\t\tself.settings.items = [ self.getSelectedOptionData( value ) ];\r\n\t\t\t\t\tself.$wrapper.removeClass('active');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tself.updatePlaceholder();\r\n\t\t\t\tself.updateOriginalInput();\r\n\t\t\t});\r\n\t\t\t$(window).on('resize' + self.eventNS, function() {\r\n\t\t\t\tlet computedStyle = window.getComputedStyle && window.getComputedStyle(self.$select[0], null);\r\n\t\t\t\t\r\n\t\t\t\tif (computedStyle.hasOwnProperty('width')) {\r\n\t\t\t\t\tself.$wrapper.css({\r\n\t\t\t\t\t\twidth: computedStyle.width\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tself.$select.trigger('initialize');\r\n\t\t},\r\n\t\t/**\r\n\t\t * Render The FancySelect UI\r\n\t\t * @return {void}\r\n\t\t */\r\n\t\trender: function () {\r\n\t\t\tlet self = this,\r\n\t\t\t\tdropdownItems = [];\r\n\t\t\tconst optgroup = self.settings.optgroups;\r\n\t\t\tconst options = self.settings.options;\r\n\t\t\tconst optClass = ( value ) => self.isSelected(value) ? 'fancy-picker-option selected' : 'fancy-picker-option';\r\n\t\t\tif ( optgroup.length ) {\r\n\t\t\t\tfor ( let i = 0; i < optgroup.length; i++ ) {\r\n\t\t\t\t\tdropdownItems.push( `<div class=\"fancy-picker-option-group\">` );\r\n\t\t\t\t\tdropdownItems.push( `<div class=\"fancy-picker-option-group-label\">${optgroup[i][self.settings.labelField]}</div>` );\r\n\t\t\t\t\tconst group_options = options.filter( item => item[self.settings.optgroupField] === optgroup[i][self.settings.valueField]);\r\n\t\t\t\t\tfor (let ii = 0; ii < group_options.length; ii++ ) {\r\n\t\t\t\t\t\tlet option = group_options[i];\r\n\t\t\t\t\t\tdropdownItems.push( `<div class=\"${optClass( option[self.settings.valueField] )}\" data-value=\"${option[self.settings.valueField]}\">${option[self.settings.labelField]}</div>` );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdropdownItems.push( `</div>` );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (let i = 0; i < options.length; i++) {\r\n\t\t\t\t\tlet option = options[i];\r\n\t\t\t\t\tdropdownItems.push( `<div class=\"${optClass( option[self.settings.valueField] )}\" data-value=\"${option[self.settings.valueField]}\">${option[self.settings.labelField]}</div>` );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.$dropdownContent.html(dropdownItems.join(''));\r\n\t\t\tself.$select.trigger('rendered');\r\n\t\t\tself.isRendered = true;\r\n\t\t},\r\n\t\t/**\r\n\t\t * Set Placeholder & Update Selected Data Placeholder\r\n\t\t * @return {FancySelect}\r\n\t\t */\r\n\t\tupdatePlaceholder: function () {\r\n\t\t\tlet self = this,\r\n\t\t\t\tplaceholderData = [];\r\n\t\t\tconst items = self.settings.items;\r\n\t\t\tconst maxItemShow = items.length > self.settings.maxItemShow ? self.settings.maxItemShow - 1 : self.settings.maxItemShow;\r\n\t\t\tself.originalPlaceholder.text(self.settings.placeholder);\r\n\t\t\t\r\n\t\t\tif (items.length) {\r\n\t\t\t\tself.originalPlaceholder.hide();\r\n\t\t\t} else {\r\n\t\t\t\tself.originalPlaceholder.show();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\titems.slice(0, maxItemShow).forEach( (item) => {\r\n\t\t\t\tplaceholderData.push( `<span>${item[self.settings.labelField]}</span>` );\r\n\t\t\t});\r\n\t\t\tself.dataPlaceholder.html( placeholderData.join( `<span class=\"fancy-picker-separator\">${self.settings.delimiter}</span>` ) );\r\n\t\t\t\r\n\t\t\tif (items.length > self.settings.maxItemShow) {\r\n\t\t\t\tlet title = [];\r\n\t\t\t\titems.forEach( (item) => {\r\n\t\t\t\t\ttitle.push(item[self.settings.labelField]);\r\n\t\t\t\t});\r\n\t\t\t\tself.dataCountPlaceholder.attr('title', title.join(self.settings.delimiter.trim() + ' '));\r\n\t\t\t\tself.dataCountPlaceholder.html('+' + (items.length - maxItemShow) + ' More …');\r\n\t\t\t} else {\r\n\t\t\t\tself.dataCountPlaceholder.removeAttr('title');\r\n\t\t\t\tself.dataCountPlaceholder.html('');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.$select.trigger('placeholderChanged');\r\n\t\t\treturn self;\r\n\t\t},\r\n\t\t/**\r\n\t\t * Update The Original Select Tag\r\n\t\t * @param {boolean} ?silent\r\n\t\t * @return {FancySelect}\r\n\t\t */\r\n\t\tupdateOriginalInput: function (silent) {\r\n\t\t\tlet self = this,\r\n\t\t\t\toptions = [],\r\n\t\t\t\tchanged = false;\r\n\t\t\tsilent = true === silent ? true : false;\r\n\t\t\tconst items = self.settings.items;\r\n\t\t\tfor (let i = 0; i < items.length; i++) {\r\n\t\t\t\toptions.push('<option value=\"' + items[i][self.settings.valueField] + '\" selected=\"selected\">' + items[i][self.settings.labelField] || '' + '</option>');\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.$select.html(options.join(''));\r\n\t\t\t\r\n\t\t\tif (!silent && changed) {\r\n\t\t\t\tself.$select.trigger('change');\r\n\t\t\t}\r\n\t\t\treturn self;\r\n\t\t},\r\n\t\t/**\r\n\t\t * Get Selected Option Data (value, label, etc.)\r\n\t\t * @param {string} hash_key\r\n\t\t * @return {object|boolean}\r\n\t\t */\r\n\t\tgetSelectedOptionData: function (hash_key) {\r\n\t\t\tlet self = this,\r\n\t\t\t\tselected = self.settings.options.filter( x => x[self.settings.valueField] === hash_key );\r\n\t\t\treturn selected.length ? selected[0] : false;\r\n\t\t},\r\n\t\t/**\r\n\t\t * Check if input is selected (in the items list )\r\n\t\t * @param {string} hash_key\r\n\t\t * @return {boolean}\r\n\t\t */\r\n\t\tisSelected: function (hash_key) {\r\n\t\t\tlet self = this;\r\n\t\t\treturn self.settings.items.filter( x => x[self.settings.valueField] === hash_key ).length > 0;\r\n\t\t},\r\n\t\t/**\r\n\t\t * Convert input to it's best string representation.\r\n\t\t * @param {string|*} input\r\n\t\t * @return {string}\r\n\t\t */\r\n\t\thash_key: (input) => input + '',\r\n\t\t/**\r\n\t\t * Completely destroys the control and\r\n\t\t * unbinds all event listeners so that it can\r\n\t\t * be garbage collected.\r\n\t\t */\r\n\t\tdestroy: function () {\r\n\t\t\tlet self = this;\r\n\t\t\tself.$select.trigger('destroy');\r\n\t\t\tself.trigger('destroy');\r\n\t\t\tself.off();\r\n\t\t\tself.$select\r\n\t\t\t\t.html('')\r\n\t\t\t\t.append(self.revertSettings.$children)\r\n\t\t\t\t.removeAttr('tabindex')\r\n\t\t\t\t.removeClass('FancySelectInit')\r\n\t\t\t\t.attr({tabindex: self.revertSettings.tabindex})\r\n\t\t\t\t.show();\r\n\t\t\tself.$select.removeData('FancySelect');\r\n\t\t\tself.$wrapper.remove();\r\n\t\t\t\r\n\t\t\tif (--FancySelect.count === 0 && FancySelect.$testInput) {\r\n\t\t\t\tFancySelect.$testInput.remove();\r\n\t\t\t\tFancySelect.$testInput = undefined;\r\n\t\t\t} // this doesn't fire on create feed. as fields are loaded via ajax.\r\n\t\t\t// add custom event with the form object (with namespace)\r\n\t\t\t// trigger event on form.init()\r\n\t\t\t// remove previous listener on from.init(). first. so multiple listener not executed.\r\n\t\t\t// see selectize https://github.com/selectize/selectize.js/blob/master/src/selectize.js#L2097\r\n\t\t\t// add event listener here...\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$(window).off(self.eventNS);\r\n\t\t\t$(document).off(self.eventNS);\r\n\t\t\t$(document.body).off(self.eventNS);\r\n\t\t\tdelete self.$select[0].fancySelect;\r\n\t\t},\r\n\t\t\r\n\t});\r\n\t\r\n\t/**\r\n\t * MicroEvent - to make any js object an event emitter\r\n\t *\r\n\t * - pure javascript - server compatible, browser compatible\r\n\t * - dont rely on the browser doms\r\n\t * - super simple - you get it immediatly, no mistery, no magic involved\r\n\t *\r\n\t * @author Jerome Etienne (https://github.com/jeromeetienne)\r\n\t * @link https://github.com/jeromeetienne/microevent.js\r\n\t */\r\n\t$.extend(FancySelect.prototype, {\r\n\t\tbind\t: function(event, fct){\r\n\t\t\tthis._events = this._events || {};\r\n\t\t\tthis._events[event] = this._events[event]\t|| [];\r\n\t\t\tthis._events[event].push(fct);\r\n\t\t},\r\n\t\tunbind\t: function(event, fct){\r\n\t\t\tthis._events = this._events || {};\r\n\t\t\tif( event in this._events === false )\treturn;\r\n\t\t\tthis._events[event].splice(this._events[event].indexOf(fct), 1);\r\n\t\t},\r\n\t\ttrigger\t: function(event /* , args... */){\r\n\t\t\tthis._events = this._events || {};\r\n\t\t\tif( event in this._events === false )\treturn;\r\n\t\t\tfor(let i = 0; i < this._events[event].length; i++){\r\n\t\t\t\tthis._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\t/**\r\n\t * jQuery Wrapper\r\n\t * @param {Object} [user_options]\r\n\t * @returns {jquery|HTMLElement}\r\n\t */\r\n\t$.fn.fancySelect = function(user_options) {\r\n\t\treturn this.each(function() {\r\n\t\t\tif (this.fancySelect) return;\r\n\t\t\tif ('select' !== this.tagName.toLowerCase()) return;\r\n\t\t\tnew FancySelect($(this), user_options);\r\n\t\t});\r\n\t};\r\n})(jQuery, window, document);\r\n"]}
|
admin/js/jquery-sortable.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["jquery-sortable.js"],"names":["Symbol","iterator","nested","$","pluginName","undefined","containerDefaults","drag","groupDefaults","exclude","containerPath","containerSelector","afterMove","distance","draggedClass","handle","itemPath","itemSelector","bodyClass","onDrag","isValidTarget","css","$item","position","addClass","onDragStart","container","removeClass","onMousedown","event","preventDefault","group","options","placeholderClass","removeAttr","_super","target","nodeName","match","placeholder","pullPlaceholder","parentIsContainer","result","sortable","serialize","$parent","$children","extend","data","containerGroups","groupCounter","emptyBox","subContainers","drop","subContainerKey","x","Math","i","length","d","a","b","top","offsetMethod","left","parseInt","el","getRelativePosition","element","sortByDistanceDesc","tolerance","offset","pointer","pos","distances","dimensions","outerWidth","outerHeight","dim","dropProxy","dragProxy","sort","proxy","ContainerGroup","get","this","containers","rootGroup","closestItem","item","disabled","itemDimensions","right","which","find","originalEvent","bottom","on","eventNames","start","dragInit","searchValidTarget","push","setPointer","dragInitDone","prototype","dragging","setupDelayTimer","box","itemContainer","e","toggleListeners","onCancel","detach","delayMet","clearDimensions","clearOffsetParent","relativePointer","lastPointer","sameResultBox","t","offsetParent","lastRelativePointer","getContainer","getContainerDimensions","onDrop","movePlaceholder","lastAppendedItem","$getOffsetParent","containerDimensions","setDimensions","closest","method","getPointer","getItemOffsetParent","that","distanceMet","events","$document","pageX","pageY","currentPointer","clearTimeout","abs","_mouseDelayTimer","o","touches","scroll","_clearDimensions","delay","each","setTimeout","callback","traverse","object","isValidDrag","Container","validTarget","_destroy","inUpperHalf","xCenter","inLeftHalf","index","getItemDimensions","hasChildGroup","items","getContainerGroup","childGroup","childContainers","yCenter","height","path","_serialize","width","removeData","enable","$getChildren","parent","type","isContainer","childType","children","selector","not","map","disable","off","grep","val","destro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B8K,GACH,IA7GY5C,EAAAlD,KAkKZjF,EAAL+K,EAAA,OAAmB,YACPE,EAAQhG,KAACoB,aAATwE,EAAAG,GAAAG,IAAAlG,KAAArD,QAAAvB,SAAA+K,IAAA,WAGE,OAAKpJ,EAALwI,WAAN1E,EAAAA,OAAMiF,KACFzB,MAQJ,OAAOrE,KAAPrD,UAAAqB,QAVJT,UAAA0C,EAAA+F,EAAAF,IAxoBP1B,SAwoBO,SAAAD,GA5CIrJ,EAAAA,KAAEmJ,KAAKe,OAAA,GAAc,SAAI5E,GACrBtF,IAAAA,EAAE2K,EAAAA,KAAWzF,KAAM/B,GADvBvB,GAAAA,EAAA0H,SAAAD,KAzHSA,EAAAnE,OAgIb0F,iBAAQ,WACJ1F,KAAAM,eAActF,GAEbyJ,SAFD,WAGH,IALKvB,EAAAlD,KAMNoG,KAAAA,OAASC,IAAAxF,EAAAC,MAAWd,KAAAtE,QAChBsE,KAAAnB,GAAKuF,WAASrJ,GACVsJ,KAAAA,QAAOhE,OAAWL,KAAlBtD,MAAAuD,WAAAnF,EAAAwL,KAAAtG,KAAAtD,MAAAuD,WAAA,SAAAsG,GACH,OAFDA,GAAArD,KAIJ3F,EAAAA,KAAAA,KAAWyH,OAAA,GAAA,WACPlK,EAAA2K,WAAOzF,KAAKuF,OAIRlB,IAAAA,EAAAA,CACHqB,OAFD,WAGH1F,KAlBKoE,SAAA,SAAAC,GAmBNmC,EAAOnG,UAAE,KAGJ+F,QAFD,WAGHpG,KAAAoE,SAAA,SAAAC,GAvBLA,EAAAhE,UAAA,mIAoCImG,QAAIC,WAEJzG,KAAAoE,SAAY+B,SAAI9B,GACZA,EAAIqC,eAUP5L,EAAA4C,OAXD6G,EAAAnD,UAAAuF,+NAjoBI9L","file":"jquery-sortable.min.js","sourcesContent":["/* ===================================================\n * jquery-sortable.js v0.9.13\n * http://johnny.github.com/jquery-sortable/\n * ===================================================\n * Copyright (c) 2012 Jonas von Andrian\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n * ========================================================== */\n/* eslint-disable */\n!function ( $, window, pluginName, undefined){\n var containerDefaults = {\n // If true, items can be dragged from this container\n drag: true,\n // If true, items can be droped onto this container\n drop: true,\n // Exclude items from being draggable, if the\n // selector matches the item\n exclude: \"\",\n // If true, search for nested containers within an item.If you nest containers,\n // either the original selector with which you call the plugin must only match the top containers,\n // or you need to specify a group (see the bootstrap nav example)\n nested: true,\n // If true, the items are assumed to be arranged vertically\n vertical: true\n }, // end container defaults\n groupDefaults = {\n // This is executed after the placeholder has been moved.\n // $closestItemOrContainer contains the closest item, the placeholder\n // has been put at or the closest empty Container, the placeholder has\n // been appended to.\n afterMove: function ($placeholder, container, $closestItemOrContainer) {\n },\n // The exact css path between the container and its items, e.g. \"> tbody\"\n containerPath: \"\",\n // The css selector of the containers\n containerSelector: \"ol, ul\",\n // Distance the mouse has to travel to start dragging\n distance: 0,\n // Time in milliseconds after mousedown until dragging should start.\n // This option can be used to prevent unwanted drags when clicking on an element.\n delay: 0,\n // The css selector of the drag handle\n handle: \"\",\n // The exact css path between the item and its subcontainers.\n // It should only match the immediate items of a container.\n // No item of a subcontainer should be matched. E.g. for ol>div>li the itemPath is \"> div\"\n itemPath: \"\",\n // The css selector of the items\n itemSelector: \"li\",\n // The class given to \"body\" while an item is being dragged\n bodyClass: \"dragging\",\n // The class giving to an item while being dragged\n draggedClass: \"dragged\",\n // Check if the dragged item may be inside the container.\n // Use with care, since the search for a valid container entails a depth first search\n // and may be quite expensive.\n isValidTarget: function ($item, container) {\n return true\n },\n // Executed before onDrop if placeholder is detached.\n // This happens if pullPlaceholder is set to false and the drop occurs outside a container.\n onCancel: function ($item, container, _super, event) {\n },\n // Executed at the beginning of a mouse move event.\n // The Placeholder has not been moved yet.\n onDrag: function ($item, position, _super, event) {\n $item.css(position)\n },\n // Called after the drag has been started,\n // that is the mouse button is being held down and\n // the mouse is moving.\n // The container is the closest initialized container.\n // Therefore it might not be the container, that actually contains the item.\n onDragStart: function ($item, container, _super, event) {\n $item.css({\n height: $item.outerHeight(),\n width: $item.outerWidth()\n })\n $item.addClass(container.group.options.draggedClass)\n $(\"body\").addClass(container.group.options.bodyClass)\n },\n // Called when the mouse button is being released\n onDrop: function ($item, container, _super, event) {\n $item.removeClass(container.group.options.draggedClass).removeAttr(\"style\")\n $(\"body\").removeClass(container.group.options.bodyClass)\n },\n // Called on mousedown. If falsy value is returned, the dragging will not start.\n // Ignore if element clicked is input, select or textarea\n onMousedown: function ($item, _super, event) {\n if (!event.target.nodeName.match(/^(input|select|textarea)$/i)) {\n event.preventDefault()\n return true\n }\n },\n // The class of the placeholder (must match placeholder option markup)\n placeholderClass: \"placeholder\",\n // Template for the placeholder. Can be any valid jQuery input\n // e.g. a string, a DOM element.\n // The placeholder must have the class \"placeholder\"\n placeholder: '<li class=\"placeholder\"></li>',\n // If true, the position of the placeholder is calculated on every mousemove.\n // If false, it is only calculated when the mouse is above a container.\n pullPlaceholder: true,\n // Specifies serialization of the container group.\n // The pair $parent/$children is either container/items or item/subcontainers.\n serialize: function ($parent, $children, parentIsContainer) {\n var result = $.extend({}, $parent.data())\n\n if(parentIsContainer)\n return [$children]\n else if ($children[0]){\n result.children = $children\n }\n\n delete result.subContainers\n delete result.sortable\n\n return result\n },\n // Set tolerance while dragging. Positive values decrease sensitivity,\n // negative values increase it.\n tolerance: 0\n }, // end group defaults\n containerGroups = {},\n groupCounter = 0,\n emptyBox = {\n left: 0,\n top: 0,\n bottom: 0,\n right:0\n },\n eventNames = {\n start: \"touchstart.sortable mousedown.sortable\",\n drop: \"touchend.sortable touchcancel.sortable mouseup.sortable\",\n drag: \"touchmove.sortable mousemove.sortable\",\n scroll: \"scroll.sortable\"\n },\n subContainerKey = \"subContainers\"\n\n /*\n * a is Array [left, right, top, bottom]\n * b is array [left, top]\n */\n function d(a,b) {\n var x = Math.max(0, a[0] - b[0], b[0] - a[1]),\n y = Math.max(0, a[2] - b[1], b[1] - a[3])\n return x+y;\n }\n\n function setDimensions(array, dimensions, tolerance, useOffset) {\n var i = array.length,\n offsetMethod = useOffset ? \"offset\" : \"position\"\n tolerance = tolerance || 0\n\n while(i--){\n var el = array[i].el ? array[i].el : $(array[i]),\n // use fitting method\n pos = el[offsetMethod]()\n pos.left += parseInt(el.css('margin-left'), 10)\n pos.top += parseInt(el.css('margin-top'),10)\n dimensions[i] = [\n pos.left - tolerance,\n pos.left + el.outerWidth() + tolerance,\n pos.top - tolerance,\n pos.top + el.outerHeight() + tolerance\n ]\n }\n }\n\n function getRelativePosition(pointer, element) {\n var offset = element.offset()\n return {\n left: pointer.left - offset.left,\n top: pointer.top - offset.top\n }\n }\n\n function sortByDistanceDesc(dimensions, pointer, lastPointer) {\n pointer = [pointer.left, pointer.top]\n lastPointer = lastPointer && [lastPointer.left, lastPointer.top]\n\n var dim,\n i = dimensions.length,\n distances = []\n\n while(i--){\n dim = dimensions[i]\n distances[i] = [i,d(dim,pointer), lastPointer && d(dim, lastPointer)]\n }\n distances = distances.sort(function (a,b) {\n return b[1] - a[1] || b[2] - a[2] || b[0] - a[0]\n })\n\n // last entry is the closest\n return distances\n }\n\n function ContainerGroup(options) {\n this.options = $.extend({}, groupDefaults, options)\n this.containers = []\n\n if(!this.options.rootGroup){\n this.scrollProxy = $.proxy(this.scroll, this)\n this.dragProxy = $.proxy(this.drag, this)\n this.dropProxy = $.proxy(this.drop, this)\n this.placeholder = $(this.options.placeholder)\n\n if(!options.isValidTarget)\n this.options.isValidTarget = undefined\n }\n }\n\n ContainerGroup.get = function (options) {\n if(!containerGroups[options.group]) {\n if(options.group === undefined)\n options.group = groupCounter ++\n\n containerGroups[options.group] = new ContainerGroup(options)\n }\n\n return containerGroups[options.group]\n }\n\n ContainerGroup.prototype = {\n dragInit: function (e, itemContainer) {\n this.$document = $(itemContainer.el[0].ownerDocument)\n\n // get item to drag\n var closestItem = $(e.target).closest(this.options.itemSelector);\n // using the length of this item, prevents the plugin from being started if there is no handle being clicked on.\n // this may also be helpful in instantiating multidrag.\n if (closestItem.length) {\n this.item = closestItem;\n this.itemContainer = itemContainer;\n if (this.item.is(this.options.exclude) || !this.options.onMousedown(this.item, groupDefaults.onMousedown, e)) {\n return;\n }\n this.setPointer(e);\n this.toggleListeners('on');\n this.setupDelayTimer();\n this.dragInitDone = true;\n }\n },\n drag: function (e) {\n if(!this.dragging){\n if(!this.distanceMet(e) || !this.delayMet)\n return\n\n this.options.onDragStart(this.item, this.itemContainer, groupDefaults.onDragStart, e)\n this.item.before(this.placeholder)\n this.dragging = true\n }\n\n this.setPointer(e)\n // place item under the cursor\n this.options.onDrag(this.item,\n getRelativePosition(this.pointer, this.item.offsetParent()),\n groupDefaults.onDrag,\n e)\n\n var p = this.getPointer(e),\n box = this.sameResultBox,\n t = this.options.tolerance\n\n if(!box || box.top - t > p.top || box.bottom + t < p.top || box.left - t > p.left || box.right + t < p.left)\n if(!this.searchValidTarget()){\n this.placeholder.detach()\n this.lastAppendedItem = undefined\n }\n },\n drop: function (e) {\n this.toggleListeners('off')\n\n this.dragInitDone = false\n\n if(this.dragging){\n // processing Drop, check if placeholder is detached\n if(this.placeholder.closest(\"html\")[0]){\n this.placeholder.before(this.item).detach()\n } else {\n this.options.onCancel(this.item, this.itemContainer, groupDefaults.onCancel, e)\n }\n this.options.onDrop(this.item, this.getContainer(this.item), groupDefaults.onDrop, e)\n\n // cleanup\n this.clearDimensions()\n this.clearOffsetParent()\n this.lastAppendedItem = this.sameResultBox = undefined\n this.dragging = false\n }\n },\n searchValidTarget: function (pointer, lastPointer) {\n if(!pointer){\n pointer = this.relativePointer || this.pointer\n lastPointer = this.lastRelativePointer || this.lastPointer\n }\n\n var distances = sortByDistanceDesc(this.getContainerDimensions(),\n pointer,\n lastPointer),\n i = distances.length\n\n while(i--){\n var index = distances[i][0],\n distance = distances[i][1]\n\n if(!distance || this.options.pullPlaceholder){\n var container = this.containers[index]\n if(!container.disabled){\n if(!this.$getOffsetParent()){\n var offsetParent = container.getItemOffsetParent()\n pointer = getRelativePosition(pointer, offsetParent)\n lastPointer = getRelativePosition(lastPointer, offsetParent)\n }\n if(container.searchValidTarget(pointer, lastPointer))\n return true\n }\n }\n }\n if(this.sameResultBox)\n this.sameResultBox = undefined\n },\n movePlaceholder: function (container, item, method, sameResultBox) {\n var lastAppendedItem = this.lastAppendedItem\n if(!sameResultBox && lastAppendedItem && lastAppendedItem[0] === item[0])\n return;\n\n item[method](this.placeholder)\n this.lastAppendedItem = item\n this.sameResultBox = sameResultBox\n this.options.afterMove(this.placeholder, container, item)\n },\n getContainerDimensions: function () {\n if(!this.containerDimensions)\n setDimensions(this.containers, this.containerDimensions = [], this.options.tolerance, !this.$getOffsetParent())\n return this.containerDimensions\n },\n getContainer: function (element) {\n return element.closest(this.options.containerSelector).data(pluginName)\n },\n $getOffsetParent: function () {\n if(this.offsetParent === undefined){\n var i = this.containers.length - 1,\n offsetParent = this.containers[i].getItemOffsetParent()\n\n if(!this.options.rootGroup){\n while(i--){\n if(offsetParent[0] != this.containers[i].getItemOffsetParent()[0]){\n // If every container has the same offset parent,\n // use position() which is relative to this parent,\n // otherwise use offset()\n // compare #setDimensions\n offsetParent = false\n break;\n }\n }\n }\n\n this.offsetParent = offsetParent\n }\n return this.offsetParent\n },\n setPointer: function (e) {\n var pointer = this.getPointer(e)\n\n if(this.$getOffsetParent()){\n var relativePointer = getRelativePosition(pointer, this.$getOffsetParent())\n this.lastRelativePointer = this.relativePointer\n this.relativePointer = relativePointer\n }\n\n this.lastPointer = this.pointer\n this.pointer = pointer\n },\n distanceMet: function (e) {\n var currentPointer = this.getPointer(e)\n return (Math.max(\n Math.abs(this.pointer.left - currentPointer.left),\n Math.abs(this.pointer.top - currentPointer.top)\n ) >= this.options.distance)\n },\n getPointer: function(e) {\n var o = e.originalEvent || e.originalEvent.touches && e.originalEvent.touches[0]\n return {\n left: e.pageX || o.pageX,\n top: e.pageY || o.pageY\n }\n },\n setupDelayTimer: function () {\n var that = this\n this.delayMet = !this.options.delay\n\n // init delay timer if needed\n if (!this.delayMet) {\n clearTimeout(this._mouseDelayTimer);\n this._mouseDelayTimer = setTimeout(function() {\n that.delayMet = true\n }, this.options.delay)\n }\n },\n scroll: function (e) {\n this.clearDimensions()\n this.clearOffsetParent() // TODO is this needed?\n },\n toggleListeners: function (method) {\n var that = this,\n events = ['drag','drop','scroll']\n\n $.each(events,function (i,event) {\n that.$document[method](eventNames[event], that[event + 'Proxy'])\n })\n },\n clearOffsetParent: function () {\n this.offsetParent = undefined\n },\n // Recursively clear container and item dimensions\n clearDimensions: function () {\n this.traverse(function(object){\n object._clearDimensions()\n })\n },\n traverse: function(callback) {\n callback(this)\n var i = this.containers.length\n while(i--){\n this.containers[i].traverse(callback)\n }\n },\n _clearDimensions: function(){\n this.containerDimensions = undefined\n },\n _destroy: function () {\n containerGroups[this.options.group] = undefined\n }\n }\n\n function Container(element, options) {\n this.el = element\n this.options = $.extend( {}, containerDefaults, options)\n\n this.group = ContainerGroup.get(this.options)\n this.rootGroup = this.options.rootGroup || this.group\n this.handle = this.rootGroup.options.handle || this.rootGroup.options.itemSelector\n\n var itemPath = this.rootGroup.options.itemPath\n this.target = itemPath ? this.el.find(itemPath) : this.el\n\n this.target.on(eventNames.start, this.handle, $.proxy(this.dragInit, this))\n\n if(this.options.drop)\n this.group.containers.push(this)\n }\n\n Container.prototype = {\n dragInit: function (e) {\n var rootGroup = this.rootGroup\n\n if( !this.disabled &&\n !rootGroup.dragInitDone &&\n this.options.drag &&\n this.isValidDrag(e)) {\n rootGroup.dragInit(e, this)\n }\n },\n isValidDrag: function(e) {\n return e.which == 1 ||\n e.type == \"touchstart\" && e.originalEvent.touches.length == 1\n },\n searchValidTarget: function (pointer, lastPointer) {\n var distances = sortByDistanceDesc(this.getItemDimensions(),\n pointer,\n lastPointer),\n i = distances.length,\n rootGroup = this.rootGroup,\n validTarget = !rootGroup.options.isValidTarget ||\n rootGroup.options.isValidTarget(rootGroup.item, this)\n\n if(!i && validTarget){\n rootGroup.movePlaceholder(this, this.target, \"append\")\n return true\n } else\n while(i--){\n var index = distances[i][0],\n distance = distances[i][1]\n if(!distance && this.hasChildGroup(index)){\n var found = this.getContainerGroup(index).searchValidTarget(pointer, lastPointer)\n if(found)\n return true\n }\n else if(validTarget){\n this.movePlaceholder(index, pointer)\n return true\n }\n }\n },\n movePlaceholder: function (index, pointer) {\n var item = $(this.items[index]),\n dim = this.itemDimensions[index],\n method = \"after\",\n width = item.outerWidth(),\n height = item.outerHeight(),\n offset = item.offset(),\n sameResultBox = {\n left: offset.left,\n right: offset.left + width,\n top: offset.top,\n bottom: offset.top + height\n }\n if(this.options.vertical){\n var yCenter = (dim[2] + dim[3]) / 2,\n inUpperHalf = pointer.top <= yCenter\n if(inUpperHalf){\n method = \"before\"\n sameResultBox.bottom -= height / 2\n } else\n sameResultBox.top += height / 2\n } else {\n var xCenter = (dim[0] + dim[1]) / 2,\n inLeftHalf = pointer.left <= xCenter\n if(inLeftHalf){\n method = \"before\"\n sameResultBox.right -= width / 2\n } else\n sameResultBox.left += width / 2\n }\n if(this.hasChildGroup(index))\n sameResultBox = emptyBox\n this.rootGroup.movePlaceholder(this, item, method, sameResultBox)\n },\n getItemDimensions: function () {\n if(!this.itemDimensions){\n this.items = this.$getChildren(this.el, \"item\").filter(\n \":not(.\" + this.group.options.placeholderClass + \", .\" + this.group.options.draggedClass + \")\"\n ).get()\n setDimensions(this.items, this.itemDimensions = [], this.options.tolerance)\n }\n return this.itemDimensions\n },\n getItemOffsetParent: function () {\n var offsetParent,\n el = this.el\n // Since el might be empty we have to check el itself and\n // can not do something like el.children().first().offsetParent()\n if(el.css(\"position\") === \"relative\" || el.css(\"position\") === \"absolute\" || el.css(\"position\") === \"fixed\")\n offsetParent = el\n else\n offsetParent = el.offsetParent()\n return offsetParent\n },\n hasChildGroup: function (index) {\n return this.options.nested && this.getContainerGroup(index)\n },\n getContainerGroup: function (index) {\n var childGroup = $.data(this.items[index], subContainerKey)\n if( childGroup === undefined){\n var childContainers = this.$getChildren(this.items[index], \"container\")\n childGroup = false\n\n if(childContainers[0]){\n var options = $.extend({}, this.options, {\n rootGroup: this.rootGroup,\n group: groupCounter ++\n })\n childGroup = childContainers[pluginName](options).data(pluginName).group\n }\n $.data(this.items[index], subContainerKey, childGroup)\n }\n return childGroup\n },\n $getChildren: function (parent, type) {\n var options = this.rootGroup.options,\n path = options[type + \"Path\"],\n selector = options[type + \"Selector\"]\n\n parent = $(parent)\n if(path)\n parent = parent.find(path)\n\n return parent.children(selector)\n },\n _serialize: function (parent, isContainer) {\n var that = this,\n childType = isContainer ? \"item\" : \"container\",\n\n children = this.$getChildren(parent, childType).not(this.options.exclude).map(function () {\n return that._serialize($(this), !isContainer)\n }).get()\n\n return this.rootGroup.options.serialize(parent, children, isContainer)\n },\n traverse: function(callback) {\n $.each(this.items || [], function(item){\n var group = $.data(this, subContainerKey)\n if(group)\n group.traverse(callback)\n });\n\n callback(this)\n },\n _clearDimensions: function () {\n this.itemDimensions = undefined\n },\n _destroy: function() {\n var that = this;\n\n this.target.off(eventNames.start, this.handle);\n this.el.removeData(pluginName)\n\n if(this.options.drop)\n this.group.containers = $.grep(this.group.containers, function(val){\n return val != that\n })\n\n $.each(this.items || [], function(){\n $.removeData(this, subContainerKey)\n })\n }\n }\n\n var API = {\n enable: function() {\n this.traverse(function(object){\n object.disabled = false\n })\n },\n disable: function (){\n this.traverse(function(object){\n object.disabled = true\n })\n },\n serialize: function () {\n return this._serialize(this.el, true)\n },\n refresh: function() {\n this.traverse(function(object){\n object._clearDimensions()\n })\n },\n destroy: function () {\n this.traverse(function(object){\n object._destroy();\n })\n }\n }\n\n $.extend(Container.prototype, API)\n\n /**\n * jQuery API\n *\n * Parameters are\n * either options on init\n * or a method name followed by arguments to pass to the method\n */\n $.fn[pluginName] = function(methodOrOptions) {\n var args = Array.prototype.slice.call(arguments, 1)\n\n return this.map(function(){\n var $t = $(this),\n object = $t.data(pluginName)\n\n if(object && API[methodOrOptions])\n return API[methodOrOptions].apply(object, args) || this\n else if(!object && (methodOrOptions === undefined ||\n typeof methodOrOptions === \"object\"))\n $t.data(pluginName, new Container($t, methodOrOptions))\n\n return this\n });\n };\n\n}(jQuery, window, 'wf_sortable');\n"]}
|
1 |
+
{"version":3,"sources":["jquery-sortable.js"],"names":["Symbol","iterator","nested","$","pluginName","undefined","containerDefaults","drag","groupDefaults","exclude","containerPath","containerSelector","afterMove","distance","draggedClass","handle","itemPath","itemSelector","bodyClass","onDrag","isValidTarget","css","$item","position","addClass","onDragStart","container","removeClass","onMousedown","event","preventDefault","group","options","placeholderClass","removeAttr","_super","target","nodeName","match","placeholder","pullPlaceholder","parentIsContainer","result","sortable","serialize","$parent","$children","extend","data","containerGroups","groupCounter","emptyBox","subContainers","drop","subContainerKey","x","Math","i","length","d","a","b","top","offsetMethod","left","parseInt","el","getRelativePosition","element","sortByDistanceDesc","tolerance","offset","pointer","pos","distances","dimensions","outerWidth","outerHeight","dim","dropProxy","dragProxy","sort","proxy","ContainerGroup","get","this","containers","rootGroup","closestItem","item","disabled","itemDimensions","right","which","find","originalEvent","bottom","on","eventNames","start","dragInit","searchValidTarget","push","setPointer","dragInitDone","prototype","dragging","setupDelayTimer","box","itemContainer","e","toggleListeners","onCancel","detach","delayMet","clearDimensions","clearOffsetParent","relativePointer","lastPointer","sameResultBox","t","offsetParent","lastRelativePointer","getContainer","getContainerDimensions","onDrop","movePlaceholder","lastAppendedItem","$getOffsetParent","containerDimensions","setDimensions","closest","method","getPointer","getItemOffsetParent","that","distanceMet","events","$document","pageX","pageY","currentPointer","clearTimeout","abs","_mouseDelayTimer","o","touches","scroll","_clearDimensions","delay","each","setTimeout","callback","traverse","object","isValidDrag","Container","validTarget","_destroy","inUpperHalf","xCenter","inLeftHalf","index","getItemDimensions","hasChildGroup","items","getContainerGroup","childGroup","childContainers","yCenter","height","path","_serialize","width","removeData","enable","$getChildren","parent","type","isContainer","childType","children","selector","not","map","disable","off","grep","val","destroy","args","$t","API"],"mappings":"gDAAA,mBAAAA,QAAA,iBAAAA,OAAAC,4JAoCYC,SAAAC,EANgBC,EAAAC,GAOT,IAAAC,EAAA,CAPSC,MAAxB,EAUQC,MAAAA,EAGQC,QAAA,GAIRC,QAAAA,EAEAC,UAAAA,GAIAD,EAAAA,CAKAE,UAAA,aAbYF,cAAA,GAiBJC,kBAAA,SAERE,SAAA,EAGAC,MAAAA,EAEAC,OAAA,GAIAC,SAjCA,GAmCAC,aAAA,KA9BYC,UAAA,WAmCZC,aAAA,UAKQC,cAAA,WACEC,OAAAA,GAIVC,SAAAD,aAAAF,OAAA,SAAAG,EAAAC,GAIcD,EAAAA,IAAAE,IAOdC,YA7DA,SA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gIb0F,iBAAQ,WACJ1F,KAAAM,eAActF,GAEbyJ,SAFD,WAGH,IALKvB,EAAAlD,KAMNoG,KAAAA,OAASC,IAAAxF,EAAAC,MAAWd,KAAAtE,QAChBsE,KAAAnB,GAAKuF,WAASrJ,GACVsJ,KAAAA,QAAOhE,OAAWL,KAAlBtD,MAAAuD,WAAAnF,EAAAwL,KAAAtG,KAAAtD,MAAAuD,WAAA,SAAAsG,GACH,OAFDA,GAAArD,KAIJ3F,EAAAA,KAAAA,KAAWyH,OAAA,GAAA,WACPlK,EAAA2K,WAAOzF,KAAKuF,OAIRlB,IAAAA,EAAAA,CACHqB,OAFD,WAGH1F,KAlBKoE,SAAA,SAAAC,GAmBNmC,EAAOnG,UAAE,KAGJ+F,QAFD,WAGHpG,KAAAoE,SAAA,SAAAC,GAvBLA,EAAAhE,UAAA,mIAoCImG,QAAIC,WAEJzG,KAAAoE,SAAY+B,SAAI9B,GACZA,EAAIqC,eAUP5L,EAAA4C,OAXD6G,EAAAnD,UAAAuF,+NAjoBI9L","file":"jquery-sortable.min.js","sourcesContent":["/* ===================================================\r\n * jquery-sortable.js v0.9.13\r\n * http://johnny.github.com/jquery-sortable/\r\n * ===================================================\r\n * Copyright (c) 2012 Jonas von Andrian\r\n * All rights reserved.\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n * * Redistributions of source code must retain the above copyright\r\n * notice, this list of conditions and the following disclaimer.\r\n * * Redistributions in binary form must reproduce the above copyright\r\n * notice, this list of conditions and the following disclaimer in the\r\n * documentation and/or other materials provided with the distribution.\r\n * * The name of the author may not be used to endorse or promote products\r\n * derived from this software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\r\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\r\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n * ========================================================== */\r\n/* eslint-disable */\r\n!function ( $, window, pluginName, undefined){\r\n var containerDefaults = {\r\n // If true, items can be dragged from this container\r\n drag: true,\r\n // If true, items can be droped onto this container\r\n drop: true,\r\n // Exclude items from being draggable, if the\r\n // selector matches the item\r\n exclude: \"\",\r\n // If true, search for nested containers within an item.If you nest containers,\r\n // either the original selector with which you call the plugin must only match the top containers,\r\n // or you need to specify a group (see the bootstrap nav example)\r\n nested: true,\r\n // If true, the items are assumed to be arranged vertically\r\n vertical: true\r\n }, // end container defaults\r\n groupDefaults = {\r\n // This is executed after the placeholder has been moved.\r\n // $closestItemOrContainer contains the closest item, the placeholder\r\n // has been put at or the closest empty Container, the placeholder has\r\n // been appended to.\r\n afterMove: function ($placeholder, container, $closestItemOrContainer) {\r\n },\r\n // The exact css path between the container and its items, e.g. \"> tbody\"\r\n containerPath: \"\",\r\n // The css selector of the containers\r\n containerSelector: \"ol, ul\",\r\n // Distance the mouse has to travel to start dragging\r\n distance: 0,\r\n // Time in milliseconds after mousedown until dragging should start.\r\n // This option can be used to prevent unwanted drags when clicking on an element.\r\n delay: 0,\r\n // The css selector of the drag handle\r\n handle: \"\",\r\n // The exact css path between the item and its subcontainers.\r\n // It should only match the immediate items of a container.\r\n // No item of a subcontainer should be matched. E.g. for ol>div>li the itemPath is \"> div\"\r\n itemPath: \"\",\r\n // The css selector of the items\r\n itemSelector: \"li\",\r\n // The class given to \"body\" while an item is being dragged\r\n bodyClass: \"dragging\",\r\n // The class giving to an item while being dragged\r\n draggedClass: \"dragged\",\r\n // Check if the dragged item may be inside the container.\r\n // Use with care, since the search for a valid container entails a depth first search\r\n // and may be quite expensive.\r\n isValidTarget: function ($item, container) {\r\n return true\r\n },\r\n // Executed before onDrop if placeholder is detached.\r\n // This happens if pullPlaceholder is set to false and the drop occurs outside a container.\r\n onCancel: function ($item, container, _super, event) {\r\n },\r\n // Executed at the beginning of a mouse move event.\r\n // The Placeholder has not been moved yet.\r\n onDrag: function ($item, position, _super, event) {\r\n $item.css(position)\r\n },\r\n // Called after the drag has been started,\r\n // that is the mouse button is being held down and\r\n // the mouse is moving.\r\n // The container is the closest initialized container.\r\n // Therefore it might not be the container, that actually contains the item.\r\n onDragStart: function ($item, container, _super, event) {\r\n $item.css({\r\n height: $item.outerHeight(),\r\n width: $item.outerWidth()\r\n })\r\n $item.addClass(container.group.options.draggedClass)\r\n $(\"body\").addClass(container.group.options.bodyClass)\r\n },\r\n // Called when the mouse button is being released\r\n onDrop: function ($item, container, _super, event) {\r\n $item.removeClass(container.group.options.draggedClass).removeAttr(\"style\")\r\n $(\"body\").removeClass(container.group.options.bodyClass)\r\n },\r\n // Called on mousedown. If falsy value is returned, the dragging will not start.\r\n // Ignore if element clicked is input, select or textarea\r\n onMousedown: function ($item, _super, event) {\r\n if (!event.target.nodeName.match(/^(input|select|textarea)$/i)) {\r\n event.preventDefault()\r\n return true\r\n }\r\n },\r\n // The class of the placeholder (must match placeholder option markup)\r\n placeholderClass: \"placeholder\",\r\n // Template for the placeholder. Can be any valid jQuery input\r\n // e.g. a string, a DOM element.\r\n // The placeholder must have the class \"placeholder\"\r\n placeholder: '<li class=\"placeholder\"></li>',\r\n // If true, the position of the placeholder is calculated on every mousemove.\r\n // If false, it is only calculated when the mouse is above a container.\r\n pullPlaceholder: true,\r\n // Specifies serialization of the container group.\r\n // The pair $parent/$children is either container/items or item/subcontainers.\r\n serialize: function ($parent, $children, parentIsContainer) {\r\n var result = $.extend({}, $parent.data())\r\n\r\n if(parentIsContainer)\r\n return [$children]\r\n else if ($children[0]){\r\n result.children = $children\r\n }\r\n\r\n delete result.subContainers\r\n delete result.sortable\r\n\r\n return result\r\n },\r\n // Set tolerance while dragging. Positive values decrease sensitivity,\r\n // negative values increase it.\r\n tolerance: 0\r\n }, // end group defaults\r\n containerGroups = {},\r\n groupCounter = 0,\r\n emptyBox = {\r\n left: 0,\r\n top: 0,\r\n bottom: 0,\r\n right:0\r\n },\r\n eventNames = {\r\n start: \"touchstart.sortable mousedown.sortable\",\r\n drop: \"touchend.sortable touchcancel.sortable mouseup.sortable\",\r\n drag: \"touchmove.sortable mousemove.sortable\",\r\n scroll: \"scroll.sortable\"\r\n },\r\n subContainerKey = \"subContainers\"\r\n\r\n /*\r\n * a is Array [left, right, top, bottom]\r\n * b is array [left, top]\r\n */\r\n function d(a,b) {\r\n var x = Math.max(0, a[0] - b[0], b[0] - a[1]),\r\n y = Math.max(0, a[2] - b[1], b[1] - a[3])\r\n return x+y;\r\n }\r\n\r\n function setDimensions(array, dimensions, tolerance, useOffset) {\r\n var i = array.length,\r\n offsetMethod = useOffset ? \"offset\" : \"position\"\r\n tolerance = tolerance || 0\r\n\r\n while(i--){\r\n var el = array[i].el ? array[i].el : $(array[i]),\r\n // use fitting method\r\n pos = el[offsetMethod]()\r\n pos.left += parseInt(el.css('margin-left'), 10)\r\n pos.top += parseInt(el.css('margin-top'),10)\r\n dimensions[i] = [\r\n pos.left - tolerance,\r\n pos.left + el.outerWidth() + tolerance,\r\n pos.top - tolerance,\r\n pos.top + el.outerHeight() + tolerance\r\n ]\r\n }\r\n }\r\n\r\n function getRelativePosition(pointer, element) {\r\n var offset = element.offset()\r\n return {\r\n left: pointer.left - offset.left,\r\n top: pointer.top - offset.top\r\n }\r\n }\r\n\r\n function sortByDistanceDesc(dimensions, pointer, lastPointer) {\r\n pointer = [pointer.left, pointer.top]\r\n lastPointer = lastPointer && [lastPointer.left, lastPointer.top]\r\n\r\n var dim,\r\n i = dimensions.length,\r\n distances = []\r\n\r\n while(i--){\r\n dim = dimensions[i]\r\n distances[i] = [i,d(dim,pointer), lastPointer && d(dim, lastPointer)]\r\n }\r\n distances = distances.sort(function (a,b) {\r\n return b[1] - a[1] || b[2] - a[2] || b[0] - a[0]\r\n })\r\n\r\n // last entry is the closest\r\n return distances\r\n }\r\n\r\n function ContainerGroup(options) {\r\n this.options = $.extend({}, groupDefaults, options)\r\n this.containers = []\r\n\r\n if(!this.options.rootGroup){\r\n this.scrollProxy = $.proxy(this.scroll, this)\r\n this.dragProxy = $.proxy(this.drag, this)\r\n this.dropProxy = $.proxy(this.drop, this)\r\n this.placeholder = $(this.options.placeholder)\r\n\r\n if(!options.isValidTarget)\r\n this.options.isValidTarget = undefined\r\n }\r\n }\r\n\r\n ContainerGroup.get = function (options) {\r\n if(!containerGroups[options.group]) {\r\n if(options.group === undefined)\r\n options.group = groupCounter ++\r\n\r\n containerGroups[options.group] = new ContainerGroup(options)\r\n }\r\n\r\n return containerGroups[options.group]\r\n }\r\n\r\n ContainerGroup.prototype = {\r\n dragInit: function (e, itemContainer) {\r\n this.$document = $(itemContainer.el[0].ownerDocument)\r\n\r\n // get item to drag\r\n var closestItem = $(e.target).closest(this.options.itemSelector);\r\n // using the length of this item, prevents the plugin from being started if there is no handle being clicked on.\r\n // this may also be helpful in instantiating multidrag.\r\n if (closestItem.length) {\r\n this.item = closestItem;\r\n this.itemContainer = itemContainer;\r\n if (this.item.is(this.options.exclude) || !this.options.onMousedown(this.item, groupDefaults.onMousedown, e)) {\r\n return;\r\n }\r\n this.setPointer(e);\r\n this.toggleListeners('on');\r\n this.setupDelayTimer();\r\n this.dragInitDone = true;\r\n }\r\n },\r\n drag: function (e) {\r\n if(!this.dragging){\r\n if(!this.distanceMet(e) || !this.delayMet)\r\n return\r\n\r\n this.options.onDragStart(this.item, this.itemContainer, groupDefaults.onDragStart, e)\r\n this.item.before(this.placeholder)\r\n this.dragging = true\r\n }\r\n\r\n this.setPointer(e)\r\n // place item under the cursor\r\n this.options.onDrag(this.item,\r\n getRelativePosition(this.pointer, this.item.offsetParent()),\r\n groupDefaults.onDrag,\r\n e)\r\n\r\n var p = this.getPointer(e),\r\n box = this.sameResultBox,\r\n t = this.options.tolerance\r\n\r\n if(!box || box.top - t > p.top || box.bottom + t < p.top || box.left - t > p.left || box.right + t < p.left)\r\n if(!this.searchValidTarget()){\r\n this.placeholder.detach()\r\n this.lastAppendedItem = undefined\r\n }\r\n },\r\n drop: function (e) {\r\n this.toggleListeners('off')\r\n\r\n this.dragInitDone = false\r\n\r\n if(this.dragging){\r\n // processing Drop, check if placeholder is detached\r\n if(this.placeholder.closest(\"html\")[0]){\r\n this.placeholder.before(this.item).detach()\r\n } else {\r\n this.options.onCancel(this.item, this.itemContainer, groupDefaults.onCancel, e)\r\n }\r\n this.options.onDrop(this.item, this.getContainer(this.item), groupDefaults.onDrop, e)\r\n\r\n // cleanup\r\n this.clearDimensions()\r\n this.clearOffsetParent()\r\n this.lastAppendedItem = this.sameResultBox = undefined\r\n this.dragging = false\r\n }\r\n },\r\n searchValidTarget: function (pointer, lastPointer) {\r\n if(!pointer){\r\n pointer = this.relativePointer || this.pointer\r\n lastPointer = this.lastRelativePointer || this.lastPointer\r\n }\r\n\r\n var distances = sortByDistanceDesc(this.getContainerDimensions(),\r\n pointer,\r\n lastPointer),\r\n i = distances.length\r\n\r\n while(i--){\r\n var index = distances[i][0],\r\n distance = distances[i][1]\r\n\r\n if(!distance || this.options.pullPlaceholder){\r\n var container = this.containers[index]\r\n if(!container.disabled){\r\n if(!this.$getOffsetParent()){\r\n var offsetParent = container.getItemOffsetParent()\r\n pointer = getRelativePosition(pointer, offsetParent)\r\n lastPointer = getRelativePosition(lastPointer, offsetParent)\r\n }\r\n if(container.searchValidTarget(pointer, lastPointer))\r\n return true\r\n }\r\n }\r\n }\r\n if(this.sameResultBox)\r\n this.sameResultBox = undefined\r\n },\r\n movePlaceholder: function (container, item, method, sameResultBox) {\r\n var lastAppendedItem = this.lastAppendedItem\r\n if(!sameResultBox && lastAppendedItem && lastAppendedItem[0] === item[0])\r\n return;\r\n\r\n item[method](this.placeholder)\r\n this.lastAppendedItem = item\r\n this.sameResultBox = sameResultBox\r\n this.options.afterMove(this.placeholder, container, item)\r\n },\r\n getContainerDimensions: function () {\r\n if(!this.containerDimensions)\r\n setDimensions(this.containers, this.containerDimensions = [], this.options.tolerance, !this.$getOffsetParent())\r\n return this.containerDimensions\r\n },\r\n getContainer: function (element) {\r\n return element.closest(this.options.containerSelector).data(pluginName)\r\n },\r\n $getOffsetParent: function () {\r\n if(this.offsetParent === undefined){\r\n var i = this.containers.length - 1,\r\n offsetParent = this.containers[i].getItemOffsetParent()\r\n\r\n if(!this.options.rootGroup){\r\n while(i--){\r\n if(offsetParent[0] != this.containers[i].getItemOffsetParent()[0]){\r\n // If every container has the same offset parent,\r\n // use position() which is relative to this parent,\r\n // otherwise use offset()\r\n // compare #setDimensions\r\n offsetParent = false\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.offsetParent = offsetParent\r\n }\r\n return this.offsetParent\r\n },\r\n setPointer: function (e) {\r\n var pointer = this.getPointer(e)\r\n\r\n if(this.$getOffsetParent()){\r\n var relativePointer = getRelativePosition(pointer, this.$getOffsetParent())\r\n this.lastRelativePointer = this.relativePointer\r\n this.relativePointer = relativePointer\r\n }\r\n\r\n this.lastPointer = this.pointer\r\n this.pointer = pointer\r\n },\r\n distanceMet: function (e) {\r\n var currentPointer = this.getPointer(e)\r\n return (Math.max(\r\n Math.abs(this.pointer.left - currentPointer.left),\r\n Math.abs(this.pointer.top - currentPointer.top)\r\n ) >= this.options.distance)\r\n },\r\n getPointer: function(e) {\r\n var o = e.originalEvent || e.originalEvent.touches && e.originalEvent.touches[0]\r\n return {\r\n left: e.pageX || o.pageX,\r\n top: e.pageY || o.pageY\r\n }\r\n },\r\n setupDelayTimer: function () {\r\n var that = this\r\n this.delayMet = !this.options.delay\r\n\r\n // init delay timer if needed\r\n if (!this.delayMet) {\r\n clearTimeout(this._mouseDelayTimer);\r\n this._mouseDelayTimer = setTimeout(function() {\r\n that.delayMet = true\r\n }, this.options.delay)\r\n }\r\n },\r\n scroll: function (e) {\r\n this.clearDimensions()\r\n this.clearOffsetParent() // TODO is this needed?\r\n },\r\n toggleListeners: function (method) {\r\n var that = this,\r\n events = ['drag','drop','scroll']\r\n\r\n $.each(events,function (i,event) {\r\n that.$document[method](eventNames[event], that[event + 'Proxy'])\r\n })\r\n },\r\n clearOffsetParent: function () {\r\n this.offsetParent = undefined\r\n },\r\n // Recursively clear container and item dimensions\r\n clearDimensions: function () {\r\n this.traverse(function(object){\r\n object._clearDimensions()\r\n })\r\n },\r\n traverse: function(callback) {\r\n callback(this)\r\n var i = this.containers.length\r\n while(i--){\r\n this.containers[i].traverse(callback)\r\n }\r\n },\r\n _clearDimensions: function(){\r\n this.containerDimensions = undefined\r\n },\r\n _destroy: function () {\r\n containerGroups[this.options.group] = undefined\r\n }\r\n }\r\n\r\n function Container(element, options) {\r\n this.el = element\r\n this.options = $.extend( {}, containerDefaults, options)\r\n\r\n this.group = ContainerGroup.get(this.options)\r\n this.rootGroup = this.options.rootGroup || this.group\r\n this.handle = this.rootGroup.options.handle || this.rootGroup.options.itemSelector\r\n\r\n var itemPath = this.rootGroup.options.itemPath\r\n this.target = itemPath ? this.el.find(itemPath) : this.el\r\n\r\n this.target.on(eventNames.start, this.handle, $.proxy(this.dragInit, this))\r\n\r\n if(this.options.drop)\r\n this.group.containers.push(this)\r\n }\r\n\r\n Container.prototype = {\r\n dragInit: function (e) {\r\n var rootGroup = this.rootGroup\r\n\r\n if( !this.disabled &&\r\n !rootGroup.dragInitDone &&\r\n this.options.drag &&\r\n this.isValidDrag(e)) {\r\n rootGroup.dragInit(e, this)\r\n }\r\n },\r\n isValidDrag: function(e) {\r\n return e.which == 1 ||\r\n e.type == \"touchstart\" && e.originalEvent.touches.length == 1\r\n },\r\n searchValidTarget: function (pointer, lastPointer) {\r\n var distances = sortByDistanceDesc(this.getItemDimensions(),\r\n pointer,\r\n lastPointer),\r\n i = distances.length,\r\n rootGroup = this.rootGroup,\r\n validTarget = !rootGroup.options.isValidTarget ||\r\n rootGroup.options.isValidTarget(rootGroup.item, this)\r\n\r\n if(!i && validTarget){\r\n rootGroup.movePlaceholder(this, this.target, \"append\")\r\n return true\r\n } else\r\n while(i--){\r\n var index = distances[i][0],\r\n distance = distances[i][1]\r\n if(!distance && this.hasChildGroup(index)){\r\n var found = this.getContainerGroup(index).searchValidTarget(pointer, lastPointer)\r\n if(found)\r\n return true\r\n }\r\n else if(validTarget){\r\n this.movePlaceholder(index, pointer)\r\n return true\r\n }\r\n }\r\n },\r\n movePlaceholder: function (index, pointer) {\r\n var item = $(this.items[index]),\r\n dim = this.itemDimensions[index],\r\n method = \"after\",\r\n width = item.outerWidth(),\r\n height = item.outerHeight(),\r\n offset = item.offset(),\r\n sameResultBox = {\r\n left: offset.left,\r\n right: offset.left + width,\r\n top: offset.top,\r\n bottom: offset.top + height\r\n }\r\n if(this.options.vertical){\r\n var yCenter = (dim[2] + dim[3]) / 2,\r\n inUpperHalf = pointer.top <= yCenter\r\n if(inUpperHalf){\r\n method = \"before\"\r\n sameResultBox.bottom -= height / 2\r\n } else\r\n sameResultBox.top += height / 2\r\n } else {\r\n var xCenter = (dim[0] + dim[1]) / 2,\r\n inLeftHalf = pointer.left <= xCenter\r\n if(inLeftHalf){\r\n method = \"before\"\r\n sameResultBox.right -= width / 2\r\n } else\r\n sameResultBox.left += width / 2\r\n }\r\n if(this.hasChildGroup(index))\r\n sameResultBox = emptyBox\r\n this.rootGroup.movePlaceholder(this, item, method, sameResultBox)\r\n },\r\n getItemDimensions: function () {\r\n if(!this.itemDimensions){\r\n this.items = this.$getChildren(this.el, \"item\").filter(\r\n \":not(.\" + this.group.options.placeholderClass + \", .\" + this.group.options.draggedClass + \")\"\r\n ).get()\r\n setDimensions(this.items, this.itemDimensions = [], this.options.tolerance)\r\n }\r\n return this.itemDimensions\r\n },\r\n getItemOffsetParent: function () {\r\n var offsetParent,\r\n el = this.el\r\n // Since el might be empty we have to check el itself and\r\n // can not do something like el.children().first().offsetParent()\r\n if(el.css(\"position\") === \"relative\" || el.css(\"position\") === \"absolute\" || el.css(\"position\") === \"fixed\")\r\n offsetParent = el\r\n else\r\n offsetParent = el.offsetParent()\r\n return offsetParent\r\n },\r\n hasChildGroup: function (index) {\r\n return this.options.nested && this.getContainerGroup(index)\r\n },\r\n getContainerGroup: function (index) {\r\n var childGroup = $.data(this.items[index], subContainerKey)\r\n if( childGroup === undefined){\r\n var childContainers = this.$getChildren(this.items[index], \"container\")\r\n childGroup = false\r\n\r\n if(childContainers[0]){\r\n var options = $.extend({}, this.options, {\r\n rootGroup: this.rootGroup,\r\n group: groupCounter ++\r\n })\r\n childGroup = childContainers[pluginName](options).data(pluginName).group\r\n }\r\n $.data(this.items[index], subContainerKey, childGroup)\r\n }\r\n return childGroup\r\n },\r\n $getChildren: function (parent, type) {\r\n var options = this.rootGroup.options,\r\n path = options[type + \"Path\"],\r\n selector = options[type + \"Selector\"]\r\n\r\n parent = $(parent)\r\n if(path)\r\n parent = parent.find(path)\r\n\r\n return parent.children(selector)\r\n },\r\n _serialize: function (parent, isContainer) {\r\n var that = this,\r\n childType = isContainer ? \"item\" : \"container\",\r\n\r\n children = this.$getChildren(parent, childType).not(this.options.exclude).map(function () {\r\n return that._serialize($(this), !isContainer)\r\n }).get()\r\n\r\n return this.rootGroup.options.serialize(parent, children, isContainer)\r\n },\r\n traverse: function(callback) {\r\n $.each(this.items || [], function(item){\r\n var group = $.data(this, subContainerKey)\r\n if(group)\r\n group.traverse(callback)\r\n });\r\n\r\n callback(this)\r\n },\r\n _clearDimensions: function () {\r\n this.itemDimensions = undefined\r\n },\r\n _destroy: function() {\r\n var that = this;\r\n\r\n this.target.off(eventNames.start, this.handle);\r\n this.el.removeData(pluginName)\r\n\r\n if(this.options.drop)\r\n this.group.containers = $.grep(this.group.containers, function(val){\r\n return val != that\r\n })\r\n\r\n $.each(this.items || [], function(){\r\n $.removeData(this, subContainerKey)\r\n })\r\n }\r\n }\r\n\r\n var API = {\r\n enable: function() {\r\n this.traverse(function(object){\r\n object.disabled = false\r\n })\r\n },\r\n disable: function (){\r\n this.traverse(function(object){\r\n object.disabled = true\r\n })\r\n },\r\n serialize: function () {\r\n return this._serialize(this.el, true)\r\n },\r\n refresh: function() {\r\n this.traverse(function(object){\r\n object._clearDimensions()\r\n })\r\n },\r\n destroy: function () {\r\n this.traverse(function(object){\r\n object._destroy();\r\n })\r\n }\r\n }\r\n\r\n $.extend(Container.prototype, API)\r\n\r\n /**\r\n * jQuery API\r\n *\r\n * Parameters are\r\n * either options on init\r\n * or a method name followed by arguments to pass to the method\r\n */\r\n $.fn[pluginName] = function(methodOrOptions) {\r\n var args = Array.prototype.slice.call(arguments, 1)\r\n\r\n return this.map(function(){\r\n var $t = $(this),\r\n object = $t.data(pluginName)\r\n\r\n if(object && API[methodOrOptions])\r\n return API[methodOrOptions].apply(object, args) || this\r\n else if(!object && (methodOrOptions === undefined ||\r\n typeof methodOrOptions === \"object\"))\r\n $t.data(pluginName, new Container($t, methodOrOptions))\r\n\r\n return this\r\n });\r\n };\r\n\r\n}(jQuery, window, 'wf_sortable');\r\n"]}
|
admin/js/woo-feed-admin-pro.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["woo-feed-admin-pro.js"],"names":["$","window","on","sliders","slick","autoplay","dots","centerMode","length","slidesToScroll","lazyLoad","wp","ajax","wpf_ajax_obj"],"mappings":"cAQC,SAAAA,EAAAC,GAAAD,EAAAC,GAAAC,GAAA,OAAA,WAEG,IAAAC,EAAAH,EAAAA,gBAIIG,EAAIA,QAHED,EAAAA,MAAGE,CACTC,UAAAA,EACWC,MAAAA,EAKHC,YAAAA,EAJIC,QAAAA,EACAJ,aAAAA,EACIK,eAAAA,EACFC,SAAAA,kBATrB,CAaeD,OAAAA,QAAAA,SANUE,GAAAC,KAAAC","file":"woo-feed-admin-pro.min.js","sourcesContent":["// noinspection JSUnresolvedVariable,ES6ConvertVarToLetConst,SpellCheckingInspection\n/**!\n * WooFeed Pro Scripts\n * @version 1.0.0\n * @package WooFeed\n * @copyright 2020 WebAppick\n *\n */\n(function ($, window, document, wpAjax, opts) {\n \"use strict\";\n /* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\n $(window).on('load', function () {\n // noinspection ES6ConvertVarToLetConst,SpellCheckingInspection\n var sliders = $('.wapk-slider');\n if( sliders.length ) {\n sliders.slick({\n autoplay: true,\n dots: true,\n centerMode: true,\n arrows: false,\n slidesToShow: 1,\n slidesToScroll: 1,\n lazyLoad: 'progressive'\n });\n }\n } );\n}( jQuery, window, document, wp.ajax, wpf_ajax_obj ));"]}
|
1 |
+
{"version":3,"sources":["woo-feed-admin-pro.js"],"names":["$","window","on","sliders","slick","autoplay","dots","centerMode","length","slidesToScroll","lazyLoad","wp","ajax","wpf_ajax_obj"],"mappings":"cAQC,SAAAA,EAAAC,GAAAD,EAAAC,GAAAC,GAAA,OAAA,WAEG,IAAAC,EAAAH,EAAAA,gBAIIG,EAAIA,QAHED,EAAAA,MAAGE,CACTC,UAAAA,EACWC,MAAAA,EAKHC,YAAAA,EAJIC,QAAAA,EACAJ,aAAAA,EACIK,eAAAA,EACFC,SAAAA,kBATrB,CAaeD,OAAAA,QAAAA,SANUE,GAAAC,KAAAC","file":"woo-feed-admin-pro.min.js","sourcesContent":["// noinspection JSUnresolvedVariable,ES6ConvertVarToLetConst,SpellCheckingInspection\r\n/**!\r\n * WooFeed Pro Scripts\r\n * @version 1.0.0\r\n * @package WooFeed\r\n * @copyright 2020 WebAppick\r\n *\r\n */\r\n(function ($, window, document, wpAjax, opts) {\r\n \"use strict\";\r\n /* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\r\n $(window).on('load', function () {\r\n // noinspection ES6ConvertVarToLetConst,SpellCheckingInspection\r\n var sliders = $('.wapk-slider');\r\n if( sliders.length ) {\r\n sliders.slick({\r\n autoplay: true,\r\n dots: true,\r\n centerMode: true,\r\n arrows: false,\r\n slidesToShow: 1,\r\n slidesToScroll: 1,\r\n lazyLoad: 'progressive'\r\n });\r\n }\r\n } );\r\n}( jQuery, window, document, wp.ajax, wpf_ajax_obj ));"]}
|
admin/js/woo-feed-admin.js
CHANGED
@@ -1044,5 +1044,55 @@
|
|
1044 |
|
1045 |
})
|
1046 |
.trigger('change');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1047 |
});
|
1048 |
})(jQuery, window, document, wp.ajax, wpf_ajax_obj);
|
1044 |
|
1045 |
})
|
1046 |
.trigger('change');
|
1047 |
+
|
1048 |
+
|
1049 |
+
// product Attribute class
|
1050 |
+
class WooFeedCustomFields {
|
1051 |
+
|
1052 |
+
constructor( field, status, isTaxonomy ) {
|
1053 |
+
this.productCustomFields( field, status, isTaxonomy );
|
1054 |
+
}
|
1055 |
+
|
1056 |
+
cacheClear() {
|
1057 |
+
let data = {
|
1058 |
+
action: 'woo_feed_product_attribute_cache_remove',
|
1059 |
+
nonce: wpf_ajax_obj.ajax.nonce,
|
1060 |
+
};
|
1061 |
+
$.ajax({
|
1062 |
+
method: 'POST',
|
1063 |
+
url: wpf_ajax_obj.wpf_ajax_url,
|
1064 |
+
data
|
1065 |
+
});
|
1066 |
+
}
|
1067 |
+
|
1068 |
+
productCustomFields( field, status = false, isTaxonomy ) {
|
1069 |
+
let data = {
|
1070 |
+
action: 'woo_feed_custom_fields_status_change',
|
1071 |
+
nonce: wpf_ajax_obj.ajax.nonce,
|
1072 |
+
field,
|
1073 |
+
status,
|
1074 |
+
isTaxonomy
|
1075 |
+
};
|
1076 |
+
$.ajax({
|
1077 |
+
method: 'POST',
|
1078 |
+
url: wpf_ajax_obj.wpf_ajax_url,
|
1079 |
+
data,
|
1080 |
+
success: ( response ) => {
|
1081 |
+
if( response.success ) {
|
1082 |
+
this.cacheClear();
|
1083 |
+
} else {
|
1084 |
+
console.log( response );
|
1085 |
+
}
|
1086 |
+
}
|
1087 |
+
});
|
1088 |
+
}
|
1089 |
+
}
|
1090 |
+
|
1091 |
+
$(document).on('click', '.woofeed-custom-fields [id*="-switcher"]', function () {
|
1092 |
+
let field = $(this).attr( 'id' ).split( '-' )[0],
|
1093 |
+
isTaxonomy = $(this).data( 'taxonomy' ),
|
1094 |
+
status = $(this).prop( 'checked' );
|
1095 |
+
new WooFeedCustomFields( field, status, isTaxonomy );
|
1096 |
+
});
|
1097 |
});
|
1098 |
})(jQuery, window, document, wp.ajax, wpf_ajax_obj);
|
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;new URLSearchParams(e).get("action");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(),location.reload())}).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")))})}).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(e){var t=s("#feedType").val(),n=s("#provider").val(),a=s(".itemWrapper"),r=s(".wf_csvtxt");""!==t&&f.in_array(n,c.form.item_wrapper_hidden)&&a.hide(),"feedType"===e.target.id&&("csv"===t||"txt"===t||"tsv"===t?(a.hide(),r.show(),"tsv"===t?s("#delimiter option:last").prop("selected","selected"):"csv"===t&&s("#delimiter option:first").prop("selected","selected")):"xml"===t&&(a.show(),r.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,o,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 a(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;a(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){a(e.trigger,"Copied!")}))}var n,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,o){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),o&&"function"==typeof o&&o(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:_.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(){_.sortable(s(".sorted_table"),{},9,_.reindex_config_table),_.selectize(),_.fancySelect(s(".outputType"))}},f={form:null,init:function(){this.form=s(".generateFeed"),this.form.length&&(_.common(),s(r).trigger(new jQuery.Event("feedEditor.init",{target:this.form})))},renderMerchantInfo:function(n,a,o){function e(e){var t;o.hasOwnProperty(e)&&(n.find(".merchant-info-section."+e+" .data").html(o[e]),"feed_file_type"===e&&((t=o[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()&&!_.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 o)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);f.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,o.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===o.isRegenerating&&this.generate();var e=o.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===o.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;o.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&&(o.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}();o.wf={helper:_,feedEditor:f,generator:h},s(o).on("load",function(){null!==s(location).attr("href").match(/webappick.*feed/g)&&s("#wpbody-content").addClass("woofeed-body-content");var e=o.location.search;new URLSearchParams(e).get("action");t(),postboxes.add_postbox_toggles(pagenow),(new h).init(),""!==c.generator.feed&&c.generator.regenerate,f.init(),_.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),_.fancySelect(s(".outputType"))}).on("click",".single-feed-delete",function(e){e.preventDefault(),confirm(c.form.del_confirm)&&(o.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(),location.reload())}).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(),o=s(this).parents("tr").find(".outputType"),r=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"),r.removeClass("selected"),"for_custom_taxo"!==t&&"for_price"!==t||r.each(function(e){n===s(this).text()&&(s(this).addClass("selected"),i.text(n),o.find("option").text(n),o.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(),_.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(),_.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"),o=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>"),o.find(".spinner").addClass("is-active"),n.disabled(!0),n.parent().find(".spinner").addClass("is-active"),o.find(".merchant-info-section .data").html(""),u.hasOwnProperty(t)?f.renderMerchantInfo(o,n,u[t]):i.send("woo_feed_get_merchant_info",{type:"GET",data:{nonce:c.nonce,provider:t}}).then(function(e){u[t]=e,f.renderMerchantInfo(o,n,e)}).fail(_.ajax_fail),p.hasOwnProperty(t)?f.renderMerchantTemplate(a,p[t]):i.post("get_feed_merchant",{_ajax_nonce:c.nonce,merchant:t}).then(function(e){p[t]=e,f.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(_.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)"),o=s("#provider").val();if(c.form.google_category.hasOwnProperty(t.val())&&"pattern"===n.val()&&_.in_array(o,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 r=a.find(".wf_attributes select");_.selectize(r,{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:o}}).then(function(e){t(d=e),a.find(".spinner").remove()}).fail(_.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"),o=s(".wf_csvtxt");""!==t&&_.in_array(n,c.form.item_wrapper_hidden)&&a.hide(),"feedType"===e.target.id&&("csv"===t||"txt"===t||"tsv"===t?(a.hide(),o.show(),"tsv"===t?s("#delimiter option:last").prop("selected","selected"):"csv"===t&&s("#delimiter option:first").prop("selected","selected")):"xml"===t&&(a.show(),o.hide()))}).trigger("change");var a=function(){function a(e,t,n){_classCallCheck(this,a),this.productCustomFields(e,t,n)}return _createClass(a,[{key:"cacheClear",value:function(){var e={action:"woo_feed_product_attribute_cache_remove",nonce:wpf_ajax_obj.ajax.nonce};s.ajax({method:"POST",url:wpf_ajax_obj.wpf_ajax_url,data:e})}},{key:"productCustomFields",value:function(e,t,n){var a=this,o=1<arguments.length&&void 0!==t&&t,r=2<arguments.length?n:void 0,i={action:"woo_feed_custom_fields_status_change",nonce:wpf_ajax_obj.ajax.nonce,field:e,status:o,isTaxonomy:r};s.ajax({method:"POST",url:wpf_ajax_obj.wpf_ajax_url,data:i,success:function(e){e.success?a.cacheClear():console.log(e)}})}}]),a}();s(r).on("click",'.woofeed-custom-fields [id*="-switcher"]',function(){var e=s(this).attr("id").split("-")[0],t=s(this).data("taxonomy"),n=s(this).prop("checked");new a(e,n,t)})})}(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","postboxes","location","setInterval","URLSearchParams","pagenow","template","common","hover","title","appendTo","userAgent","merchantTemplateCache","remove","ClipboardJS","clipboard","slideToggle","loader","tbody","reload","nonce","status_area","select","execCommand","button","fancyOption","fancyDataPicker","selectIf","price_attributes","selectKey","percentage","outputSelect","parents","includes","current_attribute_value","indexOf","del_confirm_multi","row","closest","reindex_config_table","type","_ajax_clean_nonce","server","validate","save","sftp_checking","sftp_available","provider","merchant","outOfStockVisibilityRow","feedName","checked","valueColumn","append","preload","load","google_category","query","attribute","cb","send","itemWrapper","item_wrapper_hidden","id","wpf_ajax_obj"],"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,4GAxRLuB,EA4RMC,KAAAA,WAEAC,EAAAA,MAAAA,GAAAA,aAAA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An8BZ,QAm8BY2B","file":"woo-feed-admin.min.js","sourcesContent":["// noinspection JSUnresolvedletiable\n/**!\n * WooFeed Scripts\n * @version 3.3.6\n * @package WooFeed\n * @copyright 2020 WebAppick\n *\n */\n/* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\n// noinspection JSUnresolvedVariable\n(function($, window, document, wpAjax, opts) {\n\t\"use strict\";\n\t/**\n\t * All of the code for your admin-facing JavaScript source\n\t * should reside in this file.\n\t *\n\t * Note: It has been assumed you will write jQuery code here, so the\n\t * $ function reference has been prepared for usage within the scope\n\t * of this function.\n\t *\n\t * This enables you to define handlers, for when the DOM is ready:\n\t */\n\n\t/**\n\t * disable element utility\n\t *\n\t * @since 3.1.9\n\t *\n\t * @param {*} status\n\t * @returns {jQuery|HTMLElement}\n\t */\n\t$.fn.disabled = function(status) {\n\t\t$(this).each(function() {\n\t\t\tlet self = $(this),\n\t\t\t\tprop = 'disabled';\n\n\t\t\tif (typeof self.prop(prop) !== 'undefined') {\n\t\t\t\tself.prop(prop, status === void 0 || status === true);\n\t\t\t} else {\n\t\t\t\t!0 === status ? self.addClass(prop) : self.removeClass(prop);\n\t\t\t}\n\t\t});\n\t\treturn self; // method chaining\n\t};\n\t\n\t/**\n\t * Check if a HTMLElement or jQuery is disabled\n\t */\n\t$.fn.isDisabled = function() {\n\t\tlet self = $(this),\n\t\t\tprop = 'disabled';\n\t\treturn typeof self.prop(prop) !== 'undefined' ? self.prop(prop) : self.hasClass(prop);\n\t};\n\t\n\t/**\n\t * Clear Tooltip for clip board js\n\t * @param {Object} event\n\t */\n\tconst clearTooltip = (event) => {\n\t\t$(event.currentTarget).removeClass( (index, className) => (className.match(/\\btooltipped-\\S+/g) || []).join(' ') ).removeClass('tooltipped').removeAttr('aria-label');\n\t};\n\n\tconst showTooltip = (elem, msg) => {\n\t\t$(elem).addClass('tooltipped tooltipped-s').attr('aria-label', msg);\n\t};\n\n\tconst fallbackMessage = (action) =>{\n\t\tlet actionMsg,\n\t\t\tactionKey = action === 'cut' ? 'X' : 'C';\n\n\t\tif (/iPhone|iPad/i.test(navigator.userAgent)) {\n\t\t\tactionMsg = 'No support :(';\n\t\t} else if (/Mac/i.test(navigator.userAgent)) {\n\t\t\tactionMsg = 'Press ⌘-' + actionKey + ' to ' + action;\n\t\t} else {\n\t\t\tactionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;\n\t\t}\n\n\t\treturn actionMsg;\n\t};\n\t\n\t/**\n\t * Alias of jQuery.extend()\n\t * @param {Object} _default\n\t * @param {Object} _args\n\t */\n\tconst extend = (_default, _args) => $.extend(true, {}, _default, _args);\n\t\n\tlet $copyBtn,\n\t\tclipboard,\n\t\tgoogleCategories,\n\t\thelper = {\n\t\t\tin_array: (needle, haystack) => {\n\t\t\t\ttry {\n\t\t\t\t\treturn haystack.indexOf(needle) !== -1;\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tselectize_render_item: (data, escape) => `<div class=\"item wapk-selectize-item\">${ escape(data.text)}</div>`, // phpcs:ignore WordPressVIPMinimum.JS.StringConcat.Found,\n\t\t\tajax_fail: e => {\n\t\t\t\tconsole.warn(e);\n\t\t\t\talert(e.hasOwnProperty('statusText') && e.hasOwnProperty('status') ? opts.ajax.error + '\\n' + e.statusText + ' (' + e.status + ')' : e);\n\t\t\t},\n\t\t\t/**\n\t\t\t * Initialize Sortable\n\t\t\t * @param {jQuery|HTMLElement} el\n\t\t\t * @param {object} config\n\t\t\t * @param {int|boolean} column\n\t\t\t * @param {function} onDrop\n\t\t\t * @return {jQuery|HTMLElement}\n\t\t\t */\n\t\t\tsortable: (el, config, column, onDrop) => {\n\t\t\t\treturn (el || $('.sorted_table')).each(function() {\n\t\t\t\t\tlet self = $(this),\n\t\t\t\t\t\tcolumn_count = self.find('tbody > tr:eq(0) > td').length || column || 9;\n\t\t\t\t\tself.wf_sortable(extend({\n\t\t\t\t\t\tcontainerSelector: 'table',\n\t\t\t\t\t\titemPath: '> tbody',\n\t\t\t\t\t\titemSelector: 'tr',\n\t\t\t\t\t\thandle: 'i.wf_sortedtable',\n\t\t\t\t\t\tplaceholder: `<tr class=\"placeholder\"><td colspan=\"${column_count}\"></td></tr>`,\n\t\t\t\t\t\tonDrop: ($item, container, _super, event) => {\n\t\t\t\t\t\t\t$item.removeClass(container.group.options.draggedClass).removeAttr('style');\n\t\t\t\t\t\t\t$(\"body\").removeClass(container.group.options.bodyClass);\n\t\t\t\t\t\t\tif ( onDrop && 'function' === typeof( onDrop ) ) {\n\t\t\t\t\t\t\t\tonDrop( $item, container, _super, event );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}, config));\n\t\t\t\t});\n\t\t\t},\n\t\t\tselectize: (el, config) => {\n\t\t\t\treturn (el || $('select.selectize')).not('.selectized').each(function() {\n\t\t\t\t\tlet self = $(this);\n\t\t\t\t\tself.selectize(extend({\n\t\t\t\t\t\tcreate: self.data('create') || false,\n\t\t\t\t\t\tplugins: self.data('plugins') ? self.data('plugins').split(',').map(function(s) {\n\t\t\t\t\t\t\treturn s.trim();\n\t\t\t\t\t\t}) : [],\n\t\t\t\t\t\t//['remove_button'],\n\t\t\t\t\t\trender: {\n\t\t\t\t\t\t\titem: helper.selectize_render_item\n\t\t\t\t\t\t}\n\t\t\t\t\t}, config));\n\t\t\t\t});\n\t\t\t},\n\t\t\tfancySelect: (el, config) => {\n\t\t\t\treturn (el || $('select.fancySelect')).not('.FancySelectInit').each(function() {\n\t\t\t\t\tlet self = $(this);\n\t\t\t\t\tself.fancySelect(extend({\n\t\t\t\t\t\tmaxItemShow: 3\n\t\t\t\t\t}, config));\n\t\t\t\t});\n\t\t\t},\n\t\t\treindex_config_table: () => {\n\t\t\t\t$('#table-1').find('tbody tr').each( ( x, el ) => {\n\t\t\t\t\t$(el).find('[name]').each( ( x1, el ) => {\n\t\t\t\t\t\t$(el).attr('name', $(el).attr('name').replace(/(\\[\\d\\])/g, `[${x}]`));\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t},\n\t\t\tcommon: () => {\n\t\t\t\thelper.sortable( $('.sorted_table'), {}, 9, helper.reindex_config_table );\n\t\t\t\thelper.selectize();\n\t\t\t\thelper.fancySelect($('.outputType'));\n\t\t\t}\n\t\t},\n\t\t// helper functions\n\t\tfeedEditor = {\n\t\t\t/**\n\t\t\t * The Editor Form Elem.\n\t\t\t * @type {jQuery|HTMLElement}\n\t\t\t */\n\t\t\tform: null,\n\n\t\t\t/**\n\t\t\t * Initialize The Feed Editor {Tabs...}\n\t\t\t * @returns {void}\n\t\t\t */\n\t\t\tinit: function () {\n\t\t\t\tlet self = this;\n\t\t\t\tself.form = $('.generateFeed');\n\t\t\t\tif (!self.form.length) return;\n\t\t\t\thelper.common();\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t$(document).trigger(new jQuery.Event('feedEditor.init', {\n\t\t\t\t\ttarget: this.form\n\t\t\t\t}));\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Render Merchant info ajax response and handle allowed feed type for selected merchant\n\t\t\t * @param {jQuery|HTMLElement} merchantInfo jQuery dom object\n\t\t\t * @param {jQuery|HTMLElement} feedType jQuery dom object\n\t\t\t * @param {Object} r ajax response object\n\t\t\t */\n\t\t\trenderMerchantInfo: function (merchantInfo, feedType, r) {\n\t\t\t\tfor (let k in r) {\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\n\t\t\t\t\t\tmerchantInfo.find('.merchant-info-section.' + k + ' .data').html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\n\n\t\t\t\t\t\tif ('feed_file_type' === k) {\n\t\t\t\t\t\t\t(function() {\n\t\t\t\t\t\t\t\tlet types = r[k].split(\",\").map(function(t) {\n\t\t\t\t\t\t\t\t\treturn t.trim().toLowerCase();\n\t\t\t\t\t\t\t\t}).filter(function(t) {\n\t\t\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\t\t\t\treturn t !== '' && t !== opts.na.toLowerCase();\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (types.length) {\n\t\t\t\t\t\t\t\t\tfeedType.find('option').removeAttr('selected').each(function() {\n\t\t\t\t\t\t\t\t\t\tlet opt = $(this);\n\t\t\t\t\t\t\t\t\t\topt.val() && !helper.in_array(opt.val(), types) ? opt.disabled(!0) : opt.disabled(!1);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tif (types.length === 1) feedType.find('option[value=\"' + types[0] + '\"]').attr('selected', 'selected');\n\t\t\t\t\t\t\t\t} else feedType.find('option').disabled(!1);\n\t\t\t\t\t\t\t})();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tmerchantInfo.find('.spinner').removeClass('is-active');\n\t\t\t\tfeedType.disabled(!1);\n\t\t\t\tfeedType.trigger('change');\n\t\t\t\tfeedType.parent().find('.spinner').removeClass('is-active');\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Render Feed Template Tabs and settings while creating new feed.\n\t\t\t * @param {jQuery|HTMLElement} feedForm feed from query dom object\n\t\t\t * @param {object} r merchant template ajax response object\n\t\t\t */\n\t\t\trenderMerchantTemplate: function (feedForm, r) {\n\t\t\t\tlet _loop = function _loop(k) {\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\n\t\t\t\t\t\tif ('tabs' === k) {\n\t\t\t\t\t\t\t// noinspection JSUnresolvedFunction\n\t\t\t\t\t\t\tfeedForm.html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlet contentSettings = $('[name=\"' + k + '\"]');\n\n\t\t\t\t\t\t\tif (contentSettings.length) {\n\t\t\t\t\t\t\t\tcontentSettings.each(function() {\n\t\t\t\t\t\t\t\t\tlet elem = $(this);\n\n\t\t\t\t\t\t\t\t\tif (elem.is('select')) {\n\t\t\t\t\t\t\t\t\t\telem.find('[value=\"' + r[k] + '\"]').prop('selected', true);\n\t\t\t\t\t\t\t\t\t} else if ((elem.is('[type=checkbox]') || elem.is('[type=radio]')) && elem.val() === r[k]) {\n\t\t\t\t\t\t\t\t\t\telem.prop('checked', true);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\telem.val(r[k]); // type=text\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}).trigger('change');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tfor (let k in r) {\n\t\t\t\t\t_loop(k);\n\t\t\t\t}\n\n\t\t\t\tfeedEditor.init();\n\t\t\t}\n\t\t},\n\t\t// Feed Editor Table\n\t\tmerchantInfoCache = [],\n\t\tmerchantTemplateCache = [],\n\t\ttooltip = () => {\n\t\t\t// Tooltip only Text\n\t\t\t$('.wfmasterTooltip')\n\t\t\t\t.hover(function () {\n\t\t\t\t\t// Hover over code\n\t\t\t\t\tlet self = $(this), title = self.attr('wftitle');\n\t\t\t\t\tself.data('tipText', title).removeAttr('wftitle');\n\t\t\t\t\t$('<p class=\"wftooltip\"></p>').text(title).appendTo('body').fadeIn('slow');\n\t\t\t\t}, function () {\n\t\t\t\t\t// Hover out code\n\t\t\t\t\tlet self = $(this);\n\t\t\t\t\tself.attr('wftitle', self.data('tipText'));\n\t\t\t\t\t$('.wftooltip').remove();\n\t\t\t\t})\n\t\t\t\t.mousemove(function (e) {\n\t\t\t\t\t$('.wftooltip').css({\n\t\t\t\t\t\ttop: e.pageY + 10,\n\t\t\t\t\t\tleft: e.pageX + 20\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t},\n\t\tclip = () => {\n\t\t\t$copyBtn = $('.toClipboard');\n\t\t\tif (!ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent)) {\n\t\t\t\t$copyBtn.find('img').hide(0);\n\t\t\t} else {\n\t\t\t\t$copyBtn.each(function() {\n\t\t\t\t\t$(this).on('mouseleave', clearTooltip).on('blur', clearTooltip);\n\t\t\t\t});\n\t\t\t\tclipboard = new ClipboardJS('.toClipboard');\n\t\t\t\tclipboard.on('error', function(event) {\n\t\t\t\t\tshowTooltip(event.trigger, fallbackMessage(event.action));\n\t\t\t\t}).on('success', function(event) {\n\t\t\t\t\tshowTooltip(event.trigger, 'Copied!');\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\n\t/**\n\t * Feed Generator Module\n\t */\n\tclass feedGenerator {\n\t\t\n\t\t/**\n\t\t * Constructor\n\t\t * @constructor\n\t\t */\n\t\tconstructor() {\n\t\t\tthis._feed = opts.generator.feed; // wf_config+xxxx\n\t\t\tthis._limit = opts.generator.limit;\n\t\t\tthis._progress = 0;\n\t\t\tthis._timer = null;\n\t\t\tthis._color = false;\n\t\t\t// batch info\n\t\t\tthis._total_batch = 0;\n\t\t\tthis._current_batch = 0;\n\t\t\tthis._product_ids = [];\n\t\t\tthis._progress_per_batch = 0;\n\t\t\tthis._refresh = true;\n\t\t\t// noinspection JSUnresolvedVariable\n\t\t\tthis._regenerate = opts.generator.regenerate;\n\t\t\twindow.isRegenerating = false;\n\t\t\tthis._all_btn = $('.wpf_regenerate');\n\t\t\tthis._current_btn = $(`#${this._feed.replace( 'wf_config', 'wf_feed_' )}`);\n\t\t\tthis._current_btn_label = '';\n\t\t}\n\t\t\n\t\t/**\n\t\t * Init Hooks (Event)\n\t\t * @return {feedGenerator}\n\t\t */\n\t\tinit() {\n\t\t\tlet self = this;\n\t\t\tif ( '' !== this._feed && this._regenerate && false === window.isRegenerating ) {\n\t\t\t\tthis.generate();\n\t\t\t}\n\n\t\t\t//thickbox body add feed plugin class to make it unique and custom style\n\t\t\tlet current_page_query = window.location.search;\n\t\t\tlet params = new URLSearchParams(current_page_query);\n\t\t\tlet page_name = params.get(\"page\");\n\t\t\tif( \"webappick-manage-feeds\" === page_name ) {\n\t\t\t\t$('body').addClass('woo-import-popup-body');\n\t\t\t}\n\n\t\t\t$(document).on('click', '.woo-feed-campaign-close-button', function(event) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t$(this).parent('.woo-feed-promotion').hide();\n\t\t\t\tlet condition = $(this).data('condition');\n\t\t\t\tif(1 === condition) {\n\t\t\t\t\twpAjax.post( 'woo_feed_hide_promotion', {\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\tcondition: condition,\n\t\t\t\t\t} ).then( response => {\n\t\t\t\t\t\tself._log( response );\n\t\t\t\t\t} ).fail( error => {\n\t\t\t\t\t\tself._log( error );\n\t\t\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\t\t\tself._color = 'red';\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t});\n\t\t\t$(document).on('click', '.wpf_regenerate', function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tself._current_btn = $( this );\n\t\t\t\tif( self._current_btn.hasClass('disabled') || window.isRegenerating === true ) return;\n\t\t\t\tself._feed = self._current_btn.attr('id').replace( 'wf_feed_', 'wf_config' );\n\t\t\t\tif( '' !== self._feed ) {\n\t\t\t\t\tself.generate();\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t_block_button() {\n\t\t\tif ( this._all_btn.length ) {\n\t\t\t\tthis._all_btn.addClass('disabled');\n\t\t\t}\n\t\t\tif ( this._current_btn.length ) {\n\t\t\t\tthis._current_btn.find('span').addClass('wpf_spin reverse_spin');\n\t\t\t\tthis._current_btn_label = this._current_btn.attr('title');\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\tthis._current_btn.attr( 'aria-label', opts.regenerate ).attr( 'title', opts.regenerate );\n\t\t\t}\n\t\t}\n\t\t\n\t\t_unblock_button() {\n\t\t\tif ( this._all_btn.length ) {\n\t\t\t\tthis._all_btn.removeClass('disabled');\n\t\t\t}\n\t\t\tif ( this._current_btn.length ) {\n\t\t\t\tthis._current_btn.find('span').removeClass('wpf_spin');\n\t\t\t\tthis._current_btn.find('span').removeClass('reverse_spin');\n\t\t\t\tthis._current_btn.attr( 'aria-label', this._current_btn_label ).attr( 'title', this._current_btn_label );\n\t\t\t}\n\t\t}\n\t\t\n\t\t/**\n\t\t * Generate Feed\n\t\t * @return void\n\t\t */\n\t\tgenerate() {\n\t\t\tlet self = this;\n\t\t\twindow.isRegenerating = true;\n\t\t\tthis._block_button();\n\t\t\tthis._resetProgressBar();\n\t\t\tthis._progressBarActive();\n\t\t\tthis._log( 'Counting Total Products' );\n\t\t\tthis._updateProgressStatus( 'Fetching products.' );\n\t\t\tthis._get_product_ids().then( response => {\n\t\t\t\tthis._progress = 10;\n\t\t\t\tself._log( {response} );\n\t\t\t\tif(response.success) {\n\t\t\t\t\tself._log( `Total ${response.total} Products found.` );\n\t\t\t\t\tself._product_ids = response.product;\n\t\t\t\t\tself._total_batch = this._product_ids.length;\n\t\t\t\t\tself._current_batch = 0;\n\t\t\t\t\tself._progress_per_batch = ( 90 - this._progress ) / this._total_batch;\n\t\t\t\t\tself._process_batch();\n\t\t\t\t\tself._updateProgressStatus( 'Processing Products...' );\n\t\t\t\t} else {\n\t\t\t\t\tself._updateProgressStatus( response.data.message );\n\t\t\t\t}\n\t\t\t}).fail( error => {\n\t\t\t\tself._log( error );\n\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\tself._color = 'red';\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tself._unblock_button();\n\t\t\t\t}, 1500 );\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Get Product Ids\n\t\t * @returns {$.promise}\n\t\t * @private\n\t\t */\n\t\t_get_product_ids() {\n\t\t\tthis._progress = 5;\n\t\t\treturn wpAjax.post( 'get_product_information', {\n\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\tfeed: this._feed,\n\t\t\t\tlimit: this._limit,\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Run the Batch\n\t\t * @private\n\t\t */\n\t\t_process_batch() {\n\t\t\tlet self = this;\n\t\t\tlet status = `Processing Batch ${this._current_batch+1} of ${this._total_batch}`;\n\t\t\tthis._updateProgressStatus( status );\n\t\t\tthis._log( status );\n\t\t\twpAjax.post( 'make_batch_feed', {\n\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\tfeed: this._feed,\n\t\t\t\tproducts: this._product_ids[this._current_batch],\n\t\t\t\tloop: this._current_batch,\n\t\t\t} ).then( response => {\n\t\t\t\tself._current_batch++;\n\t\t\t\tself._log( `Batch ${self._current_batch} Completed` );\n\t\t\t\tself._log( response );\n\t\t\t\tif ( self._current_batch < self._total_batch ) {\n\t\t\t\t\tself._process_batch();\n\t\t\t\t\tself._progress += self._progress_per_batch;\n\t\t\t\t}\n\t\t\t\tif ( self._current_batch === self._total_batch ) {\n\t\t\t\t\tself._save_feed_file();\n\t\t\t\t}\n\t\t\t} ).fail( error => {\n\t\t\t\tself._log( error );\n\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\tself._color = 'red';\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tself._unblock_button();\n\t\t\t\t}, 1500 );\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Save Feed Data from temp to feed file\n\t\t * @private\n\t\t */\n\t\t_save_feed_file() {\n\t\t\tlet self = this;\n\t\t\tthis._log( 'Saving feed file' );\n\t\t\tthis._updateProgressStatus( 'Saving feed file' );\n\t\t\twpAjax.post( 'save_feed_file', {\n\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\tfeed: this._feed,\n\t\t\t} ).then( response => {\n\t\t\t\tself._log( response );\n\t\t\t\tself._progress = 100;\n\t\t\t\tif ( self._refresh ) {\n\t\t\t\t\twindow.location.href = `${opts.pages.list.feed}&link=${response.url}&cat=${response.cat}`;\n\t\t\t\t}\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tsetTimeout( function(){\n\t\t\t\t\t\tself._resetProgressBar( true );\n\t\t\t\t\t\tself._unblock_button();\n\t\t\t\t\t}, 3000 );\n\t\t\t\t}, 2500 );\n\t\t\t} ).fail( error => {\n\t\t\t\tself._log( error );\n\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\tself._color = 'red';\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tself._unblock_button();\n\t\t\t\t}, 1500 );\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Console log wrapper with debug settings.\n\t\t * @param data\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_log( data ) {\n\t\t\t// noinspection JSUnresolvedVariable\n\t\t\tif ( opts.wpf_debug ) {\n\t\t\t\tconsole.log( data );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Run the progressbar refresh interval\n\t\t * @param {int} refreshInterval\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_progressBarActive( refreshInterval = 0 ) {\n\t\t\tlet self = this;\n\t\t\tthis._toggleProgressBar( true );\n\t\t\tthis._timer = setInterval( function(){\n\t\t\t\tself._updateProgressBar();\n\t\t\t}, refreshInterval || 1000 );\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Stop Progressbar\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_stopProgressBar() {\n\t\t\tclearInterval( this._timer );\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Reset Progressbar\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_resetProgressBar( update ) {\n\t\t\tthis._toggleProgressBar( false );\n\t\t\tthis._updateProgressStatus( '' );\n\t\t\tclearInterval( this._timer );\n\t\t\tthis._color = false;\n\t\t\tthis._timer = null;\n\t\t\tthis._progress = 0;\n\t\t\tif ( update ) {\n\t\t\t\tthis._updateProgressBar();\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Show hide the progress bar el\n\t\t * @param status\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_toggleProgressBar( status ) {\n\t\t\tlet table = $('#feed_progress_table');\n\t\t\tif ( status ) {\n\t\t\t\ttable.show();\n\t\t\t} else {\n\t\t\t\ttable.hide();\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Update Progress bar text status\n\t\t * @param {string} status\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_updateProgressStatus( status ) {\n\t\t\t$( '.feed-progress-status' ).text( status );\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Update Progress Data\n\t\t * hooked with setInterval\n\t\t * @private\n\t\t */\n\t\t_updateProgressBar() {\n\t\t\tlet percentage = $( '.feed-progress-percentage' ),\n\t\t\t\tbar = $( '.feed-progress-bar-fill' ),\n\t\t\t\t_progress = `${Math.round( this._progress )}%`;\n\t\t\tbar.css( {\n\t\t\t\twidth: _progress,\n\t\t\t} );\n\t\t\tpercentage.text( _progress );\n\t\t}\n\t}\n\t// expose to the global scope\n\twindow.wf = {\n\t\thelper: helper,\n\t\tfeedEditor: feedEditor,\n\t\tgenerator: feedGenerator,\n\t};\n\t$(window).on('load', function() {\n\t\t// Template loading ui conflict\n\t\tif ($(location).attr(\"href\").match(/webappick.*feed/g) !== null) {\n\t\t\t$('#wpbody-content').addClass('woofeed-body-content');\n\t\t}\n\n\t\t// on edit page show item wrapper dropdown\n\t\tlet current_page_url_query = window.location.search;\n\t\tlet urlParams = new URLSearchParams(current_page_url_query);\n\t\tlet page_action = urlParams.get('action');\n\n\t\t// ClipBoardJS\n\t\tclip();\n\t\t// postbox toggle\n\t\tpostboxes.add_postbox_toggles(pagenow);\n\t\t// initialize generator\n\t\tlet generator = new feedGenerator();\n\t\tgenerator.init();\n\t\t// noinspection JSUnresolvedVariable\n\t\tif( '' !== opts.generator.feed && opts.generator.regenerate ) {\n\t\t\n\t\t}\n\t\t// initialize editor\n\t\tfeedEditor.init();\n\t\thelper.common(); // Generate Feed Add Table Row\n\t\ttooltip();\n\t\t// validate feed editor\n\t\t$(\".generateFeed\").validate();\n\t\t// document events\n\t\t$(document)\n\t\t\t.on('click', '[data-toggle_slide]', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$($(this).data('toggle_slide')).slideToggle('fast');\n\t\t\t})\n\t\t\t// XML Feed Wrapper\n\t\t\t.on('click', '#wf_newRow', function () {\n\t\t\t\tlet tbody = $('#table-1 tbody'),\n\t\t\t\t\ttemplate = $('#feed_config_template').text().trim().replace(/__idx__/g, tbody.find('tr').length);\n\t\t\t\ttbody.append(template);\n\t\t\t\thelper.fancySelect($('.outputType'));\n\t\t\t})\n\t\t\t// feed delete alert.\n\t\t\t.on('click', '.single-feed-delete', function (event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\tif (confirm(opts.form.del_confirm)) {\n\t\t\t\t\twindow.location.href = $(this).attr('val');\n\t\t\t\t}\n\t\t\t})\n\t\t\t// clear cache data.\n\t\t\t.on('click', '.wf_clean_cache_wrapper', function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tvar nonce = $('.woo-feed-clean-cache-nonce').val();\n\t\t\t\tvar loader = $('.woo-feed-cache-loader');\n\n\t\t\t\t//show loader\n\t\t\t\tloader.show();\n\n\t\t\t\t// passed cache nonce\n\t\t\t\twpAjax.post('clear_cache_data', {\n\t\t\t\t\t_ajax_clean_nonce: nonce\n\t\t\t\t}).then(function (response) {\n\t\t\t\t\tif( response.success ) {\n\t\t\t\t\t\tloader.hide(); //hide loader\n\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t}\n\t\t\t\t}).fail(function (e) {\n\t\t\t\t\tconsole.log('something wrong');\n\t\t\t\t});\n\n\t\t\t})// Copy Status\n\t\t\t.on('click', '#woo-feed-copy-status-btn', function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tlet button = $('#woo-feed-copy-status-btn');\n\t\t\t\tlet status_area = $('#woo-feed-status-area');\n\t\t\t\tbutton.val('Copied');\n\t\t\t\tstatus_area.css('visibility','visible');\n\t\t\t\tstatus_area.select();\n\n\t\t\t\tdocument.execCommand('copy');\n\t\t\t})\n\t\t\t// feed value dropdown change.\n\t\t\t.on('change', '.wf_attr.wf_attributes', function(event) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t$('.fancy-picker-picked').trigger(\"click\"); // trigger fancy select box clicked\n\n\t\t\t\t// price attributes\n\t\t\t\tvar price_attributes = ['price', 'current_price', 'sale_price', 'price_with_tax', 'current_price_with_tax', 'sale_price_with_tax'];\n\t\t\t\t// current value\n\t\t\t\tvar current_attribute_value = $(this).val();\n\t\t\t\tvar outputSelect = $(this).parents('tr').find('.outputType');\n\t\t\t\tvar fancyOption = $(this).parents('tr').find('.fancy-picker-content .fancy-picker-option');\n\t\t\t\tvar fancyDataPicker = $(this).parents('tr').find('.fancy-picker-data span');\n\t\t\t\tvar selectIf, selectKey;\n\n\t\t\t\t// when any attribute is selected, pick the key\n\t\t\t\tif( price_attributes.includes(current_attribute_value) ) {\n\t\t\t\t\t// when select any price attribute\n\t\t\t\t\tselectIf = 'for_price';\n\t\t\t\t\tselectKey = \"Price\";\n\t\t\t\t} else if ( \"\" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {\n\n\t\t\t\t\t// when select any custom taxonomy\n\t\t\t\t\tselectIf = 'for_custom_taxo';\n\t\t\t\t\tselectKey = \"parent_if_empty\";\n\t\t\t\t} else {\n\n\t\t\t\t\tselectIf = 'for_all';\n\t\t\t\t\tselectKey = 'Default';\n\t\t\t\t}\n\n\t\t\t\t// remove selected class from old selected option\n\t\t\t\tfancyOption.removeClass('selected');\n\n\t\t\t\t// when value dropdown is selected as price or any custom taxonomy\n\t\t\t\tif( selectIf === 'for_custom_taxo' || selectIf === 'for_price' ) {\n\n\t\t\t\t\t// update \"Option Type\" when select key matches\n\t\t\t\t\tfancyOption.each(function(item) {\n\t\t\t\t\t\tif( selectKey === $(this).text() ) {\n\t\t\t\t\t\t\t$(this).addClass('selected');\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\n\t\t\t\t\t// update \"Option Type\" when select key matches\n\t\t\t\t\t// fancyOption.each(function(item) {\n\t\t\t\t\t// \tif( \"parent_if_empty\" !== $(this).text() && \"for_all\" === selectIf ) {\n\t\t\t\t\t// \t\t$(this).addClass('selected');\n\t\t\t\t\t// \t\tfancyDataPicker.text(selectKey);\n\t\t\t\t\t// \t\toutputSelect.find(\"option\").text(selectKey);\n\t\t\t\t\t// \t\toutputSelect.find(\"option\").val( $(this).data('value') );\n\t\t\t\t\t// \t}\n\t\t\t\t\t// });\n\t\t\t\t}\n\n\t\t\t})\n\t\t\t// bulk delete alert.\n\t\t\t.on('click', '#doaction, #doaction2', function () {\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\treturn confirm(opts.form.del_confirm_multi);\n\t\t\t})\n\t\t\t// Generate Feed Table Row Delete\n\t\t\t.on('change', '.dType', function () {\n\t\t\t\tlet self = $(this),\n\t\t\t\t\ttype = self.val(),\n\t\t\t\t\trow = self.closest('tr');\n\t\t\t\t\n\t\t\t\tif (type === 'pattern') {\n\t\t\t\t\trow.find('.value_attribute').hide();\n\t\t\t\t\trow.find('.value_pattern').show();\n\t\t\t\t} else if (type === 'attribute') {\n\t\t\t\t\trow.find('.value_attribute').show();\n\t\t\t\t\trow.find('.value_pattern').hide();\n\t\t\t\t} else if (type === 'remove') {\n\t\t\t\t\trow.find('.value_attribute').hide();\n\t\t\t\t\trow.find('.value_pattern').hide();\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Generate Feed Form Submit\n\t\t\t.on('click', '.delRow', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$(this).closest('tr').remove();\n\t\t\t\thelper.reindex_config_table();\n\t\t\t})\n\t\t\t.on('submit', '#generateFeed', function () {\n\t\t\t\t// Feed Generating form validation\n\t\t\t\t$(this).validate();\n\t\t\t\t\n\t\t\t\tif ($(this).valid()) {\n\t\t\t\t\t$(\".makeFeedResponse\")\n\t\t\t\t\t\t.show()\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\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Generate Update Feed Form Submit\n\t\t\t.on('submit', '#updatefeed', function (e, data) {\n\t\t\t\t// Feed Generating form validation\n\t\t\t\t$(this).validate();\n\t\t\t\t\n\t\t\t\tif ($(this).valid()) {\n\t\t\t\t\t$(\".makeFeedResponse\")\n\t\t\t\t\t\t.show()\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\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('change', '.ftporsftp', function () {\n\t\t\t\tlet server = $(this).val(),\n\t\t\t\t\tstatus = $('.ssh2_status');\n\t\t\t\t\n\t\t\t\tif (server === 'sftp') {\n\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\tstatus.show().css('color', 'dodgerblue').text(opts.form.sftp_checking);\n\t\t\t\t\twpAjax.post('get_ssh2_status', {\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\tserver: server\n\t\t\t\t\t}).then(function (response) {\n\t\t\t\t\t\tif (response === 'exists') {\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\t\tstatus.css('color', '#2CC185').text(opts.form.sftp_available);\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\tstatus.hide();\n\t\t\t\t\t\t\t}, 1500);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\t\tstatus.show().css('color', 'red').text(opts.form.sftp_warning);\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(function (e) {\n\t\t\t\t\t\tstatus.hide();\n\t\t\t\t\t\thelper.ajax_fail(e);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tstatus.hide();\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('click', '[name=\"save_feed_config\"]', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$('#updatefeed').trigger('submit', {\n\t\t\t\t\tsave: true\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('change', '#provider', function (event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t\n\t\t\t\t//if (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.\n\n\t\t\t\tlet merchant = $(this).val(),\n\t\t\t\t\tfeedType = $(\"#feedType\"),\n\t\t\t\t\tfeedForm = $(\"#providerPage\"),\n\t\t\t\t\tmerchantInfo = $('#feed_merchant_info'); // set loading..\n\t\t\t\t\n\t\t\t\t// noinspection JSUnresolvedVariable\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\n\t\t\t\t\n\t\t\t\tmerchantInfo.find('.spinner').addClass('is-active');\n\t\t\t\tfeedType.disabled(!0); // disable dropdown\n\t\t\t\t\n\t\t\t\tfeedType.parent().find('.spinner').addClass('is-active');\n\t\t\t\tmerchantInfo.find('.merchant-info-section .data').html(''); // remove previous data\n\t\t\t\t// Get Merchant info for selected Provider/Merchant\n\n\n\t\t\t\t\n\t\t\t\tif (merchantInfoCache.hasOwnProperty(merchant)) {\n\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);\n\t\t\t\t} else {\n\t\t\t\t\twpAjax.send('woo_feed_get_merchant_info', {\n\t\t\t\t\t\ttype: 'GET',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tnonce: opts.nonce,\n\t\t\t\t\t\t\tprovider: merchant\n\t\t\t\t\t\t}\n\t\t\t\t\t}).then(function (r) {\n\t\t\t\t\t\tmerchantInfoCache[merchant] = r;\n\t\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, r);\n\t\t\t\t\t}).fail(helper.ajax_fail);\n\t\t\t\t} // Get FeedForm For Selected Provider/Merchant\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (merchantTemplateCache.hasOwnProperty(merchant)) {\n\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, merchantTemplateCache[merchant]);\n\t\t\t\t} else {\n\t\t\t\t\twpAjax.post('get_feed_merchant', {\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\tmerchant: merchant\n\t\t\t\t\t}).then(function (r) {\n\t\t\t\t\t\tmerchantTemplateCache[merchant] = r;\n\t\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, r);\n\n\t\t\t\t\t\t//when merchant is bing, change delimiter and enclosure\n\t\t\t\t\t\tif( 'bing' === merchant ) {\n\t\t\t\t\t\t\t//delimiter value\n\t\t\t\t\t\t\t$(\"#delimiter option\").removeAttr('selected');\n\t\t\t\t\t\t\t$(\"#delimiter option[value=\\\"tab\\\"]\").attr('selected', 'selected');\n\n\t\t\t\t\t\t\t//enclosure value\n\t\t\t\t\t\t\t$(\"#enclosure option\").removeAttr('selected');\n\t\t\t\t\t\t\t$(\"#enclosure option[value=\\\" \\\"]\").attr('selected', 'selected');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//reviewer options hide\n\t\t\t\t\t\tif( 'google_product_review' !== merchant) {\n\t\t\t\t\t\t\t$('.wf_attributes option[value=\"reviewer_name\"]').hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(helper.ajax_fail);\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Feed Active and Inactive status change via ajax\n\t\t\t.on('change', '.woo_feed_status_input', function () {\n\t\t\t\tlet self = $(this);\n\t\t\t\twpAjax.post('update_feed_status', {\n\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\tfeedName: self.val(),\n\t\t\t\t\tstatus: self[0].checked ? 1 : 0\n\t\t\t\t});\n\t\t\t});\n\t\t// event with trigger\n\t\t$(document)\n\t\t\t.on('change', '[name=\"is_outOfStock\"], [name=\"product_visibility\"]', function () {\n\t\t\t\tlet outOfStockVisibilityRow = $('.out-of-stock-visibility');\n\t\t\t\tif ($('[name=\"is_outOfStock\"]:checked').val() === 'n' && $('[name=\"product_visibility\"]:checked').val() === '1') {\n\t\t\t\t\toutOfStockVisibilityRow.show();\n\t\t\t\t} else {\n\t\t\t\t\toutOfStockVisibilityRow.hide();\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('change', '.attr_type', function () {\n\t\t\t\t// Attribute type selection\n\t\t\t\tlet self = $(this),\n\t\t\t\t\ttype = self.val(),\n\t\t\t\t\trow = self.closest('tr');\n\t\t\t\t\n\t\t\t\tif (type === 'pattern') {\n\t\t\t\t\trow.find('.wf_attr').hide();\n\t\t\t\t\trow.find('.wf_attr').val('');\n\t\t\t\t\trow.find('.wf_default').show();\n\t\t\t\t} else {\n\t\t\t\t\trow.find('.wf_attr').show();\n\t\t\t\t\trow.find('.wf_default').hide();\n\t\t\t\t\trow.find('.wf_default').val('');\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('change', '.wf_mattributes, .attr_type', function () {\n\t\t\t\tlet row = $(this).closest('tr'),\n\t\t\t\t\tattribute = row.find('.wf_mattributes'),\n\t\t\t\t\ttype = row.find('.attr_type'),\n\t\t\t\t\tvalueColumn = row.find('td:eq(4)'),\n\t\t\t\t\tprovider = $('#provider').val();\n\t\t\t\t\n\t\t\t\t// noinspection JSUnresolvedVariable\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()])) {\n\t\t\t\t\tif (valueColumn.find('select.selectize').length === 0) {\n\t\t\t\t\t\tvalueColumn.find('input.wf_default').remove();\n\t\t\t\t\t\tvalueColumn.append('<span class=\"wf_default wf_attributes\"><select name=\"default[]\" class=\"selectize\"></select></span>');\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\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>`);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!googleCategories) {\n\t\t\t\t\t\t\tvalueColumn.append('<span class=\"spinner is-active\" style=\"margin: 0;\"></span>');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tlet select = valueColumn.find('.wf_attributes select');\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\thelper.selectize(select, {\n\t\t\t\t\t\t\tpreload: true,\n\t\t\t\t\t\t\tplaceholder: opts.form.select_category,\n\t\t\t\t\t\t\tload: function load(query, cb) {\n\t\t\t\t\t\t\t\tif (!googleCategories) {\n\t\t\t\t\t\t\t\t\twpAjax.send('get_google_categories', {\n\t\t\t\t\t\t\t\t\t\ttype: 'GET',\n\t\t\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\t\t\t\t\t\taction: \"get_google_categories\",\n\t\t\t\t\t\t\t\t\t\t\tprovider: provider\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}).then(function (r) {\n\t\t\t\t\t\t\t\t\t\tgoogleCategories = r;\n\t\t\t\t\t\t\t\t\t\tcb(googleCategories);\n\t\t\t\t\t\t\t\t\t\tvalueColumn.find('.spinner').remove();\n\t\t\t\t\t\t\t\t\t}).fail(helper.ajax_fail);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcb(googleCategories);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (attribute.val() !== 'current_category' && valueColumn.find('input.wf_default').length === 0) {\n\t\t\t\t\t\tvalueColumn.find('span').remove();\n\t\t\t\t\t\tvalueColumn.append('<input autocomplete=\"off\" class=\"wf_default wf_attributes\" type=\"text\" name=\"default[]\" value=\"\">');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (type.val() !== 'pattern') {\n\t\t\t\t\t\t\tvalueColumn.find('input.wf_default').hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('change', '#feedType,#provider', function (e) {\n\t\t\t\tlet type = $('#feedType').val(),\n\t\t\t\t\tprovider = $('#provider').val(),\n\t\t\t\t\titemWrapper = $('.itemWrapper'),\n\t\t\t\t\twf_csv_txt = $('.wf_csvtxt');\n\t\t\t\t\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\tif (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {\n\t\t\t\t\titemWrapper.hide();\n\t\t\t\t}\n\n\t\t\t\t//when feed type is changed\n\t\t\t\tif( 'feedType' === e.target.id ) {\n\t\t\t\t\tif (type === 'csv' || type === 'txt' || type === 'tsv') {\n\t\t\t\t\t\titemWrapper.hide();\n\t\t\t\t\t\twf_csv_txt.show();\n\n\t\t\t\t\t\tif( 'tsv' === type ) {\n\t\t\t\t\t\t\t$('#delimiter option:last').prop(\"selected\", \"selected\");\n\t\t\t\t\t\t} else if( 'csv' === type ) {\n\t\t\t\t\t\t\t$('#delimiter option:first').prop(\"selected\", \"selected\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if( type === 'xml' ) {\n\t\t\t\t\t\titemWrapper.show();\n\t\t\t\t\t\twf_csv_txt.hide();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t})\n\t\t\t.trigger('change');\n\t});\n})(jQuery, window, document, wp.ajax, wpf_ajax_obj);\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","postboxes","location","setInterval","URLSearchParams","pagenow","template","common","hover","title","appendTo","userAgent","merchantTemplateCache","remove","ClipboardJS","clipboard","slideToggle","loader","tbody","reload","nonce","status_area","select","execCommand","button","fancyOption","fancyDataPicker","selectIf","price_attributes","selectKey","percentage","outputSelect","parents","includes","current_attribute_value","indexOf","del_confirm_multi","row","closest","reindex_config_table","type","_ajax_clean_nonce","server","validate","save","sftp_checking","sftp_available","provider","merchant","outOfStockVisibilityRow","feedName","checked","valueColumn","append","preload","load","google_category","query","attribute","cb","send","itemWrapper","item_wrapper_hidden","WooFeedCustomFields","productCustomFields","url","_classCallCheck","field","isTaxonomy","_this2","wpf_ajax_obj","success","log"],"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,E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AAA,EAAAA,cAEAwB,KAAAA,GAAMjE,EAANhI,SAAAmL,EAAApK,EAAAqC,KAAA8I,sBACAzB,EAAAA,kCAMD0B,QAAAA,GAtaA,QAsaAA,GAtaA,QAAAvB,GA6aAqB,EAAA9F,OAA8BrF,EAAAA,OAC7B,QAAAsL,EACCZ,EAAAA,0BAAAA,KAAAA,WAAAA,uBA/aFtN,EAAA,2BAAAF,KAAA,WAAA,aAAA,QAAA4M,IAkbEY,EAAAA,OAmFD7M,EAAAA,WA/EET,QAAA8C,UAEDqL,IAAAA,EAFC,WAqFFhM,SAAAA,EAAAA,EAAAA,EAAAA,GArFEiM,gBAAA7K,KAAA0K,GAtbH1K,KAAA2K,oBAAAG,EAAApL,EAAAqL,UA6bkChP,aAAA2O,EAAA,CAAA,kBAAAxF,MAAA,WAAA,IAAAtG,EAAAmM,CAC9B7N,OAAA0B,0CACCvC,MAAAA,aAAAA,KAAAA,OAECuC,EAAAA,KAAAA,CACC+F,OAAAA,OACAzH,IAAAA,aAAAA,aALH0B,KAAAA,MASEN,CACAgM,IAAAA,sBACAP,MAAAA,SAAAA,EAAAA,EAAAA,GACA,IAAAiB,EAAA1G,KAEDgG,EAAAA,EAFCtE,UAEDsE,aAAAA,IAHCP,GAAAA,EAID1L,EAAA,EAAAA,UAAAiG,OAJCyF,OAID9D,EACDrH,EAAA,CApBuB1B,OAAA,uCAOf6K,MAAAkD,aAAA1L,KAAAwI,MAgBX+C,MAAAA,EAjdDpL,OAAAA,gBAAAjD,EAAA8C,KAAA,eAodEwK,IAAAA,aAAAA,aAmFHnL,KAAIkM,EAAJI,QAjFGH,SAAInM,GACHmL,EAAAA,QACAiB,EAAAN,aAxdHrM,QAAA8M,IAAA7G,YAsbG","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\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\tlocation.reload();\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\t// fancyOption.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' || type === 'tsv') {\r\n\t\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t\t\twf_csv_txt.show();\r\n\r\n\t\t\t\t\t\tif( 'tsv' === type ) {\r\n\t\t\t\t\t\t\t$('#delimiter option:last').prop(\"selected\", \"selected\");\r\n\t\t\t\t\t\t} else if( 'csv' === type ) {\r\n\t\t\t\t\t\t\t$('#delimiter option:first').prop(\"selected\", \"selected\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if( type === 'xml' ) {\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\r\n\r\n\t\t// product Attribute class\r\n\t\tclass WooFeedCustomFields {\r\n\r\n\t\t\tconstructor( field, status, isTaxonomy ) {\r\n\t\t\t\tthis.productCustomFields( field, status, isTaxonomy );\r\n\t\t\t}\r\n\r\n\t\t\tcacheClear() {\r\n\t\t\t\tlet data = {\r\n\t\t\t\t\taction: 'woo_feed_product_attribute_cache_remove',\r\n\t\t\t\t\tnonce: wpf_ajax_obj.ajax.nonce,\r\n\t\t\t\t};\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\tmethod: 'POST',\r\n\t\t\t\t\turl: wpf_ajax_obj.wpf_ajax_url,\r\n\t\t\t\t\tdata\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tproductCustomFields( field, status = false, isTaxonomy ) {\r\n\t\t\t\tlet data = {\r\n\t\t\t\t\taction: 'woo_feed_custom_fields_status_change',\r\n\t\t\t\t\tnonce: wpf_ajax_obj.ajax.nonce,\r\n\t\t\t\t\tfield,\r\n\t\t\t\t\tstatus,\r\n\t\t\t\t\tisTaxonomy\r\n\t\t\t\t};\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\tmethod: 'POST',\r\n\t\t\t\t\turl: wpf_ajax_obj.wpf_ajax_url,\r\n\t\t\t\t\tdata,\r\n\t\t\t\t\tsuccess: ( response ) => {\r\n\t\t\t\t\t\tif( response.success ) {\r\n\t\t\t\t\t\t\tthis.cacheClear();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.log( response );\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}\r\n\r\n\t\t$(document).on('click', '.woofeed-custom-fields [id*=\"-switcher\"]', function () {\r\n\t\t\tlet field = $(this).attr( 'id' ).split( '-' )[0],\r\n\t\t\t\tisTaxonomy = $(this).data( 'taxonomy' ),\r\n\t\t\t\tstatus = $(this).prop( 'checked' );\r\n\t\t\tnew WooFeedCustomFields( field, status, isTaxonomy );\r\n\t\t});\r\n\t});\r\n})(jQuery, window, document, wp.ajax, wpf_ajax_obj);\r\n"]}
|
admin/partials/woo-feed-settings.php
CHANGED
@@ -24,7 +24,12 @@ $settings = woo_feed_get_options( 'all' );
|
|
24 |
<tr>
|
25 |
<th colspan="2">
|
26 |
<b><?php esc_html_e( 'Common Settings', 'woo-feed' ); ?></b>
|
27 |
-
<span style="float: right;"
|
|
|
|
|
|
|
|
|
|
|
28 |
</th>
|
29 |
</tr>
|
30 |
</thead>
|
@@ -105,30 +110,6 @@ $settings = woo_feed_get_options( 'all' );
|
|
105 |
<p class="description"><?php esc_html_e( 'Turn off when you don\'t want to override default WooCommerce Product Schema', 'woo-feed' ); ?></p>
|
106 |
</td>
|
107 |
</tr>
|
108 |
-
<tr>
|
109 |
-
<td><label for="disable_mpn"><?php _e( 'Disable/Enable GTIN/MPN/EAN', 'woo-feed' ); ?></label></td>
|
110 |
-
<td>
|
111 |
-
<label for="disable_mpn">
|
112 |
-
<select name="disable_mpn" id="disable_mpn">
|
113 |
-
<option value="disable"<?php selected( $settings['disable_mpn'], 'disable' ); ?>><?php esc_html_e( 'Disabled', 'woo-feed' ); ?></option>
|
114 |
-
<option value="enable"<?php selected( $settings['disable_mpn'], 'enable' ); ?>><?php esc_html_e( 'Enabled', 'woo-feed' ); ?></option>
|
115 |
-
</select>
|
116 |
-
</label>
|
117 |
-
<p class="description"><?php esc_html_e( 'Disables or Enables GTIN/MPN/EAN', 'woo-feed' ); ?></p>
|
118 |
-
</td>
|
119 |
-
</tr>
|
120 |
-
<tr>
|
121 |
-
<td><label for="disable_brand"><?php _e( 'Disable/Enable Brand', 'woo-feed' ); ?></label></td>
|
122 |
-
<td>
|
123 |
-
<label for="disable_brand">
|
124 |
-
<select name="disable_brand" id="disable_brand">
|
125 |
-
<option value="disable"<?php selected( $settings['disable_brand'], 'disable' ); ?>><?php esc_html_e( 'Disabled', 'woo-feed' ); ?></option>
|
126 |
-
<option value="enable"<?php selected( $settings['disable_brand'], 'enable' ); ?>><?php esc_html_e( 'Enabled', 'woo-feed' ); ?></option>
|
127 |
-
</select>
|
128 |
-
</label>
|
129 |
-
<p class="description"><?php esc_html_e( 'Disables or Enables Brand', 'woo-feed' ); ?></p>
|
130 |
-
</td>
|
131 |
-
</tr>
|
132 |
<tr>
|
133 |
<td><label for="disable_pixel"><?php esc_html_e( 'Disable/Enable Facebook Pixel', 'woo-feed' ); ?></label></td>
|
134 |
<td>
|
@@ -206,6 +187,45 @@ $settings = woo_feed_get_options( 'all' );
|
|
206 |
</tr>
|
207 |
</tbody>
|
208 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
</form>
|
210 |
</div>
|
211 |
</div>
|
24 |
<tr>
|
25 |
<th colspan="2">
|
26 |
<b><?php esc_html_e( 'Common Settings', 'woo-feed' ); ?></b>
|
27 |
+
<span style="float: right;">
|
28 |
+
<?php
|
29 |
+
esc_html_e( 'Version ', 'woo-feed' );
|
30 |
+
echo esc_html( WOO_FEED_FREE_VERSION );
|
31 |
+
?>
|
32 |
+
</span>
|
33 |
</th>
|
34 |
</tr>
|
35 |
</thead>
|
110 |
<p class="description"><?php esc_html_e( 'Turn off when you don\'t want to override default WooCommerce Product Schema', 'woo-feed' ); ?></p>
|
111 |
</td>
|
112 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
<tr>
|
114 |
<td><label for="disable_pixel"><?php esc_html_e( 'Disable/Enable Facebook Pixel', 'woo-feed' ); ?></label></td>
|
115 |
<td>
|
187 |
</tr>
|
188 |
</tbody>
|
189 |
</table>
|
190 |
+
<br><br>
|
191 |
+
<table class="widefat fixed woofeed-custom-fields" role="presentation">
|
192 |
+
<thread>
|
193 |
+
<tr style="box-shadow: 0 1px #c3c4c7;">
|
194 |
+
<th><b><?php esc_html_e( 'Custom Fields', 'woo-feed' ); ?></b></th>
|
195 |
+
<th style="float:right"><b><?php esc_html_e( 'Action', 'woo-feed') ?></b></th>
|
196 |
+
</tr>
|
197 |
+
</thread>
|
198 |
+
<tbody>
|
199 |
+
|
200 |
+
<?php
|
201 |
+
$custom_fields = woo_feed_product_custom_fields();
|
202 |
+
if ( is_array( $custom_fields ) && ! empty( $custom_fields ) ) {
|
203 |
+
$get_settings = woo_feed_get_options('all');
|
204 |
+
if ( isset( $get_settings['woo_feed_taxonomy'], $get_settings['woo_feed_identifier'] ) ) {
|
205 |
+
$custom_attributes = array_merge( $get_settings['woo_feed_taxonomy'], $get_settings['woo_feed_identifier'] );
|
206 |
+
}
|
207 |
+
foreach ( $custom_fields as $key => $value ) {
|
208 |
+
$custom_field_id = sprintf( '%s-switcher', strtolower( $key ) );
|
209 |
+
$custom_field_name = isset( $value[0] ) ? sanitize_text_field( $value[0] ) : '';
|
210 |
+
$is_enable = isset( $custom_attributes[ $key ] ) ? 'enable' === $custom_attributes[ $key ] : ( isset( $value[1] ) ? $value[1] : false );
|
211 |
+
$is_taxonomy = isset( $value[2] ) ? $value[2] : false;
|
212 |
+
?>
|
213 |
+
<tr style="box-shadow: 0 1px #c3c4c7;">
|
214 |
+
<td><label style="font-weight: bold;" for="<?php echo esc_attr( $custom_field_id ); ?>"><?php echo esc_html( $custom_field_name ); ?></label></td>
|
215 |
+
<td style="float:right">
|
216 |
+
<label class="switch">
|
217 |
+
<input type="checkbox" id="<?php echo esc_attr( $custom_field_id ); ?>" <?php
|
218 |
+
echo esc_attr( sprintf( 'data-taxonomy=%s ', $is_taxonomy ? 'true' : 'false' ) ); echo $is_enable ? 'checked' : ''; ?>>
|
219 |
+
<span class="slider round"></span>
|
220 |
+
</label>
|
221 |
+
</td>
|
222 |
+
</tr>
|
223 |
+
<?php
|
224 |
+
}
|
225 |
+
}
|
226 |
+
?>
|
227 |
+
</tbody>
|
228 |
+
</table>
|
229 |
</form>
|
230 |
</div>
|
231 |
</div>
|
includes/classes/class-woo-feed-dropdown.php
CHANGED
@@ -427,7 +427,6 @@ class Woo_Feed_Dropdown {
|
|
427 |
'canonical_link' => esc_html__( 'Canonical URL', 'woo-feed' ),
|
428 |
'ex_link' => esc_html__( 'External Product URL', 'woo-feed' ),
|
429 |
'add_to_cart_link' => esc_html__( 'Add to Cart URL', 'woo-feed' ),
|
430 |
-
'condition' => esc_html__( 'Condition', 'woo-feed' ),
|
431 |
'item_group_id' => esc_html__( 'Parent Id [Group Id]', 'woo-feed' ),
|
432 |
'sku' => esc_html__( 'SKU', 'woo-feed' ),
|
433 |
'sku_id' => esc_html__( 'SKU_ID', 'woo-feed' ),
|
@@ -466,12 +465,24 @@ class Woo_Feed_Dropdown {
|
|
466 |
'tax' => esc_html__( 'Tax', 'woo-feed' ),
|
467 |
'tax_class' => esc_html__( 'Tax Class', 'woo-feed' ),
|
468 |
'tax_status' => esc_html__( 'Tax Status', 'woo-feed' ),
|
469 |
-
'woo_feed_gtin' => esc_html__( 'GTIN', 'woo-feed' ),
|
470 |
-
'woo_feed_mpn' => esc_html__( 'MPN', 'woo-feed' ),
|
471 |
-
'woo_feed_ean' => esc_html__( 'EAN', 'woo-feed' ),
|
472 |
'---1' => '',
|
473 |
);
|
474 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
|
476 |
//add all_in_one_seo_pack title array in the dropdown
|
477 |
if ( in_array( 'title', array_keys($attributes) ) ) {
|
427 |
'canonical_link' => esc_html__( 'Canonical URL', 'woo-feed' ),
|
428 |
'ex_link' => esc_html__( 'External Product URL', 'woo-feed' ),
|
429 |
'add_to_cart_link' => esc_html__( 'Add to Cart URL', 'woo-feed' ),
|
|
|
430 |
'item_group_id' => esc_html__( 'Parent Id [Group Id]', 'woo-feed' ),
|
431 |
'sku' => esc_html__( 'SKU', 'woo-feed' ),
|
432 |
'sku_id' => esc_html__( 'SKU_ID', 'woo-feed' ),
|
465 |
'tax' => esc_html__( 'Tax', 'woo-feed' ),
|
466 |
'tax_class' => esc_html__( 'Tax Class', 'woo-feed' ),
|
467 |
'tax_status' => esc_html__( 'Tax Status', 'woo-feed' ),
|
|
|
|
|
|
|
468 |
'---1' => '',
|
469 |
);
|
470 |
|
471 |
+
$custom_fields = woo_feed_product_custom_fields();
|
472 |
+
$custom_identifier_filter = new Woo_Feed_Custom_Identifier_Filter( $custom_fields );
|
473 |
+
$custom_identifier = iterator_to_array( $custom_identifier_filter );
|
474 |
+
$product_attribute_enables = [];
|
475 |
+
if ( ! empty( $custom_identifier ) ) {
|
476 |
+
foreach ( $custom_identifier as $key => $value ) {
|
477 |
+
$product_attribute_enables[ 'woo_feed_identifier_' . sanitize_text_field( wp_unslash( $key ) ) ] = sanitize_text_field( $value[0] );
|
478 |
+
}
|
479 |
+
}
|
480 |
+
array_splice_preserve_keys( $attributes, count($attributes) - 1, 0, $product_attribute_enables );
|
481 |
+
if ( woo_feed_is_multi_vendor() ) {
|
482 |
+
$product_attr_dokan['vendor_store_name'] = esc_html__( 'Vendor Store Name', 'woo-feed' );
|
483 |
+
woo_feed_array_splice_preserve_keys( $attributes, count($attributes) - 1, 0, $product_attr_dokan );
|
484 |
+
}
|
485 |
+
|
486 |
if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
|
487 |
//add all_in_one_seo_pack title array in the dropdown
|
488 |
if ( in_array( 'title', array_keys($attributes) ) ) {
|
includes/classes/class-woo-feed-products-v3.php
CHANGED
@@ -232,24 +232,36 @@ class Woo_Feed_Products_v3
|
|
232 |
'yith_bundle',
|
233 |
'woosb',
|
234 |
);
|
|
|
235 |
/**
|
236 |
* Post meta prefix for dropdown item
|
237 |
* @since 3.1.18
|
238 |
* @var string
|
239 |
*/
|
240 |
const POST_META_PREFIX = 'wf_cattr_';
|
|
|
241 |
/**
|
242 |
* Product Attribute (taxonomy & local) Prefix
|
243 |
* @since 3.1.18
|
244 |
* @var string
|
245 |
*/
|
246 |
const PRODUCT_ATTRIBUTE_PREFIX = 'wf_attr_';
|
|
|
247 |
/**
|
248 |
* Product Taxonomy Prefix
|
249 |
* @since 3.1.18
|
250 |
* @var string
|
251 |
*/
|
252 |
const PRODUCT_TAXONOMY_PREFIX = 'wf_taxo_';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
/**
|
254 |
* Product Category Mapping Prefix
|
255 |
* @since 3.1.18
|
@@ -1421,6 +1433,8 @@ class Woo_Feed_Products_v3
|
|
1421 |
|
1422 |
if ( method_exists($this, $attribute) ) {
|
1423 |
$output = call_user_func_array(array( $this, $attribute ), array( $product ));
|
|
|
|
|
1424 |
} elseif ( false !== strpos($attribute, self::PRODUCT_ATTRIBUTE_PREFIX) ) {
|
1425 |
$attribute = str_replace(self::PRODUCT_ATTRIBUTE_PREFIX, '', $attribute);
|
1426 |
$output = $this->getProductAttribute($product, $attribute);
|
@@ -3171,45 +3185,19 @@ class Woo_Feed_Products_v3
|
|
3171 |
}
|
3172 |
|
3173 |
/**
|
3174 |
-
* Get
|
3175 |
-
*
|
3176 |
-
* @return string
|
3177 |
-
*/
|
3178 |
-
protected function woo_feed_gtin( $product ) {
|
3179 |
-
$id = $product->get_id();
|
3180 |
-
$meta = 'woo_feed_gtin';
|
3181 |
-
if ( $product->is_type('variation') ) {
|
3182 |
-
$meta = 'woo_feed_gtin_var';
|
3183 |
-
}
|
3184 |
-
return $this->getProductMeta($product,$meta);
|
3185 |
-
}
|
3186 |
-
|
3187 |
-
/**
|
3188 |
-
* Get Product MPN
|
3189 |
-
* @param WC_Product $product Product object.
|
3190 |
-
* @return string
|
3191 |
-
*/
|
3192 |
-
protected function woo_feed_mpn( $product ) {
|
3193 |
-
$id = $product->get_id();
|
3194 |
-
$meta = 'woo_feed_mpn';
|
3195 |
-
if ( $product->is_type('variation') ) {
|
3196 |
-
$meta = 'woo_feed_mpn_var';
|
3197 |
-
}
|
3198 |
-
return $this->getProductMeta($product,$meta);
|
3199 |
-
}
|
3200 |
-
|
3201 |
-
/**
|
3202 |
-
* Get Product EAN
|
3203 |
* @param WC_Product $product Product object.
|
|
|
3204 |
* @return string
|
3205 |
*/
|
3206 |
-
protected
|
3207 |
-
$id
|
3208 |
-
$meta =
|
3209 |
-
if ( $product->is_type('variation') ) {
|
3210 |
-
$meta = '
|
3211 |
}
|
3212 |
-
return $this->getProductMeta($product
|
3213 |
}
|
3214 |
|
3215 |
/**
|
232 |
'yith_bundle',
|
233 |
'woosb',
|
234 |
);
|
235 |
+
|
236 |
/**
|
237 |
* Post meta prefix for dropdown item
|
238 |
* @since 3.1.18
|
239 |
* @var string
|
240 |
*/
|
241 |
const POST_META_PREFIX = 'wf_cattr_';
|
242 |
+
|
243 |
/**
|
244 |
* Product Attribute (taxonomy & local) Prefix
|
245 |
* @since 3.1.18
|
246 |
* @var string
|
247 |
*/
|
248 |
const PRODUCT_ATTRIBUTE_PREFIX = 'wf_attr_';
|
249 |
+
|
250 |
/**
|
251 |
* Product Taxonomy Prefix
|
252 |
* @since 3.1.18
|
253 |
* @var string
|
254 |
*/
|
255 |
const PRODUCT_TAXONOMY_PREFIX = 'wf_taxo_';
|
256 |
+
|
257 |
+
/**
|
258 |
+
* Product Custom Field Prefix
|
259 |
+
*
|
260 |
+
* @since 3.1.18
|
261 |
+
* @var string
|
262 |
+
*/
|
263 |
+
const PRODUCT_CUSTOM_IDENTIFIER = 'woo_feed_identifier_';
|
264 |
+
|
265 |
/**
|
266 |
* Product Category Mapping Prefix
|
267 |
* @since 3.1.18
|
1433 |
|
1434 |
if ( method_exists($this, $attribute) ) {
|
1435 |
$output = call_user_func_array(array( $this, $attribute ), array( $product ));
|
1436 |
+
} elseif ( false !== strpos( $attribute, self::PRODUCT_CUSTOM_IDENTIFIER ) ) {
|
1437 |
+
$output = $this->getCustomField( $product, $attribute );
|
1438 |
} elseif ( false !== strpos($attribute, self::PRODUCT_ATTRIBUTE_PREFIX) ) {
|
1439 |
$attribute = str_replace(self::PRODUCT_ATTRIBUTE_PREFIX, '', $attribute);
|
1440 |
$output = $this->getProductAttribute($product, $attribute);
|
3185 |
}
|
3186 |
|
3187 |
/**
|
3188 |
+
* Get CTX Feed Custom Field value
|
3189 |
+
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3190 |
* @param WC_Product $product Product object.
|
3191 |
+
* @param string $field custom field name.
|
3192 |
* @return string
|
3193 |
*/
|
3194 |
+
protected function getCustomField( $product, $field ) {
|
3195 |
+
$id = $product->get_id();
|
3196 |
+
$meta = $field;
|
3197 |
+
if ( $product->is_type( 'variation' ) ) {
|
3198 |
+
$meta = $field.'_var';
|
3199 |
}
|
3200 |
+
return $this->getProductMeta( $product, $meta );
|
3201 |
}
|
3202 |
|
3203 |
/**
|
includes/helper.php
CHANGED
@@ -2598,6 +2598,275 @@ if ( ! function_exists( 'woo_feed_filter_parsed_rules' ) ) {
|
|
2598 |
return $rules;
|
2599 |
}
|
2600 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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* Category Mapping
|
@@ -2749,201 +3018,6 @@ if ( ! function_exists( 'woo_feed_get_category_mapping_value' ) ) {
|
|
2749 |
}
|
2750 |
}
|
2751 |
|
2752 |
-
if ( ! function_exists( 'woo_feed_add_identifier_fields' ) ) {
|
2753 |
-
/**
|
2754 |
-
* Add Custom fields into product inventory tab for Unique Identifier (GTIN,MPN,EAN)
|
2755 |
-
*
|
2756 |
-
* @since 3.7.8
|
2757 |
-
*/
|
2758 |
-
function woo_feed_add_identifier_fields() {
|
2759 |
-
$settings = woo_feed_get_options( 'all' );
|
2760 |
-
|
2761 |
-
if ( isset($settings['disable_mpn']) && 'disable' !== $settings['disable_mpn'] ) {
|
2762 |
-
echo '<div class="options_group">';
|
2763 |
-
echo sprintf( '<h4 class="%s" style="padding-left: 10px;">%s</h4>', esc_attr( 'woo-feed-option-title' ), esc_html( 'Unique Identifier - Woo Feed', 'woo-feed' ) );
|
2764 |
-
|
2765 |
-
//GTIN input field
|
2766 |
-
woocommerce_wp_text_input( array(
|
2767 |
-
'id' => 'woo_feed_gtin',
|
2768 |
-
'value' => get_post_meta( get_the_ID(), 'woo_feed_gtin', true ),
|
2769 |
-
'placeholder' => esc_html( 'Set product GTIN', 'woo-feed' ),
|
2770 |
-
'label' => esc_html( 'GTIN', 'woo-feed' ),
|
2771 |
-
'desc_tip' => true,
|
2772 |
-
'description' => esc_html( 'Set product GTIN code here.', 'woo-feed' ),
|
2773 |
-
) );
|
2774 |
-
|
2775 |
-
//MPN input field
|
2776 |
-
woocommerce_wp_text_input( array(
|
2777 |
-
'id' => 'woo_feed_mpn',
|
2778 |
-
'value' => get_post_meta( get_the_ID(), 'woo_feed_mpn', true ),
|
2779 |
-
'placeholder' => esc_html( 'Set product MPN', 'woo-feed' ),
|
2780 |
-
'label' => esc_html( 'MPN', 'woo-feed' ),
|
2781 |
-
'desc_tip' => true,
|
2782 |
-
'description' => esc_html( 'Set product MPN code here.', 'woo-feed' ),
|
2783 |
-
) );
|
2784 |
-
|
2785 |
-
//EAN input field
|
2786 |
-
woocommerce_wp_text_input( array(
|
2787 |
-
'id' => 'woo_feed_ean',
|
2788 |
-
'value' => get_post_meta( get_the_ID(), 'woo_feed_ean', true ),
|
2789 |
-
'placeholder' => esc_html( 'Set product EAN', 'woo-feed' ),
|
2790 |
-
'label' => esc_html( 'EAN', 'woo-feed' ),
|
2791 |
-
'desc_tip' => true,
|
2792 |
-
'description' => esc_html( 'Set product EAN code here.', 'woo-feed' ),
|
2793 |
-
) );
|
2794 |
-
|
2795 |
-
echo '</div>';
|
2796 |
-
}
|
2797 |
-
}
|
2798 |
-
add_action( 'woocommerce_product_options_inventory_product_data', 'woo_feed_add_identifier_fields');
|
2799 |
-
}
|
2800 |
-
|
2801 |
-
if ( ! function_exists( 'woo_feed_save_identifier_fields_data' ) ) {
|
2802 |
-
|
2803 |
-
/**
|
2804 |
-
* Updating custom fields data. (Unique Identifier (GTIN,MPN,EAN))
|
2805 |
-
*
|
2806 |
-
* @param int $id Post Id
|
2807 |
-
* @param WP_Post $post Wp Post Object.
|
2808 |
-
* @since 3.7.8
|
2809 |
-
*/
|
2810 |
-
function woo_feed_save_identifier_fields_data( $id, $post ) {
|
2811 |
-
|
2812 |
-
//save gtin fields value
|
2813 |
-
if ( isset( $_POST['woo_feed_gtin'] ) && ! empty( $_POST['woo_feed_gtin'] ) ) { //phpcs:ignore
|
2814 |
-
update_post_meta( $id, 'woo_feed_gtin', sanitize_text_field( wp_unslash($_POST['woo_feed_gtin']) ) );//phpcs:ignore
|
2815 |
-
} else {
|
2816 |
-
delete_post_meta( $id, 'woo_feed_gtin' ); //phpcs:ignore
|
2817 |
-
}
|
2818 |
-
|
2819 |
-
//save mpn fields value
|
2820 |
-
if ( isset( $_POST['woo_feed_mpn'] ) && ! empty( $_POST['woo_feed_mpn'] ) ) { //phpcs:ignore
|
2821 |
-
update_post_meta( $id, 'woo_feed_mpn', sanitize_text_field( wp_unslash($_POST['woo_feed_mpn']) ) ); //phpcs:ignore
|
2822 |
-
} else {
|
2823 |
-
delete_post_meta( $id, 'woo_feed_mpn' ); //phpcs:ignore
|
2824 |
-
}
|
2825 |
-
|
2826 |
-
//save ean fields value
|
2827 |
-
if ( isset( $_POST['woo_feed_ean'] ) && ! empty( $_POST['woo_feed_ean'] ) ) { //phpcs:ignore
|
2828 |
-
update_post_meta( $id, 'woo_feed_ean', sanitize_text_field( wp_unslash($_POST['woo_feed_ean']) ) ); //phpcs:ignore
|
2829 |
-
} else {
|
2830 |
-
delete_post_meta( $id, 'woo_feed_ean' ); //phpcs:ignore
|
2831 |
-
}
|
2832 |
-
}
|
2833 |
-
|
2834 |
-
add_action( 'woocommerce_process_product_meta', 'woo_feed_save_identifier_fields_data', 10, 2 );
|
2835 |
-
}
|
2836 |
-
|
2837 |
-
if ( ! function_exists( 'woo_feed_add_identifier_fields_for_variation' ) ) {
|
2838 |
-
|
2839 |
-
/**
|
2840 |
-
* Custom options in variation tab, here we are putting gtin, mpn, ean input fields in product variation tab
|
2841 |
-
*
|
2842 |
-
* @param int $loop Variation loop index.
|
2843 |
-
* @param array $variation_data Variation info.
|
2844 |
-
* @param WP_Post $variation Post Object.
|
2845 |
-
*
|
2846 |
-
* @since 3.7.8
|
2847 |
-
*/
|
2848 |
-
function woo_feed_add_identifier_fields_for_variation( $loop, $variation_data, $variation ) {
|
2849 |
-
$settings = woo_feed_get_options( 'all' );
|
2850 |
-
|
2851 |
-
if ( isset($settings['disable_mpn']) && 'disable' !== $settings['disable_mpn'] ) {
|
2852 |
-
echo '<div class="woo-feed-variation-options">';
|
2853 |
-
echo sprintf( '<h4 class="%s">%s</h4>', esc_attr( 'woo-feed-variation-option-title' ), esc_html( 'Unique Identifier - Woo Feed', 'woo-feed' ) );
|
2854 |
-
?>
|
2855 |
-
<style>
|
2856 |
-
.woo-feed-variation-options {
|
2857 |
-
border-top: 1px solid #ccc;
|
2858 |
-
margin-top: 20px;
|
2859 |
-
}
|
2860 |
-
.woo-feed-variation-options h4 {
|
2861 |
-
margin-bottom: 0;
|
2862 |
-
}
|
2863 |
-
.woo-feed-variation-options .form-field input[type="text"] {
|
2864 |
-
width: 100%;
|
2865 |
-
padding: 5px;
|
2866 |
-
}
|
2867 |
-
.woo-feed-variation-items {
|
2868 |
-
display: flex;
|
2869 |
-
flex-wrap: wrap;
|
2870 |
-
}
|
2871 |
-
.woo-feed-variation-items p {
|
2872 |
-
width: 33.33%;
|
2873 |
-
padding: 0 10px;
|
2874 |
-
box-sizing: border-box;
|
2875 |
-
}
|
2876 |
-
.woo-feed-variation-items p:first-child,.woo-feed-variation-items p:last-child {
|
2877 |
-
padding: 0;
|
2878 |
-
}
|
2879 |
-
</style>
|
2880 |
-
<?php
|
2881 |
-
|
2882 |
-
echo '<div class="woo-feed-variation-items">';
|
2883 |
-
//GTIN variation input field
|
2884 |
-
woocommerce_wp_text_input( array(
|
2885 |
-
'id' => "woo_feed_gtin_var[$variation->ID]",
|
2886 |
-
'value' => get_post_meta( $variation->ID, "woo_feed_gtin_var", true ),
|
2887 |
-
'placeholder' => esc_html( 'Set product GTIN', 'woo-feed' ),
|
2888 |
-
'label' => esc_html( 'GTIN', 'woo-feed' ),
|
2889 |
-
) );
|
2890 |
-
|
2891 |
-
//MPN variation input field
|
2892 |
-
woocommerce_wp_text_input( array(
|
2893 |
-
'id' => "woo_feed_mpn_var[$variation->ID]",
|
2894 |
-
'value' => get_post_meta( $variation->ID, 'woo_feed_mpn_var', true ),
|
2895 |
-
'placeholder' => esc_html( 'Set product MPN', 'woo-feed' ),
|
2896 |
-
'label' => esc_html( 'MPN', 'woo-feed' ),
|
2897 |
-
) );
|
2898 |
-
|
2899 |
-
//EAN variation input field
|
2900 |
-
woocommerce_wp_text_input( array(
|
2901 |
-
'id' => "woo_feed_ean_var[$variation->ID]",
|
2902 |
-
'value' => get_post_meta( $variation->ID, 'woo_feed_ean_var', true ),
|
2903 |
-
'placeholder' => esc_html( 'Set product EAN', 'woo-feed' ),
|
2904 |
-
'label' => esc_html( 'EAN', 'woo-feed' ),
|
2905 |
-
) );
|
2906 |
-
|
2907 |
-
echo '</div></div>';
|
2908 |
-
}
|
2909 |
-
}
|
2910 |
-
add_action( 'woocommerce_product_after_variable_attributes', 'woo_feed_add_identifier_fields_for_variation', 10, 3 );
|
2911 |
-
}
|
2912 |
-
|
2913 |
-
if ( ! function_exists( 'woo_feed_save_identifier_fields_data_for_variation' ) ) {
|
2914 |
-
|
2915 |
-
/**
|
2916 |
-
* Saving variation custom fields.
|
2917 |
-
*
|
2918 |
-
* @param int $variation_id Variation Id.
|
2919 |
-
* @param int $i variations loop index.
|
2920 |
-
*
|
2921 |
-
* @since 3.7.8
|
2922 |
-
*/
|
2923 |
-
function woo_feed_save_identifier_fields_data_for_variation( $variation_id, $i ) {
|
2924 |
-
|
2925 |
-
//save gtin field
|
2926 |
-
if ( isset($_POST['woo_feed_gtin_var'][ $variation_id ]) ) { //phpcs:ignore
|
2927 |
-
$woo_feed_gtin_field = sanitize_text_field( wp_unslash($_POST['woo_feed_gtin_var'][ $variation_id ]) ); //phpcs:ignore
|
2928 |
-
if ( isset( $woo_feed_gtin_field ) ) update_post_meta( $variation_id, 'woo_feed_gtin_var', esc_attr( $woo_feed_gtin_field ) );
|
2929 |
-
}
|
2930 |
-
|
2931 |
-
//save mpn field
|
2932 |
-
if ( isset($_POST['woo_feed_mpn_var'][ $variation_id ]) ) { //phpcs:ignore
|
2933 |
-
$woo_feed_mpn_field = sanitize_text_field( wp_unslash($_POST['woo_feed_mpn_var'][ $variation_id ]) ); //phpcs:ignore
|
2934 |
-
if ( isset( $woo_feed_mpn_field ) ) update_post_meta( $variation_id, 'woo_feed_mpn_var', esc_attr( $woo_feed_mpn_field ) );
|
2935 |
-
}
|
2936 |
-
|
2937 |
-
//save ean field
|
2938 |
-
if ( isset($_POST['woo_feed_ean_var'][ $variation_id ]) ) { //phpcs:ignore
|
2939 |
-
$woo_feed_ean_field = sanitize_text_field( wp_unslash($_POST['woo_feed_ean_var'][ $variation_id ]) ); //phpcs:ignore
|
2940 |
-
if ( isset( $woo_feed_ean_field ) ) update_post_meta( $variation_id, 'woo_feed_ean_var', esc_attr( $woo_feed_ean_field ) );
|
2941 |
-
}
|
2942 |
-
|
2943 |
-
}
|
2944 |
-
add_action( 'woocommerce_save_product_variation', 'woo_feed_save_identifier_fields_data_for_variation', 10, 2 );
|
2945 |
-
}
|
2946 |
-
|
2947 |
if ( ! function_exists( 'woo_feed_clear_cache_button' ) ) {
|
2948 |
/**
|
2949 |
* Clear cache button.
|
@@ -3179,51 +3253,58 @@ if ( ! function_exists( 'array_key_first' ) ) {
|
|
3179 |
return NULL ;
|
3180 |
}
|
3181 |
}
|
3182 |
-
if ( ! function_exists( 'woo_feed_brand_taxonomy' ) ) {
|
3183 |
-
/**
|
3184 |
-
* Custom Taxonomy for WooCommerce Product.
|
3185 |
-
*
|
3186 |
-
* @since 4.3.6
|
3187 |
-
*/
|
3188 |
-
function woo_feed_brand_taxonomy() {
|
3189 |
-
|
3190 |
-
$settings = woo_feed_get_options( 'all' );
|
3191 |
-
$disable_brand = $settings['disable_brand'];
|
3192 |
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3196 |
|
3197 |
-
|
3198 |
-
|
3199 |
-
'singular_name' => 'Brand',
|
3200 |
-
'menu_name' => 'Brand by CTX Feed',
|
3201 |
-
'all_items' => 'All Brands',
|
3202 |
-
'parent_item' => 'Parent Brand',
|
3203 |
-
'parent_item_colon' => 'Parent Brand:',
|
3204 |
-
'new_item_name' => 'New Brand Name',
|
3205 |
-
'add_new_item' => 'Add New Brand',
|
3206 |
-
'edit_item' => 'Edit Brand',
|
3207 |
-
'update_item' => 'Update Brand',
|
3208 |
-
'separate_items_with_commas' => 'Separate Brand with commas',
|
3209 |
-
'search_items' => 'Search Brands',
|
3210 |
-
'add_or_remove_items' => 'Add or remove Brands',
|
3211 |
-
'choose_from_most_used' => 'Choose from the most used Brands',
|
3212 |
-
);
|
3213 |
-
$args = array(
|
3214 |
-
'labels' => $labels,
|
3215 |
-
'hierarchical' => true,
|
3216 |
-
'public' => true,
|
3217 |
-
'show_ui' => true,
|
3218 |
-
'show_admin_column' => false,
|
3219 |
-
'show_in_quick_edit' => false,
|
3220 |
-
'show_in_rest' => true,
|
3221 |
-
'show_in_nav_menus' => true,
|
3222 |
-
'show_tagcloud' => true,
|
3223 |
-
);
|
3224 |
-
register_taxonomy( 'woo-feed-brand', 'product', $args );
|
3225 |
-
}
|
3226 |
-
add_action( 'init', 'woo_feed_brand_taxonomy', 0 );
|
3227 |
}
|
3228 |
|
3229 |
if ( ! function_exists( 'woo_feed_brand_term_radio_checklist' ) ) {
|
@@ -4448,5 +4529,67 @@ if ( ! function_exists('woo_feed_get_dynamic_discounted_product_price') ) {
|
|
4448 |
}
|
4449 |
}
|
4450 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4451 |
|
4452 |
// End of file helper.php.
|
2598 |
return $rules;
|
2599 |
}
|
2600 |
}
|
2601 |
+
|
2602 |
+
if ( ! function_exists('array_splice_preserve_keys') ) {
|
2603 |
+
/**
|
2604 |
+
* Function to splice an array keeping key
|
2605 |
+
*/
|
2606 |
+
function array_splice_preserve_keys( &$input, $offset, $length = null, $replacement = array() ) {
|
2607 |
+
|
2608 |
+
if ( empty( $replacement ) ) {
|
2609 |
+
return array_splice( $input, $offset, $length );
|
2610 |
+
}
|
2611 |
+
|
2612 |
+
$part_before = array_slice( $input, 0, $offset, $preserve_keys = true );
|
2613 |
+
$part_removed = array_slice( $input, $offset, $length, $preserve_keys = true );
|
2614 |
+
$part_after = array_slice( $input, $offset + $length, null, $preserve_keys = true );
|
2615 |
+
|
2616 |
+
$input = $part_before + $replacement + $part_after;
|
2617 |
+
|
2618 |
+
return $part_removed;
|
2619 |
+
}
|
2620 |
+
}
|
2621 |
+
|
2622 |
+
if ( ! function_exists( 'woo_feed_product_custom_fields') ) {
|
2623 |
+
function woo_feed_product_custom_fields() {
|
2624 |
+
/**
|
2625 |
+
* Here array of a field contain 3 elements
|
2626 |
+
* 1. Name
|
2627 |
+
* 2. Is this fields enabled by default
|
2628 |
+
* 3. Is this fields is a custom taxonomy
|
2629 |
+
*/
|
2630 |
+
$custom_fields = array(
|
2631 |
+
'brand' => array( __( 'Brand', 'woo-feed'), true, true ),
|
2632 |
+
'gtin' => array( __( 'GTIN', 'woo-feed' ), true ),
|
2633 |
+
'mpn' => array( __( 'MPN', 'woo-feed' ), true ),
|
2634 |
+
'ean' => array( __( 'EAN', 'woo-feed' ), true ),
|
2635 |
+
'isbn' => array( __( 'ISBN', 'woo-feed' ), true ),
|
2636 |
+
'age_group' => array( __( 'Age group', 'woo-feed' ), true ),
|
2637 |
+
'gender' => array( __( 'Gender', 'woo-feed' ), true ),
|
2638 |
+
'material' => array( __( 'Material', 'woo-feed' ), true ),
|
2639 |
+
'cost_of_good_sold' => array( __( 'Cost of good sold', 'woo-feed' ), true ),
|
2640 |
+
'unit_pricing_base_measure' => array( __( 'Unit Price Base Measure', 'woo-feed' ), true ),
|
2641 |
+
'custom_field_0' => array( __( 'Custom field 0', 'woo-feed' ), true ),
|
2642 |
+
'custom_field_1' => array( __( 'Custom field 1', 'woo-feed' ), true ),
|
2643 |
+
'custom_field_2' => array( __( 'Custom field 2', 'woo-feed' ), true ),
|
2644 |
+
'custom_field_3' => array( __( 'Custom field 3', 'woo-feed' ), true ),
|
2645 |
+
'custom_field_4' => array( __( 'Custom field 4', 'woo-feed' ), true ),
|
2646 |
+
);
|
2647 |
+
return apply_filters( 'woo_feed_product_custom_fields', $custom_fields );
|
2648 |
+
}
|
2649 |
+
}
|
2650 |
+
|
2651 |
+
if ( ! function_exists('woo_feed_product_attribute_cache_remove_cb') ) {
|
2652 |
+
|
2653 |
+
add_action( 'wp_ajax_woo_feed_product_attribute_cache_remove', 'woo_feed_product_attribute_cache_remove_cb' );
|
2654 |
+
/**
|
2655 |
+
* This function is called when product attribute swicher click.
|
2656 |
+
*/
|
2657 |
+
function woo_feed_product_attribute_cache_remove_cb() {
|
2658 |
+
$is_nonce_valid = isset( $_POST['nonce'] ) && wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'wpf_feed_nonce' );
|
2659 |
+
|
2660 |
+
if ( $is_nonce_valid ) {
|
2661 |
+
delete_transient('__woo_feed_cache_woo_feed_dropdown_product_attributes');
|
2662 |
+
} else {
|
2663 |
+
wp_send_json_error( esc_html__( 'Invalid Request.', 'woo-feed' ) );
|
2664 |
+
}
|
2665 |
+
|
2666 |
+
wp_die();
|
2667 |
+
}
|
2668 |
+
}
|
2669 |
+
|
2670 |
+
if ( ! function_exists( 'woo_feed_custom_fields_status_change_cb' ) ) {
|
2671 |
+
add_action( 'wp_ajax_woo_feed_custom_fields_status_change', 'woo_feed_custom_fields_status_change_cb' );
|
2672 |
+
/**
|
2673 |
+
* This AJAX callback function is called when custom fields on/off switched
|
2674 |
+
*/
|
2675 |
+
function woo_feed_custom_fields_status_change_cb() {
|
2676 |
+
$is_nonce_valid = isset( $_POST['nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce']) ), 'wpf_feed_nonce' );
|
2677 |
+
|
2678 |
+
if ( $is_nonce_valid && isset( $_POST['field'], $_POST['status'],
|
2679 |
+
$_POST['isTaxonomy'] ) ) {
|
2680 |
+
$field = sanitize_text_field( wp_unslash( $_POST['field'] ) );
|
2681 |
+
$is_taxonomy = sanitize_text_field( wp_unslash( $_POST['isTaxonomy'] ) );
|
2682 |
+
$status = sanitize_text_field( wp_unslash( $_POST['status'] ) );
|
2683 |
+
$data = woo_feed_get_options('all');
|
2684 |
+
if ( 'true' === $is_taxonomy ) {
|
2685 |
+
$data['woo_feed_taxonomy'][ $field ] = ( 'true' === $status ) ? 'enable' : 'disable';
|
2686 |
+
} else {
|
2687 |
+
$data['woo_feed_identifier'][ $field ] = ( 'true' === $status ) ? 'enable' : 'disable';
|
2688 |
+
}
|
2689 |
+
update_option( 'woo_feed_settings', $data, false );
|
2690 |
+
} else {
|
2691 |
+
wp_send_json_error( esc_html__( 'Invalid Request.', 'woo-feed' ) );
|
2692 |
+
}
|
2693 |
+
|
2694 |
+
wp_die();
|
2695 |
+
}
|
2696 |
+
}
|
2697 |
+
|
2698 |
+
if ( ! function_exists('woo_feed_add_custom_identifier') ) {
|
2699 |
+
/**
|
2700 |
+
* Add Custom fields into product inventory tab for Unique Identifier (GTIN,MPN,EAN)
|
2701 |
+
*
|
2702 |
+
* @since 3.7.8
|
2703 |
+
*/
|
2704 |
+
function woo_feed_add_custom_identifier() {
|
2705 |
+
$custom_fields = woo_feed_product_custom_fields();
|
2706 |
+
$custom_identifier_filter = new Woo_Feed_Custom_Identifier_Filter( $custom_fields );
|
2707 |
+
$custom_identifier = iterator_to_array( $custom_identifier_filter );
|
2708 |
+
|
2709 |
+
echo '<div class="options_group">';
|
2710 |
+
if ( ! empty( $custom_identifier ) ) {
|
2711 |
+
echo sprintf('<h4 class="%s" style="padding-left: 10px;color: black;">%s</h4>', esc_attr('woo-feed-option-title'), esc_html__( 'CUSTOM FIELDS by CTX Feed', 'woo-feed' ) );
|
2712 |
+
foreach ( $custom_identifier as $key => $value ) {
|
2713 |
+
$custom_field_id = esc_attr( wp_unslash( "woo_feed_identifier_{$key}" ) );
|
2714 |
+
$custom_field_label = esc_attr( wp_unslash( $custom_fields[ $key ][0] ) );
|
2715 |
+
$custom_field_description = __( 'Set product ', 'woo-feed' ) . esc_html( $custom_field_label ) . __( ' here.', 'woo-feed');
|
2716 |
+
woocommerce_wp_text_input(
|
2717 |
+
array(
|
2718 |
+
'id' => $custom_field_id,
|
2719 |
+
'value' => esc_attr( wp_unslash( get_post_meta( get_the_ID(), $custom_field_id, true ) ) ),
|
2720 |
+
'placeholder' => $custom_field_label,
|
2721 |
+
'label' => $custom_field_label,
|
2722 |
+
'desc_tip' => true,
|
2723 |
+
'description' => $custom_field_description,
|
2724 |
+
)
|
2725 |
+
);
|
2726 |
+
}
|
2727 |
+
}
|
2728 |
+
|
2729 |
+
echo '</div>';
|
2730 |
+
|
2731 |
+
}
|
2732 |
+
add_action( 'woocommerce_product_options_inventory_product_data', 'woo_feed_add_custom_identifier' );
|
2733 |
+
}
|
2734 |
+
|
2735 |
+
if ( ! function_exists('woo_feed_save_custom_identifier') ) {
|
2736 |
+
|
2737 |
+
/**
|
2738 |
+
* Updating custom fields data. (Unique Identifier (GTIN,MPN,EAN))
|
2739 |
+
*
|
2740 |
+
* @param int $id Post Id
|
2741 |
+
* @param WP_Post $post Wp Post Object.
|
2742 |
+
* @since 3.7.8
|
2743 |
+
*/
|
2744 |
+
function woo_feed_save_custom_identifier( $product_id, $product ) {
|
2745 |
+
$custom_fields = woo_feed_product_custom_fields();
|
2746 |
+
$custom_identifier_filter = new Woo_Feed_Custom_Identifier_Filter( $custom_fields );
|
2747 |
+
$custom_identifier = iterator_to_array( $custom_identifier_filter );
|
2748 |
+
|
2749 |
+
if ( ! empty( $custom_identifier ) ) {
|
2750 |
+
foreach ( $custom_identifier as $key => $name ) {
|
2751 |
+
$product_meta_key = "woo_feed_identifier_{$key}";
|
2752 |
+
$product_meta_value = isset( $_POST[ $product_meta_key ] ) ? sanitize_text_field( $_POST[ $product_meta_key ] ) : '';
|
2753 |
+
if ( isset( $product_meta_value ) && ! empty( $product_meta_value ) ) {
|
2754 |
+
update_post_meta( $product_id, $product_meta_key, $product_meta_value );
|
2755 |
+
} else {
|
2756 |
+
delete_post_meta( $product_id, $product_meta_key );
|
2757 |
+
}
|
2758 |
+
}
|
2759 |
+
}
|
2760 |
+
|
2761 |
+
}
|
2762 |
+
|
2763 |
+
add_action( 'save_post_product', 'woo_feed_save_custom_identifier', 10, 2 );
|
2764 |
+
}
|
2765 |
+
|
2766 |
+
if ( ! function_exists('woo_feed_add_custom_identifier_for_variation') ) {
|
2767 |
+
|
2768 |
+
/**
|
2769 |
+
* Custom options in variation tab, here we are putting gtin, mpn, ean input fields in product variation tab
|
2770 |
+
*
|
2771 |
+
* @param int $loop Variation loop index.
|
2772 |
+
* @param array $variation_data Variation info.
|
2773 |
+
* @param WP_Post $variation Post Object.
|
2774 |
+
*
|
2775 |
+
* @since 4.3.93
|
2776 |
+
*/
|
2777 |
+
function woo_feed_add_custom_identifier_for_variation( $loop, $variation_data, $variation ) {
|
2778 |
+
$settings = woo_feed_get_options( 'all' );
|
2779 |
+
if ( isset($settings['disable_mpn']) && "enable" === $settings['disable_mpn'] ) {
|
2780 |
+
echo '<div class="woo-feed-variation-options">';
|
2781 |
+
?>
|
2782 |
+
<style>
|
2783 |
+
.woo-feed-variation-options {
|
2784 |
+
border-top: 1px solid #ccc;
|
2785 |
+
margin-top: 20px;
|
2786 |
+
}
|
2787 |
+
.woo-feed-variation-options h4 {
|
2788 |
+
margin-bottom: 0;
|
2789 |
+
}
|
2790 |
+
.woo-feed-variation-options .form-field input[type="text"] {
|
2791 |
+
width: 100%;
|
2792 |
+
padding: 5px;
|
2793 |
+
}
|
2794 |
+
.woo-feed-variation-items {
|
2795 |
+
display: flex;
|
2796 |
+
flex-wrap: wrap;
|
2797 |
+
}
|
2798 |
+
.woo-feed-variation-items p {
|
2799 |
+
width: 33.33%;
|
2800 |
+
padding: 0 10px;
|
2801 |
+
box-sizing: border-box;
|
2802 |
+
}
|
2803 |
+
.woo-feed-variation-items p:first-child,.woo-feed-variation-items p:last-child {
|
2804 |
+
padding: 0;
|
2805 |
+
}
|
2806 |
+
</style>
|
2807 |
+
<?php
|
2808 |
+
|
2809 |
+
$custom_fields = woo_feed_product_custom_fields();
|
2810 |
+
$custom_identifier_filter = new Woo_Feed_Custom_Identifier_Filter( $custom_fields );
|
2811 |
+
$custom_identifier = iterator_to_array( $custom_identifier_filter );
|
2812 |
+
|
2813 |
+
if ( ! empty( $custom_identifier ) ) {
|
2814 |
+
echo '<div class="woo-feed-variation-options">';
|
2815 |
+
echo sprintf('<h4 class="%s">%s</h4>', esc_attr( 'woo-feed-variation-option-title' ), esc_html__( 'CUSTOM FIELDS by CTX Feed', 'woo-feed' ) );
|
2816 |
+
echo '<div class="woo-feed-variation-items">';
|
2817 |
+
|
2818 |
+
foreach ( $custom_identifier as $key => $value ) {
|
2819 |
+
$custom_field_id = sprintf( 'woo_feed_%s_var[%d]', strtolower( $key ), $variation->ID );
|
2820 |
+
$custom_field_label = isset( $value[0] ) ? $value[0] : '';
|
2821 |
+
$custom_field_key = sprintf( 'woo_feed_%s_var', strtolower( $key ) );
|
2822 |
+
$custom_field_description = sprintf( 'Set product %s here.', $custom_field_label );
|
2823 |
+
woocommerce_wp_text_input(
|
2824 |
+
array(
|
2825 |
+
'id' => $custom_field_id,
|
2826 |
+
'value' => esc_attr( get_post_meta( $variation->ID, $custom_field_key, true ) ),
|
2827 |
+
'placeholder' => esc_html( $custom_field_label ),
|
2828 |
+
'label' => esc_html( $custom_field_label ),
|
2829 |
+
'desc_tip' => true,
|
2830 |
+
'description' => esc_html( $custom_field_description ),
|
2831 |
+
)
|
2832 |
+
);
|
2833 |
+
}
|
2834 |
+
echo '</div></div>';
|
2835 |
+
}
|
2836 |
+
|
2837 |
+
}
|
2838 |
+
}
|
2839 |
+
add_action( 'woocommerce_product_after_variable_attributes', 'woo_feed_add_custom_identifier_for_variation', 10, 3 );
|
2840 |
+
}
|
2841 |
+
|
2842 |
+
if ( ! function_exists('woo_feed_save_custom_identifier_for_variation') ) {
|
2843 |
+
|
2844 |
+
/**
|
2845 |
+
* Saving variation custom fields.
|
2846 |
+
*
|
2847 |
+
* @param int $variation_id Variation Id.
|
2848 |
+
* @param int $i variations loop index.
|
2849 |
+
*
|
2850 |
+
* @since 3.7.8
|
2851 |
+
*/
|
2852 |
+
function woo_feed_save_custom_identifier_for_variation( $variation_id, $i ) {
|
2853 |
+
$custom_fields = woo_feed_product_custom_fields();
|
2854 |
+
$custom_identifier_filter = new Woo_Feed_Custom_Identifier_Filter( $custom_fields );
|
2855 |
+
$custom_identifier = iterator_to_array( $custom_identifier_filter );
|
2856 |
+
|
2857 |
+
if ( ! empty( $custom_identifier ) ) {
|
2858 |
+
foreach ( $custom_identifier as $key => $value ) {
|
2859 |
+
$custom_field_value = isset( $_POST[ "woo_feed_{$key}_var" ][ $variation_id ] ) ? sanitize_text_field( $_POST[ "woo_feed_{$key}_var" ][ $variation_id ] ) : '';
|
2860 |
+
if ( isset($custom_field_value) ) {
|
2861 |
+
update_post_meta( $variation_id, "woo_feed_{$key}_var", $custom_field_value );
|
2862 |
+
}
|
2863 |
+
}
|
2864 |
+
}
|
2865 |
+
|
2866 |
+
}
|
2867 |
+
add_action( 'woocommerce_save_product_variation', 'woo_feed_save_custom_identifier_for_variation', 10, 2 );
|
2868 |
+
}
|
2869 |
+
|
2870 |
if ( ! function_exists( 'woo_feed_category_mapping' ) ) {
|
2871 |
/**
|
2872 |
* Category Mapping
|
3018 |
}
|
3019 |
}
|
3020 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3021 |
if ( ! function_exists( 'woo_feed_clear_cache_button' ) ) {
|
3022 |
/**
|
3023 |
* Clear cache button.
|
3253 |
return NULL ;
|
3254 |
}
|
3255 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3256 |
|
3257 |
+
if ( ! function_exists('woo_feed_custom_taxonomy') ) {
|
3258 |
+
function woo_feed_custom_taxonomy() {
|
3259 |
+
$custom_fields = woo_feed_product_custom_fields();
|
3260 |
+
$custom_taxonomies_filter = new Woo_Feed_Custom_Taxonomy_Filter( $custom_fields );
|
3261 |
+
$custom_taxonomies = iterator_to_array( $custom_taxonomies_filter );
|
3262 |
+
|
3263 |
+
$feed_setting = get_option('woo_feed_settings');
|
3264 |
+
if( isset($feed_setting['woo_feed_taxonomy']['brand']) ) {
|
3265 |
+
$brand_option = $feed_setting['woo_feed_taxonomy']['brand'];
|
3266 |
+
|
3267 |
+
if( $brand_option === 'enable' ) {
|
3268 |
+
if ( ! empty( $custom_taxonomies ) ) {
|
3269 |
+
foreach ( $custom_taxonomies as $key => $value ) {
|
3270 |
+
$taxonomy_name = esc_html( $value[0] );
|
3271 |
+
|
3272 |
+
$labels = array(
|
3273 |
+
'name' => $taxonomy_name . ' ' . __( 'by CTX Feed', 'woo-feed' ),
|
3274 |
+
'singular_name' => $taxonomy_name,
|
3275 |
+
'menu_name' => $taxonomy_name . 's ' . __( 'by CTX Feed', 'woo-feed' ),
|
3276 |
+
'all_items' => __( 'All', 'woo-feed' ) . ' ' . $taxonomy_name . 's',
|
3277 |
+
'parent_item' => __( 'Parent', 'woo-feed' ) . $taxonomy_name,
|
3278 |
+
'parent_item_colon' => __( 'Parent:', 'woo-feed' ) . $taxonomy_name . ':',
|
3279 |
+
'new_item_name' => __( 'New', 'woo-feed' ) . ' ' . $taxonomy_name . ' ' . __( 'Name', 'woo-feed' ),
|
3280 |
+
'add_new_item' => __( 'Add New', 'woo-feed' ) . ' ' . $taxonomy_name,
|
3281 |
+
'edit_item' => __( 'Edit', 'woo-feed' ) . ' ' . $taxonomy_name,
|
3282 |
+
'update_item' => __( 'Update', 'woo-feed' ) . ' ' . $taxonomy_name,
|
3283 |
+
'separate_items_with_commas' => __( 'Separate', 'woo-feed' ) . ' ' . $taxonomy_name . ' ' . __( 'with commas', 'woo-feed' ),
|
3284 |
+
'search_items' => __( 'Search', 'woo-feed' ) . ' ' . $taxonomy_name,
|
3285 |
+
'add_or_remove_items' => __( 'Add or remove', 'woo-feed' ) . ' ' . $taxonomy_name,
|
3286 |
+
'choose_from_most_used' => __( 'Choose from the most used', 'woo-feed' ) . ' ' . $taxonomy_name . 's',
|
3287 |
+
);
|
3288 |
+
$args = array(
|
3289 |
+
'labels' => $labels,
|
3290 |
+
'hierarchical' => true,
|
3291 |
+
'public' => true,
|
3292 |
+
'show_ui' => true,
|
3293 |
+
'show_admin_column' => false,
|
3294 |
+
'show_in_rest' => true,
|
3295 |
+
'show_in_nav_menus' => true,
|
3296 |
+
'show_tagcloud' => true,
|
3297 |
+
);
|
3298 |
+
$taxonomy_key = sprintf( 'woo-feed-%s', strtolower( $key ) );
|
3299 |
+
|
3300 |
+
register_taxonomy( $taxonomy_key, 'product', $args );
|
3301 |
+
}
|
3302 |
+
}
|
3303 |
+
}
|
3304 |
+
}
|
3305 |
|
3306 |
+
}
|
3307 |
+
add_action( 'init', 'woo_feed_custom_taxonomy' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3308 |
}
|
3309 |
|
3310 |
if ( ! function_exists( 'woo_feed_brand_term_radio_checklist' ) ) {
|
4529 |
}
|
4530 |
}
|
4531 |
|
4532 |
+
/**
|
4533 |
+
* Woo_Feed_Custom_Taxonomy_Filter is special extenstion class of FilterIterator
|
4534 |
+
*
|
4535 |
+
* @since 4.3.93
|
4536 |
+
*/
|
4537 |
+
class Woo_Feed_Custom_Taxonomy_Filter extends FilterIterator {
|
4538 |
+
|
4539 |
+
public function __construct( array $items ) {
|
4540 |
+
$object = new ArrayObject( $items );
|
4541 |
+
parent::__construct( $object->getIterator() );
|
4542 |
+
}
|
4543 |
+
|
4544 |
+
public function accept() {
|
4545 |
+
return array_key_exists( 2, parent::current() ) ? parent::current()[2] : false;
|
4546 |
+
}
|
4547 |
+
}
|
4548 |
+
|
4549 |
+
/**
|
4550 |
+
* Woo_Feed_Custom_Identifier_Filter is a extends class of FilterIterator
|
4551 |
+
*
|
4552 |
+
* @since 4.3.93
|
4553 |
+
*/
|
4554 |
+
class Woo_Feed_Custom_Identifier_Filter extends FilterIterator {
|
4555 |
+
|
4556 |
+
public function __construct( array $items ) {
|
4557 |
+
$object = new ArrayObject( $items );
|
4558 |
+
parent::__construct( $object->getIterator() );
|
4559 |
+
}
|
4560 |
+
|
4561 |
+
public function accept() {
|
4562 |
+
$is_identifier = ! array_key_exists( 2, parent::current() ) ? true : ! parent::current()[2];
|
4563 |
+
if ( $is_identifier ) {
|
4564 |
+
$get_settings = woo_feed_get_options('all');
|
4565 |
+
$get_identifiers = isset( $get_settings['woo_feed_identifier'] ) ? $get_settings['woo_feed_identifier'] : array();
|
4566 |
+
|
4567 |
+
if ( in_array( parent::key(), array_keys( $get_identifiers ), true ) ) {
|
4568 |
+
if ( 'enable' === $get_identifiers[ parent::key() ] ) {
|
4569 |
+
return parent::current();
|
4570 |
+
}
|
4571 |
+
} else {
|
4572 |
+
if ( parent::current()[1] ) {
|
4573 |
+
return parent::current();
|
4574 |
+
}
|
4575 |
+
}
|
4576 |
+
}
|
4577 |
+
}
|
4578 |
+
}
|
4579 |
+
|
4580 |
+
function woo_feed_array_splice_preserve_keys( &$input, $offset, $length=null, $replacement=array() ) {
|
4581 |
+
if ( empty($replacement) ) {
|
4582 |
+
return array_splice($input, $offset, $length);
|
4583 |
+
}
|
4584 |
+
|
4585 |
+
$part_before = array_slice($input, 0, $offset, $preserve_keys = true);
|
4586 |
+
$part_removed = array_slice($input, $offset, $length, $preserve_keys = true);
|
4587 |
+
$part_after = array_slice($input, $offset + $length, null, $preserve_keys = true);
|
4588 |
+
|
4589 |
+
$input = $part_before + $replacement + $part_after;
|
4590 |
+
|
4591 |
+
return $part_removed;
|
4592 |
+
}
|
4593 |
+
|
4594 |
|
4595 |
// End of file helper.php.
|
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
|
@@ -39,7 +39,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
|
|
39 |
* @var string
|
40 |
* @since 3.1.6
|
41 |
*/
|
42 |
-
define( 'WOO_FEED_FREE_VERSION', '4.3.
|
43 |
}
|
44 |
|
45 |
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.94
|
14 |
* Author: WebAppick
|
15 |
* Author URI: https://webappick.com/
|
16 |
* License: GPL v2
|
39 |
* @var string
|
40 |
* @since 3.1.6
|
41 |
*/
|
42 |
+
define( 'WOO_FEED_FREE_VERSION', '4.3.94' );
|
43 |
}
|
44 |
|
45 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|