Premium Addons for Elementor - Version 3.11.5

Version Description

  • Fixed: Testimonials widget markup issue since v3.11.4
  • Fixed: Post featured image link not working since v3.11.4
Download this release

Release Info

Developer leap13
Plugin Icon 128x128 Premium Addons for Elementor
Version 3.11.5
Comparing to
See all releases

Code changes from version 3.11.4 to 3.11.5

Files changed (102) hide show
  1. admin/assets/css/notice-rtl.css +87 -87
  2. admin/assets/css/notice.css +87 -87
  3. admin/assets/fonts/pa-icon.svg +10 -10
  4. admin/assets/fonts/style.css +37 -37
  5. admin/assets/js/admin.js +133 -133
  6. admin/assets/js/dialog/dialog.js +830 -830
  7. admin/assets/js/pa-notice.js +25 -25
  8. admin/assets/js/sweetalert2/core.js +7612 -7612
  9. admin/includes/admin-notices.php +341 -341
  10. admin/includes/dep/admin-helper.php +344 -344
  11. admin/includes/dep/maintenance.php +33 -33
  12. admin/includes/dep/rollback.php +100 -100
  13. admin/includes/papro-actions.php +68 -68
  14. admin/includes/plugin-info.php +89 -89
  15. admin/includes/reports.php +63 -63
  16. admin/includes/version-control.php +141 -141
  17. admin/settings/maps.php +181 -181
  18. admin/settings/modules-setting.php +802 -802
  19. assets/editor/js/pa-maps-finder.js +67 -67
  20. assets/editor/templates/css/editor-rtl.css +523 -523
  21. assets/editor/templates/css/editor.css +523 -523
  22. assets/editor/templates/css/preview-rtl.css +4 -4
  23. assets/editor/templates/css/preview.css +4 -4
  24. assets/editor/templates/js/editor.js +1044 -1044
  25. assets/frontend/css/premium-addons-rtl.css +4503 -4503
  26. assets/frontend/css/premium-addons.css +4603 -4603
  27. assets/frontend/css/prettyphoto-rtl.css +520 -520
  28. assets/frontend/css/prettyphoto.css +169 -169
  29. assets/frontend/js/iscroll.js +2172 -2172
  30. assets/frontend/js/isotope.js +13 -13
  31. assets/frontend/js/jquery-slimscroll.js +474 -474
  32. assets/frontend/js/premium-addons.js +844 -844
  33. assets/frontend/js/premium-vscroll.js +872 -872
  34. assets/frontend/js/typed.js +1 -1
  35. assets/frontend/js/vticker.js +8 -8
  36. assets/frontend/min-css/premium-addons.min.css +1 -1
  37. includes/class-addons-category.php +58 -58
  38. includes/class-addons-integration.php +429 -429
  39. includes/class-beta-testers.php +92 -92
  40. includes/class-helper-functions.php +468 -468
  41. includes/compatibility/class-premium-addons-wpml.php +598 -598
  42. includes/compatibility/widgets/carousel.php +66 -66
  43. includes/compatibility/widgets/fancy-text.php +66 -66
  44. includes/compatibility/widgets/grid.php +81 -81
  45. includes/compatibility/widgets/maps.php +89 -89
  46. includes/compatibility/widgets/pricing-table.php +67 -67
  47. includes/compatibility/widgets/progress-bar.php +67 -67
  48. includes/compatibility/widgets/vertical-scroll.php +66 -66
  49. includes/elementor-helper.php +118 -118
  50. includes/plugin.php +47 -47
  51. includes/templates/classes/api.php +173 -173
  52. includes/templates/classes/assets.php +198 -198
  53. includes/templates/classes/config.php +223 -223
  54. includes/templates/classes/manager.php +374 -374
  55. includes/templates/documents/base.php +27 -27
  56. includes/templates/documents/section.php +20 -20
  57. includes/templates/scripts/template-modal-content.php +9 -9
  58. includes/templates/scripts/template-modal-error.php +21 -21
  59. includes/templates/scripts/template-modal-filters-item.php +8 -8
  60. includes/templates/scripts/template-modal-filters.php +5 -5
  61. includes/templates/scripts/template-modal-header-back.php +8 -8
  62. includes/templates/scripts/template-modal-header-logo.php +12 -12
  63. includes/templates/scripts/template-modal-header.php +10 -10
  64. includes/templates/scripts/template-modal-insert-button.php +16 -16
  65. includes/templates/scripts/template-modal-item.php +29 -29
  66. includes/templates/scripts/template-modal-keywords.php +17 -17
  67. includes/templates/scripts/template-modal-loading.php +13 -13
  68. includes/templates/scripts/template-modal-preview.php +9 -9
  69. includes/templates/scripts/template-modal-tabs-item.php +8 -8
  70. includes/templates/scripts/template-modal-tabs.php +5 -5
  71. includes/templates/scripts/template-modal-templates.php +5 -5
  72. includes/templates/sources/base.php +286 -286
  73. includes/templates/sources/premium-api.php +418 -418
  74. includes/templates/templates.php +238 -238
  75. includes/templates/types/base.php +64 -64
  76. includes/templates/types/manager.php +143 -143
  77. includes/templates/types/section.php +53 -53
  78. languages/premium-addons-for-elementor.pot +4916 -4916
  79. premium-addons-for-elementor.php +229 -229
  80. readme.txt +1367 -1362
  81. widgets/dep/queries.php +156 -156
  82. widgets/premium-banner.php +1 -0
  83. widgets/premium-blog.php +2289 -2289
  84. widgets/premium-carousel.php +1356 -1354
  85. widgets/premium-contactform.php +601 -601
  86. widgets/premium-countdown.php +684 -684
  87. widgets/premium-counter.php +773 -773
  88. widgets/premium-dual-header.php +799 -799
  89. widgets/premium-fancytext.php +697 -697
  90. widgets/premium-grid.php +2648 -2648
  91. widgets/premium-image-button.php +912 -912
  92. widgets/premium-image-scroll.php +668 -668
  93. widgets/premium-image-separator.php +448 -448
  94. widgets/premium-maps.php +739 -739
  95. widgets/premium-modalbox.php +1408 -1407
  96. widgets/premium-person.php +1844 -1844
  97. widgets/premium-pricing-table.php +2278 -2278
  98. widgets/premium-progressbar.php +722 -722
  99. widgets/premium-testimonials.php +722 -709
  100. widgets/premium-title.php +691 -691
  101. widgets/premium-videobox.php +989 -989
  102. widgets/premium-vscroll.php +910 -908
admin/assets/css/notice-rtl.css CHANGED
@@ -1,88 +1,88 @@
1
- .error.pa-notice-wrap {
2
- display: flex;
3
- border: none;
4
- padding: 0;
5
- margin: 0;
6
- min-height: 120px;
7
- padding-left: 1em;
8
- align-items: center;
9
- }
10
- .error.pa-notice-wrap div {
11
- padding: 0;
12
- margin: 0;
13
- }
14
- .error.pa-notice-wrap .pa-img-wrap {
15
- display: flex;
16
- align-items: center;
17
- min-height: 120px;
18
- padding: 0 0.7em;
19
- }
20
- .error.pa-black-notice,
21
- .error.pa-black-notice .pa-img-wrap {
22
- min-height: auto;
23
- }
24
- .pa-new-feature-notice .pa-text-wrap {
25
- display: -ms-flexbox;
26
- display: -webkit-flex;
27
- display: -moz-flex;
28
- display: -ms-flex;
29
- display: flex;
30
- align-items: center;
31
- padding:10px 0 10px 10px;
32
- }
33
- .pa-new-feature-notice .pa-text-wrap .pa-notice-logo {
34
- width: 40px;
35
- margin-left: 0.8em;
36
- }
37
- .pa-new-feature-notice .pa-text-wrap .pa-notice-close {
38
- text-decoration: none;
39
- margin-right: 1em;
40
- margin-right: auto;
41
- }
42
- .error .pa-text-wrap a:focus {
43
- box-shadow: none;
44
- outline: none;
45
-
46
- }
47
- .error.pa-notice-wrap .pa-text-wrap {
48
- padding-top: 0.3em;
49
- }
50
- .error.pa-notice-wrap .pa-img-wrap img {
51
- width: 40px;
52
- }
53
- .error.pa-notice-wrap .pa-text-wrap a {
54
- margin-left: 0.3em;
55
- text-transform: uppercase;
56
- font-weight: 500;
57
- font-style: normal;
58
- }
59
- .error.pa-notice-wrap .pa-text-wrap a i {
60
- margin-left: 0.1em;
61
- margin-top: 0.1em;
62
- }
63
- .error.pa-notice-wrap .pa-text-wrap a:first-of-type {
64
- background: #0f6aa7
65
- }
66
- .error.pa-black-notice .pa-text-wrap a:first-of-type {
67
- background: transparent;
68
- text-transform: none;
69
- }
70
- .error .pa-text-wrap a {
71
- margin: 0;
72
- }
73
- .pa-notice-wrap .pa-notice-close {
74
- -webkit-flex-basis: 56%;
75
- -ms-flex-preferred-size: 56%;
76
- flex-basis: 56%;
77
- }
78
- .pa-notice-close a:focus {
79
- outline: none;
80
- box-shadow: none;
81
- }
82
- .pa-notice-close span {
83
- float: left;
84
- text-decoration: none;
85
- }
86
- .error.pa-notice-wrap .pa-text-wrap a:not(:first-of-type) {
87
- margin-right: 0.3em;
88
}
1
+ .error.pa-notice-wrap {
2
+ display: flex;
3
+ border: none;
4
+ padding: 0;
5
+ margin: 0;
6
+ min-height: 120px;
7
+ padding-left: 1em;
8
+ align-items: center;
9
+ }
10
+ .error.pa-notice-wrap div {
11
+ padding: 0;
12
+ margin: 0;
13
+ }
14
+ .error.pa-notice-wrap .pa-img-wrap {
15
+ display: flex;
16
+ align-items: center;
17
+ min-height: 120px;
18
+ padding: 0 0.7em;
19
+ }
20
+ .error.pa-black-notice,
21
+ .error.pa-black-notice .pa-img-wrap {
22
+ min-height: auto;
23
+ }
24
+ .pa-new-feature-notice .pa-text-wrap {
25
+ display: -ms-flexbox;
26
+ display: -webkit-flex;
27
+ display: -moz-flex;
28
+ display: -ms-flex;
29
+ display: flex;
30
+ align-items: center;
31
+ padding:10px 0 10px 10px;
32
+ }
33
+ .pa-new-feature-notice .pa-text-wrap .pa-notice-logo {
34
+ width: 40px;
35
+ margin-left: 0.8em;
36
+ }
37
+ .pa-new-feature-notice .pa-text-wrap .pa-notice-close {
38
+ text-decoration: none;
39
+ margin-right: 1em;
40
+ margin-right: auto;
41
+ }
42
+ .error .pa-text-wrap a:focus {
43
+ box-shadow: none;
44
+ outline: none;
45
+
46
+ }
47
+ .error.pa-notice-wrap .pa-text-wrap {
48
+ padding-top: 0.3em;
49
+ }
50
+ .error.pa-notice-wrap .pa-img-wrap img {
51
+ width: 40px;
52
+ }
53
+ .error.pa-notice-wrap .pa-text-wrap a {
54
+ margin-left: 0.3em;
55
+ text-transform: uppercase;
56
+ font-weight: 500;
57
+ font-style: normal;
58
+ }
59
+ .error.pa-notice-wrap .pa-text-wrap a i {
60
+ margin-left: 0.1em;
61
+ margin-top: 0.1em;
62
+ }
63
+ .error.pa-notice-wrap .pa-text-wrap a:first-of-type {
64
+ background: #0f6aa7
65
+ }
66
+ .error.pa-black-notice .pa-text-wrap a:first-of-type {
67
+ background: transparent;
68
+ text-transform: none;
69
+ }
70
+ .error .pa-text-wrap a {
71
+ margin: 0;
72
+ }
73
+ .pa-notice-wrap .pa-notice-close {
74
+ -webkit-flex-basis: 56%;
75
+ -ms-flex-preferred-size: 56%;
76
+ flex-basis: 56%;
77
+ }
78
+ .pa-notice-close a:focus {
79
+ outline: none;
80
+ box-shadow: none;
81
+ }
82
+ .pa-notice-close span {
83
+ float: left;
84
+ text-decoration: none;
85
+ }
86
+ .error.pa-notice-wrap .pa-text-wrap a:not(:first-of-type) {
87
+ margin-right: 0.3em;
88
}
admin/assets/css/notice.css CHANGED
@@ -1,88 +1,88 @@
1
- .error.pa-notice-wrap {
2
- display: flex;
3
- border: none;
4
- padding: 0;
5
- margin: 0;
6
- min-height: 120px;
7
- padding-right: 1em;
8
- align-items: center;
9
- }
10
- .error.pa-notice-wrap div {
11
- padding: 0;
12
- margin: 0;
13
- }
14
- .error.pa-notice-wrap .pa-img-wrap {
15
- display: flex;
16
- align-items: center;
17
- min-height: 120px;
18
- padding: 0 0.7em;
19
- }
20
- .error.pa-black-notice,
21
- .error.pa-black-notice .pa-img-wrap {
22
- min-height: auto;
23
- }
24
- .pa-new-feature-notice .pa-text-wrap {
25
- display: -ms-flexbox;
26
- display: -webkit-flex;
27
- display: -moz-flex;
28
- display: -ms-flex;
29
- display: flex;
30
- align-items: center;
31
- padding:10px 10px 10px 0;
32
- }
33
- .pa-new-feature-notice .pa-text-wrap .pa-notice-logo {
34
- width: 40px;
35
- margin-right: 0.8em;
36
- }
37
- .pa-new-feature-notice .pa-text-wrap .pa-notice-close {
38
- text-decoration: none;
39
- margin-left: 1em;
40
- margin-left: auto;
41
- }
42
- .error .pa-text-wrap a:focus {
43
- box-shadow: none;
44
- outline: none;
45
-
46
- }
47
- .error.pa-notice-wrap .pa-text-wrap {
48
- padding-top: 0.3em;
49
- }
50
- .error.pa-notice-wrap .pa-img-wrap img {
51
- width: 40px;
52
- }
53
- .error.pa-notice-wrap .pa-text-wrap a {
54
- margin-right: 0.3em;
55
- text-transform: uppercase;
56
- font-weight: 500;
57
- font-style: normal;
58
- }
59
- .error.pa-notice-wrap .pa-text-wrap a i {
60
- margin-right: 0.1em;
61
- margin-top: 0.1em;
62
- }
63
- .error.pa-notice-wrap .pa-text-wrap a:first-of-type {
64
- background: #0f6aa7
65
- }
66
- .error.pa-black-notice .pa-text-wrap a:first-of-type {
67
- background: transparent;
68
- text-transform: none;
69
- }
70
- .error .pa-text-wrap a {
71
- margin: 0;
72
- }
73
- .pa-notice-wrap .pa-notice-close {
74
- -webkit-flex-basis: 56%;
75
- -ms-flex-preferred-size: 56%;
76
- flex-basis: 56%;
77
- }
78
- .pa-notice-close a:focus {
79
- outline: none;
80
- box-shadow: none;
81
- }
82
- .pa-notice-close span {
83
- float: right;
84
- text-decoration: none;
85
- }
86
- .error.pa-notice-wrap .pa-text-wrap a:not(:first-of-type) {
87
- margin-left: 0.3em;
88
}
1
+ .error.pa-notice-wrap {
2
+ display: flex;
3
+ border: none;
4
+ padding: 0;
5
+ margin: 0;
6
+ min-height: 120px;
7
+ padding-right: 1em;
8
+ align-items: center;
9
+ }
10
+ .error.pa-notice-wrap div {
11
+ padding: 0;
12
+ margin: 0;
13
+ }
14
+ .error.pa-notice-wrap .pa-img-wrap {
15
+ display: flex;
16
+ align-items: center;
17
+ min-height: 120px;
18
+ padding: 0 0.7em;
19
+ }
20
+ .error.pa-black-notice,
21
+ .error.pa-black-notice .pa-img-wrap {
22
+ min-height: auto;
23
+ }
24
+ .pa-new-feature-notice .pa-text-wrap {
25
+ display: -ms-flexbox;
26
+ display: -webkit-flex;
27
+ display: -moz-flex;
28
+ display: -ms-flex;
29
+ display: flex;
30
+ align-items: center;
31
+ padding:10px 10px 10px 0;
32
+ }
33
+ .pa-new-feature-notice .pa-text-wrap .pa-notice-logo {
34
+ width: 40px;
35
+ margin-right: 0.8em;
36
+ }
37
+ .pa-new-feature-notice .pa-text-wrap .pa-notice-close {
38
+ text-decoration: none;
39
+ margin-left: 1em;
40
+ margin-left: auto;
41
+ }
42
+ .error .pa-text-wrap a:focus {
43
+ box-shadow: none;
44
+ outline: none;
45
+
46
+ }
47
+ .error.pa-notice-wrap .pa-text-wrap {
48
+ padding-top: 0.3em;
49
+ }
50
+ .error.pa-notice-wrap .pa-img-wrap img {
51
+ width: 40px;
52
+ }
53
+ .error.pa-notice-wrap .pa-text-wrap a {
54
+ margin-right: 0.3em;
55
+ text-transform: uppercase;
56
+ font-weight: 500;
57
+ font-style: normal;
58
+ }
59
+ .error.pa-notice-wrap .pa-text-wrap a i {
60
+ margin-right: 0.1em;
61
+ margin-top: 0.1em;
62
+ }
63
+ .error.pa-notice-wrap .pa-text-wrap a:first-of-type {
64
+ background: #0f6aa7
65
+ }
66
+ .error.pa-black-notice .pa-text-wrap a:first-of-type {
67
+ background: transparent;
68
+ text-transform: none;
69
+ }
70
+ .error .pa-text-wrap a {
71
+ margin: 0;
72
+ }
73
+ .pa-notice-wrap .pa-notice-close {
74
+ -webkit-flex-basis: 56%;
75
+ -ms-flex-preferred-size: 56%;
76
+ flex-basis: 56%;
77
+ }
78
+ .pa-notice-close a:focus {
79
+ outline: none;
80
+ box-shadow: none;
81
+ }
82
+ .pa-notice-close span {
83
+ float: right;
84
+ text-decoration: none;
85
+ }
86
+ .error.pa-notice-wrap .pa-text-wrap a:not(:first-of-type) {
87
+ margin-left: 0.3em;
88
}
admin/assets/fonts/pa-icon.svg CHANGED
@@ -1,11 +1,11 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Generated by IcoMoon</metadata>
5
- <defs>
6
- <font id="icomoon" horiz-adv-x="1024">
7
- <font-face units-per-em="1024" ascent="960" descent="-64" />
8
- <missing-glyph horiz-adv-x="1024" />
9
- <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
- <glyph unicode="&#xe900;" glyph-name="pa-admin-icon" d="M918.187 628.907c0-13.653-13.653-27.307-27.307-27.307h-249.173c-13.653 0-30.72 10.24-34.133 23.893l-81.92 256c-3.413 13.653 3.413 23.893 6.827 23.893s17.067-6.827 30.72-17.067l314.027-180.907c13.653-6.827 37.547-27.307 40.96-37.547-3.413-6.827 0-27.307 0-40.96zM501.76 881.493l-81.92-256c-3.413-13.653-20.48-23.893-34.133-23.893h-252.587c-13.653 0-27.307 13.653-27.307 27.307s6.827 47.787 10.24 54.613c6.827 6.827 20.48 20.48 34.133 27.307l314.027 180.907c13.653 6.827 30.72 17.067 37.547 17.067 3.413 0 3.413-13.653 0-27.307zM723.627 103.253l-163.84-98.987c-13.653-6.827-44.373-20.48-51.2-17.067-10.24 3.413-27.307 10.24-40.96 17.067l-167.253 95.573c-13.653 6.827-13.653 20.48 0 30.72l191.147 139.947c13.653 6.827 30.72 6.827 44.373 0l191.147-139.947c10.24-6.827 10.24-20.48-3.413-27.307zM918.187 553.813v-286.72c0-13.653-6.827-47.787-10.24-54.613-6.827-6.827-20.48-17.067-34.133-27.307l-81.92-44.373c-13.653-6.827-27.307-3.413-30.72 10.24l-75.093 228.693c-3.413 13.653 0 34.133 13.653 40.96l197.973 143.36c10.24 10.24 20.48 6.827 20.48-10.24zM337.92 383.147l-75.093-228.693c-3.413-13.653-20.48-20.48-30.72-10.24l-78.507 47.787c-13.653 6.827-37.547 27.307-40.96 37.547s-6.827 27.307-6.827 44.373v286.72c0 13.653 10.24 20.48 20.48 10.24l197.973-143.36c13.653-13.653 17.067-30.72 13.653-44.373z" />
11
</font></defs></svg>
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="icomoon" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xe900;" glyph-name="pa-admin-icon" d="M918.187 628.907c0-13.653-13.653-27.307-27.307-27.307h-249.173c-13.653 0-30.72 10.24-34.133 23.893l-81.92 256c-3.413 13.653 3.413 23.893 6.827 23.893s17.067-6.827 30.72-17.067l314.027-180.907c13.653-6.827 37.547-27.307 40.96-37.547-3.413-6.827 0-27.307 0-40.96zM501.76 881.493l-81.92-256c-3.413-13.653-20.48-23.893-34.133-23.893h-252.587c-13.653 0-27.307 13.653-27.307 27.307s6.827 47.787 10.24 54.613c6.827 6.827 20.48 20.48 34.133 27.307l314.027 180.907c13.653 6.827 30.72 17.067 37.547 17.067 3.413 0 3.413-13.653 0-27.307zM723.627 103.253l-163.84-98.987c-13.653-6.827-44.373-20.48-51.2-17.067-10.24 3.413-27.307 10.24-40.96 17.067l-167.253 95.573c-13.653 6.827-13.653 20.48 0 30.72l191.147 139.947c13.653 6.827 30.72 6.827 44.373 0l191.147-139.947c10.24-6.827 10.24-20.48-3.413-27.307zM918.187 553.813v-286.72c0-13.653-6.827-47.787-10.24-54.613-6.827-6.827-20.48-17.067-34.133-27.307l-81.92-44.373c-13.653-6.827-27.307-3.413-30.72 10.24l-75.093 228.693c-3.413 13.653 0 34.133 13.653 40.96l197.973 143.36c10.24 10.24 20.48 6.827 20.48-10.24zM337.92 383.147l-75.093-228.693c-3.413-13.653-20.48-20.48-30.72-10.24l-78.507 47.787c-13.653 6.827-37.547 27.307-40.96 37.547s-6.827 27.307-6.827 44.373v286.72c0 13.653 10.24 20.48 20.48 10.24l197.973-143.36c13.653-13.653 17.067-30.72 13.653-44.373z" />
11
</font></defs></svg>
admin/assets/fonts/style.css CHANGED
@@ -1,38 +1,38 @@
1
- @font-face {
2
- font-family: 'pa-icon';
3
- src: url('pa-icon.eot?uo4nkm');
4
- src: url('pa-icon.eot?uo4nkm#iefix') format('embedded-opentype'),
5
- url('pa-icon.ttf?uo4nkm') format('truetype'),
6
- url('pa-icon.woff?uo4nkm') format('woff'),
7
- url('pa-icon.svg?uo4nkm#pa-elements') format('svg');
8
- font-weight: normal;
9
- font-style: normal;
10
- }
11
- .toplevel_page_premium-addons > div.wp-menu-image::before {
12
- position: relative;
13
- top: 5px;
14
- content: "\e900";
15
- /* use !important to prevent issues with browser extensions that change fonts */
16
- font-family: 'pa-icon' !important;
17
- speak: none;
18
- font-style: normal;
19
- font-variant: normal;
20
- text-transform: none;
21
- line-height: 1;
22
- /* Better Font Rendering =========== */
23
- -webkit-font-smoothing: antialiased;
24
- -moz-osx-font-smoothing: grayscale;
25
- font-size: 21px;
26
- }
27
- #toplevel_page_premium-addons a[href="admin.php?page=premium-addons-pro"] {
28
- color:#1A7FC2;
29
- }
30
- #toplevel_page_premium-addons a[href="admin.php?page=premium-addons-pro"]:hover {
31
- color:#1A7FC2;
32
- }
33
- #toplevel_page_premium-addons li.current a[href="admin.php?page=premium-addons-pro"] {
34
- color:#1A7FC2;
35
- }
36
- #toplevel_page_premium-addons li.current a[href="admin.php?page=premium-addons-pro"]:hover {
37
- color:#1A7FC2;
38
}
1
+ @font-face {
2
+ font-family: 'pa-icon';
3
+ src: url('pa-icon.eot?uo4nkm');
4
+ src: url('pa-icon.eot?uo4nkm#iefix') format('embedded-opentype'),
5
+ url('pa-icon.ttf?uo4nkm') format('truetype'),
6
+ url('pa-icon.woff?uo4nkm') format('woff'),
7
+ url('pa-icon.svg?uo4nkm#pa-elements') format('svg');
8
+ font-weight: normal;
9
+ font-style: normal;
10
+ }
11
+ .toplevel_page_premium-addons > div.wp-menu-image::before {
12
+ position: relative;
13
+ top: 5px;
14
+ content: "\e900";
15
+ /* use !important to prevent issues with browser extensions that change fonts */
16
+ font-family: 'pa-icon' !important;
17
+ speak: none;
18
+ font-style: normal;
19
+ font-variant: normal;
20
+ text-transform: none;
21
+ line-height: 1;
22
+ /* Better Font Rendering =========== */
23
+ -webkit-font-smoothing: antialiased;
24
+ -moz-osx-font-smoothing: grayscale;
25
+ font-size: 21px;
26
+ }
27
+ #toplevel_page_premium-addons a[href="admin.php?page=premium-addons-pro"] {
28
+ color:#1A7FC2;
29
+ }
30
+ #toplevel_page_premium-addons a[href="admin.php?page=premium-addons-pro"]:hover {
31
+ color:#1A7FC2;
32
+ }
33
+ #toplevel_page_premium-addons li.current a[href="admin.php?page=premium-addons-pro"] {
34
+ color:#1A7FC2;
35
+ }
36
+ #toplevel_page_premium-addons li.current a[href="admin.php?page=premium-addons-pro"]:hover {
37
+ color:#1A7FC2;
38
}
admin/assets/js/admin.js CHANGED
@@ -1,134 +1,134 @@
1
- ( function ( $ ) {
2
-
3
- var redirectionLink = " https://premiumaddons.com/pro/?utm_source=wp-menu&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=";
4
- "use strict";
5
-
6
- $(".pa-checkbox").on("click", function() {
7
- if($(this).prop("checked") == true) {
8
- $(".pa-elements-table input").prop("checked", 1);
9
- }else if($(this).prop("checked") == false){
10
- $(".pa-elements-table input").prop("checked", 0);
11
- }
12
- });
13
-
14
- $(".pro-slider").on('click', function(){
15
-
16
- swal({
17
- title: '<span class="pa-swal-head">Get PRO Widgets & Addons<span>',
18
- html: 'Supercharge your Elementor with PRO widgets and addons that you won’t find anywhere else.',
19
- type: 'warning',
20
- showCloseButton: true,
21
- showCancelButton: true,
22
- cancelButtonText: "More Info",
23
- focusConfirm: true
24
- }).then(function(json_data) {}, function(dismiss) {
25
- if (dismiss === 'cancel') {
26
- window.open( redirectionLink + settings.theme, '_blank' );
27
- }
28
- });
29
- });
30
-
31
- $( 'form#pa-settings' ).on( 'submit', function(e) {
32
- e.preventDefault();
33
- $.ajax( {
34
- url: settings.ajaxurl,
35
- type: 'post',
36
- data: {
37
- action: 'pa_save_admin_addons_settings',
38
- security: settings.nonce,
39
- fields: $( 'form#pa-settings' ).serialize(),
40
- },
41
- success: function( response ) {
42
- swal(
43
- 'Settings Saved!',
44
- 'Click OK to continue',
45
- 'success'
46
- );
47
- },
48
- error: function() {
49
- swal(
50
- 'Oops...',
51
- 'Something Wrong!',
52
- );
53
- }
54
- } );
55
-
56
- } );
57
-
58
- $('form#pa-maps').on('submit',function(e){
59
- e.preventDefault();
60
- $.ajax( {
61
- url: settings.ajaxurl,
62
- type: 'post',
63
- data: {
64
- action: 'pa_maps_save_settings',
65
- security: settings.nonce,
66
- fields: $('form#pa-maps').serialize(),
67
- },
68
- success: function (response){
69
- swal(
70
- 'Settings Saved!',
71
- 'Click OK to continue',
72
- 'success'
73
- );
74
- },
75
- error: function(){
76
- swal(
77
- 'Oops...',
78
- 'Something Wrong!',
79
- );
80
- }
81
- });
82
- });
83
-
84
-
85
- $('form#pa-beta-form').on('submit',function(e){
86
- e.preventDefault();
87
- $.ajax( {
88
- url: settings.ajaxurl,
89
- type: 'post',
90
- data: {
91
- action: 'pa_beta_save_settings',
92
- security: settings.nonce,
93
- fields: $('form#pa-beta-form').serialize(),
94
- },
95
- success: function (response){
96
- swal(
97
- 'Settings Saved!',
98
- 'Click OK to continue',
99
- 'success'
100
- );
101
- },
102
- error: function(){
103
- swal(
104
- 'Oops...',
105
- 'Something Wrong!',
106
- );
107
- }
108
- });
109
- });
110
-
111
-
112
-
113
- $( '.pa-rollback-button' ).on( 'click', function( event ) {
114
- event.preventDefault();
115
-
116
- var $this = $( this ),
117
- dialogsManager = new DialogsManager.Instance();
118
-
119
- dialogsManager.createWidget( 'confirm', {
120
- headerMessage: premiumRollBackConfirm.i18n.rollback_to_previous_version,
121
- message: premiumRollBackConfirm.i18n.rollback_confirm,
122
- strings: {
123
- cancel: premiumRollBackConfirm.i18n.cancel,
124
- confirm: premiumRollBackConfirm.i18n.yes,
125
- },
126
- onConfirm: function() {
127
- $this.addClass( 'loading' );
128
-
129
- location.href = $this.attr( 'href' );
130
- }
131
- } ).show();
132
- } );
133
-
134
} )(jQuery);
1
+ ( function ( $ ) {
2
+
3
+ var redirectionLink = " https://premiumaddons.com/pro/?utm_source=wp-menu&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=";
4
+ "use strict";
5
+
6
+ $(".pa-checkbox").on("click", function() {
7
+ if($(this).prop("checked") == true) {
8
+ $(".pa-elements-table input").prop("checked", 1);
9
+ }else if($(this).prop("checked") == false){
10
+ $(".pa-elements-table input").prop("checked", 0);
11
+ }
12
+ });
13
+
14
+ $(".pro-slider").on('click', function(){
15
+
16
+ swal({
17
+ title: '<span class="pa-swal-head">Get PRO Widgets & Addons<span>',
18
+ html: 'Supercharge your Elementor with PRO widgets and addons that you won’t find anywhere else.',
19
+ type: 'warning',
20
+ showCloseButton: true,
21
+ showCancelButton: true,
22
+ cancelButtonText: "More Info",
23
+ focusConfirm: true
24
+ }).then(function(json_data) {}, function(dismiss) {
25
+ if (dismiss === 'cancel') {
26
+ window.open( redirectionLink + settings.theme, '_blank' );
27
+ }
28
+ });
29
+ });
30
+
31
+ $( 'form#pa-settings' ).on( 'submit', function(e) {
32
+ e.preventDefault();
33
+ $.ajax( {
34
+ url: settings.ajaxurl,
35
+ type: 'post',
36
+ data: {
37
+ action: 'pa_save_admin_addons_settings',
38
+ security: settings.nonce,
39
+ fields: $( 'form#pa-settings' ).serialize(),
40
+ },
41
+ success: function( response ) {
42
+ swal(
43
+ 'Settings Saved!',
44
+ 'Click OK to continue',
45
+ 'success'
46
+ );
47
+ },
48
+ error: function() {
49
+ swal(
50
+ 'Oops...',
51
+ 'Something Wrong!',
52
+ );
53
+ }
54
+ } );
55
+
56
+ } );
57
+
58
+ $('form#pa-maps').on('submit',function(e){
59
+ e.preventDefault();
60
+ $.ajax( {
61
+ url: settings.ajaxurl,
62
+ type: 'post',
63
+ data: {
64
+ action: 'pa_maps_save_settings',
65
+ security: settings.nonce,
66
+ fields: $('form#pa-maps').serialize(),
67
+ },
68
+ success: function (response){
69
+ swal(
70
+ 'Settings Saved!',
71
+ 'Click OK to continue',
72
+ 'success'
73
+ );
74
+ },
75
+ error: function(){
76
+ swal(
77
+ 'Oops...',
78
+ 'Something Wrong!',
79
+ );
80
+ }
81
+ });
82
+ });
83
+
84
+
85
+ $('form#pa-beta-form').on('submit',function(e){
86
+ e.preventDefault();
87
+ $.ajax( {
88
+ url: settings.ajaxurl,
89
+ type: 'post',
90
+ data: {
91
+ action: 'pa_beta_save_settings',
92
+ security: settings.nonce,
93
+ fields: $('form#pa-beta-form').serialize(),
94
+ },
95
+ success: function (response){
96
+ swal(
97
+ 'Settings Saved!',
98
+ 'Click OK to continue',
99
+ 'success'
100
+ );
101
+ },
102
+ error: function(){
103
+ swal(
104
+ 'Oops...',
105
+ 'Something Wrong!',
106
+ );
107
+ }
108
+ });
109
+ });
110
+
111
+
112
+
113
+ $( '.pa-rollback-button' ).on( 'click', function( event ) {
114
+ event.preventDefault();
115
+
116
+ var $this = $( this ),
117
+ dialogsManager = new DialogsManager.Instance();
118
+
119
+ dialogsManager.createWidget( 'confirm', {
120
+ headerMessage: premiumRollBackConfirm.i18n.rollback_to_previous_version,
121
+ message: premiumRollBackConfirm.i18n.rollback_confirm,
122
+ strings: {
123
+ cancel: premiumRollBackConfirm.i18n.cancel,
124
+ confirm: premiumRollBackConfirm.i18n.yes,
125
+ },
126
+ onConfirm: function() {
127
+ $this.addClass( 'loading' );
128
+
129
+ location.href = $this.attr( 'href' );
130
+ }
131
+ } ).show();
132
+ } );
133
+
134
} )(jQuery);
admin/assets/js/dialog/dialog.js CHANGED
@@ -1,830 +1,830 @@
1
- /*!
2
- * Dialogs Manager v4.2.1
3
- * https://github.com/kobizz/dialogs-manager
4
- *
5
- * Copyright Kobi Zaltzberg
6
- * Released under the MIT license
7
- * https://github.com/kobizz/dialogs-manager/blob/master/LICENSE.txt
8
- */
9
-
10
- (function ($, global) {
11
- 'use strict';
12
-
13
- /*
14
- * Dialog Manager
15
- */
16
- var DialogsManager = {
17
- widgetsTypes: {},
18
- createWidgetType: function (typeName, properties, Parent) {
19
-
20
- if (!Parent) {
21
- Parent = this.Widget;
22
- }
23
-
24
- var WidgetType = function () {
25
-
26
- Parent.apply(this, arguments);
27
- };
28
-
29
- var prototype = WidgetType.prototype = new Parent(typeName);
30
-
31
- prototype.types = prototype.types.concat([typeName]);
32
-
33
- $.extend(prototype, properties);
34
-
35
- prototype.constructor = WidgetType;
36
-
37
- WidgetType.extend = function (typeName, properties) {
38
-
39
- return DialogsManager.createWidgetType(typeName, properties, WidgetType);
40
- };
41
-
42
- return WidgetType;
43
- },
44
- addWidgetType: function (typeName, properties, Parent) {
45
-
46
- if (properties && properties.prototype instanceof this.Widget) {
47
- return this.widgetsTypes[typeName] = properties;
48
- }
49
-
50
- return this.widgetsTypes[typeName] = this.createWidgetType(typeName, properties, Parent);
51
- },
52
- getWidgetType: function (widgetType) {
53
-
54
- return this.widgetsTypes[widgetType];
55
- }
56
- };
57
-
58
- /*
59
- * Dialog Manager instances constructor
60
- */
61
- DialogsManager.Instance = function () {
62
-
63
- var self = this,
64
- elements = {},
65
- settings = {};
66
-
67
- var initElements = function () {
68
-
69
- elements.body = $('body');
70
- };
71
-
72
- var initSettings = function (options) {
73
-
74
- var defaultSettings = {
75
- classPrefix: 'dialog',
76
- effects: {
77
- show: 'fadeIn',
78
- hide: 'fadeOut'
79
- }
80
- };
81
-
82
- $.extend(settings, defaultSettings, options);
83
- };
84
-
85
- this.createWidget = function (widgetType, properties) {
86
-
87
- var WidgetTypeConstructor = DialogsManager.getWidgetType(widgetType),
88
- widget = new WidgetTypeConstructor(widgetType);
89
-
90
- properties = properties || {};
91
-
92
- widget.init(self, properties);
93
-
94
- widget.setMessage(properties.message);
95
-
96
- return widget;
97
- };
98
-
99
- this.getSettings = function (property) {
100
-
101
- if (property) {
102
- return settings[property];
103
- }
104
-
105
- return Object.create(settings);
106
- };
107
-
108
- this.init = function (settings) {
109
-
110
- initSettings(settings);
111
-
112
- initElements();
113
-
114
- return self;
115
- };
116
-
117
- self.init();
118
- };
119
-
120
- /*
121
- * Widget types constructor
122
- */
123
- DialogsManager.Widget = function (widgetName) {
124
-
125
- var self = this,
126
- settings = {},
127
- events = {},
128
- elements = {},
129
- hideTimeOut = 0,
130
- baseClosureMethods = ['refreshPosition'];
131
-
132
- var bindEvents = function () {
133
-
134
- elements.window.on('keyup', onWindowKeyUp);
135
-
136
- if (settings.hide.onOutsideClick) {
137
- elements.window[0].addEventListener('click', hideOnOutsideClick, true);
138
- }
139
-
140
- if (settings.hide.onClick || settings.hide.onBackgroundClick) {
141
- elements.widget.on('click', hideOnClick);
142
- }
143
-
144
- if (settings.position.autoRefresh) {
145
- elements.window.on('resize', self.refreshPosition);
146
- }
147
- };
148
-
149
- var callEffect = function (intent, params) {
150
-
151
- var effect = settings.effects[intent],
152
- $widget = elements.widget;
153
-
154
- if ($.isFunction(effect)) {
155
- effect.apply($widget, params);
156
- }
157
- else {
158
-
159
- if ($widget[effect]) {
160
- $widget[effect].apply($widget, params);
161
- }
162
- else {
163
- throw 'Reference Error: The effect ' + effect + ' not found';
164
- }
165
- }
166
- };
167
-
168
- var ensureClosureMethods = function() {
169
-
170
- var closureMethodsNames = baseClosureMethods.concat(self.getClosureMethods());
171
-
172
- $.each(closureMethodsNames, function () {
173
-
174
- var methodName = this,
175
- oldMethod = self[methodName];
176
-
177
- self[methodName] = function () {
178
-
179
- oldMethod.apply(self, arguments);
180
- };
181
- });
182
- };
183
-
184
- var initElements = function () {
185
-
186
- self.addElement('widget');
187
-
188
- self.addElement('message');
189
-
190
- self.addElement('window', window);
191
-
192
- self.addElement('container', settings.container);
193
-
194
- var id = self.getSettings('id');
195
-
196
- if (id) {
197
- self.setID(id);
198
- }
199
-
200
- var classes = [];
201
-
202
- $.each(self.types, function() {
203
- classes.push(settings.classes.globalPrefix + '-type-' + this);
204
- });
205
-
206
- classes.push(self.getSettings('className'));
207
-
208
- self.getElements('widget').addClass(classes.join(' '));
209
- };
210
-
211
- var initSettings = function (parent, userSettings) {
212
-
213
- var parentSettings = $.extend(true, {}, parent.getSettings());
214
-
215
- settings = {
216
- effects: parentSettings.effects,
217
- classes: {
218
- globalPrefix: parentSettings.classPrefix,
219
- prefix: parentSettings.classPrefix + '-' + widgetName
220
- },
221
- selectors: {
222
- preventClose: '.' + parentSettings.classPrefix + '-prevent-close'
223
- },
224
- container: 'body',
225
- position: {
226
- element: 'widget',
227
- my: 'center',
228
- at: 'center',
229
- of: 'container',
230
- enable: true,
231
- autoRefresh: false
232
- },
233
- hide: {
234
- auto: false,
235
- autoDelay: 5000,
236
- onClick: false,
237
- onOutsideClick: true,
238
- onBackgroundClick: true
239
- }
240
- };
241
-
242
- $.extend(true, settings, self.getDefaultSettings(), userSettings);
243
-
244
- initSettingsEvents();
245
- };
246
-
247
- var initSettingsEvents = function () {
248
-
249
- $.each(settings, function (settingKey) {
250
-
251
- var eventName = settingKey.match(/^on([A-Z].*)/);
252
-
253
- if (!eventName) {
254
- return;
255
- }
256
-
257
- eventName = eventName[1].charAt(0).toLowerCase() + eventName[1].slice(1);
258
-
259
- self.on(eventName, this);
260
- });
261
- };
262
-
263
- var normalizeClassName = function (name) {
264
-
265
- return name.replace(/([a-z])([A-Z])/g, function () {
266
-
267
- return arguments[1] + '-' + arguments[2].toLowerCase();
268
- });
269
- };
270
-
271
- var hideOnClick = function(event) {
272
-
273
- if (settings.hide.onClick) {
274
-
275
- if ($(event.target).closest(settings.selectors.preventClose).length) {
276
- return;
277
- }
278
- } else if (event.target !== this) {
279
- return;
280
- }
281
-
282
- self.hide();
283
- };
284
-
285
- var hideOnOutsideClick = function(event) {
286
- if ($(event.target).closest(elements.widget).length) {
287
- return;
288
- }
289
-
290
- self.hide();
291
- };
292
-
293
- var onWindowKeyUp = function(event) {
294
- var ESC_KEY = 27,
295
- keyCode = event.which;
296
-
297
- if (ESC_KEY === keyCode) {
298
- self.hide();
299
- }
300
- };
301
-
302
- var unbindEvents = function() {
303
-
304
- elements.window.off('keyup', onWindowKeyUp);
305
-
306
- if (settings.hide.onOutsideClick) {
307
- elements.window[0].removeEventListener('click', hideOnOutsideClick, true);
308
- }
309
-
310
- if (settings.hide.onClick || settings.hide.onBackgroundClick) {
311
- elements.widget.off('click', hideOnClick);
312
- }
313
-
314
- if (settings.position.autoRefresh) {
315
- elements.window.off('resize', self.refreshPosition);
316
- }
317
- };
318
-
319
- this.addElement = function (name, element, type) {
320
-
321
- var $newElement = elements[name] = $(element || '<div>'),
322
- normalizedName = normalizeClassName(name),
323
- className = [];
324
-
325
- if (type) {
326
- className.push(settings.classes.globalPrefix + '-' + type);
327
- }
328
-
329
- className.push(settings.classes.globalPrefix + '-' + normalizedName);
330
-
331
- className.push(settings.classes.prefix + '-' + normalizedName);
332
-
333
- $newElement.addClass(className.join(' '));
334
-
335
- return $newElement;
336
- };
337
-
338
- this.getSettings = function (setting) {
339
-
340
- var copy = Object.create(settings);
341
-
342
- if (setting) {
343
- return copy[setting];
344
- }
345
-
346
- return copy;
347
- };
348
-
349
- this.init = function (parent, properties) {
350
-
351
- if (!(parent instanceof DialogsManager.Instance)) {
352
- throw 'The ' + self.widgetName + ' must to be initialized from an instance of DialogsManager.Instance';
353
- }
354
-
355
- ensureClosureMethods();
356
-
357
- self.trigger('init', properties);
358
-
359
- initSettings(parent, properties);
360
-
361
- initElements();
362
-
363
- self.buildWidget();
364
-
365
- if (self.attachEvents) {
366
- self.attachEvents();
367
- }
368
-
369
- self.trigger('ready');
370
-
371
- return self;
372
- };
373
-
374
- this.getElements = function (item) {
375
-
376
- return item ? elements[item] : elements;
377
- };
378
-
379
- this.hide = function () {
380
-
381
- clearTimeout(hideTimeOut);
382
-
383
- callEffect('hide', arguments);
384
-
385
- unbindEvents();
386
-
387
- self.trigger('hide');
388
-
389
- return self;
390
- };
391
-
392
- this.isVisible = function() {
393
-
394
- return elements.widget.is(':visible');
395
- };
396
-
397
- this.on = function (eventName, callback) {
398
-
399
- if ('object' === typeof eventName) {
400
- $.each(eventName, function(singleEventName) {
401
- self.on(singleEventName, this);
402
- });
403
-
404
- return self;
405
- }
406
-
407
- var eventNames = eventName.split(' ');
408
-
409
- eventNames.forEach(function(singleEventName) {
410
- if (! events[singleEventName]) {
411
- events[singleEventName] = [];
412
- }
413
-
414
- events[singleEventName].push(callback);
415
- });
416
-
417
- return self;
418
- };
419
-
420
- this.setMessage = function (message) {
421
-
422
- elements.message.html(message);
423
-
424
- return self;
425
- };
426
-
427
- this.setID = function (id) {
428
-
429
- self.getElements('widget').attr('id', id);
430
-
431
- return self;
432
- };
433
-
434
- this.setSettings = function(key, value) {
435
-
436
- if ('object' === typeof value) {
437
- $.extend(true, settings[key], value);
438
- } else {
439
- settings[key] = value;
440
- }
441
-
442
- return self;
443
- };
444
-
445
- this.show = function () {
446
-
447
- clearTimeout(hideTimeOut);
448
-
449
- elements.widget.appendTo(elements.container).hide();
450
-
451
- callEffect('show', arguments);
452
-
453
- self.refreshPosition();
454
-
455
- if (settings.hide.auto) {
456
- hideTimeOut = setTimeout(self.hide, settings.hide.autoDelay);
457
- }
458
-
459
- bindEvents();
460
-
461
- self.trigger('show');
462
-
463
- return self;
464
- };
465
-
466
- this.refreshPosition = function () {
467
-
468
- if (! settings.position.enable) {
469
- return;
470
- }
471
-
472
- var position = $.extend({}, settings.position);
473
-
474
- if (elements[position.of]) {
475
- position.of = elements[position.of];
476
- }
477
-
478
- elements[position.element].position(position);
479
- };
480
-
481
- this.trigger = function (eventName, params) {
482
-
483
- var methodName = 'on' + eventName[0].toUpperCase() + eventName.slice(1);
484
-
485
- if (self[methodName]) {
486
- self[methodName](params);
487
- }
488
-
489
- var callbacks = events[eventName];
490
-
491
- if (!callbacks) {
492
- return;
493
- }
494
-
495
- $.each(callbacks, function (index, callback) {
496
-
497
- callback.call(self, params);
498
- });
499
-
500
- return self;
501
- };
502
-
503
- this.destroy = function() {
504
-
505
- unbindEvents();
506
-
507
- elements.widget.remove();
508
-
509
- self.trigger('destroy');
510
-
511
- return self;
512
- };
513
- };
514
-
515
- DialogsManager.Widget.prototype.types = [];
516
-
517
- // Inheritable widget methods
518
- DialogsManager.Widget.prototype.buildWidget = function () {
519
-
520
- var elements = this.getElements();
521
-
522
- elements.widget.html(elements.message);
523
- };
524
-
525
- DialogsManager.Widget.prototype.getDefaultSettings = function () {
526
-
527
- return {};
528
- };
529
-
530
- DialogsManager.Widget.prototype.getClosureMethods = function() {
531
-
532
- return [];
533
- };
534
-
535
- DialogsManager.Widget.prototype.onHide = function () {
536
- };
537
-
538
- DialogsManager.Widget.prototype.onShow = function () {
539
- };
540
-
541
- DialogsManager.Widget.prototype.onInit = function () {
542
- };
543
-
544
- DialogsManager.Widget.prototype.onReady = function () {
545
- };
546
-
547
- DialogsManager.widgetsTypes.simple = DialogsManager.Widget;
548
-
549
- DialogsManager.addWidgetType('buttons', {
550
- activeKeyUp: function (event) {
551
-
552
- var TAB_KEY = 9;
553
-
554
- if (event.which === TAB_KEY) {
555
- event.preventDefault();
556
- }
557
-
558
- if (this.hotKeys[event.which]) {
559
- this.hotKeys[event.which](this);
560
- }
561
- },
562
- activeKeyDown: function (event) {
563
-
564
- var TAB_KEY = 9;
565
-
566
- if (event.which === TAB_KEY) {
567
- event.preventDefault();
568
-
569
- var currentButtonIndex = this.focusedButton.index(),
570
- nextButtonIndex;
571
-
572
- if (event.shiftKey) {
573
-
574
- nextButtonIndex = currentButtonIndex - 1;
575
-
576
- if (nextButtonIndex < 0) {
577
- nextButtonIndex = this.buttons.length - 1;
578
- }
579
- } else {
580
-
581
- nextButtonIndex = currentButtonIndex + 1;
582
-
583
- if (nextButtonIndex >= this.buttons.length) {
584
- nextButtonIndex = 0;
585
- }
586
- }
587
-
588
- this.focusedButton = this.buttons[nextButtonIndex].focus();
589
- }
590
- },
591
- addButton: function (options) {
592
-
593
- var self = this,
594
- $button = self.addElement(options.name, $('<' + this.getSettings('buttonTag') + '>').text(options.text), 'button');
595
-
596
- self.buttons.push($button);
597
-
598
- var buttonFn = function () {
599
-
600
- if (self.getSettings('hide').onButtonClick) {
601
- self.hide();
602
- }
603
-
604
- if ($.isFunction(options.callback)) {
605
- options.callback.call(this, self);
606
- }
607
- };
608
-
609
- $button.on('click', buttonFn);
610
-
611
- if (options.hotKey) {
612
- this.hotKeys[options.hotKey] = buttonFn;
613
- }
614
-
615
- this.getElements('buttonsWrapper').append($button);
616
-
617
- if (options.focus) {
618
- this.focusedButton = $button;
619
- }
620
-
621
- return self;
622
- },
623
- bindHotKeys: function () {
624
-
625
- this.getElements('window').on({
626
- keyup: this.activeKeyUp,
627
- keydown: this.activeKeyDown
628
- });
629
- },
630
- buildWidget: function () {
631
-
632
- DialogsManager.Widget.prototype.buildWidget.apply(this, arguments);
633
-
634
- var $buttonsWrapper = this.addElement('buttonsWrapper');
635
-
636
- this.getElements('widget').append($buttonsWrapper);
637
- },
638
- getClosureMethods: function () {
639
-
640
- return [
641
- 'activeKeyUp',
642
- 'activeKeyDown'
643
- ];
644
- },
645
- getDefaultSettings: function () {
646
-
647
- return {
648
- hide: {
649
- onButtonClick: true
650
- },
651
- buttonTag: 'button'
652
- };
653
- },
654
- onHide: function () {
655
-
656
- this.unbindHotKeys();
657
- },
658
- onInit: function () {
659
-
660
- this.buttons = [];
661
-
662
- this.hotKeys = {};
663
-
664
- this.focusedButton = null;
665
- },
666
- onShow: function () {
667
-
668
- this.bindHotKeys();
669
-
670
- if (!this.focusedButton) {
671
- this.focusedButton = this.buttons[0];
672
- }
673
-
674
- if (this.focusedButton) {
675
- this.focusedButton.focus();
676
- }
677
- },
678
- unbindHotKeys: function () {
679
-
680
- this.getElements('window').off({
681
- keyup: this.activeKeyUp,
682
- keydown: this.activeKeyDown
683
- });
684
- }
685
- });
686
-
687
- DialogsManager.addWidgetType('lightbox', DialogsManager.getWidgetType('buttons').extend('lightbox', {
688
- getDefaultSettings: function () {
689
-
690
- var settings = DialogsManager.getWidgetType('buttons').prototype.getDefaultSettings.apply(this, arguments);
691
-
692
- return $.extend(true, settings, {
693
- headerMessage: '',
694
- contentWidth: 'auto',
695
- contentHeight: 'auto',
696
- closeButton: false,
697
- closeButtonClass: 'fa fa-times',
698
- position: {
699
- element: 'widgetContent',
700
- of: 'widget',
701
- autoRefresh: true
702
- }
703
- });
704
- },
705
- buildWidget: function () {
706
-
707
- DialogsManager.getWidgetType('buttons').prototype.buildWidget.apply(this, arguments);
708
-
709
- var $widgetHeader = this.addElement('widgetHeader'),
710
- $widgetContent = this.addElement('widgetContent');
711
-
712
- var elements = this.getElements();
713
-
714
- $widgetContent.append($widgetHeader, elements.message, elements.buttonsWrapper);
715
-
716
- elements.widget.html($widgetContent);
717
-
718
- if (! this.getSettings('closeButton')) {
719
- return;
720
- }
721
-
722
- var $closeButton = this.addElement('closeButton', '<div><i class="' + this.getSettings('closeButtonClass') + '"></i></div>');
723
-
724
- $widgetContent.prepend($closeButton);
725
- },
726
- attachEvents: function() {
727
- if (this.getSettings('closeButton')) {
728
- this.getElements('closeButton').on('click', this.hide);
729
- }
730
- },
731
- onReady: function(){
732
-
733
- var elements = this.getElements(),
734
- settings = this.getSettings();
735
-
736
- if ('auto' !== settings.contentWidth) {
737
- elements.message.width(settings.contentWidth);
738
- }
739
-
740
- if ('auto' !== settings.contentHeight) {
741
- elements.message.height(settings.contentHeight);
742
- }
743
-
744
- this.setHeaderMessage(settings.headerMessage);
745
- },
746
- setHeaderMessage: function (message) {
747
-
748
- this.getElements('widgetHeader').html(message);
749
-
750
- return this;
751
- }
752
- }));
753
-
754
- DialogsManager.addWidgetType('confirm', DialogsManager.getWidgetType('lightbox').extend('confirm', {
755
- onReady: function () {
756
-
757
- DialogsManager.getWidgetType('lightbox').prototype.onReady.apply(this, arguments);
758
-
759
- var strings = this.getSettings('strings'),
760
- isDefaultCancel = this.getSettings('defaultOption') === 'cancel';
761
-
762
- this.addButton({
763
- name: 'cancel',
764
- text: strings.cancel,
765
- callback: function (widget) {
766
-
767
- widget.trigger('cancel');
768
- },
769
- focus: isDefaultCancel
770
- });
771
-
772
- this.addButton({
773
- name: 'ok',
774
- text: strings.confirm,
775
- callback: function (widget) {
776
-
777
- widget.trigger('confirm');
778
- },
779
- focus: !isDefaultCancel
780
- });
781
- },
782
- getDefaultSettings: function () {
783
-
784
- var settings = DialogsManager.getWidgetType('lightbox').prototype.getDefaultSettings.apply(this, arguments);
785
-
786
- settings.strings = {
787
- confirm: 'OK',
788
- cancel: 'Cancel'
789
- };
790
-
791
- settings.defaultOption = 'cancel';
792
-
793
- return settings;
794
- }
795
- }));
796
-
797
- DialogsManager.addWidgetType('alert', DialogsManager.getWidgetType('lightbox').extend('alert', {
798
- onReady: function () {
799
-
800
- DialogsManager.getWidgetType('lightbox').prototype.onReady.apply(this, arguments);
801
-
802
- var strings = this.getSettings('strings');
803
-
804
- this.addButton({
805
- name: 'ok',
806
- text: strings.confirm,
807
- callback: function (widget) {
808
-
809
- widget.trigger('confirm');
810
- }
811
- });
812
- },
813
- getDefaultSettings: function () {
814
-
815
- var settings = DialogsManager.getWidgetType('lightbox').prototype.getDefaultSettings.apply(this, arguments);
816
-
817
- settings.strings = {
818
- confirm: 'OK'
819
- };
820
-
821
- return settings;
822
- }
823
- }));
824
-
825
- // Exporting the DialogsManager variable to global
826
- global.DialogsManager = DialogsManager;
827
- })(
828
- typeof jQuery !== 'undefined' ? jQuery : typeof require === 'function' && require('jquery'),
829
- typeof module !== 'undefined' ? module.exports : window
830
- );
1
+ /*!
2
+ * Dialogs Manager v4.2.1
3
+ * https://github.com/kobizz/dialogs-manager
4
+ *
5
+ * Copyright Kobi Zaltzberg
6
+ * Released under the MIT license
7
+ * https://github.com/kobizz/dialogs-manager/blob/master/LICENSE.txt
8
+ */
9
+
10
+ (function ($, global) {
11
+ 'use strict';
12
+
13
+ /*
14
+ * Dialog Manager
15
+ */
16
+ var DialogsManager = {
17
+ widgetsTypes: {},
18
+ createWidgetType: function (typeName, properties, Parent) {
19
+
20
+ if (!Parent) {
21
+ Parent = this.Widget;
22
+ }
23
+
24
+ var WidgetType = function () {
25
+
26
+ Parent.apply(this, arguments);
27
+ };
28
+
29
+ var prototype = WidgetType.prototype = new Parent(typeName);
30
+
31
+ prototype.types = prototype.types.concat([typeName]);
32
+
33
+ $.extend(prototype, properties);
34
+
35
+ prototype.constructor = WidgetType;
36
+
37
+ WidgetType.extend = function (typeName, properties) {
38
+
39
+ return DialogsManager.createWidgetType(typeName, properties, WidgetType);
40
+ };
41
+
42
+ return WidgetType;
43
+ },
44
+ addWidgetType: function (typeName, properties, Parent) {
45
+
46
+ if (properties && properties.prototype instanceof this.Widget) {
47
+ return this.widgetsTypes[typeName] = properties;
48
+ }
49
+
50
+ return this.widgetsTypes[typeName] = this.createWidgetType(typeName, properties, Parent);
51
+ },
52
+ getWidgetType: function (widgetType) {
53
+
54
+ return this.widgetsTypes[widgetType];
55
+ }
56
+ };
57
+
58
+ /*
59
+ * Dialog Manager instances constructor
60
+ */
61
+ DialogsManager.Instance = function () {
62
+
63
+ var self = this,
64
+ elements = {},
65
+ settings = {};
66
+
67
+ var initElements = function () {
68
+
69
+ elements.body = $('body');
70
+ };
71
+
72
+ var initSettings = function (options) {
73
+
74
+ var defaultSettings = {
75
+ classPrefix: 'dialog',
76
+ effects: {
77
+ show: 'fadeIn',
78
+ hide: 'fadeOut'
79
+ }
80
+ };
81
+
82
+ $.extend(settings, defaultSettings, options);
83
+ };
84
+
85
+ this.createWidget = function (widgetType, properties) {
86
+
87
+ var WidgetTypeConstructor = DialogsManager.getWidgetType(widgetType),
88
+ widget = new WidgetTypeConstructor(widgetType);
89
+
90
+ properties = properties || {};
91
+
92
+ widget.init(self, properties);
93
+
94
+ widget.setMessage(properties.message);
95
+
96
+ return widget;
97
+ };
98
+
99
+ this.getSettings = function (property) {
100
+
101
+ if (property) {
102
+ return settings[property];
103
+ }
104
+
105
+ return Object.create(settings);
106
+ };
107
+
108
+ this.init = function (settings) {
109
+
110
+ initSettings(settings);
111
+
112
+ initElements();
113
+
114
+ return self;
115
+ };
116
+
117
+ self.init();
118
+ };
119
+
120
+ /*
121
+ * Widget types constructor
122
+ */
123
+ DialogsManager.Widget = function (widgetName) {
124
+
125
+ var self = this,
126
+ settings = {},
127
+ events = {},
128
+ elements = {},
129
+ hideTimeOut = 0,
130
+ baseClosureMethods = ['refreshPosition'];
131
+
132
+ var bindEvents = function () {
133
+
134
+ elements.window.on('keyup', onWindowKeyUp);
135
+
136
+ if (settings.hide.onOutsideClick) {
137
+ elements.window[0].addEventListener('click', hideOnOutsideClick, true);
138
+ }
139
+
140
+ if (settings.hide.onClick || settings.hide.onBackgroundClick) {
141
+ elements.widget.on('click', hideOnClick);
142
+ }
143
+
144
+ if (settings.position.autoRefresh) {
145
+ elements.window.on('resize', self.refreshPosition);
146
+ }
147
+ };
148
+
149
+ var callEffect = function (intent, params) {
150
+
151
+ var effect = settings.effects[intent],
152
+ $widget = elements.widget;
153
+
154
+ if ($.isFunction(effect)) {
155
+ effect.apply($widget, params);
156
+ }
157
+ else {
158
+
159
+ if ($widget[effect]) {
160
+ $widget[effect].apply($widget, params);
161
+ }
162
+ else {
163
+ throw 'Reference Error: The effect ' + effect + ' not found';
164
+ }
165
+ }
166
+ };
167
+
168
+ var ensureClosureMethods = function() {
169
+
170
+ var closureMethodsNames = baseClosureMethods.concat(self.getClosureMethods());
171
+
172
+ $.each(closureMethodsNames, function () {
173
+
174
+ var methodName = this,
175
+ oldMethod = self[methodName];
176
+
177
+ self[methodName] = function () {
178
+
179
+ oldMethod.apply(self, arguments);
180
+ };
181
+ });
182
+ };
183
+
184
+ var initElements = function () {
185
+
186
+ self.addElement('widget');
187
+
188
+ self.addElement('message');
189
+
190
+ self.addElement('window', window);
191
+
192
+ self.addElement('container', settings.container);
193
+
194
+ var id = self.getSettings('id');
195
+
196
+ if (id) {
197
+ self.setID(id);
198
+ }
199
+
200
+ var classes = [];
201
+
202
+ $.each(self.types, function() {
203
+ classes.push(settings.classes.globalPrefix + '-type-' + this);
204
+ });
205
+
206
+ classes.push(self.getSettings('className'));
207
+
208
+ self.getElements('widget').addClass(classes.join(' '));
209
+ };
210
+
211
+ var initSettings = function (parent, userSettings) {
212
+
213
+ var parentSettings = $.extend(true, {}, parent.getSettings());
214
+
215
+ settings = {
216
+ effects: parentSettings.effects,
217
+ classes: {
218
+ globalPrefix: parentSettings.classPrefix,
219
+ prefix: parentSettings.classPrefix + '-' + widgetName
220
+ },
221
+ selectors: {
222
+ preventClose: '.' + parentSettings.classPrefix + '-prevent-close'
223
+ },
224
+ container: 'body',
225
+ position: {
226
+ element: 'widget',
227
+ my: 'center',
228
+ at: 'center',
229
+ of: 'container',
230
+ enable: true,
231
+ autoRefresh: false
232
+ },
233
+ hide: {
234
+ auto: false,
235
+ autoDelay: 5000,
236
+ onClick: false,
237
+ onOutsideClick: true,
238
+ onBackgroundClick: true
239
+ }
240
+ };
241
+
242
+ $.extend(true, settings, self.getDefaultSettings(), userSettings);
243
+
244
+ initSettingsEvents();
245
+ };
246
+
247
+ var initSettingsEvents = function () {
248
+
249
+ $.each(settings, function (settingKey) {
250
+
251
+ var eventName = settingKey.match(/^on([A-Z].*)/);
252
+
253
+ if (!eventName) {
254
+ return;
255
+ }
256
+
257
+ eventName = eventName[1].charAt(0).toLowerCase() + eventName[1].slice(1);
258
+
259
+ self.on(eventName, this);
260
+ });
261
+ };
262
+
263
+ var normalizeClassName = function (name) {
264
+
265
+ return name.replace(/([a-z])([A-Z])/g, function () {
266
+
267
+ return arguments[1] + '-' + arguments[2].toLowerCase();
268
+ });
269
+ };
270
+
271
+ var hideOnClick = function(event) {
272
+
273
+ if (settings.hide.onClick) {
274
+
275
+ if ($(event.target).closest(settings.selectors.preventClose).length) {
276
+ return;
277
+ }
278
+ } else if (event.target !== this) {
279
+ return;
280
+ }
281
+
282
+ self.hide();
283
+ };
284
+
285
+ var hideOnOutsideClick = function(event) {
286
+ if ($(event.target).closest(elements.widget).length) {
287
+ return;
288
+ }
289
+
290
+ self.hide();
291
+ };
292
+
293
+ var onWindowKeyUp = function(event) {
294
+ var ESC_KEY = 27,
295
+ keyCode = event.which;
296
+
297
+ if (ESC_KEY === keyCode) {
298
+ self.hide();
299
+ }
300
+ };
301
+
302
+ var unbindEvents = function() {
303
+
304
+ elements.window.off('keyup', onWindowKeyUp);
305
+
306
+ if (settings.hide.onOutsideClick) {
307
+ elements.window[0].removeEventListener('click', hideOnOutsideClick, true);
308
+ }
309
+
310
+ if (settings.hide.onClick || settings.hide.onBackgroundClick) {
311
+ elements.widget.off('click', hideOnClick);
312
+ }
313
+
314
+ if (settings.position.autoRefresh) {
315
+ elements.window.off('resize', self.refreshPosition);
316
+ }
317
+ };
318
+
319
+ this.addElement = function (name, element, type) {
320
+
321
+ var $newElement = elements[name] = $(element || '<div>'),
322
+ normalizedName = normalizeClassName(name),
323
+ className = [];
324
+
325
+ if (type) {
326
+ className.push(settings.classes.globalPrefix + '-' + type);
327
+ }
328
+
329
+ className.push(settings.classes.globalPrefix + '-' + normalizedName);
330
+
331
+ className.push(settings.classes.prefix + '-' + normalizedName);
332
+
333
+ $newElement.addClass(className.join(' '));
334
+
335
+ return $newElement;
336
+ };
337
+
338
+ this.getSettings = function (setting) {
339
+
340
+ var copy = Object.create(settings);
341
+
342
+ if (setting) {
343
+ return copy[setting];
344
+ }
345
+
346
+ return copy;
347
+ };
348
+
349
+ this.init = function (parent, properties) {
350
+
351
+ if (!(parent instanceof DialogsManager.Instance)) {
352
+ throw 'The ' + self.widgetName + ' must to be initialized from an instance of DialogsManager.Instance';
353
+ }
354
+
355
+ ensureClosureMethods();
356
+
357
+ self.trigger('init', properties);
358
+
359
+ initSettings(parent, properties);
360
+
361
+ initElements();
362
+
363
+ self.buildWidget();
364
+
365
+ if (self.attachEvents) {
366
+ self.attachEvents();
367
+ }
368
+
369
+ self.trigger('ready');
370
+
371
+ return self;
372
+ };
373
+
374
+ this.getElements = function (item) {
375
+
376
+ return item ? elements[item] : elements;
377
+ };
378
+
379
+ this.hide = function () {
380
+
381
+ clearTimeout(hideTimeOut);
382
+
383
+ callEffect('hide', arguments);
384
+
385
+ unbindEvents();
386
+
387
+ self.trigger('hide');
388
+
389
+ return self;
390
+ };
391
+
392
+ this.isVisible = function() {
393
+
394
+ return elements.widget.is(':visible');
395
+ };
396
+
397
+ this.on = function (eventName, callback) {
398
+
399
+ if ('object' === typeof eventName) {
400
+ $.each(eventName, function(singleEventName) {
401
+ self.on(singleEventName, this);
402
+ });
403
+
404
+ return self;
405
+ }
406
+
407
+ var eventNames = eventName.split(' ');
408
+
409
+ eventNames.forEach(function(singleEventName) {
410
+ if (! events[singleEventName]) {
411
+ events[singleEventName] = [];
412
+ }
413
+
414
+ events[singleEventName].push(callback);
415
+ });
416
+
417
+ return self;
418
+ };
419
+
420
+ this.setMessage = function (message) {
421
+
422
+ elements.message.html(message);
423
+
424
+ return self;
425
+ };
426
+
427
+ this.setID = function (id) {
428
+
429
+ self.getElements('widget').attr('id', id);
430
+
431
+ return self;
432
+ };
433
+
434
+ this.setSettings = function(key, value) {
435
+
436
+ if ('object' === typeof value) {
437
+ $.extend(true, settings[key], value);
438
+ } else {
439
+ settings[key] = value;
440
+ }
441
+
442
+ return self;
443
+ };
444
+
445
+ this.show = function () {
446
+
447
+ clearTimeout(hideTimeOut);
448
+
449
+ elements.widget.appendTo(elements.container).hide();
450
+
451
+ callEffect('show', arguments);
452
+
453
+ self.refreshPosition();
454
+
455
+ if (settings.hide.auto) {
456
+ hideTimeOut = setTimeout(self.hide, settings.hide.autoDelay);
457
+ }
458
+
459
+ bindEvents();
460
+
461
+ self.trigger('show');
462
+
463
+ return self;
464
+ };
465
+
466
+ this.refreshPosition = function () {
467
+
468
+ if (! settings.position.enable) {
469
+ return;
470
+ }
471
+
472
+ var position = $.extend({}, settings.position);
473
+
474
+ if (elements[position.of]) {
475
+ position.of = elements[position.of];
476
+ }
477
+
478
+ elements[position.element].position(position);
479
+ };
480
+
481
+ this.trigger = function (eventName, params) {
482
+
483
+ var methodName = 'on' + eventName[0].toUpperCase() + eventName.slice(1);
484
+
485
+ if (self[methodName]) {
486
+ self[methodName](params);
487
+ }
488
+
489
+ var callbacks = events[eventName];
490
+
491
+ if (!callbacks) {
492
+ return;
493
+ }
494
+
495
+ $.each(callbacks, function (index, callback) {
496
+
497
+ callback.call(self, params);
498
+ });
499
+
500
+ return self;
501
+ };
502
+
503
+ this.destroy = function() {
504
+
505
+ unbindEvents();
506
+
507
+ elements.widget.remove();
508
+
509
+ self.trigger('destroy');
510
+
511
+ return self;
512
+ };
513
+ };
514
+
515
+ DialogsManager.Widget.prototype.types = [];
516
+
517
+ // Inheritable widget methods
518
+ DialogsManager.Widget.prototype.buildWidget = function () {
519
+
520
+ var elements = this.getElements();
521
+
522
+ elements.widget.html(elements.message);
523
+ };
524
+
525
+ DialogsManager.Widget.prototype.getDefaultSettings = function () {
526
+
527
+ return {};
528
+ };
529
+
530
+ DialogsManager.Widget.prototype.getClosureMethods = function() {
531
+
532
+ return [];
533
+ };
534
+
535
+ DialogsManager.Widget.prototype.onHide = function () {
536
+ };
537
+
538
+ DialogsManager.Widget.prototype.onShow = function () {
539
+ };
540
+
541
+ DialogsManager.Widget.prototype.onInit = function () {
542
+ };
543
+
544
+ DialogsManager.Widget.prototype.onReady = function () {
545
+ };
546
+
547
+ DialogsManager.widgetsTypes.simple = DialogsManager.Widget;
548
+
549
+ DialogsManager.addWidgetType('buttons', {
550
+ activeKeyUp: function (event) {
551
+
552
+ var TAB_KEY = 9;
553
+
554
+ if (event.which === TAB_KEY) {
555
+ event.preventDefault();
556
+ }
557
+
558
+ if (this.hotKeys[event.which]) {
559
+ this.hotKeys[event.which](this);
560
+ }
561
+ },
562
+ activeKeyDown: function (event) {
563
+
564
+ var TAB_KEY = 9;
565
+
566
+ if (event.which === TAB_KEY) {
567
+ event.preventDefault();
568
+
569
+ var currentButtonIndex = this.focusedButton.index(),
570
+ nextButtonIndex;
571
+
572
+ if (event.shiftKey) {
573
+
574
+ nextButtonIndex = currentButtonIndex - 1;
575
+
576
+ if (nextButtonIndex < 0) {
577
+ nextButtonIndex = this.buttons.length - 1;
578
+ }
579
+ } else {
580
+
581
+ nextButtonIndex = currentButtonIndex + 1;
582
+
583
+ if (nextButtonIndex >= this.buttons.length) {
584
+ nextButtonIndex = 0;
585
+ }
586
+ }
587
+
588
+ this.focusedButton = this.buttons[nextButtonIndex].focus();
589
+ }
590
+ },
591
+ addButton: function (options) {
592
+
593
+ var self = this,
594
+ $button = self.addElement(options.name, $('<' + this.getSettings('buttonTag') + '>').text(options.text), 'button');
595
+
596
+ self.buttons.push($button);
597
+
598
+ var buttonFn = function () {
599
+
600
+ if (self.getSettings('hide').onButtonClick) {
601
+ self.hide();
602
+ }
603
+
604
+ if ($.isFunction(options.callback)) {
605
+ options.callback.call(this, self);
606
+ }
607
+ };
608
+
609
+ $button.on('click', buttonFn);
610
+
611
+ if (options.hotKey) {
612
+ this.hotKeys[options.hotKey] = buttonFn;
613
+ }
614
+
615
+ this.getElements('buttonsWrapper').append($button);
616
+
617
+ if (options.focus) {
618
+ this.focusedButton = $button;
619
+ }
620
+
621
+ return self;
622
+ },
623
+ bindHotKeys: function () {
624
+
625
+ this.getElements('window').on({
626
+ keyup: this.activeKeyUp,
627
+ keydown: this.activeKeyDown
628
+ });
629
+ },
630
+ buildWidget: function () {
631
+
632
+ DialogsManager.Widget.prototype.buildWidget.apply(this, arguments);
633
+
634
+ var $buttonsWrapper = this.addElement('buttonsWrapper');
635
+
636
+ this.getElements('widget').append($buttonsWrapper);
637
+ },
638
+ getClosureMethods: function () {
639
+
640
+ return [
641
+ 'activeKeyUp',
642
+ 'activeKeyDown'
643
+ ];
644
+ },
645
+ getDefaultSettings: function () {
646
+
647
+ return {
648
+ hide: {
649
+ onButtonClick: true
650
+ },
651
+ buttonTag: 'button'
652
+ };
653
+ },
654
+ onHide: function () {
655
+
656
+ this.unbindHotKeys();
657
+ },
658
+ onInit: function () {
659
+
660
+ this.buttons = [];
661
+
662
+ this.hotKeys = {};
663
+
664
+ this.focusedButton = null;
665
+ },
666
+ onShow: function () {
667
+
668
+ this.bindHotKeys();
669
+
670
+ if (!this.focusedButton) {
671
+ this.focusedButton = this.buttons[0];
672
+ }
673
+
674
+ if (this.focusedButton) {
675
+ this.focusedButton.focus();
676
+ }
677
+ },
678
+ unbindHotKeys: function () {
679
+
680
+ this.getElements('window').off({
681
+ keyup: this.activeKeyUp,
682
+ keydown: this.activeKeyDown
683
+ });
684
+ }
685
+ });
686
+
687
+ DialogsManager.addWidgetType('lightbox', DialogsManager.getWidgetType('buttons').extend('lightbox', {
688
+ getDefaultSettings: function () {
689
+
690
+ var settings = DialogsManager.getWidgetType('buttons').prototype.getDefaultSettings.apply(this, arguments);
691
+
692
+ return $.extend(true, settings, {
693
+ headerMessage: '',
694
+ contentWidth: 'auto',
695
+ contentHeight: 'auto',
696
+ closeButton: false,
697
+ closeButtonClass: 'fa fa-times',
698
+ position: {
699
+ element: 'widgetContent',
700
+ of: 'widget',
701
+ autoRefresh: true
702
+ }
703
+ });
704
+ },
705
+ buildWidget: function () {
706
+
707
+ DialogsManager.getWidgetType('buttons').prototype.buildWidget.apply(this, arguments);
708
+
709
+ var $widgetHeader = this.addElement('widgetHeader'),
710
+ $widgetContent = this.addElement('widgetContent');
711
+
712
+ var elements = this.getElements();
713
+
714
+ $widgetContent.append($widgetHeader, elements.message, elements.buttonsWrapper);
715
+
716
+ elements.widget.html($widgetContent);
717
+
718
+ if (! this.getSettings('closeButton')) {
719
+ return;
720
+ }
721
+
722
+ var $closeButton = this.addElement('closeButton', '<div><i class="' + this.getSettings('closeButtonClass') + '"></i></div>');
723
+
724
+ $widgetContent.prepend($closeButton);
725
+ },
726
+ attachEvents: function() {
727
+ if (this.getSettings('closeButton')) {
728
+ this.getElements('closeButton').on('click', this.hide);
729
+ }
730
+ },
731
+ onReady: function(){
732
+
733
+ var elements = this.getElements(),
734
+ settings = this.getSettings();
735
+
736
+ if ('auto' !== settings.contentWidth) {
737
+ elements.message.width(settings.contentWidth);
738
+ }
739
+
740
+ if ('auto' !== settings.contentHeight) {
741
+ elements.message.height(settings.contentHeight);
742
+ }
743
+
744
+ this.setHeaderMessage(settings.headerMessage);
745
+ },
746
+ setHeaderMessage: function (message) {
747
+
748
+ this.getElements('widgetHeader').html(message);
749
+
750
+ return this;
751
+ }
752
+ }));
753
+
754
+ DialogsManager.addWidgetType('confirm', DialogsManager.getWidgetType('lightbox').extend('confirm', {
755
+ onReady: function () {
756
+
757
+ DialogsManager.getWidgetType('lightbox').prototype.onReady.apply(this, arguments);
758
+
759
+ var strings = this.getSettings('strings'),
760
+ isDefaultCancel = this.getSettings('defaultOption') === 'cancel';
761
+
762
+ this.addButton({
763
+ name: 'cancel',
764
+ text: strings.cancel,
765
+ callback: function (widget) {
766
+
767
+ widget.trigger('cancel');
768
+ },
769
+ focus: isDefaultCancel
770
+ });
771
+
772
+ this.addButton({
773
+ name: 'ok',
774
+ text: strings.confirm,
775
+ callback: function (widget) {
776
+
777
+ widget.trigger('confirm');
778
+ },
779
+ focus: !isDefaultCancel
780
+ });
781
+ },
782
+ getDefaultSettings: function () {
783
+
784
+ var settings = DialogsManager.getWidgetType('lightbox').prototype.getDefaultSettings.apply(this, arguments);
785
+
786
+ settings.strings = {
787
+ confirm: 'OK',
788
+ cancel: 'Cancel'
789
+ };
790
+
791
+ settings.defaultOption = 'cancel';
792
+
793
+ return settings;
794
+ }
795
+ }));
796
+
797
+ DialogsManager.addWidgetType('alert', DialogsManager.getWidgetType('lightbox').extend('alert', {
798
+ onReady: function () {
799
+
800
+ DialogsManager.getWidgetType('lightbox').prototype.onReady.apply(this, arguments);
801
+
802
+ var strings = this.getSettings('strings');
803
+
804
+ this.addButton({
805
+ name: 'ok',
806
+ text: strings.confirm,
807
+ callback: function (widget) {
808
+
809
+ widget.trigger('confirm');
810
+ }
811
+ });
812
+ },
813
+ getDefaultSettings: function () {
814
+
815
+ var settings = DialogsManager.getWidgetType('lightbox').prototype.getDefaultSettings.apply(this, arguments);
816
+
817
+ settings.strings = {
818
+ confirm: 'OK'
819
+ };
820
+
821
+ return settings;
822
+ }
823
+ }));
824
+
825
+ // Exporting the DialogsManager variable to global
826
+ global.DialogsManager = DialogsManager;
827
+ })(
828
+ typeof jQuery !== 'undefined' ? jQuery : typeof require === 'function' && require('jquery'),
829
+ typeof module !== 'undefined' ? module.exports : window
830
+ );
admin/assets/js/pa-notice.js CHANGED
@@ -1,26 +1,26 @@
1
- ( function ( $ ) {
2
-
3
- var $noticeWrap = $( ".pa-notice-wrap" ),
4
- notice = $noticeWrap.data('notice');
5
-
6
- if( undefined !== notice ) {
7
-
8
- $noticeWrap.find('.pa-notice-reset').on( "click", function() {
9
-
10
- $noticeWrap.css('display', 'none');
11
-
12
- $.ajax({
13
- url: ajaxurl,
14
- type: 'POST',
15
- data: {
16
- action: 'pa_dismiss_admin_notice',
17
- notice: $noticeWrap.data( 'notice' )
18
- }
19
- });
20
-
21
-
22
- } );
23
- }
24
-
25
-
26
} )(jQuery);
1
+ ( function ( $ ) {
2
+
3
+ var $noticeWrap = $( ".pa-notice-wrap" ),
4
+ notice = $noticeWrap.data('notice');
5
+
6
+ if( undefined !== notice ) {
7
+
8
+ $noticeWrap.find('.pa-notice-reset').on( "click", function() {
9
+
10
+ $noticeWrap.css('display', 'none');
11
+
12
+ $.ajax({
13
+ url: ajaxurl,
14
+ type: 'POST',
15
+ data: {
16
+ action: 'pa_dismiss_admin_notice',
17
+ notice: $noticeWrap.data( 'notice' )
18
+ }
19
+ });
20
+
21
+
22
+ } );
23
+ }
24
+
25
+
26
} )(jQuery);
admin/assets/js/sweetalert2/core.js CHANGED
@@ -1,7613 +1,7613 @@
1
- /**
2
- * core-js 2.4.1
3
- * https://github.com/zloirock/core-js
4
- * License: http://rock.mit-license.org
5
- * © 2016 Denis Pushkarev
6
- */
7
- !function(__e, __g, undefined){
8
- 'use strict';
9
- /******/ (function(modules) { // webpackBootstrap
10
- /******/ // The module cache
11
- /******/ var installedModules = {};
12
-
13
- /******/ // The require function
14
- /******/ function __webpack_require__(moduleId) {
15
-
16
- /******/ // Check if module is in cache
17
- /******/ if(installedModules[moduleId])
18
- /******/ return installedModules[moduleId].exports;
19
-
20
- /******/ // Create a new module (and put it into the cache)
21
- /******/ var module = installedModules[moduleId] = {
22
- /******/ exports: {},
23
- /******/ id: moduleId,
24
- /******/ loaded: false
25
- /******/ };
26
-
27
- /******/ // Execute the module function
28
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
29
-
30
- /******/ // Flag the module as loaded
31
- /******/ module.loaded = true;
32
-
33
- /******/ // Return the exports of the module
34
- /******/ return module.exports;
35
- /******/ }
36
-
37
-
38
- /******/ // expose the modules object (__webpack_modules__)
39
- /******/ __webpack_require__.m = modules;
40
-
41
- /******/ // expose the module cache
42
- /******/ __webpack_require__.c = installedModules;
43
-
44
- /******/ // __webpack_public_path__
45
- /******/ __webpack_require__.p = "";
46
-
47
- /******/ // Load entry module and return exports
48
- /******/ return __webpack_require__(0);
49
- /******/ })
50
- /************************************************************************/
51
- /******/ ([
52
- /* 0 */
53
- /***/ function(module, exports, __webpack_require__) {
54
-
55
- __webpack_require__(1);
56
- __webpack_require__(50);
57
- __webpack_require__(51);
58
- __webpack_require__(52);
59
- __webpack_require__(54);
60
- __webpack_require__(55);
61
- __webpack_require__(58);
62
- __webpack_require__(59);
63
- __webpack_require__(60);
64
- __webpack_require__(61);
65
- __webpack_require__(62);
66
- __webpack_require__(63);
67
- __webpack_require__(64);
68
- __webpack_require__(65);
69
- __webpack_require__(66);
70
- __webpack_require__(68);
71
- __webpack_require__(70);
72
- __webpack_require__(72);
73
- __webpack_require__(74);
74
- __webpack_require__(77);
75
- __webpack_require__(78);
76
- __webpack_require__(79);
77
- __webpack_require__(83);
78
- __webpack_require__(86);
79
- __webpack_require__(87);
80
- __webpack_require__(88);
81
- __webpack_require__(89);
82
- __webpack_require__(91);
83
- __webpack_require__(92);
84
- __webpack_require__(93);
85
- __webpack_require__(94);
86
- __webpack_require__(95);
87
- __webpack_require__(97);
88
- __webpack_require__(99);
89
- __webpack_require__(100);
90
- __webpack_require__(101);
91
- __webpack_require__(103);
92
- __webpack_require__(104);
93
- __webpack_require__(105);
94
- __webpack_require__(107);
95
- __webpack_require__(108);
96
- __webpack_require__(109);
97
- __webpack_require__(111);
98
- __webpack_require__(112);
99
- __webpack_require__(113);
100
- __webpack_require__(114);
101
- __webpack_require__(115);
102
- __webpack_require__(116);
103
- __webpack_require__(117);
104
- __webpack_require__(118);
105
- __webpack_require__(119);
106
- __webpack_require__(120);
107
- __webpack_require__(121);
108
- __webpack_require__(122);
109
- __webpack_require__(123);
110
- __webpack_require__(124);
111
- __webpack_require__(126);
112
- __webpack_require__(130);
113
- __webpack_require__(131);
114
- __webpack_require__(132);
115
- __webpack_require__(133);
116
- __webpack_require__(137);
117
- __webpack_require__(139);
118
- __webpack_require__(140);
119
- __webpack_require__(141);
120
- __webpack_require__(142);
121
- __webpack_require__(143);
122
- __webpack_require__(144);
123
- __webpack_require__(145);
124
- __webpack_require__(146);
125
- __webpack_require__(147);
126
- __webpack_require__(148);
127
- __webpack_require__(149);
128
- __webpack_require__(150);
129
- __webpack_require__(151);
130
- __webpack_require__(152);
131
- __webpack_require__(158);
132
- __webpack_require__(159);
133
- __webpack_require__(161);
134
- __webpack_require__(162);
135
- __webpack_require__(163);
136
- __webpack_require__(167);
137
- __webpack_require__(168);
138
- __webpack_require__(169);
139
- __webpack_require__(170);
140
- __webpack_require__(171);
141
- __webpack_require__(173);
142
- __webpack_require__(174);
143
- __webpack_require__(175);
144
- __webpack_require__(176);
145
- __webpack_require__(179);
146
- __webpack_require__(181);
147
- __webpack_require__(182);
148
- __webpack_require__(183);
149
- __webpack_require__(185);
150
- __webpack_require__(187);
151
- __webpack_require__(189);
152
- __webpack_require__(190);
153
- __webpack_require__(191);
154
- __webpack_require__(193);
155
- __webpack_require__(194);
156
- __webpack_require__(195);
157
- __webpack_require__(196);
158
- __webpack_require__(203);
159
- __webpack_require__(206);
160
- __webpack_require__(207);
161
- __webpack_require__(209);
162
- __webpack_require__(210);
163
- __webpack_require__(211);
164
- __webpack_require__(212);
165
- __webpack_require__(213);
166
- __webpack_require__(214);
167
- __webpack_require__(215);
168
- __webpack_require__(216);
169
- __webpack_require__(217);
170
- __webpack_require__(218);
171
- __webpack_require__(219);
172
- __webpack_require__(220);
173
- __webpack_require__(222);
174
- __webpack_require__(223);
175
- __webpack_require__(224);
176
- __webpack_require__(225);
177
- __webpack_require__(226);
178
- __webpack_require__(227);
179
- __webpack_require__(228);
180
- __webpack_require__(229);
181
- __webpack_require__(231);
182
- __webpack_require__(234);
183
- __webpack_require__(235);
184
- __webpack_require__(237);
185
- __webpack_require__(238);
186
- __webpack_require__(239);
187
- __webpack_require__(240);
188
- __webpack_require__(241);
189
- __webpack_require__(242);
190
- __webpack_require__(243);
191
- __webpack_require__(244);
192
- __webpack_require__(245);
193
- __webpack_require__(246);
194
- __webpack_require__(247);
195
- __webpack_require__(249);
196
- __webpack_require__(250);
197
- __webpack_require__(251);
198
- __webpack_require__(252);
199
- __webpack_require__(253);
200
- __webpack_require__(254);
201
- __webpack_require__(255);
202
- __webpack_require__(256);
203
- __webpack_require__(258);
204
- __webpack_require__(259);
205
- __webpack_require__(261);
206
- __webpack_require__(262);
207
- __webpack_require__(263);
208
- __webpack_require__(264);
209
- __webpack_require__(267);
210
- __webpack_require__(268);
211
- __webpack_require__(269);
212
- __webpack_require__(270);
213
- __webpack_require__(271);
214
- __webpack_require__(272);
215
- __webpack_require__(273);
216
- __webpack_require__(274);
217
- __webpack_require__(276);
218
- __webpack_require__(277);
219
- __webpack_require__(278);
220
- __webpack_require__(279);
221
- __webpack_require__(280);
222
- __webpack_require__(281);
223
- __webpack_require__(282);
224
- __webpack_require__(283);
225
- __webpack_require__(284);
226
- __webpack_require__(285);
227
- __webpack_require__(286);
228
- __webpack_require__(287);
229
- __webpack_require__(288);
230
- __webpack_require__(291);
231
- __webpack_require__(156);
232
- __webpack_require__(293);
233
- __webpack_require__(292);
234
- __webpack_require__(294);
235
- __webpack_require__(295);
236
- __webpack_require__(296);
237
- __webpack_require__(297);
238
- __webpack_require__(298);
239
- __webpack_require__(300);
240
- __webpack_require__(301);
241
- __webpack_require__(302);
242
- __webpack_require__(304);
243
- module.exports = __webpack_require__(305);
244
-
245
-
246
- /***/ },
247
- /* 1 */
248
- /***/ function(module, exports, __webpack_require__) {
249
-
250
- 'use strict';
251
- // ECMAScript 6 symbols shim
252
- var global = __webpack_require__(2)
253
- , has = __webpack_require__(3)
254
- , DESCRIPTORS = __webpack_require__(4)
255
- , $export = __webpack_require__(6)
256
- , redefine = __webpack_require__(16)
257
- , META = __webpack_require__(20).KEY
258
- , $fails = __webpack_require__(5)
259
- , shared = __webpack_require__(21)
260
- , setToStringTag = __webpack_require__(22)
261
- , uid = __webpack_require__(17)
262
- , wks = __webpack_require__(23)
263
- , wksExt = __webpack_require__(24)
264
- , wksDefine = __webpack_require__(25)
265
- , keyOf = __webpack_require__(27)
266
- , enumKeys = __webpack_require__(40)
267
- , isArray = __webpack_require__(43)
268
- , anObject = __webpack_require__(10)
269
- , toIObject = __webpack_require__(30)
270
- , toPrimitive = __webpack_require__(14)
271
- , createDesc = __webpack_require__(15)
272
- , _create = __webpack_require__(44)
273
- , gOPNExt = __webpack_require__(47)
274
- , $GOPD = __webpack_require__(49)
275
- , $DP = __webpack_require__(9)
276
- , $keys = __webpack_require__(28)
277
- , gOPD = $GOPD.f
278
- , dP = $DP.f
279
- , gOPN = gOPNExt.f
280
- , $Symbol = global.Symbol
281
- , $JSON = global.JSON
282
- , _stringify = $JSON && $JSON.stringify
283
- , PROTOTYPE = 'prototype'
284
- , HIDDEN = wks('_hidden')
285
- , TO_PRIMITIVE = wks('toPrimitive')
286
- , isEnum = {}.propertyIsEnumerable
287
- , SymbolRegistry = shared('symbol-registry')
288
- , AllSymbols = shared('symbols')
289
- , OPSymbols = shared('op-symbols')
290
- , ObjectProto = Object[PROTOTYPE]
291
- , USE_NATIVE = typeof $Symbol == 'function'
292
- , QObject = global.QObject;
293
- // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
294
- var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
295
-
296
- // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
297
- var setSymbolDesc = DESCRIPTORS && $fails(function(){
298
- return _create(dP({}, 'a', {
299
- get: function(){ return dP(this, 'a', {value: 7}).a; }
300
- })).a != 7;
301
- }) ? function(it, key, D){
302
- var protoDesc = gOPD(ObjectProto, key);
303
- if(protoDesc)delete ObjectProto[key];
304
- dP(it, key, D);
305
- if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
306
- } : dP;
307
-
308
- var wrap = function(tag){
309
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
310
- sym._k = tag;
311
- return sym;
312
- };
313
-
314
- var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
315
- return typeof it == 'symbol';
316
- } : function(it){
317
- return it instanceof $Symbol;
318
- };
319
-
320
- var $defineProperty = function defineProperty(it, key, D){
321
- if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
322
- anObject(it);
323
- key = toPrimitive(key, true);
324
- anObject(D);
325
- if(has(AllSymbols, key)){
326
- if(!D.enumerable){
327
- if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
328
- it[HIDDEN][key] = true;
329
- } else {
330
- if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
331
- D = _create(D, {enumerable: createDesc(0, false)});
332
- } return setSymbolDesc(it, key, D);
333
- } return dP(it, key, D);
334
- };
335
- var $defineProperties = function defineProperties(it, P){
336
- anObject(it);
337
- var keys = enumKeys(P = toIObject(P))
338
- , i = 0
339
- , l = keys.length
340
- , key;
341
- while(l > i)$defineProperty(it, key = keys[i++], P[key]);
342
- return it;
343
- };
344
- var $create = function create(it, P){
345
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
346
- };
347
- var $propertyIsEnumerable = function propertyIsEnumerable(key){
348
- var E = isEnum.call(this, key = toPrimitive(key, true));
349
- if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
350
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
351
- };
352
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
353
- it = toIObject(it);
354
- key = toPrimitive(key, true);
355
- if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
356
- var D = gOPD(it, key);
357
- if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
358
- return D;
359
- };
360
- var $getOwnPropertyNames = function getOwnPropertyNames(it){
361
- var names = gOPN(toIObject(it))
362
- , result = []
363
- , i = 0
364
- , key;
365
- while(names.length > i){
366
- if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
367
- } return result;
368
- };
369
- var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
370
- var IS_OP = it === ObjectProto
371
- , names = gOPN(IS_OP ? OPSymbols : toIObject(it))
372
- , result = []
373
- , i = 0
374
- , key;
375
- while(names.length > i){
376
- if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
377
- } return result;
378
- };
379
-
380
- // 19.4.1.1 Symbol([description])
381
- if(!USE_NATIVE){
382
- $Symbol = function Symbol(){
383
- if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
384
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
385
- var $set = function(value){
386
- if(this === ObjectProto)$set.call(OPSymbols, value);
387
- if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
388
- setSymbolDesc(this, tag, createDesc(1, value));
389
- };
390
- if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
391
- return wrap(tag);
392
- };
393
- redefine($Symbol[PROTOTYPE], 'toString', function toString(){
394
- return this._k;
395
- });
396
-
397
- $GOPD.f = $getOwnPropertyDescriptor;
398
- $DP.f = $defineProperty;
399
- __webpack_require__(48).f = gOPNExt.f = $getOwnPropertyNames;
400
- __webpack_require__(42).f = $propertyIsEnumerable;
401
- __webpack_require__(41).f = $getOwnPropertySymbols;
402
-
403
- if(DESCRIPTORS && !__webpack_require__(26)){
404
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
405
- }
406
-
407
- wksExt.f = function(name){
408
- return wrap(wks(name));
409
- }
410
- }
411
-
412
- $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
413
-
414
- for(var symbols = (
415
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
416
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
417
- ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
418
-
419
- for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
420
-
421
- $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
422
- // 19.4.2.1 Symbol.for(key)
423
- 'for': function(key){
424
- return has(SymbolRegistry, key += '')
425
- ? SymbolRegistry[key]
426
- : SymbolRegistry[key] = $Symbol(key);
427
- },
428
- // 19.4.2.5 Symbol.keyFor(sym)
429
- keyFor: function keyFor(key){
430
- if(isSymbol(key))return keyOf(SymbolRegistry, key);
431
- throw TypeError(key + ' is not a symbol!');
432
- },
433
- useSetter: function(){ setter = true; },
434
- useSimple: function(){ setter = false; }
435
- });
436
-
437
- $export($export.S + $export.F * !USE_NATIVE, 'Object', {
438
- // 19.1.2.2 Object.create(O [, Properties])
439
- create: $create,
440
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
441
- defineProperty: $defineProperty,
442
- // 19.1.2.3 Object.defineProperties(O, Properties)
443
- defineProperties: $defineProperties,
444
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
445
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
446
- // 19.1.2.7 Object.getOwnPropertyNames(O)
447
- getOwnPropertyNames: $getOwnPropertyNames,
448
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
449
- getOwnPropertySymbols: $getOwnPropertySymbols
450
- });
451
-
452
- // 24.3.2 JSON.stringify(value [, replacer [, space]])
453
- $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
454
- var S = $Symbol();
455
- // MS Edge converts symbol values to JSON as {}
456
- // WebKit converts symbol values to JSON as null
457
- // V8 throws on boxed symbols
458
- return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
459
- })), 'JSON', {
460
- stringify: function stringify(it){
461
- if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
462
- var args = [it]
463
- , i = 1
464
- , replacer, $replacer;
465
- while(arguments.length > i)args.push(arguments[i++]);
466
- replacer = args[1];
467
- if(typeof replacer == 'function')$replacer = replacer;
468
- if($replacer || !isArray(replacer))replacer = function(key, value){
469
- if($replacer)value = $replacer.call(this, key, value);
470
- if(!isSymbol(value))return value;
471
- };
472
- args[1] = replacer;
473
- return _stringify.apply($JSON, args);
474
- }
475
- });
476
-
477
- // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
478
- $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(8)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
479
- // 19.4.3.5 Symbol.prototype[@@toStringTag]
480
- setToStringTag($Symbol, 'Symbol');
481
- // 20.2.1.9 Math[@@toStringTag]
482
- setToStringTag(Math, 'Math', true);
483
- // 24.3.3 JSON[@@toStringTag]
484
- setToStringTag(global.JSON, 'JSON', true);
485
-
486
- /***/ },
487
- /* 2 */
488
- /***/ function(module, exports) {
489
-
490
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
491
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
492
- ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
493
- if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
494
-
495
- /***/ },
496
- /* 3 */
497
- /***/ function(module, exports) {
498
-
499
- var hasOwnProperty = {}.hasOwnProperty;
500
- module.exports = function(it, key){
501
- return hasOwnProperty.call(it, key);
502
- };
503
-
504
- /***/ },
505
- /* 4 */
506
- /***/ function(module, exports, __webpack_require__) {
507
-
508
- // Thank's IE8 for his funny defineProperty
509
- module.exports = !__webpack_require__(5)(function(){
510
- return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
511
- });
512
-
513
- /***/ },
514
- /* 5 */
515
- /***/ function(module, exports) {
516
-
517
- module.exports = function(exec){
518
- try {
519
- return !!exec();
520
- } catch(e){
521
- return true;
522
- }
523
- };
524
-
525
- /***/ },
526
- /* 6 */
527
- /***/ function(module, exports, __webpack_require__) {
528
-
529
-