YITH WooCommerce Zoom Magnifier - Version 1.3.29

Version Description

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Zoom Magnifier
Version 1.3.29
Comparing to
See all releases

Code changes from version 1.3.28 to 1.3.29

Files changed (37) hide show
  1. init.php +5 -5
  2. languages/yith-woocommerce-zoom-magnifier.pot +2 -2
  3. plugin-fw/assets/css/yit-plugin-panel.css +43 -32
  4. plugin-fw/assets/css/yith-fields.css +18 -0
  5. plugin-fw/assets/css/yith-plugin-ui.css +24 -2
  6. plugin-fw/assets/js/wp-pages.js +2 -0
  7. plugin-fw/assets/js/wp-pages.min.js +1 -1
  8. plugin-fw/assets/js/yith-fields.js +304 -271
  9. plugin-fw/assets/js/yith-fields.min.js +1 -1
  10. plugin-fw/assets/js/yith-ui.js +8 -4
  11. plugin-fw/assets/js/yith-ui.min.js +1 -1
  12. plugin-fw/dist/gutenberg/index.asset.php +1 -1
  13. plugin-fw/dist/gutenberg/index.js +1 -1
  14. plugin-fw/includes/builders/elementor/class-yith-elementor.php +20 -15
  15. plugin-fw/includes/builders/gutenberg/class-yith-gutenberg.php +12 -7
  16. plugin-fw/includes/class-yit-ajax.php +10 -2
  17. plugin-fw/includes/class-yit-assets.php +4 -1
  18. plugin-fw/includes/class-yit-help-desk.php +1 -1
  19. plugin-fw/includes/class-yith-system-status.php +3 -3
  20. plugin-fw/init.php +2 -2
  21. plugin-fw/languages/yith-plugin-fw-el.mo +0 -0
  22. plugin-fw/languages/yith-plugin-fw-el.po +71 -62
  23. plugin-fw/languages/yith-plugin-fw-es_ES.mo +0 -0
  24. plugin-fw/languages/yith-plugin-fw-es_ES.po +75 -62
  25. plugin-fw/languages/yith-plugin-fw-it_IT.mo +0 -0
  26. plugin-fw/languages/yith-plugin-fw-it_IT.po +75 -62
  27. plugin-fw/languages/yith-plugin-fw-nl_NL.mo +0 -0
  28. plugin-fw/languages/yith-plugin-fw-nl_NL.po +75 -62
  29. plugin-fw/languages/yith-plugin-fw.pot +70 -62
  30. plugin-fw/templates/fields/ajax-posts.php +23 -9
  31. plugin-fw/templates/fields/image-dimensions.php +27 -0
  32. plugin-fw/templates/fields/text-array.php +5 -13
  33. plugin-fw/templates/panel/help-tab.php +16 -16
  34. plugin-fw/templates/panel/woocommerce/woocommerce-form.php +1 -1
  35. plugin-fw/yit-functions.php +95 -14
  36. plugin-fw/yit-plugin.php +2 -2
  37. readme.txt +9 -3
init.php CHANGED
@@ -3,13 +3,13 @@
3
  * Plugin Name: YITH WooCommerce Zoom Magnifier
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
  * Description: <code><strong>YITH WooCommerce Zoom Magnifier</strong></code> allows you to add a zoom effect to product images and a thumbnail slider for the product image gallery. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
- * Version: 1.3.28
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-zoom-magnifier
10
  * Domain Path: /languages/
11
- * WC requires at least: 4.6
12
- * WC tested up to: 5.4
13
  **/
14
 
15
  /* Copyright 2013-2018 Your Inspiration Themes (email : plugins@yithemes.com)
@@ -78,8 +78,8 @@ register_activation_hook ( __FILE__, 'yith_plugin_registration_hook' );
78
 
79
  defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
80
  defined ( 'YITH_YWZM_SLUG' ) || define ( 'YITH_YWZM_SLUG', 'yith-woocommerce-zoom-magnifier' );
81
- defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.3.28' );
82
- defined ( 'YITH_YWZM_JS_VERSION' ) || define ( 'YITH_YWZM_JS_VERSION', '1.3.28' );
83
 
84
  defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
85
  defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
3
  * Plugin Name: YITH WooCommerce Zoom Magnifier
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
  * Description: <code><strong>YITH WooCommerce Zoom Magnifier</strong></code> allows you to add a zoom effect to product images and a thumbnail slider for the product image gallery. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
+ * Version: 1.3.29
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-zoom-magnifier
10
  * Domain Path: /languages/
11
+ * WC requires at least: 5.3
12
+ * WC tested up to: 5.5
13
  **/
14
 
15
  /* Copyright 2013-2018 Your Inspiration Themes (email : plugins@yithemes.com)
78
 
79
  defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
80
  defined ( 'YITH_YWZM_SLUG' ) || define ( 'YITH_YWZM_SLUG', 'yith-woocommerce-zoom-magnifier' );
81
+ defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.3.29' );
82
+ defined ( 'YITH_YWZM_JS_VERSION' ) || define ( 'YITH_YWZM_JS_VERSION', '1.3.29' );
83
 
84
  defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
85
  defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
languages/yith-woocommerce-zoom-magnifier.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the YITH WooCommerce Zoom Magnifier package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: YITH WooCommerce Zoom Magnifier 1.3.28\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2021-06-12 20:18:20+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the same license as the YITH WooCommerce Zoom Magnifier package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: YITH WooCommerce Zoom Magnifier 1.3.29\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2021-07-23 07:33:13+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
plugin-fw/assets/css/yit-plugin-panel.css CHANGED
@@ -88,7 +88,7 @@
88
  }
89
 
90
  .yith-plugin-fw-panel-help-tab-content {
91
- background-color : #F4F4F4;
92
  border-radius : 15px;
93
  max-width : 1100px;
94
  margin : 0 auto;
@@ -96,7 +96,7 @@
96
  }
97
 
98
  .yith-plugin-fw-panel-help-tab-content p,
99
- .yith-plugin-fw-panel-help-tab-content a{
100
  font-size : 16px;
101
  }
102
 
@@ -125,8 +125,8 @@
125
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-actions,
126
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles,
127
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket {
128
- box-sizing : border-box;
129
- white-space : normal;
130
  }
131
 
132
  .yith-plugin-fw-panel-help-tab-content h2.yith-plugin-fw-panel-help-tab-title {
@@ -139,7 +139,7 @@
139
  }
140
 
141
  .yith-plugin-fw-panel-help-tab-content h3 {
142
- color : #03689F;
143
  font-size : 15px;
144
  }
145
 
@@ -150,7 +150,7 @@
150
  }
151
 
152
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video {
153
- text-align: center;
154
  }
155
 
156
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video p.video-description {
@@ -181,7 +181,7 @@
181
  display : block;
182
  background-color : #fff;
183
  border-radius : 5px;
184
- box-shadow : 0 0 15px 5px rgba(174,201,207,0.3);
185
  transition : all .2s ease;
186
  }
187
 
@@ -192,7 +192,7 @@
192
  }
193
 
194
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions:not( .full-width ) {
195
- padding-top : 65px!important;
196
  }
197
 
198
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li {
@@ -201,17 +201,17 @@
201
 
202
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li > a {
203
  display : block;
204
- padding : 15px 20px 15px 75px!important;
205
  text-decoration : none;
206
  }
207
 
208
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li:hover {
209
- box-shadow : 0 0 15px 5px rgba(177,220,228,0.6);
210
  transform : scale(1.04);
211
  }
212
 
213
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li a:before {
214
- color : #03689F;
215
  float : left;
216
  font-family : 'yith-icon';
217
  font-size : 36px;
@@ -238,7 +238,7 @@
238
  }
239
 
240
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li h4 a {
241
- color : #03689F;
242
  text-decoration : none;
243
  }
244
 
@@ -262,7 +262,7 @@
262
 
263
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles h3:before {
264
  content : '';
265
- background : #03689F;
266
  display : block;
267
  height : 100%;
268
  left : -40px;
@@ -273,7 +273,7 @@
273
  }
274
 
275
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles a.button {
276
- font-size: 16px;
277
  }
278
 
279
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list {
@@ -286,33 +286,33 @@
286
  }
287
 
288
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list li:before {
289
- content: '-';
290
  }
291
 
292
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list a {
293
  text-decoration : none;
294
  }
295
 
296
- .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket > .box-with-shadow{
297
- padding: 30px!important;
298
  }
299
 
300
- .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket h3{
301
- color : #B90A0A;
302
  font-size : 18px;
303
  margin : 0 0 15px;
304
  }
305
 
306
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket p {
307
- margin-bottom: 35px;
308
  }
309
 
310
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket .button {
311
- border-radius : 7px;
312
- display : block;
313
- font-size : 15px;
314
- padding : 7px 15px;
315
- text-align : center;
316
  }
317
 
318
  /**
@@ -1010,7 +1010,7 @@ button#yith-plugin-fw-float-save-button {
1010
  }
1011
 
1012
  .ywtenv-is-sandbox button#yith-plugin-fw-float-save-button {
1013
- bottom: 100px;
1014
  }
1015
 
1016
  button#yith-plugin-fw-float-save-button.visible {
@@ -1033,6 +1033,17 @@ button#yith-plugin-fw-float-save-button.green {
1033
  transition : all 0.8s linear;
1034
  }
1035
 
 
 
 
 
 
 
 
 
 
 
 
1036
  /* === Responsive === */
1037
 
1038
  @media (max-width : 767px) {
@@ -1043,20 +1054,20 @@ button#yith-plugin-fw-float-save-button.green {
1043
 
1044
  }
1045
 
1046
- @media (max-width: 992px) {
1047
  .yith-plugin-fw-panel-help-tab-content .row {
1048
- white-space: normal;
1049
- margin-bottom: 0;
1050
  }
1051
 
1052
  .yith-plugin-fw-panel-help-tab-content .row .column-left,
1053
  .yith-plugin-fw-panel-help-tab-content .row .column-right {
1054
- width : 100%;
1055
- margin-bottom: 50px;
1056
  }
1057
 
1058
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions {
1059
- padding-top: 0!important;
1060
  }
1061
  }
1062
 
88
  }
89
 
90
  .yith-plugin-fw-panel-help-tab-content {
91
+ background-color : #f4f4f4;
92
  border-radius : 15px;
93
  max-width : 1100px;
94
  margin : 0 auto;
96
  }
97
 
98
  .yith-plugin-fw-panel-help-tab-content p,
99
+ .yith-plugin-fw-panel-help-tab-content a {
100
  font-size : 16px;
101
  }
102
 
125
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-actions,
126
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles,
127
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket {
128
+ box-sizing : border-box;
129
+ white-space : normal;
130
  }
131
 
132
  .yith-plugin-fw-panel-help-tab-content h2.yith-plugin-fw-panel-help-tab-title {
139
  }
140
 
141
  .yith-plugin-fw-panel-help-tab-content h3 {
142
+ color : #03689f;
143
  font-size : 15px;
144
  }
145
 
150
  }
151
 
152
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video {
153
+ text-align : center;
154
  }
155
 
156
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video p.video-description {
181
  display : block;
182
  background-color : #fff;
183
  border-radius : 5px;
184
+ box-shadow : 0 0 15px 5px rgba(174, 201, 207, 0.3);
185
  transition : all .2s ease;
186
  }
187
 
192
  }
193
 
194
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions:not( .full-width ) {
195
+ padding-top : 65px !important;
196
  }
197
 
198
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li {
201
 
202
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li > a {
203
  display : block;
204
+ padding : 15px 20px 15px 75px !important;
205
  text-decoration : none;
206
  }
207
 
208
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li:hover {
209
+ box-shadow : 0 0 15px 5px rgba(177, 220, 228, 0.6);
210
  transform : scale(1.04);
211
  }
212
 
213
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li a:before {
214
+ color : #03689f;
215
  float : left;
216
  font-family : 'yith-icon';
217
  font-size : 36px;
238
  }
239
 
240
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li h4 a {
241
+ color : #03689f;
242
  text-decoration : none;
243
  }
244
 
262
 
263
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles h3:before {
264
  content : '';
265
+ background : #03689f;
266
  display : block;
267
  height : 100%;
268
  left : -40px;
273
  }
274
 
275
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles a.button {
276
+ font-size : 16px;
277
  }
278
 
279
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list {
286
  }
287
 
288
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list li:before {
289
+ content : '-';
290
  }
291
 
292
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list a {
293
  text-decoration : none;
294
  }
295
 
296
+ .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket > .box-with-shadow {
297
+ padding : 30px !important;
298
  }
299
 
300
+ .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket h3 {
301
+ color : #b90a0a;
302
  font-size : 18px;
303
  margin : 0 0 15px;
304
  }
305
 
306
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket p {
307
+ margin-bottom : 35px;
308
  }
309
 
310
  .yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket .button {
311
+ border-radius : 7px;
312
+ display : block;
313
+ font-size : 15px;
314
+ padding : 7px 15px;
315
+ text-align : center;
316
  }
317
 
318
  /**
1010
  }
1011
 
1012
  .ywtenv-is-sandbox button#yith-plugin-fw-float-save-button {
1013
+ bottom : 100px;
1014
  }
1015
 
1016
  button#yith-plugin-fw-float-save-button.visible {
1033
  transition : all 0.8s linear;
1034
  }
1035
 
1036
+ .rtl button#yith-plugin-fw-float-save-button {
1037
+ right : auto;
1038
+ left : 70px;
1039
+ }
1040
+
1041
+ .rtl button#yith-plugin-fw-float-save-button i {
1042
+ margin-left : 8px;
1043
+ margin-right : 0;
1044
+ }
1045
+
1046
+
1047
  /* === Responsive === */
1048
 
1049
  @media (max-width : 767px) {
1054
 
1055
  }
1056
 
1057
+ @media (max-width : 992px) {
1058
  .yith-plugin-fw-panel-help-tab-content .row {
1059
+ white-space : normal;
1060
+ margin-bottom : 0;
1061
  }
1062
 
1063
  .yith-plugin-fw-panel-help-tab-content .row .column-left,
1064
  .yith-plugin-fw-panel-help-tab-content .row .column-right {
1065
+ width : 100%;
1066
+ margin-bottom : 50px;
1067
  }
1068
 
1069
  .yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions {
1070
+ padding-top : 0 !important;
1071
  }
1072
  }
1073
 
plugin-fw/assets/css/yith-fields.css CHANGED
@@ -1951,6 +1951,24 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1951
  border-color : #007694;
1952
  }
1953
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1954
  /**
1955
  * Copy to clipboard
1956
  */
1951
  border-color : #007694;
1952
  }
1953
 
1954
+ /**
1955
+ * Image dimensions
1956
+ */
1957
+ .yith-plugin-ui .yith-plugin-fw-image-dimensions > div {
1958
+ display : inline-block;
1959
+ width : 30%;
1960
+ margin-right : 3%;
1961
+ max-width : 100px;
1962
+ }
1963
+
1964
+ .yith-plugin-ui .yith-plugin-fw-image-dimensions label {
1965
+ display : block;
1966
+ font-size : 11px;
1967
+ font-weight : 600;
1968
+ text-transform : uppercase;
1969
+ margin : 0 0 10px 0;
1970
+ }
1971
+
1972
  /**
1973
  * Copy to clipboard
1974
  */
plugin-fw/assets/css/yith-plugin-ui.css CHANGED
@@ -1240,7 +1240,6 @@ table.yith-plugin-fw__boxed-table tbody tr {
1240
 
1241
  table.yith-plugin-fw__boxed-table tbody tr th, table.yith-plugin-fw__boxed-table tbody tr td {
1242
  background: transparent;
1243
- border-radius: 5px;
1244
  vertical-align: middle;
1245
  padding: 25px 0 25px 25px;
1246
  }
@@ -1249,6 +1248,17 @@ table.yith-plugin-fw__boxed-table tbody tr td:last-child {
1249
  padding-right: 25px;
1250
  }
1251
 
 
 
 
 
 
 
 
 
 
 
 
1252
  table.yith-plugin-fw__boxed-table tbody tr:hover {
1253
  background: var(--yith-table-row-highlight);
1254
  }
@@ -1454,7 +1464,6 @@ table.yith-plugin-fw__boxed-table.wp-list-table tbody tr:hover .yith-plugin-fw__
1454
 
1455
  .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr th, .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr td, .yith-plugin-ui #plugin-fw-wc .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr th, .yith-plugin-ui #plugin-fw-wc .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr td {
1456
  background: transparent;
1457
- border-radius: 5px;
1458
  vertical-align: middle;
1459
  padding: 25px 0 25px 25px;
1460
  }
@@ -1463,6 +1472,19 @@ table.yith-plugin-fw__boxed-table.wp-list-table tbody tr:hover .yith-plugin-fw__
1463
  padding-right: 25px;
1464
  }
1465
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1466
  .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr:hover, .yith-plugin-ui #plugin-fw-wc .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr:hover {
1467
  background: var(--yith-table-row-highlight);
1468
  }
1240
 
1241
  table.yith-plugin-fw__boxed-table tbody tr th, table.yith-plugin-fw__boxed-table tbody tr td {
1242
  background: transparent;
 
1243
  vertical-align: middle;
1244
  padding: 25px 0 25px 25px;
1245
  }
1248
  padding-right: 25px;
1249
  }
1250
 
1251
+ table.yith-plugin-fw__boxed-table tbody tr th:first-child,
1252
+ table.yith-plugin-fw__boxed-table tbody tr td:first-child {
1253
+ border-radius: 5px 0 0 5px;
1254
+ }
1255
+
1256
+ table.yith-plugin-fw__boxed-table tbody tr th:last-child,
1257
+ table.yith-plugin-fw__boxed-table tbody tr td:last-child {
1258
+ padding-right: 25px;
1259
+ border-radius: 0 5px 5px 0;
1260
+ }
1261
+
1262
  table.yith-plugin-fw__boxed-table tbody tr:hover {
1263
  background: var(--yith-table-row-highlight);
1264
  }
1464
 
1465
  .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr th, .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr td, .yith-plugin-ui #plugin-fw-wc .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr th, .yith-plugin-ui #plugin-fw-wc .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr td {
1466
  background: transparent;
 
1467
  vertical-align: middle;
1468
  padding: 25px 0 25px 25px;
1469
  }
1472
  padding-right: 25px;
1473
  }
1474
 
1475
+ .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr th:first-child,
1476
+ .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr td:first-child, .yith-plugin-ui #plugin-fw-wc .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr th:first-child,
1477
+ .yith-plugin-ui #plugin-fw-wc .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr td:first-child {
1478
+ border-radius: 5px 0 0 5px;
1479
+ }
1480
+
1481
+ .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr th:last-child,
1482
+ .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr td:last-child, .yith-plugin-ui #plugin-fw-wc .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr th:last-child,
1483
+ .yith-plugin-ui #plugin-fw-wc .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr td:last-child {
1484
+ padding-right: 25px;
1485
+ border-radius: 0 5px 5px 0;
1486
+ }
1487
+
1488
  .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr:hover, .yith-plugin-ui #plugin-fw-wc .yith-plugin-ui--boxed-wp-list-style table.wp-list-table tbody tr:hover {
1489
  background: var(--yith-table-row-highlight);
1490
  }
plugin-fw/assets/js/wp-pages.js CHANGED
@@ -42,12 +42,14 @@ jQuery( function ( $ ) {
42
  case 'trash':
43
  confirmOptions.title = yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_title;
44
  confirmOptions.message = yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_message;
 
45
  confirmOptions.confirmButton = yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_button;
46
  confirmOptions.confirmButtonType = 'delete';
47
  break;
48
  case 'delete':
49
  confirmOptions.title = yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_title;
50
  confirmOptions.message = yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_message;
 
51
  confirmOptions.confirmButton = yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_button;
52
  confirmOptions.confirmButtonType = 'delete';
53
  break;
42
  case 'trash':
43
  confirmOptions.title = yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_title;
44
  confirmOptions.message = yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_message;
45
+ confirmOptions.cancelButton = yith_plugin_fw_wp_pages.i18n.bulk_trash_cancel_button;
46
  confirmOptions.confirmButton = yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_button;
47
  confirmOptions.confirmButtonType = 'delete';
48
  break;
49
  case 'delete':
50
  confirmOptions.title = yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_title;
51
  confirmOptions.message = yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_message;
52
+ confirmOptions.cancelButton = yith_plugin_fw_wp_pages.i18n.bulk_delete_cancel_button;
53
  confirmOptions.confirmButton = yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_button;
54
  confirmOptions.confirmButtonType = 'delete';
55
  break;
plugin-fw/assets/js/wp-pages.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){var i=e(".yith-plugin-fw-wp-page-wrapper"),t=e("div.updated, div.error, div.notice").not("#message"),n=e("div#message.updated");if(e(".yith-plugin-fw-wp-page-wrapper .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper"),t.addClass("inline"),i.length&&i.prepend(t),n.length&&(n.addClass("yith-plugin-fw-animate__appear-from-top").show(),n.on("click",".notice-dismiss",function(e){e.stopPropagation(),n.removeClass("yith-plugin-fw-animate__appear-from-top").slideUp(200)})),yith_plugin_fw_wp_pages.bulk_delete_confirmation_enabled){var a=!1;e(document).on("click","#doaction, #doaction2",function(i){var t=e(this),n=t.siblings("#bulk-action-selector-top, #bulk-action-selector-bottom");if("yith"in window&&"ui"in yith)if(a)a=!1;else{var o={};if(e("#the-list .check-column input[type=checkbox]:checked").length){switch(n.val()){case"trash":o.title=yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_title,o.message=yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_message,o.confirmButton=yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_button,o.confirmButtonType="delete";break;case"delete":o.title=yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_title,o.message=yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_message,o.confirmButton=yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_button,o.confirmButtonType="delete"}e.isEmptyObject(o)||(i.preventDefault(),o.closeAfterConfirm=!1,o.onConfirm=function(){a=!0,t.trigger("click")},yith.ui.confirm(o))}}})}});
1
+ jQuery(function(e){var t=e(".yith-plugin-fw-wp-page-wrapper"),i=e("div.updated, div.error, div.notice").not("#message"),n=e("div#message.updated");if(e(".yith-plugin-fw-wp-page-wrapper .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper"),i.addClass("inline"),t.length&&t.prepend(i),n.length&&(n.addClass("yith-plugin-fw-animate__appear-from-top").show(),n.on("click",".notice-dismiss",function(e){e.stopPropagation(),n.removeClass("yith-plugin-fw-animate__appear-from-top").slideUp(200)})),yith_plugin_fw_wp_pages.bulk_delete_confirmation_enabled){var a=!1;e(document).on("click","#doaction, #doaction2",function(t){var i=e(this),n=i.siblings("#bulk-action-selector-top, #bulk-action-selector-bottom");if("yith"in window&&"ui"in yith)if(a)a=!1;else{var _={};if(e("#the-list .check-column input[type=checkbox]:checked").length){switch(n.val()){case"trash":_.title=yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_title,_.message=yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_message,_.cancelButton=yith_plugin_fw_wp_pages.i18n.bulk_trash_cancel_button,_.confirmButton=yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_button,_.confirmButtonType="delete";break;case"delete":_.title=yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_title,_.message=yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_message,_.cancelButton=yith_plugin_fw_wp_pages.i18n.bulk_delete_cancel_button,_.confirmButton=yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_button,_.confirmButtonType="delete"}e.isEmptyObject(_)||(t.preventDefault(),_.closeAfterConfirm=!1,_.onConfirm=function(){a=!0,i.trigger("click")},yith.ui.confirm(_))}}})}});
plugin-fw/assets/js/yith-fields.js CHANGED
@@ -1,28 +1,254 @@
1
  /* globals yith_framework_fw_fields, wp */
2
  ( function ( $ ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  var yith_fields_init = function () {
4
- var $datepicker = $( '.yith-plugin-fw-datepicker' ),
5
- $colorpicker = $( '.yith-plugin-fw-colorpicker' ),
6
- $upload = {
7
- imgPreviewHandler : '.yith-plugin-fw-upload-img-preview',
8
- uploadButtonHandler: '.yith-plugin-fw-upload-button',
9
- imgUrlHandler : '.yith-plugin-fw-upload-img-url',
10
- resetButtonHandler : '.yith-plugin-fw-upload-button-reset',
11
- imgUrl : $( '.yith-plugin-fw-upload-img-url' )
12
- },
13
- $wpAddMedia = $( '.add_media' ),
14
- $imageGallery = {
15
- rootSelector : '.yith-plugin-fw-image-gallery',
16
- buttonSelector: '.yith-plugin-fw-image-gallery .image-gallery-button',
17
- sliderWrapper : $( '.yith-plugin-fw-image-gallery ul.slides-wrapper' )
18
- },
19
- $sidebars = $( '.yith-plugin-fw-sidebar-layout' ),
20
- $slider = $( '.yith-plugin-fw-slider-container .ui-slider-horizontal' ),
21
- $icons = $( '.yit-icons-manager-wrapper' ),
22
- $checkgroup = $( ".yith-plugin-ui td.forminp-checkbox" );
23
 
24
  /* Datepicker */
25
  $datepicker.each( function () {
 
 
26
  var currentDatePicker = $( this ),
27
  args = currentDatePicker.data(),
28
  icon = currentDatePicker.next( '.yith-icon-calendar' );
@@ -45,19 +271,22 @@
45
  } );
46
 
47
  /* Colorpicker */
48
- $colorpicker.wpColorPicker( {
49
- palettes: false,
50
- width : 200,
51
- mode : 'hsl',
52
- clear : function () {
53
- var input = $( this );
54
- input.val( input.data( 'default-color' ) );
55
- input.change();
56
- }
57
- } );
58
-
59
-
60
  $colorpicker.each( function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  var select_label = $( this ).data( 'variations-label' ),
62
  wrap_main1 = $( this ).closest( '.yith-plugin-fw-colorpicker-field-wrapper' ),
63
  wrap_main2 = $( this ).closest( '.yith-single-colorpicker' ),
@@ -69,206 +298,22 @@
69
 
70
  if ( !wrap1.find( '.wp-picker-default-custom' ).length ) {
71
  var button = $( '<span/>' ).attr( {
72
- class: "wp-picker-default-custom"
73
  } );
74
  wrap1.find( '.wp-picker-default' ).wrap( button );
75
  }
76
 
77
  if ( !wrap2.find( '.wp-picker-default-custom' ).length ) {
78
  var button = $( '<span/>' ).attr( {
79
- class: "wp-picker-default-custom"
80
  } );
81
  wrap2.find( '.wp-picker-default' ).wrap( button );
82
  }
83
  } );
84
 
85
-
86
- /* Upload */
87
- if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
88
- var _custom_media = true;
89
- // preview
90
- $upload.imgUrl.change( function () {
91
- var url = $( this ).val(),
92
- re = new RegExp( "(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)" ),
93
- preview = $( this ).parent().find( $upload.imgPreviewHandler ).first();
94
-
95
- if ( preview.length < 1 ) {
96
- preview = $( this ).parent().parent().find( $upload.imgPreviewHandler ).first();
97
- }
98
-
99
- if ( re.test( url ) ) {
100
- preview.html( '<img src="' + url + '" style="max-width:100px; max-height:100px;" />' );
101
- } else {
102
- preview.html( '' );
103
- }
104
- } ).trigger( 'change' );
105
-
106
- $( document ).on( 'click', $upload.uploadButtonHandler, function ( e ) {
107
- e.preventDefault();
108
-
109
- var t = $( this ),
110
- custom_uploader,
111
- id = t.attr( 'id' ).replace( /-button$/, '' ).replace( /(\[|\])/g, '\\$1' );
112
-
113
- //If the uploader object has already been created, reopen the dialog
114
- if ( custom_uploader ) {
115
- custom_uploader.open();
116
- return;
117
- }
118
-
119
- var custom_uploader_states = [
120
- // Main states.
121
- new wp.media.controller.Library( {
122
- library : wp.media.query(),
123
- multiple : false,
124
- title : 'Choose Image',
125
- priority : 20,
126
- filterable: 'uploaded'
127
- } )
128
- ];
129
-
130
- // Create the media frame.
131
- custom_uploader = wp.media.frames.downloadable_file = wp.media( {
132
- // Set the title of the modal.
133
- title : 'Choose Image',
134
- library : {
135
- type: ''
136
- },
137
- button : {
138
- text: 'Choose Image'
139
- },
140
- multiple: false,
141
- states : custom_uploader_states
142
- } );
143
-
144
- //When a file is selected, grab the URL and set it as the text field's value
145
- custom_uploader.on( 'select', function () {
146
- var attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
147
-
148
- $( "#" + id ).val( attachment.url );
149
- // Save the id of the selected element to an element which name is the same with a suffix "-yith-attachment-id"
150
- if ( $( "#" + id + "-yith-attachment-id" ) ) {
151
- $( "#" + id + "-yith-attachment-id" ).val( attachment.id );
152
- }
153
- $upload.imgUrl.trigger( 'change' );
154
- } );
155
-
156
- //Open the uploader dialog
157
- custom_uploader.open();
158
- } );
159
-
160
- $( document ).on( 'click', $upload.resetButtonHandler, function ( e ) {
161
- var t = $( this ),
162
- id = t.attr( 'id' ).replace( /(\[|\])/g, '\\$1' ),
163
- input_id = t.attr( 'id' ).replace( /-button-reset$/, '' ).replace( /(\[|\])/g, '\\$1' ),
164
- default_value = $( '#' + id ).data( 'default' );
165
-
166
- $( "#" + input_id ).val( default_value );
167
- $upload.imgUrl.trigger( 'change' );
168
- } );
169
- }
170
-
171
- $wpAddMedia.on( 'click', function () {
172
- _custom_media = false;
173
- } );
174
-
175
- /* Image Gallery */
176
- if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
177
- $( document ).on( 'click', $imageGallery.buttonSelector, function ( e ) {
178
- var $t = $( this ),
179
- $container = $t.closest( $imageGallery.rootSelector ),
180
- $image_gallery_ids = $container.find( '.image_gallery_ids' ),
181
- attachment_ids = $image_gallery_ids.val(),
182
- $gallery_images_wrapper = $container.find( 'ul.slides-wrapper' );
183
-
184
- // Create the media frame.
185
- var image_gallery_frame = wp.media.frames.image_gallery = wp.media( {
186
- // Set the title of the modal.
187
- title : $t.data( 'choose' ),
188
- button: {
189
- text: $t.data( 'update' )
190
- },
191
- states: [
192
- new wp.media.controller.Library( {
193
- title : $t.data( 'choose' ),
194
- filterable: 'all',
195
- multiple : true
196
- } )
197
- ]
198
- } );
199
-
200
- // When an image is selected, run a callback.
201
- image_gallery_frame.on( 'select', function () {
202
- var selection = image_gallery_frame.state().get( 'selection' );
203
- selection.map( function ( attachment ) {
204
- attachment = attachment.toJSON();
205
-
206
- if ( attachment.id ) {
207
- attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;
208
- $gallery_images_wrapper.append( '<li class="image" data-attachment_id="' + attachment.id + '"><img src="' + attachment.sizes.thumbnail.url + '"/><ul class="actions"><li><a href="#" class="delete" title="' + $t.data( 'delete' ) + '">x</a></li></ul></li>' );
209
- }
210
- } );
211
-
212
- $image_gallery_ids.val( attachment_ids );
213
- $image_gallery_ids.trigger( 'change' );
214
- } );
215
-
216
- image_gallery_frame.open();
217
-
218
- } );
219
-
220
- // Image ordering
221
- $imageGallery.sliderWrapper.each( function () {
222
- var $t = $( this );
223
- $t.sortable( {
224
- items : 'li.image',
225
- cursor : 'move',
226
- scrollSensitivity : 40,
227
- forcePlaceholderSize: true,
228
- forceHelperSize : false,
229
- helper : 'clone',
230
- opacity : 0.65,
231
- start : function ( event, ui ) {
232
- ui.item.css( 'background-color', '#f6f6f6' );
233
- },
234
- stop : function ( event, ui ) {
235
- ui.item.removeAttr( 'style' );
236
- },
237
- update : function ( event, ui ) {
238
- var attachment_ids = '';
239
-
240
- $t.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
241
- var attachment_id = $( this ).attr( 'data-attachment_id' );
242
- attachment_ids = attachment_ids + attachment_id + ',';
243
- } );
244
-
245
- $t.closest( $imageGallery.rootSelector ).find( '.image_gallery_ids' ).val( attachment_ids );
246
- }
247
- } );
248
- } );
249
-
250
- // Remove images
251
- $imageGallery.sliderWrapper.on( 'click', 'a.delete', function ( e ) {
252
- e.preventDefault();
253
- var $wrapper = $( this ).closest( $imageGallery.rootSelector ),
254
- $gallery = $wrapper.find( 'ul.slides-wrapper' ),
255
- $image_gallery_ids = $wrapper.find( '.image_gallery_ids' ),
256
- attachment_ids = '';
257
-
258
- $( this ).closest( 'li.image' ).remove();
259
-
260
- $gallery.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
261
- var attachment_id = $( this ).attr( 'data-attachment_id' );
262
- attachment_ids = attachment_ids + attachment_id + ',';
263
- } );
264
-
265
- $image_gallery_ids.val( attachment_ids );
266
- } );
267
- }
268
-
269
-
270
  /* Sidebars */
271
  $sidebars.each( function () {
 
272
  var $images = $( this ).find( 'img' );
273
  $images.on( 'click', function () {
274
  var $container = $( this ).closest( '.yith-plugin-fw-sidebar-layout' ),
@@ -304,13 +349,15 @@
304
 
305
  /* Slider */
306
  $slider.each( function () {
307
- var val = $( this ).data( 'val' ),
308
- minValue = $( this ).data( 'min' ),
309
- maxValue = $( this ).data( 'max' ),
310
- step = $( this ).data( 'step' ),
311
- labels = $( this ).data( 'labels' );
312
-
313
- $( this ).slider( {
 
 
314
  value: val,
315
  min : minValue,
316
  max : maxValue,
@@ -330,35 +377,8 @@
330
  } );
331
  } );
332
 
333
- // Codemirror.
334
- $( function () {
335
- var codemirrorInit = function () {
336
- if ( typeof wp !== 'undefined' && typeof wp.codeEditor !== 'undefined' ) {
337
- $( '.codemirror:not(.codemirror--initialized)' ).each( function () {
338
- var settings = $( this ).data( 'settings' ),
339
- editor = wp.codeEditor.initialize( $( this ), settings );
340
-
341
- $( this ).addClass( 'codemirror--initialized' );
342
- $( this ).data( 'codemirrorInstance', editor );
343
- } );
344
- }
345
- };
346
- $( document ).on( 'yith-plugin-fw-codemirror-init', codemirrorInit ).trigger( 'yith-plugin-fw-codemirror-init' );
347
- } );
348
-
349
- /* Select All - Deselect All */
350
- $( document ).on( 'click', '.yith-plugin-fw-select-all', function () {
351
- var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
352
- $targetSelect.find( 'option' ).prop( 'selected', true ).trigger( 'change' );
353
- } );
354
-
355
- $( document ).on( 'click', '.yith-plugin-fw-deselect-all', function () {
356
- var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
357
- $targetSelect.find( 'option' ).prop( 'selected', false ).trigger( 'change' );
358
- } );
359
-
360
-
361
  $icons.each( function () {
 
362
  var $container = $( this ),
363
  $preview = $container.find( '.yit-icons-manager-icon-preview' ).first(),
364
  $text = $container.find( '.yit-icons-manager-icon-text' );
@@ -386,23 +406,6 @@
386
  } );
387
  } );
388
 
389
- /** Select Images */
390
- $( document ).on( 'click', '.yith-plugin-fw-select-images__item', function () {
391
- var item = $( this ),
392
- key = item.data( 'key' ),
393
- wrapper = item.closest( '.yith-plugin-fw-select-images__wrapper' ),
394
- items = wrapper.find( '.yith-plugin-fw-select-images__item' ),
395
- select = wrapper.find( 'select' ).first();
396
-
397
- if ( select.length ) {
398
- select.val( key ).trigger( 'yith_select_images_value_changed' ).trigger( 'change' );
399
- items.removeClass( 'yith-plugin-fw-select-images__item--selected' );
400
- item.addClass( 'yith-plugin-fw-select-images__item--selected' );
401
- }
402
- } );
403
-
404
- $( document.body ).trigger( 'wc-enhanced-select-init' );
405
-
406
  $( document ).find( '.ui-sortable .yith-toggle-elements' ).sortable(
407
  {
408
  cursor : 'move',
@@ -426,11 +429,41 @@
426
  }
427
  );
428
 
 
429
  $( document.body ).trigger( 'yith-framework-enhanced-select-init' );
 
 
 
430
  };
431
 
432
  $( document ).on( 'yith_fields_init', yith_fields_init ).trigger( 'yith_fields_init' );
433
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
  /* on-off */
435
  $( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
436
  var input = $( this ).prev( 'input' ),
@@ -732,7 +765,7 @@
732
 
733
  $( document.body ).on( 'yith-plugin-fw-init-radio', function () {
734
  $( '.yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)' ).each( function () {
735
- $( this ).val( $( this ).data( 'value' ) );
736
  $( this ).addClass( 'yith-plugin-fw-radio--initialized' );
737
  } );
738
  } ).trigger( 'yith-plugin-fw-init-radio' );
1
  /* globals yith_framework_fw_fields, wp */
2
  ( function ( $ ) {
3
+
4
+ /* Upload */
5
+ var uploadHandler = {
6
+ selectors : {
7
+ imgPreview : '.yith-plugin-fw-upload-img-preview',
8
+ uploadButton: '.yith-plugin-fw-upload-button',
9
+ imgUrl : '.yith-plugin-fw-upload-img-url',
10
+ resetButton : '.yith-plugin-fw-upload-button-reset'
11
+ },
12
+ onImageChange : function () {
13
+ var url = $( this ).val(),
14
+ imageRegex = new RegExp( "(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)" ),
15
+ preview = $( this ).parent().find( uploadHandler.selectors.imgPreview ).first();
16
+
17
+ if ( preview.length < 1 ) {
18
+ preview = $( this ).parent().parent().find( uploadHandler.selectors.imgPreview ).first();
19
+ }
20
+
21
+ if ( imageRegex.test( url ) ) {
22
+ preview.html( '<img src="' + url + '" style="max-width:100px; max-height:100px;" />' );
23
+ } else {
24
+ preview.html( '' );
25
+ }
26
+ },
27
+ onButtonClick : function ( e ) {
28
+ e.preventDefault();
29
+
30
+ var button = $( this ),
31
+ custom_uploader,
32
+ id = button.attr( 'id' ).replace( /-button$/, '' ).replace( /(\[|\])/g, '\\$1' );
33
+
34
+ // If the uploader object has already been created, reopen the dialog
35
+ if ( custom_uploader ) {
36
+ custom_uploader.open();
37
+ return;
38
+ }
39
+
40
+ var custom_uploader_states = [
41
+ new wp.media.controller.Library(
42
+ {
43
+ library : wp.media.query(),
44
+ multiple : false,
45
+ title : 'Choose Image',
46
+ priority : 20,
47
+ filterable: 'uploaded'
48
+ }
49
+ )
50
+ ];
51
+
52
+ // Create the media frame.
53
+ custom_uploader = wp.media.frames.downloadable_file = wp.media(
54
+ {
55
+ // Set the title of the modal.
56
+ title : 'Choose Image',
57
+ library : {
58
+ type: ''
59
+ },
60
+ button : {
61
+ text: 'Choose Image'
62
+ },
63
+ multiple: false,
64
+ states : custom_uploader_states
65
+ }
66
+ );
67
+
68
+ // When a file is selected, grab the URL and set it as the text field's value
69
+ custom_uploader.on( 'select', function () {
70
+ var attachment = custom_uploader.state().get( 'selection' ).first().toJSON(),
71
+ attachmentField = $( "#" + id + "-yith-attachment-id" );
72
+
73
+ $( "#" + id ).val( attachment.url );
74
+ // Save the id of the selected element to an element which name is the same with a suffix "-yith-attachment-id"
75
+ if ( attachmentField.length ) {
76
+ attachmentField.val( attachment.id );
77
+ }
78
+ uploadHandler.triggerImageChange();
79
+ } );
80
+
81
+ custom_uploader.open();
82
+ },
83
+ onResetClick : function () {
84
+ var button = $( this ),
85
+ id = button.attr( 'id' ).replace( /(\[|\])/g, '\\$1' ),
86
+ input_id = button.attr( 'id' ).replace( /-button-reset$/, '' ).replace( /(\[|\])/g, '\\$1' ),
87
+ default_value = $( '#' + id ).data( 'default' );
88
+
89
+ $( "#" + input_id ).val( default_value );
90
+ uploadHandler.triggerImageChange();
91
+ },
92
+ triggerImageChange: function () {
93
+ $( uploadHandler.selectors.imgUrl ).trigger( 'change' );
94
+ },
95
+ initOnce : function () {
96
+ if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
97
+ $( document ).on( 'change', uploadHandler.selectors.imgUrl, uploadHandler.onImageChange );
98
+
99
+ $( document ).on( 'click', uploadHandler.selectors.uploadButton, uploadHandler.onButtonClick );
100
+
101
+ $( document ).on( 'click', uploadHandler.selectors.resetButton, uploadHandler.onResetClick );
102
+ }
103
+ }
104
+ };
105
+
106
+ uploadHandler.initOnce();
107
+
108
+ var imageGallery = {
109
+ selectors: {
110
+ gallery : '.yith-plugin-fw-image-gallery',
111
+ notInitGallery: '.yith-plugin-fw-image-gallery:not(.yith-plugin-fw-image-gallery--initialized)',
112
+ button : '.yith-plugin-fw-image-gallery .image-gallery-button',
113
+ slideWrapper : 'ul.slides-wrapper'
114
+ },
115
+ initOnce : function () {
116
+ if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
117
+ $( document ).on( 'click', imageGallery.selectors.button, function ( e ) {
118
+ var button = $( this ),
119
+ gallery = button.closest( imageGallery.selectors.gallery ),
120
+ imageGalleryIDsField = gallery.find( '.image_gallery_ids' ),
121
+ attachmentIDs = imageGalleryIDsField.val(),
122
+ wrapper = gallery.find( 'ul.slides-wrapper' );
123
+
124
+ // Create the media frame.
125
+ var imageGalleryFrame = wp.media.frames.image_gallery = wp.media(
126
+ {
127
+ // Set the title of the modal.
128
+ title : button.data( 'choose' ),
129
+ button: {
130
+ text: button.data( 'update' )
131
+ },
132
+ states: [
133
+ new wp.media.controller.Library(
134
+ {
135
+ title : button.data( 'choose' ),
136
+ filterable: 'all',
137
+ multiple : true
138
+ }
139
+ )
140
+ ]
141
+ }
142
+ );
143
+
144
+ // When an image is selected, run a callback.
145
+ imageGalleryFrame.on( 'select', function () {
146
+ var selection = imageGalleryFrame.state().get( 'selection' );
147
+ selection.map( function ( attachment ) {
148
+ attachment = attachment.toJSON();
149
+
150
+ if ( attachment.id ) {
151
+ attachmentIDs = attachmentIDs ? attachmentIDs + "," + attachment.id : attachment.id;
152
+ wrapper.append( '<li class="image" data-attachment_id="' + attachment.id + '"><img src="' + attachment.sizes.thumbnail.url + '"/><ul class="actions"><li><a href="#" class="delete" title="' + button.data( 'delete' ) + '">x</a></li></ul></li>' );
153
+ }
154
+ } );
155
+
156
+ imageGalleryIDsField.val( attachmentIDs );
157
+ imageGalleryIDsField.trigger( 'change' );
158
+ } );
159
+
160
+ imageGalleryFrame.open();
161
+
162
+ } );
163
+ }
164
+ },
165
+ init : function () {
166
+ if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
167
+ $( imageGallery.selectors.notInitGallery ).each( function () {
168
+ $( this ).addClass( 'yith-plugin-fw-image-gallery--initialized' );
169
+ var slideWrappers = $( this ).find( imageGallery.selectors.slideWrapper );
170
+
171
+ // Image ordering
172
+ slideWrappers.each( function () {
173
+ var currentSlideWrapper = $( this );
174
+ currentSlideWrapper.sortable( {
175
+ items : 'li.image',
176
+ cursor : 'move',
177
+ scrollSensitivity : 40,
178
+ forcePlaceholderSize: true,
179
+ forceHelperSize : false,
180
+ helper : 'clone',
181
+ opacity : 0.65,
182
+ start : function ( event, ui ) {
183
+ ui.item.css( 'background-color', '#f6f6f6' );
184
+ },
185
+ stop : function ( event, ui ) {
186
+ ui.item.removeAttr( 'style' );
187
+ },
188
+ update : function ( event, ui ) {
189
+ var attachment_ids = '';
190
+
191
+ currentSlideWrapper.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
192
+ var attachment_id = $( this ).attr( 'data-attachment_id' );
193
+ attachment_ids = attachment_ids + attachment_id + ',';
194
+ } );
195
+
196
+ currentSlideWrapper.closest( imageGallery.selectors.gallery ).find( '.image_gallery_ids' ).val( attachment_ids );
197
+ }
198
+ } );
199
+ } );
200
+
201
+ // Remove images
202
+ slideWrappers.on( 'click', 'a.delete', function ( e ) {
203
+ e.preventDefault();
204
+ var _wrapper = $( this ).closest( imageGallery.selectors.gallery ),
205
+ _slideWrapper = _wrapper.find( 'ul.slides-wrapper' ),
206
+ _imageGalleryIDsField = _wrapper.find( '.image_gallery_ids' ),
207
+ _attachmentIDs = '';
208
+
209
+ $( this ).closest( 'li.image' ).remove();
210
+
211
+ _slideWrapper.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
212
+ var attachment_id = $( this ).attr( 'data-attachment_id' );
213
+ _attachmentIDs = _attachmentIDs + attachment_id + ',';
214
+ } );
215
+
216
+ _imageGalleryIDsField.val( _attachmentIDs );
217
+ } );
218
+ } )
219
+ }
220
+ }
221
+ };
222
+ imageGallery.initOnce();
223
+
224
+
225
+ // Codemirror.
226
+ $( function () {
227
+ var codemirrorInit = function () {
228
+ if ( typeof wp !== 'undefined' && typeof wp.codeEditor !== 'undefined' ) {
229
+ $( '.codemirror:not(.codemirror--initialized)' ).each( function () {
230
+ var settings = $( this ).data( 'settings' ),
231
+ editor = wp.codeEditor.initialize( $( this ), settings );
232
+
233
+ $( this ).addClass( 'codemirror--initialized' );
234
+ $( this ).data( 'codemirrorInstance', editor );
235
+ } );
236
+ }
237
+ };
238
+ $( document ).on( 'yith-plugin-fw-codemirror-init', codemirrorInit ).trigger( 'yith-plugin-fw-codemirror-init' );
239
+ } );
240
+
241
  var yith_fields_init = function () {
242
+ var $datepicker = $( '.yith-plugin-fw-datepicker:not(.yith-plugin-fw-datepicker--initialized)' ),
243
+ $colorpicker = $( '.yith-plugin-fw-colorpicker:not(.yith-plugin-fw-colorpicker--initialized)' ),
244
+ $sidebars = $( '.yith-plugin-fw-sidebar-layout:not(.yith-plugin-fw-sidebar-layout--initialized)' ),
245
+ $slider = $( '.yith-plugin-fw-slider-container:not(.yith-plugin-fw-slider-container--initialized)' ),
246
+ $icons = $( '.yit-icons-manager-wrapper:not(.yit-icons-manager-wrapper--initialized)' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
 
248
  /* Datepicker */
249
  $datepicker.each( function () {
250
+ $( this ).addClass( 'yith-plugin-fw-datepicker--initialized' );
251
+
252
  var currentDatePicker = $( this ),
253
  args = currentDatePicker.data(),
254
  icon = currentDatePicker.next( '.yith-icon-calendar' );
271
  } );
272
 
273
  /* Colorpicker */
 
 
 
 
 
 
 
 
 
 
 
 
274
  $colorpicker.each( function () {
275
+ $( this ).addClass( 'yith-plugin-fw-colorpicker--initialized' );
276
+
277
+ $( this ).wpColorPicker(
278
+ {
279
+ palettes: false,
280
+ width : 200,
281
+ mode : 'hsl',
282
+ clear : function () {
283
+ var input = $( this );
284
+ input.val( input.data( 'default-color' ) );
285
+ input.trigger( 'change' );
286
+ }
287
+ }
288
+ );
289
+
290
  var select_label = $( this ).data( 'variations-label' ),
291
  wrap_main1 = $( this ).closest( '.yith-plugin-fw-colorpicker-field-wrapper' ),
292
  wrap_main2 = $( this ).closest( '.yith-single-colorpicker' ),
298
 
299
  if ( !wrap1.find( '.wp-picker-default-custom' ).length ) {
300
  var button = $( '<span/>' ).attr( {
301
+ class: 'wp-picker-default-custom'
302
  } );
303
  wrap1.find( '.wp-picker-default' ).wrap( button );
304
  }
305
 
306
  if ( !wrap2.find( '.wp-picker-default-custom' ).length ) {
307
  var button = $( '<span/>' ).attr( {
308
+ class: 'wp-picker-default-custom'
309
  } );
310
  wrap2.find( '.wp-picker-default' ).wrap( button );
311
  }
312
  } );
313
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
314
  /* Sidebars */
315
  $sidebars.each( function () {
316
+ $( this ).addClass( 'yith-plugin-fw-sidebar-layout--initialized' );
317
  var $images = $( this ).find( 'img' );
318
  $images.on( 'click', function () {
319
  var $container = $( this ).closest( '.yith-plugin-fw-sidebar-layout' ),
349
 
350
  /* Slider */
351
  $slider.each( function () {
352
+ $( this ).addClass( 'yith-plugin-fw-slider-container--initialized' );
353
+ var theSlider = $( this ).find( '.ui-slider-horizontal' ),
354
+ val = theSlider.data( 'val' ),
355
+ minValue = theSlider.data( 'min' ),
356
+ maxValue = theSlider.data( 'max' ),
357
+ step = theSlider.data( 'step' ),
358
+ labels = theSlider.data( 'labels' );
359
+
360
+ theSlider.slider( {
361
  value: val,
362
  min : minValue,
363
  max : maxValue,
377
  } );
378
  } );
379
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
380
  $icons.each( function () {
381
+ $( this ).addClass( 'yit-icons-manager-wrapper--initialized' );
382
  var $container = $( this ),
383
  $preview = $container.find( '.yit-icons-manager-icon-preview' ).first(),
384
  $text = $container.find( '.yit-icons-manager-icon-text' );
406
  } );
407
  } );
408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  $( document ).find( '.ui-sortable .yith-toggle-elements' ).sortable(
410
  {
411
  cursor : 'move',
429
  }
430
  );
431
 
432
+ $( document.body ).trigger( 'wc-enhanced-select-init' );
433
  $( document.body ).trigger( 'yith-framework-enhanced-select-init' );
434
+ $( document ).trigger( 'yith-plugin-fw-codemirror-init' );
435
+ uploadHandler.triggerImageChange();
436
+ imageGallery.init();
437
  };
438
 
439
  $( document ).on( 'yith_fields_init', yith_fields_init ).trigger( 'yith_fields_init' );
440
 
441
+ /** Select Images */
442
+ $( document ).on( 'click', '.yith-plugin-fw-select-images__item', function () {
443
+ var item = $( this ),
444
+ key = item.data( 'key' ),
445
+ wrapper = item.closest( '.yith-plugin-fw-select-images__wrapper' ),
446
+ items = wrapper.find( '.yith-plugin-fw-select-images__item' ),
447
+ select = wrapper.find( 'select' ).first();
448
+
449
+ if ( select.length ) {
450
+ select.val( key ).trigger( 'yith_select_images_value_changed' ).trigger( 'change' );
451
+ items.removeClass( 'yith-plugin-fw-select-images__item--selected' );
452
+ item.addClass( 'yith-plugin-fw-select-images__item--selected' );
453
+ }
454
+ } );
455
+
456
+ /* Select All - Deselect All */
457
+ $( document ).on( 'click', '.yith-plugin-fw-select-all', function () {
458
+ var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
459
+ $targetSelect.find( 'option' ).prop( 'selected', true ).trigger( 'change' );
460
+ } );
461
+
462
+ $( document ).on( 'click', '.yith-plugin-fw-deselect-all', function () {
463
+ var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
464
+ $targetSelect.find( 'option' ).prop( 'selected', false ).trigger( 'change' );
465
+ } );
466
+
467
  /* on-off */
468
  $( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
469
  var input = $( this ).prev( 'input' ),
765
 
766
  $( document.body ).on( 'yith-plugin-fw-init-radio', function () {
767
  $( '.yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)' ).each( function () {
768
+ $( this ).find( 'input[type="radio"]' ).filter( '[value="' + $( this ).data( 'value' ) + '"]' ).click();
769
  $( this ).addClass( 'yith-plugin-fw-radio--initialized' );
770
  } );
771
  } ).trigger( 'yith-plugin-fw-init-radio' );
plugin-fw/assets/js/yith-fields.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e(document).on("yith_fields_init",function(){var t=e(".yith-plugin-fw-datepicker"),i=e(".yith-plugin-fw-colorpicker"),n={imgPreviewHandler:".yith-plugin-fw-upload-img-preview",uploadButtonHandler:".yith-plugin-fw-upload-button",imgUrlHandler:".yith-plugin-fw-upload-img-url",resetButtonHandler:".yith-plugin-fw-upload-button-reset",imgUrl:e(".yith-plugin-fw-upload-img-url")},a=e(".add_media"),l={rootSelector:".yith-plugin-fw-image-gallery",buttonSelector:".yith-plugin-fw-image-gallery .image-gallery-button",sliderWrapper:e(".yith-plugin-fw-image-gallery ul.slides-wrapper")},o=e(".yith-plugin-fw-sidebar-layout"),s=e(".yith-plugin-fw-slider-container .ui-slider-horizontal"),r=e(".yit-icons-manager-wrapper");e(".yith-plugin-ui td.forminp-checkbox");t.each(function(){var t=e(this),i=t.data(),n=t.next(".yith-icon-calendar");i.showAnim=!1,i.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},i.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},t.datepicker(i),n&&n.on("click",function(){t.datepicker("show")})}),i.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.change()}}),i.each(function(){var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),n=e(this).closest(".yith-single-colorpicker"),a=i.find(".wp-picker-input-wrap"),l=n.find(".wp-picker-input-wrap");if(a.length&&i.find("a.wp-color-result").attr("title",t),n.length&&n.find("a.wp-color-result").attr("title",t),!a.find(".wp-picker-default-custom").length){var o=e("<span/>").attr({"class":"wp-picker-default-custom"});a.find(".wp-picker-default").wrap(o)}l.find(".wp-picker-default-custom").length||(o=e("<span/>").attr({"class":"wp-picker-default-custom"}),l.find(".wp-picker-default").wrap(o))}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(n.imgUrl.change(function(){var t=e(this).val(),i=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)"),a=e(this).parent().find(n.imgPreviewHandler).first();a.length<1&&(a=e(this).parent().parent().find(n.imgPreviewHandler).first()),i.test(t)?a.html('<img src="'+t+'" style="max-width:100px; max-height:100px;" />'):a.html("")}).trigger("change"),e(document).on("click",n.uploadButtonHandler,function(t){t.preventDefault();var i,a=e(this).attr("id").replace(/-button$/,"").replace(/(\[|\])/g,"\\$1");if(i)i.open();else{var l=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(i=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:l})).on("select",function(){var t=i.state().get("selection").first().toJSON();e("#"+a).val(t.url),e("#"+a+"-yith-attachment-id")&&e("#"+a+"-yith-attachment-id").val(t.id),n.imgUrl.trigger("change")}),i.open()}}),e(document).on("click",n.resetButtonHandler,function(t){var i=e(this),a=i.attr("id").replace(/(\[|\])/g,"\\$1"),l=i.attr("id").replace(/-button-reset$/,"").replace(/(\[|\])/g,"\\$1"),o=e("#"+a).data("default");e("#"+l).val(o),n.imgUrl.trigger("change")}));a.on("click",function(){}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("click",l.buttonSelector,function(t){var i=e(this),n=i.closest(l.rootSelector),a=n.find(".image_gallery_ids"),o=a.val(),s=n.find("ul.slides-wrapper"),r=wp.media.frames.image_gallery=wp.media({title:i.data("choose"),button:{text:i.data("update")},states:[new wp.media.controller.Library({title:i.data("choose"),filterable:"all",multiple:!0})]});r.on("select",function(){r.state().get("selection").map(function(e){(e=e.toJSON()).id&&(o=o?o+","+e.id:e.id,s.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+i.data("delete")+'">x</a></li></ul></li>'))}),a.val(o),a.trigger("change")}),r.open()}),l.sliderWrapper.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(i,n){var a="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");a=a+t+","}),t.closest(l.rootSelector).find(".image_gallery_ids").val(a)}})}),l.sliderWrapper.on("click","a.delete",function(t){t.preventDefault();var i=e(this).closest(l.rootSelector),n=i.find("ul.slides-wrapper"),a=i.find(".image_gallery_ids"),o="";e(this).closest("li.image").remove(),n.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");o=o+t+","}),a.val(o)})),o.each(function(){e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),n=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),a=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==a)switch(a){case"left":i.show(),n.hide();break;case"right":n.show(),i.hide();break;case"double":i.show(),n.show();break;default:i.hide(),n.hide()}})}),s.each(function(){var t=e(this).data("val"),i=e(this).data("min"),n=e(this).data("max"),a=e(this).data("step"),l=e(this).data("labels");e(this).slider({value:t,min:i,max:n,range:"min",step:a,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value).trigger("change"),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+l)}})}),e(function(){e(document).on("yith-plugin-fw-codemirror-init",function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.codeEditor&&e(".codemirror:not(.codemirror--initialized)").each(function(){var t=e(this).data("settings"),i=wp.codeEditor.initialize(e(this),t);e(this).addClass("codemirror--initialized"),e(this).data("codemirrorInstance",i)})}).trigger("yith-plugin-fw-codemirror-init")}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),r.each(function(){var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),n=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(a){var l=e(a.target).closest("li"),o=l.data("font"),s=l.data("icon"),r=l.data("key"),c=l.data("name");i.attr("data-font",o),i.attr("data-icon",s),i.attr("data-key",r),i.attr("data-name",c),n.val(o+":"+c),t.find(".yit-icons-manager-list li").removeClass("active"),l.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),n=t.closest(".yith-plugin-fw-select-images__wrapper"),a=n.find(".yith-plugin-fw-select-images__item"),l=n.find("select").first();l.length&&(l.val(i).trigger("yith_select_images_value_changed").trigger("change"),a.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document.body).trigger("wc-enhanced-select-init"),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var n=jQuery(".ui-sortable-handle"),a=0,l=new Array;for(a=0;a<n.length;a++)l[a]=e(n[a]).data("item_key");l.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,l)}}),e(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input");t.prop("disabled")||t.trigger("click")}),e(document).on("click",".yith-plugin-fw-onoff-container input",function(t){e(this).is(":checked")?e(this).attr("value","yes").addClass("onoffchecked"):e(this).attr("value","no").removeClass("onoffchecked"),e(this).trigger("change")}),e.fn.saveToggleElement=function(t,i){var n=e(this),a="yith_plugin_fw_save_toggle_element",l=n.serializeToggleElement(),o=n.find(".yith-toggle_wrapper"),s=o.attr("id"),r=e.urlParam("tab");l.append("security",o.data("nonce")),void 0!==i&&i.length>0&&l.append("yith_toggle_elements_order_keys",i),n.closest(".metaboxes-tab.yith-plugin-ui").length?(a="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+a+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+s+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+a+"&tab="+r+"&toggle_id="+s,e.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,n])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,n=e(t).find(":input").serializeArray();return e.each(n,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),n=t.find("span.title").data("title_format"),a=t.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==n)var o=n.match(l);if(void 0!==a)var s=a.match(l);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(n=n.replace("%%"+$field_id+"%%",$field_val)),null!=s&&void 0!==s&&-1!==s.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)))}),""!==n&&t.find("span.title").html(n),""!==a&&t.find(".subtitle").html(a),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),n=i.closest(".yith-toggle-row"),a=n.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;n.is(".yith-toggle-row-opened")?a.slideUp(400):a.slideDown(400),n.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),n=i.data("box_id"),a=i.data("closed_label"),l=i.data("opened_label"),o=i.closest(".yith-toggle_wrapper").attr("id"),s=wp.template("yith-toggle-element-add-box-content-"+o);""!==n&&(e("#"+n).html(s({index:"box_id"})).slideToggle(),""!==a&&(i.html()===a?i.html(l).removeClass("closed"):i.html(a).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),n=e(this).closest(".yith-toggle_wrapper").attr("id"),a=i.find(".spinner"),l=e(this).parents(".toggle-element"),o=i.find(":input"),s=0,r=e('<input type="hidden">');l.find(".yith-toggle-row").each(function(){var t=parseInt(e(this).data("item_key"));s<=t&&(s=t+1)}),r.val(s),e(document).trigger("yith-toggle-change-counter",[r,i]),s=r.val();var c=wp.template("yith-toggle-element-item-"+n),d=e(c({index:s}));a.addClass("show"),e.each(o,function(t,i){if(void 0!==e(i).attr("id")){var n=e(i).attr("id"),a=e(i).val();n="radio"===e(i).attr("type")?(n=(n=e(i).closest(".yith-plugin-fw-radio").attr("id")).replace("new_","")+"_"+s)+"-"+a:n.replace("new_","")+"_"+s,e(i).is(":checked")&&e(d).find("#"+n).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(d).find("#"+n).html(e("#"+e(i).attr("id")).html()),e(d).find("#"+n).val(a)}}),e(d).formatToggleTitle();var u=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,d,u]);setTimeout(function(){if("yes"===u.val()){e(l).find(".yith-toggle-elements").append(d),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),l.saveToggleElement();setTimeout(function(){e(l).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),n=e(this).closest(".yith-toggle-row"),a=n.find(".spinner");n.formatToggleTitle();var l=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,n,l]),"yes"===l.val()&&(a.addClass("show"),i.saveToggleElement(a))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){var t=e(this).closest(".yith-plugin-fw-radio"),i=e(this).val();t.val(i).data("value",i).trigger("change")}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).val(e(this).data("value")),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")});var t={selectors:{wrapper:".yith-plugin-fw-dimensions",units:{wrapper:".yith-plugin-fw-dimensions__units",single:".yith-plugin-fw-dimensions__unit",value:".yith-plugin-fw-dimensions__unit__value",selectedClass:"yith-plugin-fw-dimensions__unit--selected"},linked:{button:".yith-plugin-fw-dimensions__linked",value:".yith-plugin-fw-dimensions__linked__value",wrapperActiveClass:"yith-plugin-fw-dimensions--linked-active"},dimensions:{number:".yith-plugin-fw-dimensions__dimension__number"}},init:function(){var i=t;e(document).on("click",i.selectors.units.single,i.unitChange),e(document).on("click",i.selectors.linked.button,i.linkedChange),e(document).on("change keyup",i.selectors.dimensions.number,i.numberChange)},unitChange:function(i){var n=e(this).closest(t.selectors.units.single),a=n.closest(t.selectors.units.wrapper),l=a.find(t.selectors.units.single),o=a.find(t.selectors.units.value).first(),s=n.data("value");l.removeClass(t.selectors.units.selectedClass),n.addClass(t.selectors.units.selectedClass),o.val(s).trigger("change")},linkedChange:function(){var i=e(this).closest(t.selectors.linked.button),n=i.closest(t.selectors.wrapper),a=i.find(t.selectors.linked.value);"yes"===a.val()?(n.removeClass(t.selectors.linked.wrapperActiveClass),a.val("no")):(n.addClass(t.selectors.linked.wrapperActiveClass),a.val("yes"),n.find(t.selectors.dimensions.number).first().trigger("change"))},numberChange:function(i){var n=e(this).closest(t.selectors.dimensions.number),a=n.closest(t.selectors.wrapper);a.hasClass(t.selectors.linked.wrapperActiveClass)&&a.find(t.selectors.dimensions.number).val(n.val())}};t.init();e(document).on("click",".yith-plugin-fw-copy-to-clipboard__copy",function(){var t,i=e(this).closest(".yith-plugin-fw-copy-to-clipboard"),n=i.find(".yith-plugin-fw-copy-to-clipboard__field"),a=i.find(".yith-plugin-fw-copy-to-clipboard__tip"),l=i.data("tip-timeout");l&&clearTimeout(l),n.select(),document.execCommand("copy"),(t="getSelection"in window&&window.getSelection())?"empty"in t?t.empty():"removeAllRanges"in t&&t.removeAllRanges():"selection"in document&&document.selection.empty(),a.fadeIn(400),l=setTimeout(function(){a.fadeOut(400)},1500),i.data("tip-timeout",l)});var i={init:function(){e(document).on("click",".yith-plugin-fw__action-button--has-menu",i.open),e(document).on("click",".yith-plugin-fw__action-button__menu",i.stopPropagation),e(document).on("click",i.closeAll)},closeAll:function(){e(".yith-plugin-fw__action-button--opened").removeClass("yith-plugin-fw__action-button--opened")},open:function(t){var n=e(this).closest(".yith-plugin-fw__action-button"),a=n.hasClass("yith-plugin-fw__action-button--opened");t.preventDefault(),t.stopPropagation(),i.closeAll(),a||n.addClass("yith-plugin-fw__action-button--opened")},stopPropagation:function(e){e.stopPropagation()}};i.init(),e(document).on("click","a.yith-plugin-fw__require-confirmation-link",function(t){var i=e(this).closest("a.yith-plugin-fw__require-confirmation-link"),n=i.attr("href");if(n&&"#"!==n&&(t.preventDefault(),t.stopPropagation(),"yith"in window&&"ui"in yith)){var a,l=["title","message","confirmButtonType","cancelButton","confirmButton"],o={};for(a in l){var s=l[a],r=i.data(s);void 0!==r&&(o[s]=r)}o.onConfirm=function(){window.location.href=n},o.closeAfterConfirm=!1,yith.ui.confirm(o)}}),e(document).on("yith-plugin-fw-tips-init",function(){e(".yith-plugin-fw__tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}).trigger("yith-plugin-fw-tips-init")}(jQuery);
1
+ !function(e){var t={selectors:{imgPreview:".yith-plugin-fw-upload-img-preview",uploadButton:".yith-plugin-fw-upload-button",imgUrl:".yith-plugin-fw-upload-img-url",resetButton:".yith-plugin-fw-upload-button-reset"},onImageChange:function(){var i=e(this).val(),n=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)"),a=e(this).parent().find(t.selectors.imgPreview).first();a.length<1&&(a=e(this).parent().parent().find(t.selectors.imgPreview).first()),n.test(i)?a.html('<img src="'+i+'" style="max-width:100px; max-height:100px;" />'):a.html("")},onButtonClick:function(i){i.preventDefault();var n,a=e(this).attr("id").replace(/-button$/,"").replace(/(\[|\])/g,"\\$1");if(n)n.open();else{var l=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(n=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:l})).on("select",function(){var i=n.state().get("selection").first().toJSON(),l=e("#"+a+"-yith-attachment-id");e("#"+a).val(i.url),l.length&&l.val(i.id),t.triggerImageChange()}),n.open()}},onResetClick:function(){var i=e(this),n=i.attr("id").replace(/(\[|\])/g,"\\$1"),a=i.attr("id").replace(/-button-reset$/,"").replace(/(\[|\])/g,"\\$1"),l=e("#"+n).data("default");e("#"+a).val(l),t.triggerImageChange()},triggerImageChange:function(){e(t.selectors.imgUrl).trigger("change")},initOnce:function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("change",t.selectors.imgUrl,t.onImageChange),e(document).on("click",t.selectors.uploadButton,t.onButtonClick),e(document).on("click",t.selectors.resetButton,t.onResetClick))}};t.initOnce();var i={selectors:{gallery:".yith-plugin-fw-image-gallery",notInitGallery:".yith-plugin-fw-image-gallery:not(.yith-plugin-fw-image-gallery--initialized)",button:".yith-plugin-fw-image-gallery .image-gallery-button",slideWrapper:"ul.slides-wrapper"},initOnce:function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&e(document).on("click",i.selectors.button,function(t){var n=e(this),a=n.closest(i.selectors.gallery),l=a.find(".image_gallery_ids"),o=l.val(),s=a.find("ul.slides-wrapper"),r=wp.media.frames.image_gallery=wp.media({title:n.data("choose"),button:{text:n.data("update")},states:[new wp.media.controller.Library({title:n.data("choose"),filterable:"all",multiple:!0})]});r.on("select",function(){r.state().get("selection").map(function(e){(e=e.toJSON()).id&&(o=o?o+","+e.id:e.id,s.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+n.data("delete")+'">x</a></li></ul></li>'))}),l.val(o),l.trigger("change")}),r.open()})},init:function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&e(i.selectors.notInitGallery).each(function(){e(this).addClass("yith-plugin-fw-image-gallery--initialized");var t=e(this).find(i.selectors.slideWrapper);t.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(n,a){var l="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");l=l+t+","}),t.closest(i.selectors.gallery).find(".image_gallery_ids").val(l)}})}),t.on("click","a.delete",function(t){t.preventDefault();var n=e(this).closest(i.selectors.gallery),a=n.find("ul.slides-wrapper"),l=n.find(".image_gallery_ids"),o="";e(this).closest("li.image").remove(),a.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");o=o+t+","}),l.val(o)})})}};i.initOnce(),e(function(){e(document).on("yith-plugin-fw-codemirror-init",function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.codeEditor&&e(".codemirror:not(.codemirror--initialized)").each(function(){var t=e(this).data("settings"),i=wp.codeEditor.initialize(e(this),t);e(this).addClass("codemirror--initialized"),e(this).data("codemirrorInstance",i)})}).trigger("yith-plugin-fw-codemirror-init")});e(document).on("yith_fields_init",function(){var n=e(".yith-plugin-fw-datepicker:not(.yith-plugin-fw-datepicker--initialized)"),a=e(".yith-plugin-fw-colorpicker:not(.yith-plugin-fw-colorpicker--initialized)"),l=e(".yith-plugin-fw-sidebar-layout:not(.yith-plugin-fw-sidebar-layout--initialized)"),o=e(".yith-plugin-fw-slider-container:not(.yith-plugin-fw-slider-container--initialized)"),s=e(".yit-icons-manager-wrapper:not(.yit-icons-manager-wrapper--initialized)");n.each(function(){e(this).addClass("yith-plugin-fw-datepicker--initialized");var t=e(this),i=t.data(),n=t.next(".yith-icon-calendar");i.showAnim=!1,i.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},i.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},t.datepicker(i),n&&n.on("click",function(){t.datepicker("show")})}),a.each(function(){e(this).addClass("yith-plugin-fw-colorpicker--initialized"),e(this).wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.trigger("change")}});var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),n=e(this).closest(".yith-single-colorpicker"),a=i.find(".wp-picker-input-wrap"),l=n.find(".wp-picker-input-wrap");if(a.length&&i.find("a.wp-color-result").attr("title",t),n.length&&n.find("a.wp-color-result").attr("title",t),!a.find(".wp-picker-default-custom").length){var o=e("<span/>").attr({"class":"wp-picker-default-custom"});a.find(".wp-picker-default").wrap(o)}l.find(".wp-picker-default-custom").length||(o=e("<span/>").attr({"class":"wp-picker-default-custom"}),l.find(".wp-picker-default").wrap(o))}),l.each(function(){e(this).addClass("yith-plugin-fw-sidebar-layout--initialized"),e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),n=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),a=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==a)switch(a){case"left":i.show(),n.hide();break;case"right":n.show(),i.hide();break;case"double":i.show(),n.show();break;default:i.hide(),n.hide()}})}),o.each(function(){e(this).addClass("yith-plugin-fw-slider-container--initialized");var t=e(this).find(".ui-slider-horizontal"),i=t.data("val"),n=t.data("min"),a=t.data("max"),l=t.data("step"),o=t.data("labels");t.slider({value:i,min:n,max:a,range:"min",step:l,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value).trigger("change"),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+o)}})}),s.each(function(){e(this).addClass("yit-icons-manager-wrapper--initialized");var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),n=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(a){var l=e(a.target).closest("li"),o=l.data("font"),s=l.data("icon"),r=l.data("key"),c=l.data("name");i.attr("data-font",o),i.attr("data-icon",s),i.attr("data-key",r),i.attr("data-name",c),n.val(o+":"+c),t.find(".yit-icons-manager-list li").removeClass("active"),l.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var n=jQuery(".ui-sortable-handle"),a=0,l=new Array;for(a=0;a<n.length;a++)l[a]=e(n[a]).data("item_key");l.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,l)}}),e(document.body).trigger("wc-enhanced-select-init"),e(document.body).trigger("yith-framework-enhanced-select-init"),e(document).trigger("yith-plugin-fw-codemirror-init"),t.triggerImageChange(),i.init()}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),n=t.closest(".yith-plugin-fw-select-images__wrapper"),a=n.find(".yith-plugin-fw-select-images__item"),l=n.find("select").first();l.length&&(l.val(i).trigger("yith_select_images_value_changed").trigger("change"),a.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input");t.prop("disabled")||t.trigger("click")}),e(document).on("click",".yith-plugin-fw-onoff-container input",function(t){e(this).is(":checked")?e(this).attr("value","yes").addClass("onoffchecked"):e(this).attr("value","no").removeClass("onoffchecked"),e(this).trigger("change")}),e.fn.saveToggleElement=function(t,i){var n=e(this),a="yith_plugin_fw_save_toggle_element",l=n.serializeToggleElement(),o=n.find(".yith-toggle_wrapper"),s=o.attr("id"),r=e.urlParam("tab");l.append("security",o.data("nonce")),void 0!==i&&i.length>0&&l.append("yith_toggle_elements_order_keys",i),n.closest(".metaboxes-tab.yith-plugin-ui").length?(a="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+a+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+s+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+a+"&tab="+r+"&toggle_id="+s,e.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,n])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,n=e(t).find(":input").serializeArray();return e.each(n,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),n=t.find("span.title").data("title_format"),a=t.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==n)var o=n.match(l);if(void 0!==a)var s=a.match(l);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(n=n.replace("%%"+$field_id+"%%",$field_val)),null!=s&&void 0!==s&&-1!==s.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)))}),""!==n&&t.find("span.title").html(n),""!==a&&t.find(".subtitle").html(a),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),n=i.closest(".yith-toggle-row"),a=n.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;n.is(".yith-toggle-row-opened")?a.slideUp(400):a.slideDown(400),n.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),n=i.data("box_id"),a=i.data("closed_label"),l=i.data("opened_label"),o=i.closest(".yith-toggle_wrapper").attr("id"),s=wp.template("yith-toggle-element-add-box-content-"+o);""!==n&&(e("#"+n).html(s({index:"box_id"})).slideToggle(),""!==a&&(i.html()===a?i.html(l).removeClass("closed"):i.html(a).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),n=e(this).closest(".yith-toggle_wrapper").attr("id"),a=i.find(".spinner"),l=e(this).parents(".toggle-element"),o=i.find(":input"),s=0,r=e('<input type="hidden">');l.find(".yith-toggle-row").each(function(){var t=parseInt(e(this).data("item_key"));s<=t&&(s=t+1)}),r.val(s),e(document).trigger("yith-toggle-change-counter",[r,i]),s=r.val();var c=wp.template("yith-toggle-element-item-"+n),d=e(c({index:s}));a.addClass("show"),e.each(o,function(t,i){if(void 0!==e(i).attr("id")){var n=e(i).attr("id"),a=e(i).val();n="radio"===e(i).attr("type")?(n=(n=e(i).closest(".yith-plugin-fw-radio").attr("id")).replace("new_","")+"_"+s)+"-"+a:n.replace("new_","")+"_"+s,e(i).is(":checked")&&e(d).find("#"+n).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(d).find("#"+n).html(e("#"+e(i).attr("id")).html()),e(d).find("#"+n).val(a)}}),e(d).formatToggleTitle();var u=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,d,u]);setTimeout(function(){if("yes"===u.val()){e(l).find(".yith-toggle-elements").append(d),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),l.saveToggleElement();setTimeout(function(){e(l).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),n=e(this).closest(".yith-toggle-row"),a=n.find(".spinner");n.formatToggleTitle();var l=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,n,l]),"yes"===l.val()&&(a.addClass("show"),i.saveToggleElement(a))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){var t=e(this).closest(".yith-plugin-fw-radio"),i=e(this).val();t.val(i).data("value",i).trigger("change")}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).find('input[type="radio"]').filter('[value="'+e(this).data("value")+'"]').click(),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")});var n={selectors:{wrapper:".yith-plugin-fw-dimensions",units:{wrapper:".yith-plugin-fw-dimensions__units",single:".yith-plugin-fw-dimensions__unit",value:".yith-plugin-fw-dimensions__unit__value",selectedClass:"yith-plugin-fw-dimensions__unit--selected"},linked:{button:".yith-plugin-fw-dimensions__linked",value:".yith-plugin-fw-dimensions__linked__value",wrapperActiveClass:"yith-plugin-fw-dimensions--linked-active"},dimensions:{number:".yith-plugin-fw-dimensions__dimension__number"}},init:function(){var t=n;e(document).on("click",t.selectors.units.single,t.unitChange),e(document).on("click",t.selectors.linked.button,t.linkedChange),e(document).on("change keyup",t.selectors.dimensions.number,t.numberChange)},unitChange:function(t){var i=e(this).closest(n.selectors.units.single),a=i.closest(n.selectors.units.wrapper),l=a.find(n.selectors.units.single),o=a.find(n.selectors.units.value).first(),s=i.data("value");l.removeClass(n.selectors.units.selectedClass),i.addClass(n.selectors.units.selectedClass),o.val(s).trigger("change")},linkedChange:function(){var t=e(this).closest(n.selectors.linked.button),i=t.closest(n.selectors.wrapper),a=t.find(n.selectors.linked.value);"yes"===a.val()?(i.removeClass(n.selectors.linked.wrapperActiveClass),a.val("no")):(i.addClass(n.selectors.linked.wrapperActiveClass),a.val("yes"),i.find(n.selectors.dimensions.number).first().trigger("change"))},numberChange:function(t){var i=e(this).closest(n.selectors.dimensions.number),a=i.closest(n.selectors.wrapper);a.hasClass(n.selectors.linked.wrapperActiveClass)&&a.find(n.selectors.dimensions.number).val(i.val())}};n.init();e(document).on("click",".yith-plugin-fw-copy-to-clipboard__copy",function(){var t,i=e(this).closest(".yith-plugin-fw-copy-to-clipboard"),n=i.find(".yith-plugin-fw-copy-to-clipboard__field"),a=i.find(".yith-plugin-fw-copy-to-clipboard__tip"),l=i.data("tip-timeout");l&&clearTimeout(l),n.select(),document.execCommand("copy"),(t="getSelection"in window&&window.getSelection())?"empty"in t?t.empty():"removeAllRanges"in t&&t.removeAllRanges():"selection"in document&&document.selection.empty(),a.fadeIn(400),l=setTimeout(function(){a.fadeOut(400)},1500),i.data("tip-timeout",l)});var a={init:function(){e(document).on("click",".yith-plugin-fw__action-button--has-menu",a.open),e(document).on("click",".yith-plugin-fw__action-button__menu",a.stopPropagation),e(document).on("click",a.closeAll)},closeAll:function(){e(".yith-plugin-fw__action-button--opened").removeClass("yith-plugin-fw__action-button--opened")},open:function(t){var i=e(this).closest(".yith-plugin-fw__action-button"),n=i.hasClass("yith-plugin-fw__action-button--opened");t.preventDefault(),t.stopPropagation(),a.closeAll(),n||i.addClass("yith-plugin-fw__action-button--opened")},stopPropagation:function(e){e.stopPropagation()}};a.init(),e(document).on("click","a.yith-plugin-fw__require-confirmation-link",function(t){var i=e(this).closest("a.yith-plugin-fw__require-confirmation-link"),n=i.attr("href");if(n&&"#"!==n&&(t.preventDefault(),t.stopPropagation(),"yith"in window&&"ui"in yith)){var a,l=["title","message","confirmButtonType","cancelButton","confirmButton"],o={};for(a in l){var s=l[a],r=i.data(s);void 0!==r&&(o[s]=r)}o.onConfirm=function(){window.location.href=n},o.closeAfterConfirm=!1,yith.ui.confirm(o)}}),e(document).on("yith-plugin-fw-tips-init",function(){e(".yith-plugin-fw__tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}).trigger("yith-plugin-fw-tips-init")}(jQuery);
plugin-fw/assets/js/yith-ui.js CHANGED
@@ -32,6 +32,7 @@ window.yith = window.yith || {};
32
  var defaults = {
33
  title : false,
34
  message : false,
 
35
  onConfirm : false,
36
  onCancel : false,
37
  onClose : false,
@@ -111,6 +112,7 @@ window.yith = window.yith || {};
111
  allowWpMenu : options.allowWpMenu,
112
  allowWpMenuInMobile : options.allowWpMenuInMobile,
113
  showClose : options.showClose,
 
114
  onClose : options.onClose,
115
  closeWhenClickingOnOverlay: options.closeWhenClickingOnOverlay
116
  }
@@ -170,6 +172,7 @@ window.yith = window.yith || {};
170
  allowClosingWithEsc : true,
171
  closeWhenClickingOnOverlay: false,
172
  scrollContent : true,
 
173
  onClose : false
174
  },
175
  self = {};
@@ -273,7 +276,9 @@ window.yith = window.yith || {};
273
  container.addClass( 'yith-plugin-fw__modal--allow-wp-menu-in-mobile' );
274
  }
275
 
276
-
 
 
277
  },
278
  initEvents = function () {
279
  dom.close.on( 'click', handleClose );
@@ -292,7 +297,7 @@ window.yith = window.yith || {};
292
  if ( options.allowClosingWithEsc && event.keyCode === 27 ) {
293
  handleClose();
294
  }
295
- }
296
 
297
  initialize();
298
 
@@ -300,7 +305,6 @@ window.yith = window.yith || {};
300
  self.close = handleClose;
301
 
302
  return self;
303
-
304
- }
305
 
306
  } )( window.jQuery, window.yith );
32
  var defaults = {
33
  title : false,
34
  message : false,
35
+ onCreate : false,
36
  onConfirm : false,
37
  onCancel : false,
38
  onClose : false,
112
  allowWpMenu : options.allowWpMenu,
113
  allowWpMenuInMobile : options.allowWpMenuInMobile,
114
  showClose : options.showClose,
115
+ onCreate : options.onCreate,
116
  onClose : options.onClose,
117
  closeWhenClickingOnOverlay: options.closeWhenClickingOnOverlay
118
  }
172
  allowClosingWithEsc : true,
173
  closeWhenClickingOnOverlay: false,
174
  scrollContent : true,
175
+ onCreate : false,
176
  onClose : false
177
  },
178
  self = {};
276
  container.addClass( 'yith-plugin-fw__modal--allow-wp-menu-in-mobile' );
277
  }
278
 
279
+ if ( typeof options.onCreate === 'function' ) {
280
+ options.onCreate();
281
+ }
282
  },
283
  initEvents = function () {
284
  dom.close.on( 'click', handleClose );
297
  if ( options.allowClosingWithEsc && event.keyCode === 27 ) {
298
  handleClose();
299
  }
300
+ };
301
 
302
  initialize();
303
 
305
  self.close = handleClose;
306
 
307
  return self;
308
+ };
 
309
 
310
  } )( window.jQuery, window.yith );
plugin-fw/assets/js/yith-ui.min.js CHANGED
@@ -1 +1 @@
1
- window.yith=window.yith||{},function(n,e){e.ui=e.ui||{};var o=function(n){if("string"==typeof n)return n;var e=[];for(var t of n)t&&e.indexOf(t)<0&&e.push(o(t));return e.join(" ")},t=function(n){n.stopPropagation()};e.ui.confirm=function(t){var l={title:!1,message:!1,onConfirm:!1,onCancel:!1,onClose:!1,classes:{wrap:"",content:"",title:"",message:"",footer:"",cancel:"",confirm:""},confirmButtonType:"confirm",cancelButton:yith_plugin_fw_ui.i18n.cancel,confirmButton:yith_plugin_fw_ui.i18n.confirm,width:350,closeAfterConfirm:!0,allowWpMenu:!1,allowWpMenuInMobile:!1,showClose:!0,closeWhenClickingOnOverlay:!1},i={};t=void 0!==t?t:{},(t=n.extend({},l,t)).classes=n.extend({},l.classes,t.classes);var s={wrap:o(["yith-plugin-fw__confirm__wrap",t.classes.wrap]),content:o(["yith-plugin-fw__confirm__content",t.classes.content]),title:o(["yith-plugin-fw__confirm__title",t.classes.title]),message:o(["yith-plugin-fw__confirm__message",t.classes.message]),footer:o(["yith-plugin-fw__confirm__footer",t.classes.footer]),cancel:o(["yith-plugin-fw__confirm__button","yith-plugin-fw__confirm__button--cancel",t.classes.cancel]),confirm:o(["yith-plugin-fw__confirm__button","yith-plugin-fw__confirm__button--"+t.confirmButtonType,t.classes.confirm])},c={message:!1,footer:!1,cancel:!1,confirm:!1},a=!1,r=function(){a&&a.close(),a=!1},f=function(){"function"==typeof t.onCancel&&t.onCancel(),r()},p=function(){"function"==typeof t.onConfirm&&t.onConfirm(),t.closeAfterConfirm&&r()},m=function(){c.cancel.on("click",f),c.confirm.on("click",p)};(function(){c.message=n('<div class="'+s.message+'">'),c.footer=n('<div class="'+s.footer+'">'),c.cancel=n('<span class="'+s.cancel+'">'+t.cancelButton+"</span>"),c.confirm=n('<span class="'+s.confirm+'">'+t.confirmButton+"</span>"),t.message&&c.message.html(t.message),c.footer.append(c.cancel),c.footer.append(c.confirm),a=e.ui.modal({classes:{wrap:s.wrap,title:s.title,content:s.content},title:t.title,content:[c.message,c.footer],width:t.width,allowWpMenu:t.allowWpMenu,allowWpMenuInMobile:t.allowWpMenuInMobile,showClose:t.showClose,onClose:t.onClose,closeWhenClickingOnOverlay:t.closeWhenClickingOnOverlay})})(),m(),i.elements=n.extend({},c),i.modal=n.extend({},a),i.close=r,i.cancel=f},e.ui.modal=function(e){var l={allowWpMenu:!0,allowWpMenuInMobile:!1,title:!1,content:!1,footer:!1,showClose:!0,closeSelector:!1,classes:{wrap:"",main:"",close:"",title:"",content:"",footer:""},width:500,allowClosingWithEsc:!0,closeWhenClickingOnOverlay:!1,scrollContent:!0,onClose:!1},i={};e=void 0!==e?e:{},(e=n.extend({},l,e)).classes=n.extend({},l.classes,e.classes);var s=n("#wpwrap"),c={wrap:["yith-plugin-ui","yith-plugin-fw__modal__wrap",e.classes.wrap],main:["yith-plugin-fw__modal__main",e.classes.main],close:["yith-plugin-fw__modal__close","yith-icon","yith-icon-close",e.classes.close],title:["yith-plugin-fw__modal__title",e.classes.title],content:["yith-plugin-fw__modal__content",e.classes.content],footer:["yith-plugin-fw__modal__footer",e.classes.footer]},a={wrap:!1,main:!1,close:!1,title:!1,content:!1,footer:!1},r=function(){n(".yith-plugin-fw__modal__wrap").remove(),s.removeClass("yith-plugin-fw__modal--opened"),s.removeClass("yith-plugin-fw__modal--allow-wp-menu"),s.removeClass("yith-plugin-fw__modal--allow-wp-menu-in-mobile"),"function"==typeof e.onClose&&e.onClose()},f=function(){a.wrap=n('<div class="'+o(c.wrap)+'">'),a.main=n('<div class="'+o(c.main)+'">'),a.close=n('<span class="'+o(c.close)+'">'),a.title=n('<div class="'+o(c.title)+'">'),a.content=n('<div class="'+o(c.content)+'">'),a.footer=n('<div class="'+o(c.footer)+'">'),a.main.css({width:e.width}),e.title&&("string"==typeof e.title?a.title.html(e.title):a.title.append(e.title)),e.content&&("string"==typeof e.content?a.content.html(e.content):a.content.append(e.content)),e.showClose&&a.main.append(a.close),a.main.append(a.title),a.main.append(a.content),e.footer&&("string"==typeof e.footer?a.footer.html(e.footer):a.footer.append(e.footer),a.main.append(a.footer)),a.wrap.append(a.main),e.scrollContent&&a.wrap.addClass("yith-plugin-fw__modal__wrap--scroll-content"),s.append(a.wrap),s.addClass("yith-plugin-fw__modal--opened"),e.allowWpMenu&&s.addClass("yith-plugin-fw__modal--allow-wp-menu"),e.allowWpMenuInMobile&&s.addClass("yith-plugin-fw__modal--allow-wp-menu-in-mobile")},p=function(){a.close.on("click",r),e.closeSelector&&s.on("click",e.closeSelector,r),e.closeWhenClickingOnOverlay&&(a.wrap.on("click",r),a.main.on("click",t)),n(document).on("keydown",m)},m=function(n){e.allowClosingWithEsc&&27===n.keyCode&&r()};return r(),f(),p(),i.elements=n.extend({},a),i.close=r,i}}(window.jQuery,window.yith);
1
+ window.yith=window.yith||{},function(n,e){e.ui=e.ui||{};var o=function(n){if("string"==typeof n)return n;var e=[];for(var t of n)t&&e.indexOf(t)<0&&e.push(o(t));return e.join(" ")},t=function(n){n.stopPropagation()};e.ui.confirm=function(t){var l={title:!1,message:!1,onCreate:!1,onConfirm:!1,onCancel:!1,onClose:!1,classes:{wrap:"",content:"",title:"",message:"",footer:"",cancel:"",confirm:""},confirmButtonType:"confirm",cancelButton:yith_plugin_fw_ui.i18n.cancel,confirmButton:yith_plugin_fw_ui.i18n.confirm,width:350,closeAfterConfirm:!0,allowWpMenu:!1,allowWpMenuInMobile:!1,showClose:!0,closeWhenClickingOnOverlay:!1},i={};t=void 0!==t?t:{},(t=n.extend({},l,t)).classes=n.extend({},l.classes,t.classes);var s={wrap:o(["yith-plugin-fw__confirm__wrap",t.classes.wrap]),content:o(["yith-plugin-fw__confirm__content",t.classes.content]),title:o(["yith-plugin-fw__confirm__title",t.classes.title]),message:o(["yith-plugin-fw__confirm__message",t.classes.message]),footer:o(["yith-plugin-fw__confirm__footer",t.classes.footer]),cancel:o(["yith-plugin-fw__confirm__button","yith-plugin-fw__confirm__button--cancel",t.classes.cancel]),confirm:o(["yith-plugin-fw__confirm__button","yith-plugin-fw__confirm__button--"+t.confirmButtonType,t.classes.confirm])},c={message:!1,footer:!1,cancel:!1,confirm:!1},a=!1,r=function(){a&&a.close(),a=!1},f=function(){"function"==typeof t.onCancel&&t.onCancel(),r()},p=function(){"function"==typeof t.onConfirm&&t.onConfirm(),t.closeAfterConfirm&&r()},m=function(){c.cancel.on("click",f),c.confirm.on("click",p)};(function(){c.message=n('<div class="'+s.message+'">'),c.footer=n('<div class="'+s.footer+'">'),c.cancel=n('<span class="'+s.cancel+'">'+t.cancelButton+"</span>"),c.confirm=n('<span class="'+s.confirm+'">'+t.confirmButton+"</span>"),t.message&&c.message.html(t.message),c.footer.append(c.cancel),c.footer.append(c.confirm),a=e.ui.modal({classes:{wrap:s.wrap,title:s.title,content:s.content},title:t.title,content:[c.message,c.footer],width:t.width,allowWpMenu:t.allowWpMenu,allowWpMenuInMobile:t.allowWpMenuInMobile,showClose:t.showClose,onCreate:t.onCreate,onClose:t.onClose,closeWhenClickingOnOverlay:t.closeWhenClickingOnOverlay})})(),m(),i.elements=n.extend({},c),i.modal=n.extend({},a),i.close=r,i.cancel=f},e.ui.modal=function(e){var l={allowWpMenu:!0,allowWpMenuInMobile:!1,title:!1,content:!1,footer:!1,showClose:!0,closeSelector:!1,classes:{wrap:"",main:"",close:"",title:"",content:"",footer:""},width:500,allowClosingWithEsc:!0,closeWhenClickingOnOverlay:!1,scrollContent:!0,onCreate:!1,onClose:!1},i={};e=void 0!==e?e:{},(e=n.extend({},l,e)).classes=n.extend({},l.classes,e.classes);var s=n("#wpwrap"),c={wrap:["yith-plugin-ui","yith-plugin-fw__modal__wrap",e.classes.wrap],main:["yith-plugin-fw__modal__main",e.classes.main],close:["yith-plugin-fw__modal__close","yith-icon","yith-icon-close",e.classes.close],title:["yith-plugin-fw__modal__title",e.classes.title],content:["yith-plugin-fw__modal__content",e.classes.content],footer:["yith-plugin-fw__modal__footer",e.classes.footer]},a={wrap:!1,main:!1,close:!1,title:!1,content:!1,footer:!1},r=function(){n(".yith-plugin-fw__modal__wrap").remove(),s.removeClass("yith-plugin-fw__modal--opened"),s.removeClass("yith-plugin-fw__modal--allow-wp-menu"),s.removeClass("yith-plugin-fw__modal--allow-wp-menu-in-mobile"),"function"==typeof e.onClose&&e.onClose()},f=function(){a.wrap=n('<div class="'+o(c.wrap)+'">'),a.main=n('<div class="'+o(c.main)+'">'),a.close=n('<span class="'+o(c.close)+'">'),a.title=n('<div class="'+o(c.title)+'">'),a.content=n('<div class="'+o(c.content)+'">'),a.footer=n('<div class="'+o(c.footer)+'">'),a.main.css({width:e.width}),e.title&&("string"==typeof e.title?a.title.html(e.title):a.title.append(e.title)),e.content&&("string"==typeof e.content?a.content.html(e.content):a.content.append(e.content)),e.showClose&&a.main.append(a.close),a.main.append(a.title),a.main.append(a.content),e.footer&&("string"==typeof e.footer?a.footer.html(e.footer):a.footer.append(e.footer),a.main.append(a.footer)),a.wrap.append(a.main),e.scrollContent&&a.wrap.addClass("yith-plugin-fw__modal__wrap--scroll-content"),s.append(a.wrap),s.addClass("yith-plugin-fw__modal--opened"),e.allowWpMenu&&s.addClass("yith-plugin-fw__modal--allow-wp-menu"),e.allowWpMenuInMobile&&s.addClass("yith-plugin-fw__modal--allow-wp-menu-in-mobile"),"function"==typeof e.onCreate&&e.onCreate()},p=function(){a.close.on("click",r),e.closeSelector&&s.on("click",e.closeSelector,r),e.closeWhenClickingOnOverlay&&(a.wrap.on("click",r),a.main.on("click",t)),n(document).on("keydown",m)},m=function(n){e.allowClosingWithEsc&&27===n.keyCode&&r()};return r(),f(),p(),i.elements=n.extend({},a),i.close=r,i}}(window.jQuery,window.yith);
plugin-fw/dist/gutenberg/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-url'), 'version' => '2844b0e480878ce2f72473c4114265fe');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-url'), 'version' => '507c6fa0976e1a7dac032f234f666cbf');
plugin-fw/dist/gutenberg/index.js CHANGED
@@ -1 +1 @@
1
- (window.webpackJsonp_yith_plugin_framewowrk=window.webpackJsonp_yith_plugin_framewowrk||[]).push([[1],{27:function(e,t,o){},28:function(e,t,o){}}]),function(e){function t(t){for(var r,c,l=t[0],s=t[1],i=t[2],p=0,f=[];p<l.length;p++)c=l[p],Object.prototype.hasOwnProperty.call(n,c)&&n[c]&&f.push(n[c][0]),n[c]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(u&&u(t);f.length;)f.shift()();return a.push.apply(a,i||[]),o()}function o(){for(var e,t=0;t<a.length;t++){for(var o=a[t],r=!0,l=1;l<o.length;l++){var s=o[l];0!==n[s]&&(r=!1)}r&&(a.splice(t--,1),e=c(c.s=o[0]))}return e}var r={},n={0:0},a=[];function c(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,c),o.l=!0,o.exports}c.m=e,c.c=r,c.d=function(e,t,o){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(c.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)c.d(o,r,function(t){return e[t]}.bind(null,r));return o},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="";var l=window.webpackJsonp_yith_plugin_framewowrk=window.webpackJsonp_yith_plugin_framewowrk||[],s=l.push.bind(l);l.push=t,l=l.slice();for(var i=0;i<l.length;i++)t(l[i]);var u=s;a.push([29,1]),o()}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.React},function(e,t,o){var r=o(17),n=o(18),a=o(19),c=o(21);e.exports=function(e,t){return r(e)||n(e,t)||a(e,t)||c()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.hooks},function(e,t){e.exports=window.lodash},function(e,t,o){var r,n,a,c,l;r=o(22),n=o(10).utf8,a=o(23),c=o(10).bin,(l=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?c.stringToBytes(e):n.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var o=r.bytesToWords(e),s=8*e.length,i=1732584193,u=-271733879,p=-1732584194,f=271733878,d=0;d<o.length;d++)o[d]=16711935&(o[d]<<8|o[d]>>>24)|4278255360&(o[d]<<24|o[d]>>>8);o[s>>>5]|=128<<s%32,o[14+(s+64>>>9<<4)]=s;var h=l._ff,b=l._gg,y=l._hh,g=l._ii;for(d=0;d<o.length;d+=16){var m=i,_=u,v=p,x=f;i=h(i,u,p,f,o[d+0],7,-680876936),f=h(f,i,u,p,o[d+1],12,-389564586),p=h(p,f,i,u,o[d+2],17,606105819),u=h(u,p,f,i,o[d+3],22,-1044525330),i=h(i,u,p,f,o[d+4],7,-176418897),f=h(f,i,u,p,o[d+5],12,1200080426),p=h(p,f,i,u,o[d+6],17,-1473231341),u=h(u,p,f,i,o[d+7],22,-45705983),i=h(i,u,p,f,o[d+8],7,1770035416),f=h(f,i,u,p,o[d+9],12,-1958414417),p=h(p,f,i,u,o[d+10],17,-42063),u=h(u,p,f,i,o[d+11],22,-1990404162),i=h(i,u,p,f,o[d+12],7,1804603682),f=h(f,i,u,p,o[d+13],12,-40341101),p=h(p,f,i,u,o[d+14],17,-1502002290),i=b(i,u=h(u,p,f,i,o[d+15],22,1236535329),p,f,o[d+1],5,-165796510),f=b(f,i,u,p,o[d+6],9,-1069501632),p=b(p,f,i,u,o[d+11],14,643717713),u=b(u,p,f,i,o[d+0],20,-373897302),i=b(i,u,p,f,o[d+5],5,-701558691),f=b(f,i,u,p,o[d+10],9,38016083),p=b(p,f,i,u,o[d+15],14,-660478335),u=b(u,p,f,i,o[d+4],20,-405537848),i=b(i,u,p,f,o[d+9],5,568446438),f=b(f,i,u,p,o[d+14],9,-1019803690),p=b(p,f,i,u,o[d+3],14,-187363961),u=b(u,p,f,i,o[d+8],20,1163531501),i=b(i,u,p,f,o[d+13],5,-1444681467),f=b(f,i,u,p,o[d+2],9,-51403784),p=b(p,f,i,u,o[d+7],14,1735328473),i=y(i,u=b(u,p,f,i,o[d+12],20,-1926607734),p,f,o[d+5],4,-378558),f=y(f,i,u,p,o[d+8],11,-2022574463),p=y(p,f,i,u,o[d+11],16,1839030562),u=y(u,p,f,i,o[d+14],23,-35309556),i=y(i,u,p,f,o[d+1],4,-1530992060),f=y(f,i,u,p,o[d+4],11,1272893353),p=y(p,f,i,u,o[d+7],16,-155497632),u=y(u,p,f,i,o[d+10],23,-1094730640),i=y(i,u,p,f,o[d+13],4,681279174),f=y(f,i,u,p,o[d+0],11,-358537222),p=y(p,f,i,u,o[d+3],16,-722521979),u=y(u,p,f,i,o[d+6],23,76029189),i=y(i,u,p,f,o[d+9],4,-640364487),f=y(f,i,u,p,o[d+12],11,-421815835),p=y(p,f,i,u,o[d+15],16,530742520),i=g(i,u=y(u,p,f,i,o[d+2],23,-995338651),p,f,o[d+0],6,-198630844),f=g(f,i,u,p,o[d+7],10,1126891415),p=g(p,f,i,u,o[d+14],15,-1416354905),u=g(u,p,f,i,o[d+5],21,-57434055),i=g(i,u,p,f,o[d+12],6,1700485571),f=g(f,i,u,p,o[d+3],10,-1894986606),p=g(p,f,i,u,o[d+10],15,-1051523),u=g(u,p,f,i,o[d+1],21,-2054922799),i=g(i,u,p,f,o[d+8],6,1873313359),f=g(f,i,u,p,o[d+15],10,-30611744),p=g(p,f,i,u,o[d+6],15,-1560198380),u=g(u,p,f,i,o[d+13],21,1309151649),i=g(i,u,p,f,o[d+4],6,-145523070),f=g(f,i,u,p,o[d+11],10,-1120210379),p=g(p,f,i,u,o[d+2],15,718787259),u=g(u,p,f,i,o[d+9],21,-343485551),i=i+m>>>0,u=u+_>>>0,p=p+v>>>0,f=f+x>>>0}return r.endian([i,u,p,f])})._ff=function(e,t,o,r,n,a,c){var l=e+(t&o|~t&r)+(n>>>0)+c;return(l<<a|l>>>32-a)+t},l._gg=function(e,t,o,r,n,a,c){var l=e+(t&r|o&~r)+(n>>>0)+c;return(l<<a|l>>>32-a)+t},l._hh=function(e,t,o,r,n,a,c){var l=e+(t^o^r)+(n>>>0)+c;return(l<<a|l>>>32-a)+t},l._ii=function(e,t,o,r,n,a,c){var l=e+(o^(t|~r))+(n>>>0)+c;return(l<<a|l>>>32-a)+t},l._blocksize=16,l._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var o=r.wordsToBytes(l(e,t));return t&&t.asBytes?o:t&&t.asString?c.bytesToString(o):r.bytesToHex(o)}},function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.compose},function(e,t){function o(t){return e.exports=o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,o(t)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var o={utf8:{stringToBytes:function(e){return o.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(o.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],o=0;o<e.length;o++)t.push(255&e.charCodeAt(o));return t},bytesToString:function(e){for(var t=[],o=0;o<e.length;o++)t.push(String.fromCharCode(e[o]));return t.join("")}}};e.exports=o},function(e,t){e.exports=window.wp.blocks},function(e,t){e.exports=window.wp.url},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function o(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,o){var r=o(24);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,o){var r=o(25).default,n=o(26);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?n(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var o=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=o){var r,n,a=[],c=!0,l=!1;try{for(o=o.call(e);!(c=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);c=!0);}catch(e){l=!0,n=e}finally{try{c||null==o.return||o.return()}finally{if(l)throw n}}return a}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,o){var r=o(20);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var o,r;o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],o=0,r=0;o<e.length;o++,r+=8)t[r>>>5]|=e[o]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],o=0;o<32*e.length;o+=8)t.push(e[o>>>5]>>>24-o%32&255);return t},bytesToHex:function(e){for(var t=[],o=0;o<e.length;o++)t.push((e[o]>>>4).toString(16)),t.push((15&e[o]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],o=0;o<e.length;o+=2)t.push(parseInt(e.substr(o,2),16));return t},bytesToBase64:function(e){for(var t=[],r=0;r<e.length;r+=3)for(var n=e[r]<<16|e[r+1]<<8|e[r+2],a=0;a<4;a++)8*r+6*a<=8*e.length?t.push(o.charAt(n>>>6*(3-a)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,n=0;r<e.length;n=++r%4)0!=n&&t.push((o.indexOf(e.charAt(r-1))&Math.pow(2,-2*n+8)-1)<<2*n|o.indexOf(e.charAt(r))>>>6-2*n);return t}},e.exports=r},function(e,t){function o(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(o(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&o(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t){function o(t,r){return e.exports=o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,o(t,r)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function o(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=o=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),o(t)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},,,function(e,t,o){"use strict";o.r(t);var r=o(3),n=o.n(r),a=o(0),c=o(2),l=o(6),s=o.n(l),i=o(11),u=o(12);function p(e){if(e.status>=200&&e.status<300)return e;throw e}function f(e){return e.json?e.json():e.text()}var d=Object(a.createElement)("svg",{viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",role:"img","aria-hidden":"true",focusable:"false"},Object(a.createElement)("path",{width:"22",height:"22",d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"})),h=o(5),b=o.n(h),y=function(e,t,o){var r=!0;if(t&&t.id&&"value"in t){var n=t.value;["toggle","checkbox"].includes(o)&&(n=!0===n||"yes"===n||1===n),n=b.a.isArray(n)?n:[n],r=void 0!==e[t.id]&&n.includes(e[t.id])}return r},g=function(e,t){var o=e.controlType,r=!0;if(e.deps)if(b.a.isArray(e.deps))for(var n in e.deps){var a=e.deps[n];if(!(r=y(t,a,o)))break}else r=y(t,e.deps,o);return r},m=function(e,t){var o="",r=!1;if(void 0!==e.callback&&(jQuery&&e.callback in jQuery.fn?r=jQuery.fn[e.callback]:e.callback in window&&(r=window[e.callback])),"function"==typeof r)o=r(t,e);else{var a=e.attributes?Object.entries(e.attributes).map((function(e){var o=n()(e,2),r=o[0],a=o[1],c=g(a,t),l=t[r];if(c&&void 0!==l)return r+"="+(a.remove_quotes?l:'"'.concat(l,'"'))})):[],c=a.length?" "+a.join(" "):"";o="[".concat(e.shortcode_name).concat(c,"]")}return o},_=o(1),v=o(7),x=o(13),j=o.n(x),w=o(14),k=o.n(w),O=o(15),C=o.n(O),E=o(16),S=o.n(E),T=o(9),A=o.n(T),M=o(4);o(27);var B=function(e){C()(n,e);var t,o,r=(t=n,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=A()(t);if(o){var n=A()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return S()(this,e)});function n(){var e;return j()(this,n),(e=r.apply(this,arguments)).state={html:"",shortcode:"",shortcodeHash:"",ajaxUpdated:!1,ajaxSuccess:!1,ajaxResponse:!1,loading:!1,firstLoading:!0},e.ajaxTimeout=!1,e}return k()(n,[{key:"componentDidMount",value:function(){this.updateShortcode()}},{key:"componentDidUpdate",value:function(e,t,o){var r=this.state,n=r.shortcode,a=r.shortcodeHash,c=r.ajaxSuccess,l=r.ajaxResponse,s=r.ajaxUpdated;Object(h.isEqual)(e,this.props)||this.updateShortcode(),this.props.blockArgs.do_shortcode&&s&&(c&&Object(M.doAction)("yith_plugin_fw_gutenberg_success_do_shortcode",n,a,l),Object(M.doAction)("yith_plugin_fw_gutenberg_after_do_shortcode",n,a,l),this.setState({ajaxUpdated:!1}))}},{key:"updateShortcode",value:function(){var e=this,t=this.props,o=t.attributes,r=t.blockArgs;this.setState({loading:!0,ajaxSuccess:!1,ajaxResponse:!1});var n=m(r,o),a=s()(n);r.do_shortcode?(this.ajaxTimeout&&clearTimeout(this.ajaxTimeout),Object(M.doAction)("yith_plugin_fw_gutenberg_before_do_shortcode",n,a),this.ajaxTimeout=setTimeout((function(){(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yithGutenberg.ajaxurl;return t=Object(u.addQueryArgs)(t,e),fetch(t).then(p).then(f)})({action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:n}).then((function(t){e.setState({loading:!1,firstLoading:!1,html:t.html,shortcode:n,shortcodeHash:a,ajaxSuccess:!0,ajaxUpdated:!0,ajaxResponse:t})})).catch((function(e){console.log({error:e})}))}),300)):this.setState({loading:!1,firstLoading:!1,html:n,shortcode:n,shortcodeHash:a})}},{key:"render",value:function(){var e=this.state,t=e.html,o=e.loading,r=e.firstLoading,n=e.shortcode,c=e.shortcodeHash,l=this.props.blockArgs,s=l.do_shortcode,i=l.title,u=l.empty_message,p="block-editor-yith-plugin-fw-shortcode-block",f=[p],h=s?"html":"shortcode",b=t,y="";r&&o?h="first-loading":s&&!t&&(h="empty-html",b=n,!o&&u&&(y=u));var g=["first-loading","empty-html","shortcode"].includes(h),m=!["first-loading","empty-html"].includes(h),v=!!y;return f.push("".concat(p,"--").concat(h)),f.push("".concat(p,v?"--has-message":"--no-message")),f.push("yith_block_".concat(c)),Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:f.join(" ")},o?Object(a.createElement)("div",{className:"".concat(p,"__spinner-wrap")},Object(a.createElement)(_.Spinner,null)):"",g&&Object(a.createElement)("div",{className:"".concat(p,"__title components-placeholder__label")},d,i),v&&Object(a.createElement)(a.RawHTML,{className:"".concat(p,"__message")},y),m&&Object(a.createElement)(a.RawHTML,{className:"".concat(p,"__content")},b)))}}]),n}(c.Component),N=o(8);function R(e){var t=e.className,o=e.label,r=e.onChange,n=e.value,c=e.help,l=e.disableAlpha,s=Object(N.useInstanceId)(R),i="inspector-yith-color-picker-control-".concat(s);return Object(a.createElement)(_.BaseControl,{id:i,label:o,className:"block-editor-yith-color-control ".concat(t),help:c},Object(a.createElement)(_.ColorPicker,{color:n,disableAlpha:l,onChangeComplete:r}))}function P(e){var t=e.label,o=e.colorValue;return Object(a.createElement)(a.Fragment,null,t,!!o&&Object(a.createElement)(_.ColorIndicator,{colorValue:o}))}function I(e){var t=e.className,o=e.label,r=e.onChange,n=e.value,c=e.help,l=e.palette,s=e.clearable;l=l||Object(v.__experimentalUseEditorFeature)("color.palette");var i=Object(N.useInstanceId)(I),u="inspector-yith-color-palette-control-".concat(i);return Object(a.createElement)(_.BaseControl,{id:u,className:"block-editor-yith-color-palette-control ".concat(t),help:c},Object(a.createElement)("fieldset",null,Object(a.createElement)("legend",null,Object(a.createElement)("div",{className:"block-editor-yith-color-palette-control__color-indicator"},Object(a.createElement)(_.BaseControl.VisualLabel,null,Object(a.createElement)(P,{colorValue:n,label:o})))),Object(a.createElement)(_.ColorPalette,{value:n,onChange:r,colors:l,clearable:s})))}o(28);for(var H=function(e,t){return function(o){var r=o.attributes,c=(o.className,o.setAttributes),l=function(e,t,o){["colorpicker","color"].includes(o)&&(e=e.color.getAlpha()<1?e.color.toRgbString():e.color.toHexString());var r={};r[t]=e,c(r)};return Object(a.createElement)(a.Fragment,null,!!t.attributes&&Object(a.createElement)(v.InspectorControls,null,Object(a.createElement)(_.PanelBody,null,Object.entries(t.attributes).map((function(t){var o=n()(t,2),c=function(t,o){var n=o.controlType,c=r[t],s=function(e,t){var o="";return e.helps&&e.helps.checked&&e.helps.unchecked?o=t?e.helps.checked:e.helps.unchecked:e.help&&(o=e.help),o}(o,c),i="".concat(e,"__").concat(t,"-field-wrapper"),u=g(o,r);o.wrapper_class&&(i+=" "+o.wrapper_class);var p=!1;if(u)switch(n){case"select":p=Object(a.createElement)(_.SelectControl,{className:i,key:t,value:c,label:o.label,options:o.options,selected:c,help:s,multiple:!!o.multiple,onChange:function(e){l(e,t,n)}});break;case"text":p=Object(a.createElement)(_.TextControl,{className:i,key:t,value:c,label:o.label,help:s,onChange:function(e){l(e,t,n)}});break;case"textarea":p=Object(a.createElement)(_.TextareaControl,{className:i,key:t,value:c,label:o.label,help:s,onChange:function(e){l(e,t,n)}});break;case"toggle":p=Object(a.createElement)(_.ToggleControl,{className:i,key:t,value:c,label:o.label,help:s,checked:c,onChange:function(e){l(e,t,n)}});break;case"checkbox":p=Object(a.createElement)(_.CheckboxControl,{className:i,key:t,value:c,label:o.label,help:s,checked:c,onChange:function(e){l(e,t,n)}});break;case"number":case"range":p=Object(a.createElement)(_.RangeControl,{className:i,key:t,value:c,label:o.label,help:s,min:o.min,max:o.max,onChange:function(e){l(e,t,n)}});break;case"color":case"colorpicker":p=Object(a.createElement)(R,{className:i,key:t,label:o.label,help:s,value:c,disableAlpha:o.disableAlpha,onChange:function(e){l(e,t,n)}});break;case"color-palette":p=Object(a.createElement)(I,{className:i,key:t,label:o.label,help:s,value:c,clearable:o.clearable||!1,onChange:function(e){l(e,t,n)}});break;case"radio":p=Object(a.createElement)(_.RadioControl,{key:t,value:c,label:o.label,options:o.options,selected:c,checked:c,help:s,onChange:function(e){l(e,t,n)}});break;default:p=!1}return p}(o[0],o[1]);if(c)return c})))),Object(a.createElement)(B,{attributes:r,blockArgs:t}))}},L=function(){var e=Q[U];Object(M.addAction)(e.key,"yith-plugin-fw/jquery-events",(function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];"jQuery"in window&&(e.delay?setTimeout((function(){jQuery(document).trigger(e.key,Object.values(o))}),e.delay):jQuery(document).trigger(e.key,Object.values(o)))}))},U=0,Q=[{key:"yith_plugin_fw_gutenberg_before_do_shortcode",delay:0},{key:"yith_plugin_fw_gutenberg_success_do_shortcode",delay:200},{key:"yith_plugin_fw_gutenberg_after_do_shortcode",delay:200}];U<Q.length;U++)L();for(var F=function(){var e=n()(V[J],2),t=e[0],o=e[1];Object(i.registerBlockType)("yith/"+t,{title:o.title,description:o.description,category:o.category,attributes:o.attributes,icon:void 0!==o.icon?o.icon:d,keywords:o.keywords,edit:H(t,o),save:function(e){var t=e.attributes;return m(o,t)},deprecated:[{attributes:o.attributes,save:function(e){var t=e.attributes,r=m(o,t),n='<span class="yith_block_'+s()(r)+'">'+r+"</span>";return Object(a.createElement)(a.RawHTML,null,n)}}]})},J=0,V=Object.entries(yithGutenbergBlocks);J<V.length;J++)F()}]);
1
+ (window.webpackJsonp_yith_plugin_framewowrk=window.webpackJsonp_yith_plugin_framewowrk||[]).push([[1],{27:function(e,t,o){},28:function(e,t,o){}}]),function(e){function t(t){for(var r,c,l=t[0],s=t[1],i=t[2],p=0,f=[];p<l.length;p++)c=l[p],Object.prototype.hasOwnProperty.call(n,c)&&n[c]&&f.push(n[c][0]),n[c]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(u&&u(t);f.length;)f.shift()();return a.push.apply(a,i||[]),o()}function o(){for(var e,t=0;t<a.length;t++){for(var o=a[t],r=!0,l=1;l<o.length;l++){var s=o[l];0!==n[s]&&(r=!1)}r&&(a.splice(t--,1),e=c(c.s=o[0]))}return e}var r={},n={0:0},a=[];function c(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,c),o.l=!0,o.exports}c.m=e,c.c=r,c.d=function(e,t,o){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(c.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)c.d(o,r,function(t){return e[t]}.bind(null,r));return o},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="";var l=window.webpackJsonp_yith_plugin_framewowrk=window.webpackJsonp_yith_plugin_framewowrk||[],s=l.push.bind(l);l.push=t,l=l.slice();for(var i=0;i<l.length;i++)t(l[i]);var u=s;a.push([29,1]),o()}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.React},function(e,t,o){var r=o(17),n=o(18),a=o(19),c=o(21);e.exports=function(e,t){return r(e)||n(e,t)||a(e,t)||c()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.hooks},function(e,t){e.exports=window.lodash},function(e,t,o){var r,n,a,c,l;r=o(22),n=o(10).utf8,a=o(23),c=o(10).bin,(l=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?c.stringToBytes(e):n.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var o=r.bytesToWords(e),s=8*e.length,i=1732584193,u=-271733879,p=-1732584194,f=271733878,d=0;d<o.length;d++)o[d]=16711935&(o[d]<<8|o[d]>>>24)|4278255360&(o[d]<<24|o[d]>>>8);o[s>>>5]|=128<<s%32,o[14+(s+64>>>9<<4)]=s;var h=l._ff,b=l._gg,y=l._hh,g=l._ii;for(d=0;d<o.length;d+=16){var m=i,_=u,v=p,x=f;i=h(i,u,p,f,o[d+0],7,-680876936),f=h(f,i,u,p,o[d+1],12,-389564586),p=h(p,f,i,u,o[d+2],17,606105819),u=h(u,p,f,i,o[d+3],22,-1044525330),i=h(i,u,p,f,o[d+4],7,-176418897),f=h(f,i,u,p,o[d+5],12,1200080426),p=h(p,f,i,u,o[d+6],17,-1473231341),u=h(u,p,f,i,o[d+7],22,-45705983),i=h(i,u,p,f,o[d+8],7,1770035416),f=h(f,i,u,p,o[d+9],12,-1958414417),p=h(p,f,i,u,o[d+10],17,-42063),u=h(u,p,f,i,o[d+11],22,-1990404162),i=h(i,u,p,f,o[d+12],7,1804603682),f=h(f,i,u,p,o[d+13],12,-40341101),p=h(p,f,i,u,o[d+14],17,-1502002290),i=b(i,u=h(u,p,f,i,o[d+15],22,1236535329),p,f,o[d+1],5,-165796510),f=b(f,i,u,p,o[d+6],9,-1069501632),p=b(p,f,i,u,o[d+11],14,643717713),u=b(u,p,f,i,o[d+0],20,-373897302),i=b(i,u,p,f,o[d+5],5,-701558691),f=b(f,i,u,p,o[d+10],9,38016083),p=b(p,f,i,u,o[d+15],14,-660478335),u=b(u,p,f,i,o[d+4],20,-405537848),i=b(i,u,p,f,o[d+9],5,568446438),f=b(f,i,u,p,o[d+14],9,-1019803690),p=b(p,f,i,u,o[d+3],14,-187363961),u=b(u,p,f,i,o[d+8],20,1163531501),i=b(i,u,p,f,o[d+13],5,-1444681467),f=b(f,i,u,p,o[d+2],9,-51403784),p=b(p,f,i,u,o[d+7],14,1735328473),i=y(i,u=b(u,p,f,i,o[d+12],20,-1926607734),p,f,o[d+5],4,-378558),f=y(f,i,u,p,o[d+8],11,-2022574463),p=y(p,f,i,u,o[d+11],16,1839030562),u=y(u,p,f,i,o[d+14],23,-35309556),i=y(i,u,p,f,o[d+1],4,-1530992060),f=y(f,i,u,p,o[d+4],11,1272893353),p=y(p,f,i,u,o[d+7],16,-155497632),u=y(u,p,f,i,o[d+10],23,-1094730640),i=y(i,u,p,f,o[d+13],4,681279174),f=y(f,i,u,p,o[d+0],11,-358537222),p=y(p,f,i,u,o[d+3],16,-722521979),u=y(u,p,f,i,o[d+6],23,76029189),i=y(i,u,p,f,o[d+9],4,-640364487),f=y(f,i,u,p,o[d+12],11,-421815835),p=y(p,f,i,u,o[d+15],16,530742520),i=g(i,u=y(u,p,f,i,o[d+2],23,-995338651),p,f,o[d+0],6,-198630844),f=g(f,i,u,p,o[d+7],10,1126891415),p=g(p,f,i,u,o[d+14],15,-1416354905),u=g(u,p,f,i,o[d+5],21,-57434055),i=g(i,u,p,f,o[d+12],6,1700485571),f=g(f,i,u,p,o[d+3],10,-1894986606),p=g(p,f,i,u,o[d+10],15,-1051523),u=g(u,p,f,i,o[d+1],21,-2054922799),i=g(i,u,p,f,o[d+8],6,1873313359),f=g(f,i,u,p,o[d+15],10,-30611744),p=g(p,f,i,u,o[d+6],15,-1560198380),u=g(u,p,f,i,o[d+13],21,1309151649),i=g(i,u,p,f,o[d+4],6,-145523070),f=g(f,i,u,p,o[d+11],10,-1120210379),p=g(p,f,i,u,o[d+2],15,718787259),u=g(u,p,f,i,o[d+9],21,-343485551),i=i+m>>>0,u=u+_>>>0,p=p+v>>>0,f=f+x>>>0}return r.endian([i,u,p,f])})._ff=function(e,t,o,r,n,a,c){var l=e+(t&o|~t&r)+(n>>>0)+c;return(l<<a|l>>>32-a)+t},l._gg=function(e,t,o,r,n,a,c){var l=e+(t&r|o&~r)+(n>>>0)+c;return(l<<a|l>>>32-a)+t},l._hh=function(e,t,o,r,n,a,c){var l=e+(t^o^r)+(n>>>0)+c;return(l<<a|l>>>32-a)+t},l._ii=function(e,t,o,r,n,a,c){var l=e+(o^(t|~r))+(n>>>0)+c;return(l<<a|l>>>32-a)+t},l._blocksize=16,l._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var o=r.wordsToBytes(l(e,t));return t&&t.asBytes?o:t&&t.asString?c.bytesToString(o):r.bytesToHex(o)}},function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.compose},function(e,t){function o(t){return e.exports=o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,o(t)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var o={utf8:{stringToBytes:function(e){return o.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(o.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],o=0;o<e.length;o++)t.push(255&e.charCodeAt(o));return t},bytesToString:function(e){for(var t=[],o=0;o<e.length;o++)t.push(String.fromCharCode(e[o]));return t.join("")}}};e.exports=o},function(e,t){e.exports=window.wp.blocks},function(e,t){e.exports=window.wp.url},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function o(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,o){var r=o(24);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,o){var r=o(25).default,n=o(26);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?n(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var r,n,a=[],c=!0,l=!1;try{for(o=o.call(e);!(c=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);c=!0);}catch(e){l=!0,n=e}finally{try{c||null==o.return||o.return()}finally{if(l)throw n}}return a}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,o){var r=o(20);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var o,r;o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],o=0,r=0;o<e.length;o++,r+=8)t[r>>>5]|=e[o]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],o=0;o<32*e.length;o+=8)t.push(e[o>>>5]>>>24-o%32&255);return t},bytesToHex:function(e){for(var t=[],o=0;o<e.length;o++)t.push((e[o]>>>4).toString(16)),t.push((15&e[o]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],o=0;o<e.length;o+=2)t.push(parseInt(e.substr(o,2),16));return t},bytesToBase64:function(e){for(var t=[],r=0;r<e.length;r+=3)for(var n=e[r]<<16|e[r+1]<<8|e[r+2],a=0;a<4;a++)8*r+6*a<=8*e.length?t.push(o.charAt(n>>>6*(3-a)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,n=0;r<e.length;n=++r%4)0!=n&&t.push((o.indexOf(e.charAt(r-1))&Math.pow(2,-2*n+8)-1)<<2*n|o.indexOf(e.charAt(r))>>>6-2*n);return t}},e.exports=r},function(e,t){function o(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(o(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&o(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t){function o(t,r){return e.exports=o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,o(t,r)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function o(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=o=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),o(t)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},,,function(e,t,o){"use strict";o.r(t);var r=o(3),n=o.n(r),a=o(0),c=o(2),l=o(6),s=o.n(l),i=o(11),u=o(12);function p(e){if(e.status>=200&&e.status<300)return e;throw e}function f(e){return e.json?e.json():e.text()}var d=Object(a.createElement)("svg",{viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",role:"img","aria-hidden":"true",focusable:"false"},Object(a.createElement)("path",{width:"22",height:"22",d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"})),h=o(5),b=o.n(h),y=function(e,t,o){var r=!0;if(t&&t.id&&"value"in t){var n=t.value;["toggle","checkbox"].includes(o)&&(n=!0===n||"yes"===n||1===n),n=b.a.isArray(n)?n:[n],r=void 0!==e[t.id]&&n.includes(e[t.id])}return r},g=function(e,t){var o=e.controlType,r=!0;if(e.deps)if(b.a.isArray(e.deps))for(var n in e.deps){var a=e.deps[n];if(!(r=y(t,a,o)))break}else r=y(t,e.deps,o);return r},m=function(e,t){var o="",r=!1;if(void 0!==e.callback&&(jQuery&&e.callback in jQuery.fn?r=jQuery.fn[e.callback]:e.callback in window&&(r=window[e.callback])),"function"==typeof r)o=r(t,e);else{var a=e.attributes?Object.entries(e.attributes).map((function(e){var o=n()(e,2),r=o[0],a=o[1],c=g(a,t),l=t[r];if(c&&void 0!==l)return r+"="+(a.remove_quotes?l:'"'.concat(l,'"'))})):[],c=a.length?" "+a.join(" "):"";o="[".concat(e.shortcode_name).concat(c,"]")}return o},_=o(1),v=o(7),x=o(13),j=o.n(x),w=o(14),k=o.n(w),O=o(15),C=o.n(O),E=o(16),S=o.n(E),T=o(9),A=o.n(T),M=o(4);o(27);var B=function(e){C()(n,e);var t,o,r=(t=n,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=A()(t);if(o){var n=A()(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return S()(this,e)});function n(){var e;return j()(this,n),(e=r.apply(this,arguments)).state={html:"",shortcode:"",shortcodeHash:"",ajaxUpdated:!1,ajaxSuccess:!1,ajaxResponse:!1,loading:!1,firstLoading:!0},e.ajaxTimeout=!1,e}return k()(n,[{key:"componentDidMount",value:function(){this.updateShortcode()}},{key:"componentDidUpdate",value:function(e,t,o){var r=this.state,n=r.shortcode,a=r.shortcodeHash,c=r.ajaxSuccess,l=r.ajaxResponse,s=r.ajaxUpdated;Object(h.isEqual)(e,this.props)||this.updateShortcode(),this.props.blockArgs.do_shortcode&&s&&(c&&Object(M.doAction)("yith_plugin_fw_gutenberg_success_do_shortcode",n,a,l),Object(M.doAction)("yith_plugin_fw_gutenberg_after_do_shortcode",n,a,l),this.setState({ajaxUpdated:!1}))}},{key:"updateShortcode",value:function(){var e=this,t=this.props,o=t.attributes,r=t.blockArgs;this.setState({loading:!0,ajaxSuccess:!1,ajaxResponse:!1});var n=m(r,o),a=s()(n);r.do_shortcode?(this.ajaxTimeout&&clearTimeout(this.ajaxTimeout),Object(M.doAction)("yith_plugin_fw_gutenberg_before_do_shortcode",n,a),this.ajaxTimeout=setTimeout((function(){(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yithGutenberg.ajaxurl;return t=Object(u.addQueryArgs)(t,e),fetch(t).then(p).then(f)})({action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:n}).then((function(t){e.setState({loading:!1,firstLoading:!1,html:t.html,shortcode:n,shortcodeHash:a,ajaxSuccess:!0,ajaxUpdated:!0,ajaxResponse:t})})).catch((function(e){console.log({error:e})}))}),300)):this.setState({loading:!1,firstLoading:!1,html:n,shortcode:n,shortcodeHash:a})}},{key:"render",value:function(){var e=this.state,t=e.html,o=e.loading,r=e.firstLoading,n=e.shortcode,c=e.shortcodeHash,l=this.props.blockArgs,s=l.do_shortcode,i=l.title,u=l.empty_message,p="block-editor-yith-plugin-fw-shortcode-block",f=[p],h=s?"html":"shortcode",b=t,y="";r&&o?h="first-loading":s&&!t&&(h="empty-html",b=n,!o&&u&&(y=u));var g=["first-loading","empty-html","shortcode"].includes(h),m=!["first-loading","empty-html"].includes(h),v=!!y;return f.push("".concat(p,"--").concat(h)),f.push("".concat(p,v?"--has-message":"--no-message")),f.push("yith_block_".concat(c)),Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:f.join(" ")},o?Object(a.createElement)("div",{className:"".concat(p,"__spinner-wrap")},Object(a.createElement)(_.Spinner,null)):"",g&&Object(a.createElement)("div",{className:"".concat(p,"__title components-placeholder__label")},d,i),v&&Object(a.createElement)(a.RawHTML,{className:"".concat(p,"__message")},y),m&&Object(a.createElement)(a.RawHTML,{className:"".concat(p,"__content")},b)))}}]),n}(c.Component),N=o(8);function R(e){var t=e.className,o=e.label,r=e.onChange,n=e.value,c=e.help,l=e.disableAlpha,s=Object(N.useInstanceId)(R),i="inspector-yith-color-picker-control-".concat(s);return Object(a.createElement)(_.BaseControl,{id:i,label:o,className:"block-editor-yith-color-control ".concat(t),help:c},Object(a.createElement)(_.ColorPicker,{color:n,disableAlpha:l,onChangeComplete:r}))}function P(e){var t=e.label,o=e.colorValue;return Object(a.createElement)(a.Fragment,null,t,!!o&&Object(a.createElement)(_.ColorIndicator,{colorValue:o}))}function I(e){var t=e.className,o=e.label,r=e.onChange,n=e.value,c=e.help,l=e.palette,s=e.clearable;l=l||Object(v.__experimentalUseEditorFeature)("color.palette");var i=Object(N.useInstanceId)(I),u="inspector-yith-color-palette-control-".concat(i);return Object(a.createElement)(_.BaseControl,{id:u,className:"block-editor-yith-color-palette-control ".concat(t),help:c},Object(a.createElement)("fieldset",null,Object(a.createElement)("legend",null,Object(a.createElement)("div",{className:"block-editor-yith-color-palette-control__color-indicator"},Object(a.createElement)(_.BaseControl.VisualLabel,null,Object(a.createElement)(P,{colorValue:n,label:o})))),Object(a.createElement)(_.ColorPalette,{value:n,onChange:r,colors:l,clearable:s})))}o(28);for(var H=function(e,t){return function(o){var r=o.attributes,c=(o.className,o.setAttributes),l=function(e,t,o){["colorpicker","color"].includes(o)&&(e=e.color.getAlpha()<1?e.color.toRgbString():e.color.toHexString());var r={};r[t]=e,c(r)};return Object(a.createElement)(a.Fragment,null,!!t.attributes&&Object(a.createElement)(v.InspectorControls,null,Object(a.createElement)(_.PanelBody,null,Object.entries(t.attributes).map((function(t){var o=n()(t,2),c=function(t,o){var n=o.controlType,c=r[t],s=function(e,t){var o="";return e.helps&&e.helps.checked&&e.helps.unchecked?o=t?e.helps.checked:e.helps.unchecked:e.help&&(o=e.help),o}(o,c),i="".concat(e,"__").concat(t,"-field-wrapper"),u=g(o,r);o.wrapper_class&&(i+=" "+o.wrapper_class);var p=!1;if(u)switch(n){case"select":p=Object(a.createElement)(_.SelectControl,{className:i,key:t,value:c,label:o.label,options:o.options,selected:c,help:s,multiple:!!o.multiple,onChange:function(e){l(e,t,n)}});break;case"text":p=Object(a.createElement)(_.TextControl,{className:i,key:t,value:c,label:o.label,help:s,onChange:function(e){l(e,t,n)}});break;case"textarea":p=Object(a.createElement)(_.TextareaControl,{className:i,key:t,value:c,label:o.label,help:s,onChange:function(e){l(e,t,n)}});break;case"toggle":p=Object(a.createElement)(_.ToggleControl,{className:i,key:t,value:c,label:o.label,help:s,checked:c,onChange:function(e){l(e,t,n)}});break;case"checkbox":p=Object(a.createElement)(_.CheckboxControl,{className:i,key:t,value:c,label:o.label,help:s,checked:c,onChange:function(e){l(e,t,n)}});break;case"number":case"range":p=Object(a.createElement)(_.RangeControl,{className:i,key:t,value:c,label:o.label,help:s,min:o.min,max:o.max,onChange:function(e){l(e,t,n)}});break;case"color":case"colorpicker":p=Object(a.createElement)(R,{className:i,key:t,label:o.label,help:s,value:c,disableAlpha:o.disableAlpha,onChange:function(e){l(e,t,n)}});break;case"color-palette":p=Object(a.createElement)(I,{className:i,key:t,label:o.label,help:s,value:c,clearable:o.clearable||!1,onChange:function(e){l(e,t,n)}});break;case"radio":p=Object(a.createElement)(_.RadioControl,{key:t,value:c,label:o.label,options:o.options,selected:c,checked:c,help:s,onChange:function(e){l(e,t,n)}});break;default:p=!1}return p}(o[0],o[1]);if(c)return c})))),Object(a.createElement)(B,{attributes:r,blockArgs:t}))}},L=function(){var e=Q[U];Object(M.addAction)(e.key,"yith-plugin-fw/jquery-events",(function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];"jQuery"in window&&(e.delay?setTimeout((function(){jQuery(document).trigger(e.key,Object.values(o))}),e.delay):jQuery(document).trigger(e.key,Object.values(o)))}))},U=0,Q=[{key:"yith_plugin_fw_gutenberg_before_do_shortcode",delay:0},{key:"yith_plugin_fw_gutenberg_success_do_shortcode",delay:200},{key:"yith_plugin_fw_gutenberg_after_do_shortcode",delay:200}];U<Q.length;U++)L();for(var F=function(){var e=n()(V[J],2),t=e[0],o=e[1];Object(i.registerBlockType)("yith/"+t,{title:o.title,description:o.description,category:o.category,attributes:o.attributes,icon:void 0!==o.icon?o.icon:d,keywords:o.keywords,edit:H(t,o),save:function(e){var t=e.attributes;return m(o,t)},deprecated:[{attributes:o.attributes,save:function(e){var t=e.attributes,r=m(o,t),n='<span class="yith_block_'+s()(r)+'">'+r+"</span>";return Object(a.createElement)(a.RawHTML,null,n)}}]})},J=0,V=Object.entries(yithGutenbergBlocks);J<V.length;J++)F()}]);
plugin-fw/includes/builders/elementor/class-yith-elementor.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @class YITH_Elementor
6
  * @package YITH\PluginFramework\Classes
7
- * @since 3.6.0
8
  */
9
 
10
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
@@ -29,7 +29,7 @@ if ( ! class_exists( 'YITH_Elementor' ) ) {
29
  *
30
  * @var array
31
  */
32
- private $widgets;
33
 
34
  /**
35
  * Singleton implementation.
@@ -45,7 +45,11 @@ if ( ! class_exists( 'YITH_Elementor' ) ) {
45
  */
46
  private function __construct() {
47
  if ( defined( 'ELEMENTOR_VERSION' ) && version_compare( ELEMENTOR_VERSION, '3.0.0', '>=' ) ) {
48
- add_action( 'init', array( $this, 'init' ), 20 );
 
 
 
 
49
  }
50
  }
51
 
@@ -64,16 +68,10 @@ if ( ! class_exists( 'YITH_Elementor' ) ) {
64
 
65
  /**
66
  * Let's start with Elementor
 
 
67
  */
68
  public function init() {
69
- if ( $this->widgets ) {
70
- $this->load_files();
71
- add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_widgets' ) );
72
- add_action( 'elementor/elements/categories_registered', array( $this, 'add_yith_category' ) );
73
-
74
- add_action( 'elementor/editor/after_enqueue_styles', array( $this, 'enqueue_styles' ) );
75
- add_action( 'elementor/frontend/after_enqueue_styles', array( $this, 'enqueue_styles' ) );
76
- }
77
  }
78
 
79
  /**
@@ -87,17 +85,22 @@ if ( ! class_exists( 'YITH_Elementor' ) ) {
87
  * Register Elementor Widgets
88
  */
89
  public function register_widgets() {
 
 
 
 
90
  foreach ( $this->widgets as $widget ) {
91
  \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new YITH_Elementor_Widget( array(), array( 'yith_data' => $widget ) ) );
92
  }
93
  }
94
 
95
  /**
96
- * Add "YITH" group for Elementor widgets
97
  *
98
  * @param Elementor\Elements_Manager $elements_manager Elements Manager.
99
  */
100
  public function add_yith_category( $elements_manager ) {
 
101
  $elements_manager->add_category(
102
  'yith',
103
  array(
@@ -112,9 +115,11 @@ if ( ! class_exists( 'YITH_Elementor' ) ) {
112
  * Enqueue styles in elementor
113
  */
114
  public function enqueue_styles() {
115
- if ( \Elementor\Plugin::$instance->preview->is_preview_mode() || \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
116
- wp_enqueue_style( 'yith-plugin-fw-icon-font' );
117
- wp_enqueue_style( 'yith-plugin-fw-elementor' );
 
 
118
  }
119
  }
120
  }
4
  *
5
  * @class YITH_Elementor
6
  * @package YITH\PluginFramework\Classes
7
+ * @since 3.6.0
8
  */
9
 
10
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
29
  *
30
  * @var array
31
  */
32
+ private $widgets = array();
33
 
34
  /**
35
  * Singleton implementation.
45
  */
46
  private function __construct() {
47
  if ( defined( 'ELEMENTOR_VERSION' ) && version_compare( ELEMENTOR_VERSION, '3.0.0', '>=' ) ) {
48
+ add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_widgets' ) );
49
+ add_action( 'elementor/elements/categories_registered', array( $this, 'add_yith_category' ) );
50
+
51
+ add_action( 'elementor/editor/after_enqueue_styles', array( $this, 'enqueue_styles' ) );
52
+ add_action( 'elementor/frontend/after_enqueue_styles', array( $this, 'enqueue_styles' ) );
53
  }
54
  }
55
 
68
 
69
  /**
70
  * Let's start with Elementor
71
+ *
72
+ * @deprecated 3.7.2
73
  */
74
  public function init() {
 
 
 
 
 
 
 
 
75
  }
76
 
77
  /**
85
  * Register Elementor Widgets
86
  */
87
  public function register_widgets() {
88
+ if ( $this->widgets ) {
89
+ $this->load_files();
90
+ }
91
+
92
  foreach ( $this->widgets as $widget ) {
93
  \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new YITH_Elementor_Widget( array(), array( 'yith_data' => $widget ) ) );
94
  }
95
  }
96
 
97
  /**
98
+ * Add "YITH" category for Elementor widgets
99
  *
100
  * @param Elementor\Elements_Manager $elements_manager Elements Manager.
101
  */
102
  public function add_yith_category( $elements_manager ) {
103
+ // If the category is empty, it'll be automatically hidden by Elementor.
104
  $elements_manager->add_category(
105
  'yith',
106
  array(
115
  * Enqueue styles in elementor
116
  */
117
  public function enqueue_styles() {
118
+ if ( $this->widgets ) {
119
+ if ( \Elementor\Plugin::$instance->preview->is_preview_mode() || \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
120
+ wp_enqueue_style( 'yith-plugin-fw-icon-font' );
121
+ wp_enqueue_style( 'yith-plugin-fw-elementor' );
122
+ }
123
  }
124
  }
125
  }
plugin-fw/includes/builders/gutenberg/class-yith-gutenberg.php CHANGED
@@ -126,19 +126,21 @@ if ( ! class_exists( 'YITH_Gutenberg' ) ) {
126
  }
127
 
128
  if ( ! empty( $this->registered_blocks ) ) {
129
- add_filter( 'block_categories', array( $this, 'block_category' ), 10, 2 );
 
 
 
130
  }
131
  }
132
 
133
  /**
134
  * Add block category
135
  *
136
- * @param array $categories The block categories.
137
- * @param WP_Post $post The current post.
138
  *
139
  * @return array The block categories.
140
  */
141
- public function block_category( $categories, $post ) {
142
  return array_merge(
143
  $categories,
144
  array(
@@ -322,9 +324,12 @@ if ( ! class_exists( 'YITH_Gutenberg' ) ) {
322
  do_action( 'yith_plugin_fw_gutenberg_after_do_shortcode', $shortcode, $current_action );
323
 
324
  $html = ob_get_clean();
325
- if ( is_ajax() ) {
326
- wp_send_json( array( 'html' => $html ) );
327
- }
 
 
 
328
 
329
  // phpcs:enable
330
  }
126
  }
127
 
128
  if ( ! empty( $this->registered_blocks ) ) {
129
+ global $wp_version;
130
+
131
+ $categories_hook = version_compare( $wp_version, '5.8-beta', '>=' ) ? 'block_categories_all' : 'block_categories';
132
+ add_filter( $categories_hook, array( $this, 'block_category' ), 10, 1 );
133
  }
134
  }
135
 
136
  /**
137
  * Add block category
138
  *
139
+ * @param array $categories The block categories.
 
140
  *
141
  * @return array The block categories.
142
  */
143
+ public function block_category( $categories ) {
144
  return array_merge(
145
  $categories,
146
  array(
324
  do_action( 'yith_plugin_fw_gutenberg_after_do_shortcode', $shortcode, $current_action );
325
 
326
  $html = ob_get_clean();
327
+
328
+ wp_send_json(
329
+ array(
330
+ 'html' => $html,
331
+ )
332
+ );
333
 
334
  // phpcs:enable
335
  }
plugin-fw/includes/class-yit-ajax.php CHANGED
@@ -105,8 +105,16 @@ if ( ! class_exists( 'YIT_Ajax' ) ) {
105
  if ( ! current_user_can( 'read_post', $post_id ) ) {
106
  continue;
107
  }
108
- $title = get_the_title( $post_id ) . ( $show_id ? " (#{$post_id})" : '' );
109
- $found_posts[ $post_id ] = apply_filters( 'yith_plugin_fw_json_search_found_post_title', rawurldecode( $title ), $post_id, $request );
 
 
 
 
 
 
 
 
110
  }
111
  }
112
 
105
  if ( ! current_user_can( 'read_post', $post_id ) ) {
106
  continue;
107
  }
108
+
109
+ $the_title = yith_plugin_fw_get_post_formatted_name(
110
+ $post_id,
111
+ array(
112
+ 'post-type' => $args['post_type'],
113
+ 'show-id' => $show_id,
114
+ )
115
+ );
116
+
117
+ $found_posts[ $post_id ] = apply_filters( 'yith_plugin_fw_json_search_found_post_title', rawurldecode( wp_strip_all_tags( $the_title ) ), $post_id, $request );
118
  }
119
  }
120
 
plugin-fw/includes/class-yit-assets.php CHANGED
@@ -113,6 +113,7 @@ if ( ! class_exists( 'YIT_Assets' ) ) {
113
  'search_posts_nonce' => wp_create_nonce( 'search-posts' ),
114
  'search_terms_nonce' => wp_create_nonce( 'search-terms' ),
115
  'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
 
116
  )
117
  );
118
 
@@ -145,9 +146,11 @@ if ( ! class_exists( 'YIT_Assets' ) ) {
145
  'bulk_trash_confirm_title' => __( 'Confirm trash', 'yith-plugin-fw' ),
146
  'bulk_trash_confirm_message' => __( 'Are you sure you want to trash the selected items?', 'yith-plugin-fw' ),
147
  'bulk_trash_confirm_button' => _x( 'Yes, move to trash', 'Trash confirmation action', 'yith-plugin-fw' ),
 
148
  'bulk_delete_confirm_title' => __( 'Confirm delete', 'yith-plugin-fw' ),
149
  'bulk_delete_confirm_message' => __( 'Are you sure you want to delete the selected items?', 'yith-plugin-fw' ) . '<br /><br />' . __( 'This action cannot be undone and you will not be able to recover this data.', 'yith-plugin-fw' ),
150
- 'bulk_delete_confirm_button' => _x( 'Yes, delete permanently', 'Delete confirmation action', 'yith-plugin-fw' ),
 
151
  ),
152
  )
153
  );
113
  'search_posts_nonce' => wp_create_nonce( 'search-posts' ),
114
  'search_terms_nonce' => wp_create_nonce( 'search-terms' ),
115
  'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
116
+ 'search_pages_nonce' => wp_create_nonce( 'search-pages' ),
117
  )
118
  );
119
 
146
  'bulk_trash_confirm_title' => __( 'Confirm trash', 'yith-plugin-fw' ),
147
  'bulk_trash_confirm_message' => __( 'Are you sure you want to trash the selected items?', 'yith-plugin-fw' ),
148
  'bulk_trash_confirm_button' => _x( 'Yes, move to trash', 'Trash confirmation action', 'yith-plugin-fw' ),
149
+ 'bulk_trash_cancel_button' => __( 'No', 'yith-plugin-fw' ),
150
  'bulk_delete_confirm_title' => __( 'Confirm delete', 'yith-plugin-fw' ),
151
  'bulk_delete_confirm_message' => __( 'Are you sure you want to delete the selected items?', 'yith-plugin-fw' ) . '<br /><br />' . __( 'This action cannot be undone and you will not be able to recover this data.', 'yith-plugin-fw' ),
152
+ 'bulk_delete_confirm_button' => _x( 'Yes, delete', 'Delete confirmation action', 'yith-plugin-fw' ),
153
+ 'bulk_delete_cancel_button' => __( 'No', 'yith-plugin-fw' ),
154
  ),
155
  )
156
  );
plugin-fw/includes/class-yit-help-desk.php CHANGED
@@ -149,7 +149,7 @@ if ( ! class_exists( 'YIT_Help_Desk' ) ) {
149
  $status = isset( $response['response'] ) ? absint( $response['response']['code'] ) : false;
150
 
151
  if ( ! in_array( $status, apply_filters( 'yit_plugin_fw_help_desk_valid_response_statuses', array( 200 ) ), true ) ) {
152
- throw new Exception( __( 'There was an error with your request; please try again later.', 'yit-plugin-fw' ), $status );
153
  } else {
154
  return $resp_body;
155
  }
149
  $status = isset( $response['response'] ) ? absint( $response['response']['code'] ) : false;
150
 
151
  if ( ! in_array( $status, apply_filters( 'yit_plugin_fw_help_desk_valid_response_statuses', array( 200 ) ), true ) ) {
152
+ throw new Exception( __( 'There was an error with your request; please try again later.', 'yith-plugin-fw' ), $status );
153
  } else {
154
  return $resp_body;
155
  }
plugin-fw/includes/class-yith-system-status.php CHANGED
@@ -182,9 +182,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
182
  $this->add_requirements(
183
  esc_html__( 'YITH Plugins', 'yith-plugin-fw' ),
184
  array(
185
- 'min_wp_version' => '5.4',
186
- 'min_wc_version' => '4.5',
187
- 'min_php_version' => '5.6.20',
188
  )
189
  );
190
  $this->add_requirements(
182
  $this->add_requirements(
183
  esc_html__( 'YITH Plugins', 'yith-plugin-fw' ),
184
  array(
185
+ 'min_wp_version' => '5.6',
186
+ 'min_wc_version' => '5.3',
187
+ 'min_php_version' => '7.0',
188
  )
189
  );
190
  $this->add_requirements(
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.7.1
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author YITH
10
- * @version 3.7.1
11
  * @package YITH\PluginFramework
12
  */
13
 
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.7.4
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author YITH
10
+ * @version 3.7.4
11
  * @package YITH\PluginFramework
12
  */
13
 
plugin-fw/languages/yith-plugin-fw-el.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-el.po CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2021-06-08 13:48:44+00:00\n"
8
  "PO-Revision-Date: 2021-02-11 18:07:46+0000\n"
9
  "Language: el_GR\n"
10
  "MIME-Version: 1.0\n"
@@ -13,50 +13,56 @@ msgstr ""
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
- #: includes/class-yit-assets.php:145 yit-functions.php:1925
17
  msgid "Confirm trash"
18
  msgstr ""
19
 
20
- #: includes/class-yit-assets.php:146
21
  msgid "Are you sure you want to trash the selected items?"
22
  msgstr ""
23
 
24
- #: includes/class-yit-assets.php:148 yit-functions.php:1942
25
- #: yit-functions.php:2069
 
 
 
 
 
 
26
  msgid "Confirm delete"
27
  msgstr ""
28
 
29
- #: includes/class-yit-assets.php:149
30
  msgid "Are you sure you want to delete the selected items?"
31
  msgstr ""
32
 
33
- #: includes/class-yit-assets.php:149 yit-functions.php:1859
34
- #: yit-functions.php:2017
35
  msgid ""
36
  "This action cannot be undone and you will not be able to recover this data."
37
  msgstr ""
38
 
39
- #: includes/class-yit-assets.php:161
40
  msgid "Clear"
41
  msgstr "Καθαρισμός"
42
 
43
- #: includes/class-yit-assets.php:162
44
  msgid "Clear color"
45
  msgstr "Καθαρισμός χρώματος"
46
 
47
- #: includes/class-yit-assets.php:163
48
  msgid "Default"
49
  msgstr "Προεπιλεγμένο"
50
 
51
- #: includes/class-yit-assets.php:164
52
  msgid "Select default color"
53
  msgstr "Επιλογή προεπιλεγμένου χρώματος"
54
 
55
- #: includes/class-yit-assets.php:165
56
  msgid "Select Color"
57
  msgstr "Επιλογή Χρώματος"
58
 
59
- #: includes/class-yit-assets.php:166
60
  msgid "Color value"
61
  msgstr "Αξία χρώματος"
62
 
@@ -82,12 +88,12 @@ msgstr "Ρυθμίσεις"
82
  msgid "How to install premium version"
83
  msgstr "Πώς να εγκαταστήσετε την προηγμένη έκδοση"
84
 
85
- #: includes/class-yit-plugin-panel.php:651
86
  #: includes/class-yit-plugin-subpanel.php:132
87
  msgid "Save Changes"
88
  msgstr "Αποθήκευση Αλλαγών"
89
 
90
- #: includes/class-yit-plugin-panel.php:656
91
  #: includes/class-yit-plugin-subpanel.php:136
92
  #: templates/panel/woocommerce/woocommerce-form.php:14
93
  msgid ""
@@ -96,73 +102,73 @@ msgstr ""
96
  "Αν συνεχίσετε με αυτή την ενέργεια θα επαναφέρετε όλες τις επιλογές στη "
97
  "σελίδα."
98
 
99
- #: includes/class-yit-plugin-panel.php:656
100
  #: includes/class-yit-plugin-subpanel.php:136
101
  #: templates/panel/woocommerce/woocommerce-form.php:14
102
  msgid "Are you sure?"
103
  msgstr "Είστε σίγουρος;"
104
 
105
- #: includes/class-yit-plugin-panel.php:660
106
  #: includes/class-yit-plugin-subpanel.php:139
107
  msgid "Reset to default"
108
  msgstr "Επαναφορά σε προεπιλεγμένο"
109
 
110
- #: includes/class-yit-plugin-panel.php:958
111
  msgid ""
112
  "The element you have entered already exists. Please, enter another name."
113
  msgstr "Το στοιχείο που εισάγατε υπάρχει ήδη. Παρακαλώ, εισάγετε άλλο όνομα."
114
 
115
- #: includes/class-yit-plugin-panel.php:959
116
  msgid "Settings saved"
117
  msgstr "Ρυθμίσεις αποθηκεύτηκαν"
118
 
119
- #: includes/class-yit-plugin-panel.php:960
120
  msgid "Settings reset"
121
  msgstr "Επαναφορά ρυθμίσεων"
122
 
123
- #: includes/class-yit-plugin-panel.php:961
124
  msgid "Element deleted correctly."
125
  msgstr "Το στοιχείο διαγράφηκε επιτυχώς."
126
 
127
- #: includes/class-yit-plugin-panel.php:962
128
  #: includes/class-yit-plugin-panel.php:963
 
129
  msgid "Element updated correctly."
130
  msgstr "Το στοιχείο αναβαθμίστηκε επιτυχώς."
131
 
132
- #: includes/class-yit-plugin-panel.php:964
133
  msgid "Database imported correctly."
134
  msgstr "Επιτυχής εισαγωγή βάσης δεδομένων."
135
 
136
- #: includes/class-yit-plugin-panel.php:965