Version Description
Release date: January 11, 2022
Changelog: - Load in templates! Instead of creating your own buttons and groups, you can save time by loading ready-made templates. Click "add button" or "create new group" to see all templates available! - New styling options! We've added much more styling options for the group and the buttons that was once locked behind the menu styles. Now you can truly customize the buttons to your liking. - Shift + click" to skip a dialog You can now press shift + click when adding, deleting and duplicating to skip the confirmation dialog. - Fixed an issue with animations not working on Firefox and Safari. Some additional small fixes and UX improvements
If you experience bugs, problems or you just have some feedback, let us know on our Buttonizer community!
Release Info
Developer | buttonizer |
Plugin | Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer |
Version | 2.6.0 |
Comparing to | |
See all releases |
Code changes from version 2.5.5 to 2.6.0
- app/Admin/Admin.php +3 -0
- app/Admin/Translations.php +100 -20
- app/Api/Api.php +1 -0
- app/Api/Dashboard/ApiDashboard.php +2 -3
- app/Api/Utils/ApiImportMigrate.php +72 -0
- app/Api/Utils/ApiReset.php +1 -0
- app/Frontend/Ajax.php +1 -1
- app/Licensing/License.php +1 -1
- app/Utils/Update.php +121 -11
- assets/dashboard.css +69 -81
- assets/dashboard.js +10736 -8453
@@ -154,6 +154,7 @@ class Admin
|
|
154 |
'ajax' => admin_url( 'admin-ajax.php' ),
|
155 |
'admin' => admin_url( 'admin.php' ),
|
156 |
'base_url' => get_site_url( '/' ),
|
|
|
157 |
'can_send_errors' => ( isset( $settings['can_send_errors'] ) ? $settings['can_send_errors'] : false ),
|
158 |
'api' => get_rest_url() . 'buttonizer',
|
159 |
'nonce' => wp_create_nonce( 'wp_rest' ),
|
@@ -165,7 +166,9 @@ class Admin
|
|
165 |
'fontawesome_current_integrity' => FONTAWESOME_CURRENT_INTEGRITY,
|
166 |
'permalink_structure' => get_option( 'permalink_structure' ),
|
167 |
'php_version_supported' => version_compare( PHP_VERSION, '7.0.0', '>' ),
|
|
|
168 |
'php_version' => PHP_VERSION,
|
|
|
169 |
] );
|
170 |
// Buttonizer translations
|
171 |
$set = ( new Translations() )->get();
|
154 |
'ajax' => admin_url( 'admin-ajax.php' ),
|
155 |
'admin' => admin_url( 'admin.php' ),
|
156 |
'base_url' => get_site_url( '/' ),
|
157 |
+
"admin_base" => substr( admin_url(), 0, -1 ),
|
158 |
'can_send_errors' => ( isset( $settings['can_send_errors'] ) ? $settings['can_send_errors'] : false ),
|
159 |
'api' => get_rest_url() . 'buttonizer',
|
160 |
'nonce' => wp_create_nonce( 'wp_rest' ),
|
166 |
'fontawesome_current_integrity' => FONTAWESOME_CURRENT_INTEGRITY,
|
167 |
'permalink_structure' => get_option( 'permalink_structure' ),
|
168 |
'php_version_supported' => version_compare( PHP_VERSION, '7.0.0', '>' ),
|
169 |
+
'changelog_dialog_updated' => BUTTONIZER_LAST_CHANGELOG_UPDATE,
|
170 |
'php_version' => PHP_VERSION,
|
171 |
+
'migration_version' => BUTTONIZER_LAST_MIGRATION,
|
172 |
] );
|
173 |
// Buttonizer translations
|
174 |
$set = ( new Translations() )->get();
|
@@ -21,6 +21,7 @@ class Translations
|
|
21 |
{
|
22 |
return [
|
23 |
'errors' => $this->errors(),
|
|
|
24 |
'warnings' => $this->warnings(),
|
25 |
'common' => $this->common(),
|
26 |
'loading' => $this->loading(),
|
@@ -78,6 +79,35 @@ class Translations
|
|
78 |
];
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
/**
|
82 |
* Warnings
|
83 |
*
|
@@ -135,6 +165,8 @@ class Translations
|
|
135 |
|
136 |
'learn_more' => __('Learn more', 'buttonizer-multifunctional-button'),
|
137 |
|
|
|
|
|
138 |
// Disabled
|
139 |
'disable' => __('Disable', 'buttonizer-multifunctional-button'),
|
140 |
'disabled' => __('Disabled', 'buttonizer-multifunctional-button'),
|
@@ -156,7 +188,7 @@ class Translations
|
|
156 |
'previous' => __('Previous', 'buttonizer-multifunctional-button'),
|
157 |
|
158 |
// translators: The button to save and publish the changes that were made
|
159 |
-
'save_publish' => __('Save & publish', 'buttonizer-multifunctional-button')
|
160 |
];
|
161 |
}
|
162 |
|
@@ -193,12 +225,12 @@ class Translations
|
|
193 |
'add_button' => __('Add button', 'buttonizer-multifunctional-button'),
|
194 |
'add_group' => __('Add group', 'buttonizer-multifunctional-button'),
|
195 |
'create_group' => __('Create new group', 'buttonizer-multifunctional-button'),
|
|
|
|
|
196 |
|
197 |
// New button and new group
|
198 |
'new_button' => __('New button', 'buttonizer-multifunctional-button'),
|
199 |
-
'choose_button_name' => __('Choose a name for the button.', 'buttonizer-multifunctional-button'),
|
200 |
'new_group' => __('New group', 'buttonizer-multifunctional-button'),
|
201 |
-
'choose_group_name' => __('Choose a name for the group.', 'buttonizer-multifunctional-button'),
|
202 |
|
203 |
// Advanced button/group settings
|
204 |
'style' => __('Style', 'buttonizer-multifunctional-button'),
|
@@ -212,6 +244,7 @@ class Translations
|
|
212 |
|
213 |
// Image strings
|
214 |
'image' => __('Image', 'buttonizer-multifunctional-button'),
|
|
|
215 |
'select_image' => __('Select image', 'buttonizer-multifunctional-button'),
|
216 |
'change_image' => __('Change image', 'buttonizer-multifunctional-button'),
|
217 |
'select_file' => __('Select file', 'buttonizer-multifunctional-button'),
|
@@ -257,12 +290,19 @@ class Translations
|
|
257 |
'searching_for' => sprintf(
|
258 |
// translators: %1$s will be the searchterm, %2$s is the amount of results that have been found
|
259 |
__('Searching for: %1$s, found %2$s results.', 'buttonizer-multifunctional-button'),
|
260 |
-
|
261 |
-
|
262 |
-
|
|
|
263 |
'remove_filter' => __('Remove filter', 'buttonizer-multifunctional-button'),
|
264 |
],
|
265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
'crash' => [
|
267 |
'title' => __('Buttonizer has crashed!', 'buttonizer-multifunctional-button'),
|
268 |
'subtitle' => __('Our development team has been notified.', 'buttonizer-multifunctional-button'),
|
@@ -485,6 +525,24 @@ class Translations
|
|
485 |
'{0}'
|
486 |
),
|
487 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
|
489 |
'background_image' => [
|
490 |
'title' => __('Use background image', 'buttonizer-multifunctional-button'),
|
@@ -494,6 +552,10 @@ class Translations
|
|
494 |
'title' => __('Border radius', 'buttonizer-multifunctional-button'),
|
495 |
'description' => __('Change the roundness of this button group.', 'buttonizer-multifunctional-button'),
|
496 |
],
|
|
|
|
|
|
|
|
|
497 |
'margin' => [
|
498 |
'title' => __('Margin', 'buttonizer-multifunctional-button'),
|
499 |
'description' => __('Change the position of the label.', 'buttonizer-multifunctional-button'),
|
@@ -525,6 +587,7 @@ class Translations
|
|
525 |
],
|
526 |
'icon_or_image' => [
|
527 |
'title' => __('Graphic', 'buttonizer-multifunctional-button'),
|
|
|
528 |
'description' => __('Choose whether to use an icon or image as the button icon.', 'buttonizer-multifunctional-button'),
|
529 |
],
|
530 |
'icon_size' => [
|
@@ -1041,8 +1104,8 @@ class Translations
|
|
1041 |
]
|
1042 |
],
|
1043 |
|
1044 |
-
|
1045 |
-
|
1046 |
'title' => __('Buttonizer tour', 'buttonizer-multifunctional-button'),
|
1047 |
'description' => __('Helps you with step-by-step tours', 'buttonizer-multifunctional-button'),
|
1048 |
|
@@ -1055,15 +1118,31 @@ class Translations
|
|
1055 |
'title' => __('Create a button', 'buttonizer-multifunctional-button'),
|
1056 |
'description' => __('Learn how to make floating action buttons', 'buttonizer-multifunctional-button'),
|
1057 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
1058 |
|
1059 |
-
'
|
1060 |
-
'title' => __('
|
1061 |
-
'
|
1062 |
],
|
1063 |
|
1064 |
-
'
|
1065 |
-
'title' => __('
|
1066 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1067 |
],
|
1068 |
],
|
1069 |
|
@@ -1458,13 +1537,14 @@ class Translations
|
|
1458 |
'import' => [
|
1459 |
'title' => __('Import', 'buttonizer-multifunctional-button'),
|
1460 |
'select_please' => __('Please select a Buttonizer export file.', 'buttonizer-multifunctional-button'),
|
1461 |
-
'select_click' => __('Click
|
1462 |
'into_group' => [
|
1463 |
'button' => __('Import into this group', 'buttonizer-multifunctional-button'),
|
1464 |
'text' => __('Import buttons or replace this group.', 'buttonizer-multifunctional-button'),
|
1465 |
],
|
1466 |
'new_group' => [
|
1467 |
-
'
|
|
|
1468 |
'text' => __('Import a new group.', 'buttonizer-multifunctional-button'),
|
1469 |
],
|
1470 |
'reupload' => __('Re-upload file', 'buttonizer-multifunctional-button'),
|
@@ -1542,6 +1622,7 @@ class Translations
|
|
1542 |
'go_pro' => __('Go pro', 'buttonizer-multifunctional-button'),
|
1543 |
|
1544 |
'list' => [
|
|
|
1545 |
'time_schedules' => __('Show button(groups) using the advanced time schedules', 'buttonizer-multifunctional-button'),
|
1546 |
'page_rules' => __('Show button(groups) on specific pages using advanced page rules', 'buttonizer-multifunctional-button'),
|
1547 |
'button_groups' => __('Create multiple button groups', 'buttonizer-multifunctional-button'),
|
@@ -1628,7 +1709,7 @@ class Translations
|
|
1628 |
'step_3' => [
|
1629 |
'title' => __('Button', 'buttonizer-multifunctional-button'),
|
1630 |
'intro' => __('Easily customize your button by choosing the color of your button, icon and the color. Make sure the button and text are clearly visible. You can set a different style for the normal and hover state.', 'buttonizer-multifunctional-button')
|
1631 |
-
|
1632 |
|
1633 |
'step_4' => [
|
1634 |
'title' => __('Navigation', 'buttonizer-multifunctional-button'),
|
@@ -1654,12 +1735,11 @@ class Translations
|
|
1654 |
'title' => __('More Buttonizer Tours', 'buttonizer-multifunctional-button'),
|
1655 |
'intro' => __('We have more tours in store which are more in-depth and will help you improve your experience with Buttonizer even more. Go to <b><a onClick="app.closeButtonizerTour()">settings</a></b> to enjoy another tour!', 'buttonizer-multifunctional-button')
|
1656 |
],
|
1657 |
-
|
1658 |
'step_9' => [
|
1659 |
'title' => __('Support', 'buttonizer-multifunctional-button'),
|
1660 |
'intro' => __('Our support helps you troubleshoot common issues, find solutions, ask questions, and share tips with other Buzzers.', 'buttonizer-multifunctional-button'),
|
1661 |
],
|
1662 |
-
|
1663 |
],
|
1664 |
|
1665 |
'create_button_tour' => [
|
@@ -1764,7 +1844,7 @@ class Translations
|
|
1764 |
],
|
1765 |
]
|
1766 |
];
|
1767 |
-
}
|
1768 |
|
1769 |
/**
|
1770 |
* Warm welcome!
|
21 |
{
|
22 |
return [
|
23 |
'errors' => $this->errors(),
|
24 |
+
'templates' => $this->templates(),
|
25 |
'warnings' => $this->warnings(),
|
26 |
'common' => $this->common(),
|
27 |
'loading' => $this->loading(),
|
79 |
];
|
80 |
}
|
81 |
|
82 |
+
/**
|
83 |
+
* Templates
|
84 |
+
*
|
85 |
+
* @return array
|
86 |
+
*/
|
87 |
+
private function templates() {
|
88 |
+
return [
|
89 |
+
'all_templates_description' => __('Please note that you can still customize the button to your own wishes after inserting it', 'buttonizer-multifunctional-button'),
|
90 |
+
|
91 |
+
'number_of_buttons' => __('Number of buttons', 'buttonizer-multifunctional-button'),
|
92 |
+
|
93 |
+
'select' => __('Select', 'buttonizer-multifunctional-button'),
|
94 |
+
'selected' => __('Selected', 'buttonizer-multifunctional-button'),
|
95 |
+
|
96 |
+
'insert' => __('Insert', 'buttonizer-multifunctional-button'),
|
97 |
+
|
98 |
+
'default_button' => __('Default button', 'buttonizer-multifunctional-button'),
|
99 |
+
'default_group' => __('Default group', 'buttonizer-multifunctional-button'),
|
100 |
+
|
101 |
+
'framedesign' => [
|
102 |
+
'label' => __('Framedesign', 'buttonizer-multifunctional-button'),
|
103 |
+
],
|
104 |
+
|
105 |
+
'popular_actions' => [
|
106 |
+
'label' => __('Popular actions', 'buttonizer-multifunctional-button'),
|
107 |
+
],
|
108 |
+
];
|
109 |
+
}
|
110 |
+
|
111 |
/**
|
112 |
* Warnings
|
113 |
*
|
165 |
|
166 |
'learn_more' => __('Learn more', 'buttonizer-multifunctional-button'),
|
167 |
|
168 |
+
'off' => __('Off', 'buttonizer-multifunctional-button'),
|
169 |
+
|
170 |
// Disabled
|
171 |
'disable' => __('Disable', 'buttonizer-multifunctional-button'),
|
172 |
'disabled' => __('Disabled', 'buttonizer-multifunctional-button'),
|
188 |
'previous' => __('Previous', 'buttonizer-multifunctional-button'),
|
189 |
|
190 |
// translators: The button to save and publish the changes that were made
|
191 |
+
'save_publish' => __('Save & publish', 'buttonizer-multifunctional-button'),
|
192 |
];
|
193 |
}
|
194 |
|
225 |
'add_button' => __('Add button', 'buttonizer-multifunctional-button'),
|
226 |
'add_group' => __('Add group', 'buttonizer-multifunctional-button'),
|
227 |
'create_group' => __('Create new group', 'buttonizer-multifunctional-button'),
|
228 |
+
|
229 |
+
'shift_click' => __('Shift + Click to skip dialog', 'buttonizer-multifunctional-button'),
|
230 |
|
231 |
// New button and new group
|
232 |
'new_button' => __('New button', 'buttonizer-multifunctional-button'),
|
|
|
233 |
'new_group' => __('New group', 'buttonizer-multifunctional-button'),
|
|
|
234 |
|
235 |
// Advanced button/group settings
|
236 |
'style' => __('Style', 'buttonizer-multifunctional-button'),
|
244 |
|
245 |
// Image strings
|
246 |
'image' => __('Image', 'buttonizer-multifunctional-button'),
|
247 |
+
'image_url' => __('Image URL', 'buttonizer-multifunctional-button'),
|
248 |
'select_image' => __('Select image', 'buttonizer-multifunctional-button'),
|
249 |
'change_image' => __('Change image', 'buttonizer-multifunctional-button'),
|
250 |
'select_file' => __('Select file', 'buttonizer-multifunctional-button'),
|
290 |
'searching_for' => sprintf(
|
291 |
// translators: %1$s will be the searchterm, %2$s is the amount of results that have been found
|
292 |
__('Searching for: %1$s, found %2$s results.', 'buttonizer-multifunctional-button'),
|
293 |
+
'<b>{0}</b>', '<b>{1}</b>'),
|
294 |
+
'found' => sprintf(
|
295 |
+
__('Your search found %1$s results.', 'buttonizer-multifunctional-button'),
|
296 |
+
'<b>{1}</b>'),
|
297 |
'remove_filter' => __('Remove filter', 'buttonizer-multifunctional-button'),
|
298 |
],
|
299 |
|
300 |
+
'templates' => [
|
301 |
+
'found' => sprintf(
|
302 |
+
__('Your search returned %1$s results.', 'buttonizer-multifunctional-button'),
|
303 |
+
'<b>{1}</b>'),
|
304 |
+
],
|
305 |
+
|
306 |
'crash' => [
|
307 |
'title' => __('Buttonizer has crashed!', 'buttonizer-multifunctional-button'),
|
308 |
'subtitle' => __('Our development team has been notified.', 'buttonizer-multifunctional-button'),
|
525 |
'{0}'
|
526 |
),
|
527 |
],
|
528 |
+
|
529 |
+
'button_size' => [
|
530 |
+
'title' => __('Button Sizes', 'buttonizer-multifunctional-button'),
|
531 |
+
'menu_button' => __('Menu button size', 'buttonizer-multifunctional-button'),
|
532 |
+
'sub_button' => __('Sub button size', 'buttonizer-multifunctional-button'),
|
533 |
+
],
|
534 |
+
|
535 |
+
'label_inside' => [
|
536 |
+
'title' => __('Place label inside button', 'buttonizer-multifunctional-button'),
|
537 |
+
],
|
538 |
+
|
539 |
+
'label_same_width' => [
|
540 |
+
'title' => __('Make all labels have same width', 'buttonizer-multifunctional-button'),
|
541 |
+
],
|
542 |
+
|
543 |
+
'label_same_height' => [
|
544 |
+
'title' => __('Set height same as the button\'s', 'buttonizer-multifunctional-button'),
|
545 |
+
],
|
546 |
|
547 |
'background_image' => [
|
548 |
'title' => __('Use background image', 'buttonizer-multifunctional-button'),
|
552 |
'title' => __('Border radius', 'buttonizer-multifunctional-button'),
|
553 |
'description' => __('Change the roundness of this button group.', 'buttonizer-multifunctional-button'),
|
554 |
],
|
555 |
+
'box_shadow' => [
|
556 |
+
'title' => __('Box shadow', 'buttonizer-multifunctional-button'),
|
557 |
+
'description' => __('Change the box shadow of this button.', 'buttonizer-multifunctional-button'),
|
558 |
+
],
|
559 |
'margin' => [
|
560 |
'title' => __('Margin', 'buttonizer-multifunctional-button'),
|
561 |
'description' => __('Change the position of the label.', 'buttonizer-multifunctional-button'),
|
587 |
],
|
588 |
'icon_or_image' => [
|
589 |
'title' => __('Graphic', 'buttonizer-multifunctional-button'),
|
590 |
+
'label' => __('Select icon type', 'buttonizer-multifunctional-button'),
|
591 |
'description' => __('Choose whether to use an icon or image as the button icon.', 'buttonizer-multifunctional-button'),
|
592 |
],
|
593 |
'icon_size' => [
|
1104 |
]
|
1105 |
],
|
1106 |
|
1107 |
+
// Buttonizer tour
|
1108 |
+
'buttonizer_tour' => [
|
1109 |
'title' => __('Buttonizer tour', 'buttonizer-multifunctional-button'),
|
1110 |
'description' => __('Helps you with step-by-step tours', 'buttonizer-multifunctional-button'),
|
1111 |
|
1118 |
'title' => __('Create a button', 'buttonizer-multifunctional-button'),
|
1119 |
'description' => __('Learn how to make floating action buttons', 'buttonizer-multifunctional-button'),
|
1120 |
],
|
1121 |
+
],
|
1122 |
+
|
1123 |
+
'changelog_dialog' => [
|
1124 |
+
'title' => __('What\'s new?', 'buttonizer-multifunctional-button'),
|
1125 |
+
'all_changelogs' => __('View all changelogs', 'buttonizer-multifunctional-button'),
|
1126 |
+
'new_features' => __('New features', 'buttonizer-multifunctional-button'),
|
1127 |
|
1128 |
+
'first_feature' => [
|
1129 |
+
'title' => __('New styling options!', 'buttonizer-multifunctional-button'),
|
1130 |
+
'info' => __('We\'ve added much more styling options for the group and the buttons. Now you can truly customize the buttons to your liking.', 'buttonizer-multifunctional-button'),
|
1131 |
],
|
1132 |
|
1133 |
+
'second_feature' => [
|
1134 |
+
'title' => __('Load in templates', 'buttonizer-multifunctional-button'),
|
1135 |
+
'info' => __('Instead of creating your own buttons and groups, you can save time by loading ready-made templates. Click "add button" or "create new group" to see all templates available.', 'buttonizer-multifunctional-button'),
|
1136 |
+
],
|
1137 |
+
|
1138 |
+
'third_feature' => [
|
1139 |
+
'title' => __('Updated menu position for button styles', 'buttonizer-multifunctional-button'),
|
1140 |
+
'info' => __('We have slightly adjusted the placement of the settings for changing the button position. Don\'t worry, you can still find the settings under the "Advanced" tab.', 'buttonizer-multifunctional-button'),
|
1141 |
+
],
|
1142 |
+
|
1143 |
+
'fourth_feature' => [
|
1144 |
+
'title' => __('"Shift + click" to skip a dialog', 'buttonizer-multifunctional-button'),
|
1145 |
+
'info' => __('You can now press shift + click when adding, deleting and duplicating to skip the confirmation dialog.', 'buttonizer-multifunctional-button'),
|
1146 |
],
|
1147 |
],
|
1148 |
|
1537 |
'import' => [
|
1538 |
'title' => __('Import', 'buttonizer-multifunctional-button'),
|
1539 |
'select_please' => __('Please select a Buttonizer export file.', 'buttonizer-multifunctional-button'),
|
1540 |
+
'select_click' => __('Click or drop a JSON export file', 'buttonizer-multifunctional-button'),
|
1541 |
'into_group' => [
|
1542 |
'button' => __('Import into this group', 'buttonizer-multifunctional-button'),
|
1543 |
'text' => __('Import buttons or replace this group.', 'buttonizer-multifunctional-button'),
|
1544 |
],
|
1545 |
'new_group' => [
|
1546 |
+
'group' => __('Import group', 'buttonizer-multifunctional-button'),
|
1547 |
+
'button' => __('Import button', 'buttonizer-multifunctional-button'),
|
1548 |
'text' => __('Import a new group.', 'buttonizer-multifunctional-button'),
|
1549 |
],
|
1550 |
'reupload' => __('Re-upload file', 'buttonizer-multifunctional-button'),
|
1622 |
'go_pro' => __('Go pro', 'buttonizer-multifunctional-button'),
|
1623 |
|
1624 |
'list' => [
|
1625 |
+
'button_sizes' => __('Change the size of the buttons and groups', 'buttonizer-multifunctional-button'),
|
1626 |
'time_schedules' => __('Show button(groups) using the advanced time schedules', 'buttonizer-multifunctional-button'),
|
1627 |
'page_rules' => __('Show button(groups) on specific pages using advanced page rules', 'buttonizer-multifunctional-button'),
|
1628 |
'button_groups' => __('Create multiple button groups', 'buttonizer-multifunctional-button'),
|
1709 |
'step_3' => [
|
1710 |
'title' => __('Button', 'buttonizer-multifunctional-button'),
|
1711 |
'intro' => __('Easily customize your button by choosing the color of your button, icon and the color. Make sure the button and text are clearly visible. You can set a different style for the normal and hover state.', 'buttonizer-multifunctional-button')
|
1712 |
+
],
|
1713 |
|
1714 |
'step_4' => [
|
1715 |
'title' => __('Navigation', 'buttonizer-multifunctional-button'),
|
1735 |
'title' => __('More Buttonizer Tours', 'buttonizer-multifunctional-button'),
|
1736 |
'intro' => __('We have more tours in store which are more in-depth and will help you improve your experience with Buttonizer even more. Go to <b><a onClick="app.closeButtonizerTour()">settings</a></b> to enjoy another tour!', 'buttonizer-multifunctional-button')
|
1737 |
],
|
1738 |
+
|
1739 |
'step_9' => [
|
1740 |
'title' => __('Support', 'buttonizer-multifunctional-button'),
|
1741 |
'intro' => __('Our support helps you troubleshoot common issues, find solutions, ask questions, and share tips with other Buzzers.', 'buttonizer-multifunctional-button'),
|
1742 |
],
|
|
|
1743 |
],
|
1744 |
|
1745 |
'create_button_tour' => [
|
1844 |
],
|
1845 |
]
|
1846 |
];
|
1847 |
+
}
|
1848 |
|
1849 |
/**
|
1850 |
* Warm welcome!
|
@@ -29,6 +29,7 @@ class Api {
|
|
29 |
// Backend api
|
30 |
(new Settings\ApiSettings())->registerRoute();
|
31 |
(new Dashboard\ApiDashboard())->registerRoute();
|
|
|
32 |
(new Utils\ApiPublish())->registerRoute();
|
33 |
(new Utils\ApiRevert())->registerRoute();
|
34 |
(new Utils\ApiReset())->registerRoute();
|
29 |
// Backend api
|
30 |
(new Settings\ApiSettings())->registerRoute();
|
31 |
(new Dashboard\ApiDashboard())->registerRoute();
|
32 |
+
(new Utils\ApiImportMigrate())->registerRoute();
|
33 |
(new Utils\ApiPublish())->registerRoute();
|
34 |
(new Utils\ApiRevert())->registerRoute();
|
35 |
(new Utils\ApiReset())->registerRoute();
|
@@ -57,7 +57,6 @@ class ApiDashboard
|
|
57 |
return [
|
58 |
"status" => "success",
|
59 |
"version" => BUTTONIZER_VERSION,
|
60 |
-
"latest_tour_update" => BUTTONIZER_LAST_TOUR_UPDATE,
|
61 |
"fontawesome_current_version" => FONTAWESOME_CURRENT_VERSION,
|
62 |
"premium" => $premium,
|
63 |
"premium_code" => $isPremiumPluginCode,
|
@@ -106,8 +105,8 @@ class ApiDashboard
|
|
106 |
private function loadSettings()
|
107 |
{
|
108 |
return [
|
109 |
-
"welcome" => $this->checkBoolean( "welcome",
|
110 |
-
"
|
111 |
"welcome_super_contributor" => $this->checkTimesLoaded( 3 ),
|
112 |
"icon_library" => $this->check( "icon_library", 'fontawesome' ),
|
113 |
"icon_library_version" => $this->check( "icon_library_version", '5.free' ),
|
57 |
return [
|
58 |
"status" => "success",
|
59 |
"version" => BUTTONIZER_VERSION,
|
|
|
60 |
"fontawesome_current_version" => FONTAWESOME_CURRENT_VERSION,
|
61 |
"premium" => $premium,
|
62 |
"premium_code" => $isPremiumPluginCode,
|
105 |
private function loadSettings()
|
106 |
{
|
107 |
return [
|
108 |
+
"welcome" => $this->checkBoolean( "welcome", false ),
|
109 |
+
"changelog_dialog_updated" => $this->check( "changelog_dialog_updated", 0 ),
|
110 |
"welcome_super_contributor" => $this->checkTimesLoaded( 3 ),
|
111 |
"icon_library" => $this->check( "icon_library", 'fontawesome' ),
|
112 |
"icon_library_version" => $this->check( "icon_library_version", '5.free' ),
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* SOFTWARE LICENSE INFORMATION
|
4 |
+
*
|
5 |
+
* Copyright (c) 2017 Buttonizer, all rights reserved.
|
6 |
+
*
|
7 |
+
* This file is part of Buttonizer
|
8 |
+
*
|
9 |
+
* For detailed information regarding to the licensing of
|
10 |
+
* this software, please review the license.txt or visit:
|
11 |
+
* https://buttonizer.pro/license/
|
12 |
+
*/
|
13 |
+
|
14 |
+
namespace Buttonizer\Api\Utils;
|
15 |
+
|
16 |
+
use Buttonizer\Utils\Maintain;
|
17 |
+
use Buttonizer\Utils\Update;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Dashboard API
|
21 |
+
*
|
22 |
+
* @endpoint /wp-json/buttonizer/import_migrate
|
23 |
+
* @methods GET
|
24 |
+
*/
|
25 |
+
class ApiImportMigrate {
|
26 |
+
/**
|
27 |
+
* Register route
|
28 |
+
*/
|
29 |
+
public function registerRoute() {
|
30 |
+
register_rest_route('buttonizer', '/import_migrate', [
|
31 |
+
[
|
32 |
+
'methods' => ['POST'],
|
33 |
+
'args' => [
|
34 |
+
'data' => [
|
35 |
+
'required' => true,
|
36 |
+
"type" => "object"
|
37 |
+
],
|
38 |
+
],
|
39 |
+
'callback' => [$this, 'migrate'],
|
40 |
+
'permission_callback' => function() {
|
41 |
+
return Maintain::hasPermission();
|
42 |
+
}
|
43 |
+
]
|
44 |
+
]);
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get settings
|
49 |
+
*/
|
50 |
+
public function migrate($request) {
|
51 |
+
$data = json_decode($request->get_body(), true);
|
52 |
+
|
53 |
+
// return $data;
|
54 |
+
if(!isset($data['data'])) {
|
55 |
+
return [
|
56 |
+
'success' => false,
|
57 |
+
'results' => [],
|
58 |
+
];
|
59 |
+
}
|
60 |
+
if($data['data']['export_type'] === "button") {
|
61 |
+
return [
|
62 |
+
'success' => true,
|
63 |
+
'results' => $data['data'],
|
64 |
+
];
|
65 |
+
}
|
66 |
+
|
67 |
+
return [
|
68 |
+
'success' => true,
|
69 |
+
'results' => (new Update())->migration5UpdateData([$data['data']])[0],
|
70 |
+
];
|
71 |
+
}
|
72 |
+
}
|
@@ -73,6 +73,7 @@ class ApiReset {
|
|
73 |
// Current Settings
|
74 |
update_option('buttonizer_settings', [
|
75 |
'migration_version' => BUTTONIZER_LAST_MIGRATION,
|
|
|
76 |
"import_icon_library" => true,
|
77 |
"no_ajax" => true
|
78 |
]);
|
73 |
// Current Settings
|
74 |
update_option('buttonizer_settings', [
|
75 |
'migration_version' => BUTTONIZER_LAST_MIGRATION,
|
76 |
+
'welcome' => true,
|
77 |
"import_icon_library" => true,
|
78 |
"no_ajax" => true
|
79 |
]);
|
@@ -238,7 +238,7 @@ class Ajax
|
|
238 |
} elseif ( $this->settings["icon_library_version"] === '5.paid' ) {
|
239 |
wp_register_style(
|
240 |
'buttonizer-icon-library',
|
241 |
-
'https://pro.fontawesome.com/releases/' . FONTAWESOME_CURRENT_VERSION . '/css/all.css',
|
242 |
[],
|
243 |
false,
|
244 |
'all'
|
238 |
} elseif ( $this->settings["icon_library_version"] === '5.paid' ) {
|
239 |
wp_register_style(
|
240 |
'buttonizer-icon-library',
|
241 |
+
'https://pro.fontawesome.com/releases/v' . FONTAWESOME_CURRENT_VERSION . '/css/all.css',
|
242 |
[],
|
243 |
false,
|
244 |
'all'
|
@@ -80,7 +80,7 @@ class License
|
|
80 |
'has_affiliation' => 'all',
|
81 |
'menu' => array(
|
82 |
'slug' => 'Buttonizer',
|
83 |
-
'first-path' => 'admin.php?page=Buttonizer
|
84 |
'support' => false,
|
85 |
'contact' => false,
|
86 |
),
|
80 |
'has_affiliation' => 'all',
|
81 |
'menu' => array(
|
82 |
'slug' => 'Buttonizer',
|
83 |
+
'first-path' => 'admin.php?page=Buttonizer#/welcome-splash',
|
84 |
'support' => false,
|
85 |
'contact' => false,
|
86 |
),
|
@@ -82,16 +82,26 @@ class Update
|
|
82 |
* @since 2.2
|
83 |
*/
|
84 |
public function selfMigrate($currentVersion) {
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
}
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
// Next migration $currentVersion === 4
|
95 |
|
96 |
// Make sure there is nothing to check anymore
|
97 |
$this->checkMigration();
|
@@ -516,19 +526,18 @@ class Update
|
|
516 |
$settings = [];
|
517 |
|
518 |
$settings['migration_version'] = BUTTONIZER_LAST_MIGRATION;
|
519 |
-
$settings['last_tour_version'] = BUTTONIZER_LAST_TOUR_UPDATE;
|
520 |
$settings['import_icon_library'] = true;
|
521 |
|
522 |
if($newInstall === false) {
|
523 |
$settings['google_analytics'] = $this->get15GeneralSettings('google_analytics', '');
|
524 |
$settings['icon_library'] = 'fontawesome';
|
525 |
$settings['icon_library_version'] = '4.7.0';
|
526 |
-
$settings['welcome'] = true;
|
527 |
}else{
|
528 |
$settings['google_analytics'] = '';
|
529 |
$settings['no_ajax'] = true;
|
530 |
$settings['icon_library'] = 'fontawesome';
|
531 |
$settings['icon_library_version'] = '5.free';
|
|
|
532 |
// Add default button data
|
533 |
update_option('buttonizer_buttons', [
|
534 |
[
|
@@ -1012,4 +1021,105 @@ class Update
|
|
1012 |
|
1013 |
return $data;
|
1014 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1015 |
}
|
82 |
* @since 2.2
|
83 |
*/
|
84 |
public function selfMigrate($currentVersion) {
|
85 |
+
switch ($currentVersion) {
|
86 |
+
case "2.0":
|
87 |
+
$this->update20to21();
|
88 |
+
break;
|
89 |
+
case "2.1":
|
90 |
+
$this->update216to217();
|
91 |
+
break;
|
92 |
+
case "2.2":
|
93 |
+
$this->migration4();
|
94 |
+
break;
|
95 |
+
case "4":
|
96 |
+
$this->migration5();
|
97 |
+
break;
|
98 |
}
|
99 |
+
|
100 |
+
// No need for migration. Set to current migration version otherwise we're going into a LoOoOoOoOoP
|
101 |
+
$this->registerSettings();
|
102 |
+
$buttonizerSettings = get_option('buttonizer_settings');
|
103 |
+
$buttonizerSettings["migration_version"] = BUTTONIZER_LAST_MIGRATION;
|
104 |
+
update_option('buttonizer_settings', $buttonizerSettings);
|
|
|
105 |
|
106 |
// Make sure there is nothing to check anymore
|
107 |
$this->checkMigration();
|
526 |
$settings = [];
|
527 |
|
528 |
$settings['migration_version'] = BUTTONIZER_LAST_MIGRATION;
|
|
|
529 |
$settings['import_icon_library'] = true;
|
530 |
|
531 |
if($newInstall === false) {
|
532 |
$settings['google_analytics'] = $this->get15GeneralSettings('google_analytics', '');
|
533 |
$settings['icon_library'] = 'fontawesome';
|
534 |
$settings['icon_library_version'] = '4.7.0';
|
|
|
535 |
}else{
|
536 |
$settings['google_analytics'] = '';
|
537 |
$settings['no_ajax'] = true;
|
538 |
$settings['icon_library'] = 'fontawesome';
|
539 |
$settings['icon_library_version'] = '5.free';
|
540 |
+
$settings['welcome'] = true;
|
541 |
// Add default button data
|
542 |
update_option('buttonizer_buttons', [
|
543 |
[
|
1021 |
|
1022 |
return $data;
|
1023 |
}
|
1024 |
+
|
1025 |
+
/**
|
1026 |
+
* Run update 2.5.3 to 2.5.4
|
1027 |
+
*/
|
1028 |
+
public function migration5()
|
1029 |
+
{
|
1030 |
+
$this->registerSettings();
|
1031 |
+
|
1032 |
+
$groups = $this->migration5UpdateData($this->backupButtons);
|
1033 |
+
|
1034 |
+
// var_dump($groups);
|
1035 |
+
|
1036 |
+
// If buttonizer was already published, update published.
|
1037 |
+
if(get_option('buttonizer_buttons_published')) {
|
1038 |
+
$published = $this->migration5UpdateData(get_option('buttonizer_buttons_published'));
|
1039 |
+
update_option('buttonizer_buttons_published', $published);
|
1040 |
+
}
|
1041 |
+
|
1042 |
+
// Get all current settings first
|
1043 |
+
$settings = get_option('buttonizer_settings');
|
1044 |
+
|
1045 |
+
// Set migration version to 5
|
1046 |
+
$settings["migration_version"] = 5;
|
1047 |
+
update_option('buttonizer_settings', $settings);
|
1048 |
+
|
1049 |
+
// Overwrite new settings
|
1050 |
+
update_option('buttonizer_buttons', $groups);
|
1051 |
+
}
|
1052 |
+
|
1053 |
+
|
1054 |
+
/**
|
1055 |
+
* Convert buttons
|
1056 |
+
*/
|
1057 |
+
public function migration5UpdateData($array) {
|
1058 |
+
$groups = [];
|
1059 |
+
|
1060 |
+
// Loop through the groups
|
1061 |
+
foreach ($array as $group)
|
1062 |
+
{
|
1063 |
+
//---------------- MIGRATE GROUP ----------------//
|
1064 |
+
// Remove data from certain meu styles
|
1065 |
+
switch(isset($group['data']['menu_style']) ? $group['data']['menu_style'] : 'default') {
|
1066 |
+
case "rectangle":
|
1067 |
+
case "square":
|
1068 |
+
unset($group['data']['border_radius']);
|
1069 |
+
unset($group['data']['label_margin']);
|
1070 |
+
unset($group['data']['label_padding']);
|
1071 |
+
unset($group['data']['label_border_radius']);
|
1072 |
+
foreach($group['buttons'] as $buttonKey => $button) {
|
1073 |
+
unset($group['buttons'][$buttonKey]['border_radius']);
|
1074 |
+
unset($group['buttons'][$buttonKey]['label_margin']);
|
1075 |
+
unset($group['buttons'][$buttonKey]['label_padding']);
|
1076 |
+
unset($group['buttons'][$buttonKey]['label_border_radius']);
|
1077 |
+
}
|
1078 |
+
break;
|
1079 |
+
case "text":
|
1080 |
+
unset($group['data']['label_background_color']);
|
1081 |
+
unset($group['data']['label_border_radius']);
|
1082 |
+
unset($group['data']['label_margin']);
|
1083 |
+
unset($group['data']['label_padding']);
|
1084 |
+
unset($group['data']['icon_is_image']);
|
1085 |
+
foreach($group['buttons'] as $buttonKey => $button) {
|
1086 |
+
unset($group['buttons'][$buttonKey]['label_background_color']);
|
1087 |
+
unset($group['buttons'][$buttonKey]['label_border_radius']);
|
1088 |
+
unset($group['buttons'][$buttonKey]['label_margin']);
|
1089 |
+
unset($group['buttons'][$buttonKey]['label_padding']);
|
1090 |
+
unset($group['buttons'][$buttonKey]['icon_is_image']);
|
1091 |
+
}
|
1092 |
+
break;
|
1093 |
+
case "text-icon":
|
1094 |
+
unset($group['data']['label_background_color']);
|
1095 |
+
unset($group['data']['label_border_radius']);
|
1096 |
+
unset($group['data']['label_margin']);
|
1097 |
+
unset($group['data']['label_padding']);
|
1098 |
+
foreach($group['buttons'] as $buttonKey => $button) {
|
1099 |
+
unset($group['buttons'][$buttonKey]['label_background_color']);
|
1100 |
+
unset($group['buttons'][$buttonKey]['label_border_radius']);
|
1101 |
+
unset($group['buttons'][$buttonKey]['label_margin']);
|
1102 |
+
unset($group['buttons'][$buttonKey]['label_padding']);
|
1103 |
+
}
|
1104 |
+
break;
|
1105 |
+
}
|
1106 |
+
|
1107 |
+
// Replace icon_is_image with icon_type
|
1108 |
+
if(isset($group['data']['icon_is_image'])) {
|
1109 |
+
$group['data']['icon_type'] = $group['data']['icon_is_image'] === true ? "image" : "icon";
|
1110 |
+
unset($group['data']['icon_is_image']);
|
1111 |
+
}
|
1112 |
+
foreach($group['buttons'] as $buttonKey => $button) {
|
1113 |
+
if(isset($group['buttons'][$buttonKey]['icon_is_image'])) {
|
1114 |
+
$group['buttons'][$buttonKey]['icon_type'] = $group['buttons'][$buttonKey]['icon_is_image'] === true ? "image" : "icon";
|
1115 |
+
unset($group['buttons'][$buttonKey]['icon_is_image']);
|
1116 |
+
}
|
1117 |
+
}
|
1118 |
+
|
1119 |
+
$groups[] = $group;
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
return $groups;
|
1123 |
+
}
|
1124 |
+
|
1125 |
}
|
@@ -9,7 +9,7 @@
|
|
9 |
*
|
10 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
11 |
*
|
12 |
-
* (C) 2017-
|
13 |
*
|
14 |
*/
|
15 |
/*!
|
@@ -23,7 +23,7 @@
|
|
23 |
*
|
24 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
25 |
*
|
26 |
-
* (C) 2017-
|
27 |
*
|
28 |
*/
|
29 |
@import url(https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap);
|
@@ -36,27 +36,28 @@
|
|
36 |
.knowledgebase-link{color:#2f7789;text-decoration:none}.knowledgebase-link.medium{font-size:14px !important}.knowledgebase-link.small{font-size:12px !important}.knowledgebase-link:hover{text-decoration:underline}.knowledgebase-icon{color:#2f7789}
|
37 |
.button-container{margin:0 0 13px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;padding:10px;border:1px solid #e2e2e2;background-color:#fff}.button-container .button-name{max-width:100%}.button-container .button-name .button-name-span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;max-width:100%}.button-container .button-name.drag-icon{min-width:10px}.button-container .button-header{display:flex}.button-container .button-header .button-actions{margin-left:auto;flex-shrink:0}.button-container .button-settings{display:flex}.button-container .button-settings .button-title{display:inline-flex;height:30px;align-items:center;margin-right:10px;font-size:14px}.button-container .button-settings button{height:30px}.button-container .button-settings .button-visibility{flex-grow:1}.button-container .button-settings .button-visibility button{width:40px;min-width:40px;margin:0 2px}.button-container .button-settings .button-actions button{min-width:35px}.button-container .button-settings .clear{clear:both}
|
38 |
#group-button-extra-buttons div[class^=MuiListItemIcon-root]{min-width:45px}#group-button-extra-buttons div[class^=MuiListItemIcon-root] .fas,#group-button-extra-buttons div[class^=MuiListItemIcon-root] .far{overflow:unset;font-size:1rem;margin-left:5px;text-align:center}
|
39 |
-
.button-group-container{padding:10px;margin-bottom:15px;border:2px #fff solid}.button-group-container.currentDrop{border:2px #f9bf87 solid}.button-group-container .group-info{display:flex}.button-group-container .group-info .group-arrow{display:inline-block;width:17px;text-align:left;font-size:12px}.button-group-container .group-info .group-arrow i{-webkit-transition:all 150ms ease;-moz-transition:all 150ms ease;-ms-transition:all 150ms ease;-o-transition:all 150ms ease;transition:all 150ms ease}.button-group-container .group-info .group-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.button-group-container .group-info .group-action-spacer{flex-grow:1}.button-group-container .group-info .group-actions{flex-grow:0;flex-shrink:0;margin-left:20px}.button-group-container .buttons{display:none}.button-group-container.opened .group-info .group-arrow i{transform:rotate(90deg)}.button-group-container.opened .buttons{display:block;border-radius:10px;padding:10px;border:2px #fff solid;transition:border .5s}.button-group-container.opened .buttons.currentDrop{border:2px #f9bf87 solid}.button-group-container.opened .buttons.currentDrop .button-container{opacity:.5}.button-group-container.opened .buttons.currentDrop .button-container.currentDrag{opacity:1}
|
|
|
40 |
.buttonizer-premium{background:#2d7688;background:-moz-linear-gradient(-45deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);background:-webkit-linear-gradient(-45deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);background:linear-gradient(135deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr="#2d7688", endColorstr="#e8832c",GradientType=1 );color:#fff;font-weight:500;font-size:13px;line-height:17px;padding:4px 20px;display:inline-block;vertical-align:middle;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;margin-left:10px}.buttonizer-premium.premium-right{position:absolute;right:30px;top:19px;z-index:9}.buttonizer-premium::after{content:"PRO"}.MuiFormControl-root:not(.MuiTextField-root) .buttonizer-premium{margin-right:15px}
|
41 |
.item-not-found{text-align:center;padding:40px 0}.item-not-found i{font-size:50px;display:block;margin:30px auto}.item-not-found h4{font-size:15px;margin:28px 0}
|
42 |
.tab-bordered{position:relative;z-index:2}.use-main-button-style{padding:5px 15px;display:flex;position:relative}.use-main-button-style:before{height:2px;background:#dfdfdf;content:" ";position:absolute;top:-2px;left:0;right:0;z-index:1}.use-main-button-style .button-label{flex-grow:1;margin-left:-10px}.use-main-button-style>div{width:50px;flex-grow:0}.back-to-group{position:fixed;left:0;width:20px;z-index:1}.back-to-group::before{content:"";position:fixed;left:0;top:0;width:10px;height:100vh;background:#2f7789}.back-to-group a{position:absolute;transform-origin:top left;left:-1px;color:#f08419;text-transform:uppercase;text-decoration:none;padding:1px 8px 1px 8px;display:inline-block;transform:rotate(90deg) translateY(-100%);background-color:#fff;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16) !important;border-radius:4px 4px 0 0;height:20px;white-space:nowrap;font-weight:500;transition:padding .125s ease,box-shadow .25s ease}.back-to-group a i{margin-right:8px}.back-to-group a:hover{padding:1px 8px 5px 8px;box-shadow:0 1px 1px 0 rgba(60,64,67,.16),0 1px 3px 1px rgba(60,64,67,.32) !important}
|
43 |
.breadcrumb .mdc-select,.breadcrumb button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:100%;line-height:28px;display:flex;align-items:center;flex-flow:row-reverse;border-radius:4px;padding:0 8px;font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:.875rem;font-weight:500;letter-spacing:.08929em;text-decoration:none;text-transform:uppercase}.breadcrumb .mdc-select .fas.fa-chevron-down,.breadcrumb button .fas.fa-chevron-down{color:#fff !important;line-height:3.4;font-size:9px}.breadcrumb .mdc-select input,.breadcrumb .mdc-select .mdc-select__dropdown-icon,.breadcrumb .mdc-select .mdc-select__selected-text,.breadcrumb button input,.breadcrumb button .mdc-select__dropdown-icon,.breadcrumb button .mdc-select__selected-text{position:relative}.breadcrumb .mdc-select .mdc-select__selected-text,.breadcrumb button .mdc-select__selected-text{min-width:fit-content;padding:0 16px 0 0px !important;color:#fff;font-size:12px !important;height:fit-content;border-bottom:none}.breadcrumb .mdc-select .mdc-notched-outline,.breadcrumb button .mdc-notched-outline{display:none}.breadcrumb .mdc-select.mdc-select--outlined .mdc-select__selected-text,.breadcrumb button.mdc-select--outlined .mdc-select__selected-text{padding:0px}.breadcrumb .mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-line-ripple,.breadcrumb button:not(.mdc-select--disabled).mdc-select--focused .mdc-line-ripple{background-color:#eb8119}.button-select-menu .MuiPaper-root{padding-top:6px;min-width:140px}.button-select-menu .MuiPaper-root .breadcrumb-select-options{margin-bottom:6px}
|
44 |
.collapsible-group{margin:10px 20px}.collapsible-group>button{text-align:left;justify-content:normal;padding:0 15px;height:49px}.collapsible-group>button i{margin-left:10px;font-size:12px;-webkit-transition:all 150ms ease;-moz-transition:all 150ms ease;-ms-transition:all 150ms ease;-o-transition:all 150ms ease;transition:all 150ms ease}.collapsible-group .collapsible-body{padding:18px}.collapsible-group.collapsible-opened>button i{transform:rotate(-180deg)}
|
45 |
-
.settings-container{display:flex;position:relative;margin
|
46 |
.desktop-mobile-visibility button{min-width:40px;width:40px}.desktop-mobile-visibility button.buttonMobile{margin-right:5px}
|
47 |
.button-action-value a,.button-action-subject a{font-size:14px !important;text-decoration:none;color:#2f7789}.button-action-value .MuiTextField-root,.button-action-subject .MuiTextField-root{margin-bottom:15px}.button-action-value .MuiTextField-root label,.button-action-subject .MuiTextField-root label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.button-action-value .MuiTextField-root label:not(.Mui-focused),.button-action-subject .MuiTextField-root label:not(.Mui-focused){width:92%}
|
48 |
.button-action .button-action-type{padding-bottom:20px}.button-action code{padding:3px 5px 2px 5px;margin:0 1px;background:rgba(0,0,0,.07)}
|
49 |
.form-icon-selector .selector{overflow:hidden;border-radius:4px;cursor:pointer;width:100%}.form-icon-selector .selector .viewer{width:100%;height:65px;background-color:#ddd;display:block;border-radius:0 0 4px 4px;color:#fff;text-align:center}.form-icon-selector .selector span{border-radius:0 0 4px 4px;display:block;color:#fff;text-align:center}
|
50 |
-
.color-picker-main{width:100%;display:flex;justify-content:flex-end}.color-picker-main .color-picker{display:flex;width:100%;cursor:pointer;justify-content:flex-end;height:28px}.color-picker-main .color-picker .gpw{width:100%;background:url(./images/transparent.png) repeat;border-radius:5px 0 0 5px;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16);overflow:hidden;padding:0}.color-picker-main .color-picker .gpw span.color-preview{display:block;height:100%;background:#f08419}.color-picker-main .color-picker .color-button{height:100%;border-radius:0 5px 5px 0;margin-left:1px;margin-right:0px;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16)}.gpw .popover .type-selector{margin:3px;width:100%}
|
51 |
.color-picker-container{width:300px;max-width:100%}.color-picker-container .color-container{background:url(./images/transparent.png) repeat}.color-picker-container .color-container .current-color input{height:62px;line-height:62px;text-align:center;color:#fff;font-size:18px;font-weight:500;border:0;padding:0;background:rgba(0,0,0,0);width:100%;border-radius:0;outline:none;font-family:Roboto,sans-serif}.color-picker-container .buttons{text-align:right;padding:5px 10px 10px}.color-picker-container .buttons button{margin-left:5px}.no-select-color-container{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
|
52 |
.slider-container{margin-bottom:15px}.slider-container-input{margin-left:20px;height:28px;max-width:78px;flex-shrink:0}.slider-container-input input{font-size:14px}.slider-container-input input::-webkit-outer-spin-button,.slider-container-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.slider-container-input input[type=number]{-moz-appearance:textfield}
|
53 |
-
.icon-or-image{width:100%;min-height:30px}.icon-or-image button{min-width:unset;min-height:40px !important}.icon-or-image button .MuiTab-wrapper{display:block !important}.icon-or-image button .MuiTab-wrapper i{margin-right:5px}
|
54 |
.disable-setting.disabled{position:relative}.disable-setting.disabled .settings{opacity:.5;pointer-events:none}.disable-setting.disabled .disable-content{position:absolute;bottom:0;top:0;left:0;right:0;text-align:center;max-width:100%;color:#2f7789;font-weight:900;display:flex;align-items:center;user-select:none}.disable-setting.disabled .disable-content .buttonizer-premium{margin-right:30px;margin-left:auto}
|
55 |
.textfield-corners-input{height:100%;max-width:80px;padding-right:5px !important;margin:0 !important}.textfield-corners-input.textfield-corners-select{max-width:35px}.textfield-corners-input .MuiSelect-root{font-size:12px;padding:5px 12px 5px 8px !important}.textfield-corners-input .MuiSvgIcon-root{font-size:1rem;right:0;top:50%;transform:translateY(-50%)}.textfield-corners-input input{font-size:14px;padding:5px 8px}.textfield-corners-input input::-webkit-outer-spin-button,.textfield-corners-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.textfield-corners-input input[type=number]{-moz-appearance:textfield}.textfield-corners-input .MuiInputAdornment-root{margin-left:5px}.textfield-corners-input .MuiInputAdornment-root>p{font-size:14px}.textfield-corners-menu li{padding-left:8px;padding-right:8px;font-size:14px}
|
|
|
56 |
.position-buttons-container{margin-bottom:unset}.position-buttons-container .position-buttons{max-width:unset !important}.position-buttons-container .position-buttons button svg{width:20px;fill:currentColor}.position-buttons-container .position-buttons.position-horizontal button:nth-child(1) svg,.position-buttons-container .position-buttons.position-horizontal button:nth-child(2) svg{transform:rotate(-90deg)}.position-buttons-container .position-buttons.position-horizontal button:nth-child(3) svg{transform:rotate(90deg)}.position-buttons-container .position-buttons.position-vertical button:nth-child(3) svg{transform:rotate(180deg)}.position-buttons-container .position-advanced{margin-left:5px}.position-buttons-container .position-advanced .MuiButton-endIcon{margin-left:4px}.position-buttons-container .position-advanced .MuiButton-endIcon.MuiButton-iconSizeMedium .MuiIcon-root{font-size:15px}.position-advanced-container .position-advanced-buttons{flex-grow:1}.position-advanced-container .position-advanced-buttons button{flex-grow:1;height:32px}.position-advanced-container .position-advanced-textfield{font-size:15px;height:32px;padding:0 10px}.position-textfield{height:28px;-moz-appearance:textfield}.position-textfield ::-webkit-outer-spin-button,.position-textfield ::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
|
57 |
.image-selector{display:inline-flex;width:100%;justify-content:flex-end;text-align:center}.image-selector .image{width:100%;height:101px;display:inline-flex;text-decoration:none;line-height:26px;cursor:pointer;border-radius:3px;flex-direction:column;justify-content:flex-end;background-size:cover;background-position:center;background-color:#ededed}.image-selector .image i{font-size:40px;line-height:54px;color:#4795a9bd}.image-selector .image .image-text{background-color:#2f788a;color:#fff;border-radius:0 0 3px 3px}.image-selector .image .selected{opacity:0;transition:250ms}.image-selector .image:hover .selected{opacity:1}
|
58 |
.advanced-scroll-timeout .advanced-timeout{display:flex;margin-bottom:10px}.advanced-scroll-timeout .advanced-timeout .timeout-radio-group{margin-right:0;width:calc(100% /3)}.advanced-scroll-timeout .advanced-timeout .timeout-radio-group .MuiFormControlLabel-label{text-transform:capitalize;text-align:left;display:flex;justify-content:left;color:#717171;font-size:13px;padding-right:40px !important;padding-left:0px !important}.advanced-scroll-timeout .advanced-scroll{display:flex;margin-bottom:10px}.advanced-scroll-timeout .advanced-scroll .scroll-radio-group{margin-right:0;width:calc(100% /3)}.advanced-scroll-timeout .advanced-scroll .scroll-radio-group .MuiFormControlLabel-label{text-transform:capitalize;text-align:left;display:flex;justify-content:left;color:#717171;font-size:13px;padding-right:40px !important;padding-left:0px !important}.advanced-scroll-timeout .advanced-scroll .MuiTextField-root{min-width:calc(100% / 3);margin-top:auto;margin-bottom:auto}.advanced-scroll-timeout .advanced-scroll .advanced-scroll-pixel-percent{display:flex;width:calc(100% / 3);flex-direction:column}.advanced-scroll-timeout .advanced-scroll .advanced-scroll-pixel-percent button{padding:0;height:45%;min-width:30px;font-size:10px;margin:auto}.advanced-scroll-timeout .advanced-scroll-hide{display:flex;justify-content:flex-end}.advanced-scroll-timeout .advanced-scroll-hide .settings-container{height:35px;width:calc(900% / 10)}.advanced-scroll-timeout .advanced-scroll-hide .settings-container .settings-title{font-size:11px}.advanced-scroll-timeout .advanced-scroll-hide .settings-container .MuiTabs-root.icon-or-image{min-height:30px}.advanced-scroll-timeout .advanced-scroll-hide .settings-container.disabled .settings-content .MuiTabs-indicator{background-color:#747474}.advanced-scroll-timeout .advanced-scroll-container{margin:15px 0 -15px}.advanced-scroll-timeout .advanced-scroll-description{display:flex;justify-content:center}.advanced-scroll-timeout .advanced-scroll-description p{margin:0}
|
59 |
-
.buttonizer-bar{position:fixed;left:0;top:0;bottom:0;width:430px;background:#f0f0f0;border-right:1px solid #d2d2d2}@media screen and (max-width: 769px){.buttonizer-bar{width:100%}}.buttonizer-bar.is-loading .router{opacity:0}.buttonizer-bar.is-loading .buttonizer-logo{display:none}.buttonizer-bar .router-window{position:absolute;top:0;bottom:56px;left:0;width:100%}.buttonizer-bar .router-window .simplebar-content-wrapper{height:100% !important}.buttonizer-bar .router-window .simplebar-placeholder{min-height:100vh}.buttonizer-bar .router-window .router{padding:0 30px 50px}.buttonizer-bar .buttonizer-logo img{max-width:200px;display:block;margin:20px auto 30px}.buttonizer-bar .bar-header{margin:10px 0}.buttonizer-bar .bar-header .breadcrumb{margin:15px 0 15px;display:flex}.buttonizer-bar .bar-header .breadcrumb button{height:28px;line-height:28px;padding:0 10px}.buttonizer-bar .bar-header .breadcrumb button .breadcrumb-text{white-space:nowrap;letter-spacing:.07em;overflow:hidden;text-overflow:ellipsis;height:100%;display:inline-block;align-items:center}.buttonizer-bar .bar-header .breadcrumb button i{margin-left:10px;color:rgba(0,0,0,.3);vertical-align:middle}.buttonizer-bar .bar-header .breadcrumb button.home-button{flex-shrink:0}.buttonizer-bar .bar-header .MuiTabs-flexContainer .MuiTab-textColorSecondary{color:#95bac3}.buttonizer-bar .bar-header .MuiTabs-flexContainer .MuiTab-textColorSecondary:hover{color:#2f7789}.buttonizer-bar .bar-header .MuiTabs-flexContainer .MuiTab-textColorSecondary.Mui-selected{color:#f08419}.buttonizer-bar .bar-header .MuiTabs-flexContainer a{min-width:unset}.buttonizer-bar .bar-header .MuiTabs-flexContainer a i{font-size:20px;margin-bottom:8px}.buttonizer-bar .bar-header .MuiTabs-flexContainer a .MuiTab-wrapper{font-weight:600;font-size:12px;letter-spacing:1.25006px}.buttonizer-bar .bar-footer{position:absolute;bottom:0;left:0;right:0;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16);background:#fff}.buttonizer-bar .bar-footer .bar-footer-container{display:flex;align-content:space-between;padding:10px}.buttonizer-bar .bar-footer .bar-footer-container .settings-button{font-size:20px;position:relative;margin-right:8px}.buttonizer-bar .bar-footer .bar-footer-container button{min-width:36px;height:36px}.buttonizer-bar .bar-footer .bar-footer-container button.MuiIconButton-root{padding:0;font-size:16px}.buttonizer-bar .bar-footer .bar-footer-container .MuiButton-Publish{padding:6px 16px !important;font-size:.785rem !important}.buttonizer-bar .bar-footer .bar-footer-container .footer-button-group-start{position:relative;border-right:#ddd 1px solid;margin-right:5px}
|
60 |
[data-simplebar] {
|
61 |
position: relative;
|
62 |
flex-direction: column;
|
@@ -277,57 +278,9 @@
|
|
277 |
.drawer-splitter-content-title{padding:15px 0 10px;margin-bottom:15px;font-size:16px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:#2f7789;border-bottom:1px solid rgba(0,0,0,.1)}
|
278 |
.settings-drawer-pages .settings-page-title .title{font-size:40px;font-weight:700}.settings-drawer-pages .settings-page-title .description{font-size:16px;padding:15px 0}.settings-drawer-pages .with-secondary-action{padding-right:80px}.settings-drawer-pages .with-optin-action{padding-right:150px}.settings-drawer-pages .with-permissions{display:block}.settings-drawer-pages .with-permissions>div{flex:none}.settings-drawer-pages .settings-container.select .settings-title{flex-shrink:1;width:calc(122%/ 3)}.settings-drawer-pages .settings-container.select .settings-content{width:52.666%;padding:0 20px;margin:auto}.settings-drawer-pages h2.title{text-transform:uppercase}.settings-drawer-pages .explaination ul{list-style:disc;padding:0 40px}.settings-drawer-pages .explaination button:not(:disabled){background-color:red}.settings-drawer-pages .explaination button .fas.fa-undo{font-size:14px}.settings-drawer-pages .explaination button .fas.fa-undo.spin{animation:spin-animation 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite}@keyframes spin-animation{0%{transform:rotate(0deg)}100%{transform:rotate(-360deg)}}
|
279 |
.buttonizer-drawer{padding:2em}.close-button{float:right;margin:-20px !important}
|
280 |
-
.buttonizer-tour-options .
|
281 |
.premium-dialog #premium-dialog-title h2{-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-image:linear-gradient(-45deg, #ef8419, #ff952a, #3ab0ca, #2a7688);background-size:400% 400%;animation:gradient 5s ease infinite}.premium-dialog .premium-dialog-content{display:flex;flex-flow:row}.premium-dialog .premium-dialog-content.MuiDialogContent-dividers{padding:10px 24px}.premium-dialog .premium-dialog-content p{font-size:14px}.premium-dialog .premium-dialog-content .premium-dialog-text.MuiDialogContent-root:first-child{padding-top:0}.premium-dialog .premium-dialog-content .premium-dialog-text #premium-dialog-description{color:rgba(0,0,0,.87)}.premium-dialog .premium-dialog-content .premium-dialog-text.with-video{border-right:#e0e0e0 1px solid;max-width:641px}.premium-dialog .premium-dialog-content .premium-dialog-text code{display:block;margin-bottom:5px;padding:10px;background:#e0e0e0}.premium-dialog .premium-dialog-content .premium-dialog-text ul{list-style:none;padding:0 13px}.premium-dialog .premium-dialog-content .premium-dialog-text ul li{font-size:16px;line-height:22px;font-weight:500}.premium-dialog .premium-dialog-content .premium-dialog-text ul li:nth-child(odd){color:#2a7688}.premium-dialog .premium-dialog-content .premium-dialog-text ul li:nth-child(even){color:#ef8419}.premium-dialog .premium-dialog-content .premium-dialog-text ul li i{margin-right:10px;font-size:17px}.premium-dialog .premium-dialog-content .premium-dialog-video{width:100%;margin:auto}.premium-dialog .premium-dialog-content .premium-dialog-video iframe{max-width:560px}@keyframes gradient{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
|
282 |
.broke-out-of-iframe{padding:10px 20px;color:#b32828;background:#ffdada;text-align:center;display:flex;align-items:center}.broke-out-of-iframe div{width:100%;line-height:24px;font-size:16px}.broke-out-of-iframe button{margin-left:20px;flex-shrink:0;color:#b32828;border-color:#da9595;background:#fff}
|
283 |
-
/*
|
284 |
-
Buttons style by http://nicolasgallagher.com/lab/css3-github-buttons/
|
285 |
-
Changed by Afshin Mehrabani
|
286 |
-
*/
|
287 |
-
/* overrides extra padding on button elements in Firefox */
|
288 |
-
@-webkit-keyframes introjspulse {
|
289 |
-
0% {
|
290 |
-
-webkit-transform: scale(0);
|
291 |
-
transform: scale(0);
|
292 |
-
opacity: 0; }
|
293 |
-
25% {
|
294 |
-
-webkit-transform: scale(0);
|
295 |
-
transform: scale(0);
|
296 |
-
opacity: 0.1; }
|
297 |
-
50% {
|
298 |
-
-webkit-transform: scale(0.1);
|
299 |
-
transform: scale(0.1);
|
300 |
-
opacity: 0.3; }
|
301 |
-
75% {
|
302 |
-
-webkit-transform: scale(0.5);
|
303 |
-
transform: scale(0.5);
|
304 |
-
opacity: 0.5; }
|
305 |
-
100% {
|
306 |
-
-webkit-transform: scale(1);
|
307 |
-
transform: scale(1);
|
308 |
-
opacity: 0; } }
|
309 |
-
@keyframes introjspulse {
|
310 |
-
0% {
|
311 |
-
-webkit-transform: scale(0);
|
312 |
-
transform: scale(0);
|
313 |
-
opacity: 0; }
|
314 |
-
25% {
|
315 |
-
-webkit-transform: scale(0);
|
316 |
-
transform: scale(0);
|
317 |
-
opacity: 0.1; }
|
318 |
-
50% {
|
319 |
-
-webkit-transform: scale(0.1);
|
320 |
-
transform: scale(0.1);
|
321 |
-
opacity: 0.3; }
|
322 |
-
75% {
|
323 |
-
-webkit-transform: scale(0.5);
|
324 |
-
transform: scale(0.5);
|
325 |
-
opacity: 0.5; }
|
326 |
-
100% {
|
327 |
-
-webkit-transform: scale(1);
|
328 |
-
transform: scale(1);
|
329 |
-
opacity: 0; } }
|
330 |
-
|
331 |
.introjs-overlay {
|
332 |
position: absolute;
|
333 |
-webkit-box-sizing: content-box;
|
@@ -673,7 +626,7 @@ tr.introjs-showElement > th {
|
|
673 |
border: 0;
|
674 |
outline: 0; }
|
675 |
.introjs-hint:hover > .introjs-hint-pulse {
|
676 |
-
|
677 |
|
678 |
.introjs-hidehint {
|
679 |
display: none; }
|
@@ -681,71 +634,106 @@ tr.introjs-showElement > th {
|
|
681 |
.introjs-fixedhint {
|
682 |
position: fixed; }
|
683 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
684 |
.introjs-hint-pulse {
|
685 |
-webkit-box-sizing: content-box;
|
686 |
box-sizing: content-box;
|
687 |
-
width:
|
688 |
-
height:
|
689 |
-
border: 5px solid rgba(60, 60, 60, 0.27);
|
690 |
border-radius: 30px;
|
691 |
background-color: rgba(136, 136, 136, 0.24);
|
692 |
z-index: 10;
|
693 |
position: absolute;
|
694 |
-webkit-transition: all 0.2s ease-out;
|
695 |
-o-transition: all 0.2s ease-out;
|
696 |
-
transition: all 0.2s ease-out;
|
|
|
|
|
697 |
|
698 |
-
.introjs-hint-no-anim .introjs-hint-
|
699 |
-webkit-animation: none;
|
700 |
animation: none; }
|
701 |
|
702 |
.introjs-hint-dot {
|
703 |
-webkit-box-sizing: content-box;
|
704 |
box-sizing: content-box;
|
705 |
-
border: 10px solid rgba(146, 146, 146, 0.36);
|
706 |
background: transparent;
|
707 |
border-radius: 60px;
|
708 |
height: 50px;
|
709 |
width: 50px;
|
710 |
-
-webkit-animation: introjspulse 3s ease-out;
|
711 |
-
animation: introjspulse 3s ease-out;
|
712 |
-
-webkit-animation-iteration-count: infinite;
|
713 |
-
animation-iteration-count: infinite;
|
714 |
position: absolute;
|
715 |
-
top: -
|
716 |
-
left: -
|
717 |
z-index: 1;
|
718 |
opacity: 0; }
|
719 |
|
720 |
-
.tourDialog,.videoDialog,.
|
721 |
-
.
|
722 |
-
|
723 |
.btnizr-wp-icon {
|
724 |
-
|
725 |
}
|
726 |
|
727 |
.btnizr-logo {
|
728 |
-
|
729 |
}
|
730 |
|
731 |
.btnizr-buttonizer-loading {
|
732 |
-
|
733 |
}
|
734 |
|
735 |
.btnizr-buttonizer-plugin-icon {
|
736 |
-
|
737 |
}
|
738 |
|
739 |
.btnizr-buttonizer-buzzer {
|
740 |
-
|
|
|
|
|
|
|
|
|
741 |
}
|
742 |
|
743 |
.btnizr-buttonizer-video-tour-group {
|
744 |
-
|
745 |
}
|
746 |
|
747 |
.btnizr-buttonizer-video-tour-style {
|
748 |
-
|
749 |
-
}
|
750 |
-
|
|
|
751 |
form{display:flex;flex-direction:column;align-items:stretch}form .MuiTextField-root{margin:1em}form .fullwidth-label{align-items:stretch !important}form .crash-report{margin-top:2em}
|
9 |
*
|
10 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
11 |
*
|
12 |
+
* (C) 2017-2022 Buttonizer v2.6.0
|
13 |
*
|
14 |
*/
|
15 |
/*!
|
23 |
*
|
24 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
25 |
*
|
26 |
+
* (C) 2017-2022 Buttonizer v2.6.0
|
27 |
*
|
28 |
*/
|
29 |
@import url(https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap);
|
36 |
.knowledgebase-link{color:#2f7789;text-decoration:none}.knowledgebase-link.medium{font-size:14px !important}.knowledgebase-link.small{font-size:12px !important}.knowledgebase-link:hover{text-decoration:underline}.knowledgebase-icon{color:#2f7789}
|
37 |
.button-container{margin:0 0 13px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;padding:10px;border:1px solid #e2e2e2;background-color:#fff}.button-container .button-name{max-width:100%}.button-container .button-name .button-name-span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;max-width:100%}.button-container .button-name.drag-icon{min-width:10px}.button-container .button-header{display:flex}.button-container .button-header .button-actions{margin-left:auto;flex-shrink:0}.button-container .button-settings{display:flex}.button-container .button-settings .button-title{display:inline-flex;height:30px;align-items:center;margin-right:10px;font-size:14px}.button-container .button-settings button{height:30px}.button-container .button-settings .button-visibility{flex-grow:1}.button-container .button-settings .button-visibility button{width:40px;min-width:40px;margin:0 2px}.button-container .button-settings .button-actions button{min-width:35px}.button-container .button-settings .clear{clear:both}
|
38 |
#group-button-extra-buttons div[class^=MuiListItemIcon-root]{min-width:45px}#group-button-extra-buttons div[class^=MuiListItemIcon-root] .fas,#group-button-extra-buttons div[class^=MuiListItemIcon-root] .far{overflow:unset;font-size:1rem;margin-left:5px;text-align:center}
|
39 |
+
.button-group-container{padding:10px;margin-bottom:15px;border:2px #fff solid;position:relative}.button-group-container.currentDrop{border:2px #f9bf87 solid}.button-group-container .group-info{display:flex}.button-group-container .group-info .group-arrow{display:inline-block;min-width:17px;text-align:left;font-size:12px}.button-group-container .group-info .group-arrow i{-webkit-transition:all 150ms ease;-moz-transition:all 150ms ease;-ms-transition:all 150ms ease;-o-transition:all 150ms ease;transition:all 150ms ease}.button-group-container .group-info .group-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}.button-group-container .group-info .group-action-spacer{flex-grow:1}.button-group-container .group-info .group-actions{flex-grow:0;flex-shrink:0;margin-left:20px}.button-group-container .buttons{display:none}.button-group-container.opened .group-info .group-arrow i{transform:rotate(90deg)}.button-group-container.opened .buttons{display:block;border-radius:10px;padding:10px;border:2px #fff solid;transition:border .5s}.button-group-container.opened .buttons.currentDrop{border:2px #f9bf87 solid}.button-group-container.opened .buttons.currentDrop .button-container{opacity:.5}.button-group-container.opened .buttons.currentDrop .button-container.currentDrag{opacity:1}.button-group-container.new-group::before,.button-group-container.new-group::after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;display:block;background:#f08419;border-radius:10px}.button-group-container.new-group::before{animation:buttonizer-pulse 1.8s 0s ease-out}.button-group-container.new-group::after{animation:buttonizer-pulse 1.8s .333s ease-out}@keyframes buttonizer-pulse{0%{opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";margin:0px}5%{opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}100%{margin:-30px;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"}}
|
40 |
+
.templates-dialog ::-webkit-scrollbar{width:10px}.templates-dialog ::-webkit-scrollbar-track{background:#f1f1f1}.templates-dialog ::-webkit-scrollbar-thumb{background:#888}.templates-dialog ::-webkit-scrollbar-thumb:hover{background:#555}.templates-dialog .MuiDialog-paperFullWidth{padding:30px}.templates-dialog .MuiButton-outlined{background-color:#fff;color:#2a7688;border:1px solid #73a8b4}.templates-dialog .header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;position:relative}.templates-dialog .header .titles h2{color:#2a7688;text-transform:uppercase;font-size:32px}.templates-dialog .header .titles .title{padding:0}.templates-dialog .header .titles .subtitle{margin:0;color:#2a7688;font-weight:normal;font-size:18px}.templates-dialog .header .close-button{cursor:pointer;font-size:24px;color:#2a7688;position:absolute;right:0;top:0}.templates-dialog .container-filter-buttons{padding:8px 55px 0px 24px}.templates-dialog .container-filter-buttons .midsection{display:flex;align-items:center;margin:20px 0 40px;padding:0;border:none;overflow:visible}.templates-dialog .container-filter-buttons .midsection .button-group{min-width:fit-content}.templates-dialog .container-filter-buttons .midsection .button-group .buttons-numbers{margin:10px 20px 20px 0;display:flex}.templates-dialog .container-filter-buttons .midsection .button-group .buttons-numbers .current{background-color:#fce8d4;color:#f08419;border:1px solid #f08419}.templates-dialog .select-all{opacity:0;visibility:hidden}.templates-dialog .select-all.visible{opacity:1;visibility:visible}.search-results{position:absolute;margin-top:-30px}.loading{text-align:center;height:500px;justify-content:center;display:flex}.loading p{font-family:Arial,"Helvetica Neue"}.template{display:grid;grid-template-columns:repeat(auto-fit, 202px);grid-gap:1.5rem;grid-template-rows:repeat(6, 177px);height:500px}.template .type{border:1px solid #2a7688;height:175px;width:200px;color:#2a7688;position:relative;border-radius:5px;display:flex;cursor:pointer;grid-column:1;grid-row:1}.template .type img{max-width:100%;margin:auto;max-height:85%;user-select:none}.template .type .category{position:absolute;top:15px;right:10px;font-size:12px}.template .type .default-option{width:100%;display:flex;align-items:center;flex-direction:column;font-size:14px;align-self:center}.template .type .default-option .fa-plus-circle{font-size:40px;margin-bottom:12px}.template .container{display:grid}.template .container .checkbox{margin:10px 0;transition:all .2s ease-in-out;opacity:1;grid-column:1;grid-row:1;height:24px;width:24px;margin:5px;z-index:1}.template .container .checkbox.hidden{opacity:0;visibility:hidden}.template .container .select{visibility:hidden;opacity:0;display:flex;align-items:center;position:absolute;bottom:0;grid-column-gap:5px;padding:5px 15px;border-top:1px solid #2a7688;border-right:1px solid #2a7688;border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-left-radius:3px;font-size:13px;transition:all .2s ease-in-out}.template .container:hover .select{visibility:visible;opacity:1}.template .container:hover .checkbox.hidden{opacity:1;visibility:visible}
|
41 |
.buttonizer-premium{background:#2d7688;background:-moz-linear-gradient(-45deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);background:-webkit-linear-gradient(-45deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);background:linear-gradient(135deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr="#2d7688", endColorstr="#e8832c",GradientType=1 );color:#fff;font-weight:500;font-size:13px;line-height:17px;padding:4px 20px;display:inline-block;vertical-align:middle;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;margin-left:10px}.buttonizer-premium.premium-right{position:absolute;right:30px;top:19px;z-index:9}.buttonizer-premium::after{content:"PRO"}.MuiFormControl-root:not(.MuiTextField-root) .buttonizer-premium{margin-right:15px}
|
42 |
.item-not-found{text-align:center;padding:40px 0}.item-not-found i{font-size:50px;display:block;margin:30px auto}.item-not-found h4{font-size:15px;margin:28px 0}
|
43 |
.tab-bordered{position:relative;z-index:2}.use-main-button-style{padding:5px 15px;display:flex;position:relative}.use-main-button-style:before{height:2px;background:#dfdfdf;content:" ";position:absolute;top:-2px;left:0;right:0;z-index:1}.use-main-button-style .button-label{flex-grow:1;margin-left:-10px}.use-main-button-style>div{width:50px;flex-grow:0}.back-to-group{position:fixed;left:0;width:20px;z-index:1}.back-to-group::before{content:"";position:fixed;left:0;top:0;width:10px;height:100vh;background:#2f7789}.back-to-group a{position:absolute;transform-origin:top left;left:-1px;color:#f08419;text-transform:uppercase;text-decoration:none;padding:1px 8px 1px 8px;display:inline-block;transform:rotate(90deg) translateY(-100%);background-color:#fff;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16) !important;border-radius:4px 4px 0 0;height:20px;white-space:nowrap;font-weight:500;transition:padding .125s ease,box-shadow .25s ease}.back-to-group a i{margin-right:8px}.back-to-group a:hover{padding:1px 8px 5px 8px;box-shadow:0 1px 1px 0 rgba(60,64,67,.16),0 1px 3px 1px rgba(60,64,67,.32) !important}
|
44 |
.breadcrumb .mdc-select,.breadcrumb button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:100%;line-height:28px;display:flex;align-items:center;flex-flow:row-reverse;border-radius:4px;padding:0 8px;font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:.875rem;font-weight:500;letter-spacing:.08929em;text-decoration:none;text-transform:uppercase}.breadcrumb .mdc-select .fas.fa-chevron-down,.breadcrumb button .fas.fa-chevron-down{color:#fff !important;line-height:3.4;font-size:9px}.breadcrumb .mdc-select input,.breadcrumb .mdc-select .mdc-select__dropdown-icon,.breadcrumb .mdc-select .mdc-select__selected-text,.breadcrumb button input,.breadcrumb button .mdc-select__dropdown-icon,.breadcrumb button .mdc-select__selected-text{position:relative}.breadcrumb .mdc-select .mdc-select__selected-text,.breadcrumb button .mdc-select__selected-text{min-width:fit-content;padding:0 16px 0 0px !important;color:#fff;font-size:12px !important;height:fit-content;border-bottom:none}.breadcrumb .mdc-select .mdc-notched-outline,.breadcrumb button .mdc-notched-outline{display:none}.breadcrumb .mdc-select.mdc-select--outlined .mdc-select__selected-text,.breadcrumb button.mdc-select--outlined .mdc-select__selected-text{padding:0px}.breadcrumb .mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-line-ripple,.breadcrumb button:not(.mdc-select--disabled).mdc-select--focused .mdc-line-ripple{background-color:#eb8119}.button-select-menu .MuiPaper-root{padding-top:6px;min-width:140px}.button-select-menu .MuiPaper-root .breadcrumb-select-options{margin-bottom:6px}
|
45 |
.collapsible-group{margin:10px 20px}.collapsible-group>button{text-align:left;justify-content:normal;padding:0 15px;height:49px}.collapsible-group>button i{margin-left:10px;font-size:12px;-webkit-transition:all 150ms ease;-moz-transition:all 150ms ease;-ms-transition:all 150ms ease;-o-transition:all 150ms ease;transition:all 150ms ease}.collapsible-group .collapsible-body{padding:18px}.collapsible-group.collapsible-opened>button i{transform:rotate(-180deg)}
|
46 |
+
.settings-container{display:flex;position:relative;margin:15px 0}.settings-container.disabled{opacity:.5;user-select:none}.settings-title{padding-right:15px;padding:4.9px 15px 4.9px 0;margin-right:auto;flex-shrink:0;font-size:14px}.settings-title span,.settings-title i{padding-left:5px;font-size:14px;line-height:14px}.settings-content{display:flex;flex-shrink:1;align-self:center}.container-full-width .settings-content{width:66.666%}
|
47 |
.desktop-mobile-visibility button{min-width:40px;width:40px}.desktop-mobile-visibility button.buttonMobile{margin-right:5px}
|
48 |
.button-action-value a,.button-action-subject a{font-size:14px !important;text-decoration:none;color:#2f7789}.button-action-value .MuiTextField-root,.button-action-subject .MuiTextField-root{margin-bottom:15px}.button-action-value .MuiTextField-root label,.button-action-subject .MuiTextField-root label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.button-action-value .MuiTextField-root label:not(.Mui-focused),.button-action-subject .MuiTextField-root label:not(.Mui-focused){width:92%}
|
49 |
.button-action .button-action-type{padding-bottom:20px}.button-action code{padding:3px 5px 2px 5px;margin:0 1px;background:rgba(0,0,0,.07)}
|
50 |
.form-icon-selector .selector{overflow:hidden;border-radius:4px;cursor:pointer;width:100%}.form-icon-selector .selector .viewer{width:100%;height:65px;background-color:#ddd;display:block;border-radius:0 0 4px 4px;color:#fff;text-align:center}.form-icon-selector .selector span{border-radius:0 0 4px 4px;display:block;color:#fff;text-align:center}
|
51 |
+
.color-picker-main{width:100%;display:flex;justify-content:flex-end}.color-picker-main .color-picker{display:flex;width:100%;cursor:pointer;justify-content:flex-end;height:28px}.color-picker-main .color-picker .gpw{width:100%;background:url(./images/transparent.png) repeat;border-radius:5px 0 0 5px;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16);overflow:hidden;padding:0}.color-picker-main .color-picker .gpw span.color-preview{display:block;height:100%;background:#f08419}.color-picker-main .color-picker .color-button{height:100%;border-radius:0 5px 5px 0;margin-left:1px;margin-right:0px;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16)}.color-picker-main.small .color-picker{display:inline-flex;width:100%;cursor:pointer;justify-content:flex-end;height:28px}.color-picker-main.small .color-picker .gpw{position:absolute;max-width:92px;border-radius:5px;height:inherit}.color-picker-main.small .color-picker .color-button{height:100%;border-radius:5px;opacity:0;min-width:92px;transition:all 250ms ease-in-out 0s}.color-picker-main.small .color-picker:hover .color-button{opacity:1}.gpw .popover .type-selector{margin:3px;width:100%}
|
52 |
.color-picker-container{width:300px;max-width:100%}.color-picker-container .color-container{background:url(./images/transparent.png) repeat}.color-picker-container .color-container .current-color input{height:62px;line-height:62px;text-align:center;color:#fff;font-size:18px;font-weight:500;border:0;padding:0;background:rgba(0,0,0,0);width:100%;border-radius:0;outline:none;font-family:Roboto,sans-serif}.color-picker-container .buttons{text-align:right;padding:5px 10px 10px}.color-picker-container .buttons button{margin-left:5px}.no-select-color-container{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
|
53 |
.slider-container{margin-bottom:15px}.slider-container-input{margin-left:20px;height:28px;max-width:78px;flex-shrink:0}.slider-container-input input{font-size:14px}.slider-container-input input::-webkit-outer-spin-button,.slider-container-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.slider-container-input input[type=number]{-moz-appearance:textfield}
|
|
|
54 |
.disable-setting.disabled{position:relative}.disable-setting.disabled .settings{opacity:.5;pointer-events:none}.disable-setting.disabled .disable-content{position:absolute;bottom:0;top:0;left:0;right:0;text-align:center;max-width:100%;color:#2f7789;font-weight:900;display:flex;align-items:center;user-select:none}.disable-setting.disabled .disable-content .buttonizer-premium{margin-right:30px;margin-left:auto}
|
55 |
.textfield-corners-input{height:100%;max-width:80px;padding-right:5px !important;margin:0 !important}.textfield-corners-input.textfield-corners-select{max-width:35px}.textfield-corners-input .MuiSelect-root{font-size:12px;padding:5px 12px 5px 8px !important}.textfield-corners-input .MuiSvgIcon-root{font-size:1rem;right:0;top:50%;transform:translateY(-50%)}.textfield-corners-input input{font-size:14px;padding:5px 8px}.textfield-corners-input input::-webkit-outer-spin-button,.textfield-corners-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.textfield-corners-input input[type=number]{-moz-appearance:textfield}.textfield-corners-input .MuiInputAdornment-root{margin-left:5px}.textfield-corners-input .MuiInputAdornment-root>p{font-size:14px}.textfield-corners-menu li{padding-left:8px;padding-right:8px;font-size:14px}
|
56 |
+
.box-shadow-input{height:100%;max-width:50px;padding-right:5px !important;margin:0 !important}.box-shadow-input .MuiOutlinedInput-adornedEnd{padding-right:5px}.box-shadow-input .MuiOutlinedInput-adornedEnd input{font-size:14px;padding:7px 5px}.box-shadow-input .MuiOutlinedInput-adornedEnd input::-webkit-outer-spin-button,.box-shadow-input .MuiOutlinedInput-adornedEnd input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.box-shadow-input .MuiOutlinedInput-adornedEnd input[type=number]{-moz-appearance:textfield}.box-shadow-input .MuiOutlinedInput-adornedEnd .box-shadow-input-adornment{color:rgba(0,0,0,.54);font-size:.7rem}.box-shadow-input .MuiInputAdornment-root{margin-left:5px}.box-shadow-input .MuiInputAdornment-root>p{font-size:14px}
|
57 |
.position-buttons-container{margin-bottom:unset}.position-buttons-container .position-buttons{max-width:unset !important}.position-buttons-container .position-buttons button svg{width:20px;fill:currentColor}.position-buttons-container .position-buttons.position-horizontal button:nth-child(1) svg,.position-buttons-container .position-buttons.position-horizontal button:nth-child(2) svg{transform:rotate(-90deg)}.position-buttons-container .position-buttons.position-horizontal button:nth-child(3) svg{transform:rotate(90deg)}.position-buttons-container .position-buttons.position-vertical button:nth-child(3) svg{transform:rotate(180deg)}.position-buttons-container .position-advanced{margin-left:5px}.position-buttons-container .position-advanced .MuiButton-endIcon{margin-left:4px}.position-buttons-container .position-advanced .MuiButton-endIcon.MuiButton-iconSizeMedium .MuiIcon-root{font-size:15px}.position-advanced-container .position-advanced-buttons{flex-grow:1}.position-advanced-container .position-advanced-buttons button{flex-grow:1;height:32px}.position-advanced-container .position-advanced-textfield{font-size:15px;height:32px;padding:0 10px}.position-textfield{height:28px;-moz-appearance:textfield}.position-textfield ::-webkit-outer-spin-button,.position-textfield ::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
|
58 |
.image-selector{display:inline-flex;width:100%;justify-content:flex-end;text-align:center}.image-selector .image{width:100%;height:101px;display:inline-flex;text-decoration:none;line-height:26px;cursor:pointer;border-radius:3px;flex-direction:column;justify-content:flex-end;background-size:cover;background-position:center;background-color:#ededed}.image-selector .image i{font-size:40px;line-height:54px;color:#4795a9bd}.image-selector .image .image-text{background-color:#2f788a;color:#fff;border-radius:0 0 3px 3px}.image-selector .image .selected{opacity:0;transition:250ms}.image-selector .image:hover .selected{opacity:1}
|
59 |
.advanced-scroll-timeout .advanced-timeout{display:flex;margin-bottom:10px}.advanced-scroll-timeout .advanced-timeout .timeout-radio-group{margin-right:0;width:calc(100% /3)}.advanced-scroll-timeout .advanced-timeout .timeout-radio-group .MuiFormControlLabel-label{text-transform:capitalize;text-align:left;display:flex;justify-content:left;color:#717171;font-size:13px;padding-right:40px !important;padding-left:0px !important}.advanced-scroll-timeout .advanced-scroll{display:flex;margin-bottom:10px}.advanced-scroll-timeout .advanced-scroll .scroll-radio-group{margin-right:0;width:calc(100% /3)}.advanced-scroll-timeout .advanced-scroll .scroll-radio-group .MuiFormControlLabel-label{text-transform:capitalize;text-align:left;display:flex;justify-content:left;color:#717171;font-size:13px;padding-right:40px !important;padding-left:0px !important}.advanced-scroll-timeout .advanced-scroll .MuiTextField-root{min-width:calc(100% / 3);margin-top:auto;margin-bottom:auto}.advanced-scroll-timeout .advanced-scroll .advanced-scroll-pixel-percent{display:flex;width:calc(100% / 3);flex-direction:column}.advanced-scroll-timeout .advanced-scroll .advanced-scroll-pixel-percent button{padding:0;height:45%;min-width:30px;font-size:10px;margin:auto}.advanced-scroll-timeout .advanced-scroll-hide{display:flex;justify-content:flex-end}.advanced-scroll-timeout .advanced-scroll-hide .settings-container{height:35px;width:calc(900% / 10)}.advanced-scroll-timeout .advanced-scroll-hide .settings-container .settings-title{font-size:11px}.advanced-scroll-timeout .advanced-scroll-hide .settings-container .MuiTabs-root.icon-or-image{min-height:30px}.advanced-scroll-timeout .advanced-scroll-hide .settings-container.disabled .settings-content .MuiTabs-indicator{background-color:#747474}.advanced-scroll-timeout .advanced-scroll-container{margin:15px 0 -15px}.advanced-scroll-timeout .advanced-scroll-description{display:flex;justify-content:center}.advanced-scroll-timeout .advanced-scroll-description p{margin:0}
|
60 |
+
.buttonizer-bar{position:fixed;left:0;top:0;bottom:0;width:430px;background:#f0f0f0;border-right:1px solid #d2d2d2;transition:all 250ms ease-in-out}.buttonizer-bar:not(.ready){transform:translateX(-440px)}@media screen and (max-width: 769px){.buttonizer-bar{width:100%}}.buttonizer-bar.is-loading .router{opacity:0}.buttonizer-bar.is-loading .buttonizer-logo{display:none}.buttonizer-bar .router-window{position:absolute;top:0;bottom:56px;left:0;width:100%}.buttonizer-bar .router-window .simplebar-content-wrapper{height:100% !important}.buttonizer-bar .router-window .simplebar-placeholder{min-height:100vh}.buttonizer-bar .router-window .router{padding:0 30px 50px}.buttonizer-bar .buttonizer-logo img{max-width:200px;display:block;margin:20px auto 30px}.buttonizer-bar .bar-header{margin:10px 0}.buttonizer-bar .bar-header .breadcrumb{margin:15px 0 15px;display:flex}.buttonizer-bar .bar-header .breadcrumb button{height:28px;line-height:28px;padding:0 10px}.buttonizer-bar .bar-header .breadcrumb button .breadcrumb-text{white-space:nowrap;letter-spacing:.07em;overflow:hidden;text-overflow:ellipsis;height:100%;display:inline-block;align-items:center}.buttonizer-bar .bar-header .breadcrumb button i{margin-left:10px;color:rgba(0,0,0,.3);vertical-align:middle}.buttonizer-bar .bar-header .breadcrumb button.home-button{flex-shrink:0}.buttonizer-bar .bar-header .MuiTabs-flexContainer .MuiTab-textColorSecondary{color:#95bac3}.buttonizer-bar .bar-header .MuiTabs-flexContainer .MuiTab-textColorSecondary:hover{color:#2f7789}.buttonizer-bar .bar-header .MuiTabs-flexContainer .MuiTab-textColorSecondary.Mui-selected{color:#f08419}.buttonizer-bar .bar-header .MuiTabs-flexContainer a{min-width:unset}.buttonizer-bar .bar-header .MuiTabs-flexContainer a i{font-size:20px;margin-bottom:8px}.buttonizer-bar .bar-header .MuiTabs-flexContainer a .MuiTab-wrapper{font-weight:600;font-size:12px;letter-spacing:1.25006px}.buttonizer-bar .bar-footer{position:absolute;bottom:0;left:0;right:0;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16);background:#fff}.buttonizer-bar .bar-footer .bar-footer-container{display:flex;align-content:space-between;padding:10px}.buttonizer-bar .bar-footer .bar-footer-container .settings-button{font-size:20px;position:relative;margin-right:8px}.buttonizer-bar .bar-footer .bar-footer-container button{min-width:36px;height:36px}.buttonizer-bar .bar-footer .bar-footer-container button.MuiIconButton-root{padding:0;font-size:16px}.buttonizer-bar .bar-footer .bar-footer-container .MuiButton-Publish{padding:6px 16px !important;font-size:.785rem !important}.buttonizer-bar .bar-footer .bar-footer-container .footer-button-group-start{position:relative;border-right:#ddd 1px solid;margin-right:5px}
|
61 |
[data-simplebar] {
|
62 |
position: relative;
|
63 |
flex-direction: column;
|
278 |
.drawer-splitter-content-title{padding:15px 0 10px;margin-bottom:15px;font-size:16px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:#2f7789;border-bottom:1px solid rgba(0,0,0,.1)}
|
279 |
.settings-drawer-pages .settings-page-title .title{font-size:40px;font-weight:700}.settings-drawer-pages .settings-page-title .description{font-size:16px;padding:15px 0}.settings-drawer-pages .with-secondary-action{padding-right:80px}.settings-drawer-pages .with-optin-action{padding-right:150px}.settings-drawer-pages .with-permissions{display:block}.settings-drawer-pages .with-permissions>div{flex:none}.settings-drawer-pages .settings-container.select .settings-title{flex-shrink:1;width:calc(122%/ 3)}.settings-drawer-pages .settings-container.select .settings-content{width:52.666%;padding:0 20px;margin:auto}.settings-drawer-pages h2.title{text-transform:uppercase}.settings-drawer-pages .explaination ul{list-style:disc;padding:0 40px}.settings-drawer-pages .explaination button:not(:disabled){background-color:red}.settings-drawer-pages .explaination button .fas.fa-undo{font-size:14px}.settings-drawer-pages .explaination button .fas.fa-undo.spin{animation:spin-animation 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite}@keyframes spin-animation{0%{transform:rotate(0deg)}100%{transform:rotate(-360deg)}}
|
280 |
.buttonizer-drawer{padding:2em}.close-button{float:right;margin:-20px !important}
|
281 |
+
.buttonizer-tour-options .MuiDialog-paperWidthSm{padding-bottom:20px}.buttonizer-tour-options .header{display:flex}.buttonizer-tour-options .header .MuiDialogTitle-root{padding:16px 24px 0}.buttonizer-tour-options .header h2{font-size:28px;color:#2f7789;padding:20px 0 0 10px}.buttonizer-tour-options .header h2 .fa-globe-europe{margin-right:10px}.buttonizer-tour-options .header .skip-button{position:absolute;color:#2f7789;cursor:pointer;margin:5px;right:0;width:38px;height:38px}.buttonizer-tour-options .header .skip-button .fa-times{font-size:18px}.buttonizer-tour-options .list-item{display:flex;color:#000;margin-right:25px}
|
282 |
.premium-dialog #premium-dialog-title h2{-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-image:linear-gradient(-45deg, #ef8419, #ff952a, #3ab0ca, #2a7688);background-size:400% 400%;animation:gradient 5s ease infinite}.premium-dialog .premium-dialog-content{display:flex;flex-flow:row}.premium-dialog .premium-dialog-content.MuiDialogContent-dividers{padding:10px 24px}.premium-dialog .premium-dialog-content p{font-size:14px}.premium-dialog .premium-dialog-content .premium-dialog-text.MuiDialogContent-root:first-child{padding-top:0}.premium-dialog .premium-dialog-content .premium-dialog-text #premium-dialog-description{color:rgba(0,0,0,.87)}.premium-dialog .premium-dialog-content .premium-dialog-text.with-video{border-right:#e0e0e0 1px solid;max-width:641px}.premium-dialog .premium-dialog-content .premium-dialog-text code{display:block;margin-bottom:5px;padding:10px;background:#e0e0e0}.premium-dialog .premium-dialog-content .premium-dialog-text ul{list-style:none;padding:0 13px}.premium-dialog .premium-dialog-content .premium-dialog-text ul li{font-size:16px;line-height:22px;font-weight:500}.premium-dialog .premium-dialog-content .premium-dialog-text ul li:nth-child(odd){color:#2a7688}.premium-dialog .premium-dialog-content .premium-dialog-text ul li:nth-child(even){color:#ef8419}.premium-dialog .premium-dialog-content .premium-dialog-text ul li i{margin-right:10px;font-size:17px}.premium-dialog .premium-dialog-content .premium-dialog-video{width:100%;margin:auto}.premium-dialog .premium-dialog-content .premium-dialog-video iframe{max-width:560px}@keyframes gradient{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
|
283 |
.broke-out-of-iframe{padding:10px 20px;color:#b32828;background:#ffdada;text-align:center;display:flex;align-items:center}.broke-out-of-iframe div{width:100%;line-height:24px;font-size:16px}.broke-out-of-iframe button{margin-left:20px;flex-shrink:0;color:#b32828;border-color:#da9595;background:#fff}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
.introjs-overlay {
|
285 |
position: absolute;
|
286 |
-webkit-box-sizing: content-box;
|
626 |
border: 0;
|
627 |
outline: 0; }
|
628 |
.introjs-hint:hover > .introjs-hint-pulse {
|
629 |
+
background-color: rgba(60, 60, 60, 0.57); }
|
630 |
|
631 |
.introjs-hidehint {
|
632 |
display: none; }
|
634 |
.introjs-fixedhint {
|
635 |
position: fixed; }
|
636 |
|
637 |
+
@-webkit-keyframes introjspulse {
|
638 |
+
0% {
|
639 |
+
-webkit-transform: scale(0.95);
|
640 |
+
transform: scale(0.95);
|
641 |
+
-webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
|
642 |
+
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7); }
|
643 |
+
70% {
|
644 |
+
-webkit-transform: scale(1);
|
645 |
+
transform: scale(1);
|
646 |
+
-webkit-box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
|
647 |
+
box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
|
648 |
+
100% {
|
649 |
+
-webkit-transform: scale(0.95);
|
650 |
+
transform: scale(0.95);
|
651 |
+
-webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
|
652 |
+
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } }
|
653 |
+
|
654 |
+
@keyframes introjspulse {
|
655 |
+
0% {
|
656 |
+
-webkit-transform: scale(0.95);
|
657 |
+
transform: scale(0.95);
|
658 |
+
-webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
|
659 |
+
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7); }
|
660 |
+
70% {
|
661 |
+
-webkit-transform: scale(1);
|
662 |
+
transform: scale(1);
|
663 |
+
-webkit-box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
|
664 |
+
box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
|
665 |
+
100% {
|
666 |
+
-webkit-transform: scale(0.95);
|
667 |
+
transform: scale(0.95);
|
668 |
+
-webkit-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
|
669 |
+
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } }
|
670 |
+
|
671 |
.introjs-hint-pulse {
|
672 |
-webkit-box-sizing: content-box;
|
673 |
box-sizing: content-box;
|
674 |
+
width: 15px;
|
675 |
+
height: 15px;
|
|
|
676 |
border-radius: 30px;
|
677 |
background-color: rgba(136, 136, 136, 0.24);
|
678 |
z-index: 10;
|
679 |
position: absolute;
|
680 |
-webkit-transition: all 0.2s ease-out;
|
681 |
-o-transition: all 0.2s ease-out;
|
682 |
+
transition: all 0.2s ease-out;
|
683 |
+
-webkit-animation: introjspulse 2s infinite;
|
684 |
+
animation: introjspulse 2s infinite; }
|
685 |
|
686 |
+
.introjs-hint-no-anim .introjs-hint-pulse {
|
687 |
-webkit-animation: none;
|
688 |
animation: none; }
|
689 |
|
690 |
.introjs-hint-dot {
|
691 |
-webkit-box-sizing: content-box;
|
692 |
box-sizing: content-box;
|
|
|
693 |
background: transparent;
|
694 |
border-radius: 60px;
|
695 |
height: 50px;
|
696 |
width: 50px;
|
|
|
|
|
|
|
|
|
697 |
position: absolute;
|
698 |
+
top: -18px;
|
699 |
+
left: -18px;
|
700 |
z-index: 1;
|
701 |
opacity: 0; }
|
702 |
|
703 |
+
.tourDialog,.videoDialog,.centerTopDialog,.centerBottomDialog,.centerVideoDialog{padding:15px;min-width:400px;background-color:#d7e5e9;background-repeat:no-repeat;background-image:url(./images/buttonizer-logo.png);background-position:left 30px bottom 20px;background-size:50px}.tourDialog .introjs-tooltip-header,.videoDialog .introjs-tooltip-header,.centerTopDialog .introjs-tooltip-header,.centerBottomDialog .introjs-tooltip-header,.centerVideoDialog .introjs-tooltip-header{position:relative}.tourDialog .introjs-tooltip-header .introjs-tooltip-title,.videoDialog .introjs-tooltip-header .introjs-tooltip-title,.centerTopDialog .introjs-tooltip-header .introjs-tooltip-title,.centerBottomDialog .introjs-tooltip-header .introjs-tooltip-title,.centerVideoDialog .introjs-tooltip-header .introjs-tooltip-title{font-size:22px;color:#2f788a}.tourDialog .introjs-tooltip-header .introjs-skipbutton,.videoDialog .introjs-tooltip-header .introjs-skipbutton,.centerTopDialog .introjs-tooltip-header .introjs-skipbutton,.centerBottomDialog .introjs-tooltip-header .introjs-skipbutton,.centerVideoDialog .introjs-tooltip-header .introjs-skipbutton{color:#000;padding:5px;position:absolute;right:0;top:0}.tourDialog .introjs-tooltiptext,.videoDialog .introjs-tooltiptext,.centerTopDialog .introjs-tooltiptext,.centerBottomDialog .introjs-tooltiptext,.centerVideoDialog .introjs-tooltiptext{font-size:14px;color:#000}.tourDialog .introjs-tooltiptext a,.videoDialog .introjs-tooltiptext a,.centerTopDialog .introjs-tooltiptext a,.centerBottomDialog .introjs-tooltiptext a,.centerVideoDialog .introjs-tooltiptext a{color:#000;text-decoration:none}.tourDialog .introjs-tooltiptext #myVideo,.videoDialog .introjs-tooltiptext #myVideo,.centerTopDialog .introjs-tooltiptext #myVideo,.centerBottomDialog .introjs-tooltiptext #myVideo,.centerVideoDialog .introjs-tooltiptext #myVideo{width:100%;margin-top:-25px}.tourDialog .introjs-tooltiptext h2,.videoDialog .introjs-tooltiptext h2,.centerTopDialog .introjs-tooltiptext h2,.centerBottomDialog .introjs-tooltiptext h2,.centerVideoDialog .introjs-tooltiptext h2{color:#2f788a;margin:50px 0 10px}.tourDialog .introjs-progress,.videoDialog .introjs-progress,.centerTopDialog .introjs-progress,.centerBottomDialog .introjs-progress,.centerVideoDialog .introjs-progress{margin:20px;height:5px;background-color:#fff}.tourDialog .introjs-progress .introjs-progressbar,.videoDialog .introjs-progress .introjs-progressbar,.centerTopDialog .introjs-progress .introjs-progressbar,.centerBottomDialog .introjs-progress .introjs-progressbar,.centerVideoDialog .introjs-progress .introjs-progressbar{background-color:gray}.tourDialog .introjs-tooltipbuttons,.videoDialog .introjs-tooltipbuttons,.centerTopDialog .introjs-tooltipbuttons,.centerBottomDialog .introjs-tooltipbuttons,.centerVideoDialog .introjs-tooltipbuttons{border:none;margin-top:20px;float:right;display:flex;align-items:center}.tourDialog .introjs-tooltipbuttons .introjs-prevbutton,.tourDialog .introjs-tooltipbuttons .introjs-nextbutton,.videoDialog .introjs-tooltipbuttons .introjs-prevbutton,.videoDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-nextbutton{border:none;text-shadow:none;text-transform:uppercase;font-weight:bolder;font-size:12px}.tourDialog .introjs-tooltipbuttons .introjs-prevbutton,.videoDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-prevbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-prevbutton{color:#2f788a;background:none}.tourDialog .introjs-tooltipbuttons .introjs-nextbutton,.videoDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerTopDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerBottomDialog .introjs-tooltipbuttons .introjs-nextbutton,.centerVideoDialog .introjs-tooltipbuttons .introjs-nextbutton{color:#fff;background-color:#ef790c;box-shadow:rgba(0,0,0,.24) 0px 3px 8px;margin-left:5px;padding:10px 15px}.tourDialog .introjs-arrow.left,.videoDialog .introjs-arrow.left,.centerTopDialog .introjs-arrow.left,.centerBottomDialog .introjs-arrow.left,.centerVideoDialog .introjs-arrow.left{border-right-color:#d7e5e9}.tourDialog .introjs-arrow.left-bottom,.videoDialog .introjs-arrow.left-bottom,.centerTopDialog .introjs-arrow.left-bottom,.centerBottomDialog .introjs-arrow.left-bottom,.centerVideoDialog .introjs-arrow.left-bottom{border-right-color:#d7e5e9}.tourDialog .introjs-arrow.right,.videoDialog .introjs-arrow.right,.centerTopDialog .introjs-arrow.right,.centerBottomDialog .introjs-arrow.right,.centerVideoDialog .introjs-arrow.right{border-left-color:#d7e5e9}.tourDialog .introjs-arrow.top,.videoDialog .introjs-arrow.top,.centerTopDialog .introjs-arrow.top,.centerBottomDialog .introjs-arrow.top,.centerVideoDialog .introjs-arrow.top{border-bottom-color:#d7e5e9}.tourDialog .introjs-arrow.top-middle,.videoDialog .introjs-arrow.top-middle,.centerTopDialog .introjs-arrow.top-middle,.centerBottomDialog .introjs-arrow.top-middle,.centerVideoDialog .introjs-arrow.top-middle{border-bottom-color:#d7e5e9}.tourDialog .introjs-arrow.bottom,.videoDialog .introjs-arrow.bottom,.centerTopDialog .introjs-arrow.bottom,.centerBottomDialog .introjs-arrow.bottom,.centerVideoDialog .introjs-arrow.bottom{border-top-color:#d7e5e9}.tourDialog .introjs-arrow.bottom-middle,.videoDialog .introjs-arrow.bottom-middle,.centerTopDialog .introjs-arrow.bottom-middle,.centerBottomDialog .introjs-arrow.bottom-middle,.centerVideoDialog .introjs-arrow.bottom-middle{border-top-color:#d7e5e9}.tourDialog .introjs-arrow.bottom-right,.videoDialog .introjs-arrow.bottom-right,.centerTopDialog .introjs-arrow.bottom-right,.centerBottomDialog .introjs-arrow.bottom-right,.centerVideoDialog .introjs-arrow.bottom-right{border-top-color:#d7e5e9}.videoDialog,.centerVideoDialog{background-image:url(./images/white-background.jpg);background-position:inherit;background-size:620px}.centerTopDialog,.centerVideoDialog{margin-top:20px}.centerBottomDialog{margin:-20px;margin-left:0}
|
704 |
+
.changelog-dialog ::-webkit-scrollbar{width:10px}.changelog-dialog ::-webkit-scrollbar-track{background:#f1f1f1}.changelog-dialog ::-webkit-scrollbar-thumb{background:#888}.changelog-dialog ::-webkit-scrollbar-thumb:hover{background:#555}.changelog-dialog img{margin-top:-8px}.changelog-dialog .close-down{position:absolute;color:#2f7789;cursor:pointer;margin:5px;right:0;font-size:20px;width:38px;height:38px}.changelog-dialog .MuiDialogTitle-root{padding-bottom:0}.changelog-dialog h2{color:#2f7789;font-size:28px}.changelog-dialog .content{padding:0 24px;margin-bottom:20px}.changelog-dialog .content h3{font-size:20px;color:#535353;font-weight:500;margin:25px 0 10px}.changelog-dialog .content .list ul{margin:0;padding-left:20px;color:#535353}.changelog-dialog .content .list .name{font-weight:500}.changelog-dialog .content .list .info{margin-bottom:10px}.changelog-dialog .progress-bar{display:flex;align-items:center;margin:0 200px}.changelog-dialog .progress-bar .dot{height:10px;width:10px;background-color:#f0f0f0;border-radius:50%;margin:0 3px}.changelog-dialog .footer{flex-direction:column}.changelog-dialog .footer .primary-button{margin:10px auto}.changelog-dialog .footer .pagination{display:flex;margin:20px 0}.changelog-dialog .footer .pagination .previous,.changelog-dialog .footer .pagination .next{background:#f0f0f0;color:#f08419;font-size:14px;cursor:pointer;width:38px;height:38px}.changelog-dialog .footer .external-link{color:#2f7789;font-size:14px;margin-bottom:10px;border-radius:unset}.changelog-dialog .footer .external-link .fa-external-link-alt{margin-left:10px;font-size:14px}.changelog-dialog .footer .version{font-size:12px;margin-bottom:20px}
|
705 |
+
.buzzy-urlbar{background:#f0f0f0;border-bottom:1px solid #d2d2d2;position:absolute;top:-65px;left:0;right:0;z-index:999;max-width:1300px;height:60px;transition:all 250ms ease-in-out}.buzzy-urlbar.ready{top:0}.whitten{background:#fff}@media screen and (min-width: 769px){body:not(.hide-buttonizer-bar) .buzzy-urlbar{left:431px}}@media screen and (max-width: 769px){body:not(.hide-buttonizer-bar) .buzzy-urlbar{display:none}}
|
706 |
.btnizr-wp-icon {
|
707 |
+
background: url(./images/wp-icon.png);
|
708 |
}
|
709 |
|
710 |
.btnizr-logo {
|
711 |
+
background: url(./images/logo.png);
|
712 |
}
|
713 |
|
714 |
.btnizr-buttonizer-loading {
|
715 |
+
background: url(./images/buttonizer-loading.png);
|
716 |
}
|
717 |
|
718 |
.btnizr-buttonizer-plugin-icon {
|
719 |
+
background: url(./images/plugin-icon.png);
|
720 |
}
|
721 |
|
722 |
.btnizr-buttonizer-buzzer {
|
723 |
+
background: url(./images/ButtonizerBuzzer.svg);
|
724 |
+
}
|
725 |
+
|
726 |
+
.btnizr-buttonizer-changelog-dialog {
|
727 |
+
background: url(./images/changelog-dialog-header.png);
|
728 |
}
|
729 |
|
730 |
.btnizr-buttonizer-video-tour-group {
|
731 |
+
background: url(./videos/tour_group.mp4);
|
732 |
}
|
733 |
|
734 |
.btnizr-buttonizer-video-tour-style {
|
735 |
+
background: url(./videos/tour_style.mp4);
|
736 |
+
}
|
737 |
+
|
738 |
+
#wpadminbar,#adminmenumain{display:none}#wpcontent,#wpfooter{margin:0;padding:0}.buttonizer-admin-overlay{text-align:center;padding:40px 20px}.buttonizer-initialized .buttonizer-admin-overlay{display:none}html{padding:0 !important}.screen-reader-text{display:none}body.buttonizer-loaded{background:#191e23}.button.button-red{background:#ba0000;border-color:#a00 #900 #900;-webkit-box-shadow:0 1px 0 #900;box-shadow:0 1px 0 #900;color:#fff;text-decoration:none;text-shadow:0 -1px 1px #900,1px 0 1px #900,0 1px 1px #900,-1px 0 1px #900}.button.button-red:hover{background:#c20000 !important;border-color:#900 !important;color:#fff}.button.button-red:active,.button.button-red:focus{background:#a00 !important;border-color:#900 !important;-webkit-box-shadow:inset 0 2px 0 #900;box-shadow:inset 0 2px 0 #900;vertical-align:top;color:#fff}.button.button-red.button-centered-reset{margin:0 auto;padding:4px 20px;height:auto;font-size:15px}.button.button-red.button-centered-reset i{margin-right:10px}.label-settings{display:flex}.label-settings .title{min-width:calc(100% / 3);width:calc(100% / 3)}.label-settings .mdc-slider{width:calc(100% /3)}.icon-settings{display:flex}.icon-settings .title{min-width:calc(100% / 3);width:calc(100% / 3)}.icon-settings .mdc-text-field.small{width:calc(100% / 3) !important;height:28px !important}.icon-settings .mdc-text-field.small .material-icons.mdc-text-field__icon.icon{bottom:9px !important;font-size:10px;margin-right:-8px}.icon-settings .mdc-text-field.small .material-icons.mdc-text-field__icon.text{bottom:6px !important;font-size:10px;margin-right:-9px}.icon-settings .mdc-text-field.small .mdc-text-field__input{padding:0;padding-left:16px !important;padding-right:24px !important;height:28px !important;font-size:14px !important}.buttonizer-preview{position:fixed;left:431px;right:0;top:0;bottom:0;transition:transform 250ms ease-in-out;padding-top:61px}.buttonizer-preview.is-wp-version{padding-top:0}@media screen and (max-width: 769px){.buttonizer-preview{left:0}}.buttonizer-preview.frame-size-tablet{width:720px;max-width:720px;left:50%;margin-left:-170px;right:unset;z-index:-1}.buttonizer-preview.frame-size-mobile{width:340px;height:650px;max-width:340px;top:50%;left:50%;margin-top:-300px;margin-left:15px;right:unset;z-index:-1}.buttonizer-preview iframe{transition:all 250ms ease-in-out}.buttonizer-preview iframe.waitfor{transform:scale(0.8);opacity:0}.hide-bar-button{display:block;position:fixed;left:429px;top:50%;cursor:pointer;margin-top:-30px;z-index:2;height:60px;line-height:60px;width:20px;border-radius:0 10px 10px 0;background:#f0f0f0;border:1px solid #d2d2d2;border-left:1px solid transparent !important;text-align:center;color:#5d5d5d !important;text-decoration:none;transition:all 250ms ease-out;-moz-transition:all 250ms ease-out;-webkit-transition:all 250ms ease-out}.hide-bar-button .fas{margin-left:-4px;color:#2f7789}@media screen and (max-width: 769px){.hide-bar-button{left:unset !important;right:0;top:40px;width:auto;height:auto;line-height:20px;border:0;background:unset;padding:0 20px}.hide-bar-button:before,.hide-bar-button:after{content:none !important}.hide-bar-button:focus{border-left:none !important}}.hide-bar-button .fa-chevron-right{display:none}.hide-bar-button:before{content:"";position:absolute;background-color:transparent;top:-20px;height:20px;width:10px;left:0;box-sizing:inherit;border-bottom-left-radius:10px;box-shadow:0 10px 0 0 #f0f0f0;border-bottom:1px solid #d2d2d2;border-left:1px solid #d2d2d2;transition:all 250ms ease-out;-moz-transition:all 250ms ease-out;-webkit-transition:all 250ms ease-out}.hide-bar-button:after{content:"";position:absolute;background-color:transparent;bottom:-20px;height:20px;width:10px;left:0;box-sizing:inherit;border-top-left-radius:10px;box-shadow:0 -10px 0 0 #f0f0f0;border-top:1px solid #d2d2d2;border-left:1px solid #d2d2d2;transition:all 250ms ease-out;-moz-transition:all 250ms ease-out;-webkit-transition:all 250ms ease-out}.hide-bar-button:focus{outline:none;outline-style:none;box-shadow:none;box-sizing:border-box;border-left:1px solid #f0f0f0}@media screen and (max-width: 769px){body.hide-buttonizer-bar .hide-bar-button{top:110px}}.buttonizer-app .buttonizer-bar,.buttonizer-app .buttonizer-preview,.buttonizer-app .hide-bar-button{transition:all 250ms ease-out;-moz-transition:all 250ms ease-out;-webkit-transition:all 250ms ease-out}@media screen and (max-width: 769px){body.buttonizer-mobile-hide .buttonizer-preview{transform:translateX(100%)}}body.hide-buttonizer-bar .buttonizer-app .buttonizer-bar{transform:translateX(-100%)}body.hide-buttonizer-bar .buttonizer-app .buttonizer-preview,body.hide-buttonizer-bar .buttonizer-app .hide-bar-button{left:-2px}body.hide-buttonizer-bar .buttonizer-app .fas{margin-left:-1px}body.hide-buttonizer-bar .buttonizer-app .hide-bar-button .fa-chevron-right{display:inline-block}body.hide-buttonizer-bar .buttonizer-app .hide-bar-button .fa-chevron-left{display:none}@media screen and (max-width: 769px){body.hide-buttonizer-bar .buttonizer-preview{transform:translateX(0)}}body{color:#717171}.mdc-card{border-radius:4px;background-color:#fff;display:flex;flex-direction:column;box-sizing:border-box;box-shadow:0 1px 1px 0 rgba(60,64,67,.08),0 1px 3px 1px rgba(60,64,67,.16)}.collapsible-group{margin:15px 0 !important}.collapsible-group .collapsible-body{padding:15px}.collapsible-group .collapsible-body .setting-group-title{font-size:13px;color:#888;text-transform:uppercase;font-weight:500}.collapsible-group .collapsible-body .setting-group-title~.setting-group-title{padding-top:10px}.collapsible-group .mdc-button.mdc-button--bold{font-size:13px}.MuiSelect-small .MuiSelect-select{font-size:14px;padding:9px 12px}.Mui-buzz-disabled{color:rgba(0,0,0,.26) !important;cursor:default !important}.Mui-buzz-premium.MuiButton-textPrimary{color:rgba(0,0,0,.26)}.Mui-buzz-premium.MuiButton-containedPrimary{background:rgba(0,0,0,.26)}.Mui-buzz-premium.MuiTabs-root .MuiTab-root{color:rgba(0,0,0,.26)}.Mui-buzz-premium.MuiTabs-root .MuiTabs-indicator{background-color:rgba(0,0,0,.26)}.MuiInputBase-root input[type=number]{-moz-appearance:textfield}.MuiInputBase-root input[type=number]::-webkit-outer-spin-button,.MuiInputBase-root input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}body{font-family:"Roboto","Helvetica","Arial",sans-serif}body.buttonizer-initialized{background:#181818}.tippy-tooltip{background:#6d6d6d;color:#fff}.buttonizer-app{font-family:Roboto,sans-serif;position:fixed;top:0;bottom:0;left:0;right:0}.buttonizer-app a,.buttonizer-app input{box-shadow:none}.buttonizer-app hr{margin-bottom:14px}.dashboard-warning-msg{padding:12px;margin-bottom:15px;font-size:14px;line-height:20px;border:2px solid rgba(240,132,25,.5);color:#f08419;display:block}.dashboard-warning-msg b{display:block}.dashboard-warning-msg a{color:#f08419}iframe{border:0}.simplebar-scrollbar.simplebar-visible:before{opacity:.38 !important}p{font-size:14px;margin-top:5px}
|
739 |
form{display:flex;flex-direction:column;align-items:stretch}form .MuiTextField-root{margin:1em}form .fullwidth-label{align-items:stretch !important}form .crash-report{margin-top:2em}
|
@@ -9,7 +9,7 @@
|
|
9 |
*
|
10 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
11 |
*
|
12 |
-
* (C) 2017-
|
13 |
*
|
14 |
*/
|
15 |
/*!
|
@@ -23,7 +23,7 @@
|
|
23 |
*
|
24 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
25 |
*
|
26 |
-
* (C) 2017-
|
27 |
*
|
28 |
*/
|
29 |
/******/ (function() { // webpackBootstrap
|
@@ -5497,6 +5497,56 @@ var browserPerformanceTimeOrigin = (function () {
|
|
5497 |
|
5498 |
/***/ }),
|
5499 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5500 |
/***/ 9669:
|
5501 |
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
5502 |
|
@@ -7469,11 +7519,11 @@ module.exports = {
|
|
7469 |
/***/ (function(module) {
|
7470 |
|
7471 |
"use strict";
|
7472 |
-
module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]
|
7473 |
|
7474 |
/***/ }),
|
7475 |
|
7476 |
-
/***/
|
7477 |
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
7478 |
|
7479 |
"use strict";
|
@@ -8271,6 +8321,7 @@ var drawers = {
|
|
8271 |
reset: "reset"
|
8272 |
},
|
8273 |
BUTTONIZER_TOUR: "buttonizertour",
|
|
|
8274 |
TIME_SCHEDULES: "timeschedules",
|
8275 |
PAGE_RULES: "pagerules"
|
8276 |
};
|
@@ -8435,6 +8486,7 @@ function closeDrawer() {
|
|
8435 |
;// CONCATENATED MODULE: ./src/js/utils/utils/data-utils.js
|
8436 |
/* global Map */
|
8437 |
|
|
|
8438 |
function dateToFormat(date) {
|
8439 |
if (!date) return null;
|
8440 |
|
@@ -8455,22 +8507,50 @@ function formatToDate(format) {
|
|
8455 |
var dateParts = format.split("-");
|
8456 |
return new Date(dateParts[2], dateParts[1] - 1, dateParts[0]);
|
8457 |
}
|
8458 |
-
var importIcons = function () {
|
8459 |
-
var
|
8460 |
-
|
8461 |
-
|
8462 |
-
|
8463 |
-
|
8464 |
-
|
8465 |
-
|
8466 |
-
|
8467 |
-
|
8468 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8469 |
});
|
8470 |
-
|
8471 |
-
|
8472 |
-
};
|
8473 |
-
}();
|
8474 |
// EXTERNAL MODULE: ./node_modules/uuid/v4.js
|
8475 |
var v4 = __webpack_require__(71171);
|
8476 |
var v4_default = /*#__PURE__*/__webpack_require__.n(v4);
|
@@ -8543,17 +8623,16 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
8543 |
|
8544 |
function helpers_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
8545 |
|
8546 |
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = helpers_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
8547 |
-
|
8548 |
-
function helpers_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return helpers_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return helpers_arrayLikeToArray(o, minLen); }
|
8549 |
-
|
8550 |
-
function helpers_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
8551 |
-
|
8552 |
|
8553 |
|
8554 |
|
8555 |
|
8556 |
|
|
|
|
|
|
|
|
|
|
|
8557 |
/**
|
8558 |
* Create api request
|
8559 |
*maar j
|
@@ -8562,11 +8641,64 @@ function helpers_arrayLikeToArray(arr, len) { if (len == null || len > arr.lengt
|
|
8562 |
*/
|
8563 |
|
8564 |
function apiRequest(endpoint, data) {
|
8565 |
-
|
8566 |
-
data.
|
8567 |
-
|
8568 |
-
|
8569 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8570 |
}
|
8571 |
/**
|
8572 |
* init store
|
@@ -8596,40 +8728,19 @@ function convertData(result) {
|
|
8596 |
var buttons = {};
|
8597 |
var groups = {}; // Initializing groups
|
8598 |
|
8599 |
-
|
8600 |
-
|
8601 |
-
|
8602 |
-
try {
|
8603 |
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
8604 |
-
var group = _step.value;
|
8605 |
-
var groupObject = createRecord(group.data);
|
8606 |
-
groupObject.children = []; // Initializing buttons inside the group
|
8607 |
-
|
8608 |
-
var _iterator2 = _createForOfIteratorHelper(group.buttons),
|
8609 |
-
_step2;
|
8610 |
-
|
8611 |
-
try {
|
8612 |
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
8613 |
-
var button = _step2.value;
|
8614 |
-
var buttonObject = createRecord(button);
|
8615 |
-
buttonObject.parent = groupObject.id;
|
8616 |
-
buttons[buttonObject.id] = buttonObject;
|
8617 |
-
groupObject.children.push(buttonObject.id);
|
8618 |
-
}
|
8619 |
-
} catch (err) {
|
8620 |
-
_iterator2.e(err);
|
8621 |
-
} finally {
|
8622 |
-
_iterator2.f();
|
8623 |
-
}
|
8624 |
-
|
8625 |
-
groups[groupObject.id] = groupObject;
|
8626 |
-
}
|
8627 |
-
} catch (err) {
|
8628 |
-
_iterator.e(err);
|
8629 |
-
} finally {
|
8630 |
-
_iterator.f();
|
8631 |
-
}
|
8632 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8633 |
var timeSchedules = {};
|
8634 |
var pageRules = {};
|
8635 |
|
@@ -8679,9 +8790,12 @@ function convertData(result) {
|
|
8679 |
premium_code: data.premium_code,
|
8680 |
version: data.version,
|
8681 |
wordpress: data.wordpress,
|
|
|
8682 |
is_opt_in: data.is_opt_in,
|
8683 |
latest_tour_update: data.latest_tour_update,
|
8684 |
-
|
|
|
|
|
8685 |
};
|
8686 |
}
|
8687 |
function createRecord(data) {
|
@@ -8961,26 +9075,12 @@ function generateJSONObject(storeDataObject) {
|
|
8961 |
});
|
8962 |
return data;
|
8963 |
}
|
8964 |
-
/**
|
8965 |
-
* Create api request
|
8966 |
-
*
|
8967 |
-
* @param {*} endpoint
|
8968 |
-
* @param {*} data
|
8969 |
-
*/
|
8970 |
-
|
8971 |
-
function savingHelpers_apiRequest(endpoint, data) {
|
8972 |
-
data.url = buttonizer_admin.api + endpoint;
|
8973 |
-
data.headers = {
|
8974 |
-
"X-WP-Nonce": buttonizer_admin.nonce
|
8975 |
-
};
|
8976 |
-
return axios_default()(data);
|
8977 |
-
}
|
8978 |
/**
|
8979 |
* Reset Buttonizer
|
8980 |
*/
|
8981 |
|
8982 |
function resetSettings() {
|
8983 |
-
return
|
8984 |
method: "POST",
|
8985 |
data: {
|
8986 |
nonce: buttonizer_admin.nonce
|
@@ -11450,14 +11550,15 @@ function startTransaction(context, customSamplingContext) {
|
|
11450 |
* Reload preview
|
11451 |
*/
|
11452 |
|
11453 |
-
function reloadPreview(forceReloadPreview) {
|
11454 |
// Post reload buttonizer
|
11455 |
try {
|
11456 |
document.querySelector(".buttonizer-preview iframe").contentWindow.postMessage({
|
11457 |
eventType: "buttonizer",
|
11458 |
messageType: "preview-reload",
|
11459 |
message: {
|
11460 |
-
force: forceReloadPreview
|
|
|
11461 |
}
|
11462 |
}, document.location.origin);
|
11463 |
} catch (e) {
|
@@ -11573,6 +11674,9 @@ Queue_defineProperty(SavingQueue, "queue", []);
|
|
11573 |
Queue_defineProperty(SavingQueue, "workingOnPromise", false);
|
11574 |
|
11575 |
|
|
|
|
|
|
|
11576 |
;// CONCATENATED MODULE: ./src/js/dashboard/store/actions/savingMiddleware.js
|
11577 |
|
11578 |
|
@@ -11583,6 +11687,8 @@ Queue_defineProperty(SavingQueue, "workingOnPromise", false);
|
|
11583 |
|
11584 |
|
11585 |
|
|
|
|
|
11586 |
var timer = setTimeout(function () {});
|
11587 |
var currentState = {};
|
11588 |
/**
|
@@ -11600,7 +11706,7 @@ function save() {
|
|
11600 |
}
|
11601 |
|
11602 |
if (!isEqual_default()(oldStore.buttons, currentState.buttons) || !isEqual_default()(oldStore.groups, currentState.groups)) {
|
11603 |
-
SavingQueue.enqueue(saveData(generateJSONObject(dashboard_store.getState().groups), "/buttons"));
|
11604 |
}
|
11605 |
/* webpack-strip-block:removed */
|
11606 |
|
@@ -11619,6 +11725,7 @@ function save() {
|
|
11619 |
|
11620 |
var saveData = function saveData(data, endpoint) {
|
11621 |
var forceReloadPreview = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
|
11622 |
|
11623 |
var fail = function fail(e) {
|
11624 |
if (e && e.request) {
|
@@ -11636,10 +11743,10 @@ var saveData = function saveData(data, endpoint) {
|
|
11636 |
};
|
11637 |
|
11638 |
return function () {
|
11639 |
-
return
|
11640 |
method: "POST",
|
11641 |
data: {
|
11642 |
-
nonce: buttonizer_admin.nonce,
|
11643 |
data: data
|
11644 |
}
|
11645 |
}).then(function (_ref) {
|
@@ -11652,7 +11759,7 @@ var saveData = function saveData(data, endpoint) {
|
|
11652 |
}
|
11653 |
|
11654 |
dashboard_store.dispatch(changeIsUpdating(false));
|
11655 |
-
reloadPreview(forceReloadPreview);
|
11656 |
})["catch"](fail);
|
11657 |
};
|
11658 |
};
|
@@ -11794,7 +11901,8 @@ var defaultStore = {
|
|
11794 |
switch (action.type) {
|
11795 |
case buttonizer_constants_actionTypes.INIT:
|
11796 |
{
|
11797 |
-
|
|
|
11798 |
|
11799 |
draftStore.loading.loadingIframe = true; // Show loading
|
11800 |
|
@@ -11808,6 +11916,7 @@ var defaultStore = {
|
|
11808 |
draftStore.latest_tour_update = action.payload.latest_tour_update;
|
11809 |
draftStore.additional_permissions = action.payload.additional_permissions;
|
11810 |
draftStore._premiumCode = action.payload.premium_code;
|
|
|
11811 |
break;
|
11812 |
}
|
11813 |
|
@@ -12271,6 +12380,10 @@ function _updatePreviewData() {
|
|
12271 |
return _updatePreviewData.apply(this, arguments);
|
12272 |
}
|
12273 |
|
|
|
|
|
|
|
|
|
12274 |
function sendPostMessage(type) {
|
12275 |
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
12276 |
var frame = document.querySelector(".buttonizer-preview iframe"); // Post message to the frame
|
@@ -18490,11 +18603,11 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy_esm));
|
|
18490 |
|
18491 |
;// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Context.js
|
18492 |
|
18493 |
-
var
|
18494 |
|
18495 |
if (false) {}
|
18496 |
|
18497 |
-
/* harmony default export */ var Context = ((/* unused pure expression or super */ null && (
|
18498 |
;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/batch.js
|
18499 |
// Default to a dummy "batch" implementation that just runs the callback
|
18500 |
function defaultNoopBatch(callback) {
|
@@ -18679,7 +18792,7 @@ function Provider(_ref) {
|
|
18679 |
subscription.onStateChange = null;
|
18680 |
};
|
18681 |
}, [contextValue, previousState]);
|
18682 |
-
var Context = context ||
|
18683 |
return /*#__PURE__*/react.createElement(Context.Provider, {
|
18684 |
value: contextValue
|
18685 |
}, children);
|
@@ -18858,7 +18971,7 @@ _ref) {
|
|
18858 |
_ref2$forwardRef = _ref2.forwardRef,
|
18859 |
forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef,
|
18860 |
_ref2$context = _ref2.context,
|
18861 |
-
context = _ref2$context === void 0 ?
|
18862 |
connectOptions = (0,objectWithoutPropertiesLoose/* default */.Z)(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"]);
|
18863 |
|
18864 |
if (false) { var customStoreWarningMessage; }
|
@@ -19411,7 +19524,7 @@ function createConnect(_temp) {
|
|
19411 |
*/
|
19412 |
|
19413 |
function useReduxContext_useReduxContext() {
|
19414 |
-
var contextValue = (0,react.useContext)(
|
19415 |
|
19416 |
if (false) {}
|
19417 |
|
@@ -19428,13 +19541,13 @@ function useReduxContext_useReduxContext() {
|
|
19428 |
* @returns {Function} A `useStore` hook bound to the specified context.
|
19429 |
*/
|
19430 |
|
19431 |
-
function
|
19432 |
if (context === void 0) {
|
19433 |
context = ReactReduxContext;
|
19434 |
}
|
19435 |
|
19436 |
-
var useReduxContext = context === ReactReduxContext ?
|
19437 |
-
return
|
19438 |
};
|
19439 |
return function useStore() {
|
19440 |
var _useReduxContext = useReduxContext(),
|
@@ -19459,7 +19572,7 @@ function createStoreHook(context) {
|
|
19459 |
* }
|
19460 |
*/
|
19461 |
|
19462 |
-
var
|
19463 |
;// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useDispatch.js
|
19464 |
|
19465 |
|
@@ -19475,7 +19588,7 @@ function createDispatchHook(context) {
|
|
19475 |
context = ReactReduxContext;
|
19476 |
}
|
19477 |
|
19478 |
-
var useStore = context === ReactReduxContext ?
|
19479 |
return function useDispatch() {
|
19480 |
var store = useStore();
|
19481 |
return store.dispatch;
|
@@ -19503,7 +19616,7 @@ function createDispatchHook(context) {
|
|
19503 |
* }
|
19504 |
*/
|
19505 |
|
19506 |
-
var useDispatch = /*#__PURE__*/createDispatchHook();
|
19507 |
;// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useSelector.js
|
19508 |
|
19509 |
|
@@ -19597,10 +19710,10 @@ function useSelectorWithStoreAndSubscription(selector, equalityFn, store, contex
|
|
19597 |
|
19598 |
function createSelectorHook(context) {
|
19599 |
if (context === void 0) {
|
19600 |
-
context =
|
19601 |
}
|
19602 |
|
19603 |
-
var useReduxContext = context ===
|
19604 |
return (0,react.useContext)(context);
|
19605 |
};
|
19606 |
return function useSelector(selector, equalityFn) {
|
@@ -19667,6 +19780,8 @@ setBatch(react_dom.unstable_batchedUpdates);
|
|
19667 |
|
19668 |
|
19669 |
|
|
|
|
|
19670 |
function Tippy(_ref) {
|
19671 |
var props = _ref.props,
|
19672 |
_ref$arrow = _ref.arrow,
|
@@ -19674,22 +19789,22 @@ function Tippy(_ref) {
|
|
19674 |
_ref$trigger = _ref.trigger,
|
19675 |
trigger = _ref$trigger === void 0 ? "manual" : _ref$trigger,
|
19676 |
preference = _ref.preference;
|
19677 |
-
if (!preference) return props.children;
|
19678 |
var test = setTimeout(function () {});
|
19679 |
var currentX = false;
|
19680 |
var currentY = false;
|
19681 |
return /*#__PURE__*/react.createElement(tippy_react_esm, {
|
19682 |
-
content: props.content,
|
19683 |
hideOnClick: props.hideOnClick,
|
19684 |
theme: "material" // duration={[100, 100]}
|
19685 |
,
|
19686 |
-
disabled: preference ? props.disabled : true,
|
19687 |
trigger: trigger,
|
19688 |
arrow: arrow,
|
19689 |
onCreate: function onCreate(instance) {
|
19690 |
if (trigger === "manual") {
|
19691 |
instance.reference.addEventListener("mousemove", function (e) {
|
19692 |
-
if (currentX && currentY && (Math.abs(e.clientX - currentX) >
|
19693 |
clearTimeout(test);
|
19694 |
test = setTimeout(function () {
|
19695 |
instance.show();
|
@@ -19703,9 +19818,6 @@ function Tippy(_ref) {
|
|
19703 |
currentX = currentY = false;
|
19704 |
});
|
19705 |
}
|
19706 |
-
},
|
19707 |
-
onDestroy: function onDestroy() {
|
19708 |
-
clearTimeout(test);
|
19709 |
}
|
19710 |
}, props.children);
|
19711 |
}
|
@@ -19974,7 +20086,6 @@ function DevicePreview_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr;
|
|
19974 |
|
19975 |
|
19976 |
|
19977 |
-
|
19978 |
function DevicePreview() {
|
19979 |
var _useState = (0,react.useState)("desktop"),
|
19980 |
_useState2 = DevicePreview_slicedToArray(_useState, 2),
|
@@ -19984,11 +20095,11 @@ function DevicePreview() {
|
|
19984 |
|
19985 |
function setDevice(device) {
|
19986 |
// Don't change anything when chosen device is already selected
|
19987 |
-
if (device !==
|
19988 |
// Device
|
19989 |
setCurrentDevicePreview(device); // Update class
|
19990 |
|
19991 |
-
|
19992 |
}
|
19993 |
}
|
19994 |
|
@@ -20079,7 +20190,7 @@ function PublishButton(_ref) {
|
|
20079 |
|
20080 |
function publish() {
|
20081 |
setIsPublishing(true);
|
20082 |
-
|
20083 |
method: "POST",
|
20084 |
data: {
|
20085 |
nonce: buttonizer_admin.nonce
|
@@ -22537,7 +22648,7 @@ function RevertButton(_ref) {
|
|
22537 |
|
22538 |
|
22539 |
function startReverting() {
|
22540 |
-
|
22541 |
method: "POST",
|
22542 |
data: {
|
22543 |
nonce: buttonizer_admin.nonce
|
@@ -26115,16 +26226,16 @@ function Prompt(_ref) {
|
|
26115 |
|
26116 |
if (false) { var messageType; }
|
26117 |
|
26118 |
-
var
|
26119 |
var cacheLimit = 10000;
|
26120 |
var cacheCount = 0;
|
26121 |
|
26122 |
function compilePath(path) {
|
26123 |
-
if (
|
26124 |
var generator = pathToRegexp.compile(path);
|
26125 |
|
26126 |
if (cacheCount < cacheLimit) {
|
26127 |
-
|
26128 |
cacheCount++;
|
26129 |
}
|
26130 |
|
@@ -26527,28 +26638,28 @@ function withRouter(Component) {
|
|
26527 |
return hoist_non_react_statics_cjs_default()(C, Component);
|
26528 |
}
|
26529 |
|
26530 |
-
var
|
26531 |
function useHistory() {
|
26532 |
if (false) {}
|
26533 |
|
26534 |
-
return
|
26535 |
}
|
26536 |
function useLocation() {
|
26537 |
if (false) {}
|
26538 |
|
26539 |
-
return
|
26540 |
}
|
26541 |
function useParams() {
|
26542 |
if (false) {}
|
26543 |
|
26544 |
-
var match =
|
26545 |
return match ? match.params : {};
|
26546 |
}
|
26547 |
function useRouteMatch(path) {
|
26548 |
if (false) {}
|
26549 |
|
26550 |
var location = useLocation();
|
26551 |
-
var match =
|
26552 |
return path ? matchPath(location.pathname, path) : match;
|
26553 |
}
|
26554 |
|
@@ -26740,14 +26851,16 @@ function GroupActions_addGroup(payload) {
|
|
26740 |
|
26741 |
dispatch(dataActions_addRelation(button.id, group.id));
|
26742 |
}
|
26743 |
-
function
|
26744 |
var dispatch = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : dashboard_store.dispatch;
|
|
|
26745 |
var button = dispatch(dataActions_addRecord(GroupActions_objectSpread({
|
26746 |
name: translate("utils.new_button"),
|
26747 |
show_mobile: true,
|
26748 |
show_desktop: true
|
26749 |
}, payload), "buttons")).payload.record;
|
26750 |
dispatch(dataActions_addRelation(button.id, group_id, index));
|
|
|
26751 |
}
|
26752 |
function GroupActions_removeGroup(id) {
|
26753 |
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.store.getState();
|
@@ -26803,7 +26916,7 @@ function importGroup() {
|
|
26803 |
buttons.map(function (button, key) {
|
26804 |
// Do not import
|
26805 |
if (Object.keys(button).length === 0) return false;
|
26806 |
-
|
26807 |
});
|
26808 |
}
|
26809 |
function replaceGroup(currentGroupId, groupAttr, buttons) {
|
@@ -26821,7 +26934,7 @@ function replaceGroup(currentGroupId, groupAttr, buttons) {
|
|
26821 |
buttons.map(function (button, key) {
|
26822 |
// Do not import
|
26823 |
if (Object.keys(button).length === 0) return false;
|
26824 |
-
|
26825 |
});
|
26826 |
} else {
|
26827 |
console.error(state.groups, state.groups[currentGroupId]);
|
@@ -26867,7 +26980,7 @@ function ButtonActions_duplicateButton(id, group_id, payload) {
|
|
26867 |
}
|
26868 |
|
26869 |
delete attr.id;
|
26870 |
-
|
26871 |
return item.id === id ? index + 1 : acc;
|
26872 |
}, ""), dispatch);
|
26873 |
} else {
|
@@ -27279,10 +27392,14 @@ var DeleteButton = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
27279 |
disabled: deleteDisabled,
|
27280 |
style: {
|
27281 |
"float": "right"
|
27282 |
-
}
|
|
|
27283 |
}, /*#__PURE__*/react.createElement(IconButton_IconButton, DeleteButton_extends({
|
27284 |
-
onClick: function onClick() {
|
27285 |
-
|
|
|
|
|
|
|
27286 |
},
|
27287 |
color: "primary",
|
27288 |
disabled: deleteDisabled,
|
@@ -27297,18 +27414,29 @@ var DeleteButton = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
27297 |
overflow: "unset"
|
27298 |
},
|
27299 |
className: "fas fa-times"
|
27300 |
-
})))) : /*#__PURE__*/react.createElement(
|
27301 |
-
|
27302 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27303 |
},
|
27304 |
disabled: deleteDisabled,
|
27305 |
-
"data-testid": model === "page_rule" ? props["data-testid"] : "delete-button-".concat(model)
|
27306 |
-
ref: ref
|
27307 |
}, /*#__PURE__*/react.createElement(ListItemIcon_ListItemIcon, null, /*#__PURE__*/react.createElement(Icon_Icon, {
|
27308 |
className: "fas fa-trash-alt"
|
27309 |
})), /*#__PURE__*/react.createElement(Typography_Typography, {
|
27310 |
variant: "inherit"
|
27311 |
-
}, translate("utils.delete")))), /*#__PURE__*/react.createElement(ConfirmDialog, {
|
27312 |
open: dialogOpened,
|
27313 |
title: deleteDisabled ? translate("modal.remove.".concat(model, ".cannot_delete_window_title")) : translate("modal.remove.".concat(model, ".window_title")),
|
27314 |
buttons: deleteDisabled ? [{
|
@@ -31251,10 +31379,12 @@ function DuplicateButton(_ref) {
|
|
31251 |
setDialogOpened = _useState2[1];
|
31252 |
|
31253 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
31254 |
-
content: translate("utils.duplicate")
|
|
|
31255 |
}, /*#__PURE__*/react.createElement(IconButton_IconButton, DuplicateButton_extends({
|
31256 |
-
onClick: function onClick() {
|
31257 |
-
return
|
|
|
31258 |
},
|
31259 |
color: "primary",
|
31260 |
size: size,
|
@@ -31810,6 +31940,11 @@ function ExportButton(_ref) {
|
|
31810 |
foundGroup = _useState6[0],
|
31811 |
setFoundGroup = _useState6[1];
|
31812 |
|
|
|
|
|
|
|
|
|
|
|
31813 |
var foundParenData = pick_default()(group_data, settingKeys.stylingNoGroup) || false;
|
31814 |
var state = useSelector(function (state) {
|
31815 |
return state;
|
@@ -31842,6 +31977,7 @@ function ExportButton(_ref) {
|
|
31842 |
buttons: foundButtons
|
31843 |
};
|
31844 |
exportData.export_type = type;
|
|
|
31845 |
downloadObjectAsJson(exportData, downloadName);
|
31846 |
setDialogOpened(false);
|
31847 |
setFoundGroup(false);
|
@@ -31851,6 +31987,7 @@ function ExportButton(_ref) {
|
|
31851 |
var mergeGroupData = function mergeGroupData() {
|
31852 |
var merged = merge_default()({}, foundParenData, foundButtons[0]);
|
31853 |
setFoundButtons([merged]);
|
|
|
31854 |
};
|
31855 |
|
31856 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
@@ -31863,7 +32000,8 @@ function ExportButton(_ref) {
|
|
31863 |
}, translate("import_export.export.export_".concat(type)))), /*#__PURE__*/react.createElement(Dialog_Dialog, {
|
31864 |
open: dialogOpened,
|
31865 |
onClose: function onClose() {
|
31866 |
-
|
|
|
31867 |
},
|
31868 |
maxWidth: "xs",
|
31869 |
fullWidth: true,
|
@@ -31895,12 +32033,13 @@ function ExportButton(_ref) {
|
|
31895 |
"data-testid": "export-merge",
|
31896 |
style: {
|
31897 |
marginRight: "auto"
|
31898 |
-
}
|
|
|
31899 |
}, translate("import_export.export.merge")), /*#__PURE__*/react.createElement(Button_Button, {
|
31900 |
onClick: function onClick() {
|
31901 |
return setDialogOpened(false);
|
31902 |
-
}
|
31903 |
-
|
31904 |
}, translate("modal.cancel")), /*#__PURE__*/react.createElement(Button_Button, {
|
31905 |
onClick: function onClick() {
|
31906 |
return onExport();
|
@@ -32052,9 +32191,13 @@ function ButtonContainer(_ref) {
|
|
32052 |
className: "fas fa-desktop"
|
32053 |
})))), /*#__PURE__*/react.createElement("div", {
|
32054 |
className: "clear"
|
32055 |
-
}))), /*#__PURE__*/react.createElement(
|
32056 |
-
|
32057 |
-
|
|
|
|
|
|
|
|
|
32058 |
},
|
32059 |
color: "primary",
|
32060 |
variant: "text",
|
@@ -32066,7 +32209,7 @@ function ButtonContainer(_ref) {
|
|
32066 |
className: "fas fa-plus-circle"
|
32067 |
}),
|
32068 |
"data-testid": "new-button"
|
32069 |
-
}, translate("utils.add_button")));
|
32070 |
}
|
32071 |
|
32072 |
/* harmony default export */ var ButtonContainer_ButtonContainer = (connect(function (state) {
|
@@ -40892,6 +41035,118 @@ function getCookie(name) {
|
|
40892 |
function setCookie(cname, value) {
|
40893 |
document.cookie = cname + "=" + value;
|
40894 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40895 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/FileDragAndDrop/FileDragAndDrop.js
|
40896 |
function FileDragAndDrop_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { FileDragAndDrop_typeof = function _typeof(obj) { return typeof obj; }; } else { FileDragAndDrop_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return FileDragAndDrop_typeof(obj); }
|
40897 |
|
@@ -40921,7 +41176,7 @@ function FileDragAndDrop_defineProperty(obj, key, value) { if (key in obj) { Obj
|
|
40921 |
|
40922 |
|
40923 |
|
40924 |
-
var
|
40925 |
return {
|
40926 |
border: {
|
40927 |
border: "dashed ".concat(theme.palette.primary.main, " 3px"),
|
@@ -41052,11 +41307,15 @@ var FileDragAndDrop = /*#__PURE__*/function (_Component) {
|
|
41052 |
return FileDragAndDrop;
|
41053 |
}(react.Component);
|
41054 |
|
41055 |
-
/* harmony default export */ var FileDragAndDrop_FileDragAndDrop = ((0,withStyles/* default */.Z)(
|
41056 |
// EXTERNAL MODULE: ./node_modules/lodash/cloneDeep.js
|
41057 |
var cloneDeep = __webpack_require__(50361);
|
41058 |
var cloneDeep_default = /*#__PURE__*/__webpack_require__.n(cloneDeep);
|
41059 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Containers/ContainerActions/ImportButton.js
|
|
|
|
|
|
|
|
|
41060 |
function ImportButton_slicedToArray(arr, i) { return ImportButton_arrayWithHoles(arr) || ImportButton_iterableToArrayLimit(arr, i) || ImportButton_unsupportedIterableToArray(arr, i) || ImportButton_nonIterableRest(); }
|
41061 |
|
41062 |
function ImportButton_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -41081,6 +41340,7 @@ function ImportButton_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr;
|
|
41081 |
|
41082 |
|
41083 |
|
|
|
41084 |
function ImportButton(_ref) {
|
41085 |
var _ref$isGroup = _ref.isGroup,
|
41086 |
isGroup = _ref$isGroup === void 0 ? true : _ref$isGroup,
|
@@ -41088,7 +41348,11 @@ function ImportButton(_ref) {
|
|
41088 |
currentGroup = _ref$currentGroup === void 0 ? null : _ref$currentGroup,
|
41089 |
_ref$label = _ref.label,
|
41090 |
label = _ref$label === void 0 ? "Import Group" : _ref$label,
|
41091 |
-
index = _ref.index
|
|
|
|
|
|
|
|
|
41092 |
|
41093 |
var _useState = (0,react.useState)(false),
|
41094 |
_useState2 = ImportButton_slicedToArray(_useState, 2),
|
@@ -41111,10 +41375,6 @@ function ImportButton(_ref) {
|
|
41111 |
setFoundGroup = _useState8[1];
|
41112 |
|
41113 |
var importFileUploader = (0,react.useRef)(null);
|
41114 |
-
var dispatch = useDispatch();
|
41115 |
-
var state = useSelector(function (state) {
|
41116 |
-
return state;
|
41117 |
-
});
|
41118 |
|
41119 |
var onFileSelect = function onFileSelect(files) {
|
41120 |
// Get file
|
@@ -41122,76 +41382,121 @@ function ImportButton(_ref) {
|
|
41122 |
|
41123 |
var readFile = new FileReader(); // After reading the file
|
41124 |
|
41125 |
-
readFile.addEventListener("load", function (
|
41126 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41127 |
|
41128 |
-
|
41129 |
-
var fileResult = JSON.parse(result); // Malformed data
|
41130 |
|
41131 |
-
|
41132 |
-
|
41133 |
-
|
|
|
|
|
41134 |
|
|
|
|
|
|
|
|
|
41135 |
|
41136 |
-
|
41137 |
-
|
41138 |
-
|
41139 |
-
|
41140 |
|
41141 |
-
|
41142 |
-
|
41143 |
-
alert(translate("import_export.import.warning.no_buttons"));
|
41144 |
-
return;
|
41145 |
-
}
|
41146 |
|
41147 |
-
|
41148 |
-
|
41149 |
-
|
41150 |
-
|
41151 |
-
|
41152 |
-
|
41153 |
-
|
41154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41155 |
}
|
41156 |
-
|
|
|
|
|
41157 |
|
41158 |
-
|
41159 |
-
|
41160 |
-
|
41161 |
-
|
41162 |
-
});
|
41163 |
readFile.readAsText(file);
|
41164 |
}; // Import the files
|
41165 |
|
41166 |
|
41167 |
var onImport = function onImport() {
|
41168 |
if (isGroup) {
|
41169 |
-
|
41170 |
-
if (currentGroup) {
|
41171 |
-
if (foundGroup && foundButtons) {
|
41172 |
-
// Replace Current Group
|
41173 |
-
console.log("Replace current group"); // addGroup(foundGroup);
|
41174 |
-
|
41175 |
-
replaceGroup(currentGroup.id, foundGroup, foundButtons, dispatch, state);
|
41176 |
-
}
|
41177 |
-
|
41178 |
-
if (foundButtons && !foundGroup) {
|
41179 |
-
// Add Buttons into current group
|
41180 |
-
console.log("Add Buttons into current group");
|
41181 |
-
foundButtons.map(function (button, key) {
|
41182 |
-
// Do not import
|
41183 |
-
if (Object.keys(button).length === 0) return false;
|
41184 |
-
GroupActions_addButton(button, currentGroup.id, currentGroup.children.length + key + 1, dispatch);
|
41185 |
-
});
|
41186 |
-
}
|
41187 |
-
} // Should create a new group
|
41188 |
-
else if (foundGroup && !currentGroup) {
|
41189 |
-
console.log("Should create a new group");
|
41190 |
-
importGroup(foundGroup, foundButtons, index, dispatch);
|
41191 |
-
} else if (foundButtons && !foundGroup && !currentGroup) {
|
41192 |
-
console.log("Should create a new group with imported button");
|
41193 |
-
importGroup(foundGroup, foundButtons, index, dispatch);
|
41194 |
-
}
|
41195 |
} // Reset
|
41196 |
|
41197 |
|
@@ -41201,7 +41506,7 @@ function ImportButton(_ref) {
|
|
41201 |
setFoundGroup(false);
|
41202 |
};
|
41203 |
|
41204 |
-
return /*#__PURE__*/react.createElement(react.Fragment, null,
|
41205 |
onClick: function onClick() {
|
41206 |
return setDialogOpened(true);
|
41207 |
},
|
@@ -41211,8 +41516,11 @@ function ImportButton(_ref) {
|
|
41211 |
})), /*#__PURE__*/react.createElement(Typography_Typography, {
|
41212 |
variant: "inherit"
|
41213 |
}, label)) : /*#__PURE__*/react.createElement(Button_Button, {
|
|
|
|
|
|
|
41214 |
onClick: function onClick() {
|
41215 |
-
setDialogOpened(true);
|
41216 |
},
|
41217 |
color: "primary",
|
41218 |
variant: "text",
|
@@ -41226,11 +41534,9 @@ function ImportButton(_ref) {
|
|
41226 |
onClose: function onClose() {
|
41227 |
return setDialogOpened(false);
|
41228 |
},
|
41229 |
-
maxWidth:
|
41230 |
-
fullWidth: true,
|
41231 |
"aria-labelledby": "import-button-dialog-title",
|
41232 |
-
"aria-describedby": "import-button-dialog-description"
|
41233 |
-
,
|
41234 |
"data-testid": "dialog:import-dialog"
|
41235 |
}, /*#__PURE__*/react.createElement(FileDragAndDrop_FileDragAndDrop, {
|
41236 |
handleDrop: function handleDrop(files) {
|
@@ -41273,13 +41579,7 @@ function ImportButton(_ref) {
|
|
41273 |
width: 0,
|
41274 |
height: 0
|
41275 |
}
|
41276 |
-
}), /*#__PURE__*/react.createElement(DialogContentText_DialogContentText, {
|
41277 |
-
id: "import-button-dialog-knowledge-base",
|
41278 |
-
component: "div"
|
41279 |
-
}, /*#__PURE__*/react.createElement(KnowledgeBaseLink, {
|
41280 |
-
articleId: 653,
|
41281 |
-
setting: translate("import_export.import_export")
|
41282 |
-
}))), fileSelected && /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(DialogContentText_DialogContentText, {
|
41283 |
component: "div"
|
41284 |
}, currentGroup && isGroup && foundGroup ? /*#__PURE__*/react.createElement("span", {
|
41285 |
dangerouslySetInnerHTML: {
|
@@ -41295,7 +41595,10 @@ function ImportButton(_ref) {
|
|
41295 |
}), /*#__PURE__*/react.createElement(TrashButton, {
|
41296 |
onClick: function onClick() {
|
41297 |
return setFoundGroup(false);
|
41298 |
-
}
|
|
|
|
|
|
|
41299 |
})), foundButtons && foundButtons.map(function (button, key) {
|
41300 |
return /*#__PURE__*/react.createElement(DialogContentText_DialogContentText, {
|
41301 |
"data-testid": "import-found-buttons",
|
@@ -41309,329 +41612,360 @@ function ImportButton(_ref) {
|
|
41309 |
var currentButtons = cloneDeep_default()(foundButtons);
|
41310 |
currentButtons.splice(key, 1);
|
41311 |
setFoundButtons(currentButtons);
|
41312 |
-
}
|
|
|
|
|
|
|
41313 |
}));
|
41314 |
-
}))), /*#__PURE__*/react.createElement(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41315 |
onClick: function onClick() {
|
41316 |
return setDialogOpened(false);
|
41317 |
-
}
|
41318 |
-
|
41319 |
}, translate("modal.cancel")), fileSelected && /*#__PURE__*/react.createElement(Button_Button, {
|
41320 |
onClick: function onClick() {
|
41321 |
return setFileSelected(null);
|
41322 |
-
}
|
|
|
41323 |
}, translate("import_export.import.reupload")), /*#__PURE__*/react.createElement(Button_Button, {
|
41324 |
onClick: function onClick() {
|
41325 |
-
|
|
|
41326 |
},
|
41327 |
color: "primary",
|
41328 |
disabled: !fileSelected || !foundGroup && !foundButtons,
|
41329 |
"data-testid": "import-commence"
|
41330 |
-
}, translate("import_export.import.title"))))));
|
41331 |
}
|
41332 |
|
41333 |
-
function
|
41334 |
-
|
41335 |
-
|
41336 |
-
|
41337 |
-
|
41338 |
-
|
41339 |
-
|
41340 |
-
|
41341 |
-
|
41342 |
-
|
41343 |
-
|
41344 |
-
|
41345 |
-
|
41346 |
-
|
41347 |
-
|
41348 |
-
|
41349 |
-
|
41350 |
-
|
|
|
|
|
41351 |
}
|
41352 |
-
;// CONCATENATED MODULE: ./
|
41353 |
-
function ButtonGroupContainer_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = ButtonGroupContainer_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
41354 |
|
41355 |
-
function ButtonGroupContainer_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
41356 |
|
41357 |
-
function ButtonGroupContainer_extends() { ButtonGroupContainer_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonGroupContainer_extends.apply(this, arguments); }
|
41358 |
|
41359 |
-
function ButtonGroupContainer_slicedToArray(arr, i) { return ButtonGroupContainer_arrayWithHoles(arr) || ButtonGroupContainer_iterableToArrayLimit(arr, i) || ButtonGroupContainer_unsupportedIterableToArray(arr, i) || ButtonGroupContainer_nonIterableRest(); }
|
41360 |
|
41361 |
-
function ButtonGroupContainer_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
41362 |
|
41363 |
-
function ButtonGroupContainer_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ButtonGroupContainer_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ButtonGroupContainer_arrayLikeToArray(o, minLen); }
|
41364 |
|
41365 |
-
function ButtonGroupContainer_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
41366 |
|
41367 |
-
function ButtonGroupContainer_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
41368 |
|
41369 |
-
function ButtonGroupContainer_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
41370 |
|
41371 |
-
function ButtonGroupContainer_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
41372 |
|
41373 |
-
function ButtonGroupContainer_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ButtonGroupContainer_ownKeys(Object(source), true).forEach(function (key) { ButtonGroupContainer_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ButtonGroupContainer_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
41374 |
|
41375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41377 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41378 |
|
|
|
41379 |
|
|
|
|
|
|
|
|
|
41380 |
|
|
|
|
|
|
|
|
|
41381 |
|
|
|
|
|
|
|
|
|
41382 |
|
|
|
|
|
|
|
|
|
41383 |
|
|
|
|
|
|
|
41384 |
|
|
|
|
|
|
|
|
|
|
|
41385 |
|
|
|
41386 |
|
|
|
|
|
|
|
|
|
|
|
41387 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41388 |
|
|
|
|
|
|
|
|
|
|
|
41389 |
|
41390 |
|
|
|
|
|
|
|
41391 |
|
|
|
|
|
|
|
|
|
41392 |
|
41393 |
|
|
|
|
|
|
|
41394 |
|
|
|
|
|
|
|
|
|
41395 |
|
41396 |
|
|
|
|
|
|
|
41397 |
|
|
|
|
|
|
|
|
|
41398 |
|
41399 |
|
41400 |
|
41401 |
-
function ButtonGroupContainer_getStyle(style, snapshot) {
|
41402 |
-
if (!snapshot.isDropAnimating) {
|
41403 |
-
return style;
|
41404 |
-
} // patching the existing style
|
41405 |
|
41406 |
|
41407 |
-
return ButtonGroupContainer_objectSpread(ButtonGroupContainer_objectSpread({}, style), {}, {
|
41408 |
-
opacity: "0.5"
|
41409 |
-
});
|
41410 |
-
}
|
41411 |
|
41412 |
-
function ButtonGroupContainer(_ref) {
|
41413 |
-
var groupId = _ref.groupId,
|
41414 |
-
groups = _ref.groups,
|
41415 |
-
set = _ref.set,
|
41416 |
-
provided = _ref.provided,
|
41417 |
-
currentDrop = _ref.currentDrop,
|
41418 |
-
getButtonsCount = _ref.getButtonsCount,
|
41419 |
-
getGroupCount = _ref.getGroupCount,
|
41420 |
-
addButton = _ref.addButton,
|
41421 |
-
removeGroup = _ref.removeGroup,
|
41422 |
-
duplicateGroup = _ref.duplicateGroup;
|
41423 |
|
41424 |
-
var _useState = (0,react.useState)(getCookie("buttonizer_bar_state_opened") ? dlv_umd_default()(JSON.parse(getCookie("buttonizer_bar_state_opened")), groupId, false) : false),
|
41425 |
-
_useState2 = ButtonGroupContainer_slicedToArray(_useState, 2),
|
41426 |
-
opened = _useState2[0],
|
41427 |
-
setOpened = _useState2[1];
|
41428 |
|
41429 |
-
var _useState3 = (0,react.useState)(false),
|
41430 |
-
_useState4 = ButtonGroupContainer_slicedToArray(_useState3, 2),
|
41431 |
-
newButtonDialogOpened = _useState4[0],
|
41432 |
-
setNewButtonDialogOpened = _useState4[1];
|
41433 |
|
41434 |
-
var _useState5 = (0,react.useState)(groups[groupId]),
|
41435 |
-
_useState6 = ButtonGroupContainer_slicedToArray(_useState5, 2),
|
41436 |
-
group = _useState6[0],
|
41437 |
-
setGroup = _useState6[1];
|
41438 |
|
41439 |
-
var openCollapsibleGroup = useSelector(function (store) {
|
41440 |
-
return dlv_umd_default()(store, "misc.open_collapsible_group", "button_group_container");
|
41441 |
-
});
|
41442 |
|
41443 |
-
var handleOpenState = function handleOpenState() {
|
41444 |
-
var currentCookie = getCookie("buttonizer_bar_state_opened") ? JSON.parse(getCookie("buttonizer_bar_state_opened")) : {};
|
41445 |
-
currentCookie[groupId] = !opened;
|
41446 |
-
setOpened(!opened);
|
41447 |
-
setCookie("buttonizer_bar_state_opened", JSON.stringify(currentCookie));
|
41448 |
-
};
|
41449 |
|
41450 |
-
if (typeof group === "undefined") {
|
41451 |
-
withScope(function (scope) {
|
41452 |
-
scope.setExtra({
|
41453 |
-
groups: groups,
|
41454 |
-
groupId: groupId,
|
41455 |
-
group: group
|
41456 |
-
});
|
41457 |
-
captureException(new Error("group is undefined. Send groups and groupId data"));
|
41458 |
-
});
|
41459 |
-
}
|
41460 |
|
41461 |
-
|
41462 |
-
|
41463 |
-
|
41464 |
-
|
41465 |
-
|
41466 |
-
}
|
41467 |
-
}, [openCollapsibleGroup]);
|
41468 |
-
(0,react.useEffect)(function () {
|
41469 |
-
setGroup(groups[groupId]);
|
41470 |
-
}, [groups[groupId]]);
|
41471 |
|
41472 |
-
|
41473 |
-
|
41474 |
-
return /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
41475 |
-
content: translate("premium.warning_duplicate"),
|
41476 |
-
trigger: "click"
|
41477 |
-
}, /*#__PURE__*/react.createElement("span", {
|
41478 |
-
tabIndex: 0
|
41479 |
-
}, /*#__PURE__*/react.createElement(DuplicateButton, {
|
41480 |
-
name: group.name,
|
41481 |
-
disabled: true
|
41482 |
-
})));
|
41483 |
-
};
|
41484 |
|
41485 |
-
|
41486 |
-
|
41487 |
-
ref: provided.innerRef
|
41488 |
-
}, /*#__PURE__*/react.createElement("div", {
|
41489 |
-
className: "group-info"
|
41490 |
-
}, /*#__PURE__*/react.createElement(Button_Button, {
|
41491 |
-
onClick: handleOpenState,
|
41492 |
-
color: "primary",
|
41493 |
-
"data-testid": "open-group"
|
41494 |
-
}, /*#__PURE__*/react.createElement("i", {
|
41495 |
-
className: "group-arrow"
|
41496 |
-
}, /*#__PURE__*/react.createElement("i", {
|
41497 |
-
className: "fas fa-chevron-right"
|
41498 |
-
})), /*#__PURE__*/react.createElement("span", {
|
41499 |
-
className: "group-name"
|
41500 |
-
}, group.name)), /*#__PURE__*/react.createElement("div", {
|
41501 |
-
className: "group-action-spacer"
|
41502 |
-
}), /*#__PURE__*/react.createElement("div", {
|
41503 |
-
className: "group-actions"
|
41504 |
-
}, /*#__PURE__*/react.createElement(EditButton, {
|
41505 |
-
onClick: function onClick() {
|
41506 |
-
return document.location.hash = "#/group/" + group.id;
|
41507 |
-
},
|
41508 |
-
"data-testid": "edit-button-group",
|
41509 |
-
className: "group-actions edit-button"
|
41510 |
-
}), duplicateButton(), /*#__PURE__*/react.createElement(ContainerActionsDropdown, null, /*#__PURE__*/react.createElement(ContainerActions_RenameButton, {
|
41511 |
-
name: group.name,
|
41512 |
-
onChange: function onChange(val) {
|
41513 |
-
return set("groups", group.id, "name", val);
|
41514 |
-
},
|
41515 |
-
inDropdown: true
|
41516 |
-
}), /*#__PURE__*/react.createElement(ExportButton, {
|
41517 |
-
object: group,
|
41518 |
-
type: "group"
|
41519 |
-
}), /*#__PURE__*/react.createElement(ImportButton, {
|
41520 |
-
currentGroup: group,
|
41521 |
-
label: translate("import_export.import.into_group.button")
|
41522 |
-
}), /*#__PURE__*/react.createElement(ContainerActions_DeleteButton, {
|
41523 |
-
model: "group",
|
41524 |
-
"data-testid": "delete-button-group",
|
41525 |
-
buttonCount: getButtonsCount(group.id),
|
41526 |
-
deleteDisabled: getGroupCount() <= 1,
|
41527 |
-
onClose: function onClose() {
|
41528 |
-
return removeGroup(group.id);
|
41529 |
-
},
|
41530 |
-
inDropdown: true
|
41531 |
-
})))), /*#__PURE__*/react.createElement("div", ButtonGroupContainer_extends({
|
41532 |
-
className: "buttons" + currentDrop
|
41533 |
-
}, provided.droppableProps), group.children.map(function (id, key) {
|
41534 |
-
return /*#__PURE__*/react.createElement(PublicDraggable, {
|
41535 |
-
draggableId: id,
|
41536 |
-
index: key,
|
41537 |
-
key: id
|
41538 |
-
}, function (provided, snapshot) {
|
41539 |
-
return /*#__PURE__*/react.createElement(ButtonContainer_ButtonContainer, {
|
41540 |
-
provided: provided // key={key}
|
41541 |
-
,
|
41542 |
-
groupId: group.id,
|
41543 |
-
buttonId: id,
|
41544 |
-
currentDrag: snapshot.isDragging ? " currentDrag" : "",
|
41545 |
-
styleDrop: ButtonGroupContainer_getStyle(provided.draggableProps.style, snapshot),
|
41546 |
-
openNewButtonDialog: function openNewButtonDialog() {
|
41547 |
-
return setNewButtonDialogOpened(key + 1);
|
41548 |
-
}
|
41549 |
-
});
|
41550 |
-
});
|
41551 |
-
}), provided.placeholder, /*#__PURE__*/react.createElement("div", {
|
41552 |
-
style: {
|
41553 |
-
textAlign: "center"
|
41554 |
-
}
|
41555 |
-
}, /*#__PURE__*/react.createElement(FormDialog, {
|
41556 |
-
open: newButtonDialogOpened !== false,
|
41557 |
-
title: translate("utils.new_button"),
|
41558 |
-
text: translate("utils.choose_button_name"),
|
41559 |
-
defaultValue: translate("utils.new_button"),
|
41560 |
-
onClose: function onClose(status, buttonName) {
|
41561 |
-
setNewButtonDialogOpened(false);
|
41562 |
|
41563 |
-
|
41564 |
-
|
41565 |
-
|
41566 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41567 |
}
|
41568 |
},
|
41569 |
-
kbLink: 177
|
41570 |
-
}))));
|
41571 |
-
}
|
41572 |
|
41573 |
-
/*
|
41574 |
-
|
41575 |
-
|
41576 |
-
|
41577 |
-
|
41578 |
-
|
41579 |
-
|
41580 |
-
|
41581 |
-
|
41582 |
-
|
41583 |
-
|
41584 |
-
},
|
41585 |
-
|
41586 |
-
|
41587 |
-
|
41588 |
-
}
|
41589 |
-
addButton: function addButton(obj, id, index) {
|
41590 |
-
return GroupActions_addButton(obj, id, index, dispatch);
|
41591 |
-
},
|
41592 |
-
dispatch: dispatch
|
41593 |
};
|
41594 |
-
}
|
41595 |
-
|
41596 |
-
|
41597 |
-
|
41598 |
-
|
41599 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41600 |
|
41601 |
-
|
41602 |
-
|
41603 |
-
|
|
|
|
|
|
|
|
|
|
|
41604 |
},
|
41605 |
-
|
41606 |
-
|
41607 |
-
|
41608 |
-
|
41609 |
-
|
41610 |
-
|
41611 |
-
|
41612 |
-
|
41613 |
-
|
41614 |
-
|
41615 |
-
|
41616 |
-
|
41617 |
-
|
41618 |
-
|
41619 |
-
|
41620 |
-
|
41621 |
-
|
41622 |
-
|
41623 |
-
|
41624 |
-
function Overview_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Overview_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Overview_arrayLikeToArray(o, minLen); }
|
41625 |
|
41626 |
-
function Overview_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
41627 |
|
41628 |
-
|
|
|
|
|
41629 |
|
41630 |
-
|
|
|
|
|
|
|
41631 |
|
41632 |
|
41633 |
|
41634 |
-
// import ConfirmDialog from "Components/Dialogs/ConfirmDialog";
|
41635 |
|
41636 |
|
41637 |
|
@@ -41641,7408 +41975,8416 @@ function Overview_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41641 |
|
41642 |
|
41643 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41644 |
|
|
|
|
|
|
|
|
|
41645 |
|
|
|
|
|
|
|
|
|
|
|
41646 |
|
41647 |
-
|
41648 |
-
|
41649 |
-
|
41650 |
-
|
41651 |
-
|
41652 |
-
testDragSensor = _ref$testDragSensor === void 0 ? function () {} : _ref$testDragSensor,
|
41653 |
-
hasPremium = _ref.hasPremium,
|
41654 |
-
isPremiumCode = _ref.isPremiumCode,
|
41655 |
-
addGroup = _ref.addGroup,
|
41656 |
-
_ref$scrollBar = _ref.scrollBar,
|
41657 |
-
scrollBar = _ref$scrollBar === void 0 ? false : _ref$scrollBar;
|
41658 |
|
41659 |
-
|
41660 |
-
|
41661 |
-
_useState2 = Overview_slicedToArray(_useState, 2),
|
41662 |
-
dialogOpen = _useState2[0],
|
41663 |
-
openDialog = _useState2[1];
|
41664 |
|
41665 |
-
|
41666 |
-
|
41667 |
-
|
41668 |
-
|
41669 |
-
|
41670 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
41671 |
|
41672 |
-
|
41673 |
-
|
41674 |
-
|
41675 |
-
|
41676 |
-
|
41677 |
-
|
41678 |
|
41679 |
-
|
41680 |
-
|
41681 |
-
|
41682 |
-
|
|
|
|
|
41683 |
|
41684 |
-
if
|
41685 |
-
|
41686 |
-
|
|
|
|
|
|
|
41687 |
|
|
|
|
|
|
|
|
|
|
|
|
|
41688 |
|
41689 |
-
|
41690 |
-
|
41691 |
-
|
|
|
|
|
|
|
41692 |
|
41693 |
-
|
41694 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41695 |
|
41696 |
-
|
41697 |
-
|
41698 |
-
|
41699 |
-
|
41700 |
-
|
41701 |
-
|
41702 |
}
|
41703 |
-
},
|
41704 |
-
onClick: function onClick() {
|
41705 |
-
return app.showPremiumDialog(translate("premium.multiple_button_groups"), "Qxs1oGCVATU");
|
41706 |
-
},
|
41707 |
-
color: "primary",
|
41708 |
-
className: "Mui-buzz-premium",
|
41709 |
-
startIcon: /*#__PURE__*/react.createElement(Icon_Icon, {
|
41710 |
-
className: "fas fa-plus-circle"
|
41711 |
-
}),
|
41712 |
-
"data-testid": "new-group"
|
41713 |
-
}, translate("utils.create_group"), " ", /*#__PURE__*/react.createElement(PremiumTag, null)));
|
41714 |
-
};
|
41715 |
|
41716 |
-
|
41717 |
-
|
41718 |
-
|
41719 |
-
|
41720 |
-
|
41721 |
-
|
41722 |
-
|
41723 |
-
|
41724 |
-
|
41725 |
-
});
|
41726 |
-
}), addGroupButton());
|
41727 |
-
};
|
41728 |
|
41729 |
-
|
41730 |
-
|
41731 |
-
}, /*#__PURE__*/react.createElement("div", {
|
41732 |
-
className: "buttonizer-logo"
|
41733 |
-
}, /*#__PURE__*/react.createElement("img", {
|
41734 |
-
src: window.buttonizer_admin.assets + "/images/logo.png"
|
41735 |
-
})), /*#__PURE__*/react.createElement(RandomTip_RandomTip, null), hasPremium && !isPremiumCode && /*#__PURE__*/react.createElement("div", {
|
41736 |
-
className: "mdc-card dashboard-warning-msg"
|
41737 |
-
}, /*#__PURE__*/react.createElement("b", null, translate("warnings.premium_license_free_version.title")), translate("warnings.premium_license_free_version.information"), " ", /*#__PURE__*/react.createElement("a", {
|
41738 |
-
href: "https://community.buttonizer.pro/knowledgebase/321",
|
41739 |
-
target: "_blank"
|
41740 |
-
}, translate("common.learn_more"), ".")), !buttonizer_admin.php_version_supported && /*#__PURE__*/react.createElement("div", {
|
41741 |
-
className: "mdc-card dashboard-warning-msg"
|
41742 |
-
}, /*#__PURE__*/react.createElement("b", null, translate("warnings.php_version_outdated.title")), translate("warnings.php_version_outdated.information", buttonizer_admin.php_version), " ", /*#__PURE__*/react.createElement("a", {
|
41743 |
-
href: "https://community.buttonizer.pro/knowledgebase/434",
|
41744 |
-
target: "_blank"
|
41745 |
-
}, translate("common.learn_more"), ".")), /*#__PURE__*/react.createElement(DragDropContext, {
|
41746 |
-
sensors: [testDragSensor],
|
41747 |
-
onDragEnd: onDragEnd,
|
41748 |
-
onDragStart: onDragStart
|
41749 |
-
}, buttonGroupContainer()));
|
41750 |
-
}
|
41751 |
|
41752 |
-
/*
|
41753 |
-
|
41754 |
-
groups: state.groups,
|
41755 |
-
hasPremium: state.misc._premium,
|
41756 |
-
isPremiumCode: state.misc._premiumCode
|
41757 |
-
};
|
41758 |
-
}, function (dispatch) {
|
41759 |
-
return {
|
41760 |
-
addRelation: function addRelation(args) {
|
41761 |
-
return dispatch(dataActions_addRelation(args));
|
41762 |
-
},
|
41763 |
-
addRecord: function addRecord(args) {
|
41764 |
-
return dispatch(dataActions_addRecord(args));
|
41765 |
-
},
|
41766 |
-
addGroup: function addGroup(payload, index) {
|
41767 |
-
return GroupActions_addGroup(payload, index, dispatch);
|
41768 |
-
},
|
41769 |
-
changeRelation: function changeRelation() {
|
41770 |
-
return dispatch(dataActions_changeRelation.apply(void 0, arguments));
|
41771 |
-
}
|
41772 |
-
};
|
41773 |
-
})(Overview));
|
41774 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Pages/ItemNotFound/ItemNotFound.js
|
41775 |
|
|
|
|
|
41776 |
|
|
|
|
|
41777 |
|
41778 |
-
|
41779 |
-
|
41780 |
-
|
41781 |
-
|
41782 |
-
|
41783 |
-
}, /*#__PURE__*/react.createElement("div", {
|
41784 |
-
className: "buttonizer-logo"
|
41785 |
-
}, /*#__PURE__*/react.createElement("img", {
|
41786 |
-
src: window.buttonizer_admin.assets + "/images/logo.png"
|
41787 |
-
})), /*#__PURE__*/react.createElement("i", {
|
41788 |
-
className: isButtonGroupNotFound ? "fas fa-binoculars" : "far fa-dizzy"
|
41789 |
-
}), /*#__PURE__*/react.createElement("h4", null, "Sorry! We could not find this ".concat(isButtonGroupNotFound ? "button or group" : "page", "!")), /*#__PURE__*/react.createElement(Button_Button, {
|
41790 |
-
onClick: function onClick() {
|
41791 |
-
document.location.hash = "#/";
|
41792 |
},
|
41793 |
-
color: "primary",
|
41794 |
-
variant: "contained",
|
41795 |
-
"data-testid": "return-to-overview"
|
41796 |
-
}, "Return to overview"));
|
41797 |
-
}
|
41798 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Tab/Tab.js
|
41799 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41800 |
|
|
|
|
|
|
|
|
|
41801 |
|
|
|
|
|
|
|
|
|
41802 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41803 |
|
|
|
|
|
|
|
|
|
|
|
41804 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41805 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41806 |
|
41807 |
-
|
41808 |
-
|
41809 |
-
|
41810 |
-
|
41811 |
-
|
41812 |
-
return {
|
41813 |
-
/* Styles applied to the root element. */
|
41814 |
-
root: (0,esm_extends/* default */.Z)({}, theme.typography.button, (_extends2 = {
|
41815 |
-
maxWidth: 264,
|
41816 |
-
minWidth: 72,
|
41817 |
-
position: 'relative',
|
41818 |
-
boxSizing: 'border-box',
|
41819 |
-
minHeight: 48,
|
41820 |
-
flexShrink: 0,
|
41821 |
-
padding: '6px 12px'
|
41822 |
-
}, (0,defineProperty/* default */.Z)(_extends2, theme.breakpoints.up('sm'), {
|
41823 |
-
padding: '6px 24px'
|
41824 |
-
}), (0,defineProperty/* default */.Z)(_extends2, "overflow", 'hidden'), (0,defineProperty/* default */.Z)(_extends2, "whiteSpace", 'normal'), (0,defineProperty/* default */.Z)(_extends2, "textAlign", 'center'), (0,defineProperty/* default */.Z)(_extends2, theme.breakpoints.up('sm'), {
|
41825 |
-
minWidth: 160
|
41826 |
-
}), _extends2)),
|
41827 |
-
|
41828 |
-
/* Styles applied to the root element if both `icon` and `label` are provided. */
|
41829 |
-
labelIcon: {
|
41830 |
-
minHeight: 72,
|
41831 |
-
paddingTop: 9,
|
41832 |
-
'& $wrapper > *:first-child': {
|
41833 |
-
marginBottom: 6
|
41834 |
}
|
41835 |
},
|
41836 |
|
41837 |
-
/* Styles applied to the
|
41838 |
-
|
41839 |
-
color:
|
41840 |
-
|
41841 |
-
|
41842 |
-
opacity: 1
|
41843 |
-
},
|
41844 |
-
'&$disabled': {
|
41845 |
-
opacity: 0.5
|
41846 |
}
|
41847 |
},
|
41848 |
|
41849 |
-
/* Styles applied to the
|
41850 |
-
|
41851 |
-
color: theme.palette.
|
41852 |
-
'
|
41853 |
color: theme.palette.primary.main
|
41854 |
-
},
|
41855 |
-
'&$disabled': {
|
41856 |
-
color: theme.palette.text.disabled
|
41857 |
}
|
41858 |
},
|
41859 |
|
41860 |
-
/* Styles applied to the
|
41861 |
-
|
41862 |
-
color: theme.palette.
|
41863 |
-
'
|
41864 |
color: theme.palette.secondary.main
|
41865 |
-
},
|
41866 |
-
'&$disabled': {
|
41867 |
-
color: theme.palette.text.disabled
|
41868 |
}
|
41869 |
-
},
|
41870 |
-
|
41871 |
-
/* Pseudo-class applied to the root element if `selected={true}` (controlled by the Tabs component). */
|
41872 |
-
selected: {},
|
41873 |
-
|
41874 |
-
/* Pseudo-class applied to the root element if `disabled={true}` (controlled by the Tabs component). */
|
41875 |
-
disabled: {},
|
41876 |
-
|
41877 |
-
/* Styles applied to the root element if `fullWidth={true}` (controlled by the Tabs component). */
|
41878 |
-
fullWidth: {
|
41879 |
-
flexShrink: 1,
|
41880 |
-
flexGrow: 1,
|
41881 |
-
flexBasis: 0,
|
41882 |
-
maxWidth: 'none'
|
41883 |
-
},
|
41884 |
-
|
41885 |
-
/* Styles applied to the root element if `wrapped={true}`. */
|
41886 |
-
wrapped: {
|
41887 |
-
fontSize: theme.typography.pxToRem(12),
|
41888 |
-
lineHeight: 1.5
|
41889 |
-
},
|
41890 |
-
|
41891 |
-
/* Styles applied to the `icon` and `label`'s wrapper element. */
|
41892 |
-
wrapper: {
|
41893 |
-
display: 'inline-flex',
|
41894 |
-
alignItems: 'center',
|
41895 |
-
justifyContent: 'center',
|
41896 |
-
width: '100%',
|
41897 |
-
flexDirection: 'column'
|
41898 |
}
|
41899 |
};
|
41900 |
};
|
41901 |
-
|
41902 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41903 |
className = props.className,
|
|
|
|
|
|
|
|
|
|
|
41904 |
_props$disabled = props.disabled,
|
41905 |
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
41906 |
-
|
41907 |
-
disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,
|
41908 |
-
fullWidth = props.fullWidth,
|
41909 |
-
icon = props.icon,
|
41910 |
-
indicator = props.indicator,
|
41911 |
label = props.label,
|
41912 |
-
onChange = props.onChange,
|
41913 |
onClick = props.onClick,
|
41914 |
-
|
41915 |
-
|
41916 |
-
|
41917 |
-
_props$
|
41918 |
-
|
41919 |
-
|
41920 |
-
_props$
|
41921 |
-
|
41922 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["classes", "className", "disabled", "disableFocusRipple", "fullWidth", "icon", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"]);
|
41923 |
|
41924 |
-
var
|
41925 |
-
|
41926 |
-
onChange(event, value);
|
41927 |
-
}
|
41928 |
|
41929 |
-
|
41930 |
-
|
|
|
|
|
|
|
|
|
41931 |
}
|
41932 |
};
|
41933 |
|
41934 |
-
var
|
41935 |
-
|
41936 |
-
|
|
|
|
|
|
|
41937 |
}
|
41938 |
|
41939 |
-
if (
|
41940 |
-
|
41941 |
}
|
41942 |
};
|
41943 |
|
41944 |
-
|
41945 |
-
|
41946 |
-
|
41947 |
-
|
41948 |
-
|
41949 |
-
|
41950 |
-
|
41951 |
-
|
41952 |
-
onFocus: handleFocus,
|
41953 |
-
tabIndex: selected ? 0 : -1
|
41954 |
-
}, other), /*#__PURE__*/react.createElement("span", {
|
41955 |
-
className: classes.wrapper
|
41956 |
-
}, icon, label), indicator);
|
41957 |
-
});
|
41958 |
-
false ? 0 : void 0;
|
41959 |
-
/* harmony default export */ var Tab_Tab = ((0,withStyles/* default */.Z)(Tab_styles, {
|
41960 |
-
name: 'MuiTab'
|
41961 |
-
})(Tab));
|
41962 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/utils/scrollLeft.js
|
41963 |
-
// Source from https://github.com/alitaheri/normalize-scroll-left
|
41964 |
-
var cachedType;
|
41965 |
-
/**
|
41966 |
-
* Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type
|
41967 |
-
*
|
41968 |
-
* Types of scrollLeft, assuming scrollWidth=100 and direction is rtl.
|
41969 |
-
*
|
41970 |
-
* Type | <- Most Left | Most Right -> | Initial
|
41971 |
-
* ---------------- | ------------ | ------------- | -------
|
41972 |
-
* default | 0 | 100 | 100
|
41973 |
-
* negative (spec*) | -100 | 0 | 0
|
41974 |
-
* reverse | 100 | 0 | 0
|
41975 |
-
*
|
41976 |
-
* Edge 85: default
|
41977 |
-
* Safari 14: negative
|
41978 |
-
* Chrome 85: negative
|
41979 |
-
* Firefox 81: negative
|
41980 |
-
* IE 11: reverse
|
41981 |
-
*
|
41982 |
-
* spec* https://drafts.csswg.org/cssom-view/#dom-window-scroll
|
41983 |
-
*/
|
41984 |
-
|
41985 |
-
function detectScrollType() {
|
41986 |
-
if (cachedType) {
|
41987 |
-
return cachedType;
|
41988 |
-
}
|
41989 |
-
|
41990 |
-
var dummy = document.createElement('div');
|
41991 |
-
var container = document.createElement('div');
|
41992 |
-
container.style.width = '10px';
|
41993 |
-
container.style.height = '1px';
|
41994 |
-
dummy.appendChild(container);
|
41995 |
-
dummy.dir = 'rtl';
|
41996 |
-
dummy.style.fontSize = '14px';
|
41997 |
-
dummy.style.width = '4px';
|
41998 |
-
dummy.style.height = '1px';
|
41999 |
-
dummy.style.position = 'absolute';
|
42000 |
-
dummy.style.top = '-1000px';
|
42001 |
-
dummy.style.overflow = 'scroll';
|
42002 |
-
document.body.appendChild(dummy);
|
42003 |
-
cachedType = 'reverse';
|
42004 |
-
|
42005 |
-
if (dummy.scrollLeft > 0) {
|
42006 |
-
cachedType = 'default';
|
42007 |
-
} else {
|
42008 |
-
dummy.scrollLeft = 1;
|
42009 |
-
|
42010 |
-
if (dummy.scrollLeft === 0) {
|
42011 |
-
cachedType = 'negative';
|
42012 |
}
|
42013 |
-
}
|
42014 |
|
42015 |
-
|
42016 |
-
|
42017 |
-
}
|
|
|
42018 |
|
42019 |
-
|
42020 |
-
var
|
|
|
|
|
|
|
|
|
|
|
42021 |
|
42022 |
-
if (
|
42023 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42024 |
}
|
42025 |
|
42026 |
-
var
|
42027 |
-
|
42028 |
-
switch (type) {
|
42029 |
-
case 'negative':
|
42030 |
-
return element.scrollWidth - element.clientWidth + scrollLeft;
|
42031 |
-
|
42032 |
-
case 'reverse':
|
42033 |
-
return element.scrollWidth - element.clientWidth - scrollLeft;
|
42034 |
|
42035 |
-
|
42036 |
-
|
|
|
|
|
42037 |
}
|
42038 |
-
}
|
42039 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/animate.js
|
42040 |
-
function easeInOutSin(time) {
|
42041 |
-
return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;
|
42042 |
-
}
|
42043 |
|
42044 |
-
|
42045 |
-
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
42046 |
-
var cb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {};
|
42047 |
-
var _options$ease = options.ease,
|
42048 |
-
ease = _options$ease === void 0 ? easeInOutSin : _options$ease,
|
42049 |
-
_options$duration = options.duration,
|
42050 |
-
duration = _options$duration === void 0 ? 300 : _options$duration;
|
42051 |
-
var start = null;
|
42052 |
-
var from = element[property];
|
42053 |
-
var cancelled = false;
|
42054 |
|
42055 |
-
|
42056 |
-
|
42057 |
-
|
|
|
|
|
42058 |
|
42059 |
-
|
42060 |
-
if (cancelled) {
|
42061 |
-
cb(new Error('Animation cancelled'));
|
42062 |
-
return;
|
42063 |
-
}
|
42064 |
|
42065 |
-
|
42066 |
-
|
42067 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42068 |
|
42069 |
-
|
42070 |
-
element[property] = ease(time) * (to - from) + from;
|
42071 |
|
42072 |
-
|
42073 |
-
requestAnimationFrame(function () {
|
42074 |
-
cb(null);
|
42075 |
-
});
|
42076 |
-
return;
|
42077 |
-
}
|
42078 |
|
42079 |
-
|
42080 |
-
};
|
42081 |
|
42082 |
-
|
42083 |
-
cb(new Error('Element already at target position'));
|
42084 |
-
return cancel;
|
42085 |
-
}
|
42086 |
|
42087 |
-
|
42088 |
-
return cancel;
|
42089 |
-
}
|
42090 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Tabs/ScrollbarSize.js
|
42091 |
|
|
|
42092 |
|
|
|
42093 |
|
|
|
42094 |
|
42095 |
|
42096 |
-
var ScrollbarSize_styles = {
|
42097 |
-
width: 99,
|
42098 |
-
height: 99,
|
42099 |
-
position: 'absolute',
|
42100 |
-
top: -9999,
|
42101 |
-
overflow: 'scroll'
|
42102 |
-
};
|
42103 |
-
/**
|
42104 |
-
* @ignore - internal component.
|
42105 |
-
* The component originates from https://github.com/STORIS/react-scrollbar-size.
|
42106 |
-
* It has been moved into the core in order to minimize the bundle size.
|
42107 |
-
*/
|
42108 |
|
42109 |
-
function ScrollbarSize(props) {
|
42110 |
-
var onChange = props.onChange,
|
42111 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["onChange"]);
|
42112 |
|
42113 |
-
var scrollbarHeight = react.useRef();
|
42114 |
-
var nodeRef = react.useRef(null);
|
42115 |
|
42116 |
-
var setMeasurements = function setMeasurements() {
|
42117 |
-
scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;
|
42118 |
-
};
|
42119 |
|
42120 |
-
react.useEffect(function () {
|
42121 |
-
var handleResize = (0,utils_debounce/* default */.Z)(function () {
|
42122 |
-
var prevHeight = scrollbarHeight.current;
|
42123 |
-
setMeasurements();
|
42124 |
|
42125 |
-
if (prevHeight !== scrollbarHeight.current) {
|
42126 |
-
onChange(scrollbarHeight.current);
|
42127 |
-
}
|
42128 |
-
});
|
42129 |
-
window.addEventListener('resize', handleResize);
|
42130 |
-
return function () {
|
42131 |
-
handleResize.clear();
|
42132 |
-
window.removeEventListener('resize', handleResize);
|
42133 |
-
};
|
42134 |
-
}, [onChange]);
|
42135 |
-
react.useEffect(function () {
|
42136 |
-
setMeasurements();
|
42137 |
-
onChange(scrollbarHeight.current);
|
42138 |
-
}, [onChange]);
|
42139 |
-
return /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({
|
42140 |
-
style: ScrollbarSize_styles,
|
42141 |
-
ref: nodeRef
|
42142 |
-
}, other));
|
42143 |
-
}
|
42144 |
-
false ? 0 : void 0;
|
42145 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Tabs/TabIndicator.js
|
42146 |
|
42147 |
|
42148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
42149 |
|
42150 |
|
|
|
|
|
|
|
42151 |
|
42152 |
|
42153 |
-
|
42154 |
-
|
42155 |
-
root: {
|
42156 |
-
position: 'absolute',
|
42157 |
-
height: 2,
|
42158 |
-
bottom: 0,
|
42159 |
-
width: '100%',
|
42160 |
-
transition: theme.transitions.create()
|
42161 |
-
},
|
42162 |
-
colorPrimary: {
|
42163 |
-
backgroundColor: theme.palette.primary.main
|
42164 |
-
},
|
42165 |
-
colorSecondary: {
|
42166 |
-
backgroundColor: theme.palette.secondary.main
|
42167 |
-
},
|
42168 |
-
vertical: {
|
42169 |
-
height: '100%',
|
42170 |
-
width: 2,
|
42171 |
-
right: 0
|
42172 |
}
|
42173 |
-
};
|
42174 |
-
};
|
42175 |
-
/**
|
42176 |
-
* @ignore - internal component.
|
42177 |
-
*/
|
42178 |
-
|
42179 |
-
var TabIndicator = /*#__PURE__*/react.forwardRef(function TabIndicator(props, ref) {
|
42180 |
-
var classes = props.classes,
|
42181 |
-
className = props.className,
|
42182 |
-
color = props.color,
|
42183 |
-
orientation = props.orientation,
|
42184 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["classes", "className", "color", "orientation"]);
|
42185 |
-
|
42186 |
-
return /*#__PURE__*/react.createElement("span", (0,esm_extends/* default */.Z)({
|
42187 |
-
className: (0,clsx_m/* default */.Z)(classes.root, classes["color".concat((0,capitalize/* default */.Z)(color))], className, orientation === 'vertical' && classes.vertical),
|
42188 |
-
ref: ref
|
42189 |
-
}, other));
|
42190 |
-
});
|
42191 |
-
false ? 0 : void 0;
|
42192 |
-
/* harmony default export */ var Tabs_TabIndicator = ((0,withStyles/* default */.Z)(TabIndicator_styles, {
|
42193 |
-
name: 'PrivateTabIndicator'
|
42194 |
-
})(TabIndicator));
|
42195 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowLeft.js
|
42196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42197 |
|
42198 |
-
|
42199 |
-
|
42200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42201 |
|
42202 |
-
|
42203 |
-
|
42204 |
-
}), 'KeyboardArrowLeft'));
|
42205 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowRight.js
|
42206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42207 |
|
42208 |
-
|
42209 |
-
|
42210 |
-
|
|
|
42211 |
|
42212 |
-
|
42213 |
-
|
42214 |
-
|
42215 |
-
|
42216 |
|
|
|
|
|
|
|
|
|
42217 |
|
|
|
42218 |
|
42219 |
-
|
|
|
|
|
42220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42221 |
|
|
|
|
|
42222 |
|
|
|
|
|
|
|
|
|
42223 |
|
|
|
|
|
|
|
42224 |
|
|
|
|
|
42225 |
|
|
|
|
|
|
|
|
|
42226 |
|
42227 |
-
|
42228 |
-
|
42229 |
-
|
42230 |
-
|
42231 |
-
|
42232 |
-
|
42233 |
-
|
42234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42235 |
}
|
42236 |
-
},
|
42237 |
-
|
42238 |
-
|
42239 |
-
|
42240 |
-
|
42241 |
-
height: 40,
|
42242 |
-
'& svg': {
|
42243 |
-
transform: 'rotate(90deg)'
|
42244 |
}
|
42245 |
-
},
|
42246 |
-
|
42247 |
-
|
42248 |
-
|
42249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42250 |
|
42251 |
-
|
42252 |
-
|
42253 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42254 |
|
42255 |
-
|
42256 |
-
fontSize: "small"
|
42257 |
-
});
|
42258 |
|
42259 |
-
var
|
42260 |
-
var classes = props.classes,
|
42261 |
-
classNameProp = props.className,
|
42262 |
-
direction = props.direction,
|
42263 |
-
orientation = props.orientation,
|
42264 |
-
disabled = props.disabled,
|
42265 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["classes", "className", "direction", "orientation", "disabled"]);
|
42266 |
|
42267 |
-
|
42268 |
-
component: "div",
|
42269 |
-
className: (0,clsx_m/* default */.Z)(classes.root, classNameProp, disabled && classes.disabled, orientation === 'vertical' && classes.vertical),
|
42270 |
-
ref: ref,
|
42271 |
-
role: null,
|
42272 |
-
tabIndex: null
|
42273 |
-
}, other), direction === 'left' ? TabScrollButton_ref : TabScrollButton_ref2);
|
42274 |
-
});
|
42275 |
-
false ? 0 : void 0;
|
42276 |
-
/* harmony default export */ var TabScrollButton_TabScrollButton = ((0,withStyles/* default */.Z)(TabScrollButton_styles, {
|
42277 |
-
name: 'MuiTabScrollButton'
|
42278 |
-
})(TabScrollButton));
|
42279 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Tabs/Tabs.js
|
42280 |
|
|
|
42281 |
|
|
|
42282 |
|
|
|
42283 |
|
|
|
42284 |
|
|
|
42285 |
|
42286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42288 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42289 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42290 |
|
|
|
42291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42292 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42293 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42295 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42297 |
|
42298 |
-
|
42299 |
-
return {
|
42300 |
-
/* Styles applied to the root element. */
|
42301 |
-
root: {
|
42302 |
-
overflow: 'hidden',
|
42303 |
-
minHeight: 48,
|
42304 |
-
WebkitOverflowScrolling: 'touch',
|
42305 |
-
// Add iOS momentum scrolling.
|
42306 |
-
display: 'flex'
|
42307 |
-
},
|
42308 |
|
42309 |
-
|
42310 |
-
|
42311 |
-
|
42312 |
-
|
42313 |
|
42314 |
-
|
42315 |
-
|
42316 |
-
|
42317 |
-
},
|
42318 |
|
42319 |
-
|
42320 |
-
|
42321 |
-
flexDirection: 'column'
|
42322 |
-
},
|
42323 |
|
42324 |
-
|
42325 |
-
|
42326 |
-
|
42327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
42328 |
|
42329 |
-
|
42330 |
-
|
42331 |
-
position: 'relative',
|
42332 |
-
display: 'inline-block',
|
42333 |
-
flex: '1 1 auto',
|
42334 |
-
whiteSpace: 'nowrap'
|
42335 |
-
},
|
42336 |
|
42337 |
-
|
42338 |
-
|
42339 |
-
|
42340 |
-
|
42341 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42342 |
|
42343 |
-
|
42344 |
-
|
42345 |
-
|
42346 |
-
|
42347 |
-
|
42348 |
-
|
42349 |
-
|
42350 |
-
|
|
|
|
|
|
|
42351 |
|
42352 |
-
|
42353 |
-
},
|
42354 |
|
42355 |
-
|
42356 |
-
|
|
|
|
|
|
|
|
|
42357 |
|
42358 |
-
|
42359 |
-
scrollButtonsDesktop: (0,defineProperty/* default */.Z)({}, theme.breakpoints.down('xs'), {
|
42360 |
-
display: 'none'
|
42361 |
-
}),
|
42362 |
|
42363 |
-
|
42364 |
-
|
42365 |
-
}
|
42366 |
-
};
|
42367 |
-
var Tabs = /*#__PURE__*/react.forwardRef(function Tabs(props, ref) {
|
42368 |
-
var ariaLabel = props['aria-label'],
|
42369 |
-
ariaLabelledBy = props['aria-labelledby'],
|
42370 |
-
action = props.action,
|
42371 |
-
_props$centered = props.centered,
|
42372 |
-
centered = _props$centered === void 0 ? false : _props$centered,
|
42373 |
-
childrenProp = props.children,
|
42374 |
-
classes = props.classes,
|
42375 |
-
className = props.className,
|
42376 |
-
_props$component = props.component,
|
42377 |
-
Component = _props$component === void 0 ? 'div' : _props$component,
|
42378 |
-
_props$indicatorColor = props.indicatorColor,
|
42379 |
-
indicatorColor = _props$indicatorColor === void 0 ? 'secondary' : _props$indicatorColor,
|
42380 |
-
onChange = props.onChange,
|
42381 |
-
_props$orientation = props.orientation,
|
42382 |
-
orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,
|
42383 |
-
_props$ScrollButtonCo = props.ScrollButtonComponent,
|
42384 |
-
ScrollButtonComponent = _props$ScrollButtonCo === void 0 ? TabScrollButton_TabScrollButton : _props$ScrollButtonCo,
|
42385 |
-
_props$scrollButtons = props.scrollButtons,
|
42386 |
-
scrollButtons = _props$scrollButtons === void 0 ? 'auto' : _props$scrollButtons,
|
42387 |
-
selectionFollowsFocus = props.selectionFollowsFocus,
|
42388 |
-
_props$TabIndicatorPr = props.TabIndicatorProps,
|
42389 |
-
TabIndicatorProps = _props$TabIndicatorPr === void 0 ? {} : _props$TabIndicatorPr,
|
42390 |
-
TabScrollButtonProps = props.TabScrollButtonProps,
|
42391 |
-
_props$textColor = props.textColor,
|
42392 |
-
textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,
|
42393 |
-
value = props.value,
|
42394 |
-
_props$variant = props.variant,
|
42395 |
-
variant = _props$variant === void 0 ? 'standard' : _props$variant,
|
42396 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["aria-label", "aria-labelledby", "action", "centered", "children", "classes", "className", "component", "indicatorColor", "onChange", "orientation", "ScrollButtonComponent", "scrollButtons", "selectionFollowsFocus", "TabIndicatorProps", "TabScrollButtonProps", "textColor", "value", "variant"]);
|
42397 |
|
42398 |
-
|
42399 |
-
|
42400 |
-
|
42401 |
-
|
42402 |
-
|
42403 |
-
var start = vertical ? 'top' : 'left';
|
42404 |
-
var end = vertical ? 'bottom' : 'right';
|
42405 |
-
var clientSize = vertical ? 'clientHeight' : 'clientWidth';
|
42406 |
-
var size = vertical ? 'height' : 'width';
|
42407 |
|
42408 |
-
|
|
|
42409 |
|
42410 |
-
|
42411 |
-
|
42412 |
-
setMounted = _React$useState[1];
|
42413 |
|
42414 |
-
|
42415 |
-
|
42416 |
-
|
|
|
|
|
42417 |
|
42418 |
-
|
42419 |
-
|
42420 |
-
|
42421 |
-
|
42422 |
-
|
42423 |
-
|
|
|
|
|
|
|
|
|
|
|
42424 |
|
42425 |
-
|
42426 |
-
|
42427 |
-
marginBottom: null
|
42428 |
-
}),
|
42429 |
-
scrollerStyle = _React$useState4[0],
|
42430 |
-
setScrollerStyle = _React$useState4[1];
|
42431 |
|
42432 |
-
|
42433 |
-
|
42434 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42435 |
|
42436 |
-
|
42437 |
-
|
42438 |
-
|
|
|
42439 |
|
42440 |
-
|
42441 |
-
|
|
|
|
|
|
|
42442 |
|
42443 |
-
|
42444 |
-
|
42445 |
-
|
42446 |
-
|
42447 |
-
|
42448 |
-
scrollWidth: tabsNode.scrollWidth,
|
42449 |
-
top: rect.top,
|
42450 |
-
bottom: rect.bottom,
|
42451 |
-
left: rect.left,
|
42452 |
-
right: rect.right
|
42453 |
-
};
|
42454 |
}
|
42455 |
|
42456 |
-
|
|
|
42457 |
|
42458 |
-
|
42459 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
42460 |
|
42461 |
-
|
42462 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42463 |
|
42464 |
-
|
|
|
42465 |
|
42466 |
-
|
42467 |
-
|
42468 |
-
|
|
|
|
|
42469 |
|
42470 |
-
|
42471 |
-
|
42472 |
-
tabMeta: tabMeta
|
42473 |
-
};
|
42474 |
-
};
|
42475 |
|
42476 |
-
|
42477 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42478 |
|
42479 |
-
|
42480 |
-
|
42481 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
42482 |
|
42483 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42484 |
|
42485 |
-
|
42486 |
-
|
42487 |
-
|
42488 |
-
} else {
|
42489 |
-
var correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;
|
42490 |
-
startValue = tabMeta.left - tabsMeta.left + correction;
|
42491 |
-
}
|
42492 |
-
}
|
42493 |
|
42494 |
-
|
|
|
42495 |
|
42496 |
-
|
42497 |
-
|
42498 |
-
|
42499 |
-
var dStart = Math.abs(indicatorStyle[start] - newIndicatorStyle[start]);
|
42500 |
-
var dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);
|
42501 |
|
42502 |
-
|
42503 |
-
|
42504 |
-
|
42505 |
-
|
42506 |
-
});
|
42507 |
|
42508 |
-
|
42509 |
-
|
|
|
42510 |
};
|
|
|
42511 |
|
42512 |
-
|
42513 |
-
|
42514 |
-
|
42515 |
-
|
42516 |
-
|
42517 |
-
} else {
|
42518 |
-
scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge
|
42519 |
|
42520 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42521 |
}
|
|
|
42522 |
|
42523 |
-
|
|
|
|
|
|
|
42524 |
};
|
|
|
42525 |
|
42526 |
-
var handleStartScrollClick = function handleStartScrollClick() {
|
42527 |
-
moveTabsScroll(-tabsRef.current[clientSize]);
|
42528 |
-
};
|
42529 |
|
42530 |
-
var handleEndScrollClick = function handleEndScrollClick() {
|
42531 |
-
moveTabsScroll(tabsRef.current[clientSize]);
|
42532 |
-
};
|
42533 |
|
42534 |
-
|
42535 |
-
|
42536 |
-
|
42537 |
-
|
|
|
|
|
|
|
|
|
|
|
42538 |
});
|
42539 |
-
}
|
|
|
|
|
42540 |
|
42541 |
-
|
42542 |
-
|
42543 |
-
conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/react.createElement(ScrollbarSize, {
|
42544 |
-
className: classes.scrollable,
|
42545 |
-
onChange: handleScrollbarSizeChange
|
42546 |
-
}) : null;
|
42547 |
-
var scrollButtonsActive = displayScroll.start || displayScroll.end;
|
42548 |
-
var showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === 'desktop' || scrollButtons === 'on');
|
42549 |
-
conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/react.createElement(ScrollButtonComponent, (0,esm_extends/* default */.Z)({
|
42550 |
-
orientation: orientation,
|
42551 |
-
direction: isRtl ? 'right' : 'left',
|
42552 |
-
onClick: handleStartScrollClick,
|
42553 |
-
disabled: !displayScroll.start,
|
42554 |
-
className: (0,clsx_m/* default */.Z)(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)
|
42555 |
-
}, TabScrollButtonProps)) : null;
|
42556 |
-
conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/react.createElement(ScrollButtonComponent, (0,esm_extends/* default */.Z)({
|
42557 |
-
orientation: orientation,
|
42558 |
-
direction: isRtl ? 'left' : 'right',
|
42559 |
-
onClick: handleEndScrollClick,
|
42560 |
-
disabled: !displayScroll.end,
|
42561 |
-
className: (0,clsx_m/* default */.Z)(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)
|
42562 |
-
}, TabScrollButtonProps)) : null;
|
42563 |
-
return conditionalElements;
|
42564 |
-
};
|
42565 |
|
42566 |
-
|
42567 |
-
|
42568 |
-
|
42569 |
-
tabMeta = _getTabsMeta2.tabMeta;
|
42570 |
|
42571 |
-
|
42572 |
-
|
|
|
|
|
42573 |
}
|
|
|
42574 |
|
42575 |
-
|
42576 |
-
|
42577 |
-
var nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);
|
42578 |
-
scroll(nextScrollStart);
|
42579 |
-
} else if (tabMeta[end] > tabsMeta[end]) {
|
42580 |
-
// right side of button is out of view
|
42581 |
-
var _nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);
|
42582 |
|
42583 |
-
|
42584 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42585 |
});
|
42586 |
-
|
42587 |
-
if (scrollable && scrollButtons !== 'off') {
|
42588 |
-
var _tabsRef$current = tabsRef.current,
|
42589 |
-
scrollTop = _tabsRef$current.scrollTop,
|
42590 |
-
scrollHeight = _tabsRef$current.scrollHeight,
|
42591 |
-
clientHeight = _tabsRef$current.clientHeight,
|
42592 |
-
scrollWidth = _tabsRef$current.scrollWidth,
|
42593 |
-
clientWidth = _tabsRef$current.clientWidth;
|
42594 |
-
var showStartScroll;
|
42595 |
-
var showEndScroll;
|
42596 |
-
|
42597 |
-
if (vertical) {
|
42598 |
-
showStartScroll = scrollTop > 1;
|
42599 |
-
showEndScroll = scrollTop < scrollHeight - clientHeight - 1;
|
42600 |
-
} else {
|
42601 |
-
var scrollLeft = getNormalizedScrollLeft(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms.
|
42602 |
|
42603 |
-
|
42604 |
-
|
42605 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
42606 |
|
42607 |
-
|
42608 |
-
|
42609 |
-
|
42610 |
-
|
42611 |
-
|
42612 |
-
|
42613 |
-
|
42614 |
-
|
42615 |
-
|
42616 |
-
|
42617 |
-
|
42618 |
-
|
42619 |
-
}
|
42620 |
-
|
42621 |
-
win.addEventListener('resize', handleResize);
|
42622 |
-
return function () {
|
42623 |
-
handleResize.clear();
|
42624 |
-
win.removeEventListener('resize', handleResize);
|
42625 |
-
};
|
42626 |
-
}, [updateIndicatorState, updateScrollButtonState]);
|
42627 |
-
var handleTabsScroll = react.useCallback((0,utils_debounce/* default */.Z)(function () {
|
42628 |
-
updateScrollButtonState();
|
42629 |
-
}));
|
42630 |
-
react.useEffect(function () {
|
42631 |
-
return function () {
|
42632 |
-
handleTabsScroll.clear();
|
42633 |
-
};
|
42634 |
-
}, [handleTabsScroll]);
|
42635 |
-
react.useEffect(function () {
|
42636 |
-
setMounted(true);
|
42637 |
-
}, []);
|
42638 |
-
react.useEffect(function () {
|
42639 |
-
updateIndicatorState();
|
42640 |
-
updateScrollButtonState();
|
42641 |
-
});
|
42642 |
-
react.useEffect(function () {
|
42643 |
-
scrollSelectedIntoView();
|
42644 |
-
}, [scrollSelectedIntoView, indicatorStyle]);
|
42645 |
-
react.useImperativeHandle(action, function () {
|
42646 |
-
return {
|
42647 |
-
updateIndicator: updateIndicatorState,
|
42648 |
-
updateScrollButtons: updateScrollButtonState
|
42649 |
-
};
|
42650 |
-
}, [updateIndicatorState, updateScrollButtonState]);
|
42651 |
-
var indicator = /*#__PURE__*/react.createElement(Tabs_TabIndicator, (0,esm_extends/* default */.Z)({
|
42652 |
-
className: classes.indicator,
|
42653 |
-
orientation: orientation,
|
42654 |
-
color: indicatorColor
|
42655 |
-
}, TabIndicatorProps, {
|
42656 |
-
style: (0,esm_extends/* default */.Z)({}, indicatorStyle, TabIndicatorProps.style)
|
42657 |
-
}));
|
42658 |
-
var childIndex = 0;
|
42659 |
-
var children = react.Children.map(childrenProp, function (child) {
|
42660 |
-
if (! /*#__PURE__*/react.isValidElement(child)) {
|
42661 |
-
return null;
|
42662 |
}
|
|
|
42663 |
|
42664 |
-
|
|
|
|
|
|
|
|
|
|
|
42665 |
|
42666 |
-
|
42667 |
-
|
42668 |
-
|
42669 |
-
|
42670 |
-
return /*#__PURE__*/react.cloneElement(child, {
|
42671 |
-
fullWidth: variant === 'fullWidth',
|
42672 |
-
indicator: selected && !mounted && indicator,
|
42673 |
-
selected: selected,
|
42674 |
-
selectionFollowsFocus: selectionFollowsFocus,
|
42675 |
-
onChange: onChange,
|
42676 |
-
textColor: textColor,
|
42677 |
-
value: childValue
|
42678 |
-
});
|
42679 |
-
});
|
42680 |
|
42681 |
-
var
|
42682 |
-
|
42683 |
-
// though we might warn in the future about nested, interactive elements
|
42684 |
-
// as a a11y violation
|
42685 |
|
42686 |
-
|
|
|
|
|
|
|
|
|
|
|
42687 |
|
42688 |
-
|
42689 |
-
|
42690 |
-
|
42691 |
|
42692 |
-
|
42693 |
-
|
42694 |
-
var nextItemKey = orientation !== "vertical" ? 'ArrowRight' : 'ArrowDown';
|
42695 |
|
42696 |
-
|
42697 |
-
|
42698 |
-
previousItemKey = 'ArrowRight';
|
42699 |
-
nextItemKey = 'ArrowLeft';
|
42700 |
-
}
|
42701 |
|
42702 |
-
|
42703 |
-
|
42704 |
-
|
42705 |
-
|
|
|
42706 |
|
42707 |
-
|
42708 |
-
|
42709 |
-
|
42710 |
|
42711 |
-
|
42712 |
-
|
42713 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42714 |
|
42715 |
-
|
42716 |
-
|
42717 |
-
|
42718 |
-
|
42719 |
-
|
42720 |
-
|
42721 |
-
|
42722 |
-
|
42723 |
-
if (newFocusTarget !== null) {
|
42724 |
-
newFocusTarget.focus();
|
42725 |
-
event.preventDefault();
|
42726 |
-
}
|
42727 |
-
};
|
42728 |
-
|
42729 |
-
var conditionalElements = getConditionalElements();
|
42730 |
-
return /*#__PURE__*/react.createElement(Component, (0,esm_extends/* default */.Z)({
|
42731 |
-
className: (0,clsx_m/* default */.Z)(classes.root, className, vertical && classes.vertical),
|
42732 |
-
ref: ref
|
42733 |
-
}, other), conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/react.createElement("div", {
|
42734 |
-
className: (0,clsx_m/* default */.Z)(classes.scroller, scrollable ? classes.scrollable : classes.fixed),
|
42735 |
-
style: scrollerStyle,
|
42736 |
-
ref: tabsRef,
|
42737 |
-
onScroll: handleTabsScroll
|
42738 |
-
}, /*#__PURE__*/react.createElement("div", {
|
42739 |
-
"aria-label": ariaLabel,
|
42740 |
-
"aria-labelledby": ariaLabelledBy,
|
42741 |
-
className: (0,clsx_m/* default */.Z)(classes.flexContainer, vertical && classes.flexContainerVertical, centered && !scrollable && classes.centered),
|
42742 |
-
onKeyDown: handleKeyDown,
|
42743 |
-
ref: tabListRef,
|
42744 |
-
role: "tablist"
|
42745 |
-
}, children), mounted && indicator), conditionalElements.scrollButtonEnd);
|
42746 |
-
});
|
42747 |
-
false ? 0 : void 0;
|
42748 |
-
/* harmony default export */ var Tabs_Tabs = ((0,withStyles/* default */.Z)(Tabs_styles, {
|
42749 |
-
name: 'MuiTabs'
|
42750 |
-
})(Tabs));
|
42751 |
-
// EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js + 4 modules
|
42752 |
-
var makeStyles = __webpack_require__(73914);
|
42753 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/styles/makeStyles.js
|
42754 |
|
|
|
|
|
|
|
|
|
42755 |
|
|
|
|
|
|
|
|
|
42756 |
|
|
|
|
|
|
|
42757 |
|
42758 |
-
|
42759 |
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
42760 |
-
return (0,makeStyles/* default */.Z)(stylesOrCreator, (0,esm_extends/* default */.Z)({
|
42761 |
-
defaultTheme: defaultTheme/* default */.Z
|
42762 |
-
}, options));
|
42763 |
}
|
42764 |
|
42765 |
-
|
42766 |
-
|
42767 |
-
function BreadcrumbSelect_slicedToArray(arr, i) { return BreadcrumbSelect_arrayWithHoles(arr) || BreadcrumbSelect_iterableToArrayLimit(arr, i) || BreadcrumbSelect_unsupportedIterableToArray(arr, i) || BreadcrumbSelect_nonIterableRest(); }
|
42768 |
-
|
42769 |
-
function BreadcrumbSelect_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
42770 |
-
|
42771 |
-
function BreadcrumbSelect_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return BreadcrumbSelect_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return BreadcrumbSelect_arrayLikeToArray(o, minLen); }
|
42772 |
|
42773 |
-
|
|
|
|
|
|
|
42774 |
|
42775 |
-
|
|
|
42776 |
|
42777 |
-
|
|
|
|
|
|
|
|
|
|
|
42778 |
|
|
|
|
|
42779 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42780 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42781 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42782 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42783 |
|
|
|
42784 |
|
|
|
|
|
42785 |
|
42786 |
-
|
42787 |
-
|
42788 |
-
|
42789 |
-
|
42790 |
-
|
42791 |
-
|
42792 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42793 |
}
|
42794 |
-
};
|
42795 |
-
});
|
42796 |
|
42797 |
-
|
42798 |
-
var button = _ref.button,
|
42799 |
-
group = _ref.group,
|
42800 |
-
groups = _ref.groups,
|
42801 |
-
history = _ref.history,
|
42802 |
-
getChildrenIndex = _ref.getChildrenIndex;
|
42803 |
-
var page = "";
|
42804 |
|
42805 |
-
|
42806 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42807 |
}
|
42808 |
|
42809 |
-
|
42810 |
-
|
42811 |
-
|
42812 |
-
|
|
|
|
|
|
|
42813 |
|
42814 |
-
|
|
|
42815 |
|
42816 |
-
|
42817 |
-
|
42818 |
-
|
42819 |
|
42820 |
-
|
42821 |
-
|
42822 |
-
};
|
42823 |
|
42824 |
-
|
42825 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42826 |
|
42827 |
-
|
42828 |
-
|
42829 |
-
|
42830 |
-
else if (group) {
|
42831 |
-
history.push("/group/".concat(objectId).concat(page));
|
42832 |
-
}
|
42833 |
-
};
|
42834 |
|
42835 |
-
var
|
42836 |
-
var id = open ? "simple-popover" : undefined; // Return Element
|
42837 |
|
42838 |
-
|
42839 |
-
|
42840 |
-
|
42841 |
-
|
42842 |
-
variant: "contained",
|
42843 |
-
onClick: handleClick,
|
42844 |
-
"data-testid": "breadcrumb:button"
|
42845 |
-
}, /*#__PURE__*/react.createElement("span", {
|
42846 |
-
className: "breadcrumb-text",
|
42847 |
-
"data-testid": "breadcrumb:name"
|
42848 |
-
}, button ? button.name : group.name), /*#__PURE__*/react.createElement("i", {
|
42849 |
-
className: "fas fa-chevron-down"
|
42850 |
-
})), /*#__PURE__*/react.createElement(Popover_Popover, {
|
42851 |
-
id: id,
|
42852 |
-
className: "button-select-menu",
|
42853 |
-
open: open,
|
42854 |
-
anchorEl: anchorEl,
|
42855 |
-
onClose: handleClose,
|
42856 |
-
anchorOrigin: {
|
42857 |
-
vertical: "bottom",
|
42858 |
-
horizontal: "center"
|
42859 |
},
|
42860 |
-
|
42861 |
-
|
42862 |
-
|
42863 |
},
|
42864 |
-
|
42865 |
-
|
42866 |
-
|
42867 |
-
|
42868 |
-
|
42869 |
-
|
42870 |
-
|
42871 |
-
},
|
42872 |
-
"data-testid": "breadcrumbitem:".concat(dlv_umd_default()(buttonData, "name", "test-id")),
|
42873 |
-
classes: {
|
42874 |
-
selected: classes.selected
|
42875 |
-
},
|
42876 |
-
selected: button.id === buttonData.id
|
42877 |
-
}, buttonData.name);
|
42878 |
-
}) : Object.entries(groups).map(function (groupData, key) {
|
42879 |
-
return /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
42880 |
-
className: "breadcrumb-select-options",
|
42881 |
-
key: key,
|
42882 |
-
onClick: function onClick() {
|
42883 |
-
return handleRedirect(groupData[1].id);
|
42884 |
-
},
|
42885 |
-
classes: {
|
42886 |
-
selected: classes.selected
|
42887 |
-
},
|
42888 |
-
"data-testid": "breadcrumbitem:".concat(dlv_umd_default()(groupData[1], "name", "test-id")),
|
42889 |
-
selected: button ? button.parent === groupData[1].id : group.id === groupData[1].id
|
42890 |
-
}, groupData[1].name);
|
42891 |
-
})));
|
42892 |
-
}
|
42893 |
-
|
42894 |
-
var BreadcrumbSelectWithRouter = withRouter(BreadcrumbSelect);
|
42895 |
-
/* harmony default export */ var BreadcrumbSelect_BreadcrumbSelect = (connect(function (state) {
|
42896 |
-
return {
|
42897 |
-
groups: state.groups,
|
42898 |
-
getChildrenIndex: function getChildrenIndex(groupId) {
|
42899 |
-
return selectors_getChildrenIndex(groupId, state);
|
42900 |
}
|
42901 |
};
|
42902 |
-
})(BreadcrumbSelectWithRouter));
|
42903 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Containers/ButtonContainer/ButtonHeader/ButtonHeader.js
|
42904 |
-
function ButtonHeader_extends() { ButtonHeader_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonHeader_extends.apply(this, arguments); }
|
42905 |
-
|
42906 |
-
|
42907 |
-
|
42908 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42909 |
|
|
|
|
|
|
|
|
|
|
|
42910 |
|
|
|
42911 |
|
|
|
42912 |
|
|
|
|
|
42913 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42914 |
|
42915 |
-
|
42916 |
-
|
42917 |
-
|
42918 |
-
history = _ref.history,
|
42919 |
-
_ref$tab = _ref.tab,
|
42920 |
-
tab = _ref$tab === void 0 ? 0 : _ref$tab;
|
42921 |
|
42922 |
-
|
42923 |
-
|
42924 |
-
|
42925 |
-
|
42926 |
-
|
42927 |
-
|
42928 |
-
|
42929 |
-
|
42930 |
-
|
42931 |
-
|
42932 |
-
|
42933 |
-
|
|
|
|
|
|
|
42934 |
};
|
42935 |
-
|
42936 |
-
return /*#__PURE__*/react.createElement("div", {
|
42937 |
-
className: "bar-header"
|
42938 |
-
}, /*#__PURE__*/react.createElement("div", {
|
42939 |
-
className: "breadcrumb"
|
42940 |
-
}, /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
42941 |
-
content: translate("bar.breadcrumb.tippy_home"),
|
42942 |
-
arrow: false
|
42943 |
-
}, /*#__PURE__*/react.createElement(Button_Button, {
|
42944 |
-
onClick: function onClick() {
|
42945 |
-
history.push("/");
|
42946 |
-
},
|
42947 |
-
color: "primary",
|
42948 |
-
className: "home-button"
|
42949 |
-
}, /*#__PURE__*/react.createElement("span", {
|
42950 |
-
className: "breadcrumb-text"
|
42951 |
-
}, translate("bar.breadcrumb.home")), /*#__PURE__*/react.createElement("i", {
|
42952 |
-
className: "fas fa-chevron-right"
|
42953 |
-
}))), /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
42954 |
-
content: translate("bar.breadcrumb.tippy_group"),
|
42955 |
-
arrow: false
|
42956 |
-
}, /*#__PURE__*/react.createElement(Button_Button, {
|
42957 |
-
onClick: function onClick() {
|
42958 |
-
history.push("/group/".concat(group.id));
|
42959 |
-
},
|
42960 |
-
color: "primary"
|
42961 |
-
}, /*#__PURE__*/react.createElement("span", {
|
42962 |
-
className: "breadcrumb-text"
|
42963 |
-
}, group.name), /*#__PURE__*/react.createElement("i", {
|
42964 |
-
className: "fas fa-chevron-right"
|
42965 |
-
}))), /*#__PURE__*/react.createElement(BreadcrumbSelect_BreadcrumbSelect, {
|
42966 |
-
button: button
|
42967 |
-
})), /*#__PURE__*/react.createElement(RandomTip_RandomTip, null), /*#__PURE__*/react.createElement("div", {
|
42968 |
-
className: "back-to-group"
|
42969 |
-
}, /*#__PURE__*/react.createElement("a", {
|
42970 |
-
href: "#/group/" + group.id
|
42971 |
-
}, /*#__PURE__*/react.createElement("i", {
|
42972 |
-
className: "fas fa-chevron-down"
|
42973 |
-
}), translate("bar.edit_group_settings"))), /*#__PURE__*/react.createElement("div", {
|
42974 |
-
className: "mdc-card top-header"
|
42975 |
-
}, /*#__PURE__*/react.createElement(Tabs_Tabs, {
|
42976 |
-
value: tab,
|
42977 |
-
variant: "fullWidth",
|
42978 |
-
indicatorColor: "secondary",
|
42979 |
-
textColor: "secondary",
|
42980 |
-
className: "tab-bordered"
|
42981 |
-
}, /*#__PURE__*/react.createElement(LinkTab, {
|
42982 |
-
label: translate("settings.setting_categories.general"),
|
42983 |
-
id: 0,
|
42984 |
-
page: "general",
|
42985 |
-
"data-testid": "general-tab",
|
42986 |
-
icon: /*#__PURE__*/react.createElement("i", {
|
42987 |
-
className: "fas fa-wrench"
|
42988 |
-
})
|
42989 |
-
}), /*#__PURE__*/react.createElement(LinkTab, {
|
42990 |
-
label: translate("utils.style"),
|
42991 |
-
id: 1,
|
42992 |
-
page: "style",
|
42993 |
-
"data-testid": "style-tab",
|
42994 |
-
icon: /*#__PURE__*/react.createElement("i", {
|
42995 |
-
className: "fas fa-paint-brush"
|
42996 |
-
})
|
42997 |
-
}), /*#__PURE__*/react.createElement(LinkTab, {
|
42998 |
-
label: translate("utils.advanced"),
|
42999 |
-
id: 2,
|
43000 |
-
page: "advanced",
|
43001 |
-
"data-testid": "advanced-tab",
|
43002 |
-
icon: /*#__PURE__*/react.createElement("i", {
|
43003 |
-
className: "fas fa-sliders-h"
|
43004 |
-
})
|
43005 |
-
}))));
|
43006 |
}
|
43007 |
|
43008 |
-
|
43009 |
-
|
43010 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43011 |
|
43012 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43013 |
|
43014 |
-
|
|
|
43015 |
|
43016 |
-
|
|
|
|
|
|
|
|
|
43017 |
|
43018 |
-
|
|
|
|
|
|
|
|
|
|
|
43019 |
|
43020 |
-
|
|
|
|
|
|
|
|
|
|
|
43021 |
|
43022 |
-
|
|
|
43023 |
|
43024 |
-
|
43025 |
-
|
43026 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43027 |
|
|
|
|
|
|
|
43028 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43029 |
|
|
|
|
|
|
|
|
|
|
|
|
|
43030 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43031 |
|
43032 |
-
function
|
43033 |
-
|
43034 |
-
|
43035 |
-
|
43036 |
-
|
43037 |
-
|
43038 |
-
|
43039 |
-
|
43040 |
-
|
43041 |
-
|
43042 |
-
|
43043 |
-
|
43044 |
|
43045 |
-
|
|
|
|
|
43046 |
|
43047 |
-
|
43048 |
-
|
43049 |
-
isOpened = _useState2[0],
|
43050 |
-
setIsOpened = _useState2[1];
|
43051 |
|
43052 |
-
|
43053 |
-
|
43054 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43055 |
|
43056 |
-
var
|
43057 |
-
|
43058 |
-
|
43059 |
-
|
|
|
|
|
|
|
43060 |
};
|
43061 |
|
43062 |
-
|
43063 |
-
|
43064 |
-
}, /*#__PURE__*/react.createElement(Button_Button, CollapsibleGroup_extends({
|
43065 |
-
onClick: handleClick,
|
43066 |
-
color: "primary"
|
43067 |
-
}, groupProps), title, " ", /*#__PURE__*/react.createElement("i", {
|
43068 |
-
className: "fas fa-chevron-down"
|
43069 |
-
})), isOpened && /*#__PURE__*/react.createElement("div", {
|
43070 |
-
className: (0,clsx_m/* default */.Z)(bodySpacing && "collapsible-body")
|
43071 |
-
}, children));
|
43072 |
-
}
|
43073 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/SettingsContainer/SettingsContainer.js
|
43074 |
-
function SettingsContainer_extends() { SettingsContainer_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return SettingsContainer_extends.apply(this, arguments); }
|
43075 |
|
43076 |
-
|
|
|
|
|
|
|
43077 |
|
43078 |
-
|
|
|
43079 |
|
|
|
43080 |
|
|
|
|
|
43081 |
|
|
|
43082 |
|
43083 |
-
|
43084 |
-
|
43085 |
-
className = _ref$className === void 0 ? null : _ref$className,
|
43086 |
-
_ref$title = _ref.title,
|
43087 |
-
title = _ref$title === void 0 ? null : _ref$title,
|
43088 |
-
_ref$children = _ref.children,
|
43089 |
-
children = _ref$children === void 0 ? null : _ref$children,
|
43090 |
-
_ref$fullWidth = _ref.fullWidth,
|
43091 |
-
fullWidth = _ref$fullWidth === void 0 ? true : _ref$fullWidth,
|
43092 |
-
props = SettingsContainer_objectWithoutProperties(_ref, ["className", "title", "children", "fullWidth"]);
|
43093 |
|
43094 |
-
|
43095 |
-
|
43096 |
-
|
43097 |
-
|
43098 |
-
|
43099 |
-
|
43100 |
-
|
|
|
43101 |
}
|
43102 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/Visibility/Visibility.js
|
43103 |
-
function Visibility_slicedToArray(arr, i) { return Visibility_arrayWithHoles(arr) || Visibility_iterableToArrayLimit(arr, i) || Visibility_unsupportedIterableToArray(arr, i) || Visibility_nonIterableRest(); }
|
43104 |
-
|
43105 |
-
function Visibility_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
43106 |
-
|
43107 |
-
function Visibility_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Visibility_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Visibility_arrayLikeToArray(o, minLen); }
|
43108 |
-
|
43109 |
-
function Visibility_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
43110 |
-
|
43111 |
-
function Visibility_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
43112 |
-
|
43113 |
-
function Visibility_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
43114 |
-
|
43115 |
-
|
43116 |
-
|
43117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43120 |
|
43121 |
-
|
43122 |
-
|
43123 |
-
|
43124 |
-
|
43125 |
-
|
43126 |
-
|
|
|
43127 |
|
43128 |
-
|
43129 |
-
|
43130 |
-
|
43131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43132 |
|
43133 |
-
|
43134 |
-
_useState4 = Visibility_slicedToArray(_useState3, 2),
|
43135 |
-
desktopSelected = _useState4[0],
|
43136 |
-
setDesktopSelected = _useState4[1];
|
43137 |
|
43138 |
-
|
43139 |
-
|
43140 |
-
|
43141 |
-
|
43142 |
-
|
43143 |
-
|
43144 |
-
fullWidth: false,
|
43145 |
-
className: "desktop-mobile-visibility"
|
43146 |
-
}, /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
43147 |
-
content: translate("settings.show_mobile_desktop.mobile")
|
43148 |
-
}, /*#__PURE__*/react.createElement(Button_Button, {
|
43149 |
-
className: "buttonMobile",
|
43150 |
-
onClick: function onClick() {
|
43151 |
-
var update = !mobileSelected;
|
43152 |
-
setMobileSelected(update);
|
43153 |
-
onChange("show_mobile", update);
|
43154 |
-
},
|
43155 |
-
variant: mobileSelected ? "contained" : "outlined",
|
43156 |
-
color: "primary",
|
43157 |
-
"data-testid": "setting:mobile-visibility"
|
43158 |
-
}, /*#__PURE__*/react.createElement("i", {
|
43159 |
-
className: "fas fa-mobile-alt"
|
43160 |
-
}))), /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
43161 |
-
content: translate("settings.show_mobile_desktop.desktop")
|
43162 |
-
}, /*#__PURE__*/react.createElement(Button_Button, {
|
43163 |
-
onClick: function onClick() {
|
43164 |
-
var update = !desktopSelected;
|
43165 |
-
setDesktopSelected(update);
|
43166 |
-
onChange("show_desktop", update);
|
43167 |
-
},
|
43168 |
-
variant: desktopSelected ? "contained" : "outlined",
|
43169 |
-
color: "primary",
|
43170 |
-
"data-testid": "setting:desktop-visibility"
|
43171 |
-
}, /*#__PURE__*/react.createElement("i", {
|
43172 |
-
className: "fas fa-desktop"
|
43173 |
-
}))));
|
43174 |
}
|
43175 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/Label/Label.js
|
43176 |
-
function Label_slicedToArray(arr, i) { return Label_arrayWithHoles(arr) || Label_iterableToArrayLimit(arr, i) || Label_unsupportedIterableToArray(arr, i) || Label_nonIterableRest(); }
|
43177 |
-
|
43178 |
-
function Label_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
43179 |
|
43180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43181 |
|
43182 |
-
function
|
|
|
|
|
|
|
43183 |
|
43184 |
-
|
|
|
|
|
|
|
|
|
43185 |
|
43186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43187 |
|
|
|
|
|
|
|
|
|
|
|
43188 |
|
|
|
|
|
43189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43190 |
|
43191 |
-
|
43192 |
-
|
43193 |
-
|
43194 |
-
|
43195 |
-
|
|
|
|
|
|
|
|
|
43196 |
|
43197 |
-
|
43198 |
-
|
43199 |
-
|
43200 |
-
|
43201 |
|
43202 |
-
|
43203 |
-
|
43204 |
-
|
43205 |
-
|
|
|
|
|
|
|
43206 |
|
43207 |
-
|
43208 |
-
|
43209 |
-
|
43210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43211 |
|
43212 |
-
|
43213 |
-
|
43214 |
-
|
43215 |
-
|
43216 |
-
|
43217 |
-
|
43218 |
-
|
43219 |
-
|
43220 |
-
|
43221 |
-
|
43222 |
-
onChange: function onChange(obj) {
|
43223 |
-
setUsePlaceholder(false);
|
43224 |
-
setLabel(obj.target.value);
|
43225 |
|
43226 |
-
|
43227 |
-
|
43228 |
-
|
43229 |
-
|
43230 |
-
|
43231 |
-
|
43232 |
-
|
43233 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43234 |
});
|
43235 |
}
|
43236 |
-
// EXTERNAL MODULE: ./node_modules/validator/lib/isEmail.js
|
43237 |
-
var isEmail = __webpack_require__(83868);
|
43238 |
-
var isEmail_default = /*#__PURE__*/__webpack_require__.n(isEmail);
|
43239 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/Mail/Mail.js
|
43240 |
-
function Mail_slicedToArray(arr, i) { return Mail_arrayWithHoles(arr) || Mail_iterableToArrayLimit(arr, i) || Mail_unsupportedIterableToArray(arr, i) || Mail_nonIterableRest(); }
|
43241 |
|
43242 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43243 |
|
43244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43245 |
|
43246 |
-
|
|
|
|
|
43247 |
|
43248 |
-
|
|
|
|
|
|
|
43249 |
|
43250 |
-
|
|
|
43251 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43252 |
|
|
|
|
|
|
|
|
|
43253 |
|
|
|
43254 |
|
|
|
|
|
|
|
43255 |
|
43256 |
-
|
43257 |
-
|
43258 |
-
value = _ref$value === void 0 ? "" : _ref$value,
|
43259 |
-
_ref$subject = _ref.subject,
|
43260 |
-
subject = _ref$subject === void 0 ? "" : _ref$subject,
|
43261 |
-
_ref$body = _ref.body,
|
43262 |
-
body = _ref$body === void 0 ? "" : _ref$body,
|
43263 |
-
_ref$cc = _ref.cc,
|
43264 |
-
cc = _ref$cc === void 0 ? "" : _ref$cc,
|
43265 |
-
_ref$bcc = _ref.bcc,
|
43266 |
-
bcc = _ref$bcc === void 0 ? "" : _ref$bcc,
|
43267 |
-
_onChange = _ref.onChange;
|
43268 |
|
43269 |
-
|
43270 |
-
|
43271 |
-
|
43272 |
-
|
43273 |
-
|
43274 |
-
|
43275 |
-
|
43276 |
-
|
43277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43278 |
|
43279 |
-
var
|
43280 |
-
|
43281 |
-
|
43282 |
-
}, /*#__PURE__*/react.createElement(TextField_TextField, {
|
43283 |
-
variant: "outlined",
|
43284 |
-
fullWidth: true,
|
43285 |
-
value: value,
|
43286 |
-
inputProps: {
|
43287 |
-
"data-testid": "action:field"
|
43288 |
-
},
|
43289 |
-
label: translate("settings.button_action.placeholders.mail.recipient"),
|
43290 |
-
helperText: isInvalid ? translate("settings.button_action.actions.mail.invalid") : null,
|
43291 |
-
error: isInvalid,
|
43292 |
-
onChange: function onChange(obj) {
|
43293 |
-
_onChange(obj.target.value);
|
43294 |
-
}
|
43295 |
-
}), /*#__PURE__*/react.createElement(TextField_TextField, {
|
43296 |
-
variant: "outlined",
|
43297 |
-
fullWidth: true,
|
43298 |
-
value: subject,
|
43299 |
-
label: translate("settings.button_action.placeholders.mail.subject"),
|
43300 |
-
onChange: function onChange(obj) {
|
43301 |
-
_onChange(obj.target.value, "text_subject");
|
43302 |
-
},
|
43303 |
-
inputProps: {
|
43304 |
-
"data-testid": "action:field"
|
43305 |
-
}
|
43306 |
-
}), showCC ? /*#__PURE__*/react.createElement(TextField_TextField, {
|
43307 |
-
variant: "outlined",
|
43308 |
-
fullWidth: true,
|
43309 |
-
value: cc,
|
43310 |
-
label: translate("settings.button_action.placeholders.mail.cc"),
|
43311 |
-
onChange: function onChange(obj) {
|
43312 |
-
_onChange(obj.target.value, "text_cc");
|
43313 |
-
}
|
43314 |
-
}) : /*#__PURE__*/react.createElement(Button_Button, {
|
43315 |
-
color: "primary",
|
43316 |
-
size: "small",
|
43317 |
-
style: {
|
43318 |
-
textTransform: "capitalize",
|
43319 |
-
marginBottom: "15px"
|
43320 |
-
},
|
43321 |
-
startIcon: "+",
|
43322 |
-
onClick: function onClick() {
|
43323 |
-
return setShowCC(true);
|
43324 |
-
}
|
43325 |
-
}, "Cc"), showBCC ? /*#__PURE__*/react.createElement(TextField_TextField, {
|
43326 |
-
variant: "outlined",
|
43327 |
-
fullWidth: true,
|
43328 |
-
value: bcc,
|
43329 |
-
label: translate("settings.button_action.placeholders.mail.bcc"),
|
43330 |
-
onChange: function onChange(obj) {
|
43331 |
-
_onChange(obj.target.value, "text_bcc");
|
43332 |
-
}
|
43333 |
-
}) : /*#__PURE__*/react.createElement(Button_Button, {
|
43334 |
-
color: "primary",
|
43335 |
-
size: "small",
|
43336 |
-
style: {
|
43337 |
-
textTransform: "capitalize",
|
43338 |
-
marginBottom: "15px"
|
43339 |
-
},
|
43340 |
-
onClick: function onClick() {
|
43341 |
-
return setShowBCC(true);
|
43342 |
-
},
|
43343 |
-
startIcon: "+"
|
43344 |
-
}, "Bcc"), /*#__PURE__*/react.createElement(TextField_TextField, {
|
43345 |
-
variant: "outlined",
|
43346 |
-
fullWidth: true,
|
43347 |
-
multiline: true,
|
43348 |
-
rows: 4,
|
43349 |
-
inputProps: {
|
43350 |
-
"data-testid": "action:field"
|
43351 |
-
},
|
43352 |
-
value: body,
|
43353 |
-
label: translate("settings.button_action.placeholders.mail.body"),
|
43354 |
-
onChange: function onChange(obj) {
|
43355 |
-
_onChange(obj.target.value, "text_body");
|
43356 |
-
}
|
43357 |
-
}));
|
43358 |
-
}
|
43359 |
-
// EXTERNAL MODULE: ./node_modules/validator/lib/isMobilePhone.js
|
43360 |
-
var isMobilePhone = __webpack_require__(28355);
|
43361 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/WhatsApp/WhatsApp.js
|
43362 |
|
|
|
|
|
43363 |
|
|
|
|
|
|
|
|
|
43364 |
|
|
|
|
|
43365 |
|
43366 |
-
|
43367 |
-
|
43368 |
-
|
43369 |
-
|
43370 |
-
|
43371 |
-
|
43372 |
-
var isValidPhoneNumber = value !== "" ? (0,isMobilePhone/* default */.ZP)(value, "any", {}) : true;
|
43373 |
-
return /*#__PURE__*/react.createElement("div", {
|
43374 |
-
className: "button-action-subject"
|
43375 |
-
}, /*#__PURE__*/react.createElement(TextField_TextField, {
|
43376 |
-
variant: "outlined",
|
43377 |
-
fullWidth: true,
|
43378 |
-
value: value,
|
43379 |
-
helperText: !isValidPhoneNumber ? translate("settings.button_action.actions.phone_number.invalid") : null,
|
43380 |
-
error: !isValidPhoneNumber,
|
43381 |
-
label: translate("settings.button_action.actions.phone_number.number"),
|
43382 |
-
inputProps: {
|
43383 |
-
"data-testid": "action:field"
|
43384 |
-
},
|
43385 |
-
onChange: function onChange(obj) {
|
43386 |
-
_onChange(obj.target.value);
|
43387 |
-
}
|
43388 |
-
}), /*#__PURE__*/react.createElement(TextField_TextField, {
|
43389 |
-
variant: "outlined",
|
43390 |
-
fullWidth: true,
|
43391 |
-
multiline: true,
|
43392 |
-
rows: 4,
|
43393 |
-
value: body,
|
43394 |
-
label: translate("settings.button_action.placeholders.message"),
|
43395 |
-
inputProps: {
|
43396 |
-
"data-testid": "action:field"
|
43397 |
-
},
|
43398 |
-
onChange: function onChange(obj) {
|
43399 |
-
_onChange(obj.target.value, "text_body");
|
43400 |
-
}
|
43401 |
-
}), /*#__PURE__*/react.createElement("p", {
|
43402 |
-
dangerouslySetInnerHTML: {
|
43403 |
-
__html: translate("settings.button_action.actions.whatsapp_info")
|
43404 |
-
}
|
43405 |
-
}));
|
43406 |
}
|
43407 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/ListSubheader/ListSubheader.js
|
43408 |
-
|
43409 |
-
|
43410 |
|
|
|
43411 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43412 |
|
|
|
43413 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43414 |
|
43415 |
-
var
|
43416 |
-
|
43417 |
-
/* Styles applied to the root element. */
|
43418 |
-
root: {
|
43419 |
-
boxSizing: 'border-box',
|
43420 |
-
lineHeight: '48px',
|
43421 |
-
listStyle: 'none',
|
43422 |
-
color: theme.palette.text.secondary,
|
43423 |
-
fontFamily: theme.typography.fontFamily,
|
43424 |
-
fontWeight: theme.typography.fontWeightMedium,
|
43425 |
-
fontSize: theme.typography.pxToRem(14)
|
43426 |
-
},
|
43427 |
|
43428 |
-
|
43429 |
-
|
43430 |
-
|
43431 |
-
|
43432 |
|
43433 |
-
|
43434 |
-
colorInherit: {
|
43435 |
-
color: 'inherit'
|
43436 |
-
},
|
43437 |
|
43438 |
-
|
43439 |
-
|
43440 |
-
paddingLeft: 16,
|
43441 |
-
paddingRight: 16
|
43442 |
-
},
|
43443 |
|
43444 |
-
|
43445 |
-
|
43446 |
-
|
43447 |
-
|
43448 |
|
43449 |
-
|
43450 |
-
|
43451 |
-
|
43452 |
-
|
43453 |
-
|
43454 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43455 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43456 |
};
|
43457 |
-
};
|
43458 |
-
var ListSubheader = /*#__PURE__*/react.forwardRef(function ListSubheader(props, ref) {
|
43459 |
-
var classes = props.classes,
|
43460 |
-
className = props.className,
|
43461 |
-
_props$color = props.color,
|
43462 |
-
color = _props$color === void 0 ? 'default' : _props$color,
|
43463 |
-
_props$component = props.component,
|
43464 |
-
Component = _props$component === void 0 ? 'li' : _props$component,
|
43465 |
-
_props$disableGutters = props.disableGutters,
|
43466 |
-
disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,
|
43467 |
-
_props$disableSticky = props.disableSticky,
|
43468 |
-
disableSticky = _props$disableSticky === void 0 ? false : _props$disableSticky,
|
43469 |
-
_props$inset = props.inset,
|
43470 |
-
inset = _props$inset === void 0 ? false : _props$inset,
|
43471 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["classes", "className", "color", "component", "disableGutters", "disableSticky", "inset"]);
|
43472 |
|
43473 |
-
|
43474 |
-
|
43475 |
-
|
43476 |
-
},
|
43477 |
-
});
|
43478 |
-
false ? 0 : void 0;
|
43479 |
-
/* harmony default export */ var ListSubheader_ListSubheader = ((0,withStyles/* default */.Z)(ListSubheader_styles, {
|
43480 |
-
name: 'MuiListSubheader'
|
43481 |
-
})(ListSubheader));
|
43482 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/svg-icons/Cancel.js
|
43483 |
|
|
|
|
|
43484 |
|
43485 |
/**
|
43486 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43487 |
*/
|
|
|
|
|
|
|
|
|
|
|
43488 |
|
43489 |
-
|
43490 |
-
|
43491 |
-
})
|
43492 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Chip/Chip.js
|
43493 |
-
|
43494 |
-
|
43495 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43496 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43497 |
|
|
|
|
|
|
|
|
|
43498 |
|
|
|
43499 |
|
|
|
|
|
|
|
43500 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43501 |
|
|
|
|
|
|
|
|
|
43502 |
|
|
|
43503 |
|
|
|
|
|
|
|
|
|
|
|
|
|
43504 |
|
43505 |
-
|
43506 |
-
|
43507 |
-
|
43508 |
-
|
43509 |
-
/* Styles applied to the root element. */
|
43510 |
-
root: {
|
43511 |
-
fontFamily: theme.typography.fontFamily,
|
43512 |
-
fontSize: theme.typography.pxToRem(13),
|
43513 |
-
display: 'inline-flex',
|
43514 |
-
alignItems: 'center',
|
43515 |
-
justifyContent: 'center',
|
43516 |
-
height: 32,
|
43517 |
-
color: theme.palette.getContrastText(backgroundColor),
|
43518 |
-
backgroundColor: backgroundColor,
|
43519 |
-
borderRadius: 32 / 2,
|
43520 |
-
whiteSpace: 'nowrap',
|
43521 |
-
transition: theme.transitions.create(['background-color', 'box-shadow']),
|
43522 |
-
// label will inherit this from root, then `clickable` class overrides this for both
|
43523 |
-
cursor: 'default',
|
43524 |
-
// We disable the focus ring for mouse, touch and keyboard users.
|
43525 |
-
outline: 0,
|
43526 |
-
textDecoration: 'none',
|
43527 |
-
border: 'none',
|
43528 |
-
// Remove `button` border
|
43529 |
-
padding: 0,
|
43530 |
-
// Remove `button` padding
|
43531 |
-
verticalAlign: 'middle',
|
43532 |
-
boxSizing: 'border-box',
|
43533 |
-
'&$disabled': {
|
43534 |
-
opacity: 0.5,
|
43535 |
-
pointerEvents: 'none'
|
43536 |
-
},
|
43537 |
-
'& $avatar': {
|
43538 |
-
marginLeft: 5,
|
43539 |
-
marginRight: -6,
|
43540 |
-
width: 24,
|
43541 |
-
height: 24,
|
43542 |
-
color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],
|
43543 |
-
fontSize: theme.typography.pxToRem(12)
|
43544 |
-
},
|
43545 |
-
'& $avatarColorPrimary': {
|
43546 |
-
color: theme.palette.primary.contrastText,
|
43547 |
-
backgroundColor: theme.palette.primary.dark
|
43548 |
-
},
|
43549 |
-
'& $avatarColorSecondary': {
|
43550 |
-
color: theme.palette.secondary.contrastText,
|
43551 |
-
backgroundColor: theme.palette.secondary.dark
|
43552 |
-
},
|
43553 |
-
'& $avatarSmall': {
|
43554 |
-
marginLeft: 4,
|
43555 |
-
marginRight: -4,
|
43556 |
-
width: 18,
|
43557 |
-
height: 18,
|
43558 |
-
fontSize: theme.typography.pxToRem(10)
|
43559 |
-
}
|
43560 |
-
},
|
43561 |
|
43562 |
-
|
43563 |
-
|
43564 |
-
|
43565 |
-
|
|
|
|
|
|
|
|
|
|
|
43566 |
|
43567 |
-
|
43568 |
-
|
43569 |
-
backgroundColor: theme.palette.primary.main,
|
43570 |
-
color: theme.palette.primary.contrastText
|
43571 |
-
},
|
43572 |
|
43573 |
-
|
43574 |
-
|
43575 |
-
|
43576 |
-
|
43577 |
-
|
|
|
43578 |
|
43579 |
-
|
43580 |
-
|
43581 |
|
43582 |
-
|
43583 |
-
|
43584 |
-
userSelect: 'none',
|
43585 |
-
WebkitTapHighlightColor: 'transparent',
|
43586 |
-
cursor: 'pointer',
|
43587 |
-
'&:hover, &:focus': {
|
43588 |
-
backgroundColor: (0,colorManipulator/* emphasize */._4)(backgroundColor, 0.08)
|
43589 |
-
},
|
43590 |
-
'&:active': {
|
43591 |
-
boxShadow: theme.shadows[1]
|
43592 |
-
}
|
43593 |
-
},
|
43594 |
|
43595 |
-
|
43596 |
-
|
43597 |
-
'&:hover, &:focus': {
|
43598 |
-
backgroundColor: (0,colorManipulator/* emphasize */._4)(theme.palette.primary.main, 0.08)
|
43599 |
-
}
|
43600 |
-
},
|
43601 |
|
43602 |
-
|
43603 |
-
|
43604 |
-
|
43605 |
-
|
43606 |
-
|
43607 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43608 |
|
43609 |
-
|
43610 |
-
|
43611 |
-
|
43612 |
-
|
43613 |
-
|
43614 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43615 |
|
43616 |
-
|
43617 |
-
|
43618 |
-
'&:focus': {
|
43619 |
-
backgroundColor: (0,colorManipulator/* emphasize */._4)(theme.palette.primary.main, 0.2)
|
43620 |
-
}
|
43621 |
-
},
|
43622 |
|
43623 |
-
|
43624 |
-
|
43625 |
-
|
43626 |
-
|
43627 |
-
|
43628 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
43629 |
|
43630 |
-
|
43631 |
-
|
43632 |
-
|
43633 |
-
|
43634 |
-
'$clickable&:hover, $clickable&:focus, $deletable&:focus': {
|
43635 |
-
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.text.primary, theme.palette.action.hoverOpacity)
|
43636 |
-
},
|
43637 |
-
'& $avatar': {
|
43638 |
-
marginLeft: 4
|
43639 |
-
},
|
43640 |
-
'& $avatarSmall': {
|
43641 |
-
marginLeft: 2
|
43642 |
-
},
|
43643 |
-
'& $icon': {
|
43644 |
-
marginLeft: 4
|
43645 |
-
},
|
43646 |
-
'& $iconSmall': {
|
43647 |
-
marginLeft: 2
|
43648 |
-
},
|
43649 |
-
'& $deleteIcon': {
|
43650 |
-
marginRight: 5
|
43651 |
-
},
|
43652 |
-
'& $deleteIconSmall': {
|
43653 |
-
marginRight: 3
|
43654 |
-
}
|
43655 |
-
},
|
43656 |
|
43657 |
-
|
43658 |
-
|
43659 |
-
|
43660 |
-
|
43661 |
-
|
43662 |
-
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.primary.main, theme.palette.action.hoverOpacity)
|
43663 |
-
}
|
43664 |
-
},
|
43665 |
|
43666 |
-
|
43667 |
-
|
43668 |
-
|
43669 |
-
|
43670 |
-
|
43671 |
-
|
43672 |
-
|
43673 |
-
|
43674 |
-
|
|
|
|
|
|
|
43675 |
|
43676 |
-
|
43677 |
-
|
|
|
|
|
43678 |
|
43679 |
-
|
43680 |
-
avatarSmall: {},
|
43681 |
|
43682 |
-
|
43683 |
-
|
|
|
43684 |
|
43685 |
-
|
43686 |
-
avatarColorSecondary: {},
|
43687 |
|
43688 |
-
|
43689 |
-
|
43690 |
-
|
43691 |
-
|
43692 |
-
|
43693 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43694 |
|
43695 |
-
|
43696 |
-
|
43697 |
-
|
43698 |
-
|
43699 |
-
marginLeft: 4,
|
43700 |
-
marginRight: -4
|
43701 |
-
},
|
43702 |
|
43703 |
-
|
43704 |
-
|
43705 |
-
color: 'inherit'
|
43706 |
-
},
|
43707 |
|
43708 |
-
|
43709 |
-
|
43710 |
-
color: 'inherit'
|
43711 |
-
},
|
43712 |
|
43713 |
-
|
43714 |
-
|
43715 |
-
|
43716 |
-
textOverflow: 'ellipsis',
|
43717 |
-
paddingLeft: 12,
|
43718 |
-
paddingRight: 12,
|
43719 |
-
whiteSpace: 'nowrap'
|
43720 |
-
},
|
43721 |
|
43722 |
-
|
43723 |
-
|
43724 |
-
|
43725 |
-
|
43726 |
-
},
|
43727 |
|
43728 |
-
|
43729 |
-
deleteIcon: {
|
43730 |
-
WebkitTapHighlightColor: 'transparent',
|
43731 |
-
color: deleteIconColor,
|
43732 |
-
height: 22,
|
43733 |
-
width: 22,
|
43734 |
-
cursor: 'pointer',
|
43735 |
-
margin: '0 5px 0 -6px',
|
43736 |
-
'&:hover': {
|
43737 |
-
color: (0,colorManipulator/* fade */.U1)(deleteIconColor, 0.4)
|
43738 |
-
}
|
43739 |
-
},
|
43740 |
|
43741 |
-
|
43742 |
-
|
43743 |
-
height: 16,
|
43744 |
-
width: 16,
|
43745 |
-
marginRight: 4,
|
43746 |
-
marginLeft: -4
|
43747 |
-
},
|
43748 |
|
43749 |
-
|
43750 |
-
|
43751 |
-
color: (0,colorManipulator/* fade */.U1)(theme.palette.primary.contrastText, 0.7),
|
43752 |
-
'&:hover, &:active': {
|
43753 |
-
color: theme.palette.primary.contrastText
|
43754 |
-
}
|
43755 |
-
},
|
43756 |
|
43757 |
-
|
43758 |
-
|
43759 |
-
color: (0,colorManipulator/* fade */.U1)(theme.palette.secondary.contrastText, 0.7),
|
43760 |
-
'&:hover, &:active': {
|
43761 |
-
color: theme.palette.secondary.contrastText
|
43762 |
-
}
|
43763 |
-
},
|
43764 |
|
43765 |
-
|
43766 |
-
|
43767 |
-
|
43768 |
-
|
43769 |
-
|
|
|
|
|
|
|
43770 |
}
|
43771 |
-
},
|
43772 |
|
43773 |
-
|
43774 |
-
|
43775 |
-
color: (0,colorManipulator/* fade */.U1)(theme.palette.secondary.main, 0.7),
|
43776 |
-
'&:hover, &:active': {
|
43777 |
-
color: theme.palette.secondary.main
|
43778 |
}
|
43779 |
-
}
|
43780 |
-
};
|
43781 |
-
};
|
43782 |
|
43783 |
-
|
43784 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43785 |
}
|
|
|
43786 |
/**
|
43787 |
-
*
|
|
|
|
|
|
|
|
|
43788 |
*/
|
|
|
|
|
|
|
|
|
43789 |
|
|
|
|
|
|
|
|
|
|
|
|
|
43790 |
|
43791 |
-
|
43792 |
-
|
43793 |
-
|
43794 |
-
|
43795 |
-
|
43796 |
-
|
43797 |
-
color = _props$color === void 0 ? 'default' : _props$color,
|
43798 |
-
ComponentProp = props.component,
|
43799 |
-
deleteIconProp = props.deleteIcon,
|
43800 |
-
_props$disabled = props.disabled,
|
43801 |
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
43802 |
-
iconProp = props.icon,
|
43803 |
-
label = props.label,
|
43804 |
-
onClick = props.onClick,
|
43805 |
-
onDelete = props.onDelete,
|
43806 |
-
onKeyDown = props.onKeyDown,
|
43807 |
-
onKeyUp = props.onKeyUp,
|
43808 |
-
_props$size = props.size,
|
43809 |
-
size = _props$size === void 0 ? 'medium' : _props$size,
|
43810 |
-
_props$variant = props.variant,
|
43811 |
-
variant = _props$variant === void 0 ? 'default' : _props$variant,
|
43812 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["avatar", "classes", "className", "clickable", "color", "component", "deleteIcon", "disabled", "icon", "label", "onClick", "onDelete", "onKeyDown", "onKeyUp", "size", "variant"]);
|
43813 |
-
|
43814 |
-
var chipRef = react.useRef(null);
|
43815 |
-
var handleRef = (0,useForkRef/* default */.Z)(chipRef, ref);
|
43816 |
|
43817 |
-
|
43818 |
-
|
43819 |
-
event.stopPropagation();
|
43820 |
|
43821 |
-
|
43822 |
-
|
43823 |
-
|
43824 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43825 |
|
43826 |
-
|
43827 |
-
|
43828 |
-
|
43829 |
-
|
43830 |
-
// might init navigation
|
43831 |
-
event.preventDefault();
|
43832 |
-
}
|
43833 |
|
43834 |
-
|
43835 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43836 |
}
|
43837 |
-
};
|
43838 |
|
43839 |
-
|
43840 |
-
|
43841 |
-
|
43842 |
-
|
43843 |
-
|
43844 |
-
|
43845 |
-
|
43846 |
-
|
|
|
43847 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43848 |
|
43849 |
-
|
43850 |
-
|
43851 |
-
|
43852 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43853 |
|
43854 |
-
|
43855 |
-
|
43856 |
-
|
43857 |
-
var
|
43858 |
-
component: 'div'
|
43859 |
-
} : {};
|
43860 |
-
var deleteIcon = null;
|
43861 |
|
43862 |
-
|
43863 |
-
|
43864 |
-
|
43865 |
-
|
43866 |
-
|
43867 |
-
}) : /*#__PURE__*/react.createElement(Cancel, {
|
43868 |
-
className: (0,clsx_m/* default */.Z)(classes.deleteIcon, customClasses),
|
43869 |
-
onClick: handleDeleteIconClick
|
43870 |
-
});
|
43871 |
-
}
|
43872 |
|
43873 |
-
|
|
|
|
|
|
|
|
|
43874 |
|
43875 |
-
if (
|
43876 |
-
|
43877 |
-
className: (0,clsx_m/* default */.Z)(classes.avatar, avatarProp.props.className, small && classes.avatarSmall, color !== 'default' && classes["avatarColor".concat((0,capitalize/* default */.Z)(color))])
|
43878 |
-
});
|
43879 |
}
|
43880 |
|
43881 |
-
|
|
|
|
|
|
|
43882 |
|
43883 |
-
|
43884 |
-
|
43885 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43886 |
});
|
43887 |
-
}
|
43888 |
|
43889 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43890 |
|
43891 |
-
|
43892 |
-
|
43893 |
-
|
43894 |
-
|
43895 |
-
|
43896 |
-
|
43897 |
-
|
43898 |
-
|
43899 |
-
|
43900 |
-
|
43901 |
-
|
43902 |
-
|
43903 |
-
|
43904 |
-
|
43905 |
-
|
43906 |
-
});
|
43907 |
-
false ? 0 : void 0;
|
43908 |
-
/* harmony default export */ var Chip_Chip = ((0,withStyles/* default */.Z)(Chip_styles, {
|
43909 |
-
name: 'MuiChip'
|
43910 |
-
})(Chip));
|
43911 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/SocialSharing/SocialSharing.js
|
43912 |
-
function SocialSharing_slicedToArray(arr, i) { return SocialSharing_arrayWithHoles(arr) || SocialSharing_iterableToArrayLimit(arr, i) || SocialSharing_unsupportedIterableToArray(arr, i) || SocialSharing_nonIterableRest(); }
|
43913 |
|
43914 |
-
|
43915 |
|
43916 |
-
|
|
|
|
|
|
|
|
|
|
|
43917 |
|
43918 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43919 |
|
43920 |
-
|
|
|
|
|
43921 |
|
43922 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43923 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43924 |
|
|
|
|
|
|
|
43925 |
|
|
|
43926 |
|
|
|
|
|
|
|
|
|
|
|
43927 |
|
|
|
43928 |
|
|
|
|
|
43929 |
|
43930 |
-
var
|
43931 |
-
|
43932 |
-
|
43933 |
-
|
|
|
|
|
|
|
43934 |
},
|
43935 |
-
|
43936 |
-
|
43937 |
-
|
43938 |
-
|
43939 |
-
|
43940 |
-
|
43941 |
-
|
43942 |
}
|
43943 |
};
|
43944 |
-
});
|
43945 |
-
function SocialSharing(_ref) {
|
43946 |
-
var _ref$value = _ref.value,
|
43947 |
-
value = _ref$value === void 0 ? "" : _ref$value,
|
43948 |
-
_ref$body = _ref.body,
|
43949 |
-
body = _ref$body === void 0 ? "" : _ref$body,
|
43950 |
-
_onChange = _ref.onChange;
|
43951 |
-
var values = ["facebook", "twitter", "whatsapp", "linkedin", "pinterest", "mail", "sms", "reddit", "tumblr", "weibo", "vk", "ok", "xing", "blogger", "flipboard", "line"];
|
43952 |
-
var valuesWithBody = ["twitter", "whatsapp", "mail", "sms", "vk", "blogger", "tumblr", "weibo"];
|
43953 |
-
var parameters = {
|
43954 |
-
"Site URL": "[site-url]",
|
43955 |
-
"Site Title": "[site-title]"
|
43956 |
-
};
|
43957 |
-
var inputLabel = (0,react.useRef)(null);
|
43958 |
-
var bodyInputRef = (0,react.useRef)(null);
|
43959 |
-
|
43960 |
-
var _useState = (0,react.useState)([]),
|
43961 |
-
_useState2 = SocialSharing_slicedToArray(_useState, 2),
|
43962 |
-
selection = _useState2[0],
|
43963 |
-
setSelection = _useState2[1]; // make sure parameters are inserted at selection
|
43964 |
-
|
43965 |
-
|
43966 |
-
var changeSelection = function changeSelection() {
|
43967 |
-
return setSelection([bodyInputRef.current.selectionStart, bodyInputRef.current.selectionEnd]);
|
43968 |
-
}; // we want the parameter to insert at the end if there is no focus
|
43969 |
-
|
43970 |
|
43971 |
-
|
43972 |
-
|
43973 |
-
|
|
|
43974 |
|
43975 |
-
|
43976 |
-
// insert text
|
43977 |
-
var newString = body.split("");
|
43978 |
-
newString.splice(selection[0], selection[1] - selection[0], parameter);
|
43979 |
|
43980 |
-
|
43981 |
-
|
43982 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43983 |
|
43984 |
-
|
43985 |
-
|
43986 |
-
|
43987 |
-
|
|
|
43988 |
|
43989 |
-
|
|
|
|
|
43990 |
|
43991 |
-
|
43992 |
-
|
43993 |
-
|
43994 |
-
|
43995 |
|
43996 |
-
|
43997 |
-
_onChange("facebook");
|
43998 |
}
|
43999 |
|
44000 |
-
|
44001 |
-
setLabelWidth(inputLabel.current.offsetWidth);
|
44002 |
-
}, []);
|
44003 |
-
return /*#__PURE__*/react.createElement(FormControl_FormControl, {
|
44004 |
-
variant: "outlined",
|
44005 |
-
fullWidth: true,
|
44006 |
-
className: "button-action-value"
|
44007 |
-
}, /*#__PURE__*/react.createElement(InputLabel_InputLabel, {
|
44008 |
-
ref: inputLabel
|
44009 |
-
}, translate("settings.button_action.title")), /*#__PURE__*/react.createElement(Select_Select, {
|
44010 |
-
labelId: "button-action-value",
|
44011 |
-
value: value,
|
44012 |
-
onChange: function onChange(e) {
|
44013 |
-
_onChange(e.target.value);
|
44014 |
-
},
|
44015 |
-
labelWidth: labelWidth,
|
44016 |
-
MenuProps: {
|
44017 |
-
anchorOrigin: {
|
44018 |
-
vertical: "bottom",
|
44019 |
-
horizontal: "center"
|
44020 |
-
},
|
44021 |
-
transformOrigin: {
|
44022 |
-
vertical: "top",
|
44023 |
-
horizontal: "center"
|
44024 |
-
},
|
44025 |
-
getContentAnchorEl: null
|
44026 |
-
},
|
44027 |
-
style: {
|
44028 |
-
marginBottom: "15px"
|
44029 |
-
},
|
44030 |
-
inputProps: {
|
44031 |
-
"data-testid": "action:select"
|
44032 |
-
}
|
44033 |
-
}, /*#__PURE__*/react.createElement(ListSubheader_ListSubheader, {
|
44034 |
-
disableSticky: true,
|
44035 |
-
value: null,
|
44036 |
-
className: classes.group
|
44037 |
-
}, translate("settings.button_action.actions.social_sharing.popular") + ":"), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44038 |
-
value: "facebook",
|
44039 |
-
className: classes.item
|
44040 |
-
}, translate("settings.button_action.actions.share_page_on", "Facebook")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44041 |
-
value: "twitter",
|
44042 |
-
className: classes.item
|
44043 |
-
}, translate("settings.button_action.actions.share_page_on", "Twitter")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44044 |
-
value: "whatsapp",
|
44045 |
-
className: classes.item
|
44046 |
-
}, translate("settings.button_action.actions.share_page_on", "Whatsapp")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44047 |
-
value: "linkedin",
|
44048 |
-
className: classes.item
|
44049 |
-
}, translate("settings.button_action.actions.share_page_on", "LinkedIn")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44050 |
-
value: "pinterest",
|
44051 |
-
className: classes.item
|
44052 |
-
}, translate("settings.button_action.actions.share_page_on", "Pinterest")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44053 |
-
value: "mail",
|
44054 |
-
className: classes.item
|
44055 |
-
}, translate("settings.button_action.actions.share_page_via", "email")), /*#__PURE__*/react.createElement(ListSubheader_ListSubheader, {
|
44056 |
-
disableSticky: true,
|
44057 |
-
value: null,
|
44058 |
-
className: classes.group
|
44059 |
-
}, translate("settings.button_action.actions.social_sharing.other") + ":"), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44060 |
-
value: "sms",
|
44061 |
-
className: classes.item
|
44062 |
-
}, translate("settings.button_action.actions.share_page_on", "SMS")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44063 |
-
value: "reddit",
|
44064 |
-
className: classes.item
|
44065 |
-
}, translate("settings.button_action.actions.share_page_on", "Reddit")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44066 |
-
value: "tumblr",
|
44067 |
-
className: classes.item
|
44068 |
-
}, translate("settings.button_action.actions.share_page_on", "Tumblr")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44069 |
-
value: "weibo",
|
44070 |
-
className: classes.item
|
44071 |
-
}, translate("settings.button_action.actions.share_page_on", "Weibo")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44072 |
-
value: "vk",
|
44073 |
-
className: classes.item
|
44074 |
-
}, translate("settings.button_action.actions.share_page_on", "VK")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44075 |
-
value: "ok",
|
44076 |
-
className: classes.item
|
44077 |
-
}, translate("settings.button_action.actions.share_page_on", "OK.ru (Odnoklassniki)")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44078 |
-
value: "xing",
|
44079 |
-
className: classes.item
|
44080 |
-
}, translate("settings.button_action.actions.share_page_on", "Xing")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44081 |
-
value: "blogger",
|
44082 |
-
className: classes.item
|
44083 |
-
}, translate("settings.button_action.actions.share_page_on", "Blogger")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44084 |
-
value: "flipboard",
|
44085 |
-
className: classes.item
|
44086 |
-
}, translate("settings.button_action.actions.share_page_on", "Flipboard")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44087 |
-
value: "line",
|
44088 |
-
className: classes.item
|
44089 |
-
}, translate("settings.button_action.actions.share_page_on", "Line"))), valuesWithBody.includes(value) ? /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(TextField_TextField, {
|
44090 |
-
variant: "outlined",
|
44091 |
-
fullWidth: true,
|
44092 |
-
multiline: true,
|
44093 |
-
rows: 2,
|
44094 |
-
onSelect: changeSelection,
|
44095 |
-
onBlur: removeSelection,
|
44096 |
-
inputRef: bodyInputRef,
|
44097 |
-
label: translate("settings.button_action.placeholders.mail.body"),
|
44098 |
-
value: body,
|
44099 |
-
inputProps: {
|
44100 |
-
"data-testid": "action:field"
|
44101 |
-
},
|
44102 |
-
onChange: function onChange(obj) {
|
44103 |
-
_onChange(obj.target.value, "text_body");
|
44104 |
-
}
|
44105 |
-
}), /*#__PURE__*/react.createElement("div", null, "Insert parameter:", Object.entries(parameters).map(function (_ref2, index) {
|
44106 |
-
var _ref3 = SocialSharing_slicedToArray(_ref2, 2),
|
44107 |
-
name = _ref3[0],
|
44108 |
-
value = _ref3[1];
|
44109 |
-
|
44110 |
-
return /*#__PURE__*/react.createElement(Chip_Chip, {
|
44111 |
-
onClick: function onClick() {
|
44112 |
-
return insertParameter(value);
|
44113 |
-
},
|
44114 |
-
size: "small",
|
44115 |
-
variant: "outlined",
|
44116 |
-
key: index,
|
44117 |
-
label: name,
|
44118 |
-
style: {
|
44119 |
-
marginLeft: "5px"
|
44120 |
-
}
|
44121 |
-
});
|
44122 |
-
})), /*#__PURE__*/react.createElement("br", null), "Body will look as follows: ", /*#__PURE__*/react.createElement("br", null), /*#__PURE__*/react.createElement(Typography_Typography, {
|
44123 |
-
variant: "caption"
|
44124 |
-
}, body.replace(/\[site-url\]/g, document.location).replace(/\[site-title\]/g, document.title))) : null);
|
44125 |
}
|
44126 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/Sms/Sms.js
|
44127 |
-
|
44128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44129 |
|
|
|
|
|
|
|
|
|
44130 |
|
44131 |
-
|
44132 |
-
|
44133 |
-
|
44134 |
-
|
44135 |
-
body = _ref$body === void 0 ? "" : _ref$body,
|
44136 |
-
_onChange = _ref.onChange;
|
44137 |
-
var isValidPhoneNumber = value !== "" ? (0,isMobilePhone/* default */.ZP)(value, "any", {}) : true;
|
44138 |
-
return /*#__PURE__*/react.createElement("div", {
|
44139 |
-
className: "button-action-value"
|
44140 |
-
}, /*#__PURE__*/react.createElement(TextField_TextField, {
|
44141 |
-
variant: "outlined",
|
44142 |
-
fullWidth: true,
|
44143 |
-
value: value,
|
44144 |
-
label: translate("settings.button_action.actions.phone_number.number"),
|
44145 |
-
helperText: !isValidPhoneNumber ? translate("settings.button_action.actions.phone_number.invalid") : null,
|
44146 |
-
error: !isValidPhoneNumber,
|
44147 |
-
onChange: function onChange(obj) {
|
44148 |
-
_onChange(obj.target.value);
|
44149 |
-
},
|
44150 |
-
inputProps: {
|
44151 |
-
"data-testid": "action:field"
|
44152 |
-
}
|
44153 |
-
}), /*#__PURE__*/react.createElement(TextField_TextField, {
|
44154 |
-
variant: "outlined",
|
44155 |
-
fullWidth: true,
|
44156 |
-
multiline: true,
|
44157 |
-
rows: 4,
|
44158 |
-
inputProps: {
|
44159 |
-
"data-testid": "action:field"
|
44160 |
-
},
|
44161 |
-
value: body,
|
44162 |
-
label: "SMS" + " " + translate("settings.button_action.placeholders.mail.body"),
|
44163 |
-
onChange: function onChange(obj) {
|
44164 |
-
_onChange(obj.target.value, "text_body");
|
44165 |
-
}
|
44166 |
-
}), /*#__PURE__*/react.createElement("p", {
|
44167 |
-
dangerouslySetInnerHTML: {
|
44168 |
-
__html: translate("settings.button_action.actions.sms")
|
44169 |
}
|
44170 |
-
}));
|
44171 |
-
}
|
44172 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/TwitterDm/TwitterDm.js
|
44173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44174 |
|
|
|
|
|
|
|
44175 |
|
44176 |
-
|
44177 |
-
var _ref$value = _ref.value,
|
44178 |
-
value = _ref$value === void 0 ? "" : _ref$value,
|
44179 |
-
_ref$body = _ref.body,
|
44180 |
-
body = _ref$body === void 0 ? "" : _ref$body,
|
44181 |
-
_onChange = _ref.onChange;
|
44182 |
-
var check = /^\d+$/;
|
44183 |
-
return /*#__PURE__*/react.createElement("div", {
|
44184 |
-
className: "button-action-value"
|
44185 |
-
}, /*#__PURE__*/react.createElement(TextField_TextField, {
|
44186 |
-
variant: "outlined",
|
44187 |
-
fullWidth: true,
|
44188 |
-
value: value,
|
44189 |
-
label: "Account ID",
|
44190 |
-
helperText: !check.test(value) && value !== "" ? "Invalid account ID." : null,
|
44191 |
-
error: !check.test(value) && value !== "",
|
44192 |
-
onChange: function onChange(obj) {
|
44193 |
-
_onChange(obj.target.value.replace(/[^0-9]/gm, ""));
|
44194 |
-
},
|
44195 |
-
inputProps: {
|
44196 |
-
"data-testid": "action:field"
|
44197 |
-
}
|
44198 |
-
}), /*#__PURE__*/react.createElement(TextField_TextField, {
|
44199 |
-
variant: "outlined",
|
44200 |
-
fullWidth: true,
|
44201 |
-
inputProps: {
|
44202 |
-
"data-testid": "action:field"
|
44203 |
-
},
|
44204 |
-
multiline: true,
|
44205 |
-
rows: 4,
|
44206 |
-
value: body,
|
44207 |
-
label: translate("settings.button_action.placeholders.message"),
|
44208 |
-
onChange: function onChange(obj) {
|
44209 |
-
_onChange(obj.target.value, "text_body");
|
44210 |
-
}
|
44211 |
-
}), /*#__PURE__*/react.createElement("p", {
|
44212 |
-
dangerouslySetInnerHTML: {
|
44213 |
-
__html: translate("settings.button_action.actions.twitter_info")
|
44214 |
-
}
|
44215 |
-
}));
|
44216 |
}
|
44217 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/ElementorPopup/ElementorPopup.js
|
44218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44219 |
|
|
|
44220 |
|
|
|
44221 |
|
|
|
44222 |
|
|
|
|
|
44223 |
|
|
|
|
|
44224 |
|
44225 |
-
|
44226 |
-
|
44227 |
-
|
44228 |
-
|
44229 |
-
|
44230 |
-
|
44231 |
-
|
44232 |
-
|
44233 |
-
|
44234 |
-
|
44235 |
-
|
44236 |
-
|
44237 |
-
|
44238 |
-
|
44239 |
-
|
44240 |
-
|
44241 |
-
|
44242 |
-
|
44243 |
-
|
44244 |
-
|
44245 |
-
|
44246 |
-
|
44247 |
-
|
44248 |
-
|
44249 |
-
|
44250 |
-
|
44251 |
-
|
44252 |
-
|
44253 |
-
|
44254 |
-
|
44255 |
-
|
44256 |
-
|
44257 |
-
|
44258 |
-
|
44259 |
-
|
44260 |
-
|
44261 |
-
|
44262 |
-
|
44263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44264 |
}
|
44265 |
-
})))), /*#__PURE__*/react.createElement(KnowledgeBaseLink, {
|
44266 |
-
articleId: 76,
|
44267 |
-
setting: "Elementor Popup"
|
44268 |
-
}));
|
44269 |
-
}
|
44270 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/PopupMaker/PopupMaker.js
|
44271 |
|
|
|
|
|
|
|
44272 |
|
|
|
|
|
|
|
|
|
44273 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44274 |
|
|
|
|
|
|
|
44275 |
|
|
|
|
|
|
|
44276 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44277 |
|
44278 |
-
|
44279 |
-
|
44280 |
-
|
44281 |
-
|
44282 |
-
|
44283 |
-
|
44284 |
-
|
44285 |
-
|
44286 |
-
|
44287 |
-
|
44288 |
-
|
44289 |
-
|
44290 |
-
|
44291 |
-
|
44292 |
-
}
|
44293 |
-
}),
|
44294 |
-
|
44295 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44296 |
}
|
44297 |
-
}
|
44298 |
-
|
44299 |
-
|
44300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44301 |
}
|
44302 |
-
|
44303 |
-
|
44304 |
-
|
44305 |
-
onClick: function onClick() {
|
44306 |
-
onChange("popupMaker" + uniqueCharset() + "Pv2");
|
44307 |
-
},
|
44308 |
-
variant: "contained",
|
44309 |
-
color: "primary",
|
44310 |
-
style: {
|
44311 |
-
padding: "5px"
|
44312 |
}
|
44313 |
-
|
44314 |
-
|
44315 |
-
|
44316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44317 |
}
|
44318 |
-
}
|
44319 |
-
|
44320 |
-
|
44321 |
-
}));
|
44322 |
}
|
44323 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/ButtonActionNewTab/ButtonActionNewTab.js
|
44324 |
-
function ButtonActionNewTab_slicedToArray(arr, i) { return ButtonActionNewTab_arrayWithHoles(arr) || ButtonActionNewTab_iterableToArrayLimit(arr, i) || ButtonActionNewTab_unsupportedIterableToArray(arr, i) || ButtonActionNewTab_nonIterableRest(); }
|
44325 |
|
44326 |
-
|
44327 |
|
44328 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44329 |
|
44330 |
-
|
44331 |
|
44332 |
-
|
|
|
|
|
|
|
44333 |
|
44334 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44336 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44337 |
|
|
|
|
|
|
|
44338 |
|
44339 |
-
function
|
44340 |
-
|
44341 |
-
|
44342 |
-
|
44343 |
-
|
44344 |
-
|
44345 |
-
|
44346 |
-
|
44347 |
-
|
44348 |
-
|
44349 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44350 |
});
|
44351 |
-
|
44352 |
-
|
|
|
44353 |
|
44354 |
-
var
|
44355 |
-
|
44356 |
-
|
44357 |
-
|
|
|
|
|
|
|
|
|
|
|
44358 |
|
44359 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44360 |
|
44361 |
-
|
44362 |
-
|
44363 |
-
|
|
|
|
|
|
|
|
|
44364 |
|
44365 |
-
|
44366 |
-
setLabelWidth(inputLabel.current.offsetWidth);
|
44367 |
-
}, []);
|
44368 |
|
44369 |
-
var
|
44370 |
-
if (
|
44371 |
-
|
|
|
|
|
44372 |
}
|
|
|
44373 |
|
44374 |
-
|
44375 |
-
|
|
|
|
|
44376 |
}
|
44377 |
-
};
|
44378 |
|
44379 |
-
|
44380 |
-
|
44381 |
-
|
44382 |
-
|
44383 |
-
|
44384 |
-
|
44385 |
-
|
44386 |
-
|
44387 |
-
|
44388 |
-
|
44389 |
-
|
44390 |
-
|
44391 |
-
|
44392 |
-
|
44393 |
-
|
44394 |
-
|
44395 |
-
|
44396 |
-
|
44397 |
-
|
44398 |
-
|
44399 |
-
}
|
44400 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44401 |
}
|
44402 |
-
}, /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44403 |
-
value: "_self"
|
44404 |
-
}, "Current window"), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44405 |
-
value: "_blank"
|
44406 |
-
}, "New tab"), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44407 |
-
value: "_newWindow"
|
44408 |
-
}, "New window"), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
44409 |
-
value: "_popupWindow"
|
44410 |
-
}, "Pop-up window")));
|
44411 |
-
}
|
44412 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/DefaultTextField/DefaultTextField.js
|
44413 |
|
|
|
|
|
|
|
44414 |
|
|
|
|
|
|
|
44415 |
|
|
|
44416 |
|
|
|
|
|
|
|
44417 |
|
44418 |
-
|
44419 |
-
* DefaultTextField
|
44420 |
-
* Create a textfield that changes placeholder and such
|
44421 |
-
*
|
44422 |
-
* @param type string: Specify textfield type
|
44423 |
-
* @param placeholder string: Add a placholder in textfield
|
44424 |
-
* @param newTab bool: Add open in new tab toggle
|
44425 |
-
* @param paragraph string: Add paragraph under textfield
|
44426 |
-
* @param knowledge permalink, name: Add knowledgebase link under textfield
|
44427 |
-
* @param object object: Button object
|
44428 |
-
*/
|
44429 |
|
44430 |
-
|
44431 |
-
|
44432 |
-
value = _ref$value === void 0 ? "" : _ref$value,
|
44433 |
-
newTab = _ref.newTab,
|
44434 |
-
placeholder = _ref.placeholder,
|
44435 |
-
type = _ref.type,
|
44436 |
-
paragraph = _ref.paragraph,
|
44437 |
-
knowledge = _ref.knowledge,
|
44438 |
-
_onChange = _ref.onChange,
|
44439 |
-
_ref$checkPhoneNumber = _ref.checkPhoneNumber,
|
44440 |
-
checkPhoneNumber = _ref$checkPhoneNumber === void 0 ? false : _ref$checkPhoneNumber,
|
44441 |
-
_ref$checkText = _ref.checkText,
|
44442 |
-
checkText = _ref$checkText === void 0 ? "Invalid" : _ref$checkText,
|
44443 |
-
_ref$children = _ref.children,
|
44444 |
-
children = _ref$children === void 0 ? false : _ref$children;
|
44445 |
-
var isValidPhoneNumber = checkPhoneNumber ? value !== "" ? (0,isMobilePhone/* default */.ZP)(value, "any", {}) : true : true;
|
44446 |
-
return /*#__PURE__*/react.createElement("div", {
|
44447 |
-
className: "button-action-value"
|
44448 |
-
}, /*#__PURE__*/react.createElement(TextField_TextField, {
|
44449 |
-
variant: "outlined",
|
44450 |
-
fullWidth: true,
|
44451 |
-
inputProps: {
|
44452 |
-
"data-testid": "action:field"
|
44453 |
-
},
|
44454 |
-
type: type ? type : "text",
|
44455 |
-
helperText: //is there an error check?
|
44456 |
-
checkPhoneNumber ? // check if else
|
44457 |
-
!isValidPhoneNumber ? checkText : null : null,
|
44458 |
-
error: //is there an error check?
|
44459 |
-
checkPhoneNumber ? // check for errors
|
44460 |
-
!isValidPhoneNumber : false,
|
44461 |
-
value: value,
|
44462 |
-
label: placeholder,
|
44463 |
-
onChange: function onChange(obj) {
|
44464 |
-
_onChange(obj.target.value);
|
44465 |
}
|
44466 |
-
|
44467 |
-
|
44468 |
-
|
44469 |
-
|
44470 |
}
|
44471 |
-
|
44472 |
-
|
44473 |
-
|
|
|
|
|
44474 |
}
|
44475 |
-
}) : /*#__PURE__*/react.createElement(react.Fragment, null), knowledge ? addKnowledgeBaseLink(knowledge) : /*#__PURE__*/react.createElement(react.Fragment, null));
|
44476 |
-
}
|
44477 |
|
44478 |
-
|
44479 |
-
|
44480 |
-
|
44481 |
-
|
44482 |
-
|
44483 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44484 |
}
|
44485 |
});
|
44486 |
-
|
44487 |
-
|
44488 |
-
|
44489 |
-
|
44490 |
-
|
|
|
|
|
44491 |
|
44492 |
-
|
|
|
|
|
44493 |
|
44494 |
-
|
|
|
44495 |
|
44496 |
-
|
|
|
|
|
44497 |
|
44498 |
-
|
|
|
|
|
44499 |
|
44500 |
-
|
|
|
|
|
44501 |
|
|
|
44502 |
|
|
|
|
|
|
|
|
|
44503 |
|
|
|
|
|
|
|
44504 |
|
|
|
|
|
44505 |
|
|
|
|
|
|
|
|
|
44506 |
|
|
|
|
|
|
|
44507 |
|
|
|
|
|
44508 |
|
|
|
|
|
44509 |
|
44510 |
-
|
44511 |
-
|
44512 |
-
|
44513 |
-
|
44514 |
-
|
|
|
44515 |
|
44516 |
-
|
44517 |
-
|
44518 |
-
|
44519 |
-
|
|
|
|
|
|
|
44520 |
|
44521 |
-
|
44522 |
-
_useState4 = MessengerChat_slicedToArray(_useState3, 2),
|
44523 |
-
dialogShowed = _useState4[0],
|
44524 |
-
setDialogShowed = _useState4[1];
|
44525 |
|
44526 |
-
|
44527 |
-
|
44528 |
-
|
44529 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
44530 |
|
44531 |
-
|
44532 |
|
44533 |
-
|
44534 |
-
|
44535 |
-
|
44536 |
-
|
44537 |
-
|
44538 |
-
|
44539 |
|
44540 |
-
|
44541 |
-
|
44542 |
-
|
44543 |
-
}, name));
|
44544 |
-
});
|
44545 |
-
return all;
|
44546 |
-
}; // Handle close button
|
44547 |
|
44548 |
|
44549 |
-
|
44550 |
-
|
44551 |
|
44552 |
-
|
44553 |
-
|
|
|
|
|
|
|
44554 |
|
44555 |
-
|
44556 |
-
|
44557 |
-
|
44558 |
|
44559 |
-
if (
|
44560 |
-
|
44561 |
-
|
|
|
|
|
|
|
|
|
|
|
44562 |
}
|
44563 |
-
}
|
44564 |
-
}
|
44565 |
|
44566 |
-
|
44567 |
-
|
44568 |
-
|
44569 |
-
|
44570 |
-
|
44571 |
-
|
44572 |
-
|
44573 |
-
|
44574 |
-
|
44575 |
-
|
44576 |
-
|
44577 |
-
|
44578 |
-
|
44579 |
-
|
44580 |
-
|
44581 |
-
|
44582 |
-
},
|
44583 |
-
|
44584 |
-
|
44585 |
-
|
44586 |
-
|
|
|
|
|
|
|
|
|
|
|
44587 |
}
|
44588 |
-
|
44589 |
-
|
44590 |
-
}
|
44591 |
-
|
44592 |
-
|
44593 |
-
|
44594 |
-
|
44595 |
-
|
44596 |
-
|
44597 |
-
|
44598 |
-
vertical: "bottom",
|
44599 |
-
horizontal: "center"
|
44600 |
-
},
|
44601 |
-
transformOrigin: {
|
44602 |
-
vertical: "top",
|
44603 |
-
horizontal: "center"
|
44604 |
-
},
|
44605 |
-
getContentAnchorEl: null
|
44606 |
}
|
44607 |
-
|
44608 |
-
|
44609 |
-
|
44610 |
-
|
44611 |
-
|
44612 |
-
text: "I understand"
|
44613 |
-
}],
|
44614 |
-
onClose: function onClose() {
|
44615 |
-
return handleClose();
|
44616 |
}
|
44617 |
-
}
|
44618 |
-
|
44619 |
-
|
|
|
|
|
44620 |
}
|
44621 |
-
}))));
|
44622 |
-
}
|
44623 |
|
44624 |
-
|
44625 |
-
return {
|
44626 |
-
buttons: state.buttons
|
44627 |
-
};
|
44628 |
-
})(MessengerChat));
|
44629 |
-
;// CONCATENATED MODULE: ./node_modules/popper.js/dist/esm/popper.js
|
44630 |
-
/**!
|
44631 |
-
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
44632 |
-
* @version 1.16.1-lts
|
44633 |
-
* @license
|
44634 |
-
* Copyright (c) 2016 Federico Zivolo and contributors
|
44635 |
-
*
|
44636 |
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
44637 |
-
* of this software and associated documentation files (the "Software"), to deal
|
44638 |
-
* in the Software without restriction, including without limitation the rights
|
44639 |
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
44640 |
-
* copies of the Software, and to permit persons to whom the Software is
|
44641 |
-
* furnished to do so, subject to the following conditions:
|
44642 |
-
*
|
44643 |
-
* The above copyright notice and this permission notice shall be included in all
|
44644 |
-
* copies or substantial portions of the Software.
|
44645 |
-
*
|
44646 |
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
44647 |
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
44648 |
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
44649 |
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
44650 |
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
44651 |
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
44652 |
-
* SOFTWARE.
|
44653 |
-
*/
|
44654 |
-
var popper_isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
|
44655 |
|
44656 |
-
|
44657 |
-
|
44658 |
-
for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
|
44659 |
-
if (popper_isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
|
44660 |
-
return 1;
|
44661 |
}
|
44662 |
-
}
|
44663 |
-
return 0;
|
44664 |
-
}();
|
44665 |
|
44666 |
-
function
|
44667 |
-
|
44668 |
-
return function () {
|
44669 |
-
if (called) {
|
44670 |
return;
|
44671 |
}
|
44672 |
-
called = true;
|
44673 |
-
window.Promise.resolve().then(function () {
|
44674 |
-
called = false;
|
44675 |
-
fn();
|
44676 |
-
});
|
44677 |
-
};
|
44678 |
-
}
|
44679 |
|
44680 |
-
|
44681 |
-
|
44682 |
-
return function () {
|
44683 |
-
if (!scheduled) {
|
44684 |
-
scheduled = true;
|
44685 |
-
setTimeout(function () {
|
44686 |
-
scheduled = false;
|
44687 |
-
fn();
|
44688 |
-
}, timeoutDuration);
|
44689 |
}
|
|
|
|
|
44690 |
};
|
44691 |
-
}
|
44692 |
|
44693 |
-
var
|
44694 |
|
44695 |
-
|
44696 |
-
|
44697 |
-
|
44698 |
-
|
44699 |
-
|
44700 |
-
* @memberof Popper.Utils
|
44701 |
-
* @argument {Function} fn
|
44702 |
-
* @returns {Function}
|
44703 |
-
*/
|
44704 |
-
var popper_debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
|
44705 |
|
44706 |
-
|
44707 |
-
|
44708 |
-
* @method
|
44709 |
-
* @memberof Popper.Utils
|
44710 |
-
* @argument {Any} functionToCheck - variable to check
|
44711 |
-
* @returns {Boolean} answer to: is a function?
|
44712 |
-
*/
|
44713 |
-
function isFunction(functionToCheck) {
|
44714 |
-
var getType = {};
|
44715 |
-
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
44716 |
-
}
|
44717 |
|
44718 |
-
|
44719 |
-
* Get CSS computed property of the given element
|
44720 |
-
* @method
|
44721 |
-
* @memberof Popper.Utils
|
44722 |
-
* @argument {Eement} element
|
44723 |
-
* @argument {String} property
|
44724 |
-
*/
|
44725 |
-
function getStyleComputedProperty(element, property) {
|
44726 |
-
if (element.nodeType !== 1) {
|
44727 |
-
return [];
|
44728 |
-
}
|
44729 |
-
// NOTE: 1 DOM access here
|
44730 |
-
var window = element.ownerDocument.defaultView;
|
44731 |
-
var css = window.getComputedStyle(element, null);
|
44732 |
-
return property ? css[property] : css;
|
44733 |
-
}
|
44734 |
|
44735 |
-
|
44736 |
-
|
44737 |
-
|
44738 |
-
|
44739 |
-
|
44740 |
-
|
44741 |
-
|
44742 |
-
|
44743 |
-
|
44744 |
-
|
44745 |
-
|
44746 |
-
|
44747 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44748 |
|
44749 |
-
|
44750 |
-
|
44751 |
-
|
44752 |
-
|
44753 |
-
* @argument {Element} element
|
44754 |
-
* @returns {Element} scroll parent
|
44755 |
-
*/
|
44756 |
-
function popper_getScrollParent(element) {
|
44757 |
-
// Return body, `getScroll` will take care to get the correct `scrollTop` from it
|
44758 |
-
if (!element) {
|
44759 |
-
return document.body;
|
44760 |
-
}
|
44761 |
|
44762 |
-
|
44763 |
-
|
44764 |
-
|
44765 |
-
|
44766 |
-
case '#document':
|
44767 |
-
return element.body;
|
44768 |
-
}
|
44769 |
|
44770 |
-
|
44771 |
|
44772 |
-
|
44773 |
-
|
44774 |
-
|
44775 |
-
|
|
|
44776 |
|
44777 |
-
|
44778 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
44779 |
}
|
44780 |
|
44781 |
-
|
44782 |
-
|
|
|
|
|
44783 |
|
44784 |
-
|
44785 |
-
|
44786 |
-
* @method
|
44787 |
-
* @memberof Popper.Utils
|
44788 |
-
* @param {Element|Object} reference - the reference element (the popper will be relative to this)
|
44789 |
-
* @returns {Element} parent
|
44790 |
-
*/
|
44791 |
-
function getReferenceNode(reference) {
|
44792 |
-
return reference && reference.referenceNode ? reference.referenceNode : reference;
|
44793 |
-
}
|
44794 |
|
44795 |
-
|
44796 |
-
|
|
|
|
|
|
|
|
|
44797 |
|
44798 |
-
|
44799 |
-
|
44800 |
-
|
44801 |
-
* @memberof Popper.Utils
|
44802 |
-
* @param {Number} version to check
|
44803 |
-
* @returns {Boolean} isIE
|
44804 |
-
*/
|
44805 |
-
function popper_isIE(version) {
|
44806 |
-
if (version === 11) {
|
44807 |
-
return isIE11;
|
44808 |
-
}
|
44809 |
-
if (version === 10) {
|
44810 |
-
return isIE10;
|
44811 |
-
}
|
44812 |
-
return isIE11 || isIE10;
|
44813 |
-
}
|
44814 |
|
44815 |
-
|
44816 |
-
|
44817 |
-
|
44818 |
-
|
44819 |
-
* @argument {Element} element
|
44820 |
-
* @returns {Element} offset parent
|
44821 |
-
*/
|
44822 |
-
function popper_getOffsetParent(element) {
|
44823 |
-
if (!element) {
|
44824 |
-
return document.documentElement;
|
44825 |
-
}
|
44826 |
|
44827 |
-
|
|
|
|
|
|
|
44828 |
|
44829 |
-
|
44830 |
-
|
44831 |
-
|
44832 |
-
while (offsetParent === noOffsetParent && element.nextElementSibling) {
|
44833 |
-
offsetParent = (element = element.nextElementSibling).offsetParent;
|
44834 |
-
}
|
44835 |
|
44836 |
-
|
|
|
|
|
44837 |
|
44838 |
-
|
44839 |
-
|
44840 |
-
}
|
44841 |
|
44842 |
-
|
44843 |
-
|
44844 |
-
|
44845 |
-
|
44846 |
-
|
|
|
44847 |
|
44848 |
-
|
44849 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44850 |
|
44851 |
-
|
44852 |
-
var nodeName = element.nodeName;
|
44853 |
|
44854 |
-
|
44855 |
-
|
44856 |
-
|
44857 |
-
|
44858 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
44859 |
|
44860 |
-
|
44861 |
-
* Finds the root node (document, shadowDOM root) of the given element
|
44862 |
-
* @method
|
44863 |
-
* @memberof Popper.Utils
|
44864 |
-
* @argument {Element} node
|
44865 |
-
* @returns {Element} root node
|
44866 |
-
*/
|
44867 |
-
function getRoot(node) {
|
44868 |
-
if (node.parentNode !== null) {
|
44869 |
-
return getRoot(node.parentNode);
|
44870 |
-
}
|
44871 |
|
44872 |
-
|
44873 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44874 |
|
44875 |
-
|
44876 |
-
|
44877 |
-
|
44878 |
-
|
44879 |
-
|
44880 |
-
|
44881 |
-
|
44882 |
-
|
44883 |
-
|
44884 |
-
|
44885 |
-
|
44886 |
-
return document.documentElement;
|
44887 |
-
}
|
44888 |
|
44889 |
-
|
44890 |
-
|
44891 |
-
|
44892 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44893 |
|
44894 |
-
|
44895 |
-
|
44896 |
-
|
44897 |
-
|
44898 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
44899 |
|
44900 |
-
|
|
|
|
|
44901 |
|
44902 |
-
|
44903 |
-
|
44904 |
-
|
44905 |
-
}
|
44906 |
|
44907 |
-
|
44908 |
-
|
|
|
|
|
|
|
44909 |
|
44910 |
-
|
44911 |
-
|
44912 |
-
|
44913 |
-
return findCommonOffsetParent(element1root.host, element2);
|
44914 |
-
} else {
|
44915 |
-
return findCommonOffsetParent(element1, getRoot(element2).host);
|
44916 |
-
}
|
44917 |
-
}
|
44918 |
|
44919 |
-
|
44920 |
-
* Gets the scroll value of the given element in the given side (top and left)
|
44921 |
-
* @method
|
44922 |
-
* @memberof Popper.Utils
|
44923 |
-
* @argument {Element} element
|
44924 |
-
* @argument {String} side `top` or `left`
|
44925 |
-
* @returns {number} amount of scrolled pixels
|
44926 |
-
*/
|
44927 |
-
function popper_getScroll(element) {
|
44928 |
-
var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
|
44929 |
|
44930 |
-
|
44931 |
-
|
|
|
44932 |
|
44933 |
-
|
44934 |
-
var html = element.ownerDocument.documentElement;
|
44935 |
-
var scrollingElement = element.ownerDocument.scrollingElement || html;
|
44936 |
-
return scrollingElement[upperSide];
|
44937 |
-
}
|
44938 |
|
44939 |
-
|
44940 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
44941 |
|
44942 |
-
|
44943 |
-
|
44944 |
-
* @method
|
44945 |
-
* @memberof Popper.Utils
|
44946 |
-
* @param {Object} rect - Rect object you want to change
|
44947 |
-
* @param {HTMLElement} element - The element from the function reads the scroll values
|
44948 |
-
* @param {Boolean} subtract - set to true if you want to subtract the scroll values
|
44949 |
-
* @return {Object} rect - The modifier rect object
|
44950 |
-
*/
|
44951 |
-
function includeScroll(rect, element) {
|
44952 |
-
var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
44953 |
|
44954 |
-
|
44955 |
-
var scrollLeft = popper_getScroll(element, 'left');
|
44956 |
-
var modifier = subtract ? -1 : 1;
|
44957 |
-
rect.top += scrollTop * modifier;
|
44958 |
-
rect.bottom += scrollTop * modifier;
|
44959 |
-
rect.left += scrollLeft * modifier;
|
44960 |
-
rect.right += scrollLeft * modifier;
|
44961 |
-
return rect;
|
44962 |
-
}
|
44963 |
|
44964 |
-
|
44965 |
-
|
44966 |
-
|
44967 |
-
|
44968 |
-
* @param {CSSStyleDeclaration} styles
|
44969 |
-
* Result of `getStyleComputedProperty` on the given element
|
44970 |
-
* @param {String} axis - `x` or `y`
|
44971 |
-
* @return {number} borders - The borders size of the given axis
|
44972 |
-
*/
|
44973 |
|
44974 |
-
|
44975 |
-
|
44976 |
-
|
|
|
|
|
44977 |
|
44978 |
-
|
44979 |
-
|
|
|
44980 |
|
44981 |
-
|
44982 |
-
return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], popper_isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
|
44983 |
-
}
|
44984 |
|
44985 |
-
|
44986 |
-
|
44987 |
-
|
44988 |
-
|
|
|
|
|
|
|
|
|
|
|
44989 |
|
44990 |
-
|
44991 |
-
|
44992 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
44993 |
};
|
44994 |
-
}
|
44995 |
|
44996 |
-
var
|
44997 |
-
|
44998 |
-
throw new TypeError("Cannot call a class as a function");
|
44999 |
-
}
|
45000 |
-
};
|
45001 |
|
45002 |
-
|
45003 |
-
|
45004 |
-
for (var i = 0; i < props.length; i++) {
|
45005 |
-
var descriptor = props[i];
|
45006 |
-
descriptor.enumerable = descriptor.enumerable || false;
|
45007 |
-
descriptor.configurable = true;
|
45008 |
-
if ("value" in descriptor) descriptor.writable = true;
|
45009 |
-
Object.defineProperty(target, descriptor.key, descriptor);
|
45010 |
}
|
45011 |
-
}
|
45012 |
-
|
45013 |
-
return function (Constructor, protoProps, staticProps) {
|
45014 |
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
45015 |
-
if (staticProps) defineProperties(Constructor, staticProps);
|
45016 |
-
return Constructor;
|
45017 |
};
|
45018 |
-
}();
|
45019 |
|
|
|
|
|
|
|
|
|
|
|
|
|
45020 |
|
|
|
|
|
|
|
45021 |
|
|
|
|
|
|
|
45022 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45023 |
|
45024 |
-
|
45025 |
-
|
45026 |
-
Object.defineProperty(obj, key, {
|
45027 |
-
value: value,
|
45028 |
-
enumerable: true,
|
45029 |
-
configurable: true,
|
45030 |
-
writable: true
|
45031 |
-
});
|
45032 |
-
} else {
|
45033 |
-
obj[key] = value;
|
45034 |
-
}
|
45035 |
|
45036 |
-
|
45037 |
-
|
45038 |
|
45039 |
-
|
45040 |
-
|
45041 |
-
var source = arguments[i];
|
45042 |
|
45043 |
-
|
45044 |
-
|
45045 |
-
target[key] = source[key];
|
45046 |
}
|
45047 |
}
|
45048 |
-
}
|
45049 |
-
|
45050 |
-
return target;
|
45051 |
-
};
|
45052 |
-
|
45053 |
-
/**
|
45054 |
-
* Given element offsets, generate an output similar to getBoundingClientRect
|
45055 |
-
* @method
|
45056 |
-
* @memberof Popper.Utils
|
45057 |
-
* @argument {Object} offsets
|
45058 |
-
* @returns {Object} ClientRect like output
|
45059 |
-
*/
|
45060 |
-
function getClientRect(offsets) {
|
45061 |
-
return popper_extends({}, offsets, {
|
45062 |
-
right: offsets.left + offsets.width,
|
45063 |
-
bottom: offsets.top + offsets.height
|
45064 |
-
});
|
45065 |
-
}
|
45066 |
-
|
45067 |
-
/**
|
45068 |
-
* Get bounding client rect of given element
|
45069 |
-
* @method
|
45070 |
-
* @memberof Popper.Utils
|
45071 |
-
* @param {HTMLElement} element
|
45072 |
-
* @return {Object} client rect
|
45073 |
-
*/
|
45074 |
-
function popper_getBoundingClientRect(element) {
|
45075 |
-
var rect = {};
|
45076 |
|
45077 |
-
|
45078 |
-
|
45079 |
-
|
45080 |
-
|
45081 |
-
if (popper_isIE(10)) {
|
45082 |
-
rect = element.getBoundingClientRect();
|
45083 |
-
var scrollTop = popper_getScroll(element, 'top');
|
45084 |
-
var scrollLeft = popper_getScroll(element, 'left');
|
45085 |
-
rect.top += scrollTop;
|
45086 |
-
rect.left += scrollLeft;
|
45087 |
-
rect.bottom += scrollTop;
|
45088 |
-
rect.right += scrollLeft;
|
45089 |
} else {
|
45090 |
-
|
45091 |
}
|
45092 |
-
} catch (e) {}
|
45093 |
-
|
45094 |
-
var result = {
|
45095 |
-
left: rect.left,
|
45096 |
-
top: rect.top,
|
45097 |
-
width: rect.right - rect.left,
|
45098 |
-
height: rect.bottom - rect.top
|
45099 |
};
|
45100 |
|
45101 |
-
|
45102 |
-
|
45103 |
-
|
45104 |
-
|
|
|
|
|
|
|
45105 |
|
45106 |
-
var
|
45107 |
-
|
|
|
45108 |
|
45109 |
-
|
45110 |
-
|
45111 |
-
|
45112 |
-
|
45113 |
-
|
45114 |
-
vertScrollbar -= popper_getBordersSize(styles, 'y');
|
45115 |
|
45116 |
-
|
45117 |
-
|
45118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
45119 |
|
45120 |
-
|
45121 |
-
|
|
|
|
|
|
|
|
|
|
|
45122 |
|
45123 |
-
function getOffsetRectRelativeToArbitraryNode(children, parent) {
|
45124 |
-
var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
45125 |
|
45126 |
-
var
|
45127 |
-
|
45128 |
-
|
45129 |
-
|
45130 |
-
|
45131 |
|
45132 |
-
var styles = getStyleComputedProperty(parent);
|
45133 |
-
var borderTopWidth = parseFloat(styles.borderTopWidth);
|
45134 |
-
var borderLeftWidth = parseFloat(styles.borderLeftWidth);
|
45135 |
|
45136 |
-
|
45137 |
-
|
45138 |
-
parentRect.top = Math.max(parentRect.top, 0);
|
45139 |
-
parentRect.left = Math.max(parentRect.left, 0);
|
45140 |
-
}
|
45141 |
-
var offsets = getClientRect({
|
45142 |
-
top: childrenRect.top - parentRect.top - borderTopWidth,
|
45143 |
-
left: childrenRect.left - parentRect.left - borderLeftWidth,
|
45144 |
-
width: childrenRect.width,
|
45145 |
-
height: childrenRect.height
|
45146 |
-
});
|
45147 |
-
offsets.marginTop = 0;
|
45148 |
-
offsets.marginLeft = 0;
|
45149 |
|
45150 |
-
|
45151 |
-
|
45152 |
-
|
45153 |
-
// the box of the documentElement, in the other cases not.
|
45154 |
-
if (!isIE10 && isHTML) {
|
45155 |
-
var marginTop = parseFloat(styles.marginTop);
|
45156 |
-
var marginLeft = parseFloat(styles.marginLeft);
|
45157 |
|
45158 |
-
|
45159 |
-
|
45160 |
-
offsets.left -= borderLeftWidth - marginLeft;
|
45161 |
-
offsets.right -= borderLeftWidth - marginLeft;
|
45162 |
|
45163 |
-
|
45164 |
-
|
45165 |
-
|
45166 |
-
|
|
|
45167 |
|
45168 |
-
|
45169 |
-
|
45170 |
-
|
45171 |
|
45172 |
-
|
45173 |
-
|
|
|
|
|
|
|
|
|
45174 |
|
45175 |
-
|
45176 |
-
|
|
|
|
|
45177 |
|
45178 |
-
|
45179 |
-
|
45180 |
-
|
45181 |
-
|
|
|
|
|
|
|
45182 |
|
45183 |
-
|
45184 |
-
|
|
|
45185 |
|
45186 |
-
|
45187 |
-
|
45188 |
-
|
45189 |
-
|
45190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45191 |
};
|
45192 |
-
|
45193 |
-
return getClientRect(offset);
|
45194 |
}
|
|
|
45195 |
|
45196 |
-
/**
|
45197 |
-
* Check if the given element is fixed or is inside a fixed parent
|
45198 |
-
* @method
|
45199 |
-
* @memberof Popper.Utils
|
45200 |
-
* @argument {Element} element
|
45201 |
-
* @argument {Element} customContainer
|
45202 |
-
* @returns {Boolean} answer to "isFixed?"
|
45203 |
-
*/
|
45204 |
-
function isFixed(element) {
|
45205 |
-
var nodeName = element.nodeName;
|
45206 |
-
if (nodeName === 'BODY' || nodeName === 'HTML') {
|
45207 |
-
return false;
|
45208 |
-
}
|
45209 |
-
if (getStyleComputedProperty(element, 'position') === 'fixed') {
|
45210 |
-
return true;
|
45211 |
-
}
|
45212 |
-
var parentNode = popper_getParentNode(element);
|
45213 |
-
if (!parentNode) {
|
45214 |
-
return false;
|
45215 |
-
}
|
45216 |
-
return isFixed(parentNode);
|
45217 |
-
}
|
45218 |
|
45219 |
-
/**
|
45220 |
-
* Finds the first parent of an element that has a transformed property defined
|
45221 |
-
* @method
|
45222 |
-
* @memberof Popper.Utils
|
45223 |
-
* @argument {Element} element
|
45224 |
-
* @returns {Element} first transformed parent or documentElement
|
45225 |
-
*/
|
45226 |
|
45227 |
-
function getFixedPositionOffsetParent(element) {
|
45228 |
-
// This check is needed to avoid errors in case one of the elements isn't defined for any reason
|
45229 |
-
if (!element || !element.parentElement || popper_isIE()) {
|
45230 |
-
return document.documentElement;
|
45231 |
-
}
|
45232 |
-
var el = element.parentElement;
|
45233 |
-
while (el && getStyleComputedProperty(el, 'transform') === 'none') {
|
45234 |
-
el = el.parentElement;
|
45235 |
-
}
|
45236 |
-
return el || document.documentElement;
|
45237 |
-
}
|
45238 |
|
45239 |
-
/**
|
45240 |
-
* Computed the boundaries limits and return them
|
45241 |
-
* @method
|
45242 |
-
* @memberof Popper.Utils
|
45243 |
-
* @param {HTMLElement} popper
|
45244 |
-
* @param {HTMLElement} reference
|
45245 |
-
* @param {number} padding
|
45246 |
-
* @param {HTMLElement} boundariesElement - Element used to define the boundaries
|
45247 |
-
* @param {Boolean} fixedPosition - Is in fixed position mode
|
45248 |
-
* @returns {Object} Coordinates of the boundaries
|
45249 |
-
*/
|
45250 |
-
function getBoundaries(popper, reference, padding, boundariesElement) {
|
45251 |
-
var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
45252 |
|
45253 |
-
// NOTE: 1 DOM access here
|
45254 |
|
45255 |
-
var boundaries = { top: 0, left: 0 };
|
45256 |
-
var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
|
45257 |
|
45258 |
-
// Handle viewport case
|
45259 |
-
if (boundariesElement === 'viewport') {
|
45260 |
-
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
|
45261 |
-
} else {
|
45262 |
-
// Handle other cases based on DOM element used as boundaries
|
45263 |
-
var boundariesNode = void 0;
|
45264 |
-
if (boundariesElement === 'scrollParent') {
|
45265 |
-
boundariesNode = popper_getScrollParent(popper_getParentNode(reference));
|
45266 |
-
if (boundariesNode.nodeName === 'BODY') {
|
45267 |
-
boundariesNode = popper.ownerDocument.documentElement;
|
45268 |
-
}
|
45269 |
-
} else if (boundariesElement === 'window') {
|
45270 |
-
boundariesNode = popper.ownerDocument.documentElement;
|
45271 |
-
} else {
|
45272 |
-
boundariesNode = boundariesElement;
|
45273 |
-
}
|
45274 |
|
45275 |
-
var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
|
45276 |
|
45277 |
-
// In case of HTML, we need a different computation
|
45278 |
-
if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
|
45279 |
-
var _getWindowSizes = getWindowSizes(popper.ownerDocument),
|
45280 |
-
height = _getWindowSizes.height,
|
45281 |
-
width = _getWindowSizes.width;
|
45282 |
|
45283 |
-
boundaries.top += offsets.top - offsets.marginTop;
|
45284 |
-
boundaries.bottom = height + offsets.top;
|
45285 |
-
boundaries.left += offsets.left - offsets.marginLeft;
|
45286 |
-
boundaries.right = width + offsets.left;
|
45287 |
-
} else {
|
45288 |
-
// for all the other DOM elements, this one is good
|
45289 |
-
boundaries = offsets;
|
45290 |
-
}
|
45291 |
-
}
|
45292 |
|
45293 |
-
// Add paddings
|
45294 |
-
padding = padding || 0;
|
45295 |
-
var isPaddingNumber = typeof padding === 'number';
|
45296 |
-
boundaries.left += isPaddingNumber ? padding : padding.left || 0;
|
45297 |
-
boundaries.top += isPaddingNumber ? padding : padding.top || 0;
|
45298 |
-
boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
|
45299 |
-
boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
|
45300 |
|
45301 |
-
return boundaries;
|
45302 |
-
}
|
45303 |
|
45304 |
-
function getArea(_ref) {
|
45305 |
-
var width = _ref.width,
|
45306 |
-
height = _ref.height;
|
45307 |
|
45308 |
-
return width * height;
|
45309 |
-
}
|
45310 |
|
45311 |
-
/**
|
45312 |
-
* Utility used to transform the `auto` placement to the placement with more
|
45313 |
-
* available space.
|
45314 |
-
* @method
|
45315 |
-
* @memberof Popper.Utils
|
45316 |
-
* @argument {Object} data - The data object generated by update method
|
45317 |
-
* @argument {Object} options - Modifiers configuration and options
|
45318 |
-
* @returns {Object} The data object, properly modified
|
45319 |
-
*/
|
45320 |
-
function popper_computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
|
45321 |
-
var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
|
45322 |
|
45323 |
-
|
45324 |
-
|
45325 |
-
}
|
45326 |
|
45327 |
-
|
|
|
|
|
|
|
|
|
|
|
45328 |
|
45329 |
-
|
45330 |
-
|
45331 |
-
|
45332 |
-
|
45333 |
-
|
45334 |
-
|
45335 |
-
width: boundaries.right - refRect.right,
|
45336 |
-
height: boundaries.height
|
45337 |
},
|
45338 |
-
|
45339 |
-
|
45340 |
-
|
|
|
45341 |
},
|
45342 |
-
left: {
|
45343 |
-
width: refRect.left - boundaries.left,
|
45344 |
-
height: boundaries.height
|
45345 |
-
}
|
45346 |
-
};
|
45347 |
|
45348 |
-
|
45349 |
-
|
45350 |
-
key: key
|
45351 |
-
}, rects[key], {
|
45352 |
-
area: getArea(rects[key])
|
45353 |
-
});
|
45354 |
-
}).sort(function (a, b) {
|
45355 |
-
return b.area - a.area;
|
45356 |
-
});
|
45357 |
|
45358 |
-
|
45359 |
-
|
45360 |
-
|
45361 |
-
|
45362 |
-
|
45363 |
|
45364 |
-
|
|
|
|
|
|
|
|
|
45365 |
|
45366 |
-
|
|
|
45367 |
|
45368 |
-
|
45369 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45370 |
|
45371 |
-
|
45372 |
-
|
45373 |
-
|
45374 |
-
|
45375 |
-
|
45376 |
-
|
45377 |
-
* @param {Element} reference - the reference element (the popper will be relative to this)
|
45378 |
-
* @param {Element} fixedPosition - is in fixed position mode
|
45379 |
-
* @returns {Object} An object containing the offsets which will be applied to the popper
|
45380 |
-
*/
|
45381 |
-
function getReferenceOffsets(state, popper, reference) {
|
45382 |
-
var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
45383 |
|
45384 |
-
|
45385 |
-
|
45386 |
-
|
|
|
45387 |
|
45388 |
-
|
45389 |
-
|
45390 |
-
|
45391 |
-
|
45392 |
-
|
45393 |
-
|
45394 |
-
*/
|
45395 |
-
function getOuterSizes(element) {
|
45396 |
-
var window = element.ownerDocument.defaultView;
|
45397 |
-
var styles = window.getComputedStyle(element);
|
45398 |
-
var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
|
45399 |
-
var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
|
45400 |
-
var result = {
|
45401 |
-
width: element.offsetWidth + y,
|
45402 |
-
height: element.offsetHeight + x
|
45403 |
-
};
|
45404 |
-
return result;
|
45405 |
-
}
|
45406 |
|
45407 |
-
|
45408 |
-
* Get the opposite placement of the given one
|
45409 |
-
* @method
|
45410 |
-
* @memberof Popper.Utils
|
45411 |
-
* @argument {String} placement
|
45412 |
-
* @returns {String} flipped placement
|
45413 |
-
*/
|
45414 |
-
function popper_getOppositePlacement(placement) {
|
45415 |
-
var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
|
45416 |
-
return placement.replace(/left|right|bottom|top/g, function (matched) {
|
45417 |
-
return hash[matched];
|
45418 |
-
});
|
45419 |
-
}
|
45420 |
|
45421 |
-
|
45422 |
-
|
45423 |
-
|
45424 |
-
|
45425 |
-
|
45426 |
-
|
45427 |
-
* @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
|
45428 |
-
* @param {String} placement - one of the valid placement options
|
45429 |
-
* @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
|
45430 |
-
*/
|
45431 |
-
function getPopperOffsets(popper, referenceOffsets, placement) {
|
45432 |
-
placement = placement.split('-')[0];
|
45433 |
|
45434 |
-
|
45435 |
-
|
45436 |
|
45437 |
-
|
45438 |
-
|
45439 |
-
|
45440 |
-
|
45441 |
-
|
45442 |
|
45443 |
-
|
45444 |
-
|
45445 |
-
|
45446 |
-
|
45447 |
-
var measurement = isHoriz ? 'height' : 'width';
|
45448 |
-
var secondaryMeasurement = !isHoriz ? 'height' : 'width';
|
45449 |
|
45450 |
-
|
45451 |
-
|
45452 |
-
|
45453 |
-
|
45454 |
-
popperOffsets[secondarySide] = referenceOffsets[popper_getOppositePlacement(secondarySide)];
|
45455 |
-
}
|
45456 |
|
45457 |
-
|
45458 |
-
|
|
|
|
|
45459 |
|
45460 |
-
|
45461 |
-
|
45462 |
-
|
45463 |
-
|
45464 |
-
|
45465 |
-
* @argument prop
|
45466 |
-
* @argument value
|
45467 |
-
* @returns index or -1
|
45468 |
-
*/
|
45469 |
-
function popper_find(arr, check) {
|
45470 |
-
// use native find if supported
|
45471 |
-
if (Array.prototype.find) {
|
45472 |
-
return arr.find(check);
|
45473 |
-
}
|
45474 |
|
45475 |
-
|
45476 |
-
|
45477 |
-
|
|
|
|
|
|
|
|
|
|
|
45478 |
|
45479 |
-
|
45480 |
-
|
45481 |
-
|
45482 |
-
|
45483 |
-
|
45484 |
-
* @argument prop
|
45485 |
-
* @argument value
|
45486 |
-
* @returns index or -1
|
45487 |
-
*/
|
45488 |
-
function popper_findIndex(arr, prop, value) {
|
45489 |
-
// use native findIndex if supported
|
45490 |
-
if (Array.prototype.findIndex) {
|
45491 |
-
return arr.findIndex(function (cur) {
|
45492 |
-
return cur[prop] === value;
|
45493 |
-
});
|
45494 |
-
}
|
45495 |
|
45496 |
-
|
45497 |
-
|
45498 |
-
|
45499 |
-
|
45500 |
-
|
45501 |
-
}
|
45502 |
|
45503 |
-
|
45504 |
-
|
45505 |
-
|
45506 |
-
|
45507 |
-
|
45508 |
-
|
45509 |
-
|
45510 |
-
|
45511 |
-
|
45512 |
-
|
45513 |
-
|
45514 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45515 |
|
45516 |
-
|
45517 |
-
|
45518 |
-
|
45519 |
-
|
45520 |
-
}
|
45521 |
-
var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
|
45522 |
-
if (modifier.enabled && isFunction(fn)) {
|
45523 |
-
// Add properties to offsets to make them a complete clientRect object
|
45524 |
-
// we do this before each modifier to make sure the previous one doesn't
|
45525 |
-
// mess with these values
|
45526 |
-
data.offsets.popper = getClientRect(data.offsets.popper);
|
45527 |
-
data.offsets.reference = getClientRect(data.offsets.reference);
|
45528 |
|
45529 |
-
|
|
|
|
|
|
|
|
|
|
|
45530 |
}
|
45531 |
-
});
|
45532 |
-
|
45533 |
-
return data;
|
45534 |
-
}
|
45535 |
-
|
45536 |
-
/**
|
45537 |
-
* Updates the position of the popper, computing the new offsets and applying
|
45538 |
-
* the new style.<br />
|
45539 |
-
* Prefer `scheduleUpdate` over `update` because of performance reasons.
|
45540 |
-
* @method
|
45541 |
-
* @memberof Popper
|
45542 |
-
*/
|
45543 |
-
function popper_update() {
|
45544 |
-
// if popper is destroyed, don't perform any further update
|
45545 |
-
if (this.state.isDestroyed) {
|
45546 |
-
return;
|
45547 |
-
}
|
45548 |
-
|
45549 |
-
var data = {
|
45550 |
-
instance: this,
|
45551 |
-
styles: {},
|
45552 |
-
arrowStyles: {},
|
45553 |
-
attributes: {},
|
45554 |
-
flipped: false,
|
45555 |
-
offsets: {}
|
45556 |
};
|
|
|
45557 |
|
45558 |
-
|
45559 |
-
|
|
|
|
|
|
|
45560 |
|
45561 |
-
|
45562 |
-
|
45563 |
-
// and refer to originalPlacement to know the original value
|
45564 |
-
data.placement = popper_computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
|
45565 |
|
45566 |
-
|
45567 |
-
|
|
|
45568 |
|
45569 |
-
|
45570 |
|
45571 |
-
|
45572 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45573 |
|
45574 |
-
data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
|
45575 |
|
45576 |
-
|
45577 |
-
data = runModifiers(this.modifiers, data);
|
45578 |
|
45579 |
-
|
45580 |
-
|
45581 |
-
|
45582 |
-
|
45583 |
-
|
45584 |
-
|
45585 |
-
|
45586 |
-
|
45587 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45588 |
|
45589 |
-
|
45590 |
-
* Helper used to know if the given modifier is enabled.
|
45591 |
-
* @method
|
45592 |
-
* @memberof Popper.Utils
|
45593 |
-
* @returns {Boolean}
|
45594 |
-
*/
|
45595 |
-
function isModifierEnabled(modifiers, modifierName) {
|
45596 |
-
return modifiers.some(function (_ref) {
|
45597 |
-
var name = _ref.name,
|
45598 |
-
enabled = _ref.enabled;
|
45599 |
-
return enabled && name === modifierName;
|
45600 |
-
});
|
45601 |
-
}
|
45602 |
|
45603 |
-
|
45604 |
-
|
45605 |
-
|
45606 |
-
|
45607 |
-
|
45608 |
-
|
45609 |
-
|
45610 |
-
function getSupportedPropertyName(property) {
|
45611 |
-
var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
|
45612 |
-
var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
|
45613 |
|
45614 |
-
|
45615 |
-
|
45616 |
-
|
45617 |
-
|
45618 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
45619 |
}
|
45620 |
}
|
45621 |
-
return null;
|
45622 |
-
}
|
45623 |
|
45624 |
-
|
45625 |
-
|
45626 |
-
* @method
|
45627 |
-
* @memberof Popper
|
45628 |
-
*/
|
45629 |
-
function destroy() {
|
45630 |
-
this.state.isDestroyed = true;
|
45631 |
|
45632 |
-
|
45633 |
-
|
45634 |
-
|
45635 |
-
|
45636 |
-
|
45637 |
-
|
45638 |
-
|
45639 |
-
this.popper.style.bottom = '';
|
45640 |
-
this.popper.style.willChange = '';
|
45641 |
-
this.popper.style[getSupportedPropertyName('transform')] = '';
|
45642 |
}
|
45643 |
|
45644 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45645 |
|
45646 |
-
|
45647 |
-
|
45648 |
-
if (this.options.removeOnDestroy) {
|
45649 |
-
this.popper.parentNode.removeChild(this.popper);
|
45650 |
-
}
|
45651 |
-
return this;
|
45652 |
-
}
|
45653 |
|
45654 |
-
|
45655 |
-
|
45656 |
-
|
45657 |
-
|
45658 |
-
|
45659 |
-
|
45660 |
-
|
45661 |
-
|
45662 |
-
|
|
|
|
|
|
|
45663 |
|
45664 |
-
|
45665 |
-
var
|
45666 |
-
|
45667 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45668 |
|
45669 |
-
|
45670 |
-
|
45671 |
-
|
45672 |
-
|
45673 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45674 |
|
45675 |
-
|
45676 |
-
* Setup needed event listeners used to update the popper position
|
45677 |
-
* @method
|
45678 |
-
* @memberof Popper.Utils
|
45679 |
-
* @private
|
45680 |
-
*/
|
45681 |
-
function setupEventListeners(reference, options, state, updateBound) {
|
45682 |
-
// Resize event listener on window
|
45683 |
-
state.updateBound = updateBound;
|
45684 |
-
popper_getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
|
45685 |
|
45686 |
-
|
45687 |
-
var scrollElement = popper_getScrollParent(reference);
|
45688 |
-
attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
|
45689 |
-
state.scrollElement = scrollElement;
|
45690 |
-
state.eventsEnabled = true;
|
45691 |
|
45692 |
-
|
45693 |
-
}
|
45694 |
|
45695 |
-
|
45696 |
-
* It will add resize/scroll events and start recalculating
|
45697 |
-
* position of the popper element when they are triggered.
|
45698 |
-
* @method
|
45699 |
-
* @memberof Popper
|
45700 |
-
*/
|
45701 |
-
function enableEventListeners() {
|
45702 |
-
if (!this.state.eventsEnabled) {
|
45703 |
-
this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
|
45704 |
-
}
|
45705 |
-
}
|
45706 |
|
45707 |
-
|
45708 |
-
* Remove event listeners used to update the popper position
|
45709 |
-
* @method
|
45710 |
-
* @memberof Popper.Utils
|
45711 |
-
* @private
|
45712 |
-
*/
|
45713 |
-
function removeEventListeners(reference, state) {
|
45714 |
-
// Remove resize event listener on window
|
45715 |
-
popper_getWindow(reference).removeEventListener('resize', state.updateBound);
|
45716 |
|
45717 |
-
|
45718 |
-
state.scrollParents.forEach(function (target) {
|
45719 |
-
target.removeEventListener('scroll', state.updateBound);
|
45720 |
-
});
|
45721 |
|
45722 |
-
// Reset state
|
45723 |
-
state.updateBound = null;
|
45724 |
-
state.scrollParents = [];
|
45725 |
-
state.scrollElement = null;
|
45726 |
-
state.eventsEnabled = false;
|
45727 |
-
return state;
|
45728 |
-
}
|
45729 |
|
45730 |
-
/**
|
45731 |
-
* It will remove resize/scroll events and won't recalculate popper position
|
45732 |
-
* when they are triggered. It also won't trigger `onUpdate` callback anymore,
|
45733 |
-
* unless you call `update` method manually.
|
45734 |
-
* @method
|
45735 |
-
* @memberof Popper
|
45736 |
-
*/
|
45737 |
-
function disableEventListeners() {
|
45738 |
-
if (this.state.eventsEnabled) {
|
45739 |
-
cancelAnimationFrame(this.scheduleUpdate);
|
45740 |
-
this.state = removeEventListeners(this.reference, this.state);
|
45741 |
-
}
|
45742 |
-
}
|
45743 |
|
45744 |
-
/**
|
45745 |
-
* Tells if a given input is a number
|
45746 |
-
* @method
|
45747 |
-
* @memberof Popper.Utils
|
45748 |
-
* @param {*} input to check
|
45749 |
-
* @return {Boolean}
|
45750 |
-
*/
|
45751 |
-
function isNumeric(n) {
|
45752 |
-
return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
|
45753 |
-
}
|
45754 |
|
45755 |
-
/**
|
45756 |
-
* Set the style to the given popper
|
45757 |
-
* @method
|
45758 |
-
* @memberof Popper.Utils
|
45759 |
-
* @argument {Element} element - Element to apply the style to
|
45760 |
-
* @argument {Object} styles
|
45761 |
-
* Object with a list of properties and values which will be applied to the element
|
45762 |
-
*/
|
45763 |
-
function setStyles(element, styles) {
|
45764 |
-
Object.keys(styles).forEach(function (prop) {
|
45765 |
-
var unit = '';
|
45766 |
-
// add unit if the value is numeric and is one of the following
|
45767 |
-
if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
|
45768 |
-
unit = 'px';
|
45769 |
-
}
|
45770 |
-
element.style[prop] = styles[prop] + unit;
|
45771 |
-
});
|
45772 |
-
}
|
45773 |
|
45774 |
-
/**
|
45775 |
-
* Set the attributes to the given popper
|
45776 |
-
* @method
|
45777 |
-
* @memberof Popper.Utils
|
45778 |
-
* @argument {Element} element - Element to apply the attributes to
|
45779 |
-
* @argument {Object} styles
|
45780 |
-
* Object with a list of properties and values which will be applied to the element
|
45781 |
-
*/
|
45782 |
-
function setAttributes(element, attributes) {
|
45783 |
-
Object.keys(attributes).forEach(function (prop) {
|
45784 |
-
var value = attributes[prop];
|
45785 |
-
if (value !== false) {
|
45786 |
-
element.setAttribute(prop, attributes[prop]);
|
45787 |
-
} else {
|
45788 |
-
element.removeAttribute(prop);
|
45789 |
-
}
|
45790 |
-
});
|
45791 |
-
}
|
45792 |
|
45793 |
-
/**
|
45794 |
-
* @function
|
45795 |
-
* @memberof Modifiers
|
45796 |
-
* @argument {Object} data - The data object generated by `update` method
|
45797 |
-
* @argument {Object} data.styles - List of style properties - values to apply to popper element
|
45798 |
-
* @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
|
45799 |
-
* @argument {Object} options - Modifiers configuration and options
|
45800 |
-
* @returns {Object} The same data object
|
45801 |
-
*/
|
45802 |
-
function applyStyle(data) {
|
45803 |
-
// any property present in `data.styles` will be applied to the popper,
|
45804 |
-
// in this way we can make the 3rd party modifiers add custom styles to it
|
45805 |
-
// Be aware, modifiers could override the properties defined in the previous
|
45806 |
-
// lines of this modifier!
|
45807 |
-
setStyles(data.instance.popper, data.styles);
|
45808 |
|
45809 |
-
// any property present in `data.attributes` will be applied to the popper,
|
45810 |
-
// they will be set as HTML attributes of the element
|
45811 |
-
setAttributes(data.instance.popper, data.attributes);
|
45812 |
|
45813 |
-
// if arrowElement is defined and arrowStyles has some properties
|
45814 |
-
if (data.arrowElement && Object.keys(data.arrowStyles).length) {
|
45815 |
-
setStyles(data.arrowElement, data.arrowStyles);
|
45816 |
-
}
|
45817 |
|
45818 |
-
|
45819 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
45820 |
|
45821 |
-
|
45822 |
-
|
45823 |
-
|
45824 |
-
|
45825 |
-
* @method
|
45826 |
-
* @memberof Popper.modifiers
|
45827 |
-
* @param {HTMLElement} reference - The reference element used to position the popper
|
45828 |
-
* @param {HTMLElement} popper - The HTML element used as popper
|
45829 |
-
* @param {Object} options - Popper.js options
|
45830 |
-
*/
|
45831 |
-
function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
|
45832 |
-
// compute reference element offsets
|
45833 |
-
var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
|
45834 |
|
45835 |
-
|
45836 |
-
|
45837 |
-
|
45838 |
-
|
45839 |
|
45840 |
-
|
|
|
|
|
|
|
45841 |
|
45842 |
-
|
45843 |
-
|
45844 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45845 |
|
45846 |
-
|
45847 |
-
}
|
45848 |
|
45849 |
-
|
45850 |
-
* @function
|
45851 |
-
* @memberof Popper.Utils
|
45852 |
-
* @argument {Object} data - The data object generated by `update` method
|
45853 |
-
* @argument {Boolean} shouldRound - If the offsets should be rounded at all
|
45854 |
-
* @returns {Object} The popper's position offsets rounded
|
45855 |
-
*
|
45856 |
-
* The tale of pixel-perfect positioning. It's still not 100% perfect, but as
|
45857 |
-
* good as it can be within reason.
|
45858 |
-
* Discussion here: https://github.com/FezVrasta/popper.js/pull/715
|
45859 |
-
*
|
45860 |
-
* Low DPI screens cause a popper to be blurry if not using full pixels (Safari
|
45861 |
-
* as well on High DPI screens).
|
45862 |
-
*
|
45863 |
-
* Firefox prefers no rounding for positioning and does not have blurriness on
|
45864 |
-
* high DPI screens.
|
45865 |
-
*
|
45866 |
-
* Only horizontal placement and left/right values need to be considered.
|
45867 |
-
*/
|
45868 |
-
function getRoundedOffsets(data, shouldRound) {
|
45869 |
-
var _data$offsets = data.offsets,
|
45870 |
-
popper = _data$offsets.popper,
|
45871 |
-
reference = _data$offsets.reference;
|
45872 |
-
var round = Math.round,
|
45873 |
-
floor = Math.floor;
|
45874 |
|
45875 |
-
|
45876 |
-
return v;
|
45877 |
-
};
|
45878 |
|
45879 |
-
|
45880 |
-
var popperWidth = round(popper.width);
|
45881 |
|
45882 |
-
|
45883 |
-
var isVariation = data.placement.indexOf('-') !== -1;
|
45884 |
-
var sameWidthParity = referenceWidth % 2 === popperWidth % 2;
|
45885 |
-
var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;
|
45886 |
|
45887 |
-
var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;
|
45888 |
-
var verticalToInteger = !shouldRound ? noRound : round;
|
45889 |
|
45890 |
-
return {
|
45891 |
-
left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),
|
45892 |
-
top: verticalToInteger(popper.top),
|
45893 |
-
bottom: verticalToInteger(popper.bottom),
|
45894 |
-
right: horizontalToInteger(popper.right)
|
45895 |
-
};
|
45896 |
-
}
|
45897 |
|
45898 |
-
var isFirefox = popper_isBrowser && /Firefox/i.test(navigator.userAgent);
|
45899 |
|
45900 |
-
/**
|
45901 |
-
* @function
|
45902 |
-
* @memberof Modifiers
|
45903 |
-
* @argument {Object} data - The data object generated by `update` method
|
45904 |
-
* @argument {Object} options - Modifiers configuration and options
|
45905 |
-
* @returns {Object} The data object, properly modified
|
45906 |
-
*/
|
45907 |
-
function computeStyle(data, options) {
|
45908 |
-
var x = options.x,
|
45909 |
-
y = options.y;
|
45910 |
-
var popper = data.offsets.popper;
|
45911 |
|
45912 |
-
// Remove this legacy support in Popper.js v2
|
45913 |
|
45914 |
-
var legacyGpuAccelerationOption = popper_find(data.instance.modifiers, function (modifier) {
|
45915 |
-
return modifier.name === 'applyStyle';
|
45916 |
-
}).gpuAcceleration;
|
45917 |
-
if (legacyGpuAccelerationOption !== undefined) {
|
45918 |
-
console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
|
45919 |
-
}
|
45920 |
-
var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
|
45921 |
|
45922 |
-
var offsetParent = popper_getOffsetParent(data.instance.popper);
|
45923 |
-
var offsetParentRect = popper_getBoundingClientRect(offsetParent);
|
45924 |
|
45925 |
-
// Styles
|
45926 |
-
var styles = {
|
45927 |
-
position: popper.position
|
45928 |
-
};
|
45929 |
|
45930 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
45931 |
|
45932 |
-
var
|
45933 |
-
|
|
|
|
|
45934 |
|
45935 |
-
|
45936 |
-
|
45937 |
-
|
45938 |
-
|
45939 |
|
45940 |
-
|
45941 |
-
|
45942 |
-
|
45943 |
-
|
45944 |
-
// To avoid this problem, we provide two options (x and y), which allow
|
45945 |
-
// the consumer to define the offset origin.
|
45946 |
-
// If we position a popper on top of a reference element, we can set
|
45947 |
-
// `x` to `top` to make the popper grow towards its top instead of
|
45948 |
-
// its bottom.
|
45949 |
-
var left = void 0,
|
45950 |
-
top = void 0;
|
45951 |
-
if (sideA === 'bottom') {
|
45952 |
-
// when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)
|
45953 |
-
// and not the bottom of the html element
|
45954 |
-
if (offsetParent.nodeName === 'HTML') {
|
45955 |
-
top = -offsetParent.clientHeight + offsets.bottom;
|
45956 |
-
} else {
|
45957 |
-
top = -offsetParentRect.height + offsets.bottom;
|
45958 |
-
}
|
45959 |
-
} else {
|
45960 |
-
top = offsets.top;
|
45961 |
-
}
|
45962 |
-
if (sideB === 'right') {
|
45963 |
-
if (offsetParent.nodeName === 'HTML') {
|
45964 |
-
left = -offsetParent.clientWidth + offsets.right;
|
45965 |
-
} else {
|
45966 |
-
left = -offsetParentRect.width + offsets.right;
|
45967 |
-
}
|
45968 |
-
} else {
|
45969 |
-
left = offsets.left;
|
45970 |
-
}
|
45971 |
-
if (gpuAcceleration && prefixedProperty) {
|
45972 |
-
styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
|
45973 |
-
styles[sideA] = 0;
|
45974 |
-
styles[sideB] = 0;
|
45975 |
-
styles.willChange = 'transform';
|
45976 |
-
} else {
|
45977 |
-
// othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
|
45978 |
-
var invertTop = sideA === 'bottom' ? -1 : 1;
|
45979 |
-
var invertLeft = sideB === 'right' ? -1 : 1;
|
45980 |
-
styles[sideA] = top * invertTop;
|
45981 |
-
styles[sideB] = left * invertLeft;
|
45982 |
-
styles.willChange = sideA + ', ' + sideB;
|
45983 |
-
}
|
45984 |
|
45985 |
-
|
45986 |
-
|
45987 |
-
|
45988 |
-
|
45989 |
|
45990 |
-
|
45991 |
-
|
45992 |
-
|
45993 |
-
|
|
|
|
|
|
|
45994 |
|
45995 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45996 |
}
|
45997 |
|
45998 |
-
|
45999 |
-
|
46000 |
-
|
46001 |
-
|
46002 |
-
|
46003 |
-
* @param {Array} modifiers - list of modifiers
|
46004 |
-
* @param {String} requestingName - name of requesting modifier
|
46005 |
-
* @param {String} requestedName - name of requested modifier
|
46006 |
-
* @returns {Boolean}
|
46007 |
-
*/
|
46008 |
-
function isModifierRequired(modifiers, requestingName, requestedName) {
|
46009 |
-
var requesting = popper_find(modifiers, function (_ref) {
|
46010 |
-
var name = _ref.name;
|
46011 |
-
return name === requestingName;
|
46012 |
-
});
|
46013 |
-
|
46014 |
-
var isRequired = !!requesting && modifiers.some(function (modifier) {
|
46015 |
-
return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
|
46016 |
-
});
|
46017 |
|
46018 |
-
|
46019 |
-
var _requesting = '`' + requestingName + '`';
|
46020 |
-
var requested = '`' + requestedName + '`';
|
46021 |
-
console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
|
46022 |
-
}
|
46023 |
-
return isRequired;
|
46024 |
-
}
|
46025 |
|
46026 |
-
|
46027 |
-
* @function
|
46028 |
-
* @memberof Modifiers
|
46029 |
-
* @argument {Object} data - The data object generated by update method
|
46030 |
-
* @argument {Object} options - Modifiers configuration and options
|
46031 |
-
* @returns {Object} The data object, properly modified
|
46032 |
-
*/
|
46033 |
-
function popper_arrow(data, options) {
|
46034 |
-
var _data$offsets$arrow;
|
46035 |
|
46036 |
-
|
46037 |
-
if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
|
46038 |
-
return data;
|
46039 |
-
}
|
46040 |
|
46041 |
-
|
46042 |
|
46043 |
-
|
46044 |
-
if (typeof arrowElement === 'string') {
|
46045 |
-
arrowElement = data.instance.popper.querySelector(arrowElement);
|
46046 |
|
46047 |
-
|
46048 |
-
if (!arrowElement) {
|
46049 |
-
return data;
|
46050 |
-
}
|
46051 |
-
} else {
|
46052 |
-
// if the arrowElement isn't a query selector we must check that the
|
46053 |
-
// provided DOM node is child of its popper node
|
46054 |
-
if (!data.instance.popper.contains(arrowElement)) {
|
46055 |
-
console.warn('WARNING: `arrow.element` must be child of its popper element!');
|
46056 |
-
return data;
|
46057 |
-
}
|
46058 |
-
}
|
46059 |
|
46060 |
-
|
46061 |
-
var _data$offsets = data.offsets,
|
46062 |
-
popper = _data$offsets.popper,
|
46063 |
-
reference = _data$offsets.reference;
|
46064 |
|
46065 |
-
|
46066 |
|
46067 |
-
|
46068 |
-
var sideCapitalized = isVertical ? 'Top' : 'Left';
|
46069 |
-
var side = sideCapitalized.toLowerCase();
|
46070 |
-
var altSide = isVertical ? 'left' : 'top';
|
46071 |
-
var opSide = isVertical ? 'bottom' : 'right';
|
46072 |
-
var arrowElementSize = getOuterSizes(arrowElement)[len];
|
46073 |
|
46074 |
-
|
46075 |
-
// extends keepTogether behavior making sure the popper and its
|
46076 |
-
// reference have enough pixels in conjunction
|
46077 |
-
//
|
46078 |
|
46079 |
-
|
46080 |
-
if (reference[opSide] - arrowElementSize < popper[side]) {
|
46081 |
-
data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
|
46082 |
-
}
|
46083 |
-
// bottom/right side
|
46084 |
-
if (reference[side] + arrowElementSize > popper[opSide]) {
|
46085 |
-
data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
|
46086 |
-
}
|
46087 |
-
data.offsets.popper = getClientRect(data.offsets.popper);
|
46088 |
|
46089 |
-
// compute center of the popper
|
46090 |
-
var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
|
46091 |
|
46092 |
-
// Compute the sideValue using the updated popper offsets
|
46093 |
-
// take popper margin in account because we don't have this info available
|
46094 |
-
var css = getStyleComputedProperty(data.instance.popper);
|
46095 |
-
var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);
|
46096 |
-
var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);
|
46097 |
-
var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
|
46098 |
|
46099 |
-
// prevent arrowElement from being placed not contiguously to its popper
|
46100 |
-
sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
|
46101 |
|
46102 |
-
data.arrowElement = arrowElement;
|
46103 |
-
data.offsets.arrow = (_data$offsets$arrow = {}, popper_defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), popper_defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
|
46104 |
|
46105 |
-
return data;
|
46106 |
-
}
|
46107 |
|
46108 |
-
/**
|
46109 |
-
* Get the opposite placement variation of the given one
|
46110 |
-
* @method
|
46111 |
-
* @memberof Popper.Utils
|
46112 |
-
* @argument {String} placement variation
|
46113 |
-
* @returns {String} flipped placement variation
|
46114 |
-
*/
|
46115 |
-
function getOppositeVariation(variation) {
|
46116 |
-
if (variation === 'end') {
|
46117 |
-
return 'start';
|
46118 |
-
} else if (variation === 'start') {
|
46119 |
-
return 'end';
|
46120 |
-
}
|
46121 |
-
return variation;
|
46122 |
-
}
|
46123 |
|
46124 |
-
/**
|
46125 |
-
* List of accepted placements to use as values of the `placement` option.<br />
|
46126 |
-
* Valid placements are:
|
46127 |
-
* - `auto`
|
46128 |
-
* - `top`
|
46129 |
-
* - `right`
|
46130 |
-
* - `bottom`
|
46131 |
-
* - `left`
|
46132 |
-
*
|
46133 |
-
* Each placement can have a variation from this list:
|
46134 |
-
* - `-start`
|
46135 |
-
* - `-end`
|
46136 |
-
*
|
46137 |
-
* Variations are interpreted easily if you think of them as the left to right
|
46138 |
-
* written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
|
46139 |
-
* is right.<br />
|
46140 |
-
* Vertically (`left` and `right`), `start` is top and `end` is bottom.
|
46141 |
-
*
|
46142 |
-
* Some valid examples are:
|
46143 |
-
* - `top-end` (on top of reference, right aligned)
|
46144 |
-
* - `right-start` (on right of reference, top aligned)
|
46145 |
-
* - `bottom` (on bottom, centered)
|
46146 |
-
* - `auto-end` (on the side with more space available, alignment depends by placement)
|
46147 |
-
*
|
46148 |
-
* @static
|
46149 |
-
* @type {Array}
|
46150 |
-
* @enum {String}
|
46151 |
-
* @readonly
|
46152 |
-
* @method placements
|
46153 |
-
* @memberof Popper
|
46154 |
-
*/
|
46155 |
-
var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
|
46156 |
|
46157 |
-
// Get rid of `auto` `auto-start` and `auto-end`
|
46158 |
-
var validPlacements = placements.slice(3);
|
46159 |
|
46160 |
-
/**
|
46161 |
-
* Given an initial placement, returns all the subsequent placements
|
46162 |
-
* clockwise (or counter-clockwise).
|
46163 |
-
*
|
46164 |
-
* @method
|
46165 |
-
* @memberof Popper.Utils
|
46166 |
-
* @argument {String} placement - A valid placement (it accepts variations)
|
46167 |
-
* @argument {Boolean} counter - Set to true to walk the placements counterclockwise
|
46168 |
-
* @returns {Array} placements including their variations
|
46169 |
-
*/
|
46170 |
-
function clockwise(placement) {
|
46171 |
-
var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
46172 |
|
46173 |
-
var index = validPlacements.indexOf(placement);
|
46174 |
-
var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
|
46175 |
-
return counter ? arr.reverse() : arr;
|
46176 |
-
}
|
46177 |
|
46178 |
-
var BEHAVIORS = {
|
46179 |
-
FLIP: 'flip',
|
46180 |
-
CLOCKWISE: 'clockwise',
|
46181 |
-
COUNTERCLOCKWISE: 'counterclockwise'
|
46182 |
-
};
|
46183 |
|
46184 |
-
/**
|
46185 |
-
* @function
|
46186 |
-
* @memberof Modifiers
|
46187 |
-
* @argument {Object} data - The data object generated by update method
|
46188 |
-
* @argument {Object} options - Modifiers configuration and options
|
46189 |
-
* @returns {Object} The data object, properly modified
|
46190 |
-
*/
|
46191 |
-
function popper_flip(data, options) {
|
46192 |
-
// if `inner` modifier is enabled, we can't use the `flip` modifier
|
46193 |
-
if (isModifierEnabled(data.instance.modifiers, 'inner')) {
|
46194 |
-
return data;
|
46195 |
-
}
|
46196 |
|
46197 |
-
if (data.flipped && data.placement === data.originalPlacement) {
|
46198 |
-
// seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
|
46199 |
-
return data;
|
46200 |
-
}
|
46201 |
|
46202 |
-
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
|
46203 |
|
46204 |
-
var placement = data.placement.split('-')[0];
|
46205 |
-
var placementOpposite = popper_getOppositePlacement(placement);
|
46206 |
-
var variation = data.placement.split('-')[1] || '';
|
46207 |
|
46208 |
-
var flipOrder = [];
|
46209 |
|
46210 |
-
switch (options.behavior) {
|
46211 |
-
case BEHAVIORS.FLIP:
|
46212 |
-
flipOrder = [placement, placementOpposite];
|
46213 |
-
break;
|
46214 |
-
case BEHAVIORS.CLOCKWISE:
|
46215 |
-
flipOrder = clockwise(placement);
|
46216 |
-
break;
|
46217 |
-
case BEHAVIORS.COUNTERCLOCKWISE:
|
46218 |
-
flipOrder = clockwise(placement, true);
|
46219 |
-
break;
|
46220 |
-
default:
|
46221 |
-
flipOrder = options.behavior;
|
46222 |
-
}
|
46223 |
|
46224 |
-
flipOrder.forEach(function (step, index) {
|
46225 |
-
if (placement !== step || flipOrder.length === index + 1) {
|
46226 |
-
return data;
|
46227 |
-
}
|
46228 |
|
46229 |
-
placement = data.placement.split('-')[0];
|
46230 |
-
placementOpposite = popper_getOppositePlacement(placement);
|
46231 |
|
46232 |
-
var popperOffsets = data.offsets.popper;
|
46233 |
-
var refOffsets = data.offsets.reference;
|
46234 |
|
46235 |
-
// using floor because the reference offsets may contain decimals we are not going to consider here
|
46236 |
-
var floor = Math.floor;
|
46237 |
-
var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
|
46238 |
|
46239 |
-
var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
|
46240 |
-
var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
|
46241 |
-
var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
|
46242 |
-
var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
|
46243 |
|
46244 |
-
var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
|
46245 |
|
46246 |
-
// flip the variation if required
|
46247 |
-
var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
|
46248 |
|
46249 |
-
// flips variation if reference element overflows boundaries
|
46250 |
-
var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
|
46251 |
|
46252 |
-
|
46253 |
-
|
|
|
|
|
46254 |
|
46255 |
-
var flippedVariation = flippedVariationByRef || flippedVariationByContent;
|
46256 |
|
46257 |
-
|
46258 |
-
|
46259 |
-
|
|
|
46260 |
|
46261 |
-
|
46262 |
-
|
46263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46264 |
|
46265 |
-
|
46266 |
-
|
46267 |
-
|
|
|
46268 |
|
46269 |
-
|
|
|
|
|
|
|
46270 |
|
46271 |
-
|
46272 |
-
|
46273 |
-
|
|
|
46274 |
|
46275 |
-
|
46276 |
-
|
|
|
46277 |
});
|
46278 |
-
return data;
|
46279 |
-
}
|
46280 |
-
|
46281 |
-
/**
|
46282 |
-
* @function
|
46283 |
-
* @memberof Modifiers
|
46284 |
-
* @argument {Object} data - The data object generated by update method
|
46285 |
-
* @argument {Object} options - Modifiers configuration and options
|
46286 |
-
* @returns {Object} The data object, properly modified
|
46287 |
-
*/
|
46288 |
-
function keepTogether(data) {
|
46289 |
-
var _data$offsets = data.offsets,
|
46290 |
-
popper = _data$offsets.popper,
|
46291 |
-
reference = _data$offsets.reference;
|
46292 |
|
46293 |
-
var
|
46294 |
-
|
46295 |
-
|
46296 |
-
|
46297 |
-
|
46298 |
-
|
46299 |
|
46300 |
-
if (
|
46301 |
-
|
46302 |
-
|
46303 |
-
|
46304 |
-
|
|
|
|
|
|
|
|
|
46305 |
}
|
46306 |
|
46307 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46308 |
}
|
46309 |
|
46310 |
-
|
46311 |
-
|
46312 |
-
|
46313 |
-
|
46314 |
-
|
46315 |
-
|
46316 |
-
|
46317 |
-
|
46318 |
-
|
46319 |
-
|
46320 |
-
|
46321 |
-
|
46322 |
-
|
46323 |
-
|
46324 |
-
|
46325 |
-
|
46326 |
-
|
|
|
|
|
|
|
|
|
46327 |
|
46328 |
-
|
46329 |
-
|
46330 |
-
return str;
|
46331 |
-
}
|
46332 |
|
46333 |
-
|
46334 |
-
|
46335 |
-
|
46336 |
-
|
46337 |
-
|
46338 |
-
|
46339 |
-
case '%':
|
46340 |
-
case '%r':
|
46341 |
-
default:
|
46342 |
-
element = referenceOffsets;
|
46343 |
}
|
|
|
|
|
|
|
46344 |
|
46345 |
-
|
46346 |
-
|
46347 |
-
|
46348 |
-
|
46349 |
-
|
46350 |
-
|
46351 |
-
size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
46352 |
-
} else {
|
46353 |
-
size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
|
46354 |
-
}
|
46355 |
-
return size / 100 * value;
|
46356 |
-
} else {
|
46357 |
-
// if is an explicit pixel unit, we get rid of the unit and keep the value
|
46358 |
-
// if is an implicit unit, it's px, and we return just the value
|
46359 |
-
return value;
|
46360 |
-
}
|
46361 |
}
|
|
|
|
|
46362 |
|
46363 |
-
|
46364 |
-
|
46365 |
-
|
46366 |
-
|
46367 |
-
|
46368 |
-
|
46369 |
-
|
46370 |
-
|
46371 |
-
|
46372 |
-
* @returns {Array} a two cells array with x and y offsets in numbers
|
46373 |
-
*/
|
46374 |
-
function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
|
46375 |
-
var offsets = [0, 0];
|
46376 |
|
46377 |
-
// Use height if placement is left or right and index is 0 otherwise use width
|
46378 |
-
// in this way the first offset will use an axis and the second one
|
46379 |
-
// will use the other one
|
46380 |
-
var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
|
46381 |
|
46382 |
-
// Split the offset string to obtain a list of values and operands
|
46383 |
-
// The regex addresses values with the plus or minus sign in front (+10, -20, etc)
|
46384 |
-
var fragments = offset.split(/(\+|\-)/).map(function (frag) {
|
46385 |
-
return frag.trim();
|
46386 |
-
});
|
46387 |
|
46388 |
-
|
46389 |
-
// they could be separated by comma or space
|
46390 |
-
var divider = fragments.indexOf(popper_find(fragments, function (frag) {
|
46391 |
-
return frag.search(/,|\s/) !== -1;
|
46392 |
-
}));
|
46393 |
|
46394 |
-
if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
|
46395 |
-
console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
|
46396 |
-
}
|
46397 |
|
46398 |
-
// If divider is found, we divide the list of values and operands to divide
|
46399 |
-
// them by ofset X and Y.
|
46400 |
-
var splitRegex = /\s*,\s*|\s+/;
|
46401 |
-
var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
|
46402 |
|
46403 |
-
// Convert the values with units to absolute pixels to allow our computations
|
46404 |
-
ops = ops.map(function (op, index) {
|
46405 |
-
// Most of the units rely on the orientation of the popper
|
46406 |
-
var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
|
46407 |
-
var mergeWithPrevious = false;
|
46408 |
-
return op
|
46409 |
-
// This aggregates any `+` or `-` sign that aren't considered operators
|
46410 |
-
// e.g.: 10 + +5 => [10, +, +5]
|
46411 |
-
.reduce(function (a, b) {
|
46412 |
-
if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
|
46413 |
-
a[a.length - 1] = b;
|
46414 |
-
mergeWithPrevious = true;
|
46415 |
-
return a;
|
46416 |
-
} else if (mergeWithPrevious) {
|
46417 |
-
a[a.length - 1] += b;
|
46418 |
-
mergeWithPrevious = false;
|
46419 |
-
return a;
|
46420 |
-
} else {
|
46421 |
-
return a.concat(b);
|
46422 |
-
}
|
46423 |
-
}, [])
|
46424 |
-
// Here we convert the string values into number values (in px)
|
46425 |
-
.map(function (str) {
|
46426 |
-
return toValue(str, measurement, popperOffsets, referenceOffsets);
|
46427 |
-
});
|
46428 |
-
});
|
46429 |
|
46430 |
-
// Loop trough the offsets arrays and execute the operations
|
46431 |
-
ops.forEach(function (op, index) {
|
46432 |
-
op.forEach(function (frag, index2) {
|
46433 |
-
if (isNumeric(frag)) {
|
46434 |
-
offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
|
46435 |
-
}
|
46436 |
-
});
|
46437 |
-
});
|
46438 |
-
return offsets;
|
46439 |
-
}
|
46440 |
|
46441 |
-
/**
|
46442 |
-
* @function
|
46443 |
-
* @memberof Modifiers
|
46444 |
-
* @argument {Object} data - The data object generated by update method
|
46445 |
-
* @argument {Object} options - Modifiers configuration and options
|
46446 |
-
* @argument {Number|String} options.offset=0
|
46447 |
-
* The offset value as described in the modifier description
|
46448 |
-
* @returns {Object} The data object, properly modified
|
46449 |
-
*/
|
46450 |
-
function popper_offset(data, _ref) {
|
46451 |
-
var offset = _ref.offset;
|
46452 |
-
var placement = data.placement,
|
46453 |
-
_data$offsets = data.offsets,
|
46454 |
-
popper = _data$offsets.popper,
|
46455 |
-
reference = _data$offsets.reference;
|
46456 |
|
46457 |
-
var basePlacement = placement.split('-')[0];
|
46458 |
|
46459 |
-
var offsets = void 0;
|
46460 |
-
if (isNumeric(+offset)) {
|
46461 |
-
offsets = [+offset, 0];
|
46462 |
-
} else {
|
46463 |
-
offsets = parseOffset(offset, popper, reference, basePlacement);
|
46464 |
-
}
|
46465 |
|
46466 |
-
if (basePlacement === 'left') {
|
46467 |
-
popper.top += offsets[0];
|
46468 |
-
popper.left -= offsets[1];
|
46469 |
-
} else if (basePlacement === 'right') {
|
46470 |
-
popper.top += offsets[0];
|
46471 |
-
popper.left += offsets[1];
|
46472 |
-
} else if (basePlacement === 'top') {
|
46473 |
-
popper.left += offsets[0];
|
46474 |
-
popper.top -= offsets[1];
|
46475 |
-
} else if (basePlacement === 'bottom') {
|
46476 |
-
popper.left += offsets[0];
|
46477 |
-
popper.top += offsets[1];
|
46478 |
-
}
|
46479 |
|
46480 |
-
data.popper = popper;
|
46481 |
-
return data;
|
46482 |
-
}
|
46483 |
|
46484 |
-
/**
|
46485 |
-
* @function
|
46486 |
-
* @memberof Modifiers
|
46487 |
-
* @argument {Object} data - The data object generated by `update` method
|
46488 |
-
* @argument {Object} options - Modifiers configuration and options
|
46489 |
-
* @returns {Object} The data object, properly modified
|
46490 |
-
*/
|
46491 |
-
function popper_preventOverflow(data, options) {
|
46492 |
-
var boundariesElement = options.boundariesElement || popper_getOffsetParent(data.instance.popper);
|
46493 |
|
46494 |
-
// If offsetParent is the reference element, we really want to
|
46495 |
-
// go one step up and use the next offsetParent as reference to
|
46496 |
-
// avoid to make this modifier completely useless and look like broken
|
46497 |
-
if (data.instance.reference === boundariesElement) {
|
46498 |
-
boundariesElement = popper_getOffsetParent(boundariesElement);
|
46499 |
-
}
|
46500 |
|
46501 |
-
// NOTE: DOM access here
|
46502 |
-
// resets the popper's position so that the document size can be calculated excluding
|
46503 |
-
// the size of the popper element itself
|
46504 |
-
var transformProp = getSupportedPropertyName('transform');
|
46505 |
-
var popperStyles = data.instance.popper.style; // assignment to help minification
|
46506 |
-
var top = popperStyles.top,
|
46507 |
-
left = popperStyles.left,
|
46508 |
-
transform = popperStyles[transformProp];
|
46509 |
|
46510 |
-
|
46511 |
-
|
46512 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46513 |
|
46514 |
-
|
|
|
|
|
|
|
|
|
46515 |
|
46516 |
-
|
46517 |
-
|
46518 |
-
|
46519 |
-
|
46520 |
-
popperStyles[transformProp] = transform;
|
46521 |
|
46522 |
-
|
|
|
|
|
|
|
46523 |
|
46524 |
-
|
46525 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46526 |
|
46527 |
-
|
46528 |
-
|
46529 |
-
|
46530 |
-
|
46531 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46532 |
}
|
46533 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46534 |
},
|
46535 |
-
|
46536 |
-
|
46537 |
-
|
46538 |
-
|
46539 |
-
|
46540 |
-
|
46541 |
-
|
|
|
46542 |
}
|
46543 |
};
|
|
|
|
|
46544 |
|
46545 |
-
order.forEach(function (placement) {
|
46546 |
-
var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
|
46547 |
-
popper = popper_extends({}, popper, check[side](placement));
|
46548 |
-
});
|
46549 |
|
46550 |
-
data.offsets.popper = popper;
|
46551 |
|
46552 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46553 |
}
|
|
|
46554 |
|
46555 |
-
/**
|
46556 |
-
* @function
|
46557 |
-
* @memberof Modifiers
|
46558 |
-
* @argument {Object} data - The data object generated by `update` method
|
46559 |
-
* @argument {Object} options - Modifiers configuration and options
|
46560 |
-
* @returns {Object} The data object, properly modified
|
46561 |
-
*/
|
46562 |
-
function popper_shift(data) {
|
46563 |
-
var placement = data.placement;
|
46564 |
-
var basePlacement = placement.split('-')[0];
|
46565 |
-
var shiftvariation = placement.split('-')[1];
|
46566 |
|
46567 |
-
// if shift shiftvariation is specified, run the modifier
|
46568 |
-
if (shiftvariation) {
|
46569 |
-
var _data$offsets = data.offsets,
|
46570 |
-
reference = _data$offsets.reference,
|
46571 |
-
popper = _data$offsets.popper;
|
46572 |
|
46573 |
-
var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
|
46574 |
-
var side = isVertical ? 'left' : 'top';
|
46575 |
-
var measurement = isVertical ? 'width' : 'height';
|
46576 |
|
46577 |
-
var shiftOffsets = {
|
46578 |
-
start: popper_defineProperty({}, side, reference[side]),
|
46579 |
-
end: popper_defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
|
46580 |
-
};
|
46581 |
|
46582 |
-
data.offsets.popper = popper_extends({}, popper, shiftOffsets[shiftvariation]);
|
46583 |
-
}
|
46584 |
|
46585 |
-
return data;
|
46586 |
-
}
|
46587 |
|
46588 |
-
/**
|
46589 |
-
* @function
|
46590 |
-
* @memberof Modifiers
|
46591 |
-
* @argument {Object} data - The data object generated by update method
|
46592 |
-
* @argument {Object} options - Modifiers configuration and options
|
46593 |
-
* @returns {Object} The data object, properly modified
|
46594 |
-
*/
|
46595 |
-
function popper_hide(data) {
|
46596 |
-
if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
|
46597 |
-
return data;
|
46598 |
-
}
|
46599 |
|
46600 |
-
var refRect = data.offsets.reference;
|
46601 |
-
var bound = popper_find(data.instance.modifiers, function (modifier) {
|
46602 |
-
return modifier.name === 'preventOverflow';
|
46603 |
-
}).boundaries;
|
46604 |
|
46605 |
-
if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
|
46606 |
-
// Avoid unnecessary DOM access if visibility hasn't changed
|
46607 |
-
if (data.hide === true) {
|
46608 |
-
return data;
|
46609 |
-
}
|
46610 |
|
46611 |
-
|
46612 |
-
|
46613 |
-
} else {
|
46614 |
-
// Avoid unnecessary DOM access if visibility hasn't changed
|
46615 |
-
if (data.hide === false) {
|
46616 |
-
return data;
|
46617 |
-
}
|
46618 |
|
46619 |
-
|
46620 |
-
|
46621 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46622 |
|
46623 |
-
|
46624 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
46625 |
|
46626 |
-
|
46627 |
-
|
46628 |
-
|
46629 |
-
|
46630 |
-
|
46631 |
-
|
46632 |
-
|
46633 |
-
|
46634 |
-
|
46635 |
-
|
46636 |
-
|
46637 |
-
popper = _data$offsets.popper,
|
46638 |
-
reference = _data$offsets.reference;
|
46639 |
|
46640 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46641 |
|
46642 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46643 |
|
46644 |
-
|
|
|
46645 |
|
46646 |
-
|
46647 |
-
|
46648 |
|
46649 |
-
|
46650 |
-
|
|
|
|
|
|
|
|
|
|
|
46651 |
|
46652 |
-
|
46653 |
-
|
46654 |
-
|
46655 |
-
|
46656 |
-
|
46657 |
-
|
46658 |
-
|
46659 |
-
|
46660 |
-
|
46661 |
-
|
46662 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46663 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46664 |
/**
|
46665 |
-
*
|
46666 |
-
* Popper.js uses a set of 9 modifiers to provide all the basic functionalities
|
46667 |
-
* needed by the library.
|
46668 |
*
|
46669 |
-
*
|
46670 |
-
*
|
46671 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46672 |
*/
|
46673 |
-
var modifiers = {
|
46674 |
-
/**
|
46675 |
-
* Modifier used to shift the popper on the start or end of its reference
|
46676 |
-
* element.<br />
|
46677 |
-
* It will read the variation of the `placement` property.<br />
|
46678 |
-
* It can be one either `-end` or `-start`.
|
46679 |
-
* @memberof modifiers
|
46680 |
-
* @inner
|
46681 |
-
*/
|
46682 |
-
shift: {
|
46683 |
-
/** @prop {number} order=100 - Index used to define the order of execution */
|
46684 |
-
order: 100,
|
46685 |
-
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
46686 |
-
enabled: true,
|
46687 |
-
/** @prop {ModifierFn} */
|
46688 |
-
fn: popper_shift
|
46689 |
-
},
|
46690 |
|
46691 |
-
|
46692 |
-
|
46693 |
-
|
46694 |
-
|
46695 |
-
* - `px` or unit-less, interpreted as pixels
|
46696 |
-
* - `%` or `%r`, percentage relative to the length of the reference element
|
46697 |
-
* - `%p`, percentage relative to the length of the popper element
|
46698 |
-
* - `vw`, CSS viewport width unit
|
46699 |
-
* - `vh`, CSS viewport height unit
|
46700 |
-
*
|
46701 |
-
* For length is intended the main axis relative to the placement of the popper.<br />
|
46702 |
-
* This means that if the placement is `top` or `bottom`, the length will be the
|
46703 |
-
* `width`. In case of `left` or `right`, it will be the `height`.
|
46704 |
-
*
|
46705 |
-
* You can provide a single value (as `Number` or `String`), or a pair of values
|
46706 |
-
* as `String` divided by a comma or one (or more) white spaces.<br />
|
46707 |
-
* The latter is a deprecated method because it leads to confusion and will be
|
46708 |
-
* removed in v2.<br />
|
46709 |
-
* Additionally, it accepts additions and subtractions between different units.
|
46710 |
-
* Note that multiplications and divisions aren't supported.
|
46711 |
-
*
|
46712 |
-
* Valid examples are:
|
46713 |
-
* ```
|
46714 |
-
* 10
|
46715 |
-
* '10%'
|
46716 |
-
* '10, 10'
|
46717 |
-
* '10%, 10'
|
46718 |
-
* '10 + 10%'
|
46719 |
-
* '10 - 5vh + 3%'
|
46720 |
-
* '-10px + 5vh, 5px - 6%'
|
46721 |
-
* ```
|
46722 |
-
* > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
|
46723 |
-
* > with their reference element, unfortunately, you will have to disable the `flip` modifier.
|
46724 |
-
* > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).
|
46725 |
-
*
|
46726 |
-
* @memberof modifiers
|
46727 |
-
* @inner
|
46728 |
-
*/
|
46729 |
-
offset: {
|
46730 |
-
/** @prop {number} order=200 - Index used to define the order of execution */
|
46731 |
-
order: 200,
|
46732 |
-
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
46733 |
-
enabled: true,
|
46734 |
-
/** @prop {ModifierFn} */
|
46735 |
-
fn: popper_offset,
|
46736 |
-
/** @prop {Number|String} offset=0
|
46737 |
-
* The offset value as described in the modifier description
|
46738 |
-
*/
|
46739 |
-
offset: 0
|
46740 |
-
},
|
46741 |
|
46742 |
-
|
46743 |
-
|
46744 |
-
|
46745 |
-
|
46746 |
-
|
46747 |
-
|
46748 |
-
|
46749 |
-
|
46750 |
-
|
46751 |
-
|
46752 |
-
|
46753 |
-
|
46754 |
-
|
46755 |
-
|
46756 |
-
* @memberof modifiers
|
46757 |
-
* @inner
|
46758 |
-
*/
|
46759 |
-
preventOverflow: {
|
46760 |
-
/** @prop {number} order=300 - Index used to define the order of execution */
|
46761 |
-
order: 300,
|
46762 |
-
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
46763 |
-
enabled: true,
|
46764 |
-
/** @prop {ModifierFn} */
|
46765 |
-
fn: popper_preventOverflow,
|
46766 |
-
/**
|
46767 |
-
* @prop {Array} [priority=['left','right','top','bottom']]
|
46768 |
-
* Popper will try to prevent overflow following these priorities by default,
|
46769 |
-
* then, it could overflow on the left and on top of the `boundariesElement`
|
46770 |
-
*/
|
46771 |
-
priority: ['left', 'right', 'top', 'bottom'],
|
46772 |
-
/**
|
46773 |
-
* @prop {number} padding=5
|
46774 |
-
* Amount of pixel used to define a minimum distance between the boundaries
|
46775 |
-
* and the popper. This makes sure the popper always has a little padding
|
46776 |
-
* between the edges of its container
|
46777 |
-
*/
|
46778 |
-
padding: 5,
|
46779 |
-
/**
|
46780 |
-
* @prop {String|HTMLElement} boundariesElement='scrollParent'
|
46781 |
-
* Boundaries used by the modifier. Can be `scrollParent`, `window`,
|
46782 |
-
* `viewport` or any DOM element.
|
46783 |
-
*/
|
46784 |
-
boundariesElement: 'scrollParent'
|
46785 |
-
},
|
46786 |
|
46787 |
-
|
46788 |
-
|
46789 |
-
|
46790 |
-
|
46791 |
-
* It cares only about the first axis. You can still have poppers with margin
|
46792 |
-
* between the popper and its reference element.
|
46793 |
-
* @memberof modifiers
|
46794 |
-
* @inner
|
46795 |
-
*/
|
46796 |
-
keepTogether: {
|
46797 |
-
/** @prop {number} order=400 - Index used to define the order of execution */
|
46798 |
-
order: 400,
|
46799 |
-
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
46800 |
-
enabled: true,
|
46801 |
-
/** @prop {ModifierFn} */
|
46802 |
-
fn: keepTogether
|
46803 |
-
},
|
46804 |
|
46805 |
-
|
46806 |
-
|
46807 |
-
|
46808 |
-
|
46809 |
-
* pixels of conjunction are needed.
|
46810 |
-
*
|
46811 |
-
* It has no effect if no `arrowElement` is provided.
|
46812 |
-
* @memberof modifiers
|
46813 |
-
* @inner
|
46814 |
-
*/
|
46815 |
-
arrow: {
|
46816 |
-
/** @prop {number} order=500 - Index used to define the order of execution */
|
46817 |
-
order: 500,
|
46818 |
-
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
46819 |
-
enabled: true,
|
46820 |
-
/** @prop {ModifierFn} */
|
46821 |
-
fn: popper_arrow,
|
46822 |
-
/** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
|
46823 |
-
element: '[x-arrow]'
|
46824 |
-
},
|
46825 |
|
46826 |
-
|
46827 |
-
|
46828 |
-
|
46829 |
-
*
|
46830 |
-
* Requires the `preventOverflow` modifier before it in order to work.
|
46831 |
-
*
|
46832 |
-
* **NOTE:** this modifier will interrupt the current update cycle and will
|
46833 |
-
* restart it if it detects the need to flip the placement.
|
46834 |
-
* @memberof modifiers
|
46835 |
-
* @inner
|
46836 |
-
*/
|
46837 |
-
flip: {
|
46838 |
-
/** @prop {number} order=600 - Index used to define the order of execution */
|
46839 |
-
order: 600,
|
46840 |
-
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
46841 |
-
enabled: true,
|
46842 |
-
/** @prop {ModifierFn} */
|
46843 |
-
fn: popper_flip,
|
46844 |
-
/**
|
46845 |
-
* @prop {String|Array} behavior='flip'
|
46846 |
-
* The behavior used to change the popper's placement. It can be one of
|
46847 |
-
* `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
|
46848 |
-
* placements (with optional variations)
|
46849 |
-
*/
|
46850 |
-
behavior: 'flip',
|
46851 |
-
/**
|
46852 |
-
* @prop {number} padding=5
|
46853 |
-
* The popper will flip if it hits the edges of the `boundariesElement`
|
46854 |
-
*/
|
46855 |
-
padding: 5,
|
46856 |
-
/**
|
46857 |
-
* @prop {String|HTMLElement} boundariesElement='viewport'
|
46858 |
-
* The element which will define the boundaries of the popper position.
|
46859 |
-
* The popper will never be placed outside of the defined boundaries
|
46860 |
-
* (except if `keepTogether` is enabled)
|
46861 |
-
*/
|
46862 |
-
boundariesElement: 'viewport',
|
46863 |
-
/**
|
46864 |
-
* @prop {Boolean} flipVariations=false
|
46865 |
-
* The popper will switch placement variation between `-start` and `-end` when
|
46866 |
-
* the reference element overlaps its boundaries.
|
46867 |
-
*
|
46868 |
-
* The original placement should have a set variation.
|
46869 |
-
*/
|
46870 |
-
flipVariations: false,
|
46871 |
-
/**
|
46872 |
-
* @prop {Boolean} flipVariationsByContent=false
|
46873 |
-
* The popper will switch placement variation between `-start` and `-end` when
|
46874 |
-
* the popper element overlaps its reference boundaries.
|
46875 |
-
*
|
46876 |
-
* The original placement should have a set variation.
|
46877 |
-
*/
|
46878 |
-
flipVariationsByContent: false
|
46879 |
-
},
|
46880 |
|
46881 |
-
|
46882 |
-
|
46883 |
-
* By default, when this modifier is disabled, the popper will be placed outside
|
46884 |
-
* the reference element.
|
46885 |
-
* @memberof modifiers
|
46886 |
-
* @inner
|
46887 |
-
*/
|
46888 |
-
inner: {
|
46889 |
-
/** @prop {number} order=700 - Index used to define the order of execution */
|
46890 |
-
order: 700,
|
46891 |
-
/** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
|
46892 |
-
enabled: false,
|
46893 |
-
/** @prop {ModifierFn} */
|
46894 |
-
fn: inner
|
46895 |
-
},
|
46896 |
|
46897 |
-
|
46898 |
-
|
46899 |
-
|
46900 |
-
* be used to hide with a CSS selector the popper when its reference is
|
46901 |
-
* out of boundaries.
|
46902 |
-
*
|
46903 |
-
* Requires the `preventOverflow` modifier before it in order to work.
|
46904 |
-
* @memberof modifiers
|
46905 |
-
* @inner
|
46906 |
-
*/
|
46907 |
-
hide: {
|
46908 |
-
/** @prop {number} order=800 - Index used to define the order of execution */
|
46909 |
-
order: 800,
|
46910 |
-
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
46911 |
-
enabled: true,
|
46912 |
-
/** @prop {ModifierFn} */
|
46913 |
-
fn: popper_hide
|
46914 |
-
},
|
46915 |
|
46916 |
-
|
46917 |
-
* Computes the style that will be applied to the popper element to gets
|
46918 |
-
* properly positioned.
|
46919 |
-
*
|
46920 |
-
* Note that this modifier will not touch the DOM, it just prepares the styles
|
46921 |
-
* so that `applyStyle` modifier can apply it. This separation is useful
|
46922 |
-
* in case you need to replace `applyStyle` with a custom implementation.
|
46923 |
-
*
|
46924 |
-
* This modifier has `850` as `order` value to maintain backward compatibility
|
46925 |
-
* with previous versions of Popper.js. Expect the modifiers ordering method
|
46926 |
-
* to change in future major versions of the library.
|
46927 |
-
*
|
46928 |
-
* @memberof modifiers
|
46929 |
-
* @inner
|
46930 |
-
*/
|
46931 |
-
computeStyle: {
|
46932 |
-
/** @prop {number} order=850 - Index used to define the order of execution */
|
46933 |
-
order: 850,
|
46934 |
-
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
46935 |
-
enabled: true,
|
46936 |
-
/** @prop {ModifierFn} */
|
46937 |
-
fn: computeStyle,
|
46938 |
-
/**
|
46939 |
-
* @prop {Boolean} gpuAcceleration=true
|
46940 |
-
* If true, it uses the CSS 3D transformation to position the popper.
|
46941 |
-
* Otherwise, it will use the `top` and `left` properties
|
46942 |
-
*/
|
46943 |
-
gpuAcceleration: true,
|
46944 |
-
/**
|
46945 |
-
* @prop {string} [x='bottom']
|
46946 |
-
* Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
|
46947 |
-
* Change this if your popper should grow in a direction different from `bottom`
|
46948 |
-
*/
|
46949 |
-
x: 'bottom',
|
46950 |
-
/**
|
46951 |
-
* @prop {string} [x='left']
|
46952 |
-
* Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
|
46953 |
-
* Change this if your popper should grow in a direction different from `right`
|
46954 |
-
*/
|
46955 |
-
y: 'right'
|
46956 |
-
},
|
46957 |
|
46958 |
-
|
46959 |
-
|
46960 |
-
|
46961 |
-
* All the DOM manipulations are limited to this modifier. This is useful in case
|
46962 |
-
* you want to integrate Popper.js inside a framework or view library and you
|
46963 |
-
* want to delegate all the DOM manipulations to it.
|
46964 |
-
*
|
46965 |
-
* Note that if you disable this modifier, you must make sure the popper element
|
46966 |
-
* has its position set to `absolute` before Popper.js can do its work!
|
46967 |
-
*
|
46968 |
-
* Just disable this modifier and define your own to achieve the desired effect.
|
46969 |
-
*
|
46970 |
-
* @memberof modifiers
|
46971 |
-
* @inner
|
46972 |
-
*/
|
46973 |
-
applyStyle: {
|
46974 |
-
/** @prop {number} order=900 - Index used to define the order of execution */
|
46975 |
-
order: 900,
|
46976 |
-
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
46977 |
-
enabled: true,
|
46978 |
-
/** @prop {ModifierFn} */
|
46979 |
-
fn: applyStyle,
|
46980 |
-
/** @prop {Function} */
|
46981 |
-
onLoad: applyStyleOnLoad,
|
46982 |
-
/**
|
46983 |
-
* @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
|
46984 |
-
* @prop {Boolean} gpuAcceleration=true
|
46985 |
-
* If true, it uses the CSS 3D transformation to position the popper.
|
46986 |
-
* Otherwise, it will use the `top` and `left` properties
|
46987 |
-
*/
|
46988 |
-
gpuAcceleration: undefined
|
46989 |
-
}
|
46990 |
-
};
|
46991 |
|
46992 |
-
|
46993 |
-
|
46994 |
-
* This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
|
46995 |
-
* @name dataObject
|
46996 |
-
* @property {Object} data.instance The Popper.js instance
|
46997 |
-
* @property {String} data.placement Placement applied to popper
|
46998 |
-
* @property {String} data.originalPlacement Placement originally defined on init
|
46999 |
-
* @property {Boolean} data.flipped True if popper has been flipped by flip modifier
|
47000 |
-
* @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper
|
47001 |
-
* @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
|
47002 |
-
* @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)
|
47003 |
-
* @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)
|
47004 |
-
* @property {Object} data.boundaries Offsets of the popper boundaries
|
47005 |
-
* @property {Object} data.offsets The measurements of popper, reference and arrow elements
|
47006 |
-
* @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
|
47007 |
-
* @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
|
47008 |
-
* @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
|
47009 |
-
*/
|
47010 |
|
47011 |
-
|
47012 |
-
|
47013 |
-
|
47014 |
-
|
47015 |
-
|
47016 |
-
|
47017 |
-
|
47018 |
-
|
47019 |
-
* preventOverflow: { enabled: false }
|
47020 |
-
* }
|
47021 |
-
* })
|
47022 |
-
* ```
|
47023 |
-
* @type {Object}
|
47024 |
-
* @static
|
47025 |
-
* @memberof Popper
|
47026 |
-
*/
|
47027 |
-
var Defaults = {
|
47028 |
-
/**
|
47029 |
-
* Popper's placement.
|
47030 |
-
* @prop {Popper.placements} placement='bottom'
|
47031 |
-
*/
|
47032 |
-
placement: 'bottom',
|
47033 |
|
47034 |
-
|
47035 |
-
|
47036 |
-
|
47037 |
-
|
47038 |
-
|
|
|
|
|
|
|
|
|
|
|
47039 |
|
47040 |
-
|
47041 |
-
|
47042 |
-
|
47043 |
-
*/
|
47044 |
-
eventsEnabled: true,
|
47045 |
|
47046 |
-
|
47047 |
-
|
47048 |
-
|
47049 |
-
|
47050 |
-
|
47051 |
-
removeOnDestroy: false,
|
47052 |
|
47053 |
-
|
47054 |
-
|
47055 |
-
|
47056 |
-
* Access Popper.js instance with `data.instance`.
|
47057 |
-
* @prop {onCreate}
|
47058 |
-
*/
|
47059 |
-
onCreate: function onCreate() {},
|
47060 |
|
47061 |
-
|
47062 |
-
|
47063 |
-
* on the initialization/creation of the popper, but only on subsequent
|
47064 |
-
* updates.<br />
|
47065 |
-
* By default, it is set to no-op.<br />
|
47066 |
-
* Access Popper.js instance with `data.instance`.
|
47067 |
-
* @prop {onUpdate}
|
47068 |
-
*/
|
47069 |
-
onUpdate: function onUpdate() {},
|
47070 |
|
47071 |
-
|
47072 |
-
|
47073 |
-
|
47074 |
-
|
47075 |
-
|
47076 |
-
|
47077 |
-
|
|
|
|
|
47078 |
|
47079 |
-
|
47080 |
-
|
47081 |
-
|
47082 |
-
|
47083 |
|
47084 |
-
|
47085 |
-
|
47086 |
-
|
47087 |
-
|
47088 |
|
47089 |
-
// Utils
|
47090 |
-
// Methods
|
47091 |
-
var Popper = function () {
|
47092 |
-
/**
|
47093 |
-
* Creates a new Popper.js instance.
|
47094 |
-
* @class Popper
|
47095 |
-
* @param {Element|referenceObject} reference - The reference element used to position the popper
|
47096 |
-
* @param {Element} popper - The HTML / XML element used as the popper
|
47097 |
-
* @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
|
47098 |
-
* @return {Object} instance - The generated Popper.js instance
|
47099 |
-
*/
|
47100 |
-
function Popper(reference, popper) {
|
47101 |
-
var _this = this;
|
47102 |
|
47103 |
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
47104 |
-
classCallCheck(this, Popper);
|
47105 |
|
47106 |
-
this.scheduleUpdate = function () {
|
47107 |
-
return requestAnimationFrame(_this.update);
|
47108 |
-
};
|
47109 |
|
47110 |
-
// make update() debounced, so that it only runs at most once-per-tick
|
47111 |
-
this.update = popper_debounce(this.update.bind(this));
|
47112 |
|
47113 |
-
|
47114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47115 |
|
47116 |
-
|
47117 |
-
|
47118 |
-
|
47119 |
-
isCreated: false,
|
47120 |
-
scrollParents: []
|
47121 |
-
};
|
47122 |
|
47123 |
-
|
47124 |
-
|
47125 |
-
this.popper = popper && popper.jquery ? popper[0] : popper;
|
47126 |
|
47127 |
-
|
47128 |
-
|
47129 |
-
|
47130 |
-
_this.options.modifiers[name] = popper_extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
|
47131 |
-
});
|
47132 |
|
47133 |
-
|
47134 |
-
|
47135 |
-
|
47136 |
-
|
47137 |
-
}, _this.options.modifiers[name]);
|
47138 |
-
})
|
47139 |
-
// sort the modifiers by order
|
47140 |
-
.sort(function (a, b) {
|
47141 |
-
return a.order - b.order;
|
47142 |
-
});
|
47143 |
|
47144 |
-
|
47145 |
-
|
47146 |
-
// they could add new properties to their options configuration
|
47147 |
-
// BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
|
47148 |
-
this.modifiers.forEach(function (modifierOptions) {
|
47149 |
-
if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
|
47150 |
-
modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
|
47151 |
}
|
47152 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47153 |
|
47154 |
-
// fire the first update to position the popper in the right place
|
47155 |
-
this.update();
|
47156 |
|
47157 |
-
var eventsEnabled = this.options.eventsEnabled;
|
47158 |
-
if (eventsEnabled) {
|
47159 |
-
// setup event listeners, they will take care of update the position in specific situations
|
47160 |
-
this.enableEventListeners();
|
47161 |
-
}
|
47162 |
|
47163 |
-
this.state.eventsEnabled = eventsEnabled;
|
47164 |
-
}
|
47165 |
|
47166 |
-
// We can't use class properties because they don't get listed in the
|
47167 |
-
// class prototype and break stuff like Sinon stubs
|
47168 |
|
47169 |
|
47170 |
-
|
47171 |
-
|
47172 |
-
|
47173 |
-
|
47174 |
-
|
47175 |
-
|
47176 |
-
|
47177 |
-
|
47178 |
-
|
47179 |
-
}
|
47180 |
-
|
47181 |
-
|
47182 |
-
|
47183 |
-
|
47184 |
-
|
47185 |
-
|
47186 |
-
|
47187 |
-
|
47188 |
-
|
|
|
47189 |
}
|
|
|
|
|
|
|
|
|
|
|
47190 |
|
47191 |
-
|
47192 |
-
|
47193 |
-
|
47194 |
-
|
47195 |
-
|
|
|
47196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47197 |
|
47198 |
-
/**
|
47199 |
-
* Collection of utilities useful when writing custom modifiers.
|
47200 |
-
* Starting from version 1.7, this method is available only if you
|
47201 |
-
* include `popper-utils.js` before `popper.js`.
|
47202 |
-
*
|
47203 |
-
* **DEPRECATION**: This way to access PopperUtils is deprecated
|
47204 |
-
* and will be removed in v2! Use the PopperUtils module directly instead.
|
47205 |
-
* Due to the high instability of the methods contained in Utils, we can't
|
47206 |
-
* guarantee them to follow semver. Use them at your own risk!
|
47207 |
-
* @static
|
47208 |
-
* @private
|
47209 |
-
* @type {Object}
|
47210 |
-
* @deprecated since version 1.8
|
47211 |
-
* @member Utils
|
47212 |
-
* @memberof Popper
|
47213 |
-
*/
|
47214 |
|
47215 |
-
|
47216 |
-
|
47217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
47218 |
|
47219 |
/**
|
47220 |
-
*
|
47221 |
-
* and lets you use it as replacement of a real DOM node.<br />
|
47222 |
-
* You can use this method to position a popper relatively to a set of coordinates
|
47223 |
-
* in case you don't have a DOM node to use as reference.
|
47224 |
-
*
|
47225 |
-
* ```
|
47226 |
-
* new Popper(referenceObject, popperNode);
|
47227 |
-
* ```
|
47228 |
-
*
|
47229 |
-
* NB: This feature isn't supported in Internet Explorer 10.
|
47230 |
-
* @name referenceObject
|
47231 |
-
* @property {Function} data.getBoundingClientRect
|
47232 |
-
* A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
|
47233 |
-
* @property {number} data.clientWidth
|
47234 |
-
* An ES6 getter that will return the width of the virtual reference element.
|
47235 |
-
* @property {number} data.clientHeight
|
47236 |
-
* An ES6 getter that will return the height of the virtual reference element.
|
47237 |
*/
|
47238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47239 |
|
47240 |
-
Popper.Utils = (typeof window !== 'undefined' ? window : __webpack_require__.g).PopperUtils;
|
47241 |
-
Popper.placements = placements;
|
47242 |
-
Popper.Defaults = Defaults;
|
47243 |
|
47244 |
-
/* harmony default export */ var esm_popper = (Popper);
|
47245 |
-
//# sourceMappingURL=popper.js.map
|
47246 |
|
47247 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Popper/Popper.js
|
47248 |
|
47249 |
|
47250 |
|
47251 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47252 |
|
|
|
|
|
|
|
47253 |
|
|
|
|
|
|
|
47254 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47256 |
|
47257 |
|
47258 |
|
47259 |
|
47260 |
-
function flipPlacement(placement, theme) {
|
47261 |
-
var direction = theme && theme.direction || 'ltr';
|
47262 |
|
47263 |
-
if (direction === 'ltr') {
|
47264 |
-
return placement;
|
47265 |
-
}
|
47266 |
|
47267 |
-
switch (placement) {
|
47268 |
-
case 'bottom-end':
|
47269 |
-
return 'bottom-start';
|
47270 |
|
47271 |
-
case 'bottom-start':
|
47272 |
-
return 'bottom-end';
|
47273 |
|
47274 |
-
case 'top-end':
|
47275 |
-
return 'top-start';
|
47276 |
|
47277 |
-
case 'top-start':
|
47278 |
-
return 'top-end';
|
47279 |
|
47280 |
-
default:
|
47281 |
-
return placement;
|
47282 |
-
}
|
47283 |
-
}
|
47284 |
|
47285 |
-
function Popper_getAnchorEl(anchorEl) {
|
47286 |
-
return typeof anchorEl === 'function' ? anchorEl() : anchorEl;
|
47287 |
-
}
|
47288 |
|
47289 |
-
var Popper_useEnhancedEffect = typeof window !== 'undefined' ? react.useLayoutEffect : react.useEffect;
|
47290 |
-
var defaultPopperOptions = {};
|
47291 |
-
/**
|
47292 |
-
* Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v1/) for positioning.
|
47293 |
-
*/
|
47294 |
|
47295 |
-
var Popper_Popper = /*#__PURE__*/react.forwardRef(function Popper(props, ref) {
|
47296 |
-
var anchorEl = props.anchorEl,
|
47297 |
-
children = props.children,
|
47298 |
-
container = props.container,
|
47299 |
-
_props$disablePortal = props.disablePortal,
|
47300 |
-
disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,
|
47301 |
-
_props$keepMounted = props.keepMounted,
|
47302 |
-
keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,
|
47303 |
-
modifiers = props.modifiers,
|
47304 |
-
open = props.open,
|
47305 |
-
_props$placement = props.placement,
|
47306 |
-
initialPlacement = _props$placement === void 0 ? 'bottom' : _props$placement,
|
47307 |
-
_props$popperOptions = props.popperOptions,
|
47308 |
-
popperOptions = _props$popperOptions === void 0 ? defaultPopperOptions : _props$popperOptions,
|
47309 |
-
popperRefProp = props.popperRef,
|
47310 |
-
style = props.style,
|
47311 |
-
_props$transition = props.transition,
|
47312 |
-
transition = _props$transition === void 0 ? false : _props$transition,
|
47313 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["anchorEl", "children", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition"]);
|
47314 |
|
47315 |
-
var tooltipRef = react.useRef(null);
|
47316 |
-
var ownRef = (0,useForkRef/* default */.Z)(tooltipRef, ref);
|
47317 |
-
var popperRef = react.useRef(null);
|
47318 |
-
var handlePopperRef = (0,useForkRef/* default */.Z)(popperRef, popperRefProp);
|
47319 |
-
var handlePopperRefRef = react.useRef(handlePopperRef);
|
47320 |
-
Popper_useEnhancedEffect(function () {
|
47321 |
-
handlePopperRefRef.current = handlePopperRef;
|
47322 |
-
}, [handlePopperRef]);
|
47323 |
-
react.useImperativeHandle(popperRefProp, function () {
|
47324 |
-
return popperRef.current;
|
47325 |
-
}, []);
|
47326 |
|
47327 |
-
var _React$useState = react.useState(true),
|
47328 |
-
exited = _React$useState[0],
|
47329 |
-
setExited = _React$useState[1];
|
47330 |
|
47331 |
-
var theme = (0,useTheme/* default */.Z)();
|
47332 |
-
var rtlPlacement = flipPlacement(initialPlacement, theme);
|
47333 |
-
/**
|
47334 |
-
* placement initialized from prop but can change during lifetime if modifiers.flip.
|
47335 |
-
* modifiers.flip is essentially a flip for controlled/uncontrolled behavior
|
47336 |
-
*/
|
47337 |
|
47338 |
-
var _React$useState2 = react.useState(rtlPlacement),
|
47339 |
-
placement = _React$useState2[0],
|
47340 |
-
setPlacement = _React$useState2[1];
|
47341 |
|
47342 |
-
|
47343 |
-
|
47344 |
-
|
47345 |
-
|
47346 |
-
|
47347 |
-
|
47348 |
-
|
47349 |
-
|
47350 |
-
|
|
|
47351 |
|
47352 |
-
if
|
47353 |
-
|
47354 |
-
|
47355 |
-
}
|
47356 |
|
47357 |
-
|
47358 |
-
|
47359 |
-
|
|
|
47360 |
|
47361 |
-
|
|
|
|
|
|
|
47362 |
|
47363 |
-
if
|
|
|
|
|
|
|
47364 |
|
47365 |
-
|
47366 |
-
|
47367 |
-
|
47368 |
-
|
47369 |
-
|
47370 |
-
|
47371 |
-
|
47372 |
-
}
|
47373 |
-
}, modifiers, popperOptions.modifiers),
|
47374 |
-
// We could have been using a custom modifier like react-popper is doing.
|
47375 |
-
// But it seems this is the best public API for this use case.
|
47376 |
-
onCreate: (0,createChainedFunction/* default */.Z)(handlePopperUpdate, popperOptions.onCreate),
|
47377 |
-
onUpdate: (0,createChainedFunction/* default */.Z)(handlePopperUpdate, popperOptions.onUpdate)
|
47378 |
-
}));
|
47379 |
-
handlePopperRefRef.current(popper);
|
47380 |
-
}, [anchorEl, disablePortal, modifiers, open, rtlPlacement, popperOptions]);
|
47381 |
-
var handleRef = react.useCallback(function (node) {
|
47382 |
-
(0,setRef/* default */.Z)(ownRef, node);
|
47383 |
-
handleOpen();
|
47384 |
-
}, [ownRef, handleOpen]);
|
47385 |
|
47386 |
-
|
47387 |
-
|
47388 |
-
|
|
|
|
|
47389 |
|
47390 |
-
|
47391 |
-
|
47392 |
-
|
47393 |
-
|
|
|
|
|
|
|
|
|
47394 |
|
47395 |
-
|
47396 |
-
|
47397 |
-
};
|
47398 |
|
47399 |
-
|
47400 |
-
|
47401 |
-
handleClose();
|
47402 |
-
};
|
47403 |
|
47404 |
-
|
47405 |
-
|
47406 |
-
|
47407 |
-
}
|
47408 |
-
}, []);
|
47409 |
-
react.useEffect(function () {
|
47410 |
-
if (!open && !transition) {
|
47411 |
-
// Otherwise handleExited will call this.
|
47412 |
-
handleClose();
|
47413 |
-
}
|
47414 |
-
}, [open, transition]);
|
47415 |
|
47416 |
-
|
47417 |
-
|
47418 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47419 |
|
47420 |
-
var
|
47421 |
-
|
47422 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
47423 |
|
47424 |
-
if (
|
47425 |
-
childProps.TransitionProps = {
|
47426 |
-
in: open,
|
47427 |
-
onEnter: handleEnter,
|
47428 |
-
onExited: handleExited
|
47429 |
-
};
|
47430 |
-
}
|
47431 |
|
47432 |
-
|
47433 |
-
|
47434 |
-
|
47435 |
-
}, /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({
|
47436 |
-
ref: handleRef,
|
47437 |
-
role: "tooltip"
|
47438 |
-
}, other, {
|
47439 |
-
style: (0,esm_extends/* default */.Z)({
|
47440 |
-
// Prevents scroll issue, waiting for Popper.js to add this style once initiated.
|
47441 |
-
position: 'fixed',
|
47442 |
-
// Fix Popper.js display issue
|
47443 |
-
top: 0,
|
47444 |
-
left: 0,
|
47445 |
-
display: !open && keepMounted && !transition ? 'none' : null
|
47446 |
-
}, style)
|
47447 |
-
}), typeof children === 'function' ? children(childProps) : children));
|
47448 |
-
});
|
47449 |
-
false ? 0 : void 0;
|
47450 |
-
/* harmony default export */ var esm_Popper_Popper = (Popper_Popper);
|
47451 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/lab/esm/internal/svg-icons/Close.js
|
47452 |
|
|
|
|
|
|
|
47453 |
|
47454 |
-
|
47455 |
-
|
47456 |
-
|
|
|
|
|
|
|
47457 |
|
47458 |
-
|
47459 |
-
|
47460 |
-
|
47461 |
-
|
|
|
|
|
47462 |
|
|
|
|
|
|
|
47463 |
|
47464 |
-
|
47465 |
-
|
47466 |
-
|
47467 |
|
47468 |
-
|
47469 |
-
|
47470 |
-
}), 'ArrowDropDown'));
|
47471 |
-
// EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/utils/unstable_useId.js
|
47472 |
-
var unstable_useId = __webpack_require__(95001);
|
47473 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/lab/esm/useAutocomplete/useAutocomplete.js
|
47474 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47475 |
|
|
|
47476 |
|
|
|
|
|
47477 |
|
47478 |
-
|
|
|
47479 |
|
47480 |
-
|
47481 |
-
// Give up on IE 11 support for this feature
|
47482 |
|
47483 |
-
|
47484 |
-
|
47485 |
-
}
|
47486 |
|
47487 |
-
|
47488 |
-
|
47489 |
-
|
47490 |
-
|
47491 |
-
|
47492 |
-
ignoreCase = _config$ignoreCase === void 0 ? true : _config$ignoreCase,
|
47493 |
-
limit = config.limit,
|
47494 |
-
_config$matchFrom = config.matchFrom,
|
47495 |
-
matchFrom = _config$matchFrom === void 0 ? 'any' : _config$matchFrom,
|
47496 |
-
stringify = config.stringify,
|
47497 |
-
_config$trim = config.trim,
|
47498 |
-
trim = _config$trim === void 0 ? false : _config$trim;
|
47499 |
-
return function (options, _ref) {
|
47500 |
-
var inputValue = _ref.inputValue,
|
47501 |
-
getOptionLabel = _ref.getOptionLabel;
|
47502 |
-
var input = trim ? inputValue.trim() : inputValue;
|
47503 |
|
47504 |
-
|
47505 |
-
|
47506 |
-
}
|
47507 |
|
47508 |
-
|
47509 |
-
|
47510 |
-
|
47511 |
|
47512 |
-
var
|
47513 |
-
var candidate = (stringify || getOptionLabel)(option);
|
47514 |
|
47515 |
-
|
47516 |
-
|
|
|
|
|
|
|
|
|
47517 |
}
|
|
|
47518 |
|
47519 |
-
|
47520 |
-
candidate = stripDiacritics(candidate);
|
47521 |
-
}
|
47522 |
|
47523 |
-
|
47524 |
-
|
47525 |
-
|
47526 |
-
|
47527 |
-
|
47528 |
|
47529 |
-
|
47530 |
-
|
47531 |
-
|
47532 |
-
return i;
|
47533 |
}
|
47534 |
-
}
|
47535 |
|
47536 |
-
|
47537 |
-
|
|
|
47538 |
|
47539 |
-
var
|
|
|
47540 |
|
47541 |
-
|
47542 |
-
|
47543 |
-
|
47544 |
-
|
47545 |
-
_props$autoHighlight = props.autoHighlight,
|
47546 |
-
autoHighlight = _props$autoHighlight === void 0 ? false : _props$autoHighlight,
|
47547 |
-
_props$autoSelect = props.autoSelect,
|
47548 |
-
autoSelect = _props$autoSelect === void 0 ? false : _props$autoSelect,
|
47549 |
-
_props$blurOnSelect = props.blurOnSelect,
|
47550 |
-
blurOnSelect = _props$blurOnSelect === void 0 ? false : _props$blurOnSelect,
|
47551 |
-
_props$clearOnBlur = props.clearOnBlur,
|
47552 |
-
clearOnBlur = _props$clearOnBlur === void 0 ? !props.freeSolo : _props$clearOnBlur,
|
47553 |
-
_props$clearOnEscape = props.clearOnEscape,
|
47554 |
-
clearOnEscape = _props$clearOnEscape === void 0 ? false : _props$clearOnEscape,
|
47555 |
-
_props$componentName = props.componentName,
|
47556 |
-
componentName = _props$componentName === void 0 ? 'useAutocomplete' : _props$componentName,
|
47557 |
-
_props$debug = props.debug,
|
47558 |
-
debug = _props$debug === void 0 ? false : _props$debug,
|
47559 |
-
_props$defaultValue = props.defaultValue,
|
47560 |
-
defaultValue = _props$defaultValue === void 0 ? props.multiple ? [] : null : _props$defaultValue,
|
47561 |
-
_props$disableClearab = props.disableClearable,
|
47562 |
-
disableClearable = _props$disableClearab === void 0 ? false : _props$disableClearab,
|
47563 |
-
_props$disableCloseOn = props.disableCloseOnSelect,
|
47564 |
-
disableCloseOnSelect = _props$disableCloseOn === void 0 ? false : _props$disableCloseOn,
|
47565 |
-
_props$disabledItemsF = props.disabledItemsFocusable,
|
47566 |
-
disabledItemsFocusable = _props$disabledItemsF === void 0 ? false : _props$disabledItemsF,
|
47567 |
-
_props$disableListWra = props.disableListWrap,
|
47568 |
-
disableListWrap = _props$disableListWra === void 0 ? false : _props$disableListWra,
|
47569 |
-
_props$filterOptions = props.filterOptions,
|
47570 |
-
filterOptions = _props$filterOptions === void 0 ? defaultFilterOptions : _props$filterOptions,
|
47571 |
-
_props$filterSelected = props.filterSelectedOptions,
|
47572 |
-
filterSelectedOptions = _props$filterSelected === void 0 ? false : _props$filterSelected,
|
47573 |
-
_props$freeSolo = props.freeSolo,
|
47574 |
-
freeSolo = _props$freeSolo === void 0 ? false : _props$freeSolo,
|
47575 |
-
getOptionDisabled = props.getOptionDisabled,
|
47576 |
-
_props$getOptionLabel = props.getOptionLabel,
|
47577 |
-
getOptionLabelProp = _props$getOptionLabel === void 0 ? function (option) {
|
47578 |
-
return option;
|
47579 |
-
} : _props$getOptionLabel,
|
47580 |
-
_props$getOptionSelec = props.getOptionSelected,
|
47581 |
-
getOptionSelected = _props$getOptionSelec === void 0 ? function (option, value) {
|
47582 |
-
return option === value;
|
47583 |
-
} : _props$getOptionSelec,
|
47584 |
-
groupBy = props.groupBy,
|
47585 |
-
_props$handleHomeEndK = props.handleHomeEndKeys,
|
47586 |
-
handleHomeEndKeys = _props$handleHomeEndK === void 0 ? !props.freeSolo : _props$handleHomeEndK,
|
47587 |
-
idProp = props.id,
|
47588 |
-
_props$includeInputIn = props.includeInputInList,
|
47589 |
-
includeInputInList = _props$includeInputIn === void 0 ? false : _props$includeInputIn,
|
47590 |
-
inputValueProp = props.inputValue,
|
47591 |
-
_props$multiple = props.multiple,
|
47592 |
-
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
47593 |
-
onChange = props.onChange,
|
47594 |
-
onClose = props.onClose,
|
47595 |
-
onHighlightChange = props.onHighlightChange,
|
47596 |
-
onInputChange = props.onInputChange,
|
47597 |
-
onOpen = props.onOpen,
|
47598 |
-
openProp = props.open,
|
47599 |
-
_props$openOnFocus = props.openOnFocus,
|
47600 |
-
openOnFocus = _props$openOnFocus === void 0 ? false : _props$openOnFocus,
|
47601 |
-
options = props.options,
|
47602 |
-
_props$selectOnFocus = props.selectOnFocus,
|
47603 |
-
selectOnFocus = _props$selectOnFocus === void 0 ? !props.freeSolo : _props$selectOnFocus,
|
47604 |
-
valueProp = props.value;
|
47605 |
-
var id = (0,unstable_useId/* default */.Z)(idProp);
|
47606 |
-
var getOptionLabel = getOptionLabelProp;
|
47607 |
|
47608 |
-
|
|
|
47609 |
|
47610 |
-
|
47611 |
-
|
47612 |
-
var inputRef = react.useRef(null);
|
47613 |
-
var listboxRef = react.useRef(null);
|
47614 |
|
47615 |
-
var
|
47616 |
-
|
47617 |
-
|
47618 |
|
47619 |
-
var
|
47620 |
-
|
47621 |
-
|
47622 |
|
47623 |
-
var
|
47624 |
-
|
|
|
|
|
|
|
|
|
47625 |
|
47626 |
-
var
|
47627 |
-
|
47628 |
-
|
47629 |
-
|
47630 |
-
|
47631 |
-
|
47632 |
-
|
47633 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47634 |
|
47635 |
-
var
|
47636 |
-
|
47637 |
-
|
47638 |
-
|
47639 |
-
state: 'inputValue'
|
47640 |
-
}),
|
47641 |
-
_useControlled4 = (0,slicedToArray/* default */.Z)(_useControlled3, 2),
|
47642 |
-
inputValue = _useControlled4[0],
|
47643 |
-
setInputValue = _useControlled4[1];
|
47644 |
|
47645 |
-
|
47646 |
-
|
47647 |
-
|
47648 |
|
47649 |
-
|
47650 |
-
|
|
|
|
|
|
|
|
|
|
|
47651 |
|
47652 |
-
|
47653 |
-
newInputValue = '';
|
47654 |
-
} else if (newValue == null) {
|
47655 |
-
newInputValue = '';
|
47656 |
-
} else {
|
47657 |
-
var optionLabel = getOptionLabel(newValue);
|
47658 |
-
newInputValue = typeof optionLabel === 'string' ? optionLabel : '';
|
47659 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47660 |
|
47661 |
-
|
47662 |
-
|
47663 |
-
|
|
|
|
|
47664 |
|
47665 |
-
|
|
|
|
|
47666 |
|
47667 |
-
|
47668 |
-
|
|
|
|
|
|
|
|
|
47669 |
}
|
47670 |
});
|
47671 |
react.useEffect(function () {
|
47672 |
-
|
47673 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47674 |
|
47675 |
-
|
47676 |
-
controlled: openProp,
|
47677 |
-
default: false,
|
47678 |
-
name: componentName,
|
47679 |
-
state: 'open'
|
47680 |
-
}),
|
47681 |
-
_useControlled6 = (0,slicedToArray/* default */.Z)(_useControlled5, 2),
|
47682 |
-
open = _useControlled6[0],
|
47683 |
-
setOpenState = _useControlled6[1];
|
47684 |
|
47685 |
-
|
47686 |
-
|
47687 |
-
|
47688 |
-
|
47689 |
-
|
47690 |
-
|
47691 |
-
|
47692 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
47693 |
|
47694 |
-
|
47695 |
-
|
47696 |
-
|
47697 |
-
|
47698 |
-
inputValue: inputValueIsSelectedValue ? '' : inputValue,
|
47699 |
-
getOptionLabel: getOptionLabel
|
47700 |
-
}) : [];
|
47701 |
|
47702 |
-
|
47703 |
|
47704 |
-
|
47705 |
-
|
47706 |
-
inputRef.current.focus();
|
47707 |
-
} else {
|
47708 |
-
anchorEl.querySelector("[data-tag-index=\"".concat(tagToFocus, "\"]")).focus();
|
47709 |
}
|
47710 |
-
}); // Ensure the focusedTag is never inconsistent
|
47711 |
|
47712 |
-
|
47713 |
-
|
47714 |
-
|
47715 |
-
|
47716 |
-
|
47717 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47718 |
|
47719 |
-
|
47720 |
-
|
47721 |
-
return -1;
|
47722 |
}
|
47723 |
|
47724 |
-
|
|
|
|
|
|
|
|
|
47725 |
|
47726 |
-
|
47727 |
-
|
47728 |
-
|
47729 |
-
|
47730 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47731 |
|
47732 |
-
var option = listboxRef.current.querySelector("[data-option-index=\"".concat(nextFocus, "\"]")); // Same logic as MenuList.js
|
47733 |
|
47734 |
-
var nextFocusDisabled = disabledItemsFocusable ? false : option && (option.disabled || option.getAttribute('aria-disabled') === 'true');
|
47735 |
|
47736 |
-
if (option && !option.hasAttribute('tabindex') || nextFocusDisabled) {
|
47737 |
-
// Move to the next element.
|
47738 |
-
nextFocus += direction === 'next' ? 1 : -1;
|
47739 |
-
} else {
|
47740 |
-
return nextFocus;
|
47741 |
-
}
|
47742 |
-
}
|
47743 |
-
}
|
47744 |
|
47745 |
-
|
47746 |
-
|
47747 |
-
|
47748 |
-
|
47749 |
-
|
47750 |
-
|
47751 |
|
47752 |
-
|
47753 |
-
|
47754 |
-
|
47755 |
-
inputRef.current.setAttribute('aria-activedescendant', "".concat(id, "-option-").concat(index));
|
47756 |
-
}
|
47757 |
|
47758 |
-
|
47759 |
-
onHighlightChange(event, index === -1 ? null : filteredOptions[index], reason);
|
47760 |
-
}
|
47761 |
|
47762 |
-
|
47763 |
-
return;
|
47764 |
-
}
|
47765 |
|
47766 |
-
|
47767 |
|
47768 |
-
|
47769 |
-
prev.removeAttribute('data-focus');
|
47770 |
-
}
|
47771 |
|
47772 |
-
|
47773 |
|
47774 |
-
if (!listboxNode) {
|
47775 |
-
return;
|
47776 |
-
}
|
47777 |
|
47778 |
-
if (index === -1) {
|
47779 |
-
listboxNode.scrollTop = 0;
|
47780 |
-
return;
|
47781 |
-
}
|
47782 |
|
47783 |
-
var option = listboxRef.current.querySelector("[data-option-index=\"".concat(index, "\"]"));
|
47784 |
|
47785 |
-
if (!option) {
|
47786 |
-
return;
|
47787 |
-
}
|
47788 |
|
47789 |
-
option.setAttribute('data-focus', 'true'); // Scroll active descendant into view.
|
47790 |
-
// Logic copied from https://www.w3.org/TR/wai-aria-practices/examples/listbox/js/listbox.js
|
47791 |
-
//
|
47792 |
-
// Consider this API instead once it has a better browser support:
|
47793 |
-
// .scrollIntoView({ scrollMode: 'if-needed', block: 'nearest' });
|
47794 |
|
47795 |
-
if (listboxNode.scrollHeight > listboxNode.clientHeight && reason !== 'mouse') {
|
47796 |
-
var element = option;
|
47797 |
-
var scrollBottom = listboxNode.clientHeight + listboxNode.scrollTop;
|
47798 |
-
var elementBottom = element.offsetTop + element.offsetHeight;
|
47799 |
|
47800 |
-
if (elementBottom > scrollBottom) {
|
47801 |
-
listboxNode.scrollTop = elementBottom - listboxNode.clientHeight;
|
47802 |
-
} else if (element.offsetTop - element.offsetHeight * (groupBy ? 1.3 : 0) < listboxNode.scrollTop) {
|
47803 |
-
listboxNode.scrollTop = element.offsetTop - element.offsetHeight * (groupBy ? 1.3 : 0);
|
47804 |
-
}
|
47805 |
-
}
|
47806 |
-
});
|
47807 |
-
var changeHighlightedIndex = (0,useEventCallback/* default */.Z)(function (_ref3) {
|
47808 |
-
var event = _ref3.event,
|
47809 |
-
diff = _ref3.diff,
|
47810 |
-
_ref3$direction = _ref3.direction,
|
47811 |
-
direction = _ref3$direction === void 0 ? 'next' : _ref3$direction,
|
47812 |
-
_ref3$reason = _ref3.reason,
|
47813 |
-
reason = _ref3$reason === void 0 ? 'auto' : _ref3$reason;
|
47814 |
|
47815 |
-
|
47816 |
-
|
|
|
|
|
|
|
|
|
|
|
47817 |
}
|
|
|
|
|
47818 |
|
47819 |
-
|
47820 |
-
|
|
|
|
|
|
|
|
|
|
|
47821 |
|
47822 |
-
|
47823 |
-
|
47824 |
-
|
47825 |
|
47826 |
-
|
47827 |
-
|
47828 |
-
|
|
|
47829 |
|
47830 |
-
|
47831 |
-
return maxIndex;
|
47832 |
-
}
|
47833 |
|
47834 |
-
|
|
|
|
|
47835 |
|
47836 |
-
|
47837 |
-
|
47838 |
-
|
47839 |
-
}
|
47840 |
|
47841 |
-
|
47842 |
-
|
47843 |
-
}
|
47844 |
|
47845 |
-
|
|
|
|
|
|
|
|
|
47846 |
}
|
|
|
47847 |
|
47848 |
-
|
47849 |
-
|
47850 |
-
return -1;
|
47851 |
-
}
|
47852 |
|
47853 |
-
|
47854 |
-
|
47855 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47856 |
|
47857 |
-
|
47858 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47859 |
|
47860 |
-
return newIndex;
|
47861 |
-
};
|
47862 |
|
47863 |
-
var nextIndex = validOptionIndex(getNextIndex(), direction);
|
47864 |
-
setHighlightedIndex({
|
47865 |
-
index: nextIndex,
|
47866 |
-
reason: reason,
|
47867 |
-
event: event
|
47868 |
-
}); // Sync the content of the input with the highlighted option.
|
47869 |
|
47870 |
-
if (autoComplete && diff !== 'reset') {
|
47871 |
-
if (nextIndex === -1) {
|
47872 |
-
inputRef.current.value = inputValue;
|
47873 |
-
} else {
|
47874 |
-
var option = getOptionLabel(filteredOptions[nextIndex]);
|
47875 |
-
inputRef.current.value = option; // The portion of the selected suggestion that has not been typed by the user,
|
47876 |
-
// a completion string, appears inline after the input cursor in the textbox.
|
47877 |
|
47878 |
-
var index = option.toLowerCase().indexOf(inputValue.toLowerCase());
|
47879 |
|
47880 |
-
if (index === 0 && inputValue.length > 0) {
|
47881 |
-
inputRef.current.setSelectionRange(inputValue.length, option.length);
|
47882 |
-
}
|
47883 |
-
}
|
47884 |
-
}
|
47885 |
-
});
|
47886 |
-
var syncHighlightedIndex = react.useCallback(function () {
|
47887 |
-
if (!popupOpen) {
|
47888 |
-
return;
|
47889 |
-
}
|
47890 |
|
47891 |
-
var valueItem = multiple ? value[0] : value; // The popup is empty, reset
|
47892 |
|
47893 |
-
if (filteredOptions.length === 0 || valueItem == null) {
|
47894 |
-
changeHighlightedIndex({
|
47895 |
-
diff: 'reset'
|
47896 |
-
});
|
47897 |
-
return;
|
47898 |
-
}
|
47899 |
|
47900 |
-
if (!listboxRef.current) {
|
47901 |
-
return;
|
47902 |
-
} // Synchronize the value with the highlighted index
|
47903 |
|
47904 |
|
47905 |
-
|
47906 |
-
|
|
|
|
|
|
|
|
|
47907 |
|
47908 |
-
|
47909 |
-
|
47910 |
-
|
47911 |
-
|
47912 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47913 |
|
47914 |
-
|
47915 |
-
|
47916 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47917 |
|
47918 |
-
|
47919 |
-
|
47920 |
-
|
47921 |
-
});
|
47922 |
-
} else {
|
47923 |
-
setHighlightedIndex({
|
47924 |
-
index: itemIndex
|
47925 |
-
});
|
47926 |
-
}
|
47927 |
|
47928 |
-
|
47929 |
-
} // Prevent the highlighted index to leak outside the boundaries.
|
47930 |
|
|
|
47931 |
|
47932 |
-
|
47933 |
-
setHighlightedIndex({
|
47934 |
-
index: filteredOptions.length - 1
|
47935 |
-
});
|
47936 |
-
return;
|
47937 |
-
} // Restore the focus to the previous index.
|
47938 |
|
|
|
47939 |
|
47940 |
-
|
47941 |
-
index: highlightedIndexRef.current
|
47942 |
-
}); // Ignore filteredOptions (and options, getOptionSelected, getOptionLabel) not to break the scroll position
|
47943 |
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
47944 |
-
}, [// Only sync the highlighted index when the option switch between empty and not
|
47945 |
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
47946 |
-
filteredOptions.length === 0, // Don't sync the highlighted index with the value when multiple
|
47947 |
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
47948 |
-
multiple ? false : value, filterSelectedOptions, changeHighlightedIndex, setHighlightedIndex, popupOpen, inputValue, multiple]);
|
47949 |
-
var handleListboxRef = (0,useEventCallback/* default */.Z)(function (node) {
|
47950 |
-
(0,setRef/* default */.Z)(listboxRef, node);
|
47951 |
|
47952 |
-
|
47953 |
-
return;
|
47954 |
-
}
|
47955 |
|
47956 |
-
|
47957 |
-
});
|
47958 |
-
react.useEffect(function () {
|
47959 |
-
syncHighlightedIndex();
|
47960 |
-
}, [syncHighlightedIndex]);
|
47961 |
|
47962 |
-
|
47963 |
-
if (open) {
|
47964 |
-
return;
|
47965 |
-
}
|
47966 |
|
47967 |
-
setOpenState(true);
|
47968 |
|
47969 |
-
if (onOpen) {
|
47970 |
-
onOpen(event);
|
47971 |
-
}
|
47972 |
-
};
|
47973 |
|
47974 |
-
var handleClose = function handleClose(event, reason) {
|
47975 |
-
if (!open) {
|
47976 |
-
return;
|
47977 |
-
}
|
47978 |
|
47979 |
-
setOpenState(false);
|
47980 |
|
47981 |
-
|
47982 |
-
|
47983 |
-
|
47984 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47985 |
|
47986 |
-
|
47987 |
-
if (value === newValue) {
|
47988 |
-
return;
|
47989 |
-
}
|
47990 |
|
47991 |
-
|
47992 |
-
|
47993 |
-
|
|
|
47994 |
|
47995 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47996 |
};
|
47997 |
|
47998 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47999 |
|
48000 |
-
|
48001 |
-
var reasonProp = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'select-option';
|
48002 |
-
var origin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'options';
|
48003 |
-
var reason = reasonProp;
|
48004 |
-
var newValue = option;
|
48005 |
|
48006 |
-
|
48007 |
-
newValue = Array.isArray(value) ? value.slice() : [];
|
48008 |
|
48009 |
-
if (false) { var matches; }
|
48010 |
|
48011 |
-
var itemIndex = useAutocomplete_findIndex(newValue, function (valueItem) {
|
48012 |
-
return getOptionSelected(option, valueItem);
|
48013 |
-
});
|
48014 |
|
48015 |
-
if (itemIndex === -1) {
|
48016 |
-
newValue.push(option);
|
48017 |
-
} else if (origin !== 'freeSolo') {
|
48018 |
-
newValue.splice(itemIndex, 1);
|
48019 |
-
reason = 'remove-option';
|
48020 |
-
}
|
48021 |
-
}
|
48022 |
|
48023 |
-
resetInputValue(event, newValue);
|
48024 |
-
handleValue(event, newValue, reason, {
|
48025 |
-
option: option
|
48026 |
-
});
|
48027 |
|
48028 |
-
if (!disableCloseOnSelect) {
|
48029 |
-
handleClose(event, reason);
|
48030 |
-
}
|
48031 |
|
48032 |
-
|
48033 |
-
|
48034 |
-
|
48035 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48036 |
|
48037 |
-
|
48038 |
-
|
48039 |
-
|
48040 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48041 |
|
48042 |
-
|
48043 |
|
48044 |
-
|
48045 |
-
// Out of range
|
48046 |
-
if (direction === 'next' && nextFocus === value.length || direction === 'previous' && nextFocus === -1) {
|
48047 |
-
return -1;
|
48048 |
-
}
|
48049 |
|
48050 |
-
|
48051 |
|
48052 |
-
|
48053 |
-
nextFocus += direction === 'next' ? 1 : -1;
|
48054 |
-
} else {
|
48055 |
-
return nextFocus;
|
48056 |
-
}
|
48057 |
-
}
|
48058 |
-
}
|
48059 |
|
48060 |
-
|
48061 |
-
if (!multiple) {
|
48062 |
-
return;
|
48063 |
-
}
|
48064 |
|
48065 |
-
handleClose(event, 'toggleInput');
|
48066 |
-
var nextTag = focusedTag;
|
48067 |
|
48068 |
-
if (focusedTag === -1) {
|
48069 |
-
if (inputValue === '' && direction === 'previous') {
|
48070 |
-
nextTag = value.length - 1;
|
48071 |
-
}
|
48072 |
-
} else {
|
48073 |
-
nextTag += direction === 'next' ? 1 : -1;
|
48074 |
|
48075 |
-
if (nextTag < 0) {
|
48076 |
-
nextTag = 0;
|
48077 |
-
}
|
48078 |
|
48079 |
-
if (nextTag === value.length) {
|
48080 |
-
nextTag = -1;
|
48081 |
-
}
|
48082 |
-
}
|
48083 |
|
48084 |
-
nextTag = validTagIndex(nextTag, direction);
|
48085 |
-
setFocusedTag(nextTag);
|
48086 |
-
focusTag(nextTag);
|
48087 |
-
};
|
48088 |
|
48089 |
-
var handleClear = function handleClear(event) {
|
48090 |
-
ignoreFocus.current = true;
|
48091 |
-
setInputValue('');
|
48092 |
|
48093 |
-
|
48094 |
-
|
48095 |
-
|
|
|
|
|
|
|
48096 |
|
48097 |
-
|
48098 |
-
|
|
|
|
|
48099 |
|
48100 |
-
var
|
48101 |
-
|
48102 |
-
|
48103 |
-
|
48104 |
-
focusTag(-1);
|
48105 |
-
}
|
48106 |
|
48107 |
-
|
48108 |
-
|
48109 |
-
|
48110 |
-
|
48111 |
-
|
48112 |
-
|
48113 |
-
|
48114 |
-
|
48115 |
-
|
48116 |
-
|
48117 |
-
|
48118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48119 |
|
48120 |
-
|
48121 |
|
48122 |
-
|
48123 |
-
if (popupOpen && handleHomeEndKeys) {
|
48124 |
-
// Prevent scroll of the page
|
48125 |
-
event.preventDefault();
|
48126 |
-
changeHighlightedIndex({
|
48127 |
-
diff: 'end',
|
48128 |
-
direction: 'previous',
|
48129 |
-
reason: 'keyboard',
|
48130 |
-
event: event
|
48131 |
-
});
|
48132 |
-
}
|
48133 |
|
48134 |
-
|
48135 |
|
48136 |
-
|
48137 |
-
// Prevent scroll of the page
|
48138 |
-
event.preventDefault();
|
48139 |
-
changeHighlightedIndex({
|
48140 |
-
diff: -pageSize,
|
48141 |
-
direction: 'previous',
|
48142 |
-
reason: 'keyboard',
|
48143 |
-
event: event
|
48144 |
-
});
|
48145 |
-
handleOpen(event);
|
48146 |
-
break;
|
48147 |
|
48148 |
-
|
48149 |
-
// Prevent scroll of the page
|
48150 |
-
event.preventDefault();
|
48151 |
-
changeHighlightedIndex({
|
48152 |
-
diff: pageSize,
|
48153 |
-
direction: 'next',
|
48154 |
-
reason: 'keyboard',
|
48155 |
-
event: event
|
48156 |
-
});
|
48157 |
-
handleOpen(event);
|
48158 |
-
break;
|
48159 |
|
48160 |
-
case 'ArrowDown':
|
48161 |
-
// Prevent cursor move
|
48162 |
-
event.preventDefault();
|
48163 |
-
changeHighlightedIndex({
|
48164 |
-
diff: 1,
|
48165 |
-
direction: 'next',
|
48166 |
-
reason: 'keyboard',
|
48167 |
-
event: event
|
48168 |
-
});
|
48169 |
-
handleOpen(event);
|
48170 |
-
break;
|
48171 |
|
48172 |
-
case 'ArrowUp':
|
48173 |
-
// Prevent cursor move
|
48174 |
-
event.preventDefault();
|
48175 |
-
changeHighlightedIndex({
|
48176 |
-
diff: -1,
|
48177 |
-
direction: 'previous',
|
48178 |
-
reason: 'keyboard',
|
48179 |
-
event: event
|
48180 |
-
});
|
48181 |
-
handleOpen(event);
|
48182 |
-
break;
|
48183 |
|
48184 |
-
case 'ArrowLeft':
|
48185 |
-
handleFocusTag(event, 'previous');
|
48186 |
-
break;
|
48187 |
|
48188 |
-
|
48189 |
-
|
48190 |
-
|
|
|
|
|
48191 |
|
48192 |
-
|
48193 |
-
|
48194 |
-
|
48195 |
-
|
48196 |
-
}
|
48197 |
|
48198 |
-
|
48199 |
-
|
48200 |
-
|
|
|
48201 |
|
48202 |
-
|
|
|
|
|
|
|
48203 |
|
48204 |
-
|
48205 |
-
|
48206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48207 |
|
48208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48209 |
|
48210 |
-
|
48211 |
-
inputRef.current.setSelectionRange(inputRef.current.value.length, inputRef.current.value.length);
|
48212 |
-
}
|
48213 |
-
} else if (freeSolo && inputValue !== '' && inputValueIsSelectedValue === false) {
|
48214 |
-
if (multiple) {
|
48215 |
-
// Allow people to add new values before they submit the form.
|
48216 |
-
event.preventDefault();
|
48217 |
-
}
|
48218 |
|
48219 |
-
|
48220 |
-
}
|
48221 |
|
48222 |
-
|
48223 |
|
48224 |
-
|
48225 |
-
if (popupOpen) {
|
48226 |
-
// Avoid Opera to exit fullscreen mode.
|
48227 |
-
event.preventDefault(); // Avoid the Modal to handle the event.
|
48228 |
|
48229 |
-
|
48230 |
-
handleClose(event, 'escape');
|
48231 |
-
} else if (clearOnEscape && (inputValue !== '' || multiple && value.length > 0)) {
|
48232 |
-
// Avoid Opera to exit fullscreen mode.
|
48233 |
-
event.preventDefault(); // Avoid the Modal to handle the event.
|
48234 |
|
48235 |
-
event.stopPropagation();
|
48236 |
-
handleClear(event);
|
48237 |
-
}
|
48238 |
|
48239 |
-
break;
|
48240 |
|
48241 |
-
case 'Backspace':
|
48242 |
-
if (multiple && inputValue === '' && value.length > 0) {
|
48243 |
-
var index = focusedTag === -1 ? value.length - 1 : focusedTag;
|
48244 |
-
var newValue = value.slice();
|
48245 |
-
newValue.splice(index, 1);
|
48246 |
-
handleValue(event, newValue, 'remove-option', {
|
48247 |
-
option: value[index]
|
48248 |
-
});
|
48249 |
-
}
|
48250 |
|
48251 |
-
break;
|
48252 |
|
48253 |
-
|
48254 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48255 |
|
48256 |
-
|
48257 |
-
|
48258 |
-
|
48259 |
-
|
48260 |
-
};
|
48261 |
|
48262 |
-
var
|
48263 |
-
|
|
|
|
|
48264 |
|
48265 |
-
|
48266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48267 |
}
|
48268 |
-
}
|
48269 |
-
|
48270 |
-
|
48271 |
-
|
48272 |
-
|
48273 |
-
|
48274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48275 |
}
|
|
|
|
|
|
|
|
|
|
|
48276 |
|
48277 |
-
setFocused(false);
|
48278 |
-
firstFocus.current = true;
|
48279 |
-
ignoreFocus.current = false;
|
48280 |
|
48281 |
-
if (debug && inputValue !== '') {
|
48282 |
-
return;
|
48283 |
-
}
|
48284 |
|
48285 |
-
|
48286 |
-
|
48287 |
-
|
48288 |
-
|
48289 |
-
|
48290 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48291 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48292 |
|
48293 |
-
|
48294 |
-
};
|
48295 |
|
48296 |
-
|
48297 |
-
var newValue = event.target.value;
|
48298 |
|
48299 |
-
|
48300 |
-
setInputValue(newValue);
|
48301 |
|
48302 |
-
|
48303 |
-
onInputChange(event, newValue, 'input');
|
48304 |
-
}
|
48305 |
-
}
|
48306 |
|
48307 |
-
|
48308 |
-
if (!disableClearable && !multiple) {
|
48309 |
-
handleValue(event, null, 'clear');
|
48310 |
-
}
|
48311 |
-
} else {
|
48312 |
-
handleOpen(event);
|
48313 |
-
}
|
48314 |
-
};
|
48315 |
|
48316 |
-
var handleOptionMouseOver = function handleOptionMouseOver(event) {
|
48317 |
-
setHighlightedIndex({
|
48318 |
-
event: event,
|
48319 |
-
index: Number(event.currentTarget.getAttribute('data-option-index')),
|
48320 |
-
reason: 'mouse'
|
48321 |
-
});
|
48322 |
-
};
|
48323 |
|
48324 |
-
var handleOptionTouchStart = function handleOptionTouchStart() {
|
48325 |
-
isTouch.current = true;
|
48326 |
-
};
|
48327 |
|
48328 |
-
var handleOptionClick = function handleOptionClick(event) {
|
48329 |
-
var index = Number(event.currentTarget.getAttribute('data-option-index'));
|
48330 |
-
selectNewValue(event, filteredOptions[index], 'select-option');
|
48331 |
-
isTouch.current = false;
|
48332 |
-
};
|
48333 |
|
48334 |
-
var handleTagDelete = function handleTagDelete(index) {
|
48335 |
-
return function (event) {
|
48336 |
-
var newValue = value.slice();
|
48337 |
-
newValue.splice(index, 1);
|
48338 |
-
handleValue(event, newValue, 'remove-option', {
|
48339 |
-
option: value[index]
|
48340 |
-
});
|
48341 |
-
};
|
48342 |
-
};
|
48343 |
|
48344 |
-
var handlePopupIndicator = function handlePopupIndicator(event) {
|
48345 |
-
if (open) {
|
48346 |
-
handleClose(event, 'toggleInput');
|
48347 |
-
} else {
|
48348 |
-
handleOpen(event);
|
48349 |
-
}
|
48350 |
-
}; // Prevent input blur when interacting with the combobox
|
48351 |
|
48352 |
|
48353 |
-
|
48354 |
-
|
48355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48356 |
}
|
48357 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48358 |
|
|
|
|
|
|
|
|
|
48359 |
|
48360 |
-
var handleClick = function handleClick() {
|
48361 |
-
inputRef.current.focus();
|
48362 |
|
48363 |
-
|
48364 |
-
|
48365 |
-
|
48366 |
|
48367 |
-
firstFocus.current = false;
|
48368 |
-
};
|
48369 |
|
48370 |
-
var
|
48371 |
-
|
48372 |
-
handlePopupIndicator(event);
|
48373 |
-
}
|
48374 |
};
|
48375 |
|
48376 |
-
var
|
48377 |
-
|
48378 |
-
|
|
|
48379 |
|
48380 |
-
|
48381 |
-
//
|
48382 |
-
var indexBy = new Map();
|
48383 |
-
var warn = false;
|
48384 |
-
groupedOptions = filteredOptions.reduce(function (acc, option, index) {
|
48385 |
-
var group = groupBy(option);
|
48386 |
|
48387 |
-
if (acc.length > 0 && acc[acc.length - 1].group === group) {
|
48388 |
-
acc[acc.length - 1].options.push(option);
|
48389 |
-
} else {
|
48390 |
-
if (false) {}
|
48391 |
|
48392 |
-
|
48393 |
-
|
48394 |
-
|
48395 |
-
|
48396 |
-
options: [option]
|
48397 |
-
});
|
48398 |
-
}
|
48399 |
|
48400 |
-
|
48401 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48402 |
}
|
48403 |
|
48404 |
-
|
48405 |
-
|
48406 |
-
|
48407 |
-
|
48408 |
-
|
48409 |
-
|
48410 |
-
|
48411 |
-
|
48412 |
-
|
48413 |
-
|
48414 |
-
|
48415 |
-
|
|
|
|
|
48416 |
},
|
48417 |
-
|
48418 |
-
|
48419 |
-
|
48420 |
-
|
48421 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
48422 |
},
|
48423 |
-
|
48424 |
-
|
48425 |
-
id: id,
|
48426 |
-
value: inputValue,
|
48427 |
-
onBlur: handleBlur,
|
48428 |
-
onFocus: handleFocus,
|
48429 |
-
onChange: handleInputChange,
|
48430 |
-
onMouseDown: handleInputMouseDown,
|
48431 |
-
// if open then this is handled imperativeley so don't let react override
|
48432 |
-
// only have an opinion about this when closed
|
48433 |
-
'aria-activedescendant': popupOpen ? '' : null,
|
48434 |
-
'aria-autocomplete': autoComplete ? 'both' : 'list',
|
48435 |
-
'aria-controls': popupOpen ? "".concat(id, "-popup") : null,
|
48436 |
-
// Disable browser's suggestion that might overlap with the popup.
|
48437 |
-
// Handle autocomplete but not autofill.
|
48438 |
-
autoComplete: 'off',
|
48439 |
-
ref: inputRef,
|
48440 |
-
autoCapitalize: 'none',
|
48441 |
-
spellCheck: 'false'
|
48442 |
-
};
|
48443 |
},
|
48444 |
-
|
48445 |
-
|
48446 |
-
|
48447 |
-
|
48448 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48449 |
},
|
48450 |
-
|
48451 |
-
|
48452 |
-
|
48453 |
-
|
48454 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48455 |
},
|
48456 |
-
|
48457 |
-
|
48458 |
-
|
48459 |
-
|
48460 |
-
|
48461 |
-
|
48462 |
-
|
48463 |
-
|
|
|
|
|
48464 |
},
|
48465 |
-
|
48466 |
-
|
48467 |
-
|
48468 |
-
|
48469 |
-
|
48470 |
-
|
48471 |
-
|
48472 |
-
|
48473 |
-
|
48474 |
-
|
48475 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48476 |
},
|
48477 |
-
|
48478 |
-
|
48479 |
-
|
48480 |
-
|
48481 |
-
|
48482 |
-
|
48483 |
-
|
48484 |
-
|
48485 |
-
key: index,
|
48486 |
-
tabIndex: -1,
|
48487 |
-
role: 'option',
|
48488 |
-
id: "".concat(id, "-option-").concat(index),
|
48489 |
-
onMouseOver: handleOptionMouseOver,
|
48490 |
-
onClick: handleOptionClick,
|
48491 |
-
onTouchStart: handleOptionTouchStart,
|
48492 |
-
'data-option-index': index,
|
48493 |
-
'aria-disabled': disabled,
|
48494 |
-
'aria-selected': selected
|
48495 |
-
};
|
48496 |
},
|
48497 |
-
|
48498 |
-
|
48499 |
-
value:
|
48500 |
-
|
48501 |
-
|
48502 |
-
|
48503 |
-
|
48504 |
-
|
48505 |
-
|
48506 |
-
|
48507 |
-
|
|
|
48508 |
}
|
48509 |
-
;// CONCATENATED MODULE: ./
|
|
|
|
|
|
|
48510 |
|
48511 |
|
48512 |
|
48513 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48514 |
|
48515 |
|
48516 |
|
48517 |
|
48518 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48519 |
|
|
|
48520 |
|
|
|
48521 |
|
|
|
48522 |
|
|
|
48523 |
|
|
|
48524 |
|
48525 |
|
48526 |
-
var Autocomplete_styles = function styles(theme) {
|
48527 |
-
var _option;
|
48528 |
|
48529 |
-
return {
|
48530 |
-
/* Styles applied to the root element. */
|
48531 |
-
root: {
|
48532 |
-
'&$focused $clearIndicatorDirty': {
|
48533 |
-
visibility: 'visible'
|
48534 |
-
},
|
48535 |
|
48536 |
-
|
48537 |
-
|
48538 |
-
|
48539 |
-
|
48540 |
-
|
|
|
|
|
|
|
|
|
48541 |
}
|
48542 |
-
}
|
|
|
|
|
|
|
48543 |
|
48544 |
-
|
48545 |
-
|
48546 |
-
|
48547 |
-
|
48548 |
|
48549 |
-
|
48550 |
-
focused: {},
|
48551 |
|
48552 |
-
|
48553 |
-
|
48554 |
-
|
48555 |
-
maxWidth: 'calc(100% - 6px)'
|
48556 |
-
},
|
48557 |
|
48558 |
-
|
48559 |
-
|
48560 |
-
|
48561 |
-
maxWidth: 'calc(100% - 4px)'
|
48562 |
-
},
|
48563 |
|
48564 |
-
|
48565 |
-
|
|
|
|
|
48566 |
|
48567 |
-
|
48568 |
-
|
|
|
|
|
48569 |
|
48570 |
-
|
48571 |
-
|
48572 |
-
|
48573 |
-
|
48574 |
-
|
48575 |
-
|
48576 |
-
|
48577 |
-
|
48578 |
-
|
48579 |
-
|
48580 |
-
|
48581 |
-
|
48582 |
-
|
48583 |
-
|
48584 |
-
|
48585 |
-
|
48586 |
-
padding: 4
|
48587 |
-
},
|
48588 |
-
'& $input:first-child': {
|
48589 |
-
padding: '6px 0'
|
48590 |
-
}
|
48591 |
-
},
|
48592 |
-
'&[class*="MuiInput-root"][class*="MuiInput-marginDense"]': {
|
48593 |
-
'& $input': {
|
48594 |
-
padding: '4px 4px 5px'
|
48595 |
-
},
|
48596 |
-
'& $input:first-child': {
|
48597 |
-
padding: '3px 0 6px'
|
48598 |
-
}
|
48599 |
-
},
|
48600 |
-
'&[class*="MuiOutlinedInput-root"]': {
|
48601 |
-
padding: 9,
|
48602 |
-
'$hasPopupIcon &, $hasClearIcon &': {
|
48603 |
-
paddingRight: 26 + 4 + 9
|
48604 |
-
},
|
48605 |
-
'$hasPopupIcon$hasClearIcon &': {
|
48606 |
-
paddingRight: 52 + 4 + 9
|
48607 |
-
},
|
48608 |
-
'& $input': {
|
48609 |
-
padding: '9.5px 4px'
|
48610 |
-
},
|
48611 |
-
'& $input:first-child': {
|
48612 |
-
paddingLeft: 6
|
48613 |
-
},
|
48614 |
-
'& $endAdornment': {
|
48615 |
-
right: 9
|
48616 |
-
}
|
48617 |
-
},
|
48618 |
-
'&[class*="MuiOutlinedInput-root"][class*="MuiOutlinedInput-marginDense"]': {
|
48619 |
-
padding: 6,
|
48620 |
-
'& $input': {
|
48621 |
-
padding: '4.5px 4px'
|
48622 |
-
}
|
48623 |
},
|
48624 |
-
|
48625 |
-
|
48626 |
-
|
48627 |
-
'$hasPopupIcon &, $hasClearIcon &': {
|
48628 |
-
paddingRight: 26 + 4 + 9
|
48629 |
-
},
|
48630 |
-
'$hasPopupIcon$hasClearIcon &': {
|
48631 |
-
paddingRight: 52 + 4 + 9
|
48632 |
-
},
|
48633 |
-
'& $input': {
|
48634 |
-
padding: '9px 4px'
|
48635 |
-
},
|
48636 |
-
'& $endAdornment': {
|
48637 |
-
right: 9
|
48638 |
-
}
|
48639 |
},
|
48640 |
-
|
48641 |
-
|
48642 |
-
|
48643 |
-
|
48644 |
-
|
48645 |
-
|
48646 |
-
|
48647 |
-
|
48648 |
-
|
48649 |
-
|
48650 |
-
|
48651 |
-
|
48652 |
-
|
48653 |
-
},
|
48654 |
-
|
48655 |
-
/* Styles applied to the input element if tag focused. */
|
48656 |
-
inputFocused: {
|
48657 |
-
opacity: 1
|
48658 |
-
},
|
48659 |
-
|
48660 |
-
/* Styles applied to the endAdornment element. */
|
48661 |
-
endAdornment: {
|
48662 |
-
// We use a position absolute to support wrapping tags.
|
48663 |
-
position: 'absolute',
|
48664 |
-
right: 0,
|
48665 |
-
top: 'calc(50% - 14px)' // Center vertically
|
48666 |
-
|
48667 |
-
},
|
48668 |
-
|
48669 |
-
/* Styles applied to the clear indicator. */
|
48670 |
-
clearIndicator: {
|
48671 |
-
marginRight: -2,
|
48672 |
-
padding: 4,
|
48673 |
-
visibility: 'hidden'
|
48674 |
-
},
|
48675 |
-
|
48676 |
-
/* Styles applied to the clear indicator if the input is dirty. */
|
48677 |
-
clearIndicatorDirty: {},
|
48678 |
-
|
48679 |
-
/* Styles applied to the popup indicator. */
|
48680 |
-
popupIndicator: {
|
48681 |
-
padding: 2,
|
48682 |
-
marginRight: -2
|
48683 |
-
},
|
48684 |
-
|
48685 |
-
/* Styles applied to the popup indicator if the popup is open. */
|
48686 |
-
popupIndicatorOpen: {
|
48687 |
-
transform: 'rotate(180deg)'
|
48688 |
-
},
|
48689 |
-
|
48690 |
-
/* Styles applied to the popper element. */
|
48691 |
-
popper: {
|
48692 |
-
zIndex: theme.zIndex.modal
|
48693 |
-
},
|
48694 |
-
|
48695 |
-
/* Styles applied to the popper element if `disablePortal={true}`. */
|
48696 |
-
popperDisablePortal: {
|
48697 |
-
position: 'absolute'
|
48698 |
-
},
|
48699 |
|
48700 |
-
/* Styles applied to the `Paper` component. */
|
48701 |
-
paper: (0,esm_extends/* default */.Z)({}, theme.typography.body1, {
|
48702 |
-
overflow: 'hidden',
|
48703 |
-
margin: '4px 0'
|
48704 |
-
}),
|
48705 |
|
48706 |
-
/* Styles applied to the `listbox` component. */
|
48707 |
-
listbox: {
|
48708 |
-
listStyle: 'none',
|
48709 |
-
margin: 0,
|
48710 |
-
padding: '8px 0',
|
48711 |
-
maxHeight: '40vh',
|
48712 |
-
overflow: 'auto'
|
48713 |
-
},
|
48714 |
|
48715 |
-
/* Styles applied to the loading wrapper. */
|
48716 |
-
loading: {
|
48717 |
-
color: theme.palette.text.secondary,
|
48718 |
-
padding: '14px 16px'
|
48719 |
-
},
|
48720 |
|
48721 |
-
/* Styles applied to the no option wrapper. */
|
48722 |
-
noOptions: {
|
48723 |
-
color: theme.palette.text.secondary,
|
48724 |
-
padding: '14px 16px'
|
48725 |
-
},
|
48726 |
|
48727 |
-
|
48728 |
-
|
48729 |
-
|
48730 |
-
|
48731 |
-
|
48732 |
-
|
48733 |
-
|
48734 |
-
|
48735 |
-
|
48736 |
-
|
48737 |
-
|
48738 |
-
paddingBottom: 6,
|
48739 |
-
paddingLeft: 16,
|
48740 |
-
paddingRight: 16
|
48741 |
-
}, (0,defineProperty/* default */.Z)(_option, theme.breakpoints.up('sm'), {
|
48742 |
-
minHeight: 'auto'
|
48743 |
-
}), (0,defineProperty/* default */.Z)(_option, '&[aria-selected="true"]', {
|
48744 |
-
backgroundColor: theme.palette.action.selected
|
48745 |
-
}), (0,defineProperty/* default */.Z)(_option, '&[data-focus="true"]', {
|
48746 |
-
backgroundColor: theme.palette.action.hover
|
48747 |
-
}), (0,defineProperty/* default */.Z)(_option, '&:active', {
|
48748 |
-
backgroundColor: theme.palette.action.selected
|
48749 |
-
}), (0,defineProperty/* default */.Z)(_option, '&[aria-disabled="true"]', {
|
48750 |
-
opacity: theme.palette.action.disabledOpacity,
|
48751 |
-
pointerEvents: 'none'
|
48752 |
-
}), _option),
|
48753 |
|
48754 |
-
|
48755 |
-
|
48756 |
-
|
48757 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48758 |
},
|
48759 |
-
|
48760 |
-
|
48761 |
-
|
48762 |
-
|
48763 |
-
|
48764 |
-
|
48765 |
-
|
|
|
|
|
|
|
|
|
48766 |
}
|
48767 |
-
}
|
48768 |
-
|
48769 |
-
|
48770 |
-
|
48771 |
-
|
48772 |
-
|
48773 |
-
|
48774 |
-
|
48775 |
-
|
48776 |
-
|
48777 |
-
}
|
48778 |
-
|
48779 |
-
var Autocomplete_ref = /*#__PURE__*/react.createElement(Close, {
|
48780 |
-
fontSize: "small"
|
48781 |
-
});
|
48782 |
-
|
48783 |
-
var Autocomplete_ref2 = /*#__PURE__*/react.createElement(svg_icons_ArrowDropDown, null);
|
48784 |
-
|
48785 |
-
var Autocomplete = /*#__PURE__*/react.forwardRef(function Autocomplete(props, ref) {
|
48786 |
-
/* eslint-disable no-unused-vars */
|
48787 |
-
var _props$autoComplete = props.autoComplete,
|
48788 |
-
autoComplete = _props$autoComplete === void 0 ? false : _props$autoComplete,
|
48789 |
-
_props$autoHighlight = props.autoHighlight,
|
48790 |
-
autoHighlight = _props$autoHighlight === void 0 ? false : _props$autoHighlight,
|
48791 |
-
_props$autoSelect = props.autoSelect,
|
48792 |
-
autoSelect = _props$autoSelect === void 0 ? false : _props$autoSelect,
|
48793 |
-
_props$blurOnSelect = props.blurOnSelect,
|
48794 |
-
blurOnSelect = _props$blurOnSelect === void 0 ? false : _props$blurOnSelect,
|
48795 |
-
ChipProps = props.ChipProps,
|
48796 |
-
classes = props.classes,
|
48797 |
-
className = props.className,
|
48798 |
-
_props$clearOnBlur = props.clearOnBlur,
|
48799 |
-
clearOnBlur = _props$clearOnBlur === void 0 ? !props.freeSolo : _props$clearOnBlur,
|
48800 |
-
_props$clearOnEscape = props.clearOnEscape,
|
48801 |
-
clearOnEscape = _props$clearOnEscape === void 0 ? false : _props$clearOnEscape,
|
48802 |
-
_props$clearText = props.clearText,
|
48803 |
-
clearText = _props$clearText === void 0 ? 'Clear' : _props$clearText,
|
48804 |
-
_props$closeIcon = props.closeIcon,
|
48805 |
-
closeIcon = _props$closeIcon === void 0 ? Autocomplete_ref : _props$closeIcon,
|
48806 |
-
_props$closeText = props.closeText,
|
48807 |
-
closeText = _props$closeText === void 0 ? 'Close' : _props$closeText,
|
48808 |
-
_props$debug = props.debug,
|
48809 |
-
debug = _props$debug === void 0 ? false : _props$debug,
|
48810 |
-
_props$defaultValue = props.defaultValue,
|
48811 |
-
defaultValue = _props$defaultValue === void 0 ? props.multiple ? [] : null : _props$defaultValue,
|
48812 |
-
_props$disableClearab = props.disableClearable,
|
48813 |
-
disableClearable = _props$disableClearab === void 0 ? false : _props$disableClearab,
|
48814 |
-
_props$disableCloseOn = props.disableCloseOnSelect,
|
48815 |
-
disableCloseOnSelect = _props$disableCloseOn === void 0 ? false : _props$disableCloseOn,
|
48816 |
-
_props$disabled = props.disabled,
|
48817 |
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
48818 |
-
_props$disabledItemsF = props.disabledItemsFocusable,
|
48819 |
-
disabledItemsFocusable = _props$disabledItemsF === void 0 ? false : _props$disabledItemsF,
|
48820 |
-
_props$disableListWra = props.disableListWrap,
|
48821 |
-
disableListWrap = _props$disableListWra === void 0 ? false : _props$disableListWra,
|
48822 |
-
_props$disablePortal = props.disablePortal,
|
48823 |
-
disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,
|
48824 |
-
filterOptions = props.filterOptions,
|
48825 |
-
_props$filterSelected = props.filterSelectedOptions,
|
48826 |
-
filterSelectedOptions = _props$filterSelected === void 0 ? false : _props$filterSelected,
|
48827 |
-
_props$forcePopupIcon = props.forcePopupIcon,
|
48828 |
-
forcePopupIcon = _props$forcePopupIcon === void 0 ? 'auto' : _props$forcePopupIcon,
|
48829 |
-
_props$freeSolo = props.freeSolo,
|
48830 |
-
freeSolo = _props$freeSolo === void 0 ? false : _props$freeSolo,
|
48831 |
-
_props$fullWidth = props.fullWidth,
|
48832 |
-
fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,
|
48833 |
-
_props$getLimitTagsTe = props.getLimitTagsText,
|
48834 |
-
getLimitTagsText = _props$getLimitTagsTe === void 0 ? function (more) {
|
48835 |
-
return "+".concat(more);
|
48836 |
-
} : _props$getLimitTagsTe,
|
48837 |
-
getOptionDisabled = props.getOptionDisabled,
|
48838 |
-
_props$getOptionLabel = props.getOptionLabel,
|
48839 |
-
getOptionLabel = _props$getOptionLabel === void 0 ? function (x) {
|
48840 |
-
return x;
|
48841 |
-
} : _props$getOptionLabel,
|
48842 |
-
getOptionSelected = props.getOptionSelected,
|
48843 |
-
groupBy = props.groupBy,
|
48844 |
-
_props$handleHomeEndK = props.handleHomeEndKeys,
|
48845 |
-
handleHomeEndKeys = _props$handleHomeEndK === void 0 ? !props.freeSolo : _props$handleHomeEndK,
|
48846 |
-
idProp = props.id,
|
48847 |
-
_props$includeInputIn = props.includeInputInList,
|
48848 |
-
includeInputInList = _props$includeInputIn === void 0 ? false : _props$includeInputIn,
|
48849 |
-
inputValueProp = props.inputValue,
|
48850 |
-
_props$limitTags = props.limitTags,
|
48851 |
-
limitTags = _props$limitTags === void 0 ? -1 : _props$limitTags,
|
48852 |
-
_props$ListboxCompone = props.ListboxComponent,
|
48853 |
-
ListboxComponent = _props$ListboxCompone === void 0 ? 'ul' : _props$ListboxCompone,
|
48854 |
-
ListboxProps = props.ListboxProps,
|
48855 |
-
_props$loading = props.loading,
|
48856 |
-
loading = _props$loading === void 0 ? false : _props$loading,
|
48857 |
-
_props$loadingText = props.loadingText,
|
48858 |
-
loadingText = _props$loadingText === void 0 ? 'Loading…' : _props$loadingText,
|
48859 |
-
_props$multiple = props.multiple,
|
48860 |
-
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
48861 |
-
_props$noOptionsText = props.noOptionsText,
|
48862 |
-
noOptionsText = _props$noOptionsText === void 0 ? 'No options' : _props$noOptionsText,
|
48863 |
-
onChange = props.onChange,
|
48864 |
-
onClose = props.onClose,
|
48865 |
-
onHighlightChange = props.onHighlightChange,
|
48866 |
-
onInputChange = props.onInputChange,
|
48867 |
-
onOpen = props.onOpen,
|
48868 |
-
open = props.open,
|
48869 |
-
_props$openOnFocus = props.openOnFocus,
|
48870 |
-
openOnFocus = _props$openOnFocus === void 0 ? false : _props$openOnFocus,
|
48871 |
-
_props$openText = props.openText,
|
48872 |
-
openText = _props$openText === void 0 ? 'Open' : _props$openText,
|
48873 |
-
options = props.options,
|
48874 |
-
_props$PaperComponent = props.PaperComponent,
|
48875 |
-
PaperComponent = _props$PaperComponent === void 0 ? Paper_Paper : _props$PaperComponent,
|
48876 |
-
_props$PopperComponen = props.PopperComponent,
|
48877 |
-
PopperComponentProp = _props$PopperComponen === void 0 ? esm_Popper_Popper : _props$PopperComponen,
|
48878 |
-
_props$popupIcon = props.popupIcon,
|
48879 |
-
popupIcon = _props$popupIcon === void 0 ? Autocomplete_ref2 : _props$popupIcon,
|
48880 |
-
renderGroupProp = props.renderGroup,
|
48881 |
-
renderInput = props.renderInput,
|
48882 |
-
renderOptionProp = props.renderOption,
|
48883 |
-
renderTags = props.renderTags,
|
48884 |
-
_props$selectOnFocus = props.selectOnFocus,
|
48885 |
-
selectOnFocus = _props$selectOnFocus === void 0 ? !props.freeSolo : _props$selectOnFocus,
|
48886 |
-
_props$size = props.size,
|
48887 |
-
size = _props$size === void 0 ? 'medium' : _props$size,
|
48888 |
-
valueProp = props.value,
|
48889 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "classes", "className", "clearOnBlur", "clearOnEscape", "clearText", "closeIcon", "closeText", "debug", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "getOptionSelected", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "value"]);
|
48890 |
-
/* eslint-enable no-unused-vars */
|
48891 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48892 |
|
48893 |
-
|
48894 |
|
48895 |
-
|
48896 |
-
componentName: 'Autocomplete'
|
48897 |
-
})),
|
48898 |
-
getRootProps = _useAutocomplete.getRootProps,
|
48899 |
-
getInputProps = _useAutocomplete.getInputProps,
|
48900 |
-
getInputLabelProps = _useAutocomplete.getInputLabelProps,
|
48901 |
-
getPopupIndicatorProps = _useAutocomplete.getPopupIndicatorProps,
|
48902 |
-
getClearProps = _useAutocomplete.getClearProps,
|
48903 |
-
getTagProps = _useAutocomplete.getTagProps,
|
48904 |
-
getListboxProps = _useAutocomplete.getListboxProps,
|
48905 |
-
getOptionProps = _useAutocomplete.getOptionProps,
|
48906 |
-
value = _useAutocomplete.value,
|
48907 |
-
dirty = _useAutocomplete.dirty,
|
48908 |
-
id = _useAutocomplete.id,
|
48909 |
-
popupOpen = _useAutocomplete.popupOpen,
|
48910 |
-
focused = _useAutocomplete.focused,
|
48911 |
-
focusedTag = _useAutocomplete.focusedTag,
|
48912 |
-
anchorEl = _useAutocomplete.anchorEl,
|
48913 |
-
setAnchorEl = _useAutocomplete.setAnchorEl,
|
48914 |
-
inputValue = _useAutocomplete.inputValue,
|
48915 |
-
groupedOptions = _useAutocomplete.groupedOptions;
|
48916 |
|
48917 |
-
|
48918 |
|
48919 |
-
|
48920 |
-
var getCustomizedTagProps = function getCustomizedTagProps(params) {
|
48921 |
-
return (0,esm_extends/* default */.Z)({
|
48922 |
-
className: (0,clsx_m/* default */.Z)(classes.tag, size === 'small' && classes.tagSizeSmall),
|
48923 |
-
disabled: disabled
|
48924 |
-
}, getTagProps(params));
|
48925 |
-
};
|
48926 |
|
48927 |
-
|
48928 |
-
startAdornment = renderTags(value, getCustomizedTagProps);
|
48929 |
-
} else {
|
48930 |
-
startAdornment = value.map(function (option, index) {
|
48931 |
-
return /*#__PURE__*/react.createElement(Chip_Chip, (0,esm_extends/* default */.Z)({
|
48932 |
-
label: getOptionLabel(option),
|
48933 |
-
size: size
|
48934 |
-
}, getCustomizedTagProps({
|
48935 |
-
index: index
|
48936 |
-
}), ChipProps));
|
48937 |
-
});
|
48938 |
-
}
|
48939 |
-
}
|
48940 |
|
48941 |
-
if (limitTags > -1 && Array.isArray(startAdornment)) {
|
48942 |
-
var more = startAdornment.length - limitTags;
|
48943 |
|
48944 |
-
if (!focused && more > 0) {
|
48945 |
-
startAdornment = startAdornment.splice(0, limitTags);
|
48946 |
-
startAdornment.push( /*#__PURE__*/react.createElement("span", {
|
48947 |
-
className: classes.tag,
|
48948 |
-
key: startAdornment.length
|
48949 |
-
}, getLimitTagsText(more)));
|
48950 |
-
}
|
48951 |
-
}
|
48952 |
|
48953 |
-
var defaultRenderGroup = function defaultRenderGroup(params) {
|
48954 |
-
return /*#__PURE__*/react.createElement("li", {
|
48955 |
-
key: params.key
|
48956 |
-
}, /*#__PURE__*/react.createElement(ListSubheader_ListSubheader, {
|
48957 |
-
className: classes.groupLabel,
|
48958 |
-
component: "div"
|
48959 |
-
}, params.group), /*#__PURE__*/react.createElement("ul", {
|
48960 |
-
className: classes.groupUl
|
48961 |
-
}, params.children));
|
48962 |
-
};
|
48963 |
|
48964 |
-
var renderGroup = renderGroupProp || defaultRenderGroup;
|
48965 |
-
var renderOption = renderOptionProp || getOptionLabel;
|
48966 |
|
48967 |
-
|
48968 |
-
|
48969 |
-
|
48970 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48971 |
});
|
48972 |
-
return
|
48973 |
-
|
48974 |
-
|
48975 |
-
|
48976 |
-
|
48977 |
-
|
|
|
|
|
48978 |
};
|
48979 |
|
48980 |
-
|
48981 |
-
|
48982 |
-
|
48983 |
-
|
48984 |
-
|
48985 |
-
|
48986 |
-
|
48987 |
-
|
48988 |
-
|
48989 |
-
|
48990 |
-
|
48991 |
-
|
48992 |
-
|
48993 |
-
|
48994 |
-
|
48995 |
-
|
48996 |
-
|
48997 |
-
|
48998 |
-
|
48999 |
-
|
49000 |
-
|
49001 |
-
|
49002 |
-
|
49003 |
-
"aria-label": popupOpen ? closeText : openText,
|
49004 |
-
title: popupOpen ? closeText : openText,
|
49005 |
-
className: (0,clsx_m/* default */.Z)(classes.popupIndicator, popupOpen && classes.popupIndicatorOpen)
|
49006 |
-
}), popupIcon) : null)
|
49007 |
},
|
49008 |
-
|
49009 |
-
|
49010 |
-
|
49011 |
-
|
49012 |
-
|
49013 |
-
|
49014 |
style: {
|
49015 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49016 |
},
|
49017 |
-
|
49018 |
-
|
49019 |
-
|
49020 |
-
|
49021 |
-
|
49022 |
-
|
49023 |
-
|
49024 |
-
|
49025 |
-
|
49026 |
-
|
49027 |
-
|
49028 |
-
|
49029 |
-
|
49030 |
-
|
49031 |
-
|
49032 |
-
|
49033 |
-
|
49034 |
-
|
49035 |
-
|
49036 |
-
|
|
|
49037 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
49038 |
|
49039 |
-
|
49040 |
-
|
49041 |
-
|
49042 |
-
|
49043 |
-
|
49044 |
-
name: 'MuiAutocomplete'
|
49045 |
-
})(Autocomplete));
|
49046 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/ButtonActionRelAttributes/ButtonActionRelAttributes.js
|
49047 |
function ButtonActionRelAttributes_extends() { ButtonActionRelAttributes_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonActionRelAttributes_extends.apply(this, arguments); }
|
49048 |
|
@@ -49957,152 +51299,6 @@ function ButtonActionValue(_ref) {
|
|
49957 |
button: buttons[id]
|
49958 |
}, props);
|
49959 |
})(ButtonActionValue));
|
49960 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionOptions.js
|
49961 |
-
function ButtonActionOptions_toConsumableArray(arr) { return ButtonActionOptions_arrayWithoutHoles(arr) || ButtonActionOptions_iterableToArray(arr) || ButtonActionOptions_unsupportedIterableToArray(arr) || ButtonActionOptions_nonIterableSpread(); }
|
49962 |
-
|
49963 |
-
function ButtonActionOptions_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
49964 |
-
|
49965 |
-
function ButtonActionOptions_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ButtonActionOptions_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ButtonActionOptions_arrayLikeToArray(o, minLen); }
|
49966 |
-
|
49967 |
-
function ButtonActionOptions_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
49968 |
-
|
49969 |
-
function ButtonActionOptions_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return ButtonActionOptions_arrayLikeToArray(arr); }
|
49970 |
-
|
49971 |
-
function ButtonActionOptions_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
49972 |
-
|
49973 |
-
function ButtonActionOptions_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
49974 |
-
|
49975 |
-
function ButtonActionOptions_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ButtonActionOptions_ownKeys(Object(source), true).forEach(function (key) { ButtonActionOptions_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ButtonActionOptions_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
49976 |
-
|
49977 |
-
function ButtonActionOptions_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
49978 |
-
|
49979 |
-
|
49980 |
-
var popular = [{
|
49981 |
-
value: "url",
|
49982 |
-
label: translate("settings.button_action.actions.url.name")
|
49983 |
-
}, {
|
49984 |
-
value: "page",
|
49985 |
-
label: translate("settings.button_action.actions.page.name")
|
49986 |
-
}, {
|
49987 |
-
value: "phone",
|
49988 |
-
label: translate("settings.button_action.actions.phone_number.name")
|
49989 |
-
}, {
|
49990 |
-
value: "mail",
|
49991 |
-
label: translate("settings.button_action.actions.mail.name")
|
49992 |
-
}, {
|
49993 |
-
value: "whatsapp",
|
49994 |
-
label: translate("settings.button_action.actions.whatsapp_chat")
|
49995 |
-
}, {
|
49996 |
-
value: "backtotop",
|
49997 |
-
label: translate("settings.button_action.actions.back_to_top")
|
49998 |
-
}, {
|
49999 |
-
value: "gotobottom",
|
50000 |
-
label: translate("settings.button_action.actions.go_to_bottom")
|
50001 |
-
}, {
|
50002 |
-
value: "gobackpage",
|
50003 |
-
label: translate("settings.button_action.actions.go_back_one_page")
|
50004 |
-
}, {
|
50005 |
-
value: "javascript_pro",
|
50006 |
-
label: translate("settings.button_action.actions.javascript.name"),
|
50007 |
-
isPro: true
|
50008 |
-
}, {
|
50009 |
-
value: "socialsharing",
|
50010 |
-
label: translate("settings.button_action.actions.social_sharing.social_sharing")
|
50011 |
-
}].map(function (obj) {
|
50012 |
-
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
50013 |
-
group: "popular"
|
50014 |
-
});
|
50015 |
-
});
|
50016 |
-
var chat = [{
|
50017 |
-
value: "sms",
|
50018 |
-
label: translate("settings.button_action.actions.chat.sms")
|
50019 |
-
}, {
|
50020 |
-
value: "messenger_chat",
|
50021 |
-
label: translate("settings.button_action.actions.chat.messenger_chat")
|
50022 |
-
}, {
|
50023 |
-
value: "messenger",
|
50024 |
-
label: translate("settings.button_action.actions.chat.messenger_link")
|
50025 |
-
}, {
|
50026 |
-
value: "twitter_dm",
|
50027 |
-
label: translate("settings.button_action.actions.chat.twitter_dm")
|
50028 |
-
}, {
|
50029 |
-
value: "skype",
|
50030 |
-
label: translate("settings.button_action.actions.chat.skype")
|
50031 |
-
}, {
|
50032 |
-
value: "line",
|
50033 |
-
label: translate("settings.button_action.actions.chat.line")
|
50034 |
-
}, {
|
50035 |
-
value: "telegram",
|
50036 |
-
label: translate("settings.button_action.actions.chat.telegram")
|
50037 |
-
}, {
|
50038 |
-
value: "viber",
|
50039 |
-
label: translate("settings.button_action.actions.chat.viber")
|
50040 |
-
}, {
|
50041 |
-
value: "signal_group",
|
50042 |
-
label: translate("settings.button_action.actions.chat.signal_group")
|
50043 |
-
}].map(function (obj) {
|
50044 |
-
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
50045 |
-
group: "chat"
|
50046 |
-
});
|
50047 |
-
});
|
50048 |
-
var socialMedia = [{
|
50049 |
-
value: "facebook",
|
50050 |
-
label: translate("settings.button_action.actions.social_media.facebook")
|
50051 |
-
}, {
|
50052 |
-
value: "twitter",
|
50053 |
-
label: translate("settings.button_action.actions.social_media.twitter")
|
50054 |
-
}, {
|
50055 |
-
value: "instagram",
|
50056 |
-
label: translate("settings.button_action.actions.social_media.instagram")
|
50057 |
-
}, {
|
50058 |
-
value: "snapchat",
|
50059 |
-
label: translate("settings.button_action.actions.social_media.snapchat")
|
50060 |
-
}, {
|
50061 |
-
value: "linkedin",
|
50062 |
-
label: translate("settings.button_action.actions.social_media.linkedin")
|
50063 |
-
}, {
|
50064 |
-
value: "vk",
|
50065 |
-
label: translate("settings.button_action.actions.social_media.vk")
|
50066 |
-
}, {
|
50067 |
-
value: "waze",
|
50068 |
-
label: translate("settings.button_action.actions.social_media.waze")
|
50069 |
-
}].map(function (obj) {
|
50070 |
-
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
50071 |
-
group: "social_media"
|
50072 |
-
});
|
50073 |
-
});
|
50074 |
-
var popup = [{
|
50075 |
-
value: "poptin",
|
50076 |
-
label: "Poptin"
|
50077 |
-
}, {
|
50078 |
-
value: "elementor_popup",
|
50079 |
-
label: "Elementor Popup"
|
50080 |
-
}, {
|
50081 |
-
value: "popup_maker",
|
50082 |
-
label: "Popup Maker"
|
50083 |
-
}, {
|
50084 |
-
value: "popups",
|
50085 |
-
label: "Popups - WordPress Popup"
|
50086 |
-
}, {
|
50087 |
-
value: "wppopups",
|
50088 |
-
label: "WP Popups - WordPress Popup builder"
|
50089 |
-
}].map(function (obj) {
|
50090 |
-
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
50091 |
-
group: "popup"
|
50092 |
-
});
|
50093 |
-
});
|
50094 |
-
var other = [{
|
50095 |
-
value: "clipboard",
|
50096 |
-
label: translate("settings.button_action.actions.clipboard")
|
50097 |
-
}, {
|
50098 |
-
value: "print",
|
50099 |
-
label: translate("settings.button_action.actions.print_page")
|
50100 |
-
}].map(function (obj) {
|
50101 |
-
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
50102 |
-
group: "actions"
|
50103 |
-
});
|
50104 |
-
});
|
50105 |
-
/* harmony default export */ var ButtonActionOptions = ([].concat(ButtonActionOptions_toConsumableArray(popular), ButtonActionOptions_toConsumableArray(chat), ButtonActionOptions_toConsumableArray(socialMedia), ButtonActionOptions_toConsumableArray(popup), ButtonActionOptions_toConsumableArray(other)));
|
50106 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonAction.js
|
50107 |
function ButtonAction_extends() { ButtonAction_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonAction_extends.apply(this, arguments); }
|
50108 |
|
@@ -50215,10 +51411,13 @@ function ButtonAction(_ref) {
|
|
50215 |
_onChange("type", newValue.value);
|
50216 |
},
|
50217 |
getOptionLabel: function getOptionLabel(option) {
|
50218 |
-
|
|
|
|
|
50219 |
},
|
50220 |
getOptionDisabled: function getOptionDisabled(option) {
|
50221 |
-
|
|
|
50222 |
},
|
50223 |
groupBy: function groupBy(option) {
|
50224 |
return translate("settings.button_action.actions.group_".concat(option.group));
|
@@ -50252,21 +51451,36 @@ var defaults_default = /*#__PURE__*/__webpack_require__.n(lodash_defaults);
|
|
50252 |
|
50253 |
|
50254 |
|
50255 |
-
|
50256 |
-
|
50257 |
-
*
|
50258 |
-
* @param {
|
50259 |
-
* @param {
|
50260 |
-
* @param {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50261 |
*/
|
50262 |
|
50263 |
function _get(key, record) {
|
50264 |
var menu_style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "default";
|
50265 |
var model = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
50266 |
-
|
50267 |
-
var
|
50268 |
-
|
50269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50270 |
|
50271 |
if (typeof record === "undefined" || typeof key === "undefined") {
|
50272 |
console.log("record: " + record);
|
@@ -50274,27 +51488,41 @@ function _get(key, record) {
|
|
50274 |
throw TypeError("'record' argument or 'key' argument of type undefined");
|
50275 |
}
|
50276 |
|
50277 |
-
var value = record[key]; // When not in formatted list, don't format.
|
50278 |
|
50279 |
if (!buttonizer_defaults_default().formatted.includes(key)) {
|
50280 |
// value == null will be true also if value == undefined, because undefined == null
|
50281 |
if (value == null) {
|
50282 |
// Get default
|
50283 |
-
return !
|
50284 |
}
|
50285 |
|
50286 |
return value;
|
50287 |
}
|
50288 |
|
50289 |
-
var parentValue =
|
50290 |
|
50291 |
-
if (value == null) return
|
|
|
|
|
|
|
|
|
|
|
50292 |
var result = formats.normal_hover.parse(value);
|
50293 |
-
return model ? _defs(model, key, menu_style, result, parentValue,
|
|
|
|
|
|
|
|
|
|
|
50294 |
}
|
|
|
|
|
|
|
|
|
50295 |
function _def(model, key) {
|
50296 |
var menu_style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "default";
|
50297 |
-
var
|
50298 |
var def = merge_default()({}, (buttonizer_defaults_default()), (buttonizer_defaults_default()).menuStyle[menu_style]);
|
50299 |
|
50300 |
if (!Object.keys(def).includes(model)) {
|
@@ -50305,10 +51533,15 @@ function _def(model, key) {
|
|
50305 |
if (!Object.keys(def[model]).includes(key)) {
|
50306 |
if (false) {}
|
50307 |
return "";
|
50308 |
-
}
|
|
|
50309 |
|
50310 |
-
return def[model][key] == null ?
|
50311 |
}
|
|
|
|
|
|
|
|
|
50312 |
function _defs(model, key) {
|
50313 |
var menu_style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "default";
|
50314 |
var self = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
@@ -50335,11 +51568,15 @@ function mergeGroupDefaults() {
|
|
50335 |
var self = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
50336 |
var def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
50337 |
|
50338 |
-
var
|
50339 |
-
|
50340 |
-
excludeSelf =
|
|
|
|
|
|
|
|
|
50341 |
|
50342 |
-
var arr = [self,
|
50343 |
if (excludeSelf) arr.shift(); // exclude 'self'
|
50344 |
|
50345 |
return defaults_default().apply(void 0, arr);
|
@@ -50350,11 +51587,17 @@ function mergeButtonDefaults() {
|
|
50350 |
var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
50351 |
var def = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
50352 |
|
50353 |
-
var
|
50354 |
-
|
50355 |
-
excludeSelf =
|
50356 |
-
|
50357 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
50358 |
if (excludeSelf) arr.shift(); // remove 'self'
|
50359 |
|
50360 |
return defaults_default().apply(void 0, arr);
|
@@ -50420,7 +51663,9 @@ function Options(_ref) {
|
|
50420 |
}, /*#__PURE__*/react.createElement("div", {
|
50421 |
className: "setting-group-title"
|
50422 |
}, translate("settings.button_action.title")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(ButtonAction, {
|
50423 |
-
actionType: get("type",
|
|
|
|
|
50424 |
id: get("id"),
|
50425 |
onChange: function onChange(type, val) {
|
50426 |
return set(type, val);
|
@@ -50477,12 +51722,17 @@ function Options(_ref) {
|
|
50477 |
set: function set(key, value) {
|
50478 |
return _set(models.BUTTON, buttonId, key, value);
|
50479 |
},
|
50480 |
-
setParent: function setParent(key, value) {
|
50481 |
-
return _set(models.GROUP, group.id, key, value);
|
50482 |
-
},
|
50483 |
get: function get(key) {
|
50484 |
-
var
|
50485 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50486 |
}
|
50487 |
}, props);
|
50488 |
})(Options));
|
@@ -59215,12 +60465,12 @@ function baseMap(collection, iteratee) {
|
|
59215 |
* _.map(users, 'user');
|
59216 |
* // => ['barney', 'fred']
|
59217 |
*/
|
59218 |
-
function
|
59219 |
var func = lodash_es_isArray(collection) ? _arrayMap : _baseMap;
|
59220 |
return func(collection, _baseIteratee(iteratee, 3));
|
59221 |
}
|
59222 |
|
59223 |
-
/* harmony default export */ var lodash_es_map = (
|
59224 |
|
59225 |
;// CONCATENATED MODULE: ./node_modules/react-color/es/components/block/BlockSwatches.js
|
59226 |
|
@@ -63622,6 +64872,8 @@ function ColorPicker_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
63622 |
|
63623 |
|
63624 |
|
|
|
|
|
63625 |
var initialColor = "rgb(238, 241, 11)";
|
63626 |
|
63627 |
var makePalette = function makePalette() {
|
@@ -63651,9 +64903,12 @@ function ColorPicker(_ref) {
|
|
63651 |
_ref$noGradient = _ref.noGradient,
|
63652 |
noGradient = _ref$noGradient === void 0 ? false : _ref$noGradient,
|
63653 |
_ref$className = _ref.className,
|
63654 |
-
className = _ref$className === void 0 ? null : _ref$className
|
|
|
|
|
|
|
|
|
63655 |
|
63656 |
-
// console.log("reloading components");
|
63657 |
var _useState = (0,react.useState)(null),
|
63658 |
_useState2 = ColorPicker_slicedToArray(_useState, 2),
|
63659 |
currentRef = _useState2[0],
|
@@ -63682,7 +64937,7 @@ function ColorPicker(_ref) {
|
|
63682 |
_useState10 = ColorPicker_slicedToArray(_useState9, 2),
|
63683 |
palette = _useState10[0],
|
63684 |
setPalette = _useState10[1],
|
63685 |
-
_useState11 = (0,react.useState)(app.hasPremium() ? getColorType(value === "" ? defaultValue : value) : "solid"),
|
63686 |
_useState12 = ColorPicker_slicedToArray(_useState11, 2),
|
63687 |
colorType = _useState12[0],
|
63688 |
setColorType = _useState12[1];
|
@@ -63697,7 +64952,7 @@ function ColorPicker(_ref) {
|
|
63697 |
}, [swatches]);
|
63698 |
(0,react.useEffect)(function () {
|
63699 |
var parsedValues = value === "" ? getPaletteAngle(defaultValue) : getPaletteAngle(value);
|
63700 |
-
setColorType(app.hasPremium() ? getColorType(value === "" ? defaultValue : value) : "solid");
|
63701 |
setPalette(parsedValues.palette);
|
63702 |
setAngle(parsedValues.angle);
|
63703 |
}, [value, defaultValue]);
|
@@ -63733,87 +64988,83 @@ function ColorPicker(_ref) {
|
|
63733 |
onChange(getPreview(newPalette, angle, newType).background);
|
63734 |
};
|
63735 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63736 |
return /*#__PURE__*/react.createElement("div", {
|
63737 |
onClick: function onClick(e) {
|
63738 |
if (currentRef === null) {
|
63739 |
setCurrentRef(e.currentTarget);
|
63740 |
}
|
63741 |
}
|
63742 |
-
}, /*#__PURE__*/react.createElement(SettingsContainer, {
|
63743 |
title: title,
|
|
|
63744 |
className: className
|
63745 |
-
}
|
63746 |
-
className: "color-picker-main "
|
63747 |
-
}, /*#__PURE__*/react.createElement("div", {
|
63748 |
-
className: "color-picker"
|
63749 |
-
}, /*#__PURE__*/react.createElement(ColorPicker_ColorPickerPopover, {
|
63750 |
-
open: open,
|
63751 |
-
setOpen: setOpen,
|
63752 |
-
angle: angle,
|
63753 |
-
setAngle: handleAngleChange,
|
63754 |
-
showAnglePicker: true,
|
63755 |
-
width: 300,
|
63756 |
-
maxStops: 3,
|
63757 |
-
paletteHeight: 32,
|
63758 |
-
palette: palette,
|
63759 |
-
colorType: colorType,
|
63760 |
-
setColorType: handleColorTypeChange,
|
63761 |
-
currentRef: currentRef,
|
63762 |
-
noGradient: noGradient,
|
63763 |
-
onPaletteChange: handlePaletteChange,
|
63764 |
-
trigger: function trigger() {
|
63765 |
-
return /*#__PURE__*/react.createElement("span", {
|
63766 |
-
onClick: function onClick() {
|
63767 |
-
return setOpen(true);
|
63768 |
-
},
|
63769 |
-
className: "color-preview",
|
63770 |
-
"data-testid": "color-picker-preview-span",
|
63771 |
-
style: {
|
63772 |
-
background: value == "" ? defaultValue : value
|
63773 |
-
}
|
63774 |
-
});
|
63775 |
-
}
|
63776 |
-
}, /*#__PURE__*/react.createElement(ColorPickerContainer, {
|
63777 |
-
wrapped: colorType !== "solid",
|
63778 |
-
onChange: function onChange(c) {
|
63779 |
-
var _c$rgb = c.rgb,
|
63780 |
-
r = _c$rgb.r,
|
63781 |
-
g = _c$rgb.g,
|
63782 |
-
b = _c$rgb.b,
|
63783 |
-
a = _c$rgb.a;
|
63784 |
-
handlePaletteChange("rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(a, ")"));
|
63785 |
-
},
|
63786 |
-
swatches: swatches,
|
63787 |
-
setSwatches: setSwatches,
|
63788 |
-
color: palette
|
63789 |
-
})), /*#__PURE__*/react.createElement(Button_Button, {
|
63790 |
-
className: "color-button",
|
63791 |
-
variant: "contained",
|
63792 |
-
size: "small",
|
63793 |
-
onClick: function onClick() {
|
63794 |
-
return setOpen(true);
|
63795 |
-
},
|
63796 |
-
color: "primary",
|
63797 |
-
disabled: disabled,
|
63798 |
-
"data-testid": "setting:color-picker-open"
|
63799 |
-
}, /*#__PURE__*/react.createElement("i", {
|
63800 |
-
className: "fas fa-palette"
|
63801 |
-
}))), trashButton ? /*#__PURE__*/react.createElement(IconButton_IconButton, {
|
63802 |
-
onClick: function onClick() {
|
63803 |
-
onChange("unset");
|
63804 |
-
setOpen(false);
|
63805 |
-
},
|
63806 |
-
disabled: !value,
|
63807 |
-
size: "small",
|
63808 |
-
style: {
|
63809 |
-
fontSize: "1rem",
|
63810 |
-
marginLeft: "5px"
|
63811 |
-
},
|
63812 |
-
color: "primary"
|
63813 |
-
}, /*#__PURE__*/react.createElement(Icon_Icon, {
|
63814 |
-
fontSize: "inherit",
|
63815 |
-
className: "fas fa-trash"
|
63816 |
-
})) : null)));
|
63817 |
}
|
63818 |
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Slider/ValueLabel.js
|
63819 |
|
@@ -64896,6 +66147,7 @@ function SliderContainer_objectWithoutPropertiesLoose(source, excluded) { if (so
|
|
64896 |
|
64897 |
|
64898 |
|
|
|
64899 |
function SliderContainer(_ref) {
|
64900 |
var _ref$title = _ref.title,
|
64901 |
title = _ref$title === void 0 ? "" : _ref$title,
|
@@ -65014,24 +66266,15 @@ function SliderContainer(_ref) {
|
|
65014 |
"data-testid": "slider-input",
|
65015 |
"aria-labelledby": "input-slider"
|
65016 |
}
|
65017 |
-
}), trashButton ? /*#__PURE__*/react.createElement(
|
65018 |
disabled: sliderDisabled,
|
65019 |
onClick: function onClick() {
|
65020 |
setSliderValue("");
|
65021 |
onChange("unset");
|
65022 |
setSliderDisabled(true);
|
65023 |
},
|
65024 |
-
"data-testid": "delete"
|
65025 |
-
|
65026 |
-
style: {
|
65027 |
-
fontSize: "1rem",
|
65028 |
-
marginLeft: "5px"
|
65029 |
-
},
|
65030 |
-
color: "primary"
|
65031 |
-
}, /*#__PURE__*/react.createElement(Icon_Icon, {
|
65032 |
-
fontSize: "inherit",
|
65033 |
-
className: "fas fa-trash"
|
65034 |
-
})) : null);
|
65035 |
}
|
65036 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ImageBorderRadius/ImageBorderRadius.js
|
65037 |
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
@@ -65049,18 +66292,18 @@ function IconImageBorderRadius(_ref) {
|
|
65049 |
|
65050 |
return imageRadius();
|
65051 |
}
|
65052 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/
|
65053 |
-
function
|
65054 |
|
65055 |
-
function
|
65056 |
|
65057 |
-
function
|
65058 |
|
65059 |
-
function
|
65060 |
|
65061 |
-
function
|
65062 |
|
65063 |
-
function
|
65064 |
|
65065 |
|
65066 |
|
@@ -65068,54 +66311,97 @@ function IconOrImage_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
65068 |
|
65069 |
|
65070 |
|
65071 |
-
function
|
65072 |
-
var
|
65073 |
_ref$value = _ref.value,
|
65074 |
value = _ref$value === void 0 ? false : _ref$value,
|
65075 |
-
_ref$
|
65076 |
-
|
65077 |
-
|
65078 |
-
option2 = _ref$option2 === void 0 ? translate("utils.image") : _ref$option2,
|
65079 |
-
_ref$className = _ref.className,
|
65080 |
-
className = _ref$className === void 0 ? null : _ref$className;
|
65081 |
|
65082 |
-
var _useState = (0,react.useState)(
|
65083 |
-
_useState2 =
|
65084 |
-
|
65085 |
-
|
65086 |
|
65087 |
(0,react.useEffect)(function () {
|
65088 |
-
|
65089 |
-
}, [
|
65090 |
-
|
65091 |
-
|
65092 |
-
|
65093 |
-
|
65094 |
-
|
65095 |
-
|
65096 |
-
|
65097 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65098 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65099 |
},
|
65100 |
-
|
65101 |
-
|
65102 |
-
|
65103 |
-
|
65104 |
-
|
65105 |
-
|
65106 |
-
|
65107 |
-
|
65108 |
-
|
65109 |
-
size: "small",
|
65110 |
-
"data-testid": "setting:color-choice"
|
65111 |
-
}), /*#__PURE__*/react.createElement(Tab_Tab, {
|
65112 |
-
label: option2,
|
65113 |
-
icon: /*#__PURE__*/react.createElement("i", {
|
65114 |
-
className: "fas fa-image"
|
65115 |
-
}),
|
65116 |
-
size: "small",
|
65117 |
-
"data-testid": "setting:image-choice"
|
65118 |
-
})));
|
65119 |
}
|
65120 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/DisableSetting/DisableSetting.js
|
65121 |
|
@@ -65198,9 +66484,8 @@ function IconGroup_objectWithoutPropertiesLoose(source, excluded) { if (source =
|
|
65198 |
|
65199 |
function IconGroup(_ref) {
|
65200 |
var get = _ref.get,
|
65201 |
-
getParent = _ref.getParent,
|
65202 |
set = _ref.set,
|
65203 |
-
groupProps = IconGroup_objectWithoutProperties(_ref, ["get", "
|
65204 |
|
65205 |
var _useState = (0,react.useState)(0),
|
65206 |
_useState2 = IconGroup_slicedToArray(_useState, 2),
|
@@ -65208,26 +66493,27 @@ function IconGroup(_ref) {
|
|
65208 |
setHoverSettings = _useState2[1]; // 0 = normal, 1 = hover
|
65209 |
|
65210 |
|
65211 |
-
var
|
65212 |
-
|
65213 |
-
|
65214 |
-
|
65215 |
-
|
65216 |
-
|
|
|
|
|
|
|
65217 |
}
|
65218 |
-
}
|
65219 |
-
option2: translate("utils.image"),
|
65220 |
-
value: false,
|
65221 |
-
style: {
|
65222 |
-
marginTop: "-20px"
|
65223 |
-
},
|
65224 |
-
className: "Mui-buzz-premium"
|
65225 |
-
}));
|
65226 |
};
|
65227 |
|
65228 |
var settings = function settings() {
|
65229 |
var color = get("icon_color");
|
65230 |
-
var icon = get("icon",
|
|
|
|
|
|
|
|
|
|
|
65231 |
/* webpack-strip-block:removed */
|
65232 |
|
65233 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(DisableSetting, {
|
@@ -65245,7 +66531,10 @@ function IconGroup(_ref) {
|
|
65245 |
})), /*#__PURE__*/react.createElement(ColorPicker, {
|
65246 |
title: translate("utils.color"),
|
65247 |
value: color[hoverSettings],
|
65248 |
-
defaultValue: get("icon_color",
|
|
|
|
|
|
|
65249 |
onChange: function onChange(val) {
|
65250 |
var newValues = color;
|
65251 |
newValues[hoverSettings] = val;
|
@@ -65255,7 +66544,9 @@ function IconGroup(_ref) {
|
|
65255 |
};
|
65256 |
|
65257 |
var sliders = function sliders() {
|
65258 |
-
var icon_size = get("icon_size"
|
|
|
|
|
65259 |
/* webpack-strip-block:removed */
|
65260 |
|
65261 |
return /*#__PURE__*/react.createElement(DisableSetting, {
|
@@ -65267,7 +66558,12 @@ function IconGroup(_ref) {
|
|
65267 |
}, /*#__PURE__*/react.createElement(SliderContainer, {
|
65268 |
title: translate("settings.icon_size.title"),
|
65269 |
value: icon_size[0],
|
65270 |
-
defaultValue: get("icon_size",
|
|
|
|
|
|
|
|
|
|
|
65271 |
"data-testid": "settingcontainer:icon-size",
|
65272 |
inputText: "px",
|
65273 |
premium: hoverSettings === 1,
|
@@ -65283,7 +66579,10 @@ function IconGroup(_ref) {
|
|
65283 |
return /*#__PURE__*/react.createElement(CollapsibleGroup, IconGroup_extends({
|
65284 |
title: translate("utils.icon"),
|
65285 |
"data-testid": "group:icon"
|
65286 |
-
}, groupProps),
|
|
|
|
|
|
|
65287 |
onChange: function onChange(_, val) {
|
65288 |
return setHoverSettings(val);
|
65289 |
},
|
@@ -65329,13 +66628,16 @@ function IconGroup(_ref) {
|
|
65329 |
return _set(models.BUTTON, buttonId, key, val);
|
65330 |
},
|
65331 |
get: function get(key) {
|
65332 |
-
var
|
65333 |
-
|
65334 |
-
|
65335 |
-
|
65336 |
-
|
65337 |
-
|
65338 |
-
|
|
|
|
|
|
|
65339 |
}
|
65340 |
}, props);
|
65341 |
})(IconGroup));
|
@@ -65691,81 +66993,546 @@ function BorderRadius_extends() { BorderRadius_extends = Object.assign || functi
|
|
65691 |
|
65692 |
|
65693 |
|
65694 |
-
function BorderRadius(props) {
|
65695 |
-
return /*#__PURE__*/react.createElement(TextFieldCorners, BorderRadius_extends({
|
65696 |
-
title: translate("settings.border_radius.title"),
|
65697 |
-
type: "corners"
|
65698 |
-
}, props));
|
65699 |
-
}
|
65700 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/LabelVisibility/LabelVisibility.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65701 |
|
|
|
65702 |
|
|
|
65703 |
|
|
|
65704 |
|
|
|
65705 |
|
|
|
65706 |
|
65707 |
-
function
|
65708 |
-
|
65709 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65710 |
_ref$title = _ref.title,
|
65711 |
-
title = _ref$title === void 0 ? "" : _ref$title,
|
65712 |
-
|
65713 |
-
|
|
|
|
|
|
|
|
|
|
|
65714 |
trashButton = _ref.trashButton;
|
65715 |
-
|
65716 |
-
|
65717 |
-
|
65718 |
-
|
65719 |
-
|
65720 |
-
|
65721 |
-
|
65722 |
-
|
65723 |
-
|
65724 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65725 |
},
|
65726 |
-
|
65727 |
inputProps: {
|
65728 |
-
"data-testid": "
|
65729 |
-
},
|
65730 |
-
displayEmpty: true
|
65731 |
-
}, trashButton && /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
65732 |
-
value: "",
|
65733 |
-
key: "group-default",
|
65734 |
-
disabled: true,
|
65735 |
-
style: {
|
65736 |
-
display: "none"
|
65737 |
}
|
65738 |
-
}
|
65739 |
-
|
65740 |
-
key: "always"
|
65741 |
-
}, translate("settings.label_styles.always")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
65742 |
-
value: "hover",
|
65743 |
-
key: "hover"
|
65744 |
-
}, translate("settings.label_styles.hover")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
65745 |
-
value: "hide",
|
65746 |
-
key: "hide"
|
65747 |
-
}, translate("settings.label_styles.hide"))] : [/*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
65748 |
-
value: "always",
|
65749 |
-
key: "always"
|
65750 |
-
}, translate("settings.label_styles.always")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
65751 |
-
value: "hide",
|
65752 |
-
key: "hide"
|
65753 |
-
}, translate("settings.label_styles.hide"))])), trashButton ? /*#__PURE__*/react.createElement(IconButton_IconButton, {
|
65754 |
onClick: function onClick() {
|
65755 |
-
_onChange("unset");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65756 |
},
|
65757 |
-
|
65758 |
-
|
65759 |
-
style: {
|
65760 |
-
fontSize: "1rem",
|
65761 |
-
marginLeft: "5px"
|
65762 |
},
|
65763 |
-
|
65764 |
-
|
65765 |
-
|
65766 |
-
|
65767 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65768 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65769 |
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Grid/Grid.js
|
65770 |
|
65771 |
|
@@ -66053,14 +67820,14 @@ function LabelPosition_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr;
|
|
66053 |
|
66054 |
|
66055 |
|
|
|
66056 |
var LabelPosition = function LabelPosition(_ref) {
|
66057 |
var onChange = _ref.onChange,
|
66058 |
_ref$title = _ref.title,
|
66059 |
title = _ref$title === void 0 ? "" : _ref$title,
|
66060 |
value = _ref.value,
|
66061 |
defaultValue = _ref.defaultValue,
|
66062 |
-
|
66063 |
-
trashButton = _ref$trashButton === void 0 ? true : _ref$trashButton;
|
66064 |
|
66065 |
var _useState = (0,react.useState)(value || defaultValue),
|
66066 |
_useState2 = LabelPosition_slicedToArray(_useState, 2),
|
@@ -66112,22 +67879,13 @@ var LabelPosition = function LabelPosition(_ref) {
|
|
66112 |
},
|
66113 |
"data-testid": "setting:position-label-right",
|
66114 |
size: "small"
|
66115 |
-
}, translate("settings.label_position.directions.right")))),
|
66116 |
"data-testid": "delete-label-position-value",
|
66117 |
onClick: function onClick() {
|
66118 |
onChange("unset");
|
66119 |
},
|
66120 |
-
disabled:
|
66121 |
-
|
66122 |
-
style: {
|
66123 |
-
fontSize: "1rem",
|
66124 |
-
marginLeft: "5px"
|
66125 |
-
},
|
66126 |
-
color: "primary"
|
66127 |
-
}, /*#__PURE__*/react.createElement(Icon_Icon, {
|
66128 |
-
fontSize: "inherit",
|
66129 |
-
className: "fas fa-trash"
|
66130 |
-
})) : null));
|
66131 |
};
|
66132 |
;// CONCATENATED MODULE: ./src/js/dashboard/Pages/Button/Tabs/Styling/LabelGroup.js
|
66133 |
function LabelGroup_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
@@ -66171,11 +67929,11 @@ function LabelGroup_objectWithoutPropertiesLoose(source, excluded) { if (source
|
|
66171 |
|
66172 |
|
66173 |
|
|
|
66174 |
function _LabelGroup(_ref) {
|
66175 |
var set = _ref.set,
|
66176 |
get = _ref.get,
|
66177 |
-
|
66178 |
-
groupProps = LabelGroup_objectWithoutProperties(_ref, ["set", "get", "getParent"]);
|
66179 |
|
66180 |
var _useState = (0,react.useState)(0),
|
66181 |
_useState2 = LabelGroup_slicedToArray(_useState, 2),
|
@@ -66187,554 +67945,306 @@ function _LabelGroup(_ref) {
|
|
66187 |
return /*#__PURE__*/react.createElement(DisableSetting, {
|
66188 |
premiumTag: true
|
66189 |
}, /*#__PURE__*/react.createElement(FontFamily, null));
|
66190 |
-
};
|
66191 |
-
|
66192 |
-
var margin = function margin() {
|
66193 |
-
/* webpack-strip-block:removed */
|
66194 |
-
return /*#__PURE__*/react.createElement(DisableSetting, {
|
66195 |
-
premiumTag: true,
|
66196 |
-
onClick: function onClick() {
|
66197 |
-
app.showPremiumDialog(translate("premium.margin"));
|
66198 |
-
}
|
66199 |
-
}, /*#__PURE__*/react.createElement(TextFieldCorners, {
|
66200 |
-
title: translate("settings.margin.title") + " (PRO)",
|
66201 |
-
type: "sides"
|
66202 |
-
}));
|
66203 |
-
};
|
66204 |
-
|
66205 |
-
var padding = function padding() {
|
66206 |
-
/* webpack-strip-block:removed */
|
66207 |
-
return /*#__PURE__*/react.createElement(DisableSetting, {
|
66208 |
-
premiumTag: true,
|
66209 |
-
onClick: function onClick() {
|
66210 |
-
app.showPremiumDialog(translate("premium.padding"));
|
66211 |
-
}
|
66212 |
-
}, /*#__PURE__*/react.createElement(TextFieldCorners, {
|
66213 |
-
title: translate("settings.padding.title") + " (PRO)",
|
66214 |
-
type: "sides"
|
66215 |
-
}));
|
66216 |
-
};
|
66217 |
-
|
66218 |
-
var fontSize = function fontSize() {
|
66219 |
-
var label_font_size = get("label_font_size");
|
66220 |
-
var label_font_size_parent = get("label_font_size", true);
|
66221 |
-
/* webpack-strip-block:removed */
|
66222 |
-
|
66223 |
-
return /*#__PURE__*/react.createElement(DisableSetting, {
|
66224 |
-
condition: hoverSettings === 1,
|
66225 |
-
premiumTag: true,
|
66226 |
-
onClick: function onClick() {
|
66227 |
-
app.showPremiumDialog("More hover settings!");
|
66228 |
-
}
|
66229 |
-
}, /*#__PURE__*/react.createElement(SliderContainer, {
|
66230 |
-
title: translate("settings.font_size"),
|
66231 |
-
value: label_font_size[0],
|
66232 |
-
inputText: "px",
|
66233 |
-
onChange: function onChange(val) {
|
66234 |
-
set("label_font_size", val);
|
66235 |
-
},
|
66236 |
-
defaultValue: label_font_size_parent[0],
|
66237 |
-
disabled: hoverSettings === 1,
|
66238 |
-
premium: hoverSettings === 1
|
66239 |
-
}));
|
66240 |
-
};
|
66241 |
-
|
66242 |
-
var borderRadius = function borderRadius() {
|
66243 |
-
/* webpack-strip-block:removed */
|
66244 |
-
return /*#__PURE__*/react.createElement(DisableSetting, {
|
66245 |
-
condition: hoverSettings === 1,
|
66246 |
-
premiumTag: true,
|
66247 |
-
onClick: function onClick() {
|
66248 |
-
app.showPremiumDialog("More hover settings!");
|
66249 |
-
}
|
66250 |
-
}, /*#__PURE__*/react.createElement(BorderRadius, {
|
66251 |
-
defaultValue: label_border_radius_parent[0],
|
66252 |
-
value: label_border_radius[0],
|
66253 |
-
disabled: hoverSettings === 1,
|
66254 |
-
onChange: function onChange(val) {
|
66255 |
-
var newValues = label_border_radius;
|
66256 |
-
newValues[0] = val || "unset";
|
66257 |
-
set("label_border_radius", newValues);
|
66258 |
-
}
|
66259 |
-
}));
|
66260 |
-
};
|
66261 |
-
|
66262 |
-
var label_color = get("label_color");
|
66263 |
-
var label_color_parent = get("label_color", true);
|
66264 |
-
var label_background_color = get("label_background_color");
|
66265 |
-
var label_background_color_parent = get("label_background_color", true);
|
66266 |
-
var label_border_radius = get("label_border_radius");
|
66267 |
-
var label_border_radius_parent = get("label_border_radius", true);
|
66268 |
-
return /*#__PURE__*/react.createElement(CollapsibleGroup, LabelGroup_extends({
|
66269 |
-
title: translate("settings.label.title"),
|
66270 |
-
"data-testid": "group:label"
|
66271 |
-
}, groupProps), getParent("menu_style") === "text" || getParent("menu_style") === "text-icon" ? null : /*#__PURE__*/react.createElement("div", {
|
66272 |
-
className: "label-device-visibility"
|
66273 |
-
}, /*#__PURE__*/react.createElement("div", {
|
66274 |
-
className: "setting-group-title"
|
66275 |
-
}, translate("settings.label_desktop.title")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(LabelVisibility, {
|
66276 |
-
title: translate("settings.show_mobile_desktop.desktop"),
|
66277 |
-
device: "desktop",
|
66278 |
-
value: get("show_label_desktop", true),
|
66279 |
-
onChange: function onChange(val) {
|
66280 |
-
return set("show_label_desktop", val);
|
66281 |
-
},
|
66282 |
-
trashButton: true
|
66283 |
-
}), /*#__PURE__*/react.createElement(LabelVisibility, {
|
66284 |
-
title: translate("settings.show_mobile_desktop.mobile"),
|
66285 |
-
device: "mobile",
|
66286 |
-
value: get("show_label_mobile", true),
|
66287 |
-
onChange: function onChange(val) {
|
66288 |
-
return set("show_label_mobile", val);
|
66289 |
-
},
|
66290 |
-
trashButton: true
|
66291 |
-
})), /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
66292 |
-
className: "setting-group-title"
|
66293 |
-
}, translate("settings.label_position.title")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(LabelPosition, {
|
66294 |
-
title: translate("settings.label_position.description"),
|
66295 |
-
value: get("horizontal_position_label"),
|
66296 |
-
defaultValue: getParent("horizontal_position_label"),
|
66297 |
-
onChange: function onChange(val) {
|
66298 |
-
set("horizontal_position_label", val);
|
66299 |
-
},
|
66300 |
-
trashButton: true
|
66301 |
-
})), /*#__PURE__*/react.createElement(Tabs_Tabs, {
|
66302 |
-
onChange: function onChange(_, val) {
|
66303 |
-
return setHoverSettings(val);
|
66304 |
-
},
|
66305 |
-
style: {
|
66306 |
-
marginBottom: "20px",
|
66307 |
-
marginTop: getParent("menu_style") === "text" || getParent("menu_style") === "text-icon" ? "0" : "20px"
|
66308 |
-
},
|
66309 |
-
value: hoverSettings,
|
66310 |
-
variant: "fullWidth",
|
66311 |
-
centered: true
|
66312 |
-
}, /*#__PURE__*/react.createElement(Tab_Tab, {
|
66313 |
-
label: "Normal",
|
66314 |
-
"data-testid": "normal_hover:normal"
|
66315 |
-
}), /*#__PURE__*/react.createElement(Tab_Tab, {
|
66316 |
-
label: "Hover",
|
66317 |
-
"data-testid": "normal_hover:hover"
|
66318 |
-
})), /*#__PURE__*/react.createElement("div", {
|
66319 |
-
className: "setting-group-title"
|
66320 |
-
}, translate("utils.text")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(ColorPicker, {
|
66321 |
-
noGradient: true,
|
66322 |
-
title: translate("utils.color"),
|
66323 |
-
value: label_color[hoverSettings],
|
66324 |
-
defaultValue: label_color_parent[hoverSettings],
|
66325 |
-
onChange: function onChange(val) {
|
66326 |
-
var newValues = label_color;
|
66327 |
-
newValues[hoverSettings] = val;
|
66328 |
-
set("label_color", newValues);
|
66329 |
-
}
|
66330 |
-
}), fontSize(), fontFamily(), getParent("menu_style") === "text" || getParent("menu_style") === "text-icon" ? null : /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
66331 |
-
className: "setting-group-title"
|
66332 |
-
}, translate("utils.background")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(ColorPicker, {
|
66333 |
-
title: translate("utils.color"),
|
66334 |
-
value: label_background_color[hoverSettings],
|
66335 |
-
defaultValue: label_background_color_parent[hoverSettings],
|
66336 |
-
onChange: function onChange(val) {
|
66337 |
-
var newValues = label_background_color;
|
66338 |
-
newValues[hoverSettings] = val;
|
66339 |
-
set("label_background_color", newValues);
|
66340 |
-
}
|
66341 |
-
}), getParent("menu_style") === "square" || getParent("menu_style") === "rectangle" ? null : /*#__PURE__*/react.createElement(react.Fragment, null, borderRadius(), margin(), padding())));
|
66342 |
-
}
|
66343 |
-
|
66344 |
-
/* harmony default export */ var LabelGroup = (connect(function (state) {
|
66345 |
-
return {
|
66346 |
-
buttons: state.buttons,
|
66347 |
-
groups: state.groups
|
66348 |
-
};
|
66349 |
-
}, function (dispatch) {
|
66350 |
-
return {
|
66351 |
-
_set: function _set() {
|
66352 |
-
return dispatch(dataActions_set.apply(void 0, arguments));
|
66353 |
-
}
|
66354 |
-
};
|
66355 |
-
}, function (_ref2, _ref3, _ref4) {
|
66356 |
-
var buttons = _ref2.buttons,
|
66357 |
-
groups = _ref2.groups;
|
66358 |
-
var _set = _ref3._set;
|
66359 |
-
|
66360 |
-
var buttonId = _ref4.buttonId,
|
66361 |
-
props = LabelGroup_objectWithoutProperties(_ref4, ["buttonId"]);
|
66362 |
-
|
66363 |
-
var button = buttons[buttonId];
|
66364 |
-
var group = groups[buttons[buttonId].parent];
|
66365 |
-
return LabelGroup_objectSpread({
|
66366 |
-
set: function set(key, val) {
|
66367 |
-
return _set(models.BUTTON, buttonId, key, val);
|
66368 |
-
},
|
66369 |
-
get: function get(key) {
|
66370 |
-
var returnValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
66371 |
-
var defToGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
66372 |
-
return _get(key, button, group.menu_style, returnValue && "button", returnValue && defToGroup ? group : []);
|
66373 |
-
},
|
66374 |
-
getParent: function getParent(key) {
|
66375 |
-
var returnValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
66376 |
-
return _get(key, group, group.menu_style, returnValue ? "group" : false);
|
66377 |
-
}
|
66378 |
-
}, props);
|
66379 |
-
})(_LabelGroup));
|
66380 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/SwitchBase.js
|
66381 |
-
|
66382 |
-
|
66383 |
-
|
66384 |
-
|
66385 |
-
|
66386 |
-
|
66387 |
-
|
66388 |
-
|
66389 |
-
|
66390 |
-
|
66391 |
-
|
66392 |
-
var SwitchBase_styles = {
|
66393 |
-
root: {
|
66394 |
-
padding: 9
|
66395 |
-
},
|
66396 |
-
checked: {},
|
66397 |
-
disabled: {},
|
66398 |
-
input: {
|
66399 |
-
cursor: 'inherit',
|
66400 |
-
position: 'absolute',
|
66401 |
-
opacity: 0,
|
66402 |
-
width: '100%',
|
66403 |
-
height: '100%',
|
66404 |
-
top: 0,
|
66405 |
-
left: 0,
|
66406 |
-
margin: 0,
|
66407 |
-
padding: 0,
|
66408 |
-
zIndex: 1
|
66409 |
-
}
|
66410 |
-
};
|
66411 |
-
/**
|
66412 |
-
* @ignore - internal component.
|
66413 |
-
*/
|
66414 |
-
|
66415 |
-
var SwitchBase = /*#__PURE__*/react.forwardRef(function SwitchBase(props, ref) {
|
66416 |
-
var autoFocus = props.autoFocus,
|
66417 |
-
checkedProp = props.checked,
|
66418 |
-
checkedIcon = props.checkedIcon,
|
66419 |
-
classes = props.classes,
|
66420 |
-
className = props.className,
|
66421 |
-
defaultChecked = props.defaultChecked,
|
66422 |
-
disabledProp = props.disabled,
|
66423 |
-
icon = props.icon,
|
66424 |
-
id = props.id,
|
66425 |
-
inputProps = props.inputProps,
|
66426 |
-
inputRef = props.inputRef,
|
66427 |
-
name = props.name,
|
66428 |
-
onBlur = props.onBlur,
|
66429 |
-
onChange = props.onChange,
|
66430 |
-
onFocus = props.onFocus,
|
66431 |
-
readOnly = props.readOnly,
|
66432 |
-
required = props.required,
|
66433 |
-
tabIndex = props.tabIndex,
|
66434 |
-
type = props.type,
|
66435 |
-
value = props.value,
|
66436 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["autoFocus", "checked", "checkedIcon", "classes", "className", "defaultChecked", "disabled", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"]);
|
66437 |
-
|
66438 |
-
var _useControlled = (0,useControlled/* default */.Z)({
|
66439 |
-
controlled: checkedProp,
|
66440 |
-
default: Boolean(defaultChecked),
|
66441 |
-
name: 'SwitchBase',
|
66442 |
-
state: 'checked'
|
66443 |
-
}),
|
66444 |
-
_useControlled2 = (0,slicedToArray/* default */.Z)(_useControlled, 2),
|
66445 |
-
checked = _useControlled2[0],
|
66446 |
-
setCheckedState = _useControlled2[1];
|
66447 |
-
|
66448 |
-
var muiFormControl = useFormControl_useFormControl();
|
66449 |
-
|
66450 |
-
var handleFocus = function handleFocus(event) {
|
66451 |
-
if (onFocus) {
|
66452 |
-
onFocus(event);
|
66453 |
-
}
|
66454 |
-
|
66455 |
-
if (muiFormControl && muiFormControl.onFocus) {
|
66456 |
-
muiFormControl.onFocus(event);
|
66457 |
-
}
|
66458 |
-
};
|
66459 |
-
|
66460 |
-
var handleBlur = function handleBlur(event) {
|
66461 |
-
if (onBlur) {
|
66462 |
-
onBlur(event);
|
66463 |
-
}
|
66464 |
-
|
66465 |
-
if (muiFormControl && muiFormControl.onBlur) {
|
66466 |
-
muiFormControl.onBlur(event);
|
66467 |
-
}
|
66468 |
-
};
|
66469 |
-
|
66470 |
-
var handleInputChange = function handleInputChange(event) {
|
66471 |
-
var newChecked = event.target.checked;
|
66472 |
-
setCheckedState(newChecked);
|
66473 |
-
|
66474 |
-
if (onChange) {
|
66475 |
-
// TODO v5: remove the second argument.
|
66476 |
-
onChange(event, newChecked);
|
66477 |
-
}
|
66478 |
-
};
|
66479 |
-
|
66480 |
-
var disabled = disabledProp;
|
66481 |
-
|
66482 |
-
if (muiFormControl) {
|
66483 |
-
if (typeof disabled === 'undefined') {
|
66484 |
-
disabled = muiFormControl.disabled;
|
66485 |
-
}
|
66486 |
-
}
|
66487 |
-
|
66488 |
-
var hasLabelFor = type === 'checkbox' || type === 'radio';
|
66489 |
-
return /*#__PURE__*/react.createElement(IconButton_IconButton, (0,esm_extends/* default */.Z)({
|
66490 |
-
component: "span",
|
66491 |
-
className: (0,clsx_m/* default */.Z)(classes.root, className, checked && classes.checked, disabled && classes.disabled),
|
66492 |
-
disabled: disabled,
|
66493 |
-
tabIndex: null,
|
66494 |
-
role: undefined,
|
66495 |
-
onFocus: handleFocus,
|
66496 |
-
onBlur: handleBlur,
|
66497 |
-
ref: ref
|
66498 |
-
}, other), /*#__PURE__*/react.createElement("input", (0,esm_extends/* default */.Z)({
|
66499 |
-
autoFocus: autoFocus,
|
66500 |
-
checked: checkedProp,
|
66501 |
-
defaultChecked: defaultChecked,
|
66502 |
-
className: classes.input,
|
66503 |
-
disabled: disabled,
|
66504 |
-
id: hasLabelFor && id,
|
66505 |
-
name: name,
|
66506 |
-
onChange: handleInputChange,
|
66507 |
-
readOnly: readOnly,
|
66508 |
-
ref: inputRef,
|
66509 |
-
required: required,
|
66510 |
-
tabIndex: tabIndex,
|
66511 |
-
type: type,
|
66512 |
-
value: value
|
66513 |
-
}, inputProps)), checked ? checkedIcon : icon);
|
66514 |
-
}); // NB: If changed, please update Checkbox, Switch and Radio
|
66515 |
-
// so that the API documentation is updated.
|
66516 |
-
|
66517 |
-
false ? 0 : void 0;
|
66518 |
-
/* harmony default export */ var internal_SwitchBase = ((0,withStyles/* default */.Z)(SwitchBase_styles, {
|
66519 |
-
name: 'PrivateSwitchBase'
|
66520 |
-
})(SwitchBase));
|
66521 |
-
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Switch/Switch.js
|
66522 |
-
|
66523 |
-
|
66524 |
-
// @inheritedComponent IconButton
|
66525 |
-
|
66526 |
-
|
66527 |
-
|
66528 |
-
|
66529 |
-
|
66530 |
-
|
66531 |
-
|
66532 |
-
|
66533 |
-
var Switch_styles = function styles(theme) {
|
66534 |
-
return {
|
66535 |
-
/* Styles applied to the root element. */
|
66536 |
-
root: {
|
66537 |
-
display: 'inline-flex',
|
66538 |
-
width: 34 + 12 * 2,
|
66539 |
-
height: 14 + 12 * 2,
|
66540 |
-
overflow: 'hidden',
|
66541 |
-
padding: 12,
|
66542 |
-
boxSizing: 'border-box',
|
66543 |
-
position: 'relative',
|
66544 |
-
flexShrink: 0,
|
66545 |
-
zIndex: 0,
|
66546 |
-
// Reset the stacking context.
|
66547 |
-
verticalAlign: 'middle',
|
66548 |
-
// For correct alignment with the text.
|
66549 |
-
'@media print': {
|
66550 |
-
colorAdjust: 'exact'
|
66551 |
-
}
|
66552 |
-
},
|
66553 |
-
|
66554 |
-
/* Styles applied to the root element if `edge="start"`. */
|
66555 |
-
edgeStart: {
|
66556 |
-
marginLeft: -8
|
66557 |
-
},
|
66558 |
-
|
66559 |
-
/* Styles applied to the root element if `edge="end"`. */
|
66560 |
-
edgeEnd: {
|
66561 |
-
marginRight: -8
|
66562 |
-
},
|
66563 |
|
66564 |
-
|
66565 |
-
|
66566 |
-
|
66567 |
-
|
66568 |
-
|
66569 |
-
|
66570 |
-
|
66571 |
-
|
66572 |
-
|
66573 |
-
|
66574 |
-
}),
|
66575 |
-
'&$checked': {
|
66576 |
-
transform: 'translateX(20px)'
|
66577 |
-
},
|
66578 |
-
'&$disabled': {
|
66579 |
-
color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]
|
66580 |
-
},
|
66581 |
-
'&$checked + $track': {
|
66582 |
-
opacity: 0.5
|
66583 |
},
|
66584 |
-
|
66585 |
-
|
66586 |
-
|
66587 |
-
|
|
|
|
|
|
|
66588 |
|
66589 |
-
|
66590 |
-
|
66591 |
-
|
66592 |
-
|
66593 |
-
|
66594 |
-
|
66595 |
-
'@media (hover: none)': {
|
66596 |
-
backgroundColor: 'transparent'
|
66597 |
-
}
|
66598 |
-
}
|
66599 |
-
},
|
66600 |
-
'&$disabled': {
|
66601 |
-
color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]
|
66602 |
-
},
|
66603 |
-
'&$checked + $track': {
|
66604 |
-
backgroundColor: theme.palette.primary.main
|
66605 |
-
},
|
66606 |
-
'&$disabled + $track': {
|
66607 |
-
backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white
|
66608 |
}
|
66609 |
-
},
|
|
|
|
|
|
|
|
|
66610 |
|
66611 |
-
|
66612 |
-
|
66613 |
-
|
66614 |
-
|
66615 |
-
|
66616 |
-
|
66617 |
-
'@media (hover: none)': {
|
66618 |
-
backgroundColor: 'transparent'
|
66619 |
-
}
|
66620 |
-
}
|
66621 |
-
},
|
66622 |
-
'&$disabled': {
|
66623 |
-
color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]
|
66624 |
-
},
|
66625 |
-
'&$checked + $track': {
|
66626 |
-
backgroundColor: theme.palette.secondary.main
|
66627 |
-
},
|
66628 |
-
'&$disabled + $track': {
|
66629 |
-
backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white
|
66630 |
}
|
66631 |
-
},
|
|
|
|
|
|
|
|
|
66632 |
|
66633 |
-
|
66634 |
-
|
66635 |
-
|
66636 |
-
|
66637 |
-
|
66638 |
-
|
66639 |
-
|
66640 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66641 |
},
|
66642 |
-
|
66643 |
-
|
66644 |
-
|
66645 |
-
|
66646 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66647 |
}
|
66648 |
-
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66649 |
|
66650 |
-
|
66651 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66652 |
|
66653 |
-
|
66654 |
-
|
|
|
|
|
|
|
|
|
66655 |
|
66656 |
-
|
66657 |
-
|
66658 |
-
|
66659 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66660 |
},
|
66661 |
-
|
66662 |
-
|
66663 |
-
|
66664 |
-
|
66665 |
-
|
66666 |
-
|
66667 |
-
|
66668 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66669 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66670 |
|
66671 |
-
|
66672 |
-
|
66673 |
-
|
66674 |
-
|
66675 |
-
|
66676 |
-
|
66677 |
-
|
66678 |
-
|
66679 |
-
|
66680 |
-
backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white,
|
66681 |
-
opacity: theme.palette.type === 'light' ? 0.38 : 0.3
|
66682 |
}
|
66683 |
};
|
66684 |
-
}
|
66685 |
-
var
|
66686 |
-
|
66687 |
-
|
66688 |
-
_props$color = props.color,
|
66689 |
-
color = _props$color === void 0 ? 'secondary' : _props$color,
|
66690 |
-
_props$edge = props.edge,
|
66691 |
-
edge = _props$edge === void 0 ? false : _props$edge,
|
66692 |
-
_props$size = props.size,
|
66693 |
-
size = _props$size === void 0 ? 'medium' : _props$size,
|
66694 |
-
other = (0,objectWithoutProperties/* default */.Z)(props, ["classes", "className", "color", "edge", "size"]);
|
66695 |
|
66696 |
-
var
|
66697 |
-
|
66698 |
-
|
66699 |
-
|
66700 |
-
|
66701 |
-
|
66702 |
-
|
66703 |
-
|
66704 |
-
}, /*#__PURE__*/react.createElement(internal_SwitchBase, (0,esm_extends/* default */.Z)({
|
66705 |
-
type: "checkbox",
|
66706 |
-
icon: icon,
|
66707 |
-
checkedIcon: icon,
|
66708 |
-
classes: {
|
66709 |
-
root: (0,clsx_m/* default */.Z)(classes.switchBase, classes["color".concat((0,capitalize/* default */.Z)(color))]),
|
66710 |
-
input: classes.input,
|
66711 |
-
checked: classes.checked,
|
66712 |
-
disabled: classes.disabled
|
66713 |
},
|
66714 |
-
|
66715 |
-
|
66716 |
-
|
66717 |
-
|
66718 |
-
|
66719 |
-
|
66720 |
-
|
66721 |
-
|
66722 |
-
|
|
|
|
|
|
|
|
|
|
|
66723 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/UseBackgroundImage/index.js
|
66724 |
|
66725 |
|
66726 |
|
66727 |
|
66728 |
|
|
|
66729 |
function UseBackgroundImage(_ref) {
|
66730 |
var value = _ref.value,
|
66731 |
-
|
66732 |
-
defaultValue = _ref$defaultValue === void 0 ? "" : _ref$defaultValue,
|
66733 |
onChange = _ref.onChange,
|
66734 |
_ref$disabled = _ref.disabled,
|
66735 |
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
66736 |
-
value = value === "" ? null : value;
|
66737 |
-
|
66738 |
if (disabled) return /*#__PURE__*/react.createElement(DisableSetting, {
|
66739 |
premiumTag: true,
|
66740 |
onClick: function onClick() {
|
@@ -66752,19 +68262,23 @@ function UseBackgroundImage(_ref) {
|
|
66752 |
})));
|
66753 |
|
66754 |
var handleChange = function handleChange(event) {
|
66755 |
-
|
66756 |
-
if (val === defaultValue && value != null) onChange("unset");else onChange(val);
|
66757 |
};
|
66758 |
|
66759 |
return /*#__PURE__*/react.createElement(SettingsContainer, {
|
66760 |
title: translate("settings.background_image.title"),
|
66761 |
fullWidth: false
|
66762 |
}, /*#__PURE__*/react.createElement(esm_Switch_Switch, {
|
66763 |
-
checked: value
|
66764 |
onChange: handleChange,
|
66765 |
inputProps: {
|
66766 |
"data-testid": "setting:image-choice"
|
66767 |
}
|
|
|
|
|
|
|
|
|
|
|
66768 |
}));
|
66769 |
}
|
66770 |
;// CONCATENATED MODULE: ./src/js/dashboard/Pages/Button/Tabs/Styling/ButtonGroup.js
|
@@ -66805,31 +68319,33 @@ function ButtonGroup_objectWithoutPropertiesLoose(source, excluded) { if (source
|
|
66805 |
|
66806 |
|
66807 |
|
|
|
66808 |
/* webpack-strip-block:removed */
|
66809 |
|
66810 |
function Styling_ButtonGroup_ButtonGroup(_ref) {
|
66811 |
var get = _ref.get,
|
66812 |
set = _ref.set,
|
66813 |
-
|
66814 |
-
groupProps = ButtonGroup_objectWithoutProperties(_ref, ["get", "set", "disableBorderRadius"]);
|
66815 |
|
66816 |
var _useState = (0,react.useState)(0),
|
66817 |
_useState2 = ButtonGroup_slicedToArray(_useState, 2),
|
66818 |
hoverSettings = _useState2[0],
|
66819 |
setHoverSettings = _useState2[1];
|
66820 |
|
66821 |
-
var
|
66822 |
var colors = get("background_color");
|
66823 |
var colors_returnValue = get("background_color", {
|
66824 |
-
|
|
|
66825 |
});
|
66826 |
var colors_parent = get("background_color", {
|
66827 |
getParent: true,
|
66828 |
-
|
|
|
66829 |
});
|
66830 |
/* webpack-strip-block:removed */
|
66831 |
|
66832 |
-
return /*#__PURE__*/react.createElement(
|
66833 |
title: translate("utils.color"),
|
66834 |
value: getFirstColor(colors[hoverSettings]),
|
66835 |
defaultValue: colors[0] ? getFirstColor(colors_returnValue[hoverSettings]) : getFirstColor(colors_parent[hoverSettings]),
|
@@ -66839,9 +68355,14 @@ function Styling_ButtonGroup_ButtonGroup(_ref) {
|
|
66839 |
set("background_color", newValues);
|
66840 |
},
|
66841 |
className: "style-background-color"
|
66842 |
-
})
|
|
|
|
|
|
|
|
|
|
|
66843 |
disabled: true
|
66844 |
-
})
|
66845 |
};
|
66846 |
|
66847 |
var borderRadius = function borderRadius() {
|
@@ -66852,7 +68373,8 @@ function Styling_ButtonGroup_ButtonGroup(_ref) {
|
|
66852 |
}, /*#__PURE__*/react.createElement(BorderRadius, {
|
66853 |
value: get("border_radius")[0],
|
66854 |
defaultValue: get("border_radius", {
|
66855 |
-
|
|
|
66856 |
})[0],
|
66857 |
disabled: hoverSettings === 1,
|
66858 |
onChange: function onChange(val) {
|
@@ -66864,6 +68386,39 @@ function Styling_ButtonGroup_ButtonGroup(_ref) {
|
|
66864 |
}));
|
66865 |
};
|
66866 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66867 |
return /*#__PURE__*/react.createElement(CollapsibleGroup, ButtonGroup_extends({
|
66868 |
title: translate("common.button")
|
66869 |
}, groupProps, {
|
@@ -66887,9 +68442,9 @@ function Styling_ButtonGroup_ButtonGroup(_ref) {
|
|
66887 |
"data-testid": "normal_hover:hover"
|
66888 |
})), /*#__PURE__*/react.createElement("div", {
|
66889 |
className: "setting-group-title"
|
66890 |
-
}, translate("settings.setting_categories.background")), /*#__PURE__*/react.createElement("hr", null),
|
66891 |
className: "setting-group-title"
|
66892 |
-
}, translate("settings.setting_categories.button_style")), /*#__PURE__*/react.createElement("hr", null),
|
66893 |
}
|
66894 |
|
66895 |
/* harmony default export */ var Styling_ButtonGroup = (connect(function (state) {
|
@@ -66921,15 +68476,14 @@ function Styling_ButtonGroup_ButtonGroup(_ref) {
|
|
66921 |
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
66922 |
_ref5$getParent = _ref5.getParent,
|
66923 |
getParent = _ref5$getParent === void 0 ? false : _ref5$getParent,
|
66924 |
-
_ref5$returnValue = _ref5.returnValue,
|
66925 |
-
returnValue = _ref5$returnValue === void 0 ? false : _ref5$returnValue,
|
66926 |
_ref5$defToGroup = _ref5.defToGroup,
|
66927 |
defToGroup = _ref5$defToGroup === void 0 ? false : _ref5$defToGroup,
|
66928 |
-
options = ButtonGroup_objectWithoutProperties(_ref5, ["getParent", "
|
66929 |
|
66930 |
-
return _get(key, getParent ? group : button, group.menu_style,
|
66931 |
-
|
66932 |
-
|
|
|
66933 |
}, props);
|
66934 |
})(Styling_ButtonGroup_ButtonGroup));
|
66935 |
;// CONCATENATED MODULE: ./src/js/dashboard/Pages/Button/Tabs/Styling/index.js
|
@@ -67727,8 +69281,8 @@ function OpeningAnimation_arrayWithHoles(arr) { if (Array.isArray(arr)) return a
|
|
67727 |
function OpeningAnimation(_ref) {
|
67728 |
var _ref$value = _ref.value,
|
67729 |
value = _ref$value === void 0 ? "" : _ref$value,
|
67730 |
-
_ref$
|
67731 |
-
|
67732 |
_onChange = _ref.onChange,
|
67733 |
visible = _ref.visible;
|
67734 |
var inputLabel = (0,react.useRef)(null);
|
@@ -67981,7 +69535,7 @@ function Options_Options(_ref) {
|
|
67981 |
title: translate("settings.menu.title"),
|
67982 |
fullWidth: false
|
67983 |
}, /*#__PURE__*/react.createElement(esm_Switch_Switch, {
|
67984 |
-
checked: get("is_menu"
|
67985 |
onChange: function onChange(event) {
|
67986 |
if (event.target.checked) set("is_menu", true);else set("is_menu", false);
|
67987 |
},
|
@@ -67991,40 +69545,40 @@ function Options_Options(_ref) {
|
|
67991 |
})), /*#__PURE__*/react.createElement("div", {
|
67992 |
className: "setting-group-title"
|
67993 |
}, translate("settings.menu_style.title_short")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(MenuStyle, {
|
67994 |
-
value: get("menu_style"
|
67995 |
onChange: function onChange(val) {
|
67996 |
set("menu_style", val);
|
67997 |
}
|
67998 |
}), /*#__PURE__*/react.createElement(OpeningAnimation, {
|
67999 |
-
value: get("menu_opening_animation"
|
68000 |
-
|
68001 |
onChange: function onChange(val) {
|
68002 |
set("menu_opening_animation", val);
|
68003 |
},
|
68004 |
-
visible: get("is_menu"
|
68005 |
-
}), get("is_menu"
|
68006 |
className: "setting-group-title"
|
68007 |
}, translate("settings.menu.title_settings")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(StartOpened, {
|
68008 |
-
value: get("start_opened"
|
68009 |
onChange: function onChange(val) {
|
68010 |
return set("start_opened", val);
|
68011 |
}
|
68012 |
}), /*#__PURE__*/react.createElement(CloseOnClickInside, {
|
68013 |
-
value: get("close_on_click_inside"
|
68014 |
-
openOnMouseOverEnabled: get("open_on_mouseover"
|
68015 |
onChange: function onChange(val) {
|
68016 |
return set("close_on_click_inside", val);
|
68017 |
}
|
68018 |
}), /*#__PURE__*/react.createElement(CloseOnClickOutside, {
|
68019 |
-
value: get("close_on_click_outside"
|
68020 |
-
openOnMouseOverEnabled: get("open_on_mouseover"
|
68021 |
-
closeOnMouseLeaveEnabled: get("close_on_mouseleave"
|
68022 |
onChange: function onChange(val) {
|
68023 |
return set("close_on_click_outside", val);
|
68024 |
}
|
68025 |
}), /*#__PURE__*/react.createElement(OpenOnMouseOver, {
|
68026 |
-
openOnHover: get("open_on_mouseover"
|
68027 |
-
closeOnMouseLeave: get("close_on_mouseleave"
|
68028 |
onChange: function onChange(key, val) {
|
68029 |
return set(key, val);
|
68030 |
}
|
@@ -68055,7 +69609,8 @@ function Options_Options(_ref) {
|
|
68055 |
}, props), {}, {
|
68056 |
group: groups[groupId],
|
68057 |
get: function get(key) {
|
68058 |
-
|
|
|
68059 |
}
|
68060 |
});
|
68061 |
})(Options_Options));
|
@@ -68153,6 +69708,7 @@ function ImageSelector_objectDestructuringEmpty(obj) { if (obj == null) throw ne
|
|
68153 |
|
68154 |
|
68155 |
|
|
|
68156 |
function ImageSelector(_ref) {
|
68157 |
ImageSelector_objectDestructuringEmpty(_ref);
|
68158 |
|
@@ -68217,18 +69773,16 @@ function _IconGroup(_ref) {
|
|
68217 |
hoverSettings = _useState2[0],
|
68218 |
setHoverSettings = _useState2[1];
|
68219 |
|
68220 |
-
var
|
68221 |
-
|
68222 |
-
|
68223 |
-
|
68224 |
-
|
68225 |
-
|
|
|
|
|
68226 |
}
|
68227 |
-
}
|
68228 |
-
option2: translate("utils.image"),
|
68229 |
-
value: false,
|
68230 |
-
className: "Mui-buzz-premium"
|
68231 |
-
}));
|
68232 |
};
|
68233 |
|
68234 |
var settings = function settings() {
|
@@ -68242,7 +69796,10 @@ function _IconGroup(_ref) {
|
|
68242 |
app.showPremiumDialog("More hover settings!");
|
68243 |
}
|
68244 |
}, /*#__PURE__*/react.createElement(IconSelector_IconSelector, {
|
68245 |
-
value: get("icon",
|
|
|
|
|
|
|
68246 |
hoverDisabled: hoverSettings === 1,
|
68247 |
onChange: function onChange(val) {
|
68248 |
set("icon", val);
|
@@ -68287,7 +69844,9 @@ function _IconGroup(_ref) {
|
|
68287 |
return /*#__PURE__*/react.createElement(CollapsibleGroup, Styling_IconGroup_extends({
|
68288 |
title: translate("utils.icon"),
|
68289 |
"data-testid": "group:icon"
|
68290 |
-
}, groupProps),
|
|
|
|
|
68291 |
onChange: function onChange(_, val) {
|
68292 |
return setHoverSettings(val);
|
68293 |
},
|
@@ -68329,14 +69888,19 @@ function _IconGroup(_ref) {
|
|
68329 |
defs: function defs(key) {
|
68330 |
return _defs("group", key, group.menu_style, formats.normal_hover.parse(group[key]).map(function (val) {
|
68331 |
return val === "" ? undefined : val;
|
68332 |
-
})
|
|
|
|
|
|
|
68333 |
},
|
68334 |
set: function set(key, val) {
|
68335 |
return _set(models.GROUP, groupId, key, val);
|
68336 |
},
|
68337 |
get: function get(key) {
|
68338 |
-
var
|
68339 |
-
|
|
|
|
|
68340 |
}
|
68341 |
}, ownProps);
|
68342 |
})(_IconGroup));
|
@@ -68380,33 +69944,42 @@ function Styling_ButtonGroup_objectWithoutPropertiesLoose(source, excluded) { if
|
|
68380 |
|
68381 |
|
68382 |
|
|
|
|
|
68383 |
function Tabs_Styling_ButtonGroup_ButtonGroup(_ref) {
|
68384 |
-
var
|
68385 |
-
|
|
|
68386 |
set = _ref.set,
|
68387 |
-
groupProps = Styling_ButtonGroup_objectWithoutProperties(_ref, ["get", "
|
68388 |
|
68389 |
var _useState = (0,react.useState)(0),
|
68390 |
_useState2 = Styling_ButtonGroup_slicedToArray(_useState, 2),
|
68391 |
hoverSettings = _useState2[0],
|
68392 |
setHoverSettings = _useState2[1];
|
68393 |
|
68394 |
-
var
|
68395 |
/* webpack-strip-block:removed */
|
68396 |
-
return /*#__PURE__*/react.createElement(
|
68397 |
title: translate("utils.color"),
|
68398 |
-
value:
|
68399 |
-
defaultValue:
|
68400 |
-
|
68401 |
-
|
|
|
68402 |
onChange: function onChange(val) {
|
68403 |
var newValues = get("background_color");
|
68404 |
newValues[hoverSettings] = val;
|
68405 |
set("background_color", newValues);
|
68406 |
}
|
68407 |
-
})
|
|
|
|
|
|
|
|
|
|
|
68408 |
disabled: true
|
68409 |
-
})
|
68410 |
};
|
68411 |
|
68412 |
var borderRadius = function borderRadius() {
|
@@ -68415,7 +69988,10 @@ function Tabs_Styling_ButtonGroup_ButtonGroup(_ref) {
|
|
68415 |
condition: hoverSettings === 1,
|
68416 |
premiumTag: true
|
68417 |
}, /*#__PURE__*/react.createElement(BorderRadius, {
|
68418 |
-
defaultValue:
|
|
|
|
|
|
|
68419 |
disabled: hoverSettings === 1,
|
68420 |
value: get("border_radius")[0],
|
68421 |
onChange: function onChange(val) {
|
@@ -68426,11 +70002,81 @@ function Tabs_Styling_ButtonGroup_ButtonGroup(_ref) {
|
|
68426 |
}));
|
68427 |
};
|
68428 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68429 |
return /*#__PURE__*/react.createElement(CollapsibleGroup, Styling_ButtonGroup_extends({
|
68430 |
title: translate("common.button")
|
68431 |
}, groupProps, {
|
68432 |
"data-testid": "group:button"
|
68433 |
-
}), /*#__PURE__*/react.createElement(
|
|
|
|
|
68434 |
onChange: function onChange(_, val) {
|
68435 |
return setHoverSettings(val);
|
68436 |
},
|
@@ -68448,9 +70094,9 @@ function Tabs_Styling_ButtonGroup_ButtonGroup(_ref) {
|
|
68448 |
"data-testid": "normal_hover:hover"
|
68449 |
})), /*#__PURE__*/react.createElement("div", {
|
68450 |
className: "setting-group-title"
|
68451 |
-
}, translate("utils.background")), /*#__PURE__*/react.createElement("hr", null),
|
68452 |
className: "setting-group-title"
|
68453 |
-
}, translate("settings.setting_categories.button_style")), /*#__PURE__*/react.createElement("hr", null)
|
68454 |
}
|
68455 |
|
68456 |
/* harmony default export */ var Tabs_Styling_ButtonGroup = (connect(function (state) {
|
@@ -68472,21 +70118,18 @@ function Tabs_Styling_ButtonGroup_ButtonGroup(_ref) {
|
|
68472 |
|
68473 |
var group = groups[groupId];
|
68474 |
return Styling_ButtonGroup_objectSpread({
|
|
|
68475 |
set: function set(key, val) {
|
68476 |
return _set(models.GROUP, groupId, key, val);
|
68477 |
},
|
68478 |
-
defs: function defs(key) {
|
68479 |
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
68480 |
-
return _defs("group", key, group.menu_style, formats.normal_hover.parse(group[key]).map(function (val) {
|
68481 |
-
return val === "" ? undefined : val;
|
68482 |
-
}), [], options);
|
68483 |
-
},
|
68484 |
get: function get(key) {
|
68485 |
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
68486 |
-
|
68487 |
-
returnValue = _ref5$returnValue === void 0 ? false : _ref5$returnValue;
|
68488 |
|
68489 |
-
return _get(key, group, group.menu_style,
|
|
|
|
|
|
|
68490 |
}
|
68491 |
}, ownProps);
|
68492 |
})(Tabs_Styling_ButtonGroup_ButtonGroup));
|
@@ -68531,14 +70174,16 @@ function Styling_LabelGroup_objectWithoutPropertiesLoose(source, excluded) { if
|
|
68531 |
|
68532 |
|
68533 |
|
|
|
|
|
|
|
68534 |
|
68535 |
|
68536 |
function LabelGroup_LabelGroup(_ref) {
|
68537 |
var defs = _ref.defs,
|
68538 |
set = _ref.set,
|
68539 |
get = _ref.get,
|
68540 |
-
|
68541 |
-
groupProps = Styling_LabelGroup_objectWithoutProperties(_ref, ["defs", "set", "get", "getParent"]);
|
68542 |
|
68543 |
var _useState = (0,react.useState)(0),
|
68544 |
_useState2 = Styling_LabelGroup_slicedToArray(_useState, 2),
|
@@ -68552,6 +70197,46 @@ function LabelGroup_LabelGroup(_ref) {
|
|
68552 |
}, /*#__PURE__*/react.createElement(FontFamily, null));
|
68553 |
};
|
68554 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68555 |
var margin = function margin() {
|
68556 |
/* webpack-strip-block:removed */
|
68557 |
return /*#__PURE__*/react.createElement(DisableSetting, {
|
@@ -68593,6 +70278,7 @@ function LabelGroup_LabelGroup(_ref) {
|
|
68593 |
}
|
68594 |
}, /*#__PURE__*/react.createElement(SliderContainer, {
|
68595 |
title: translate("settings.font_size"),
|
|
|
68596 |
value: label_font_size[0],
|
68597 |
inputText: "px",
|
68598 |
onChange: function onChange(val) {
|
@@ -68624,45 +70310,135 @@ function LabelGroup_LabelGroup(_ref) {
|
|
68624 |
}));
|
68625 |
};
|
68626 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68627 |
var label_color = get("label_color");
|
68628 |
var label_background_color = get("label_background_color");
|
68629 |
var label_border_radius = get("label_border_radius");
|
68630 |
return /*#__PURE__*/react.createElement(CollapsibleGroup, Styling_LabelGroup_extends({
|
68631 |
title: translate("settings.label.title"),
|
68632 |
"data-testid": "group:label"
|
68633 |
-
}, groupProps),
|
|
|
|
|
|
|
|
|
68634 |
className: "setting-group-title"
|
68635 |
}, translate("settings.label_desktop.title")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(LabelVisibility, {
|
68636 |
title: translate("settings.show_mobile_desktop.desktop"),
|
68637 |
device: "desktop",
|
68638 |
-
value: get("show_label_desktop",
|
|
|
|
|
68639 |
onChange: function onChange(val) {
|
68640 |
return set("show_label_desktop", val);
|
68641 |
}
|
68642 |
}), /*#__PURE__*/react.createElement(LabelVisibility, {
|
68643 |
title: translate("settings.show_mobile_desktop.mobile"),
|
68644 |
device: "mobile",
|
68645 |
-
value: get("show_label_mobile",
|
|
|
|
|
68646 |
onChange: function onChange(val) {
|
68647 |
return set("show_label_mobile", val);
|
68648 |
}
|
68649 |
-
}), /*#__PURE__*/react.createElement("div", {
|
68650 |
className: "setting-group-title"
|
68651 |
}, translate("settings.label_position.title")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(LabelPosition, {
|
68652 |
title: translate("settings.label_position.description"),
|
68653 |
-
value: get("horizontal_position_label"
|
68654 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
68655 |
onChange: function onChange(val) {
|
68656 |
set("horizontal_position_label", val);
|
68657 |
-
}
|
68658 |
-
|
68659 |
-
})), /*#__PURE__*/react.createElement(Tabs_Tabs, {
|
68660 |
onChange: function onChange(_, val) {
|
68661 |
return setHoverSettings(val);
|
68662 |
},
|
68663 |
style: {
|
68664 |
marginBottom: "20px",
|
68665 |
-
marginTop: get("
|
|
|
|
|
68666 |
},
|
68667 |
value: hoverSettings,
|
68668 |
variant: "fullWidth",
|
@@ -68685,7 +70461,9 @@ function LabelGroup_LabelGroup(_ref) {
|
|
68685 |
newValues[hoverSettings] = val;
|
68686 |
set("label_color", newValues);
|
68687 |
}
|
68688 |
-
}), fontSize(), fontFamily(), get("
|
|
|
|
|
68689 |
className: "setting-group-title"
|
68690 |
}, translate("utils.background")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(ColorPicker, {
|
68691 |
title: translate("utils.color"),
|
@@ -68696,7 +70474,7 @@ function LabelGroup_LabelGroup(_ref) {
|
|
68696 |
newValues[hoverSettings] = val;
|
68697 |
set("label_background_color", newValues);
|
68698 |
}
|
68699 |
-
}),
|
68700 |
}
|
68701 |
|
68702 |
/* harmony default export */ var Styling_LabelGroup = (connect(function (state) {
|
@@ -68721,18 +70499,19 @@ function LabelGroup_LabelGroup(_ref) {
|
|
68721 |
defs: function defs(key) {
|
68722 |
return _defs("group", key, group.menu_style, formats.normal_hover.parse(group[key]).map(function (val) {
|
68723 |
return val === "" ? undefined : val;
|
68724 |
-
})
|
|
|
|
|
|
|
68725 |
},
|
68726 |
set: function set(key, val) {
|
68727 |
return _set(models.GROUP, groupId, key, val);
|
68728 |
},
|
68729 |
get: function get(key) {
|
68730 |
-
var
|
68731 |
-
|
68732 |
-
|
68733 |
-
|
68734 |
-
var returnValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
68735 |
-
return _get(key, group, group.menu_style, returnValue ? "group" : false);
|
68736 |
}
|
68737 |
}, ownProps);
|
68738 |
})(LabelGroup_LabelGroup));
|
@@ -69417,10 +71196,10 @@ var Radio_styles = function styles(theme) {
|
|
69417 |
}
|
69418 |
};
|
69419 |
};
|
69420 |
-
var
|
69421 |
checked: true
|
69422 |
});
|
69423 |
-
var
|
69424 |
var Radio = /*#__PURE__*/react.forwardRef(function Radio(props, ref) {
|
69425 |
var checkedProp = props.checked,
|
69426 |
classes = props.classes,
|
@@ -69450,10 +71229,10 @@ var Radio = /*#__PURE__*/react.forwardRef(function Radio(props, ref) {
|
|
69450 |
return /*#__PURE__*/react.createElement(internal_SwitchBase, (0,esm_extends/* default */.Z)({
|
69451 |
color: color,
|
69452 |
type: "radio",
|
69453 |
-
icon: /*#__PURE__*/react.cloneElement(
|
69454 |
fontSize: size === 'small' ? 'small' : 'default'
|
69455 |
}),
|
69456 |
-
checkedIcon: /*#__PURE__*/react.cloneElement(
|
69457 |
fontSize: size === 'small' ? 'small' : 'default'
|
69458 |
}),
|
69459 |
classes: {
|
@@ -69757,7 +71536,7 @@ function Advanced_Advanced(_ref) {
|
|
69757 |
return setOpenedGroup(val ? "animation" : "");
|
69758 |
},
|
69759 |
"data-testid": "group:animation"
|
69760 |
-
},
|
69761 |
value: function () {
|
69762 |
/* webpack-strip-block:removed */
|
69763 |
return {
|
@@ -69845,7 +71624,7 @@ function Advanced_Advanced(_ref) {
|
|
69845 |
return _set2(models.GROUP, groupId, obj, val);
|
69846 |
},
|
69847 |
get: function get(key) {
|
69848 |
-
return dlv_umd_default()(groups[groupId], key, _def("group", key));
|
69849 |
},
|
69850 |
singleButton: groups[groupId].children.length < 2
|
69851 |
}, dispatchProps), stateProps), props);
|
@@ -70609,7 +72388,7 @@ function Bar(_ref) {
|
|
70609 |
|
70610 |
var isMenu = false;
|
70611 |
return /*#__PURE__*/react.createElement("div", {
|
70612 |
-
className: (0,clsx_m/* default */.Z)("buttonizer-bar")
|
70613 |
}, /*#__PURE__*/react.createElement("div", {
|
70614 |
className: "router-window"
|
70615 |
}, /*#__PURE__*/react.createElement(SavingDialog_SavingDialog, null), /*#__PURE__*/react.createElement(simplebar_react_esm, {
|
@@ -70726,7 +72505,7 @@ var getData = function getData() {
|
|
70726 |
});
|
70727 |
|
70728 |
try {
|
70729 |
-
apiRequest("/dashboard?nonce=".concat(buttonizer_admin.nonce), {
|
70730 |
method: "GET"
|
70731 |
}).then(function (_ref2) {
|
70732 |
var data = _ref2.data,
|
@@ -71334,7 +73113,6 @@ function MenuDrawer_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
71334 |
|
71335 |
function MenuDrawer_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
71336 |
|
71337 |
-
/* global store */
|
71338 |
|
71339 |
|
71340 |
|
@@ -71499,8 +73277,8 @@ function MenuDrawer(_ref2) {
|
|
71499 |
return setOpenedGroup(val ? "menu_support" : "");
|
71500 |
},
|
71501 |
bodySpacing: false,
|
71502 |
-
|
71503 |
-
|
71504 |
}, /*#__PURE__*/react.createElement(MenuItem_MenuItem_MenuItem, {
|
71505 |
title: translate("bar.menu.knowledgebase.title"),
|
71506 |
description: translate("bar.menu.knowledgebase.description"),
|
@@ -71531,30 +73309,30 @@ function MenuDrawer(_ref2) {
|
|
71531 |
}, /*#__PURE__*/react.createElement(MenuItem_MenuItem_MenuItem, {
|
71532 |
title: translate("bar.menu.account.title"),
|
71533 |
description: translate("bar.menu.account.description"),
|
71534 |
-
href: "".concat(buttonizer_admin.admin, "?page=Buttonizer-account"),
|
71535 |
newWindow: true,
|
71536 |
dataTestid: "menuitem:account"
|
71537 |
}), /*#__PURE__*/react.createElement(MenuItem_MenuItem_MenuItem, {
|
71538 |
title: translate("bar.menu.upgrade.title"),
|
71539 |
description: translate("bar.menu.upgrade.description"),
|
71540 |
-
href: "".concat(buttonizer_admin.admin, "?page=Buttonizer-pricing"),
|
71541 |
newWindow: true,
|
71542 |
dataTestid: "menuitem:upgrade"
|
71543 |
}), /*#__PURE__*/react.createElement(MenuItem_MenuItem_MenuItem, {
|
71544 |
title: translate("bar.menu.affiliation.title"),
|
71545 |
description: translate("bar.menu.affiliation.description"),
|
71546 |
-
href: "".concat(buttonizer_admin.admin, "?page=Buttonizer-affiliation"),
|
71547 |
newWindow: true,
|
71548 |
dataTestid: "menuitem:affiliation"
|
71549 |
}), /*#__PURE__*/react.createElement(MenuItem_MenuItem_MenuItem, {
|
71550 |
title: "Buttonizer",
|
71551 |
description: translate("bar.menu.version"),
|
71552 |
-
href: "https://buttonizer.pro",
|
71553 |
newWindow: true,
|
71554 |
dataTestid: "menuitem:version"
|
71555 |
})), /*#__PURE__*/react.createElement("div", {
|
71556 |
className: "menu-drawer-bottom"
|
71557 |
-
}, /*#__PURE__*/react.createElement(Button_Button, {
|
71558 |
variant: "contained",
|
71559 |
color: "secondary",
|
71560 |
style: {
|
@@ -71564,10 +73342,19 @@ function MenuDrawer(_ref2) {
|
|
71564 |
className: "fab fa-wordpress-simple"
|
71565 |
}),
|
71566 |
"data-testid": "menudrawer:admin",
|
71567 |
-
|
71568 |
-
|
71569 |
-
|
71570 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71571 |
className: "social-media-buttons"
|
71572 |
}, /*#__PURE__*/react.createElement("b", null, translate("bar.menu.follow")), /*#__PURE__*/react.createElement("div", {
|
71573 |
className: "buttons-container"
|
@@ -71731,8 +73518,8 @@ function DrawerSplitter(_ref) {
|
|
71731 |
className: "fas fa-times"
|
71732 |
})), /*#__PURE__*/react.createElement(FormDialog, {
|
71733 |
open: dialogOpen,
|
71734 |
-
title: translate("
|
71735 |
-
text: translate("
|
71736 |
defaultValue: "",
|
71737 |
"data-testid": "drawersplitter:dialog",
|
71738 |
clearOnConfirm: true,
|
@@ -71843,7 +73630,7 @@ function Analytics(_ref) {
|
|
71843 |
|
71844 |
_onChange("google_analytics_enabled", value.target.checked);
|
71845 |
}
|
71846 |
-
})))), /*#__PURE__*/react.createElement("div", null, /*#__PURE__*/react.createElement(Typography_Typography, {
|
71847 |
variant: "body1"
|
71848 |
}, "Google Analytics tracking code"), /*#__PURE__*/react.createElement(Typography_Typography, {
|
71849 |
variant: "body2",
|
@@ -72256,7 +74043,7 @@ function Preferences(_ref) {
|
|
72256 |
}, [adminBar, toolTips, tips, subDomains, noAjax, canSendErrors]);
|
72257 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
72258 |
className: "description"
|
72259 |
-
}, translate("settings_window.other_settings.description")), /*#__PURE__*/react.createElement(List_List, null, /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
72260 |
disableGutters: true,
|
72261 |
className: "with-secondary-action"
|
72262 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
@@ -72331,7 +74118,7 @@ function Preferences(_ref) {
|
|
72331 |
|
72332 |
_onChange("tips_enabled", value.target.checked);
|
72333 |
}
|
72334 |
-
}))), /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
72335 |
disableGutters: true,
|
72336 |
className: "with-secondary-action"
|
72337 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
@@ -72356,7 +74143,7 @@ function Preferences(_ref) {
|
|
72356 |
|
72357 |
_onChange("no_ajax", !value.target.checked);
|
72358 |
}
|
72359 |
-
}))), /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
72360 |
disableGutters: true,
|
72361 |
className: "with-secondary-action"
|
72362 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
@@ -72381,7 +74168,7 @@ function Preferences(_ref) {
|
|
72381 |
|
72382 |
_onChange("allow_subdomains", value.target.checked);
|
72383 |
}
|
72384 |
-
}))), /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
72385 |
disableGutters: true,
|
72386 |
className: "with-secondary-action"
|
72387 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
@@ -72406,7 +74193,7 @@ function Preferences(_ref) {
|
|
72406 |
|
72407 |
_onChange("can_send_errors", value.target.checked);
|
72408 |
}
|
72409 |
-
}))), /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
72410 |
disableGutters: true,
|
72411 |
className: "with-secondary-action"
|
72412 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
@@ -72431,7 +74218,7 @@ function Preferences(_ref) {
|
|
72431 |
|
72432 |
_onChange("no_limit", value.target.checked);
|
72433 |
}
|
72434 |
-
}))), !dashboard_store.getState().misc.is_opt_in && /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
72435 |
disableGutters: true,
|
72436 |
className: "with-optin-action"
|
72437 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
@@ -72454,7 +74241,7 @@ function Preferences(_ref) {
|
|
72454 |
});
|
72455 |
},
|
72456 |
disabled: resettingOptin
|
72457 |
-
}, translate(resettingOptin ? "loading.loading" : "settings_window.other_settings.reset_opt_in.button")))), /*#__PURE__*/react.createElement(PermissionComponent_PermissionComponent, {
|
72458 |
value: additionalPermissions,
|
72459 |
onChange: function onChange(val) {
|
72460 |
return _onChange("additional_permissions", val);
|
@@ -72777,32 +74564,27 @@ function ButtonizerTourOptions(_ref) {
|
|
72777 |
(0,react.useEffect)(function () {
|
72778 |
openCollapsibleGroup ? openCollapsibleGroup : "button_group_container";
|
72779 |
}, [openCollapsibleGroup]);
|
72780 |
-
return /*#__PURE__*/react.createElement(
|
72781 |
open: open,
|
72782 |
onClose: onClose,
|
72783 |
-
|
72784 |
-
|
72785 |
}, /*#__PURE__*/react.createElement("div", {
|
72786 |
-
className: "
|
72787 |
-
}, /*#__PURE__*/react.createElement(DialogTitle_DialogTitle, {
|
72788 |
-
className: "buttonizer-tour-options title"
|
72789 |
-
}, /*#__PURE__*/react.createElement("i", {
|
72790 |
className: "fas fa-globe-europe"
|
72791 |
}), translate("settings_window.buttonizer_tour.title")), /*#__PURE__*/react.createElement(IconButton_IconButton, {
|
72792 |
onClick: onClose,
|
72793 |
-
className: "
|
72794 |
"data-testid": "buttonizer-tour-options:close-button"
|
72795 |
-
}, /*#__PURE__*/react.createElement(
|
72796 |
className: "fas fa-times"
|
72797 |
-
}))), /*#__PURE__*/react.createElement(DialogContent_DialogContent, null, /*#__PURE__*/react.createElement(List_List, {
|
72798 |
-
className: "
|
72799 |
-
}, /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
72800 |
-
disableGutters: true
|
72801 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
72802 |
primary: translate("settings_window.buttonizer_tour.interface.title"),
|
72803 |
-
secondary: translate("settings_window.buttonizer_tour.interface.description")
|
72804 |
-
|
72805 |
-
}), /*#__PURE__*/react.createElement(ListItemSecondaryAction_ListItemSecondaryAction, null, /*#__PURE__*/react.createElement(Button_Button, {
|
72806 |
variant: "contained",
|
72807 |
color: "primary",
|
72808 |
"data-testid": "buttonizer-tour-options:interface-tour",
|
@@ -72816,13 +74598,12 @@ function ButtonizerTourOptions(_ref) {
|
|
72816 |
}, 200);
|
72817 |
closeDrawer();
|
72818 |
}
|
72819 |
-
}, translate("buttonizer_tour.take_tour")))
|
72820 |
-
|
72821 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
72822 |
primary: translate("settings_window.buttonizer_tour.create_button.title"),
|
72823 |
-
secondary: translate("settings_window.buttonizer_tour.create_button.description")
|
72824 |
-
|
72825 |
-
}), /*#__PURE__*/react.createElement(ListItemSecondaryAction_ListItemSecondaryAction, null, /*#__PURE__*/react.createElement(Button_Button, {
|
72826 |
variant: "contained",
|
72827 |
color: "primary",
|
72828 |
"data-testid": "buttonizer-tour-options:create-button-tour",
|
@@ -72836,7 +74617,7 @@ function ButtonizerTourOptions(_ref) {
|
|
72836 |
}, 200);
|
72837 |
closeDrawer();
|
72838 |
}
|
72839 |
-
}, translate("buttonizer_tour.take_tour"))))))
|
72840 |
}
|
72841 |
|
72842 |
/* harmony default export */ var SettingsDialog_ButtonizerTourOptions = (connect(function (state) {
|
@@ -72935,7 +74716,7 @@ function PremiumDialog(_ref) {
|
|
72935 |
|
72936 |
var handleClose = function handleClose(status) {
|
72937 |
if (status === "confirm") {
|
72938 |
-
window.location.href = buttonizer_admin.admin + "?page=Buttonizer-pricing";
|
72939 |
return;
|
72940 |
}
|
72941 |
|
@@ -73305,7 +75086,9 @@ function IframeOutbreak() {
|
|
73305 |
|
73306 |
|
73307 |
function SuperContributorDialog(_ref) {
|
73308 |
-
var _ref$
|
|
|
|
|
73309 |
welcome_super_contributor = _ref$welcome_super_co === void 0 ? false : _ref$welcome_super_co,
|
73310 |
setSetting = _ref.setSetting;
|
73311 |
|
@@ -73321,7 +75104,7 @@ function SuperContributorDialog(_ref) {
|
|
73321 |
};
|
73322 |
|
73323 |
return /*#__PURE__*/react.createElement(Dialog_Dialog, {
|
73324 |
-
open: welcome_super_contributor,
|
73325 |
onClose: handleClose,
|
73326 |
fullWidth: true,
|
73327 |
maxWidth: "md",
|
@@ -73336,7 +75119,7 @@ function SuperContributorDialog(_ref) {
|
|
73336 |
marginRight: 20,
|
73337 |
marginBottom: 10
|
73338 |
}
|
73339 |
-
}), /*#__PURE__*/react.createElement(DialogContentText_DialogContentText, null, translate("welcome.super-contributor"),
|
73340 |
href: "https://buttonizer.pro/super-contributor/",
|
73341 |
target: "_blank",
|
73342 |
rel: "noopener"
|
@@ -73354,7 +75137,8 @@ function SuperContributorDialog(_ref) {
|
|
73354 |
|
73355 |
/* harmony default export */ var Dialogs_SuperContributorDialog = (connect(function (state) {
|
73356 |
return {
|
73357 |
-
welcome_super_contributor: state.settings.welcome_super_contributor
|
|
|
73358 |
};
|
73359 |
}, function (dispatch) {
|
73360 |
return {
|
@@ -73377,7 +75161,7 @@ var tour = [{
|
|
73377 |
id: "myVideo",
|
73378 |
autoPlay: true,
|
73379 |
loop: true
|
73380 |
-
}), /*#__PURE__*/react.createElement("
|
73381 |
tooltipClass: "videoDialog",
|
73382 |
position: "right"
|
73383 |
}, {
|
@@ -73389,13 +75173,15 @@ var tour = [{
|
|
73389 |
}, // Go to next page, skip step
|
73390 |
{
|
73391 |
element: ".simplebar-content-wrapper",
|
73392 |
-
title: "
|
73393 |
-
intro: "
|
|
|
|
|
73394 |
}, {
|
73395 |
element: ".simplebar-content-wrapper",
|
73396 |
title: translate("buttonizer_tour.interface_tour.step_2.title"),
|
73397 |
intro: translate("buttonizer_tour.interface_tour.step_2.intro"),
|
73398 |
-
tooltipClass: "
|
73399 |
position: "right"
|
73400 |
}, {
|
73401 |
element: ".simplebar-content-wrapper",
|
@@ -73405,8 +75191,8 @@ var tour = [{
|
|
73405 |
id: "myVideo",
|
73406 |
autoPlay: true,
|
73407 |
loop: true
|
73408 |
-
}), /*#__PURE__*/react.createElement("
|
73409 |
-
tooltipClass: "
|
73410 |
position: "right"
|
73411 |
}, {
|
73412 |
element: ".breadcrumb-button",
|
@@ -73418,25 +75204,26 @@ var tour = [{
|
|
73418 |
element: ".MuiButton-Publish",
|
73419 |
title: translate("buttonizer_tour.interface_tour.step_5.title"),
|
73420 |
intro: translate("buttonizer_tour.interface_tour.step_5.intro"),
|
73421 |
-
tooltipClass: "
|
73422 |
position: "right"
|
73423 |
}, // Go to next page, skip step
|
73424 |
{
|
73425 |
-
element: ".
|
73426 |
-
title: "
|
73427 |
-
intro: "
|
|
|
|
|
73428 |
}, {
|
73429 |
element: ".menu-container",
|
73430 |
title: translate("buttonizer_tour.interface_tour.step_6.title"),
|
73431 |
intro: translate("buttonizer_tour.interface_tour.step_6.intro"),
|
73432 |
-
tooltipClass: "
|
73433 |
position: "right"
|
73434 |
}, {
|
73435 |
element: ".menu-settings",
|
73436 |
title: translate("buttonizer_tour.interface_tour.step_7.title"),
|
73437 |
intro: translate("buttonizer_tour.interface_tour.step_7.intro"),
|
73438 |
tooltipClass: "tourDialog",
|
73439 |
-
highlightClass: "noHelperLayer",
|
73440 |
position: "right"
|
73441 |
}, {
|
73442 |
element: ".menu-item.buttonizer-tour",
|
@@ -73447,14 +75234,15 @@ var tour = [{
|
|
73447 |
}, // Go to next page, skip step
|
73448 |
{
|
73449 |
element: ".menu-support",
|
73450 |
-
title: "
|
73451 |
-
intro: "
|
|
|
|
|
73452 |
}, {
|
73453 |
element: ".menu-support",
|
73454 |
title: translate("buttonizer_tour.interface_tour.step_9.title"),
|
73455 |
intro: translate("buttonizer_tour.interface_tour.step_9.intro"),
|
73456 |
tooltipClass: "tourDialog",
|
73457 |
-
highlightClass: "noHelperLayer",
|
73458 |
position: "right"
|
73459 |
}, {
|
73460 |
element: ".menu-item.community",
|
@@ -73480,11 +75268,11 @@ var onBeforeChange = function onBeforeChange(nextStepIndex, introJsRef, groupId,
|
|
73480 |
if (nextStepIndex === 3) {
|
73481 |
// Going to general page
|
73482 |
if (introJsRef.introJs._direction === "forward") {
|
73483 |
-
document.location.
|
73484 |
openCollapsibleGroup("group_general_general");
|
73485 |
} // Going back to general page
|
73486 |
else if (introJsRef.introJs._direction === "backward") {
|
73487 |
-
document.location.
|
73488 |
}
|
73489 |
|
73490 |
openCollapsibleGroup("group_general_general");
|
@@ -73493,7 +75281,7 @@ var onBeforeChange = function onBeforeChange(nextStepIndex, introJsRef, groupId,
|
|
73493 |
if (nextStepIndex === 4) {
|
73494 |
// Going to style page
|
73495 |
if (introJsRef.introJs._direction === "forward") {
|
73496 |
-
document.location.
|
73497 |
}
|
73498 |
|
73499 |
openCollapsibleGroup("group_style_button");
|
@@ -73502,14 +75290,14 @@ var onBeforeChange = function onBeforeChange(nextStepIndex, introJsRef, groupId,
|
|
73502 |
if (nextStepIndex === 6) {
|
73503 |
// Going back to style page
|
73504 |
if (introJsRef.introJs._direction === "backward") {
|
73505 |
-
document.location.
|
73506 |
}
|
73507 |
|
73508 |
openCollapsibleGroup("group_style_button");
|
73509 |
}
|
73510 |
|
73511 |
if (nextStepIndex === 7) {
|
73512 |
-
document.location.
|
73513 |
|
73514 |
if (introJsRef.introJs._direction === "forward") setTimeout(function () {
|
73515 |
introJsRef.introJs.nextStep();
|
@@ -73563,14 +75351,15 @@ var CreateButtonTour_tour = [{
|
|
73563 |
}, // Go to next page, skip step
|
73564 |
{
|
73565 |
element: ".simplebar-content-wrapper",
|
73566 |
-
title: "
|
73567 |
-
intro: "
|
|
|
73568 |
}, // Go to style page
|
73569 |
{
|
73570 |
element: ".simplebar-content-wrapper",
|
73571 |
title: translate("buttonizer_tour.create_button_tour.step_2.title"),
|
73572 |
intro: translate("buttonizer_tour.create_button_tour.step_2.intro"),
|
73573 |
-
tooltipClass: "
|
73574 |
}, {
|
73575 |
element: ".button-action-type",
|
73576 |
title: translate("buttonizer_tour.create_button_tour.step_3.title"),
|
@@ -73592,8 +75381,10 @@ var CreateButtonTour_tour = [{
|
|
73592 |
}, // Go to next page, skip step
|
73593 |
{
|
73594 |
element: ".general-label-text",
|
73595 |
-
title: "
|
73596 |
-
intro: "
|
|
|
|
|
73597 |
}, {
|
73598 |
element: ".general-label-text",
|
73599 |
title: translate("buttonizer_tour.create_button_tour.step_6.title"),
|
@@ -73603,13 +75394,14 @@ var CreateButtonTour_tour = [{
|
|
73603 |
}, // Go to next page, skip step
|
73604 |
{
|
73605 |
element: ".simplebar-content-wrapper",
|
73606 |
-
title: "
|
73607 |
-
intro: "
|
|
|
73608 |
}, {
|
73609 |
element: ".simplebar-content-wrapper",
|
73610 |
title: translate("buttonizer_tour.create_button_tour.step_7.title"),
|
73611 |
intro: translate("buttonizer_tour.create_button_tour.step_7.intro"),
|
73612 |
-
tooltipClass: "
|
73613 |
}, {
|
73614 |
element: ".normal-or-hover",
|
73615 |
title: translate("buttonizer_tour.create_button_tour.step_8.title"),
|
@@ -73653,9 +75445,11 @@ var CreateButtonTour_tour = [{
|
|
73653 |
position: "right"
|
73654 |
}, // Go to next page, skip step
|
73655 |
{
|
73656 |
-
element: ".
|
73657 |
-
title: "
|
73658 |
-
intro: "
|
|
|
|
|
73659 |
}, {
|
73660 |
element: ".label-device-visibility",
|
73661 |
title: translate("buttonizer_tour.create_button_tour.step_15.title"),
|
@@ -73668,21 +75462,26 @@ var CreateButtonTour_tour = [{
|
|
73668 |
intro: translate("buttonizer_tour.create_button_tour.step_16.intro"),
|
73669 |
tooltipClass: "tourDialog",
|
73670 |
position: "right"
|
73671 |
-
},
|
73672 |
-
|
73673 |
-
|
73674 |
-
|
73675 |
-
|
73676 |
-
|
73677 |
-
|
73678 |
-
|
73679 |
-
|
73680 |
-
|
73681 |
-
|
73682 |
-
|
73683 |
-
|
73684 |
-
|
73685 |
-
|
|
|
|
|
|
|
|
|
|
|
73686 |
title: translate("buttonizer_tour.final.title"),
|
73687 |
intro: translate("buttonizer_tour.final.intro"),
|
73688 |
tooltipClass: "tourDialog",
|
@@ -73705,7 +75504,7 @@ var CreateButtonTour_onBeforeChange = function onBeforeChange(nextStepIndex, int
|
|
73705 |
if (nextStepIndex === 3) {
|
73706 |
// Going to general page and open the general container
|
73707 |
if (introJsRef.introJs._direction === "forward") {
|
73708 |
-
document.location.
|
73709 |
}
|
73710 |
|
73711 |
openCollapsibleGroup("button_general_general");
|
@@ -73732,7 +75531,7 @@ var CreateButtonTour_onBeforeChange = function onBeforeChange(nextStepIndex, int
|
|
73732 |
if (nextStepIndex === 9) {
|
73733 |
// Going back to general page and open the label container
|
73734 |
if (introJsRef.introJs._direction === "backward") {
|
73735 |
-
document.location.
|
73736 |
openCollapsibleGroup("button_general_label");
|
73737 |
}
|
73738 |
|
@@ -73747,7 +75546,7 @@ var CreateButtonTour_onBeforeChange = function onBeforeChange(nextStepIndex, int
|
|
73747 |
if (nextStepIndex === 10) {
|
73748 |
// Going to style page and open the button container
|
73749 |
if (introJsRef.introJs._direction === "forward") {
|
73750 |
-
document.location.
|
73751 |
openCollapsibleGroup("button_style_button");
|
73752 |
}
|
73753 |
}
|
@@ -73816,25 +75615,27 @@ function ButtonizerTour(_ref) {
|
|
73816 |
var tour = _ref.tour,
|
73817 |
groups = _ref.groups,
|
73818 |
buttons = _ref.buttons,
|
73819 |
-
openCollapsibleGroup = _ref.openCollapsibleGroup
|
|
|
|
|
73820 |
var groupId = Object.keys(groups)[0];
|
73821 |
var buttonId = Object.keys(buttons)[0];
|
73822 |
var ref = (0,react.useRef)();
|
73823 |
var state = {
|
73824 |
stepsEnabled: true,
|
73825 |
initialStep: 0,
|
73826 |
-
steps: tour ? Tours[tour][0] :
|
73827 |
onBeforeChange: function onBeforeChange(nextStepIndex) {
|
73828 |
-
return Tours[tour][1](nextStepIndex, ref.current ? ref.current : null, groupId, buttonId, openCollapsibleGroup);
|
73829 |
}
|
73830 |
};
|
73831 |
-
if (!tour) return null;
|
73832 |
|
73833 |
var onExit = function onExit() {
|
73834 |
app.closeButtonizerTour(); // Users go to home page if they stop in the middle of the tour
|
73835 |
|
73836 |
document.location.href = "#/";
|
73837 |
openCollapsibleGroup(null);
|
|
|
73838 |
}; // Disable downscroll in the menu during the last dialogs
|
73839 |
|
73840 |
|
@@ -73852,7 +75653,7 @@ function ButtonizerTour(_ref) {
|
|
73852 |
|
73853 |
});
|
73854 |
return /*#__PURE__*/react.createElement(intro_js_react_lib/* Steps */.Rg, {
|
73855 |
-
enabled:
|
73856 |
steps: state.steps,
|
73857 |
initialStep: state.initialStep,
|
73858 |
onExit: onExit,
|
@@ -73879,6 +75680,9 @@ function ButtonizerTour(_ref) {
|
|
73879 |
};
|
73880 |
}, function (dispatch) {
|
73881 |
return {
|
|
|
|
|
|
|
73882 |
setMisc: function setMisc() {
|
73883 |
return dispatch(dataActions_setMisc.apply(void 0, arguments));
|
73884 |
},
|
@@ -73887,118 +75691,443 @@ function ButtonizerTour(_ref) {
|
|
73887 |
}
|
73888 |
};
|
73889 |
})(ButtonizerTour));
|
73890 |
-
;// CONCATENATED MODULE: ./src/js/dashboard/Components/
|
73891 |
-
function
|
73892 |
|
73893 |
-
function
|
73894 |
|
73895 |
-
function
|
73896 |
|
73897 |
-
function
|
73898 |
|
73899 |
-
function
|
73900 |
|
73901 |
-
function
|
73902 |
|
73903 |
|
73904 |
|
73905 |
|
73906 |
|
73907 |
|
|
|
73908 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73909 |
|
73910 |
-
function
|
73911 |
-
var
|
73912 |
-
_ref$welcomeDialog = _ref.welcomeDialog,
|
73913 |
-
welcomeDialog = _ref$welcomeDialog === void 0 ? false : _ref$welcomeDialog,
|
73914 |
-
openCollapsibleGroup = _ref.openCollapsibleGroup;
|
73915 |
|
73916 |
-
var _useState = (0,react.useState)(
|
73917 |
-
_useState2 =
|
73918 |
-
|
73919 |
-
|
73920 |
|
73921 |
-
var
|
73922 |
-
|
73923 |
-
|
73924 |
-
|
|
|
|
|
|
|
|
|
|
|
73925 |
|
73926 |
(0,react.useEffect)(function () {
|
73927 |
-
|
73928 |
-
|
73929 |
-
|
73930 |
-
|
73931 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73932 |
fullWidth: true,
|
73933 |
-
"
|
73934 |
-
|
73935 |
-
|
73936 |
-
|
73937 |
-
|
73938 |
-
|
73939 |
-
|
|
|
|
|
|
|
73940 |
style: {
|
73941 |
-
|
73942 |
-
marginBottom: 5
|
73943 |
}
|
73944 |
-
})
|
73945 |
-
|
73946 |
-
|
73947 |
-
|
73948 |
-
|
73949 |
-
|
73950 |
-
|
73951 |
-
|
73952 |
-
|
73953 |
-
|
73954 |
-
|
73955 |
-
|
73956 |
-
|
73957 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73958 |
}
|
73959 |
-
}))), /*#__PURE__*/react.createElement(DialogActions_DialogActions, {
|
73960 |
-
className: "welcome-dialog-buttons"
|
73961 |
-
}, /*#__PURE__*/react.createElement(Button_Button, {
|
73962 |
-
onClick: function onClick() {
|
73963 |
-
setSetting("welcome", false);
|
73964 |
-
openCollapsibleGroup("button_group_container"); // The element (first step) cannot not be found if the tour does not start on the right page
|
73965 |
|
73966 |
-
|
|
|
73967 |
|
73968 |
-
|
73969 |
-
|
73970 |
-
|
73971 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73972 |
},
|
73973 |
-
|
73974 |
-
|
73975 |
-
className: "
|
73976 |
-
|
73977 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73978 |
onClick: function onClick() {
|
73979 |
-
|
73980 |
-
setSetting("welcome", false);
|
73981 |
},
|
73982 |
-
|
73983 |
-
|
73984 |
-
|
73985 |
-
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73986 |
}
|
73987 |
|
73988 |
-
/* harmony default export */ var
|
73989 |
return {
|
73990 |
-
|
|
|
73991 |
};
|
73992 |
}, function (dispatch) {
|
73993 |
return {
|
73994 |
setSetting: function setSetting() {
|
73995 |
return dispatch(dataActions_setSetting.apply(void 0, arguments));
|
73996 |
-
},
|
73997 |
-
openCollapsibleGroup: function openCollapsibleGroup() {
|
73998 |
-
return dispatch(dataActions_setMisc("open_collapsible_group", arguments.length <= 0 ? undefined : arguments[0]));
|
73999 |
}
|
74000 |
};
|
74001 |
-
})(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74002 |
;// CONCATENATED MODULE: ./src/js/dashboard/App.js
|
74003 |
function App_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { App_typeof = function _typeof(obj) { return typeof obj; }; } else { App_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return App_typeof(obj); }
|
74004 |
|
@@ -74038,6 +76167,9 @@ function App_getPrototypeOf(o) { App_getPrototypeOf = Object.setPrototypeOf ? Ob
|
|
74038 |
|
74039 |
|
74040 |
|
|
|
|
|
|
|
74041 |
|
74042 |
|
74043 |
|
@@ -74056,8 +76188,11 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
74056 |
_this = _super.call(this, props);
|
74057 |
__webpack_require__.g.app = App_assertThisInitialized(_this); // FontAwesome
|
74058 |
|
74059 |
-
_this.loadFontAwesome();
|
|
|
74060 |
|
|
|
|
|
74061 |
_this.state = {
|
74062 |
hasError: false,
|
74063 |
error: "",
|
@@ -74067,9 +76202,11 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
74067 |
text: "DEFAULT DIALOG",
|
74068 |
video: null
|
74069 |
},
|
74070 |
-
buttonizerTour: null
|
74071 |
-
/* webpack-strip-block:removed */
|
74072 |
|
|
|
|
|
|
|
74073 |
};
|
74074 |
_this.isUpdatingTimeout = null;
|
74075 |
document.body.classList.add("buttonizer-mobile-hide"); // Add favicon
|
@@ -74165,7 +76302,9 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
74165 |
loaded: this.props.loading.loaded
|
74166 |
}), /*#__PURE__*/react.createElement(Bar, {
|
74167 |
loading: !this.props.loading.loaded
|
74168 |
-
}), /*#__PURE__*/react.createElement(
|
|
|
|
|
74169 |
className: "hide-bar-button",
|
74170 |
onClick: function onClick() {
|
74171 |
document.body.classList.toggle("hide-buttonizer-bar");
|
@@ -74175,12 +76314,13 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
74175 |
}), /*#__PURE__*/react.createElement("i", {
|
74176 |
className: "fas fa-chevron-left"
|
74177 |
})), /*#__PURE__*/react.createElement("div", {
|
74178 |
-
className: "buttonizer-preview"
|
74179 |
}, this.state.showOutOfPreviewWarning && /*#__PURE__*/react.createElement(IframeOutbreak, null), /*#__PURE__*/react.createElement("iframe", {
|
74180 |
src: this.props.frameUrl,
|
74181 |
width: "100%",
|
74182 |
height: "100%",
|
74183 |
frameBorder: "0",
|
|
|
74184 |
onLoad: function onLoad(e) {
|
74185 |
if (_this3.props.loading.loadingIframe && _this3.props.frameUrl !== "about:blank") {
|
74186 |
dashboard_store.dispatch(stopLoading());
|
@@ -74193,10 +76333,11 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
74193 |
});
|
74194 |
}
|
74195 |
}
|
74196 |
-
}, "Your browser does somehow not support iframes. Please try a recent version of Google Chrome, FireFox or Microsoft Edge"))), /*#__PURE__*/react.createElement(Dialogs_SuperContributorDialog,
|
74197 |
-
welcomeDialog: this.props.welcome || document.location.href.indexOf("welcome-splash=true") >= 0
|
74198 |
-
}), /*#__PURE__*/react.createElement(ButtonizerTour_ButtonizerTour, {
|
74199 |
tour: this.state.buttonizerTour
|
|
|
|
|
|
|
74200 |
}), /*#__PURE__*/react.createElement(PremiumDialog, {
|
74201 |
open: this.state.premiumDialog.open,
|
74202 |
text: this.state.premiumDialog.text,
|
@@ -74211,7 +76352,9 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
74211 |
}
|
74212 |
});
|
74213 |
}
|
74214 |
-
}), permalinkError(), javascriptError()
|
|
|
|
|
74215 |
}
|
74216 |
}, {
|
74217 |
key: "loadFontAwesome",
|
@@ -74280,6 +76423,13 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
74280 |
value: function getSaver() {
|
74281 |
return this.buttonSaver;
|
74282 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74283 |
}, {
|
74284 |
key: "getCurrentButtonizerTour",
|
74285 |
value: function getCurrentButtonizerTour() {
|
@@ -74325,6 +76475,19 @@ var App_App = /*#__PURE__*/function (_React$Component) {
|
|
74325 |
}
|
74326 |
});
|
74327 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74328 |
/**
|
74329 |
* Open a page on the dashboard when clicking on a button/group
|
74330 |
* @param {*} action
|
@@ -78723,9 +80886,8 @@ document.body.classList.add("buttonizer-initialized");
|
|
78723 |
/* global module */
|
78724 |
module.exports = {
|
78725 |
group: {
|
78726 |
-
height:
|
78727 |
-
width:
|
78728 |
-
space: "0px"
|
78729 |
},
|
78730 |
button: {}
|
78731 |
};
|
@@ -78743,29 +80905,21 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
78743 |
|
78744 |
/* global module */
|
78745 |
var button = {
|
78746 |
-
|
78747 |
-
|
78748 |
-
|
78749 |
-
|
78750 |
-
|
78751 |
-
|
78752 |
-
|
78753 |
-
label_border_radius: ["0px", "0px"],
|
78754 |
-
label_margin: ["0px", "0px"],
|
78755 |
-
label_padding: ["0 20px", "0 20px"],
|
78756 |
-
label_same_height: true
|
78757 |
};
|
78758 |
module.exports = {
|
78759 |
button: _objectSpread({}, button),
|
78760 |
group: _objectSpread(_objectSpread({}, button), {}, {
|
78761 |
-
label_same_width: true
|
78762 |
-
|
78763 |
-
|
78764 |
-
|
78765 |
-
height: "56px",
|
78766 |
-
"line-height": "56px"
|
78767 |
-
}
|
78768 |
-
}
|
78769 |
};
|
78770 |
|
78771 |
/***/ }),
|
@@ -78781,180 +80935,22 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
78781 |
|
78782 |
/* global module */
|
78783 |
var button = {
|
78784 |
-
|
78785 |
-
|
78786 |
-
|
78787 |
-
|
78788 |
-
|
78789 |
-
|
78790 |
-
|
78791 |
-
label_border_radius: ["0px", "0px"],
|
78792 |
-
label_margin: ["0px", "0px"],
|
78793 |
-
label_padding: ["0 20px", "0 20px"],
|
78794 |
-
label_same_height: true
|
78795 |
};
|
78796 |
module.exports = {
|
78797 |
button: _objectSpread({}, button),
|
78798 |
group: _objectSpread(_objectSpread({}, button), {}, {
|
78799 |
show_label_desktop: "hover",
|
78800 |
-
show_label_mobile: "hide"
|
78801 |
-
|
78802 |
-
|
78803 |
-
|
78804 |
-
height: "56px",
|
78805 |
-
"line-height": "56px"
|
78806 |
-
}
|
78807 |
-
}
|
78808 |
-
};
|
78809 |
-
|
78810 |
-
/***/ }),
|
78811 |
-
|
78812 |
-
/***/ 6527:
|
78813 |
-
/***/ (function(module) {
|
78814 |
-
|
78815 |
-
/* global module */
|
78816 |
-
module.exports = {
|
78817 |
-
group: {
|
78818 |
-
width: "fit-content",
|
78819 |
-
height: "42px",
|
78820 |
-
label_background_color: ["transparent", "transparent"],
|
78821 |
-
label_padding: ["0 20px", "0 20px"],
|
78822 |
-
label_position: "0px",
|
78823 |
-
border_radius: ["10px"],
|
78824 |
-
label: "Group Label",
|
78825 |
-
label_inside: true
|
78826 |
-
},
|
78827 |
-
button: {
|
78828 |
-
width: "fit-content",
|
78829 |
-
label_background_color: ["transparent", "transparent"],
|
78830 |
-
label_padding: ["0 20px", "0 20px"],
|
78831 |
-
label_position: "0px",
|
78832 |
-
border_radius: ["10px"],
|
78833 |
-
label: "Button Label",
|
78834 |
-
label_inside: true
|
78835 |
-
},
|
78836 |
-
extraJSS: {
|
78837 |
-
position: {
|
78838 |
-
horizontal: "right: 5%",
|
78839 |
-
vertical: "bottom: 5%"
|
78840 |
-
},
|
78841 |
-
|
78842 |
-
get group() {
|
78843 |
-
return {
|
78844 |
-
"align-items": this.position.horizontal[0] === "right" ? "flex-end" : "flex-start"
|
78845 |
-
};
|
78846 |
-
},
|
78847 |
-
|
78848 |
-
icon: {
|
78849 |
-
display: "none"
|
78850 |
-
},
|
78851 |
-
image: {
|
78852 |
-
display: "none"
|
78853 |
-
},
|
78854 |
-
button: {
|
78855 |
-
margin: "0 0 10px",
|
78856 |
-
"min-width": "42px"
|
78857 |
-
},
|
78858 |
-
label: {
|
78859 |
-
display: "block",
|
78860 |
-
opacity: "1 !important",
|
78861 |
-
visibility: "visible !important",
|
78862 |
-
position: "inherit",
|
78863 |
-
height: "56px",
|
78864 |
-
"line-height": "56px"
|
78865 |
-
},
|
78866 |
-
|
78867 |
-
set setPosition(pos) {
|
78868 |
-
this.position = pos;
|
78869 |
-
}
|
78870 |
-
|
78871 |
-
}
|
78872 |
-
};
|
78873 |
-
|
78874 |
-
/***/ }),
|
78875 |
-
|
78876 |
-
/***/ 53298:
|
78877 |
-
/***/ (function(module) {
|
78878 |
-
|
78879 |
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
78880 |
-
|
78881 |
-
/* global module */
|
78882 |
-
module.exports = {
|
78883 |
-
button: {
|
78884 |
-
width: "fit-content",
|
78885 |
-
label_background_color: ["transparent", "transparent"],
|
78886 |
-
label_padding: ["0 20px", "0 20px"],
|
78887 |
-
label_position: "0px",
|
78888 |
-
border_radius: ["10px"],
|
78889 |
-
label: "Button Label",
|
78890 |
-
label_inside: true
|
78891 |
-
},
|
78892 |
-
group: {
|
78893 |
-
width: "fit-content",
|
78894 |
-
height: "42px",
|
78895 |
-
label_background_color: ["transparent", "transparent"],
|
78896 |
-
label_padding: ["0 20px", "0 20px"],
|
78897 |
-
label_position: "0px",
|
78898 |
-
border_radius: ["10px"],
|
78899 |
-
label: "Group Label",
|
78900 |
-
label_inside: true
|
78901 |
-
},
|
78902 |
-
extraJSS: {
|
78903 |
-
position: {
|
78904 |
-
horizontal: "right: 5%",
|
78905 |
-
vertical: "bottom: 5%"
|
78906 |
-
},
|
78907 |
-
|
78908 |
-
get group() {
|
78909 |
-
return {
|
78910 |
-
"align-items": this.position.horizontal[0] === "right" ? "flex-end" : "flex-start"
|
78911 |
-
};
|
78912 |
-
},
|
78913 |
-
|
78914 |
-
get button() {
|
78915 |
-
return {
|
78916 |
-
"align-items": "center",
|
78917 |
-
display: "flex",
|
78918 |
-
margin: "0 0 10px",
|
78919 |
-
"flex-direction": this.position.horizontal[0] === "right" ? "row-reverse" : "row",
|
78920 |
-
"min-width": "42px"
|
78921 |
-
};
|
78922 |
-
},
|
78923 |
-
|
78924 |
-
get icon() {
|
78925 |
-
return _defineProperty({
|
78926 |
-
top: 0,
|
78927 |
-
position: "initial",
|
78928 |
-
transform: "initial !important",
|
78929 |
-
margin: "0"
|
78930 |
-
}, "margin-".concat(this.position.horizontal[0]), "15px");
|
78931 |
-
},
|
78932 |
-
|
78933 |
-
get image() {
|
78934 |
-
return _defineProperty({
|
78935 |
-
top: 0,
|
78936 |
-
position: "initial",
|
78937 |
-
transform: "initial !important",
|
78938 |
-
margin: "0"
|
78939 |
-
}, "margin-".concat(this.position.horizontal[0]), "15px");
|
78940 |
-
},
|
78941 |
-
|
78942 |
-
label: {
|
78943 |
-
display: "inline-block",
|
78944 |
-
opacity: "1 !important",
|
78945 |
-
visibility: "visible !important",
|
78946 |
-
position: "initial",
|
78947 |
-
height: "56px",
|
78948 |
-
"line-height": "56px",
|
78949 |
-
top: 0,
|
78950 |
-
transform: "initial"
|
78951 |
-
},
|
78952 |
-
|
78953 |
-
set setPosition(pos) {
|
78954 |
-
this.position = pos;
|
78955 |
-
}
|
78956 |
-
|
78957 |
-
}
|
78958 |
};
|
78959 |
|
78960 |
/***/ }),
|
@@ -78968,17 +80964,15 @@ var Default = __webpack_require__(65011);
|
|
78968 |
var Square = __webpack_require__(78867);
|
78969 |
|
78970 |
var Rectangle = __webpack_require__(98588);
|
|
|
78971 |
|
78972 |
-
var TextIcon = __webpack_require__(53298);
|
78973 |
-
|
78974 |
-
var Text = __webpack_require__(6527);
|
78975 |
|
78976 |
module.exports = {
|
78977 |
"default": Default,
|
78978 |
square: Square,
|
78979 |
-
rectangle: Rectangle
|
78980 |
-
|
78981 |
-
|
78982 |
};
|
78983 |
|
78984 |
/***/ }),
|
@@ -93456,19 +95450,19 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93456 |
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
93457 |
|
93458 |
/*!
|
93459 |
-
* Intro.js v4.
|
93460 |
* https://introjs.com
|
93461 |
*
|
93462 |
* Copyright (C) 2012-2021 Afshin Mehrabani (@afshinmeh).
|
93463 |
* https://raw.githubusercontent.com/usablica/intro.js/master/license.md
|
93464 |
*
|
93465 |
-
* Date:
|
93466 |
*/
|
93467 |
|
93468 |
(function (global, factory) {
|
93469 |
true ? module.exports = factory() :
|
93470 |
0;
|
93471 |
-
}(this, (function () { 'use strict';
|
93472 |
|
93473 |
function _typeof(obj) {
|
93474 |
"@babel/helpers - typeof";
|
@@ -93676,6 +95670,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93676 |
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
93677 |
});
|
93678 |
|
|
|
|
|
|
|
|
|
|
|
|
|
93679 |
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
93680 |
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
93681 |
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
@@ -93703,27 +95703,44 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93703 |
};
|
93704 |
};
|
93705 |
|
93706 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93707 |
|
93708 |
var classofRaw = function (it) {
|
93709 |
-
return toString
|
93710 |
};
|
93711 |
|
93712 |
-
var
|
|
|
93713 |
|
93714 |
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
93715 |
var indexedObject = fails(function () {
|
93716 |
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
93717 |
// eslint-disable-next-line no-prototype-builtins -- safe
|
93718 |
-
return !Object('z').propertyIsEnumerable(0);
|
93719 |
}) ? function (it) {
|
93720 |
-
return classofRaw(it) == 'String' ? split
|
93721 |
-
} : Object;
|
|
|
|
|
93722 |
|
93723 |
// `RequireObjectCoercible` abstract operation
|
93724 |
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
93725 |
var requireObjectCoercible = function (it) {
|
93726 |
-
if (it == undefined) throw TypeError("Can't call method on " + it);
|
93727 |
return it;
|
93728 |
};
|
93729 |
|
@@ -93735,18 +95752,26 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93735 |
return indexedObject(requireObjectCoercible(it));
|
93736 |
};
|
93737 |
|
|
|
|
|
|
|
|
|
|
|
|
|
93738 |
var isObject = function (it) {
|
93739 |
-
return typeof it
|
93740 |
};
|
93741 |
|
93742 |
-
var aFunction
|
93743 |
-
return
|
93744 |
};
|
93745 |
|
93746 |
var getBuiltIn = function (namespace, method) {
|
93747 |
-
return arguments.length < 2 ? aFunction
|
93748 |
};
|
93749 |
|
|
|
|
|
93750 |
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
93751 |
|
93752 |
var process = global_1.process;
|
@@ -93757,16 +95782,22 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93757 |
|
93758 |
if (v8) {
|
93759 |
match = v8.split('.');
|
93760 |
-
|
93761 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
93762 |
match = engineUserAgent.match(/Edge\/(\d+)/);
|
93763 |
if (!match || match[1] >= 74) {
|
93764 |
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
93765 |
-
if (match) version$1 = match[1];
|
93766 |
}
|
93767 |
}
|
93768 |
|
93769 |
-
var engineV8Version = version$1
|
93770 |
|
93771 |
/* eslint-disable es/no-symbol -- required for testing */
|
93772 |
|
@@ -93789,27 +95820,58 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93789 |
&& !Symbol.sham
|
93790 |
&& typeof Symbol.iterator == 'symbol';
|
93791 |
|
|
|
|
|
93792 |
var isSymbol = useSymbolAsUid ? function (it) {
|
93793 |
return typeof it == 'symbol';
|
93794 |
} : function (it) {
|
93795 |
var $Symbol = getBuiltIn('Symbol');
|
93796 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93797 |
};
|
93798 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93799 |
// `OrdinaryToPrimitive` abstract operation
|
93800 |
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
93801 |
var ordinaryToPrimitive = function (input, pref) {
|
93802 |
var fn, val;
|
93803 |
-
if (pref === 'string' &&
|
93804 |
-
if (
|
93805 |
-
if (pref !== 'string' &&
|
93806 |
-
throw TypeError("Can't convert object to primitive value");
|
93807 |
};
|
93808 |
|
|
|
|
|
|
|
93809 |
var setGlobal = function (key, value) {
|
93810 |
try {
|
93811 |
-
|
93812 |
-
Object.defineProperty(global_1, key, { value: value, configurable: true, writable: true });
|
93813 |
} catch (error) {
|
93814 |
global_1[key] = value;
|
93815 |
} return value;
|
@@ -93824,58 +95886,68 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93824 |
(module.exports = function (key, value) {
|
93825 |
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
93826 |
})('versions', []).push({
|
93827 |
-
version: '3.
|
93828 |
mode: 'global',
|
93829 |
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
93830 |
});
|
93831 |
});
|
93832 |
|
|
|
|
|
93833 |
// `ToObject` abstract operation
|
93834 |
// https://tc39.es/ecma262/#sec-toobject
|
93835 |
var toObject = function (argument) {
|
93836 |
-
return Object(requireObjectCoercible(argument));
|
93837 |
};
|
93838 |
|
93839 |
-
var hasOwnProperty = {}.hasOwnProperty;
|
93840 |
|
93841 |
-
|
93842 |
-
|
|
|
|
|
93843 |
};
|
93844 |
|
93845 |
var id = 0;
|
93846 |
var postfix = Math.random();
|
|
|
93847 |
|
93848 |
var uid = function (key) {
|
93849 |
-
return 'Symbol(' +
|
93850 |
};
|
93851 |
|
93852 |
var WellKnownSymbolsStore = shared('wks');
|
93853 |
var Symbol$1 = global_1.Symbol;
|
|
|
93854 |
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
93855 |
|
93856 |
var wellKnownSymbol = function (name) {
|
93857 |
-
if (!
|
93858 |
-
|
|
|
93859 |
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
|
|
|
93860 |
} else {
|
93861 |
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(
|
93862 |
}
|
93863 |
} return WellKnownSymbolsStore[name];
|
93864 |
};
|
93865 |
|
|
|
93866 |
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
93867 |
|
93868 |
// `ToPrimitive` abstract operation
|
93869 |
// https://tc39.es/ecma262/#sec-toprimitive
|
93870 |
var toPrimitive = function (input, pref) {
|
93871 |
if (!isObject(input) || isSymbol(input)) return input;
|
93872 |
-
var exoticToPrim = input
|
93873 |
var result;
|
93874 |
-
if (exoticToPrim
|
93875 |
if (pref === undefined) pref = 'default';
|
93876 |
-
result = exoticToPrim
|
93877 |
if (!isObject(result) || isSymbol(result)) return result;
|
93878 |
-
throw TypeError("Can't convert object to primitive value");
|
93879 |
}
|
93880 |
if (pref === undefined) pref = 'number';
|
93881 |
return ordinaryToPrimitive(input, pref);
|
@@ -93885,15 +95957,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93885 |
// https://tc39.es/ecma262/#sec-topropertykey
|
93886 |
var toPropertyKey = function (argument) {
|
93887 |
var key = toPrimitive(argument, 'string');
|
93888 |
-
return isSymbol(key) ? key :
|
93889 |
};
|
93890 |
|
93891 |
var document$1 = global_1.document;
|
93892 |
// typeof document.createElement is 'object' in old IE
|
93893 |
-
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
93894 |
|
93895 |
var documentCreateElement = function (it) {
|
93896 |
-
return EXISTS ? document$1.createElement(it) : {};
|
93897 |
};
|
93898 |
|
93899 |
// Thank's IE8 for his funny defineProperty
|
@@ -93915,19 +95987,23 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93915 |
if (ie8DomDefine) try {
|
93916 |
return $getOwnPropertyDescriptor(O, P);
|
93917 |
} catch (error) { /* empty */ }
|
93918 |
-
if (
|
93919 |
};
|
93920 |
|
93921 |
var objectGetOwnPropertyDescriptor = {
|
93922 |
f: f$3
|
93923 |
};
|
93924 |
|
93925 |
-
var
|
93926 |
-
|
93927 |
-
|
93928 |
-
|
|
|
|
|
|
|
93929 |
};
|
93930 |
|
|
|
93931 |
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
93932 |
var $defineProperty = Object.defineProperty;
|
93933 |
|
@@ -93940,7 +96016,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93940 |
if (ie8DomDefine) try {
|
93941 |
return $defineProperty(O, P, Attributes);
|
93942 |
} catch (error) { /* empty */ }
|
93943 |
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
93944 |
if ('value' in Attributes) O[P] = Attributes.value;
|
93945 |
return O;
|
93946 |
};
|
@@ -93956,12 +96032,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93956 |
return object;
|
93957 |
};
|
93958 |
|
93959 |
-
var functionToString = Function.toString;
|
93960 |
|
93961 |
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
93962 |
-
if (
|
93963 |
sharedStore.inspectSource = function (it) {
|
93964 |
-
return functionToString
|
93965 |
};
|
93966 |
}
|
93967 |
|
@@ -93969,7 +96045,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93969 |
|
93970 |
var WeakMap$1 = global_1.WeakMap;
|
93971 |
|
93972 |
-
var nativeWeakMap =
|
93973 |
|
93974 |
var keys = shared('keys');
|
93975 |
|
@@ -93980,6 +96056,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93980 |
var hiddenKeys$1 = {};
|
93981 |
|
93982 |
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
|
93983 |
var WeakMap = global_1.WeakMap;
|
93984 |
var set, get, has;
|
93985 |
|
@@ -93991,42 +96068,42 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
93991 |
return function (it) {
|
93992 |
var state;
|
93993 |
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
93994 |
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
93995 |
} return state;
|
93996 |
};
|
93997 |
};
|
93998 |
|
93999 |
if (nativeWeakMap || sharedStore.state) {
|
94000 |
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
94001 |
-
var wmget = store.get;
|
94002 |
-
var wmhas = store.has;
|
94003 |
-
var wmset = store.set;
|
94004 |
set = function (it, metadata) {
|
94005 |
-
if (wmhas
|
94006 |
metadata.facade = it;
|
94007 |
-
wmset
|
94008 |
return metadata;
|
94009 |
};
|
94010 |
get = function (it) {
|
94011 |
-
return wmget
|
94012 |
};
|
94013 |
has = function (it) {
|
94014 |
-
return wmhas
|
94015 |
};
|
94016 |
} else {
|
94017 |
var STATE = sharedKey('state');
|
94018 |
hiddenKeys$1[STATE] = true;
|
94019 |
set = function (it, metadata) {
|
94020 |
-
if (
|
94021 |
metadata.facade = it;
|
94022 |
createNonEnumerableProperty(it, STATE, metadata);
|
94023 |
return metadata;
|
94024 |
};
|
94025 |
get = function (it) {
|
94026 |
-
return
|
94027 |
};
|
94028 |
has = function (it) {
|
94029 |
-
return
|
94030 |
};
|
94031 |
}
|
94032 |
|
@@ -94038,7 +96115,24 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94038 |
getterFor: getterFor
|
94039 |
};
|
94040 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94041 |
var redefine = createCommonjsModule(function (module) {
|
|
|
|
|
94042 |
var getInternalState = internalState.get;
|
94043 |
var enforceInternalState = internalState.enforce;
|
94044 |
var TEMPLATE = String(String).split('String');
|
@@ -94047,14 +96141,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94047 |
var unsafe = options ? !!options.unsafe : false;
|
94048 |
var simple = options ? !!options.enumerable : false;
|
94049 |
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
|
94050 |
var state;
|
94051 |
-
if (
|
94052 |
-
if (
|
94053 |
-
|
|
|
|
|
|
|
94054 |
}
|
94055 |
state = enforceInternalState(value);
|
94056 |
if (!state.source) {
|
94057 |
-
state.source = TEMPLATE.join(typeof
|
94058 |
}
|
94059 |
}
|
94060 |
if (O === global_1) {
|
@@ -94070,43 +96168,51 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94070 |
else createNonEnumerableProperty(O, key, value);
|
94071 |
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
94072 |
})(Function.prototype, 'toString', function toString() {
|
94073 |
-
return
|
94074 |
});
|
94075 |
});
|
94076 |
|
94077 |
var ceil = Math.ceil;
|
94078 |
var floor$2 = Math.floor;
|
94079 |
|
94080 |
-
// `
|
94081 |
-
// https://tc39.es/ecma262/#sec-
|
94082 |
-
var
|
94083 |
-
|
|
|
|
|
94084 |
};
|
94085 |
|
|
|
94086 |
var min$4 = Math.min;
|
94087 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94088 |
// `ToLength` abstract operation
|
94089 |
// https://tc39.es/ecma262/#sec-tolength
|
94090 |
var toLength = function (argument) {
|
94091 |
-
return argument > 0 ? min$
|
94092 |
};
|
94093 |
|
94094 |
-
|
94095 |
-
|
94096 |
-
|
94097 |
-
|
94098 |
-
// Let integer be ? ToInteger(index).
|
94099 |
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
94100 |
-
var toAbsoluteIndex = function (index, length) {
|
94101 |
-
var integer = toInteger(index);
|
94102 |
-
return integer < 0 ? max$3(integer + length, 0) : min$3(integer, length);
|
94103 |
};
|
94104 |
|
94105 |
// `Array.prototype.{ indexOf, includes }` methods implementation
|
94106 |
var createMethod$2 = function (IS_INCLUDES) {
|
94107 |
return function ($this, el, fromIndex) {
|
94108 |
var O = toIndexedObject($this);
|
94109 |
-
var length =
|
94110 |
var index = toAbsoluteIndex(fromIndex, length);
|
94111 |
var value;
|
94112 |
// Array#includes uses SameValueZero equality algorithm
|
@@ -94131,18 +96237,20 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94131 |
indexOf: createMethod$2(false)
|
94132 |
};
|
94133 |
|
94134 |
-
var indexOf = arrayIncludes.indexOf;
|
94135 |
|
94136 |
|
|
|
|
|
94137 |
var objectKeysInternal = function (object, names) {
|
94138 |
var O = toIndexedObject(object);
|
94139 |
var i = 0;
|
94140 |
var result = [];
|
94141 |
var key;
|
94142 |
-
for (key in O) !
|
94143 |
// Don't enum bug & hidden keys
|
94144 |
-
while (names.length > i) if (
|
94145 |
-
~indexOf(result, key) ||
|
94146 |
}
|
94147 |
return result;
|
94148 |
};
|
@@ -94178,11 +96286,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94178 |
f: f
|
94179 |
};
|
94180 |
|
|
|
|
|
94181 |
// all object keys, includes non-enumerable and symbols
|
94182 |
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
94183 |
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
94184 |
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
94185 |
-
return getOwnPropertySymbols ?
|
94186 |
};
|
94187 |
|
94188 |
var copyConstructorProperties = function (target, source) {
|
@@ -94191,7 +96301,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94191 |
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
94192 |
for (var i = 0; i < keys.length; i++) {
|
94193 |
var key = keys[i];
|
94194 |
-
if (!
|
94195 |
}
|
94196 |
};
|
94197 |
|
@@ -94201,7 +96311,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94201 |
var value = data[normalize(feature)];
|
94202 |
return value == POLYFILL ? true
|
94203 |
: value == NATIVE ? false
|
94204 |
-
:
|
94205 |
: !!detection;
|
94206 |
};
|
94207 |
|
@@ -94235,6 +96345,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94235 |
options.sham - add a flag to not completely full polyfills
|
94236 |
options.enumerable - export as enumerable property
|
94237 |
options.noTargetGet - prevent calling a getter on target
|
|
|
94238 |
*/
|
94239 |
var _export = function (options, source) {
|
94240 |
var TARGET = options.target;
|
@@ -94257,7 +96368,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94257 |
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
94258 |
// contained in target
|
94259 |
if (!FORCED && targetProperty !== undefined) {
|
94260 |
-
if (typeof sourceProperty
|
94261 |
copyConstructorProperties(sourceProperty, targetProperty);
|
94262 |
}
|
94263 |
// add a flag to not completely full polyfills
|
@@ -94269,9 +96380,43 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94269 |
}
|
94270 |
};
|
94271 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94272 |
var toString_1 = function (argument) {
|
94273 |
-
if (
|
94274 |
-
return String(argument);
|
94275 |
};
|
94276 |
|
94277 |
// `RegExp.prototype.flags` getter implementation
|
@@ -94288,20 +96433,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94288 |
return result;
|
94289 |
};
|
94290 |
|
94291 |
-
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
94292 |
-
var
|
94293 |
-
return RegExp(s, f);
|
94294 |
-
};
|
94295 |
|
94296 |
var UNSUPPORTED_Y$2 = fails(function () {
|
94297 |
-
var re =
|
94298 |
re.lastIndex = 2;
|
94299 |
return re.exec('abcd') != null;
|
94300 |
});
|
94301 |
|
94302 |
var BROKEN_CARET = fails(function () {
|
94303 |
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
94304 |
-
var re =
|
94305 |
re.lastIndex = 2;
|
94306 |
return re.exec('str') != null;
|
94307 |
});
|
@@ -94323,11 +96466,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94323 |
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
94324 |
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
94325 |
anObject(O);
|
|
|
94326 |
var keys = objectKeys(Properties);
|
94327 |
var length = keys.length;
|
94328 |
var index = 0;
|
94329 |
var key;
|
94330 |
-
while (length > index) objectDefineProperty.f(O, key = keys[index++],
|
94331 |
return O;
|
94332 |
};
|
94333 |
|
@@ -94369,17 +96513,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94369 |
var iframe = documentCreateElement('iframe');
|
94370 |
var JS = 'java' + SCRIPT + ':';
|
94371 |
var iframeDocument;
|
94372 |
-
|
94373 |
-
|
94374 |
-
|
94375 |
-
|
94376 |
-
|
94377 |
-
|
94378 |
-
|
94379 |
-
|
94380 |
-
|
94381 |
-
return iframeDocument.F;
|
94382 |
-
}
|
94383 |
};
|
94384 |
|
94385 |
// Check for document.domain and active x support
|
@@ -94392,10 +96534,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94392 |
try {
|
94393 |
activeXDocument = new ActiveXObject('htmlfile');
|
94394 |
} catch (error) { /* ignore */ }
|
94395 |
-
NullProtoObject = document
|
94396 |
-
|
94397 |
-
|
94398 |
-
|
|
|
94399 |
var length = enumBugKeys.length;
|
94400 |
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
94401 |
return NullProtoObject();
|
@@ -94417,40 +96560,49 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94417 |
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
94418 |
};
|
94419 |
|
|
|
|
|
|
|
94420 |
var regexpUnsupportedDotAll = fails(function () {
|
94421 |
-
|
94422 |
-
var re = RegExp('.', (typeof '').charAt(0));
|
94423 |
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
94424 |
});
|
94425 |
|
|
|
|
|
|
|
94426 |
var regexpUnsupportedNcg = fails(function () {
|
94427 |
-
|
94428 |
-
var re = RegExp('(?<a>b)', (typeof '').charAt(5));
|
94429 |
return re.exec('b').groups.a !== 'b' ||
|
94430 |
'b'.replace(re, '$<a>c') !== 'bc';
|
94431 |
});
|
94432 |
|
94433 |
-
/* eslint-disable regexp/no-
|
94434 |
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
94435 |
|
94436 |
|
94437 |
|
94438 |
|
94439 |
|
|
|
|
|
94440 |
var getInternalState = internalState.get;
|
94441 |
|
94442 |
|
94443 |
|
94444 |
-
var nativeExec = RegExp.prototype.exec;
|
94445 |
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
94446 |
-
|
94447 |
var patchedExec = nativeExec;
|
|
|
|
|
|
|
|
|
94448 |
|
94449 |
var UPDATES_LAST_INDEX_WRONG = (function () {
|
94450 |
var re1 = /a/;
|
94451 |
var re2 = /b*/g;
|
94452 |
-
nativeExec
|
94453 |
-
nativeExec
|
94454 |
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
94455 |
})();
|
94456 |
|
@@ -94472,27 +96624,27 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94472 |
|
94473 |
if (raw) {
|
94474 |
raw.lastIndex = re.lastIndex;
|
94475 |
-
result = patchedExec
|
94476 |
re.lastIndex = raw.lastIndex;
|
94477 |
return result;
|
94478 |
}
|
94479 |
|
94480 |
var groups = state.groups;
|
94481 |
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
94482 |
-
var flags = regexpFlags
|
94483 |
var source = re.source;
|
94484 |
var charsAdded = 0;
|
94485 |
var strCopy = str;
|
94486 |
|
94487 |
if (sticky) {
|
94488 |
-
flags =
|
94489 |
-
if (
|
94490 |
flags += 'g';
|
94491 |
}
|
94492 |
|
94493 |
-
strCopy = str
|
94494 |
// Support anchored sticky behavior.
|
94495 |
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline &&
|
94496 |
source = '(?: ' + source + ')';
|
94497 |
strCopy = ' ' + strCopy;
|
94498 |
charsAdded++;
|
@@ -94507,12 +96659,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94507 |
}
|
94508 |
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
94509 |
|
94510 |
-
match = nativeExec
|
94511 |
|
94512 |
if (sticky) {
|
94513 |
if (match) {
|
94514 |
-
match.input = match.input
|
94515 |
-
match[0] = match[0]
|
94516 |
match.index = re.lastIndex;
|
94517 |
re.lastIndex += match[0].length;
|
94518 |
} else re.lastIndex = 0;
|
@@ -94522,7 +96674,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94522 |
if (NPCG_INCLUDED && match && match.length > 1) {
|
94523 |
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
94524 |
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
94525 |
-
nativeReplace
|
94526 |
for (i = 1; i < arguments.length - 2; i++) {
|
94527 |
if (arguments[i] === undefined) match[i] = undefined;
|
94528 |
}
|
@@ -94557,6 +96709,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94557 |
|
94558 |
|
94559 |
|
|
|
94560 |
var SPECIES$4 = wellKnownSymbol('species');
|
94561 |
var RegExpPrototype$1 = RegExp.prototype;
|
94562 |
|
@@ -94599,17 +96752,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94599 |
!DELEGATES_TO_EXEC ||
|
94600 |
FORCED
|
94601 |
) {
|
94602 |
-
var
|
94603 |
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
|
94604 |
var $exec = regexp.exec;
|
94605 |
if ($exec === regexpExec || $exec === RegExpPrototype$1.exec) {
|
94606 |
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
94607 |
// The native String method already delegates to @@method (this
|
94608 |
// polyfilled function), leasing to infinite recursion.
|
94609 |
// We avoid it by directly calling the native @@method method.
|
94610 |
-
return { done: true, value:
|
94611 |
}
|
94612 |
-
return { done: true, value:
|
94613 |
}
|
94614 |
return { done: false };
|
94615 |
});
|
@@ -94621,19 +96775,26 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94621 |
if (SHAM) createNonEnumerableProperty(RegExpPrototype$1[SYMBOL], 'sham', true);
|
94622 |
};
|
94623 |
|
94624 |
-
|
|
|
|
|
|
|
94625 |
var createMethod$1 = function (CONVERT_TO_STRING) {
|
94626 |
return function ($this, pos) {
|
94627 |
var S = toString_1(requireObjectCoercible($this));
|
94628 |
-
var position =
|
94629 |
var size = S.length;
|
94630 |
var first, second;
|
94631 |
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
94632 |
-
first =
|
94633 |
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
94634 |
-
|| (second =
|
94635 |
-
? CONVERT_TO_STRING
|
94636 |
-
|
|
|
|
|
|
|
|
|
94637 |
};
|
94638 |
};
|
94639 |
|
@@ -94646,31 +96807,27 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94646 |
charAt: createMethod$1(true)
|
94647 |
};
|
94648 |
|
94649 |
-
var charAt = stringMultibyte.charAt;
|
94650 |
|
94651 |
// `AdvanceStringIndex` abstract operation
|
94652 |
// https://tc39.es/ecma262/#sec-advancestringindex
|
94653 |
var advanceStringIndex = function (S, index, unicode) {
|
94654 |
-
return index + (unicode ? charAt(S, index).length : 1);
|
94655 |
};
|
94656 |
|
|
|
|
|
94657 |
// `RegExpExec` abstract operation
|
94658 |
// https://tc39.es/ecma262/#sec-regexpexec
|
94659 |
var regexpExecAbstract = function (R, S) {
|
94660 |
var exec = R.exec;
|
94661 |
-
if (
|
94662 |
-
var result = exec
|
94663 |
-
if (
|
94664 |
-
throw TypeError('RegExp exec method returned something other than an Object or null');
|
94665 |
-
}
|
94666 |
return result;
|
94667 |
}
|
94668 |
-
|
94669 |
-
|
94670 |
-
throw TypeError('RegExp#exec called on incompatible receiver');
|
94671 |
-
}
|
94672 |
-
|
94673 |
-
return regexpExec.call(R, S);
|
94674 |
};
|
94675 |
|
94676 |
// @@match logic
|
@@ -94680,8 +96837,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94680 |
// https://tc39.es/ecma262/#sec-string.prototype.match
|
94681 |
function match(regexp) {
|
94682 |
var O = requireObjectCoercible(this);
|
94683 |
-
var matcher = regexp == undefined ? undefined : regexp
|
94684 |
-
return matcher
|
94685 |
},
|
94686 |
// `RegExp.prototype[@@match]` method
|
94687 |
// https://tc39.es/ecma262/#sec-regexp.prototype-@@match
|
@@ -94713,8 +96870,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94713 |
// `IsArray` abstract operation
|
94714 |
// https://tc39.es/ecma262/#sec-isarray
|
94715 |
// eslint-disable-next-line es/no-array-isarray -- safe
|
94716 |
-
var isArray = Array.isArray || function isArray(
|
94717 |
-
return classofRaw(
|
94718 |
};
|
94719 |
|
94720 |
var createProperty = function (object, key, value) {
|
@@ -94723,7 +96880,45 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94723 |
else object[propertyKey] = value;
|
94724 |
};
|
94725 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94726 |
var SPECIES$3 = wellKnownSymbol('species');
|
|
|
94727 |
|
94728 |
// a part of `ArraySpeciesCreate` abstract operation
|
94729 |
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
@@ -94732,12 +96927,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94732 |
if (isArray(originalArray)) {
|
94733 |
C = originalArray.constructor;
|
94734 |
// cross-realm fallback
|
94735 |
-
if (
|
94736 |
else if (isObject(C)) {
|
94737 |
C = C[SPECIES$3];
|
94738 |
if (C === null) C = undefined;
|
94739 |
}
|
94740 |
-
} return C === undefined ? Array : C;
|
94741 |
};
|
94742 |
|
94743 |
// `ArraySpeciesCreate` abstract operation
|
@@ -94765,6 +96960,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94765 |
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
94766 |
var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
|
94767 |
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
|
|
94768 |
|
94769 |
// We can't use this feature detection in V8 since it causes
|
94770 |
// deoptimization and serious performance degradation
|
@@ -94798,11 +96994,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94798 |
for (i = -1, length = arguments.length; i < length; i++) {
|
94799 |
E = i === -1 ? O : arguments[i];
|
94800 |
if (isConcatSpreadable(E)) {
|
94801 |
-
len =
|
94802 |
-
if (n + len > MAX_SAFE_INTEGER$1) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
94803 |
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
94804 |
} else {
|
94805 |
-
if (n >= MAX_SAFE_INTEGER$1) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
94806 |
createProperty(A, n++, E);
|
94807 |
}
|
94808 |
}
|
@@ -94811,36 +97007,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94811 |
}
|
94812 |
});
|
94813 |
|
94814 |
-
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
94815 |
-
var test$1 = {};
|
94816 |
-
|
94817 |
-
test$1[TO_STRING_TAG$1] = 'z';
|
94818 |
-
|
94819 |
-
var toStringTagSupport = String(test$1) === '[object z]';
|
94820 |
-
|
94821 |
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
94822 |
-
// ES3 wrong here
|
94823 |
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
94824 |
-
|
94825 |
-
// fallback for IE11 Script Access Denied error
|
94826 |
-
var tryGet = function (it, key) {
|
94827 |
-
try {
|
94828 |
-
return it[key];
|
94829 |
-
} catch (error) { /* empty */ }
|
94830 |
-
};
|
94831 |
-
|
94832 |
-
// getting tag from ES6+ `Object.prototype.toString`
|
94833 |
-
var classof = toStringTagSupport ? classofRaw : function (it) {
|
94834 |
-
var O, tag, result;
|
94835 |
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
94836 |
-
// @@toStringTag case
|
94837 |
-
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
|
94838 |
-
// builtinTag case
|
94839 |
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
94840 |
-
// ES3 arguments fallback
|
94841 |
-
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
|
94842 |
-
};
|
94843 |
-
|
94844 |
// `Object.prototype.toString` method implementation
|
94845 |
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
94846 |
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
@@ -94853,13 +97019,22 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94853 |
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
|
94854 |
}
|
94855 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94856 |
var TO_STRING = 'toString';
|
94857 |
var RegExpPrototype = RegExp.prototype;
|
94858 |
-
var
|
|
|
94859 |
|
94860 |
-
var NOT_GENERIC = fails(function () { return
|
94861 |
// FF44- RegExp#toString has a wrong name
|
94862 |
-
var INCORRECT_NAME =
|
94863 |
|
94864 |
// `RegExp.prototype.toString` method
|
94865 |
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
@@ -94868,11 +97043,21 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94868 |
var R = anObject(this);
|
94869 |
var p = toString_1(R.source);
|
94870 |
var rf = R.flags;
|
94871 |
-
var f = toString_1(rf === undefined && R
|
94872 |
return '/' + p + '/' + f;
|
94873 |
}, { unsafe: true });
|
94874 |
}
|
94875 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94876 |
var MATCH$1 = wellKnownSymbol('match');
|
94877 |
|
94878 |
// `IsRegExp` abstract operation
|
@@ -94882,10 +97067,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94882 |
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
94883 |
};
|
94884 |
|
94885 |
-
var
|
94886 |
-
|
94887 |
-
|
94888 |
-
|
|
|
|
|
94889 |
};
|
94890 |
|
94891 |
var SPECIES$1 = wellKnownSymbol('species');
|
@@ -94895,13 +97082,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94895 |
var speciesConstructor = function (O, defaultConstructor) {
|
94896 |
var C = anObject(O).constructor;
|
94897 |
var S;
|
94898 |
-
return C === undefined || (S = anObject(C)[SPECIES$1]) == undefined ? defaultConstructor :
|
94899 |
};
|
94900 |
|
|
|
|
|
94901 |
var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y;
|
94902 |
-
var arrayPush = [].push;
|
94903 |
-
var min$2 = Math.min;
|
94904 |
var MAX_UINT32 = 0xFFFFFFFF;
|
|
|
|
|
|
|
|
|
|
|
94905 |
|
94906 |
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
94907 |
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
@@ -94923,7 +97115,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94923 |
'test'.split(/(?:)/, -1).length != 4 ||
|
94924 |
'ab'.split(/(?:ab)*/).length != 2 ||
|
94925 |
'.'.split(/(.?)(.?)/).length != 4 ||
|
94926 |
-
// eslint-disable-next-line regexp/no-
|
94927 |
'.'.split(/()()/).length > 1 ||
|
94928 |
''.split(/.?/).length
|
94929 |
) {
|
@@ -94935,7 +97127,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94935 |
if (separator === undefined) return [string];
|
94936 |
// If `separator` is not a regex, use native split
|
94937 |
if (!isRegexp(separator)) {
|
94938 |
-
return nativeSplit
|
94939 |
}
|
94940 |
var output = [];
|
94941 |
var flags = (separator.ignoreCase ? 'i' : '') +
|
@@ -94946,11 +97138,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94946 |
// Make `global` and avoid `lastIndex` issues by working with a copy
|
94947 |
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
94948 |
var match, lastIndex, lastLength;
|
94949 |
-
while (match = regexpExec
|
94950 |
lastIndex = separatorCopy.lastIndex;
|
94951 |
if (lastIndex > lastLastIndex) {
|
94952 |
-
|
94953 |
-
if (match.length > 1 && match.index < string.length)
|
94954 |
lastLength = match[0].length;
|
94955 |
lastLastIndex = lastIndex;
|
94956 |
if (output.length >= lim) break;
|
@@ -94958,14 +97150,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94958 |
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
94959 |
}
|
94960 |
if (lastLastIndex === string.length) {
|
94961 |
-
if (lastLength || !separatorCopy
|
94962 |
-
} else
|
94963 |
-
return output.length > lim ? output
|
94964 |
};
|
94965 |
// Chakra, V8
|
94966 |
} else if ('0'.split(undefined, 0).length) {
|
94967 |
internalSplit = function (separator, limit) {
|
94968 |
-
return separator === undefined && limit === 0 ? [] : nativeSplit
|
94969 |
};
|
94970 |
} else internalSplit = nativeSplit;
|
94971 |
|
@@ -94974,10 +97166,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
94974 |
// https://tc39.es/ecma262/#sec-string.prototype.split
|
94975 |
function split(separator, limit) {
|
94976 |
var O = requireObjectCoercible(this);
|
94977 |
-
var splitter = separator == undefined ? undefined : separator
|
94978 |
-
return splitter
|
94979 |
-
? splitter
|
94980 |
-
: internalSplit
|
94981 |
},
|
94982 |
// `RegExp.prototype[@@split]` method
|
94983 |
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
@@ -95010,7 +97202,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95010 |
var A = [];
|
95011 |
while (q < S.length) {
|
95012 |
splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
|
95013 |
-
var z = regexpExecAbstract(splitter, UNSUPPORTED_Y ? S
|
95014 |
var e;
|
95015 |
if (
|
95016 |
z === null ||
|
@@ -95018,16 +97210,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95018 |
) {
|
95019 |
q = advanceStringIndex(S, q, unicodeMatching);
|
95020 |
} else {
|
95021 |
-
|
95022 |
if (A.length === lim) return A;
|
95023 |
for (var i = 1; i <= z.length - 1; i++) {
|
95024 |
-
|
95025 |
if (A.length === lim) return A;
|
95026 |
}
|
95027 |
q = p = e;
|
95028 |
}
|
95029 |
}
|
95030 |
-
|
95031 |
return A;
|
95032 |
}
|
95033 |
];
|
@@ -95243,6 +97435,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95243 |
var $assign = Object.assign;
|
95244 |
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
95245 |
var defineProperty = Object.defineProperty;
|
|
|
95246 |
|
95247 |
// `Object.assign` method
|
95248 |
// https://tc39.es/ecma262/#sec-object.assign
|
@@ -95274,13 +97467,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95274 |
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
95275 |
while (argumentsLength > index) {
|
95276 |
var S = indexedObject(arguments[index++]);
|
95277 |
-
var keys = getOwnPropertySymbols ? objectKeys(S)
|
95278 |
var length = keys.length;
|
95279 |
var j = 0;
|
95280 |
var key;
|
95281 |
while (length > j) {
|
95282 |
key = keys[j++];
|
95283 |
-
if (!descriptors || propertyIsEnumerable
|
95284 |
}
|
95285 |
} return T;
|
95286 |
} : $assign;
|
@@ -95363,7 +97556,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95363 |
}
|
95364 |
|
95365 |
var floor$1 = Math.floor;
|
95366 |
-
var
|
|
|
|
|
95367 |
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
95368 |
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
95369 |
|
@@ -95377,15 +97572,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95377 |
namedCaptures = toObject(namedCaptures);
|
95378 |
symbols = SUBSTITUTION_SYMBOLS;
|
95379 |
}
|
95380 |
-
return replace
|
95381 |
var capture;
|
95382 |
-
switch (
|
95383 |
case '$': return '$';
|
95384 |
case '&': return matched;
|
95385 |
-
case '`': return str
|
95386 |
-
case "'": return str
|
95387 |
case '<':
|
95388 |
-
capture = namedCaptures[ch
|
95389 |
break;
|
95390 |
default: // \d\d?
|
95391 |
var n = +ch;
|
@@ -95393,7 +97588,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95393 |
if (n > m) {
|
95394 |
var f = floor$1(n / 10);
|
95395 |
if (f === 0) return match;
|
95396 |
-
if (f <= m) return captures[f - 1] === undefined ?
|
95397 |
return match;
|
95398 |
}
|
95399 |
capture = captures[n - 1];
|
@@ -95405,6 +97600,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95405 |
var REPLACE = wellKnownSymbol('replace');
|
95406 |
var max$2 = Math.max;
|
95407 |
var min$1 = Math.min;
|
|
|
|
|
|
|
|
|
95408 |
|
95409 |
var maybeToString = function (it) {
|
95410 |
return it === undefined ? it : String(it);
|
@@ -95432,6 +97631,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95432 |
result.groups = { a: '7' };
|
95433 |
return result;
|
95434 |
};
|
|
|
95435 |
return ''.replace(re, '$<a>') !== '7';
|
95436 |
});
|
95437 |
|
@@ -95444,10 +97644,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95444 |
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
95445 |
function replace(searchValue, replaceValue) {
|
95446 |
var O = requireObjectCoercible(this);
|
95447 |
-
var replacer = searchValue == undefined ? undefined : searchValue
|
95448 |
-
return replacer
|
95449 |
-
? replacer
|
95450 |
-
: nativeReplace
|
95451 |
},
|
95452 |
// `RegExp.prototype[@@replace]` method
|
95453 |
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
@@ -95456,15 +97656,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95456 |
var S = toString_1(string);
|
95457 |
|
95458 |
if (
|
95459 |
-
typeof replaceValue
|
95460 |
-
replaceValue
|
95461 |
-
replaceValue
|
95462 |
) {
|
95463 |
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
95464 |
if (res.done) return res.value;
|
95465 |
}
|
95466 |
|
95467 |
-
var functionalReplace =
|
95468 |
if (!functionalReplace) replaceValue = toString_1(replaceValue);
|
95469 |
|
95470 |
var global = rx.global;
|
@@ -95477,7 +97677,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95477 |
var result = regexpExecAbstract(rx, S);
|
95478 |
if (result === null) break;
|
95479 |
|
95480 |
-
|
95481 |
if (!global) break;
|
95482 |
|
95483 |
var matchStr = toString_1(result[0]);
|
@@ -95490,28 +97690,28 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95490 |
result = results[i];
|
95491 |
|
95492 |
var matched = toString_1(result[0]);
|
95493 |
-
var position = max$2(min$1(
|
95494 |
var captures = [];
|
95495 |
// NOTE: This is equivalent to
|
95496 |
// captures = result.slice(1).map(maybeToString)
|
95497 |
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
95498 |
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
95499 |
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
95500 |
-
for (var j = 1; j < result.length; j++)
|
95501 |
var namedCaptures = result.groups;
|
95502 |
if (functionalReplace) {
|
95503 |
-
var replacerArgs = [matched]
|
95504 |
-
if (namedCaptures !== undefined)
|
95505 |
-
var replacement = toString_1(replaceValue
|
95506 |
} else {
|
95507 |
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
95508 |
}
|
95509 |
if (position >= nextSourcePosition) {
|
95510 |
-
accumulatedResult += S
|
95511 |
nextSourcePosition = position + matched.length;
|
95512 |
}
|
95513 |
}
|
95514 |
-
return accumulatedResult + S
|
95515 |
}
|
95516 |
];
|
95517 |
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
@@ -95631,7 +97831,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95631 |
var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('slice');
|
95632 |
|
95633 |
var SPECIES = wellKnownSymbol('species');
|
95634 |
-
var
|
95635 |
var max$1 = Math.max;
|
95636 |
|
95637 |
// `Array.prototype.slice` method
|
@@ -95640,7 +97840,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95640 |
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
|
95641 |
slice: function slice(start, end) {
|
95642 |
var O = toIndexedObject(this);
|
95643 |
-
var length =
|
95644 |
var k = toAbsoluteIndex(start, length);
|
95645 |
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
95646 |
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
|
@@ -95648,26 +97848,28 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95648 |
if (isArray(O)) {
|
95649 |
Constructor = O.constructor;
|
95650 |
// cross-realm fallback
|
95651 |
-
if (
|
95652 |
Constructor = undefined;
|
95653 |
} else if (isObject(Constructor)) {
|
95654 |
Constructor = Constructor[SPECIES];
|
95655 |
if (Constructor === null) Constructor = undefined;
|
95656 |
}
|
95657 |
-
if (Constructor === Array || Constructor === undefined) {
|
95658 |
-
return
|
95659 |
}
|
95660 |
}
|
95661 |
-
result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
|
95662 |
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
95663 |
result.length = n;
|
95664 |
return result;
|
95665 |
}
|
95666 |
});
|
95667 |
|
|
|
|
|
95668 |
var notARegexp = function (it) {
|
95669 |
if (isRegexp(it)) {
|
95670 |
-
throw TypeError("The method doesn't accept regular expressions");
|
95671 |
} return it;
|
95672 |
};
|
95673 |
|
@@ -95685,12 +97887,17 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95685 |
} return false;
|
95686 |
};
|
95687 |
|
|
|
|
|
95688 |
// `String.prototype.includes` method
|
95689 |
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
95690 |
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
95691 |
includes: function includes(searchString /* , position = 0 */) {
|
95692 |
-
return !!~
|
95693 |
-
|
|
|
|
|
|
|
95694 |
}
|
95695 |
});
|
95696 |
|
@@ -95702,7 +97909,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95702 |
});
|
95703 |
};
|
95704 |
|
95705 |
-
var
|
95706 |
|
95707 |
var ES3_STRINGS = indexedObject != Object;
|
95708 |
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
@@ -95711,34 +97918,21 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95711 |
// https://tc39.es/ecma262/#sec-array.prototype.join
|
95712 |
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
95713 |
join: function join(separator) {
|
95714 |
-
return
|
95715 |
}
|
95716 |
});
|
95717 |
|
|
|
|
|
95718 |
// optional / simple context binding
|
95719 |
-
var functionBindContext = function (fn, that
|
95720 |
-
|
95721 |
-
|
95722 |
-
switch (length) {
|
95723 |
-
case 0: return function () {
|
95724 |
-
return fn.call(that);
|
95725 |
-
};
|
95726 |
-
case 1: return function (a) {
|
95727 |
-
return fn.call(that, a);
|
95728 |
-
};
|
95729 |
-
case 2: return function (a, b) {
|
95730 |
-
return fn.call(that, a, b);
|
95731 |
-
};
|
95732 |
-
case 3: return function (a, b, c) {
|
95733 |
-
return fn.call(that, a, b, c);
|
95734 |
-
};
|
95735 |
-
}
|
95736 |
-
return function (/* ...args */) {
|
95737 |
return fn.apply(that, arguments);
|
95738 |
};
|
95739 |
};
|
95740 |
|
95741 |
-
var push = [].push;
|
95742 |
|
95743 |
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
95744 |
var createMethod = function (TYPE) {
|
@@ -95752,8 +97946,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95752 |
return function ($this, callbackfn, that, specificCreate) {
|
95753 |
var O = toObject($this);
|
95754 |
var self = indexedObject(O);
|
95755 |
-
var boundFunction = functionBindContext(callbackfn, that
|
95756 |
-
var length =
|
95757 |
var index = 0;
|
95758 |
var create = specificCreate || arraySpeciesCreate;
|
95759 |
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
@@ -95767,10 +97961,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95767 |
case 3: return true; // some
|
95768 |
case 5: return value; // find
|
95769 |
case 6: return index; // findIndex
|
95770 |
-
case 2: push
|
95771 |
} else switch (TYPE) {
|
95772 |
case 4: return false; // every
|
95773 |
-
case 7: push
|
95774 |
}
|
95775 |
}
|
95776 |
}
|
@@ -95853,6 +98047,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95853 |
|
95854 |
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
|
95855 |
|
|
|
95856 |
var max = Math.max;
|
95857 |
var min = Math.min;
|
95858 |
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
@@ -95864,7 +98059,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95864 |
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
95865 |
splice: function splice(start, deleteCount /* , ...items */) {
|
95866 |
var O = toObject(this);
|
95867 |
-
var len =
|
95868 |
var actualStart = toAbsoluteIndex(start, len);
|
95869 |
var argumentsLength = arguments.length;
|
95870 |
var insertCount, actualDeleteCount, A, k, from, to;
|
@@ -95875,10 +98070,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
95875 |
actualDeleteCount = len - actualStart;
|
95876 |
} else {
|
95877 |
insertCount = argumentsLength - 2;
|
95878 |
-
actualDeleteCount = min(max(
|
95879 |
}
|
95880 |
if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
|
95881 |
-
throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
|
95882 |
}
|
95883 |
A = arraySpeciesCreate(O, actualDeleteCount);
|
95884 |
for (k = 0; k < actualDeleteCount; k++) {
|
@@ -96578,7 +98773,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
96578 |
nextStep.call(self);
|
96579 |
} else if (/introjs-donebutton/gi.test(nextTooltipButton.className)) {
|
96580 |
if (typeof self._introCompleteCallback === "function") {
|
96581 |
-
self._introCompleteCallback.call(self);
|
96582 |
}
|
96583 |
|
96584 |
exitIntro.call(self, self._targetElement);
|
@@ -96607,7 +98802,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
96607 |
|
96608 |
skipTooltipButton.onclick = function () {
|
96609 |
if (self._introItems.length - 1 === self._currentStep && typeof self._introCompleteCallback === "function") {
|
96610 |
-
self._introCompleteCallback.call(self);
|
96611 |
}
|
96612 |
|
96613 |
if (typeof self._introSkipCallback === "function") {
|
@@ -96800,7 +98995,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
96800 |
//end of the intro
|
96801 |
//check if any callback is defined
|
96802 |
if (typeof this._introCompleteCallback === "function") {
|
96803 |
-
this._introCompleteCallback.call(this);
|
96804 |
}
|
96805 |
|
96806 |
exitIntro.call(this, this._targetElement);
|
@@ -96895,7 +99090,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
96895 |
} else if (target && target.className.match("introjs-skipbutton")) {
|
96896 |
//user hit enter while focusing on skip button
|
96897 |
if (this._introItems.length - 1 === this._currentStep && typeof this._introCompleteCallback === "function") {
|
96898 |
-
this._introCompleteCallback.call(this);
|
96899 |
}
|
96900 |
|
96901 |
exitIntro.call(this, this._targetElement);
|
@@ -96939,6 +99134,22 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
96939 |
return temp;
|
96940 |
}
|
96941 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96942 |
/**
|
96943 |
* Get a queryselector within the hint wrapper
|
96944 |
*
|
@@ -97034,6 +99245,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97034 |
forEach(hints, function (hint) {
|
97035 |
removeHint.call(_this3, hint.getAttribute("data-step"));
|
97036 |
});
|
|
|
|
|
|
|
97037 |
}
|
97038 |
/**
|
97039 |
* Remove one single hint element from the page
|
@@ -97137,6 +99351,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97137 |
if (typeof this._hintsAddedCallback !== "undefined") {
|
97138 |
this._hintsAddedCallback.call(this);
|
97139 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97140 |
}
|
97141 |
/**
|
97142 |
* Aligns hint position
|
@@ -97246,13 +99467,17 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97246 |
tooltipTextLayer.className = "introjs-tooltiptext";
|
97247 |
var tooltipWrapper = _createElement("p");
|
97248 |
tooltipWrapper.innerHTML = item.hint;
|
97249 |
-
var closeButton = _createElement("a");
|
97250 |
-
closeButton.className = this._options.buttonClass;
|
97251 |
-
closeButton.setAttribute("role", "button");
|
97252 |
-
closeButton.innerHTML = this._options.hintButtonLabel;
|
97253 |
-
closeButton.onclick = hideHint.bind(this, stepId);
|
97254 |
tooltipTextLayer.appendChild(tooltipWrapper);
|
97255 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97256 |
arrowLayer.className = "introjs-arrow";
|
97257 |
tooltipLayer.appendChild(arrowLayer);
|
97258 |
tooltipLayer.appendChild(tooltipTextLayer); // set current step for _placeTooltip function
|
@@ -97342,11 +99567,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97342 |
}
|
97343 |
|
97344 |
addHints.call(this);
|
97345 |
-
/*
|
97346 |
-
todo:
|
97347 |
-
these events should be removed at some point
|
97348 |
-
*/
|
97349 |
-
|
97350 |
DOMEvent.on(document, "click", removeHintTooltip, this, false);
|
97351 |
DOMEvent.on(window, "resize", reAlignHints, this, true);
|
97352 |
}
|
@@ -97373,15 +99593,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97373 |
});
|
97374 |
}
|
97375 |
|
97376 |
-
// TODO: use something more complex like timsort?
|
97377 |
var floor = Math.floor;
|
97378 |
|
97379 |
var mergeSort = function (array, comparefn) {
|
97380 |
var length = array.length;
|
97381 |
var middle = floor(length / 2);
|
97382 |
return length < 8 ? insertionSort(array, comparefn) : merge(
|
97383 |
-
|
97384 |
-
mergeSort(array
|
|
|
97385 |
comparefn
|
97386 |
);
|
97387 |
};
|
@@ -97401,20 +99621,17 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97401 |
} return array;
|
97402 |
};
|
97403 |
|
97404 |
-
var merge = function (left, right, comparefn) {
|
97405 |
var llength = left.length;
|
97406 |
var rlength = right.length;
|
97407 |
var lindex = 0;
|
97408 |
var rindex = 0;
|
97409 |
-
var result = [];
|
97410 |
|
97411 |
while (lindex < llength || rindex < rlength) {
|
97412 |
-
|
97413 |
-
|
97414 |
-
|
97415 |
-
|
97416 |
-
}
|
97417 |
-
} return result;
|
97418 |
};
|
97419 |
|
97420 |
var arraySort = mergeSort;
|
@@ -97430,7 +99647,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97430 |
var engineWebkitVersion = !!webkit && +webkit[1];
|
97431 |
|
97432 |
var test = [];
|
97433 |
-
var
|
|
|
97434 |
|
97435 |
// IE8-
|
97436 |
var FAILS_ON_UNDEFINED = fails(function () {
|
@@ -97493,21 +99711,22 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97493 |
// https://tc39.es/ecma262/#sec-array.prototype.sort
|
97494 |
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
97495 |
sort: function sort(comparefn) {
|
97496 |
-
if (comparefn !== undefined)
|
97497 |
|
97498 |
var array = toObject(this);
|
97499 |
|
97500 |
-
if (STABLE_SORT) return comparefn === undefined ?
|
97501 |
|
97502 |
var items = [];
|
97503 |
-
var arrayLength =
|
97504 |
var itemsLength, index;
|
97505 |
|
97506 |
for (index = 0; index < arrayLength; index++) {
|
97507 |
-
if (index in array)
|
97508 |
}
|
97509 |
|
97510 |
-
|
|
|
97511 |
itemsLength = items.length;
|
97512 |
index = 0;
|
97513 |
|
@@ -97697,7 +99916,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97697 |
if (this._currentStep !== undefined && this._currentStep !== null) {
|
97698 |
var oldArrowLayer = document.querySelector(".introjs-arrow");
|
97699 |
var oldtooltipContainer = document.querySelector(".introjs-tooltip");
|
97700 |
-
|
|
|
|
|
|
|
97701 |
} //re-align hints
|
97702 |
|
97703 |
|
@@ -97838,7 +100060,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97838 |
*/
|
97839 |
|
97840 |
function introForElement(targetElm) {
|
97841 |
-
|
|
|
|
|
|
|
|
|
97842 |
var steps = fetchIntroSteps.call(this, targetElm);
|
97843 |
|
97844 |
if (steps.length === 0) {
|
@@ -97862,7 +100088,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97862 |
return false;
|
97863 |
}
|
97864 |
|
97865 |
-
var version = "4.
|
97866 |
|
97867 |
/**
|
97868 |
* IntroJs main class
|
@@ -97962,6 +100188,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
97962 |
/* Hint button label */
|
97963 |
hintButtonLabel: "Got it",
|
97964 |
|
|
|
|
|
|
|
|
|
|
|
|
|
97965 |
/* Adding animation to hints? */
|
97966 |
hintAnimation: true,
|
97967 |
|
@@ -98145,6 +100377,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
98145 |
|
98146 |
return this;
|
98147 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98148 |
onexit: function onexit(providedCallback) {
|
98149 |
if (typeof providedCallback === "function") {
|
98150 |
this._introExitCallback = providedCallback;
|
@@ -98215,7 +100456,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
98215 |
|
98216 |
return introJs;
|
98217 |
|
98218 |
-
}))
|
98219 |
|
98220 |
|
98221 |
/***/ }),
|
@@ -102399,6 +104640,59 @@ function arrayFilter(array, predicate) {
|
|
102399 |
module.exports = arrayFilter;
|
102400 |
|
102401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
*
|
10 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
11 |
*
|
12 |
+
* (C) 2017-2022 Buttonizer v2.6.0
|
13 |
*
|
14 |
*/
|
15 |
/*!
|
23 |
*
|
24 |
* Buttonizer is Freemium software. The free version (build) does not contain premium functionality.
|
25 |
*
|
26 |
+
* (C) 2017-2022 Buttonizer v2.6.0
|
27 |
*
|
28 |
*/
|
29 |
/******/ (function() { // webpackBootstrap
|
5497 |
|
5498 |
/***/ }),
|
5499 |
|
5500 |
+
/***/ 99601:
|
5501 |
+
/***/ (function(__unused_webpack_module, exports) {
|
5502 |
+
|
5503 |
+
"use strict";
|
5504 |
+
var __webpack_unused_export__;
|
5505 |
+
|
5506 |
+
__webpack_unused_export__ = ({ value: true });
|
5507 |
+
function composeRefs() {
|
5508 |
+
var refs = [];
|
5509 |
+
for (var _i = 0; _i < arguments.length; _i++) {
|
5510 |
+
refs[_i] = arguments[_i];
|
5511 |
+
}
|
5512 |
+
if (refs.length === 2) { // micro-optimize the hot path
|
5513 |
+
return composeTwoRefs(refs[0], refs[1]) || null;
|
5514 |
+
}
|
5515 |
+
var composedRef = refs.slice(1).reduce(function (semiCombinedRef, refToInclude) { return composeTwoRefs(semiCombinedRef, refToInclude); }, refs[0]);
|
5516 |
+
return composedRef || null;
|
5517 |
+
}
|
5518 |
+
exports.Z = composeRefs;
|
5519 |
+
var composedRefCache = new WeakMap();
|
5520 |
+
function composeTwoRefs(ref1, ref2) {
|
5521 |
+
if (ref1 && ref2) {
|
5522 |
+
var ref1Cache = composedRefCache.get(ref1) || new WeakMap();
|
5523 |
+
composedRefCache.set(ref1, ref1Cache);
|
5524 |
+
var composedRef = ref1Cache.get(ref2) || (function (instance) {
|
5525 |
+
updateRef(ref1, instance);
|
5526 |
+
updateRef(ref2, instance);
|
5527 |
+
});
|
5528 |
+
ref1Cache.set(ref2, composedRef);
|
5529 |
+
return composedRef;
|
5530 |
+
}
|
5531 |
+
if (!ref1) {
|
5532 |
+
return ref2;
|
5533 |
+
}
|
5534 |
+
else {
|
5535 |
+
return ref1;
|
5536 |
+
}
|
5537 |
+
}
|
5538 |
+
function updateRef(ref, instance) {
|
5539 |
+
if (typeof ref === 'function') {
|
5540 |
+
ref(instance);
|
5541 |
+
}
|
5542 |
+
else {
|
5543 |
+
ref.current = instance;
|
5544 |
+
}
|
5545 |
+
}
|
5546 |
+
//# sourceMappingURL=composeRefs.js.map
|
5547 |
+
|
5548 |
+
/***/ }),
|
5549 |
+
|
5550 |
/***/ 9669:
|
5551 |
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
5552 |
|
7519 |
/***/ (function(module) {
|
7520 |
|
7521 |
"use strict";
|
7522 |
+
module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}');
|
7523 |
|
7524 |
/***/ }),
|
7525 |
|
7526 |
+
/***/ 11893:
|
7527 |
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
7528 |
|
7529 |
"use strict";
|
8321 |
reset: "reset"
|
8322 |
},
|
8323 |
BUTTONIZER_TOUR: "buttonizertour",
|
8324 |
+
WELCOME_DIALOG: "welcome-splash",
|
8325 |
TIME_SCHEDULES: "timeschedules",
|
8326 |
PAGE_RULES: "pagerules"
|
8327 |
};
|
8486 |
;// CONCATENATED MODULE: ./src/js/utils/utils/data-utils.js
|
8487 |
/* global Map */
|
8488 |
|
8489 |
+
var cache = new Map();
|
8490 |
function dateToFormat(date) {
|
8491 |
if (!date) return null;
|
8492 |
|
8507 |
var dateParts = format.split("-");
|
8508 |
return new Date(dateParts[2], dateParts[1] - 1, dateParts[0]);
|
8509 |
}
|
8510 |
+
var importIcons = function importIcons() {
|
8511 |
+
var icon_library = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "fontawesome";
|
8512 |
+
var icon_library_version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "5.free";
|
8513 |
+
var url = buttonizer_admin.assets + "/icon_definitions/" + icon_library + "." + icon_library_version + ".json?buttonizer-icon-cache=" + buttonizer_admin.version;
|
8514 |
+
if (cache.has(url)) return cache.get(url);
|
8515 |
+
var value = axios_default()({
|
8516 |
+
url: url,
|
8517 |
+
dataType: "json",
|
8518 |
+
method: "get"
|
8519 |
+
});
|
8520 |
+
cache.set(url, value);
|
8521 |
+
return value;
|
8522 |
+
}; // export const importTemplates = (() => {
|
8523 |
+
// return () => {
|
8524 |
+
// const url =
|
8525 |
+
// buttonizer_admin.assets +
|
8526 |
+
// "/templates/templates.json?buttonizer-icon-cache=" +
|
8527 |
+
// buttonizer_admin.version;
|
8528 |
+
// if (cache.has(url)) return cache.get(url);
|
8529 |
+
// const value = Axios({
|
8530 |
+
// url,
|
8531 |
+
// });
|
8532 |
+
// cache.set(url, value);
|
8533 |
+
// return value;
|
8534 |
+
// };
|
8535 |
+
// })();
|
8536 |
+
|
8537 |
+
var importTemplates = function importTemplates() {
|
8538 |
+
var url = buttonizer_admin.assets + "/templates/templates.json?buttonizer-icon-cache=" + buttonizer_admin.version;
|
8539 |
+
return new Promise(function (resolve, reject) {
|
8540 |
+
if (cache.has(url)) resolve(cache.get(url));
|
8541 |
+
axios_default()({
|
8542 |
+
url: url
|
8543 |
+
}).then(function (data) {
|
8544 |
+
cache.set(url, data.data);
|
8545 |
+
resolve(data.data);
|
8546 |
+
})["catch"](function (e) {
|
8547 |
+
return reject({
|
8548 |
+
message: "Something went wrong",
|
8549 |
+
error: e
|
8550 |
+
});
|
8551 |
});
|
8552 |
+
});
|
8553 |
+
};
|
|
|
|
|
8554 |
// EXTERNAL MODULE: ./node_modules/uuid/v4.js
|
8555 |
var v4 = __webpack_require__(71171);
|
8556 |
var v4_default = /*#__PURE__*/__webpack_require__.n(v4);
|
8623 |
|
8624 |
function helpers_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
8625 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8626 |
|
8627 |
|
8628 |
|
8629 |
|
8630 |
|
8631 |
+
var previousFailedRequest = {
|
8632 |
+
resolve: null,
|
8633 |
+
endpoint: null,
|
8634 |
+
data: null
|
8635 |
+
};
|
8636 |
/**
|
8637 |
* Create api request
|
8638 |
*maar j
|
8641 |
*/
|
8642 |
|
8643 |
function apiRequest(endpoint, data) {
|
8644 |
+
var failedEarlier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
8645 |
+
data.url = buttonizer_admin.api + endpoint; // Stand alone version
|
8646 |
+
|
8647 |
+
if (buttonizer_admin.is_stand_alone) {
|
8648 |
+
data.headers = {
|
8649 |
+
Authorization: "Bearer ".concat(buttonizer_admin.auth)
|
8650 |
+
};
|
8651 |
+
} // WordPress version
|
8652 |
+
else {
|
8653 |
+
data.headers = {
|
8654 |
+
"X-WP-Nonce": buttonizer_admin.nonce
|
8655 |
+
};
|
8656 |
+
} // With credentials
|
8657 |
+
|
8658 |
+
|
8659 |
+
data.withCredentials = true;
|
8660 |
+
return new Promise(function (resolve, reject) {
|
8661 |
+
axios_default()(data).then(function (data) {
|
8662 |
+
return resolve(data);
|
8663 |
+
})["catch"](function (err) {
|
8664 |
+
// User unauthenticated
|
8665 |
+
if (!failedEarlier && err.response && err.response.status === 401) {
|
8666 |
+
if (app.standAloneEvent) {
|
8667 |
+
app.standAloneEvent("unauthenticated");
|
8668 |
+
} // Populate failed request
|
8669 |
+
// Re-use this data after re-authorization
|
8670 |
+
|
8671 |
+
|
8672 |
+
previousFailedRequest = {
|
8673 |
+
resolve: resolve,
|
8674 |
+
endpoint: endpoint,
|
8675 |
+
data: data
|
8676 |
+
};
|
8677 |
+
return;
|
8678 |
+
}
|
8679 |
+
|
8680 |
+
if (app.standAloneEvent) {
|
8681 |
+
app.standAloneEvent("unauthenticated");
|
8682 |
+
}
|
8683 |
+
|
8684 |
+
reject(err);
|
8685 |
+
});
|
8686 |
+
});
|
8687 |
+
}
|
8688 |
+
function retryApiRequest() {
|
8689 |
+
// Data empty
|
8690 |
+
if (!previousFailedRequest.resolve) {
|
8691 |
+
throw new Error(previousFailedRequest);
|
8692 |
+
}
|
8693 |
+
|
8694 |
+
return new Promise(function (resolve, reject) {
|
8695 |
+
apiRequest(previousFailedRequest.endpoint, previousFailedRequest.data).then(function (data) {
|
8696 |
+
previousFailedRequest.resolve(data);
|
8697 |
+
resolve();
|
8698 |
+
})["catch"](function (e) {
|
8699 |
+
return reject(e);
|
8700 |
+
});
|
8701 |
+
});
|
8702 |
}
|
8703 |
/**
|
8704 |
* init store
|
8728 |
var buttons = {};
|
8729 |
var groups = {}; // Initializing groups
|
8730 |
|
8731 |
+
data.groups.map(function (group) {
|
8732 |
+
var groupObject = createRecord(group.data);
|
8733 |
+
groupObject.children = []; // Initializing buttons inside the group
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8734 |
|
8735 |
+
Object.keys(group.buttons).map(function (key) {
|
8736 |
+
var button = group.buttons[key];
|
8737 |
+
var buttonObject = createRecord(button);
|
8738 |
+
buttonObject.parent = groupObject.id;
|
8739 |
+
buttons[buttonObject.id] = buttonObject;
|
8740 |
+
groupObject.children.push(buttonObject.id);
|
8741 |
+
});
|
8742 |
+
groups[groupObject.id] = groupObject;
|
8743 |
+
});
|
8744 |
var timeSchedules = {};
|
8745 |
var pageRules = {};
|
8746 |
|
8790 |
premium_code: data.premium_code,
|
8791 |
version: data.version,
|
8792 |
wordpress: data.wordpress,
|
8793 |
+
info: data.info,
|
8794 |
is_opt_in: data.is_opt_in,
|
8795 |
latest_tour_update: data.latest_tour_update,
|
8796 |
+
identifier: data.identifier ? data.identifier : null,
|
8797 |
+
additional_permissions: data.additional_permissions,
|
8798 |
+
domain: data.domain
|
8799 |
};
|
8800 |
}
|
8801 |
function createRecord(data) {
|
9075 |
});
|
9076 |
return data;
|
9077 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9078 |
/**
|
9079 |
* Reset Buttonizer
|
9080 |
*/
|
9081 |
|
9082 |
function resetSettings() {
|
9083 |
+
return apiRequest("/reset", {
|
9084 |
method: "POST",
|
9085 |
data: {
|
9086 |
nonce: buttonizer_admin.nonce
|
11550 |
* Reload preview
|
11551 |
*/
|
11552 |
|
11553 |
+
function reloadPreview(forceReloadPreview, newGroupId) {
|
11554 |
// Post reload buttonizer
|
11555 |
try {
|
11556 |
document.querySelector(".buttonizer-preview iframe").contentWindow.postMessage({
|
11557 |
eventType: "buttonizer",
|
11558 |
messageType: "preview-reload",
|
11559 |
message: {
|
11560 |
+
force: forceReloadPreview,
|
11561 |
+
newGroupId: newGroupId
|
11562 |
}
|
11563 |
}, document.location.origin);
|
11564 |
} catch (e) {
|
11674 |
Queue_defineProperty(SavingQueue, "workingOnPromise", false);
|
11675 |
|
11676 |
|
11677 |
+
// EXTERNAL MODULE: ./node_modules/lodash/difference.js
|
11678 |
+
var difference = __webpack_require__(91966);
|
11679 |
+
var difference_default = /*#__PURE__*/__webpack_require__.n(difference);
|
11680 |
;// CONCATENATED MODULE: ./src/js/dashboard/store/actions/savingMiddleware.js
|
11681 |
|
11682 |
|
11687 |
|
11688 |
|
11689 |
|
11690 |
+
|
11691 |
+
|
11692 |
var timer = setTimeout(function () {});
|
11693 |
var currentState = {};
|
11694 |
/**
|
11706 |
}
|
11707 |
|
11708 |
if (!isEqual_default()(oldStore.buttons, currentState.buttons) || !isEqual_default()(oldStore.groups, currentState.groups)) {
|
11709 |
+
SavingQueue.enqueue(saveData(generateJSONObject(dashboard_store.getState().groups), "/buttons", false, difference_default()(Object.keys(currentState.groups), Object.keys(oldStore.groups))[0]));
|
11710 |
}
|
11711 |
/* webpack-strip-block:removed */
|
11712 |
|
11725 |
|
11726 |
var saveData = function saveData(data, endpoint) {
|
11727 |
var forceReloadPreview = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
11728 |
+
var newGroupId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
11729 |
|
11730 |
var fail = function fail(e) {
|
11731 |
if (e && e.request) {
|
11743 |
};
|
11744 |
|
11745 |
return function () {
|
11746 |
+
return apiRequest(endpoint, {
|
11747 |
method: "POST",
|
11748 |
data: {
|
11749 |
+
nonce: buttonizer_admin.is_stand_alone ? undefined : buttonizer_admin.nonce,
|
11750 |
data: data
|
11751 |
}
|
11752 |
}).then(function (_ref) {
|
11759 |
}
|
11760 |
|
11761 |
dashboard_store.dispatch(changeIsUpdating(false));
|
11762 |
+
reloadPreview(forceReloadPreview, newGroupId);
|
11763 |
})["catch"](fail);
|
11764 |
};
|
11765 |
};
|
11901 |
switch (action.type) {
|
11902 |
case buttonizer_constants_actionTypes.INIT:
|
11903 |
{
|
11904 |
+
var dataInfo = action.payload.wordpress ? action.payload.wordpress : action.payload.info;
|
11905 |
+
draftStore.frameUrl = dataInfo.base + "?buttonizer-preview=1".concat(action.payload.identifier ? "&identifier=".concat(action.payload.identifier) : ""); // Start loading iframe
|
11906 |
|
11907 |
draftStore.loading.loadingIframe = true; // Show loading
|
11908 |
|
11916 |
draftStore.latest_tour_update = action.payload.latest_tour_update;
|
11917 |
draftStore.additional_permissions = action.payload.additional_permissions;
|
11918 |
draftStore._premiumCode = action.payload.premium_code;
|
11919 |
+
draftStore.domain = action.payload.info ? action.payload.info.domain : null;
|
11920 |
break;
|
11921 |
}
|
11922 |
|
12380 |
return _updatePreviewData.apply(this, arguments);
|
12381 |
}
|
12382 |
|
12383 |
+
function updateFrontendPreviewPath(path) {
|
12384 |
+
sendPostMessage("updatePreviewPath", path);
|
12385 |
+
}
|
12386 |
+
|
12387 |
function sendPostMessage(type) {
|
12388 |
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
12389 |
var frame = document.querySelector(".buttonizer-preview iframe"); // Post message to the frame
|
18603 |
|
18604 |
;// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Context.js
|
18605 |
|
18606 |
+
var Context_ReactReduxContext = /*#__PURE__*/react.createContext(null);
|
18607 |
|
18608 |
if (false) {}
|
18609 |
|
18610 |
+
/* harmony default export */ var Context = ((/* unused pure expression or super */ null && (Context_ReactReduxContext)));
|
18611 |
;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/batch.js
|
18612 |
// Default to a dummy "batch" implementation that just runs the callback
|
18613 |
function defaultNoopBatch(callback) {
|
18792 |
subscription.onStateChange = null;
|
18793 |
};
|
18794 |
}, [contextValue, previousState]);
|
18795 |
+
var Context = context || Context_ReactReduxContext;
|
18796 |
return /*#__PURE__*/react.createElement(Context.Provider, {
|
18797 |
value: contextValue
|
18798 |
}, children);
|
18971 |
_ref2$forwardRef = _ref2.forwardRef,
|
18972 |
forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef,
|
18973 |
_ref2$context = _ref2.context,
|
18974 |
+
context = _ref2$context === void 0 ? Context_ReactReduxContext : _ref2$context,
|
18975 |
connectOptions = (0,objectWithoutPropertiesLoose/* default */.Z)(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"]);
|
18976 |
|
18977 |
if (false) { var customStoreWarningMessage; }
|
19524 |
*/
|
19525 |
|
19526 |
function useReduxContext_useReduxContext() {
|
19527 |
+
var contextValue = (0,react.useContext)(Context_ReactReduxContext);
|
19528 |
|
19529 |
if (false) {}
|
19530 |
|
19541 |
* @returns {Function} A `useStore` hook bound to the specified context.
|
19542 |
*/
|
19543 |
|
19544 |
+
function useStore_createStoreHook(context) {
|
19545 |
if (context === void 0) {
|
19546 |
context = ReactReduxContext;
|
19547 |
}
|
19548 |
|
19549 |
+
var useReduxContext = context === ReactReduxContext ? useDefaultReduxContext : function () {
|
19550 |
+
return useContext(context);
|
19551 |
};
|
19552 |
return function useStore() {
|
19553 |
var _useReduxContext = useReduxContext(),
|
19572 |
* }
|
19573 |
*/
|
19574 |
|
19575 |
+
var useStore = /*#__PURE__*/(/* unused pure expression or super */ null && (useStore_createStoreHook()));
|
19576 |
;// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useDispatch.js
|
19577 |
|
19578 |
|
19588 |
context = ReactReduxContext;
|
19589 |
}
|
19590 |
|
19591 |
+
var useStore = context === ReactReduxContext ? useDefaultStore : createStoreHook(context);
|
19592 |
return function useDispatch() {
|
19593 |
var store = useStore();
|
19594 |
return store.dispatch;
|
19616 |
* }
|
19617 |
*/
|
19618 |
|
19619 |
+
var useDispatch = /*#__PURE__*/(/* unused pure expression or super */ null && (createDispatchHook()));
|
19620 |
;// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useSelector.js
|
19621 |
|
19622 |
|
19710 |
|
19711 |
function createSelectorHook(context) {
|
19712 |
if (context === void 0) {
|
19713 |
+
context = Context_ReactReduxContext;
|
19714 |
}
|
19715 |
|
19716 |
+
var useReduxContext = context === Context_ReactReduxContext ? useReduxContext_useReduxContext : function () {
|
19717 |
return (0,react.useContext)(context);
|
19718 |
};
|
19719 |
return function useSelector(selector, equalityFn) {
|
19780 |
|
19781 |
|
19782 |
|
19783 |
+
|
19784 |
+
|
19785 |
function Tippy(_ref) {
|
19786 |
var props = _ref.props,
|
19787 |
_ref$arrow = _ref.arrow,
|
19789 |
_ref$trigger = _ref.trigger,
|
19790 |
trigger = _ref$trigger === void 0 ? "manual" : _ref$trigger,
|
19791 |
preference = _ref.preference;
|
19792 |
+
if (!preference && props.ignorePreference !== true) return props.children;
|
19793 |
var test = setTimeout(function () {});
|
19794 |
var currentX = false;
|
19795 |
var currentY = false;
|
19796 |
return /*#__PURE__*/react.createElement(tippy_react_esm, {
|
19797 |
+
content: (0,clsx_m/* default */.Z)(props.content, props.shiftClick && " (".concat(translate("utils.shift_click"), ")")),
|
19798 |
hideOnClick: props.hideOnClick,
|
19799 |
theme: "material" // duration={[100, 100]}
|
19800 |
,
|
19801 |
+
disabled: preference || props.ignorePreference === true ? props.disabled : true,
|
19802 |
trigger: trigger,
|
19803 |
arrow: arrow,
|
19804 |
onCreate: function onCreate(instance) {
|
19805 |
if (trigger === "manual") {
|
19806 |
instance.reference.addEventListener("mousemove", function (e) {
|
19807 |
+
if (currentX && currentY && (Math.abs(e.clientX - currentX) > 25 || Math.abs(e.clientY - currentY) > 25) && instance.state.isShown) instance.hide();
|
19808 |
clearTimeout(test);
|
19809 |
test = setTimeout(function () {
|
19810 |
instance.show();
|
19818 |
currentX = currentY = false;
|
19819 |
});
|
19820 |
}
|
|
|
|
|
|
|
19821 |
}
|
19822 |
}, props.children);
|
19823 |
}
|
20086 |
|
20087 |
|
20088 |
|
|
|
20089 |
function DevicePreview() {
|
20090 |
var _useState = (0,react.useState)("desktop"),
|
20091 |
_useState2 = DevicePreview_slicedToArray(_useState, 2),
|
20095 |
|
20096 |
function setDevice(device) {
|
20097 |
// Don't change anything when chosen device is already selected
|
20098 |
+
if (device !== currentDevicePreview) {
|
20099 |
// Device
|
20100 |
setCurrentDevicePreview(device); // Update class
|
20101 |
|
20102 |
+
app.setDevicePreview(device);
|
20103 |
}
|
20104 |
}
|
20105 |
|
20190 |
|
20191 |
function publish() {
|
20192 |
setIsPublishing(true);
|
20193 |
+
apiRequest("/publish", {
|
20194 |
method: "POST",
|
20195 |
data: {
|
20196 |
nonce: buttonizer_admin.nonce
|
22648 |
|
22649 |
|
22650 |
function startReverting() {
|
22651 |
+
apiRequest("/revert", {
|
22652 |
method: "POST",
|
22653 |
data: {
|
22654 |
nonce: buttonizer_admin.nonce
|
26226 |
|
26227 |
if (false) { var messageType; }
|
26228 |
|
26229 |
+
var react_router_cache = {};
|
26230 |
var cacheLimit = 10000;
|
26231 |
var cacheCount = 0;
|
26232 |
|
26233 |
function compilePath(path) {
|
26234 |
+
if (react_router_cache[path]) return react_router_cache[path];
|
26235 |
var generator = pathToRegexp.compile(path);
|
26236 |
|
26237 |
if (cacheCount < cacheLimit) {
|
26238 |
+
react_router_cache[path] = generator;
|
26239 |
cacheCount++;
|
26240 |
}
|
26241 |
|
26638 |
return hoist_non_react_statics_cjs_default()(C, Component);
|
26639 |
}
|
26640 |
|
26641 |
+
var react_router_useContext = react.useContext;
|
26642 |
function useHistory() {
|
26643 |
if (false) {}
|
26644 |
|
26645 |
+
return react_router_useContext(historyContext);
|
26646 |
}
|
26647 |
function useLocation() {
|
26648 |
if (false) {}
|
26649 |
|
26650 |
+
return react_router_useContext(context).location;
|
26651 |
}
|
26652 |
function useParams() {
|
26653 |
if (false) {}
|
26654 |
|
26655 |
+
var match = react_router_useContext(context).match;
|
26656 |
return match ? match.params : {};
|
26657 |
}
|
26658 |
function useRouteMatch(path) {
|
26659 |
if (false) {}
|
26660 |
|
26661 |
var location = useLocation();
|
26662 |
+
var match = react_router_useContext(context).match;
|
26663 |
return path ? matchPath(location.pathname, path) : match;
|
26664 |
}
|
26665 |
|
26851 |
|
26852 |
dispatch(dataActions_addRelation(button.id, group.id));
|
26853 |
}
|
26854 |
+
function addButton(payload, group_id, index) {
|
26855 |
var dispatch = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : dashboard_store.dispatch;
|
26856 |
+
var redirect = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
26857 |
var button = dispatch(dataActions_addRecord(GroupActions_objectSpread({
|
26858 |
name: translate("utils.new_button"),
|
26859 |
show_mobile: true,
|
26860 |
show_desktop: true
|
26861 |
}, payload), "buttons")).payload.record;
|
26862 |
dispatch(dataActions_addRelation(button.id, group_id, index));
|
26863 |
+
if (redirect) document.location.hash = "/group/".concat(group_id, "/button/").concat(button.id);
|
26864 |
}
|
26865 |
function GroupActions_removeGroup(id) {
|
26866 |
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.store.getState();
|
26916 |
buttons.map(function (button, key) {
|
26917 |
// Do not import
|
26918 |
if (Object.keys(button).length === 0) return false;
|
26919 |
+
addButton(button, group_id, key, dispatch);
|
26920 |
});
|
26921 |
}
|
26922 |
function replaceGroup(currentGroupId, groupAttr, buttons) {
|
26934 |
buttons.map(function (button, key) {
|
26935 |
// Do not import
|
26936 |
if (Object.keys(button).length === 0) return false;
|
26937 |
+
addButton(button, group_id, key, dispatch);
|
26938 |
});
|
26939 |
} else {
|
26940 |
console.error(state.groups, state.groups[currentGroupId]);
|
26980 |
}
|
26981 |
|
26982 |
delete attr.id;
|
26983 |
+
addButton(attr, group_id, Object.values(state.buttons).reduce(function (acc, item, index) {
|
26984 |
return item.id === id ? index + 1 : acc;
|
26985 |
}, ""), dispatch);
|
26986 |
} else {
|
27392 |
disabled: deleteDisabled,
|
27393 |
style: {
|
27394 |
"float": "right"
|
27395 |
+
},
|
27396 |
+
shiftClick: true
|
27397 |
}, /*#__PURE__*/react.createElement(IconButton_IconButton, DeleteButton_extends({
|
27398 |
+
onClick: function onClick(e) {
|
27399 |
+
if (!deleteDisabled) {
|
27400 |
+
if (e.shiftKey) return handleClose("confirm");
|
27401 |
+
setDialogOpened(true);
|
27402 |
+
}
|
27403 |
},
|
27404 |
color: "primary",
|
27405 |
disabled: deleteDisabled,
|
27414 |
overflow: "unset"
|
27415 |
},
|
27416 |
className: "fas fa-times"
|
27417 |
+
})))) : /*#__PURE__*/react.createElement("div", {
|
27418 |
+
ref: ref
|
27419 |
+
}, /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
27420 |
+
content: "",
|
27421 |
+
disabled: deleteDisabled,
|
27422 |
+
style: {
|
27423 |
+
"float": "right"
|
27424 |
+
},
|
27425 |
+
shiftClick: true
|
27426 |
+
}, /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
27427 |
+
onClick: function onClick(e) {
|
27428 |
+
if (!deleteDisabled) {
|
27429 |
+
if (e.shiftKey) return handleClose("confirm");
|
27430 |
+
setDialogOpened(true);
|
27431 |
+
}
|
27432 |
},
|
27433 |
disabled: deleteDisabled,
|
27434 |
+
"data-testid": model === "page_rule" ? props["data-testid"] : "delete-button-".concat(model)
|
|
|
27435 |
}, /*#__PURE__*/react.createElement(ListItemIcon_ListItemIcon, null, /*#__PURE__*/react.createElement(Icon_Icon, {
|
27436 |
className: "fas fa-trash-alt"
|
27437 |
})), /*#__PURE__*/react.createElement(Typography_Typography, {
|
27438 |
variant: "inherit"
|
27439 |
+
}, translate("utils.delete")))))), /*#__PURE__*/react.createElement(ConfirmDialog, {
|
27440 |
open: dialogOpened,
|
27441 |
title: deleteDisabled ? translate("modal.remove.".concat(model, ".cannot_delete_window_title")) : translate("modal.remove.".concat(model, ".window_title")),
|
27442 |
buttons: deleteDisabled ? [{
|
31379 |
setDialogOpened = _useState2[1];
|
31380 |
|
31381 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
31382 |
+
content: translate("utils.duplicate"),
|
31383 |
+
shiftClick: true
|
31384 |
}, /*#__PURE__*/react.createElement(IconButton_IconButton, DuplicateButton_extends({
|
31385 |
+
onClick: function onClick(e) {
|
31386 |
+
if (e.shiftKey) return onChange("".concat(name, " Copy"));
|
31387 |
+
setDialogOpened(true);
|
31388 |
},
|
31389 |
color: "primary",
|
31390 |
size: size,
|
31940 |
foundGroup = _useState6[0],
|
31941 |
setFoundGroup = _useState6[1];
|
31942 |
|
31943 |
+
var _useState7 = (0,react.useState)(false),
|
31944 |
+
_useState8 = ExportButton_slicedToArray(_useState7, 2),
|
31945 |
+
merged = _useState8[0],
|
31946 |
+
setMerged = _useState8[1];
|
31947 |
+
|
31948 |
var foundParenData = pick_default()(group_data, settingKeys.stylingNoGroup) || false;
|
31949 |
var state = useSelector(function (state) {
|
31950 |
return state;
|
31977 |
buttons: foundButtons
|
31978 |
};
|
31979 |
exportData.export_type = type;
|
31980 |
+
exportData.export_migration_version = buttonizer_admin.migration_version;
|
31981 |
downloadObjectAsJson(exportData, downloadName);
|
31982 |
setDialogOpened(false);
|
31983 |
setFoundGroup(false);
|
31987 |
var mergeGroupData = function mergeGroupData() {
|
31988 |
var merged = merge_default()({}, foundParenData, foundButtons[0]);
|
31989 |
setFoundButtons([merged]);
|
31990 |
+
setMerged(true);
|
31991 |
};
|
31992 |
|
31993 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
32000 |
}, translate("import_export.export.export_".concat(type)))), /*#__PURE__*/react.createElement(Dialog_Dialog, {
|
32001 |
open: dialogOpened,
|
32002 |
onClose: function onClose() {
|
32003 |
+
setMerged(false);
|
32004 |
+
setDialogOpened(false);
|
32005 |
},
|
32006 |
maxWidth: "xs",
|
32007 |
fullWidth: true,
|
32033 |
"data-testid": "export-merge",
|
32034 |
style: {
|
32035 |
marginRight: "auto"
|
32036 |
+
},
|
32037 |
+
disabled: merged
|
32038 |
}, translate("import_export.export.merge")), /*#__PURE__*/react.createElement(Button_Button, {
|
32039 |
onClick: function onClick() {
|
32040 |
return setDialogOpened(false);
|
32041 |
+
},
|
32042 |
+
color: "primary"
|
32043 |
}, translate("modal.cancel")), /*#__PURE__*/react.createElement(Button_Button, {
|
32044 |
onClick: function onClick() {
|
32045 |
return onExport();
|
32191 |
className: "fas fa-desktop"
|
32192 |
})))), /*#__PURE__*/react.createElement("div", {
|
32193 |
className: "clear"
|
32194 |
+
}))), /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
32195 |
+
content: translate("utils.add_button"),
|
32196 |
+
shiftClick: true,
|
32197 |
+
arrow: false
|
32198 |
+
}, /*#__PURE__*/react.createElement(Button_Button, {
|
32199 |
+
onClick: function onClick(e) {
|
32200 |
+
return openNewButtonDialog(e.shiftKey);
|
32201 |
},
|
32202 |
color: "primary",
|
32203 |
variant: "text",
|
32209 |
className: "fas fa-plus-circle"
|
32210 |
}),
|
32211 |
"data-testid": "new-button"
|
32212 |
+
}, translate("utils.add_button"))));
|
32213 |
}
|
32214 |
|
32215 |
/* harmony default export */ var ButtonContainer_ButtonContainer = (connect(function (state) {
|
41035 |
function setCookie(cname, value) {
|
41036 |
document.cookie = cname + "=" + value;
|
41037 |
}
|
41038 |
+
;// CONCATENATED MODULE: ./src/js/utils/ImportData.js
|
41039 |
+
|
41040 |
+
|
41041 |
+
|
41042 |
+
|
41043 |
+
function ImportData(currentGroup, foundGroup, foundButtons, index) {
|
41044 |
+
var redirect = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
41045 |
+
var dispatch = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : window.store.dispatch;
|
41046 |
+
var state = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : window.store.getState();
|
41047 |
+
|
41048 |
+
// Should import into a group
|
41049 |
+
if (currentGroup) {
|
41050 |
+
if (foundGroup && foundButtons) {
|
41051 |
+
// Replace Current Group
|
41052 |
+
console.log("Replace current group"); // addGroup(foundGroup);
|
41053 |
+
|
41054 |
+
replaceGroup(currentGroup.id, foundGroup, foundButtons, dispatch, state);
|
41055 |
+
}
|
41056 |
+
|
41057 |
+
if (foundButtons && !foundGroup) {
|
41058 |
+
// Add Buttons into current group
|
41059 |
+
console.log("Add Buttons into current group");
|
41060 |
+
foundButtons.map(function (button, key) {
|
41061 |
+
// Do not import
|
41062 |
+
if (Object.keys(button).length === 0) return false;
|
41063 |
+
addButton(button, currentGroup.id, index || currentGroup.children.length + key + 1, dispatch, redirect);
|
41064 |
+
});
|
41065 |
+
}
|
41066 |
+
} // Should create a new group
|
41067 |
+
else if (foundGroup && !currentGroup) {
|
41068 |
+
console.log("Should create a new group");
|
41069 |
+
importGroup(foundGroup, foundButtons, index, dispatch);
|
41070 |
+
} else if (foundButtons && !foundGroup && !currentGroup) {
|
41071 |
+
console.log("Should create a new group with imported button");
|
41072 |
+
importGroup(foundGroup, foundButtons, index, dispatch);
|
41073 |
+
}
|
41074 |
+
}
|
41075 |
+
function ImportRawData(data, index, currentGroup, redirect) {
|
41076 |
+
var foundGroup, foundButtons;
|
41077 |
+
|
41078 |
+
try {
|
41079 |
+
var parsedResult = typeof data === "string" ? JSON.parse(data) : data; // Malformed data
|
41080 |
+
|
41081 |
+
if (!parsedResult.export_type || parsedResult.export_type === "group" && !parsedResult.buttons) {
|
41082 |
+
throw new Error(translate("import_export.import.warning.invalid"));
|
41083 |
+
} // Import a group
|
41084 |
+
|
41085 |
+
|
41086 |
+
if (parsedResult.export_type === "group") {
|
41087 |
+
if (parsedResult.buttons.length === 0) {
|
41088 |
+
alert(translate("import_export.import.warning.no_buttons"));
|
41089 |
+
return;
|
41090 |
+
}
|
41091 |
+
|
41092 |
+
foundGroup = omit_default()(parsedResult.data, import_export.propertiesToOmit);
|
41093 |
+
foundButtons = parsedResult.buttons.map(function (button) {
|
41094 |
+
return omit_default()(button, import_export.propertiesToOmit);
|
41095 |
+
});
|
41096 |
+
} // Import a button into group
|
41097 |
+
else if (parsedResult.export_type === "button") {
|
41098 |
+
foundGroup = false;
|
41099 |
+
foundButtons = [omit_default()(parsedResult, import_export.propertiesToOmit)];
|
41100 |
+
}
|
41101 |
+
|
41102 |
+
ImportData(currentGroup, foundGroup, foundButtons, index, redirect);
|
41103 |
+
} catch (e) {
|
41104 |
+
alert(translate("import_export.import.warning.malformed"));
|
41105 |
+
}
|
41106 |
+
}
|
41107 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/TrashButton/TrashButton.js
|
41108 |
+
function TrashButton_extends() { TrashButton_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return TrashButton_extends.apply(this, arguments); }
|
41109 |
+
|
41110 |
+
function TrashButton_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
41111 |
+
|
41112 |
+
function TrashButton_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { TrashButton_ownKeys(Object(source), true).forEach(function (key) { TrashButton_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { TrashButton_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
41113 |
+
|
41114 |
+
function TrashButton_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
41115 |
+
|
41116 |
+
function TrashButton_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = TrashButton_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
41117 |
+
|
41118 |
+
function TrashButton_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
41119 |
+
|
41120 |
+
|
41121 |
+
|
41122 |
+
function TrashButton(_ref) {
|
41123 |
+
var _ref$disabled = _ref.disabled,
|
41124 |
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
41125 |
+
_onClick = _ref.onClick,
|
41126 |
+
iconProps = _ref.iconProps,
|
41127 |
+
_ref$icon = _ref.icon,
|
41128 |
+
icon = _ref$icon === void 0 ? "fas fa-undo" : _ref$icon,
|
41129 |
+
props = TrashButton_objectWithoutProperties(_ref, ["disabled", "onClick", "iconProps", "icon"]);
|
41130 |
+
|
41131 |
+
return /*#__PURE__*/react.createElement(IconButton_IconButton, TrashButton_extends({
|
41132 |
+
onClick: function onClick() {
|
41133 |
+
return _onClick();
|
41134 |
+
},
|
41135 |
+
disabled: disabled,
|
41136 |
+
size: "small",
|
41137 |
+
style: TrashButton_objectSpread({
|
41138 |
+
fontSize: "14px",
|
41139 |
+
marginLeft: "5px",
|
41140 |
+
height: "30px",
|
41141 |
+
width: "30px",
|
41142 |
+
alignSelf: "center"
|
41143 |
+
}, props.style),
|
41144 |
+
color: "primary"
|
41145 |
+
}, props), /*#__PURE__*/react.createElement(Icon_Icon, TrashButton_extends({
|
41146 |
+
fontSize: "inherit",
|
41147 |
+
className: icon
|
41148 |
+
}, iconProps)));
|
41149 |
+
}
|
41150 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/FileDragAndDrop/FileDragAndDrop.js
|
41151 |
function FileDragAndDrop_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { FileDragAndDrop_typeof = function _typeof(obj) { return typeof obj; }; } else { FileDragAndDrop_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return FileDragAndDrop_typeof(obj); }
|
41152 |
|
41176 |
|
41177 |
|
41178 |
|
41179 |
+
var FileDragAndDrop_styles = function styles(theme) {
|
41180 |
return {
|
41181 |
border: {
|
41182 |
border: "dashed ".concat(theme.palette.primary.main, " 3px"),
|
41307 |
return FileDragAndDrop;
|
41308 |
}(react.Component);
|
41309 |
|
41310 |
+
/* harmony default export */ var FileDragAndDrop_FileDragAndDrop = ((0,withStyles/* default */.Z)(FileDragAndDrop_styles)(FileDragAndDrop));
|
41311 |
// EXTERNAL MODULE: ./node_modules/lodash/cloneDeep.js
|
41312 |
var cloneDeep = __webpack_require__(50361);
|
41313 |
var cloneDeep_default = /*#__PURE__*/__webpack_require__.n(cloneDeep);
|
41314 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Containers/ContainerActions/ImportButton.js
|
41315 |
+
function ImportButton_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
41316 |
+
|
41317 |
+
function ImportButton_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { ImportButton_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { ImportButton_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
41318 |
+
|
41319 |
function ImportButton_slicedToArray(arr, i) { return ImportButton_arrayWithHoles(arr) || ImportButton_iterableToArrayLimit(arr, i) || ImportButton_unsupportedIterableToArray(arr, i) || ImportButton_nonIterableRest(); }
|
41320 |
|
41321 |
function ImportButton_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
41340 |
|
41341 |
|
41342 |
|
41343 |
+
|
41344 |
function ImportButton(_ref) {
|
41345 |
var _ref$isGroup = _ref.isGroup,
|
41346 |
isGroup = _ref$isGroup === void 0 ? true : _ref$isGroup,
|
41348 |
currentGroup = _ref$currentGroup === void 0 ? null : _ref$currentGroup,
|
41349 |
_ref$label = _ref.label,
|
41350 |
label = _ref$label === void 0 ? "Import Group" : _ref$label,
|
41351 |
+
index = _ref.index,
|
41352 |
+
_ref$kbLink = _ref.kbLink,
|
41353 |
+
kbLink = _ref$kbLink === void 0 ? null : _ref$kbLink,
|
41354 |
+
inDropdown = _ref.inDropdown,
|
41355 |
+
onClose = _ref.onClose;
|
41356 |
|
41357 |
var _useState = (0,react.useState)(false),
|
41358 |
_useState2 = ImportButton_slicedToArray(_useState, 2),
|
41375 |
setFoundGroup = _useState8[1];
|
41376 |
|
41377 |
var importFileUploader = (0,react.useRef)(null);
|
|
|
|
|
|
|
|
|
41378 |
|
41379 |
var onFileSelect = function onFileSelect(files) {
|
41380 |
// Get file
|
41382 |
|
41383 |
var readFile = new FileReader(); // After reading the file
|
41384 |
|
41385 |
+
readFile.addEventListener("load", /*#__PURE__*/function () {
|
41386 |
+
var _ref2 = ImportButton_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(fileReaderEvent) {
|
41387 |
+
var result, fileResult, group, button, migratedData;
|
41388 |
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
41389 |
+
while (1) {
|
41390 |
+
switch (_context.prev = _context.next) {
|
41391 |
+
case 0:
|
41392 |
+
result = fileReaderEvent.target.result;
|
41393 |
+
_context.prev = 1;
|
41394 |
+
fileResult = JSON.parse(result); // Malformed data
|
41395 |
+
|
41396 |
+
if (!(!fileResult.export_type || fileResult.export_type === "group" && !fileResult.buttons)) {
|
41397 |
+
_context.next = 5;
|
41398 |
+
break;
|
41399 |
+
}
|
41400 |
|
41401 |
+
throw new Error(translate("import_export.import.warning.invalid"));
|
|
|
41402 |
|
41403 |
+
case 5:
|
41404 |
+
if (!isGroup) {
|
41405 |
+
_context.next = 28;
|
41406 |
+
break;
|
41407 |
+
}
|
41408 |
|
41409 |
+
if (!(fileResult.export_type === "group")) {
|
41410 |
+
_context.next = 19;
|
41411 |
+
break;
|
41412 |
+
}
|
41413 |
|
41414 |
+
if (!(fileResult.buttons.length === 0)) {
|
41415 |
+
_context.next = 10;
|
41416 |
+
break;
|
41417 |
+
}
|
41418 |
|
41419 |
+
alert(translate("import_export.import.warning.no_buttons"));
|
41420 |
+
return _context.abrupt("return");
|
|
|
|
|
|
|
41421 |
|
41422 |
+
case 10:
|
41423 |
+
group = fileResult; // An old export file. Might need migration
|
41424 |
+
|
41425 |
+
if (!(!fileResult.export_migration_version || fileResult.export_migration_version !== buttonizer_admin.migration_version)) {
|
41426 |
+
_context.next = 15;
|
41427 |
+
break;
|
41428 |
+
}
|
41429 |
+
|
41430 |
+
_context.next = 14;
|
41431 |
+
return migrateData(fileResult);
|
41432 |
+
|
41433 |
+
case 14:
|
41434 |
+
group = _context.sent;
|
41435 |
+
|
41436 |
+
case 15:
|
41437 |
+
setFoundGroup(omit_default()(group.data, import_export.propertiesToOmit));
|
41438 |
+
setFoundButtons(group.buttons.map(function (button) {
|
41439 |
+
return omit_default()(button, import_export.propertiesToOmit);
|
41440 |
+
}));
|
41441 |
+
_context.next = 28;
|
41442 |
+
break;
|
41443 |
+
|
41444 |
+
case 19:
|
41445 |
+
if (!(fileResult.export_type === "button")) {
|
41446 |
+
_context.next = 28;
|
41447 |
+
break;
|
41448 |
+
}
|
41449 |
+
|
41450 |
+
button = fileResult; // An old export file. Might need migration
|
41451 |
+
|
41452 |
+
if (!(!fileResult.export_migration_version || fileResult.export_migration_version !== buttonizer_admin.migration_version)) {
|
41453 |
+
_context.next = 26;
|
41454 |
+
break;
|
41455 |
+
}
|
41456 |
+
|
41457 |
+
_context.next = 24;
|
41458 |
+
return migrateData({
|
41459 |
+
data: fileResult
|
41460 |
+
});
|
41461 |
+
|
41462 |
+
case 24:
|
41463 |
+
migratedData = _context.sent;
|
41464 |
+
button = migratedData.data;
|
41465 |
+
|
41466 |
+
case 26:
|
41467 |
+
setFoundGroup(false);
|
41468 |
+
setFoundButtons([omit_default()(button, import_export.propertiesToOmit)]);
|
41469 |
+
|
41470 |
+
case 28:
|
41471 |
+
setFileSelected(true);
|
41472 |
+
_context.next = 35;
|
41473 |
+
break;
|
41474 |
+
|
41475 |
+
case 31:
|
41476 |
+
_context.prev = 31;
|
41477 |
+
_context.t0 = _context["catch"](1);
|
41478 |
+
console.error(_context.t0);
|
41479 |
+
alert(translate("import_export.import.warning.malformed"));
|
41480 |
+
|
41481 |
+
case 35:
|
41482 |
+
case "end":
|
41483 |
+
return _context.stop();
|
41484 |
}
|
41485 |
+
}
|
41486 |
+
}, _callee, null, [[1, 31]]);
|
41487 |
+
}));
|
41488 |
|
41489 |
+
return function (_x) {
|
41490 |
+
return _ref2.apply(this, arguments);
|
41491 |
+
};
|
41492 |
+
}());
|
|
|
41493 |
readFile.readAsText(file);
|
41494 |
}; // Import the files
|
41495 |
|
41496 |
|
41497 |
var onImport = function onImport() {
|
41498 |
if (isGroup) {
|
41499 |
+
ImportData(currentGroup, foundGroup, foundButtons, index);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41500 |
} // Reset
|
41501 |
|
41502 |
|
41506 |
setFoundGroup(false);
|
41507 |
};
|
41508 |
|
41509 |
+
return /*#__PURE__*/react.createElement(react.Fragment, null, inDropdown ? /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
41510 |
onClick: function onClick() {
|
41511 |
return setDialogOpened(true);
|
41512 |
},
|
41516 |
})), /*#__PURE__*/react.createElement(Typography_Typography, {
|
41517 |
variant: "inherit"
|
41518 |
}, label)) : /*#__PURE__*/react.createElement(Button_Button, {
|
41519 |
+
style: {
|
41520 |
+
fontSize: "14px"
|
41521 |
+
},
|
41522 |
onClick: function onClick() {
|
41523 |
+
return setDialogOpened(true);
|
41524 |
},
|
41525 |
color: "primary",
|
41526 |
variant: "text",
|
41534 |
onClose: function onClose() {
|
41535 |
return setDialogOpened(false);
|
41536 |
},
|
41537 |
+
maxWidth: false,
|
|
|
41538 |
"aria-labelledby": "import-button-dialog-title",
|
41539 |
+
"aria-describedby": "import-button-dialog-description",
|
|
|
41540 |
"data-testid": "dialog:import-dialog"
|
41541 |
}, /*#__PURE__*/react.createElement(FileDragAndDrop_FileDragAndDrop, {
|
41542 |
handleDrop: function handleDrop(files) {
|
41579 |
width: 0,
|
41580 |
height: 0
|
41581 |
}
|
41582 |
+
})), fileSelected && /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(DialogContentText_DialogContentText, {
|
|
|
|
|
|
|
|
|
|
|
|
|
41583 |
component: "div"
|
41584 |
}, currentGroup && isGroup && foundGroup ? /*#__PURE__*/react.createElement("span", {
|
41585 |
dangerouslySetInnerHTML: {
|
41595 |
}), /*#__PURE__*/react.createElement(TrashButton, {
|
41596 |
onClick: function onClick() {
|
41597 |
return setFoundGroup(false);
|
41598 |
+
},
|
41599 |
+
"data-testid": "import-delete",
|
41600 |
+
size: "medium",
|
41601 |
+
icon: "fas fa-trash"
|
41602 |
})), foundButtons && foundButtons.map(function (button, key) {
|
41603 |
return /*#__PURE__*/react.createElement(DialogContentText_DialogContentText, {
|
41604 |
"data-testid": "import-found-buttons",
|
41612 |
var currentButtons = cloneDeep_default()(foundButtons);
|
41613 |
currentButtons.splice(key, 1);
|
41614 |
setFoundButtons(currentButtons);
|
41615 |
+
},
|
41616 |
+
"data-testid": "import-delete",
|
41617 |
+
size: "medium",
|
41618 |
+
icon: "fas fa-trash"
|
41619 |
}));
|
41620 |
+
}))), /*#__PURE__*/react.createElement("div", {
|
41621 |
+
style: kbLink && {
|
41622 |
+
display: "flex",
|
41623 |
+
justifyContent: "space-between",
|
41624 |
+
alignItems: "center ",
|
41625 |
+
paddingLeft: "24px"
|
41626 |
+
}
|
41627 |
+
}, /*#__PURE__*/react.createElement(KnowledgeBaseLink, {
|
41628 |
+
articleId: kbLink,
|
41629 |
+
tiny: true,
|
41630 |
+
setting: translate("import_export.import_export")
|
41631 |
+
}), /*#__PURE__*/react.createElement(DialogActions_DialogActions, null, /*#__PURE__*/react.createElement(Button_Button, {
|
41632 |
onClick: function onClick() {
|
41633 |
return setDialogOpened(false);
|
41634 |
+
},
|
41635 |
+
color: "primary"
|
41636 |
}, translate("modal.cancel")), fileSelected && /*#__PURE__*/react.createElement(Button_Button, {
|
41637 |
onClick: function onClick() {
|
41638 |
return setFileSelected(null);
|
41639 |
+
},
|
41640 |
+
color: "primary"
|
41641 |
}, translate("import_export.import.reupload")), /*#__PURE__*/react.createElement(Button_Button, {
|
41642 |
onClick: function onClick() {
|
41643 |
+
onImport();
|
41644 |
+
onClose();
|
41645 |
},
|
41646 |
color: "primary",
|
41647 |
disabled: !fileSelected || !foundGroup && !foundButtons,
|
41648 |
"data-testid": "import-commence"
|
41649 |
+
}, translate("import_export.import.title")))))));
|
41650 |
}
|
41651 |
|
41652 |
+
function migrateData(data) {
|
41653 |
+
return new Promise(function (resolve, reject) {
|
41654 |
+
apiRequest("/import_migrate", {
|
41655 |
+
method: "POST",
|
41656 |
+
data: {
|
41657 |
+
data: data
|
41658 |
+
}
|
41659 |
+
}).then(function (_ref3) {
|
41660 |
+
var data = _ref3.data;
|
41661 |
+
|
41662 |
+
if (data.success) {
|
41663 |
+
resolve(data.results);
|
41664 |
+
}
|
41665 |
+
})["catch"](function (e) {
|
41666 |
+
reject(e);
|
41667 |
+
console.error(e);
|
41668 |
+
console.error("Buttonizer: OH NO! ERROR: '" + e.statusText + "'. That's all we know... Please check your PHP logs or contact Buttonizer support if you need help.");
|
41669 |
+
console.error("Buttonizer: Visit our community on https://community.buttonizer.pro/");
|
41670 |
+
});
|
41671 |
+
});
|
41672 |
}
|
41673 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/SwitchBase.js
|
|
|
41674 |
|
|
|
41675 |
|
|
|
41676 |
|
|
|
41677 |
|
|
|
41678 |
|
|
|
41679 |
|
|
|
41680 |
|
|
|
41681 |
|
|
|
41682 |
|
|
|
41683 |
|
|
|
41684 |
|
41685 |
+
var SwitchBase_styles = {
|
41686 |
+
root: {
|
41687 |
+
padding: 9
|
41688 |
+
},
|
41689 |
+
checked: {},
|
41690 |
+
disabled: {},
|
41691 |
+
input: {
|
41692 |
+
cursor: 'inherit',
|
41693 |
+
position: 'absolute',
|
41694 |
+
opacity: 0,
|
41695 |
+
width: '100%',
|
41696 |
+
height: '100%',
|
41697 |
+
top: 0,
|
41698 |
+
left: 0,
|
41699 |
+
margin: 0,
|
41700 |
+
padding: 0,
|
41701 |
+
zIndex: 1
|
41702 |
+
}
|
41703 |
+
};
|
41704 |
+
/**
|
41705 |
+
* @ignore - internal component.
|
41706 |
+
*/
|
41707 |
|
41708 |
+
var SwitchBase = /*#__PURE__*/react.forwardRef(function SwitchBase(props, ref) {
|
41709 |
+
var autoFocus = props.autoFocus,
|
41710 |
+
checkedProp = props.checked,
|
41711 |
+
checkedIcon = props.checkedIcon,
|
41712 |
+
classes = props.classes,
|
41713 |
+
className = props.className,
|
41714 |
+
defaultChecked = props.defaultChecked,
|
41715 |
+
disabledProp = props.disabled,
|
41716 |
+
icon = props.icon,
|
41717 |
+
id = props.id,
|
41718 |
+
inputProps = props.inputProps,
|
41719 |
+
inputRef = props.inputRef,
|
41720 |
+
name = props.name,
|
41721 |
+
onBlur = props.onBlur,
|
41722 |
+
onChange = props.onChange,
|
41723 |
+
onFocus = props.onFocus,
|
41724 |
+
readOnly = props.readOnly,
|
41725 |
+
required = props.required,
|
41726 |
+
tabIndex = props.tabIndex,
|
41727 |
+
type = props.type,
|
41728 |
+
value = props.value,
|
41729 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["autoFocus", "checked", "checkedIcon", "classes", "className", "defaultChecked", "disabled", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"]);
|
41730 |
|
41731 |
+
var _useControlled = (0,useControlled/* default */.Z)({
|
41732 |
+
controlled: checkedProp,
|
41733 |
+
default: Boolean(defaultChecked),
|
41734 |
+
name: 'SwitchBase',
|
41735 |
+
state: 'checked'
|
41736 |
+
}),
|
41737 |
+
_useControlled2 = (0,slicedToArray/* default */.Z)(_useControlled, 2),
|
41738 |
+
checked = _useControlled2[0],
|
41739 |
+
setCheckedState = _useControlled2[1];
|
41740 |
|
41741 |
+
var muiFormControl = useFormControl_useFormControl();
|
41742 |
|
41743 |
+
var handleFocus = function handleFocus(event) {
|
41744 |
+
if (onFocus) {
|
41745 |
+
onFocus(event);
|
41746 |
+
}
|
41747 |
|
41748 |
+
if (muiFormControl && muiFormControl.onFocus) {
|
41749 |
+
muiFormControl.onFocus(event);
|
41750 |
+
}
|
41751 |
+
};
|
41752 |
|
41753 |
+
var handleBlur = function handleBlur(event) {
|
41754 |
+
if (onBlur) {
|
41755 |
+
onBlur(event);
|
41756 |
+
}
|
41757 |
|
41758 |
+
if (muiFormControl && muiFormControl.onBlur) {
|
41759 |
+
muiFormControl.onBlur(event);
|
41760 |
+
}
|
41761 |
+
};
|
41762 |
|
41763 |
+
var handleInputChange = function handleInputChange(event) {
|
41764 |
+
var newChecked = event.target.checked;
|
41765 |
+
setCheckedState(newChecked);
|
41766 |
|
41767 |
+
if (onChange) {
|
41768 |
+
// TODO v5: remove the second argument.
|
41769 |
+
onChange(event, newChecked);
|
41770 |
+
}
|
41771 |
+
};
|
41772 |
|
41773 |
+
var disabled = disabledProp;
|
41774 |
|
41775 |
+
if (muiFormControl) {
|
41776 |
+
if (typeof disabled === 'undefined') {
|
41777 |
+
disabled = muiFormControl.disabled;
|
41778 |
+
}
|
41779 |
+
}
|
41780 |
|
41781 |
+
var hasLabelFor = type === 'checkbox' || type === 'radio';
|
41782 |
+
return /*#__PURE__*/react.createElement(IconButton_IconButton, (0,esm_extends/* default */.Z)({
|
41783 |
+
component: "span",
|
41784 |
+
className: (0,clsx_m/* default */.Z)(classes.root, className, checked && classes.checked, disabled && classes.disabled),
|
41785 |
+
disabled: disabled,
|
41786 |
+
tabIndex: null,
|
41787 |
+
role: undefined,
|
41788 |
+
onFocus: handleFocus,
|
41789 |
+
onBlur: handleBlur,
|
41790 |
+
ref: ref
|
41791 |
+
}, other), /*#__PURE__*/react.createElement("input", (0,esm_extends/* default */.Z)({
|
41792 |
+
autoFocus: autoFocus,
|
41793 |
+
checked: checkedProp,
|
41794 |
+
defaultChecked: defaultChecked,
|
41795 |
+
className: classes.input,
|
41796 |
+
disabled: disabled,
|
41797 |
+
id: hasLabelFor && id,
|
41798 |
+
name: name,
|
41799 |
+
onChange: handleInputChange,
|
41800 |
+
readOnly: readOnly,
|
41801 |
+
ref: inputRef,
|
41802 |
+
required: required,
|
41803 |
+
tabIndex: tabIndex,
|
41804 |
+
type: type,
|
41805 |
+
value: value
|
41806 |
+
}, inputProps)), checked ? checkedIcon : icon);
|
41807 |
+
}); // NB: If changed, please update Checkbox, Switch and Radio
|
41808 |
+
// so that the API documentation is updated.
|
41809 |
|
41810 |
+
false ? 0 : void 0;
|
41811 |
+
/* harmony default export */ var internal_SwitchBase = ((0,withStyles/* default */.Z)(SwitchBase_styles, {
|
41812 |
+
name: 'PrivateSwitchBase'
|
41813 |
+
})(SwitchBase));
|
41814 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/svg-icons/CheckBoxOutlineBlank.js
|
41815 |
|
41816 |
|
41817 |
+
/**
|
41818 |
+
* @ignore - internal component.
|
41819 |
+
*/
|
41820 |
|
41821 |
+
/* harmony default export */ var CheckBoxOutlineBlank = ((0,createSvgIcon/* default */.Z)( /*#__PURE__*/react.createElement("path", {
|
41822 |
+
d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
41823 |
+
}), 'CheckBoxOutlineBlank'));
|
41824 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/svg-icons/CheckBox.js
|
41825 |
|
41826 |
|
41827 |
+
/**
|
41828 |
+
* @ignore - internal component.
|
41829 |
+
*/
|
41830 |
|
41831 |
+
/* harmony default export */ var CheckBox = ((0,createSvgIcon/* default */.Z)( /*#__PURE__*/react.createElement("path", {
|
41832 |
+
d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
41833 |
+
}), 'CheckBox'));
|
41834 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/svg-icons/IndeterminateCheckBox.js
|
41835 |
|
41836 |
|
41837 |
+
/**
|
41838 |
+
* @ignore - internal component.
|
41839 |
+
*/
|
41840 |
|
41841 |
+
/* harmony default export */ var IndeterminateCheckBox = ((0,createSvgIcon/* default */.Z)( /*#__PURE__*/react.createElement("path", {
|
41842 |
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
|
41843 |
+
}), 'IndeterminateCheckBox'));
|
41844 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Checkbox/Checkbox.js
|
41845 |
|
41846 |
|
41847 |
|
|
|
|
|
|
|
|
|
41848 |
|
41849 |
|
|
|
|
|
|
|
|
|
41850 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41851 |
|
|
|
|
|
|
|
|
|
41852 |
|
|
|
|
|
|
|
|
|
41853 |
|
|
|
|
|
|
|
|
|
41854 |
|
|
|
|
|
|
|
41855 |
|
|
|
|
|
|
|
|
|
|
|
|
|
41856 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41857 |
|
41858 |
+
var Checkbox_styles = function styles(theme) {
|
41859 |
+
return {
|
41860 |
+
/* Styles applied to the root element. */
|
41861 |
+
root: {
|
41862 |
+
color: theme.palette.text.secondary
|
41863 |
+
},
|
|
|
|
|
|
|
|
|
41864 |
|
41865 |
+
/* Pseudo-class applied to the root element if `checked={true}`. */
|
41866 |
+
checked: {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41867 |
|
41868 |
+
/* Pseudo-class applied to the root element if `disabled={true}`. */
|
41869 |
+
disabled: {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41870 |
|
41871 |
+
/* Pseudo-class applied to the root element if `indeterminate={true}`. */
|
41872 |
+
indeterminate: {},
|
41873 |
+
|
41874 |
+
/* Styles applied to the root element if `color="primary"`. */
|
41875 |
+
colorPrimary: {
|
41876 |
+
'&$checked': {
|
41877 |
+
color: theme.palette.primary.main,
|
41878 |
+
'&:hover': {
|
41879 |
+
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.primary.main, theme.palette.action.hoverOpacity),
|
41880 |
+
// Reset on touch devices, it doesn't add specificity
|
41881 |
+
'@media (hover: none)': {
|
41882 |
+
backgroundColor: 'transparent'
|
41883 |
+
}
|
41884 |
+
}
|
41885 |
+
},
|
41886 |
+
'&$disabled': {
|
41887 |
+
color: theme.palette.action.disabled
|
41888 |
}
|
41889 |
},
|
|
|
|
|
|
|
41890 |
|
41891 |
+
/* Styles applied to the root element if `color="secondary"`. */
|
41892 |
+
colorSecondary: {
|
41893 |
+
'&$checked': {
|
41894 |
+
color: theme.palette.secondary.main,
|
41895 |
+
'&:hover': {
|
41896 |
+
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.secondary.main, theme.palette.action.hoverOpacity),
|
41897 |
+
// Reset on touch devices, it doesn't add specificity
|
41898 |
+
'@media (hover: none)': {
|
41899 |
+
backgroundColor: 'transparent'
|
41900 |
+
}
|
41901 |
+
}
|
41902 |
+
},
|
41903 |
+
'&$disabled': {
|
41904 |
+
color: theme.palette.action.disabled
|
41905 |
+
}
|
41906 |
+
}
|
|
|
|
|
|
|
|
|
41907 |
};
|
41908 |
+
};
|
41909 |
+
var defaultCheckedIcon = /*#__PURE__*/react.createElement(CheckBox, null);
|
41910 |
+
var defaultIcon = /*#__PURE__*/react.createElement(CheckBoxOutlineBlank, null);
|
41911 |
+
var defaultIndeterminateIcon = /*#__PURE__*/react.createElement(IndeterminateCheckBox, null);
|
41912 |
+
var Checkbox = /*#__PURE__*/react.forwardRef(function Checkbox(props, ref) {
|
41913 |
+
var _props$checkedIcon = props.checkedIcon,
|
41914 |
+
checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon,
|
41915 |
+
classes = props.classes,
|
41916 |
+
_props$color = props.color,
|
41917 |
+
color = _props$color === void 0 ? 'secondary' : _props$color,
|
41918 |
+
_props$icon = props.icon,
|
41919 |
+
iconProp = _props$icon === void 0 ? defaultIcon : _props$icon,
|
41920 |
+
_props$indeterminate = props.indeterminate,
|
41921 |
+
indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,
|
41922 |
+
_props$indeterminateI = props.indeterminateIcon,
|
41923 |
+
indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI,
|
41924 |
+
inputProps = props.inputProps,
|
41925 |
+
_props$size = props.size,
|
41926 |
+
size = _props$size === void 0 ? 'medium' : _props$size,
|
41927 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["checkedIcon", "classes", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size"]);
|
41928 |
|
41929 |
+
var icon = indeterminate ? indeterminateIconProp : iconProp;
|
41930 |
+
var indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;
|
41931 |
+
return /*#__PURE__*/react.createElement(internal_SwitchBase, (0,esm_extends/* default */.Z)({
|
41932 |
+
type: "checkbox",
|
41933 |
+
classes: {
|
41934 |
+
root: (0,clsx_m/* default */.Z)(classes.root, classes["color".concat((0,capitalize/* default */.Z)(color))], indeterminate && classes.indeterminate),
|
41935 |
+
checked: classes.checked,
|
41936 |
+
disabled: classes.disabled
|
41937 |
},
|
41938 |
+
color: color,
|
41939 |
+
inputProps: (0,esm_extends/* default */.Z)({
|
41940 |
+
'data-indeterminate': indeterminate
|
41941 |
+
}, inputProps),
|
41942 |
+
icon: /*#__PURE__*/react.cloneElement(icon, {
|
41943 |
+
fontSize: icon.props.fontSize === undefined && size === "small" ? size : icon.props.fontSize
|
41944 |
+
}),
|
41945 |
+
checkedIcon: /*#__PURE__*/react.cloneElement(indeterminateIcon, {
|
41946 |
+
fontSize: indeterminateIcon.props.fontSize === undefined && size === "small" ? size : indeterminateIcon.props.fontSize
|
41947 |
+
}),
|
41948 |
+
ref: ref
|
41949 |
+
}, other));
|
41950 |
+
});
|
41951 |
+
false ? 0 : void 0;
|
41952 |
+
/* harmony default export */ var Checkbox_Checkbox = ((0,withStyles/* default */.Z)(Checkbox_styles, {
|
41953 |
+
name: 'MuiCheckbox'
|
41954 |
+
})(Checkbox));
|
41955 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/svg-icons/Cancel.js
|
|
|
|
|
41956 |
|
|
|
41957 |
|
41958 |
+
/**
|
41959 |
+
* @ignore - internal component.
|
41960 |
+
*/
|
41961 |
|
41962 |
+
/* harmony default export */ var Cancel = ((0,createSvgIcon/* default */.Z)( /*#__PURE__*/react.createElement("path", {
|
41963 |
+
d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"
|
41964 |
+
}), 'Cancel'));
|
41965 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Chip/Chip.js
|
41966 |
|
41967 |
|
41968 |
|
|
|
41969 |
|
41970 |
|
41971 |
|
41975 |
|
41976 |
|
41977 |
|
41978 |
+
var Chip_styles = function styles(theme) {
|
41979 |
+
var backgroundColor = theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[700];
|
41980 |
+
var deleteIconColor = (0,colorManipulator/* fade */.U1)(theme.palette.text.primary, 0.26);
|
41981 |
+
return {
|
41982 |
+
/* Styles applied to the root element. */
|
41983 |
+
root: {
|
41984 |
+
fontFamily: theme.typography.fontFamily,
|
41985 |
+
fontSize: theme.typography.pxToRem(13),
|
41986 |
+
display: 'inline-flex',
|
41987 |
+
alignItems: 'center',
|
41988 |
+
justifyContent: 'center',
|
41989 |
+
height: 32,
|
41990 |
+
color: theme.palette.getContrastText(backgroundColor),
|
41991 |
+
backgroundColor: backgroundColor,
|
41992 |
+
borderRadius: 32 / 2,
|
41993 |
+
whiteSpace: 'nowrap',
|
41994 |
+
transition: theme.transitions.create(['background-color', 'box-shadow']),
|
41995 |
+
// label will inherit this from root, then `clickable` class overrides this for both
|
41996 |
+
cursor: 'default',
|
41997 |
+
// We disable the focus ring for mouse, touch and keyboard users.
|
41998 |
+
outline: 0,
|
41999 |
+
textDecoration: 'none',
|
42000 |
+
border: 'none',
|
42001 |
+
// Remove `button` border
|
42002 |
+
padding: 0,
|
42003 |
+
// Remove `button` padding
|
42004 |
+
verticalAlign: 'middle',
|
42005 |
+
boxSizing: 'border-box',
|
42006 |
+
'&$disabled': {
|
42007 |
+
opacity: 0.5,
|
42008 |
+
pointerEvents: 'none'
|
42009 |
+
},
|
42010 |
+
'& $avatar': {
|
42011 |
+
marginLeft: 5,
|
42012 |
+
marginRight: -6,
|
42013 |
+
width: 24,
|
42014 |
+
height: 24,
|
42015 |
+
color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],
|
42016 |
+
fontSize: theme.typography.pxToRem(12)
|
42017 |
+
},
|
42018 |
+
'& $avatarColorPrimary': {
|
42019 |
+
color: theme.palette.primary.contrastText,
|
42020 |
+
backgroundColor: theme.palette.primary.dark
|
42021 |
+
},
|
42022 |
+
'& $avatarColorSecondary': {
|
42023 |
+
color: theme.palette.secondary.contrastText,
|
42024 |
+
backgroundColor: theme.palette.secondary.dark
|
42025 |
+
},
|
42026 |
+
'& $avatarSmall': {
|
42027 |
+
marginLeft: 4,
|
42028 |
+
marginRight: -4,
|
42029 |
+
width: 18,
|
42030 |
+
height: 18,
|
42031 |
+
fontSize: theme.typography.pxToRem(10)
|
42032 |
+
}
|
42033 |
+
},
|
42034 |
|
42035 |
+
/* Styles applied to the root element if `size="small"`. */
|
42036 |
+
sizeSmall: {
|
42037 |
+
height: 24
|
42038 |
+
},
|
42039 |
|
42040 |
+
/* Styles applied to the root element if `color="primary"`. */
|
42041 |
+
colorPrimary: {
|
42042 |
+
backgroundColor: theme.palette.primary.main,
|
42043 |
+
color: theme.palette.primary.contrastText
|
42044 |
+
},
|
42045 |
|
42046 |
+
/* Styles applied to the root element if `color="secondary"`. */
|
42047 |
+
colorSecondary: {
|
42048 |
+
backgroundColor: theme.palette.secondary.main,
|
42049 |
+
color: theme.palette.secondary.contrastText
|
42050 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
42051 |
|
42052 |
+
/* Pseudo-class applied to the root element if `disabled={true}`. */
|
42053 |
+
disabled: {},
|
|
|
|
|
|
|
42054 |
|
42055 |
+
/* Styles applied to the root element if `onClick` is defined or `clickable={true}`. */
|
42056 |
+
clickable: {
|
42057 |
+
userSelect: 'none',
|
42058 |
+
WebkitTapHighlightColor: 'transparent',
|
42059 |
+
cursor: 'pointer',
|
42060 |
+
'&:hover, &:focus': {
|
42061 |
+
backgroundColor: (0,colorManipulator/* emphasize */._4)(backgroundColor, 0.08)
|
42062 |
+
},
|
42063 |
+
'&:active': {
|
42064 |
+
boxShadow: theme.shadows[1]
|
42065 |
+
}
|
42066 |
+
},
|
42067 |
|
42068 |
+
/* Styles applied to the root element if `onClick` and `color="primary"` is defined or `clickable={true}`. */
|
42069 |
+
clickableColorPrimary: {
|
42070 |
+
'&:hover, &:focus': {
|
42071 |
+
backgroundColor: (0,colorManipulator/* emphasize */._4)(theme.palette.primary.main, 0.08)
|
42072 |
+
}
|
42073 |
+
},
|
42074 |
|
42075 |
+
/* Styles applied to the root element if `onClick` and `color="secondary"` is defined or `clickable={true}`. */
|
42076 |
+
clickableColorSecondary: {
|
42077 |
+
'&:hover, &:focus': {
|
42078 |
+
backgroundColor: (0,colorManipulator/* emphasize */._4)(theme.palette.secondary.main, 0.08)
|
42079 |
+
}
|
42080 |
+
},
|
42081 |
|
42082 |
+
/* Styles applied to the root element if `onDelete` is defined. */
|
42083 |
+
deletable: {
|
42084 |
+
'&:focus': {
|
42085 |
+
backgroundColor: (0,colorManipulator/* emphasize */._4)(backgroundColor, 0.08)
|
42086 |
+
}
|
42087 |
+
},
|
42088 |
|
42089 |
+
/* Styles applied to the root element if `onDelete` and `color="primary"` is defined. */
|
42090 |
+
deletableColorPrimary: {
|
42091 |
+
'&:focus': {
|
42092 |
+
backgroundColor: (0,colorManipulator/* emphasize */._4)(theme.palette.primary.main, 0.2)
|
42093 |
+
}
|
42094 |
+
},
|
42095 |
|
42096 |
+
/* Styles applied to the root element if `onDelete` and `color="secondary"` is defined. */
|
42097 |
+
deletableColorSecondary: {
|
42098 |
+
'&:focus': {
|
42099 |
+
backgroundColor: (0,colorManipulator/* emphasize */._4)(theme.palette.secondary.main, 0.2)
|
42100 |
+
}
|
42101 |
+
},
|
42102 |
|
42103 |
+
/* Styles applied to the root element if `variant="outlined"`. */
|
42104 |
+
outlined: {
|
42105 |
+
backgroundColor: 'transparent',
|
42106 |
+
border: "1px solid ".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),
|
42107 |
+
'$clickable&:hover, $clickable&:focus, $deletable&:focus': {
|
42108 |
+
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.text.primary, theme.palette.action.hoverOpacity)
|
42109 |
+
},
|
42110 |
+
'& $avatar': {
|
42111 |
+
marginLeft: 4
|
42112 |
+
},
|
42113 |
+
'& $avatarSmall': {
|
42114 |
+
marginLeft: 2
|
42115 |
+
},
|
42116 |
+
'& $icon': {
|
42117 |
+
marginLeft: 4
|
42118 |
+
},
|
42119 |
+
'& $iconSmall': {
|
42120 |
+
marginLeft: 2
|
42121 |
+
},
|
42122 |
+
'& $deleteIcon': {
|
42123 |
+
marginRight: 5
|
42124 |
+
},
|
42125 |
+
'& $deleteIconSmall': {
|
42126 |
+
marginRight: 3
|
42127 |
+
}
|
42128 |
+
},
|
42129 |
|
42130 |
+
/* Styles applied to the root element if `variant="outlined"` and `color="primary"`. */
|
42131 |
+
outlinedPrimary: {
|
42132 |
+
color: theme.palette.primary.main,
|
42133 |
+
border: "1px solid ".concat(theme.palette.primary.main),
|
42134 |
+
'$clickable&:hover, $clickable&:focus, $deletable&:focus': {
|
42135 |
+
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.primary.main, theme.palette.action.hoverOpacity)
|
42136 |
}
|
42137 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42138 |
|
42139 |
+
/* Styles applied to the root element if `variant="outlined"` and `color="secondary"`. */
|
42140 |
+
outlinedSecondary: {
|
42141 |
+
color: theme.palette.secondary.main,
|
42142 |
+
border: "1px solid ".concat(theme.palette.secondary.main),
|
42143 |
+
'$clickable&:hover, $clickable&:focus, $deletable&:focus': {
|
42144 |
+
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.secondary.main, theme.palette.action.hoverOpacity)
|
42145 |
+
}
|
42146 |
+
},
|
42147 |
+
// TODO v5: remove
|
|
|
|
|
|
|
42148 |
|
42149 |
+
/* Styles applied to the `avatar` element. */
|
42150 |
+
avatar: {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42151 |
|
42152 |
+
/* Styles applied to the `avatar` element if `size="small"`. */
|
42153 |
+
avatarSmall: {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42154 |
|
42155 |
+
/* Styles applied to the `avatar` element if `color="primary"`. */
|
42156 |
+
avatarColorPrimary: {},
|
42157 |
|
42158 |
+
/* Styles applied to the `avatar` element if `color="secondary"`. */
|
42159 |
+
avatarColorSecondary: {},
|
42160 |
|
42161 |
+
/* Styles applied to the `icon` element. */
|
42162 |
+
icon: {
|
42163 |
+
color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],
|
42164 |
+
marginLeft: 5,
|
42165 |
+
marginRight: -6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42166 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
42167 |
|
42168 |
+
/* Styles applied to the `icon` element if `size="small"`. */
|
42169 |
+
iconSmall: {
|
42170 |
+
width: 18,
|
42171 |
+
height: 18,
|
42172 |
+
marginLeft: 4,
|
42173 |
+
marginRight: -4
|
42174 |
+
},
|
42175 |
|
42176 |
+
/* Styles applied to the `icon` element if `color="primary"`. */
|
42177 |
+
iconColorPrimary: {
|
42178 |
+
color: 'inherit'
|
42179 |
+
},
|
42180 |
|
42181 |
+
/* Styles applied to the `icon` element if `color="secondary"`. */
|
42182 |
+
iconColorSecondary: {
|
42183 |
+
color: 'inherit'
|
42184 |
+
},
|
42185 |
|
42186 |
+
/* Styles applied to the label `span` element. */
|
42187 |
+
label: {
|
42188 |
+
overflow: 'hidden',
|
42189 |
+
textOverflow: 'ellipsis',
|
42190 |
+
paddingLeft: 12,
|
42191 |
+
paddingRight: 12,
|
42192 |
+
whiteSpace: 'nowrap'
|
42193 |
+
},
|
42194 |
|
42195 |
+
/* Styles applied to the label `span` element if `size="small"`. */
|
42196 |
+
labelSmall: {
|
42197 |
+
paddingLeft: 8,
|
42198 |
+
paddingRight: 8
|
42199 |
+
},
|
42200 |
|
42201 |
+
/* Styles applied to the `deleteIcon` element. */
|
42202 |
+
deleteIcon: {
|
42203 |
+
WebkitTapHighlightColor: 'transparent',
|
42204 |
+
color: deleteIconColor,
|
42205 |
+
height: 22,
|
42206 |
+
width: 22,
|
42207 |
+
cursor: 'pointer',
|
42208 |
+
margin: '0 5px 0 -6px',
|
42209 |
+
'&:hover': {
|
42210 |
+
color: (0,colorManipulator/* fade */.U1)(deleteIconColor, 0.4)
|
42211 |
+
}
|
42212 |
+
},
|
42213 |
|
42214 |
+
/* Styles applied to the `deleteIcon` element if `size="small"`. */
|
42215 |
+
deleteIconSmall: {
|
42216 |
+
height: 16,
|
42217 |
+
width: 16,
|
42218 |
+
marginRight: 4,
|
42219 |
+
marginLeft: -4
|
42220 |
+
},
|
42221 |
|
42222 |
+
/* Styles applied to the deleteIcon element if `color="primary"` and `variant="default"`. */
|
42223 |
+
deleteIconColorPrimary: {
|
42224 |
+
color: (0,colorManipulator/* fade */.U1)(theme.palette.primary.contrastText, 0.7),
|
42225 |
+
'&:hover, &:active': {
|
42226 |
+
color: theme.palette.primary.contrastText
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42227 |
}
|
42228 |
},
|
42229 |
|
42230 |
+
/* Styles applied to the deleteIcon element if `color="secondary"` and `variant="default"`. */
|
42231 |
+
deleteIconColorSecondary: {
|
42232 |
+
color: (0,colorManipulator/* fade */.U1)(theme.palette.secondary.contrastText, 0.7),
|
42233 |
+
'&:hover, &:active': {
|
42234 |
+
color: theme.palette.secondary.contrastText
|
|
|
|
|
|
|
|
|
42235 |
}
|
42236 |
},
|
42237 |
|
42238 |
+
/* Styles applied to the deleteIcon element if `color="primary"` and `variant="outlined"`. */
|
42239 |
+
deleteIconOutlinedColorPrimary: {
|
42240 |
+
color: (0,colorManipulator/* fade */.U1)(theme.palette.primary.main, 0.7),
|
42241 |
+
'&:hover, &:active': {
|
42242 |
color: theme.palette.primary.main
|
|
|
|
|
|
|
42243 |
}
|
42244 |
},
|
42245 |
|
42246 |
+
/* Styles applied to the deleteIcon element if `color="secondary"` and `variant="outlined"`. */
|
42247 |
+
deleteIconOutlinedColorSecondary: {
|
42248 |
+
color: (0,colorManipulator/* fade */.U1)(theme.palette.secondary.main, 0.7),
|
42249 |
+
'&:hover, &:active': {
|
42250 |
color: theme.palette.secondary.main
|
|
|
|
|
|
|
42251 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42252 |
}
|
42253 |
};
|
42254 |
};
|
42255 |
+
|
42256 |
+
function isDeleteKeyboardEvent(keyboardEvent) {
|
42257 |
+
return keyboardEvent.key === 'Backspace' || keyboardEvent.key === 'Delete';
|
42258 |
+
}
|
42259 |
+
/**
|
42260 |
+
* Chips represent complex entities in small blocks, such as a contact.
|
42261 |
+
*/
|
42262 |
+
|
42263 |
+
|
42264 |
+
var Chip = /*#__PURE__*/react.forwardRef(function Chip(props, ref) {
|
42265 |
+
var avatarProp = props.avatar,
|
42266 |
+
classes = props.classes,
|
42267 |
className = props.className,
|
42268 |
+
clickableProp = props.clickable,
|
42269 |
+
_props$color = props.color,
|
42270 |
+
color = _props$color === void 0 ? 'default' : _props$color,
|
42271 |
+
ComponentProp = props.component,
|
42272 |
+
deleteIconProp = props.deleteIcon,
|
42273 |
_props$disabled = props.disabled,
|
42274 |
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
42275 |
+
iconProp = props.icon,
|
|
|
|
|
|
|
|
|
42276 |
label = props.label,
|
|
|
42277 |
onClick = props.onClick,
|
42278 |
+
onDelete = props.onDelete,
|
42279 |
+
onKeyDown = props.onKeyDown,
|
42280 |
+
onKeyUp = props.onKeyUp,
|
42281 |
+
_props$size = props.size,
|
42282 |
+
size = _props$size === void 0 ? 'medium' : _props$size,
|
42283 |
+
_props$variant = props.variant,
|
42284 |
+
variant = _props$variant === void 0 ? 'default' : _props$variant,
|
42285 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["avatar", "classes", "className", "clickable", "color", "component", "deleteIcon", "disabled", "icon", "label", "onClick", "onDelete", "onKeyDown", "onKeyUp", "size", "variant"]);
|
|
|
42286 |
|
42287 |
+
var chipRef = react.useRef(null);
|
42288 |
+
var handleRef = (0,useForkRef/* default */.Z)(chipRef, ref);
|
|
|
|
|
42289 |
|
42290 |
+
var handleDeleteIconClick = function handleDeleteIconClick(event) {
|
42291 |
+
// Stop the event from bubbling up to the `Chip`
|
42292 |
+
event.stopPropagation();
|
42293 |
+
|
42294 |
+
if (onDelete) {
|
42295 |
+
onDelete(event);
|
42296 |
}
|
42297 |
};
|
42298 |
|
42299 |
+
var handleKeyDown = function handleKeyDown(event) {
|
42300 |
+
// Ignore events from children of `Chip`.
|
42301 |
+
if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) {
|
42302 |
+
// will be handled in keyUp, otherwise some browsers
|
42303 |
+
// might init navigation
|
42304 |
+
event.preventDefault();
|
42305 |
}
|
42306 |
|
42307 |
+
if (onKeyDown) {
|
42308 |
+
onKeyDown(event);
|
42309 |
}
|
42310 |
};
|
42311 |
|
42312 |
+
var handleKeyUp = function handleKeyUp(event) {
|
42313 |
+
// Ignore events from children of `Chip`.
|
42314 |
+
if (event.currentTarget === event.target) {
|
42315 |
+
if (onDelete && isDeleteKeyboardEvent(event)) {
|
42316 |
+
onDelete(event);
|
42317 |
+
} else if (event.key === 'Escape' && chipRef.current) {
|
42318 |
+
chipRef.current.blur();
|
42319 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42320 |
}
|
|
|
42321 |
|
42322 |
+
if (onKeyUp) {
|
42323 |
+
onKeyUp(event);
|
42324 |
+
}
|
42325 |
+
};
|
42326 |
|
42327 |
+
var clickable = clickableProp !== false && onClick ? true : clickableProp;
|
42328 |
+
var small = size === 'small';
|
42329 |
+
var Component = ComponentProp || (clickable ? ButtonBase_ButtonBase : 'div');
|
42330 |
+
var moreProps = Component === ButtonBase_ButtonBase ? {
|
42331 |
+
component: 'div'
|
42332 |
+
} : {};
|
42333 |
+
var deleteIcon = null;
|
42334 |
|
42335 |
+
if (onDelete) {
|
42336 |
+
var customClasses = (0,clsx_m/* default */.Z)(color !== 'default' && (variant === "default" ? classes["deleteIconColor".concat((0,capitalize/* default */.Z)(color))] : classes["deleteIconOutlinedColor".concat((0,capitalize/* default */.Z)(color))]), small && classes.deleteIconSmall);
|
42337 |
+
deleteIcon = deleteIconProp && /*#__PURE__*/react.isValidElement(deleteIconProp) ? /*#__PURE__*/react.cloneElement(deleteIconProp, {
|
42338 |
+
className: (0,clsx_m/* default */.Z)(deleteIconProp.props.className, classes.deleteIcon, customClasses),
|
42339 |
+
onClick: handleDeleteIconClick
|
42340 |
+
}) : /*#__PURE__*/react.createElement(Cancel, {
|
42341 |
+
className: (0,clsx_m/* default */.Z)(classes.deleteIcon, customClasses),
|
42342 |
+
onClick: handleDeleteIconClick
|
42343 |
+
});
|
42344 |
}
|
42345 |
|
42346 |
+
var avatar = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42347 |
|
42348 |
+
if (avatarProp && /*#__PURE__*/react.isValidElement(avatarProp)) {
|
42349 |
+
avatar = /*#__PURE__*/react.cloneElement(avatarProp, {
|
42350 |
+
className: (0,clsx_m/* default */.Z)(classes.avatar, avatarProp.props.className, small && classes.avatarSmall, color !== 'default' && classes["avatarColor".concat((0,capitalize/* default */.Z)(color))])
|
42351 |
+
});
|
42352 |
}
|
|
|
|
|
|
|
|
|
|
|
42353 |
|
42354 |
+
var icon = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42355 |
|
42356 |
+
if (iconProp && /*#__PURE__*/react.isValidElement(iconProp)) {
|
42357 |
+
icon = /*#__PURE__*/react.cloneElement(iconProp, {
|
42358 |
+
className: (0,clsx_m/* default */.Z)(classes.icon, iconProp.props.className, small && classes.iconSmall, color !== 'default' && classes["iconColor".concat((0,capitalize/* default */.Z)(color))])
|
42359 |
+
});
|
42360 |
+
}
|
42361 |
|
42362 |
+
if (false) {}
|
|
|
|
|
|
|
|
|
42363 |
|
42364 |
+
return /*#__PURE__*/react.createElement(Component, (0,esm_extends/* default */.Z)({
|
42365 |
+
role: clickable || onDelete ? 'button' : undefined,
|
42366 |
+
className: (0,clsx_m/* default */.Z)(classes.root, className, color !== 'default' && [classes["color".concat((0,capitalize/* default */.Z)(color))], clickable && classes["clickableColor".concat((0,capitalize/* default */.Z)(color))], onDelete && classes["deletableColor".concat((0,capitalize/* default */.Z)(color))]], variant !== "default" && [classes.outlined, {
|
42367 |
+
'primary': classes.outlinedPrimary,
|
42368 |
+
'secondary': classes.outlinedSecondary
|
42369 |
+
}[color]], disabled && classes.disabled, small && classes.sizeSmall, clickable && classes.clickable, onDelete && classes.deletable),
|
42370 |
+
"aria-disabled": disabled ? true : undefined,
|
42371 |
+
tabIndex: clickable || onDelete ? 0 : undefined,
|
42372 |
+
onClick: onClick,
|
42373 |
+
onKeyDown: handleKeyDown,
|
42374 |
+
onKeyUp: handleKeyUp,
|
42375 |
+
ref: handleRef
|
42376 |
+
}, moreProps, other), avatar || icon, /*#__PURE__*/react.createElement("span", {
|
42377 |
+
className: (0,clsx_m/* default */.Z)(classes.label, small && classes.labelSmall)
|
42378 |
+
}, label), deleteIcon);
|
42379 |
+
});
|
42380 |
+
false ? 0 : void 0;
|
42381 |
+
/* harmony default export */ var Chip_Chip = ((0,withStyles/* default */.Z)(Chip_styles, {
|
42382 |
+
name: 'MuiChip'
|
42383 |
+
})(Chip));
|
42384 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Dialogs/TemplatesDialog/TemplateOptions.js
|
42385 |
+
function TemplateOptions_slicedToArray(arr, i) { return TemplateOptions_arrayWithHoles(arr) || TemplateOptions_iterableToArrayLimit(arr, i) || TemplateOptions_unsupportedIterableToArray(arr, i) || TemplateOptions_nonIterableRest(); }
|
42386 |
|
42387 |
+
function TemplateOptions_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
|
42388 |
|
42389 |
+
function TemplateOptions_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return TemplateOptions_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return TemplateOptions_arrayLikeToArray(o, minLen); }
|
|
|
|
|
|
|
|
|
|
|
42390 |
|
42391 |
+
function TemplateOptions_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
|
42392 |
|
42393 |
+
function TemplateOptions_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
|
|
|
42394 |
|
42395 |
+
function TemplateOptions_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
|
|
42396 |
|
42397 |
+
function TemplateOptions_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
42398 |
|
42399 |
+
function TemplateOptions_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { TemplateOptions_ownKeys(Object(source), true).forEach(function (key) { TemplateOptions_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { TemplateOptions_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
42400 |
|
42401 |
+
function TemplateOptions_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
42402 |
|
42403 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42404 |
|
|
|
|
|
|
|
42405 |
|
|
|
|
|
42406 |
|
|
|
|
|
|
|
42407 |
|
|
|
|
|
|
|
|
|
42408 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42409 |
|
42410 |
|
42411 |
|
42412 |
+
var filteredList = function filteredList(importFilteredList, filterButtons, filterFrameDesign, filterPopularAction) {
|
42413 |
+
var filteredList = importFilteredList.filter(function (template) {
|
42414 |
+
// Filter correct buttons
|
42415 |
+
if (template.export_type !== filterButtons) {
|
42416 |
+
return false;
|
42417 |
+
} // Hide wrong menu styles
|
42418 |
|
42419 |
|
42420 |
+
if (filterButtons === "group" && filterFrameDesign.length !== 0) {
|
42421 |
+
if (!filterFrameDesign.includes(dlv_umd_default()(template, "group_type", "default"))) return false;
|
42422 |
+
} // Hide filtered button actions
|
42423 |
|
42424 |
|
42425 |
+
if (filterButtons === "button" && filterPopularAction.length !== 0) {
|
42426 |
+
if (!filterPopularAction.includes(dlv_umd_default()(template, "type", "url"))) return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42427 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42428 |
|
42429 |
+
return true;
|
42430 |
+
});
|
42431 |
+
var defaultButton = {
|
42432 |
+
name: translate("utils.new_button"),
|
42433 |
+
show_mobile: true,
|
42434 |
+
show_desktop: true
|
42435 |
+
};
|
42436 |
|
42437 |
+
if (filterButtons === "group") {
|
42438 |
+
filteredList.unshift({
|
42439 |
+
data: {
|
42440 |
+
name: translate("utils.new_group"),
|
42441 |
+
show_mobile: true,
|
42442 |
+
show_desktop: true
|
42443 |
+
},
|
42444 |
+
buttons: [defaultButton],
|
42445 |
+
export_type: "group"
|
42446 |
+
});
|
42447 |
+
} else if (filterButtons === "button") {
|
42448 |
+
filteredList.unshift(TemplateOptions_objectSpread(TemplateOptions_objectSpread({}, defaultButton), {}, {
|
42449 |
+
export_type: "button"
|
42450 |
+
}));
|
42451 |
+
}
|
42452 |
|
42453 |
+
return filteredList;
|
42454 |
+
};
|
|
|
|
|
42455 |
|
42456 |
+
function TemplateOptions(_ref) {
|
42457 |
+
var index = _ref.index,
|
42458 |
+
currentGroup = _ref.currentGroup,
|
42459 |
+
onClose = _ref.onClose,
|
42460 |
+
returnedTemplates = _ref.returnedTemplates,
|
42461 |
+
filterButtons = _ref.filterButtons,
|
42462 |
+
filterFrameDesign = _ref.filterFrameDesign,
|
42463 |
+
filterPopularAction = _ref.filterPopularAction;
|
42464 |
|
42465 |
+
var _useState = (0,react.useState)([]),
|
42466 |
+
_useState2 = TemplateOptions_slicedToArray(_useState, 2),
|
42467 |
+
importFilteredList = _useState2[0],
|
42468 |
+
setImportFilteredList = _useState2[1];
|
42469 |
|
42470 |
+
var _useState3 = (0,react.useState)(true),
|
42471 |
+
_useState4 = TemplateOptions_slicedToArray(_useState3, 2),
|
42472 |
+
isLoading = _useState4[0],
|
42473 |
+
setIsLoading = _useState4[1];
|
42474 |
|
42475 |
+
var _useState5 = (0,react.useState)([]),
|
42476 |
+
_useState6 = TemplateOptions_slicedToArray(_useState5, 2),
|
42477 |
+
selected = _useState6[0],
|
42478 |
+
setSelected = _useState6[1];
|
42479 |
|
42480 |
+
var filteredTemplateList = filteredList(importFilteredList, filterButtons, filterFrameDesign, filterPopularAction);
|
42481 |
|
42482 |
+
var handleCheckboxSelect = function handleCheckboxSelect(id) {
|
42483 |
+
var selectedIndex = selected.indexOf(id);
|
42484 |
+
var newSelected = [];
|
42485 |
|
42486 |
+
if (selectedIndex === -1) {
|
42487 |
+
newSelected = newSelected.concat(selected, id);
|
42488 |
+
} else if (selectedIndex === 0) {
|
42489 |
+
newSelected = newSelected.concat(selected.slice(1));
|
42490 |
+
} else if (selectedIndex === selected.length - 1) {
|
42491 |
+
newSelected = newSelected.concat(selected.slice(0, -1));
|
42492 |
+
} else if (selectedIndex > 0) {
|
42493 |
+
newSelected = newSelected.concat(selected.slice(0, selectedIndex), selected.slice(selectedIndex + 1));
|
42494 |
+
}
|
42495 |
|
42496 |
+
setSelected(newSelected);
|
42497 |
+
};
|
42498 |
|
42499 |
+
var handleSelectImport = function handleSelectImport() {
|
42500 |
+
var actualTemplates = selected.map(function (val) {
|
42501 |
+
return filteredTemplateList[val];
|
42502 |
+
});
|
42503 |
|
42504 |
+
if (filterButtons === "button") {
|
42505 |
+
ImportData(currentGroup, null, actualTemplates, index, actualTemplates.length === 1);
|
42506 |
+
}
|
42507 |
|
42508 |
+
handleClose();
|
42509 |
+
};
|
42510 |
|
42511 |
+
var handleClose = function handleClose() {
|
42512 |
+
onClose();
|
42513 |
+
setSelected([]);
|
42514 |
+
};
|
42515 |
|
42516 |
+
(0,react.useEffect)(function () {
|
42517 |
+
importTemplates().then(function (result) {
|
42518 |
+
setImportFilteredList(result);
|
42519 |
+
setIsLoading(false);
|
42520 |
+
})["catch"](function (err) {
|
42521 |
+
console.error(err);
|
42522 |
+
});
|
42523 |
+
}, []);
|
42524 |
+
(0,react.useEffect)(function () {
|
42525 |
+
setSelected([]);
|
42526 |
+
}, [filterButtons, filterFrameDesign, filterPopularAction]);
|
42527 |
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(DialogContent_DialogContent, null, !isLoading && returnedTemplates && /*#__PURE__*/react.createElement("p", {
|
42528 |
+
className: "search-results"
|
42529 |
+
}, /*#__PURE__*/react.createElement("span", {
|
42530 |
+
dangerouslySetInnerHTML: {
|
42531 |
+
__html: translate("utils.templates.found", "", filteredTemplateList.length)
|
42532 |
}
|
42533 |
+
})), isLoading && /*#__PURE__*/react.createElement("div", {
|
42534 |
+
className: "loading"
|
42535 |
+
}, /*#__PURE__*/react.createElement("div", {
|
42536 |
+
style: {
|
42537 |
+
alignSelf: "center"
|
|
|
|
|
|
|
42538 |
}
|
42539 |
+
}, /*#__PURE__*/react.createElement("svg", {
|
42540 |
+
width: "60",
|
42541 |
+
height: "60",
|
42542 |
+
viewBox: "0 0 38 38",
|
42543 |
+
xmlns: "http://www.w3.org/2000/svg",
|
42544 |
+
stroke: "#2f788a"
|
42545 |
+
}, /*#__PURE__*/react.createElement("g", {
|
42546 |
+
fill: "none",
|
42547 |
+
fillRule: "evenodd"
|
42548 |
+
}, /*#__PURE__*/react.createElement("g", {
|
42549 |
+
transform: "translate(1 1)",
|
42550 |
+
strokeWidth: "2"
|
42551 |
+
}, /*#__PURE__*/react.createElement("circle", {
|
42552 |
+
strokeOpacity: ".5",
|
42553 |
+
cx: "18",
|
42554 |
+
cy: "18",
|
42555 |
+
r: "18"
|
42556 |
+
}), /*#__PURE__*/react.createElement("path", {
|
42557 |
+
d: "M36 18c0-9.94-8.06-18-18-18"
|
42558 |
+
}, /*#__PURE__*/react.createElement("animateTransform", {
|
42559 |
+
attributeName: "transform",
|
42560 |
+
type: "rotate",
|
42561 |
+
from: "0 18 18",
|
42562 |
+
to: "360 18 18",
|
42563 |
+
dur: "1s",
|
42564 |
+
repeatCount: "indefinite"
|
42565 |
+
}))))), /*#__PURE__*/react.createElement("p", null, translate("loading.loading")))), !isLoading && /*#__PURE__*/react.createElement("div", {
|
42566 |
+
className: "template"
|
42567 |
+
}, filteredTemplateList.map(function (template, key) {
|
42568 |
+
return /*#__PURE__*/react.createElement("div", {
|
42569 |
+
key: key,
|
42570 |
+
className: "container",
|
42571 |
+
"data-testid": "templates:template-option"
|
42572 |
+
}, filterButtons === "button" && /*#__PURE__*/react.createElement(Checkbox_Checkbox, {
|
42573 |
+
checked: selected.includes(key),
|
42574 |
+
onChange: function onChange() {
|
42575 |
+
handleCheckboxSelect(key);
|
42576 |
+
},
|
42577 |
+
className: (0,clsx_m/* default */.Z)("checkbox", selected.length === 0 && "hidden"),
|
42578 |
+
"data-testid": "templates:template-option-checkbox"
|
42579 |
+
}), /*#__PURE__*/react.createElement("div", {
|
42580 |
+
className: "type",
|
42581 |
+
onClick: function onClick() {
|
42582 |
+
if (selected.length > 0) {
|
42583 |
+
return handleCheckboxSelect(key);
|
42584 |
+
}
|
42585 |
|
42586 |
+
ImportRawData(template, index, currentGroup, true);
|
42587 |
+
handleClose();
|
42588 |
+
}
|
42589 |
+
}, key === 0 ? /*#__PURE__*/react.createElement("div", {
|
42590 |
+
className: "default-option"
|
42591 |
+
}, /*#__PURE__*/react.createElement("i", {
|
42592 |
+
className: "fa fa-plus-circle",
|
42593 |
+
"aria-hidden": "true"
|
42594 |
+
}), /*#__PURE__*/react.createElement("span", null, filterButtons === "button" ? translate("templates.default_button") : translate("templates.default_group"))) : /*#__PURE__*/react.createElement("img", {
|
42595 |
+
src: template.template_image ? buttonizer_admin.assets + "/images/templates/".concat(template.template_image) : buttonizer_admin.assets + "/images/buttonizer-logo.png",
|
42596 |
+
alt: "Template",
|
42597 |
+
draggable: false
|
42598 |
+
}), key > 0 && filterButtons === "button" && /*#__PURE__*/react.createElement(Chip_Chip, {
|
42599 |
+
className: "category",
|
42600 |
+
size: "small",
|
42601 |
+
key: key,
|
42602 |
+
label: template.name
|
42603 |
+
}), /*#__PURE__*/react.createElement("div", {
|
42604 |
+
className: "select"
|
42605 |
+
}, selected.includes(key) ? /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("i", {
|
42606 |
+
className: "fa fa-check-circle",
|
42607 |
+
"aria-hidden": "true"
|
42608 |
+
}), translate("templates.selected")) : /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("i", {
|
42609 |
+
className: "fa fa-plus-circle",
|
42610 |
+
"aria-hidden": "true"
|
42611 |
+
}), translate("templates.select")))));
|
42612 |
+
}))), /*#__PURE__*/react.createElement(DialogActions_DialogActions, {
|
42613 |
+
style: {
|
42614 |
+
marginTop: "20px",
|
42615 |
+
justifyContent: "space-between"
|
42616 |
+
}
|
42617 |
+
}, /*#__PURE__*/react.createElement(ImportButton, {
|
42618 |
+
index: index,
|
42619 |
+
style: {
|
42620 |
+
fontSize: 13
|
42621 |
+
},
|
42622 |
+
currentGroup: currentGroup,
|
42623 |
+
label: filterButtons === "button" ? translate("import_export.import.new_group.button") : translate("import_export.import.new_group.group"),
|
42624 |
+
kbLink: 653,
|
42625 |
+
onClose: handleClose
|
42626 |
+
}), selected.length > 0 && /*#__PURE__*/react.createElement(Button_Button, {
|
42627 |
+
className: (0,clsx_m/* default */.Z)("select-all", selected.length > 0 && "visible"),
|
42628 |
+
variant: "contained",
|
42629 |
+
onClick: function onClick() {
|
42630 |
+
return handleSelectImport();
|
42631 |
+
},
|
42632 |
+
color: "primary",
|
42633 |
+
size: "small",
|
42634 |
+
"data-testid": "templates:insert-selected"
|
42635 |
+
}, translate("templates.insert"))));
|
42636 |
+
}
|
42637 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionOptions.js
|
42638 |
+
function ButtonActionOptions_toConsumableArray(arr) { return ButtonActionOptions_arrayWithoutHoles(arr) || ButtonActionOptions_iterableToArray(arr) || ButtonActionOptions_unsupportedIterableToArray(arr) || ButtonActionOptions_nonIterableSpread(); }
|
42639 |
|
42640 |
+
function ButtonActionOptions_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
|
|
|
42641 |
|
42642 |
+
function ButtonActionOptions_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ButtonActionOptions_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ButtonActionOptions_arrayLikeToArray(o, minLen); }
|
|
|
|
|
|
|
|
|
|
|
|
|
42643 |
|
42644 |
+
function ButtonActionOptions_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42645 |
|
42646 |
+
function ButtonActionOptions_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return ButtonActionOptions_arrayLikeToArray(arr); }
|
42647 |
|
42648 |
+
function ButtonActionOptions_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
42649 |
|
42650 |
+
function ButtonActionOptions_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
42651 |
|
42652 |
+
function ButtonActionOptions_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ButtonActionOptions_ownKeys(Object(source), true).forEach(function (key) { ButtonActionOptions_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ButtonActionOptions_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
42653 |
|
42654 |
+
function ButtonActionOptions_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
42655 |
|
42656 |
|
42657 |
+
var popular = [{
|
42658 |
+
value: "url",
|
42659 |
+
label: translate("settings.button_action.actions.url.name")
|
42660 |
+
}, {
|
42661 |
+
value: "page",
|
42662 |
+
label: translate("settings.button_action.actions.page.name"),
|
42663 |
+
standalone: false
|
42664 |
+
}, {
|
42665 |
+
value: "phone",
|
42666 |
+
label: translate("settings.button_action.actions.phone_number.name")
|
42667 |
+
}, {
|
42668 |
+
value: "mail",
|
42669 |
+
label: translate("settings.button_action.actions.mail.name")
|
42670 |
+
}, {
|
42671 |
+
value: "whatsapp",
|
42672 |
+
label: translate("settings.button_action.actions.whatsapp_chat")
|
42673 |
+
}, {
|
42674 |
+
value: "backtotop",
|
42675 |
+
label: translate("settings.button_action.actions.back_to_top")
|
42676 |
+
}, {
|
42677 |
+
value: "gotobottom",
|
42678 |
+
label: translate("settings.button_action.actions.go_to_bottom")
|
42679 |
+
}, {
|
42680 |
+
value: "gobackpage",
|
42681 |
+
label: translate("settings.button_action.actions.go_back_one_page")
|
42682 |
+
}, {
|
42683 |
+
value: "javascript_pro",
|
42684 |
+
label: translate("settings.button_action.actions.javascript.name"),
|
42685 |
+
isPro: true
|
42686 |
+
}, {
|
42687 |
+
value: "socialsharing",
|
42688 |
+
label: translate("settings.button_action.actions.social_sharing.social_sharing")
|
42689 |
+
}].filter(function (obj) {
|
42690 |
+
return window.buttonizer_admin.is_stand_alone ? typeof obj.standalone === "undefined" : true;
|
42691 |
+
}).map(function (obj) {
|
42692 |
+
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
42693 |
+
group: "popular"
|
42694 |
+
});
|
42695 |
+
});
|
42696 |
+
var chat = [{
|
42697 |
+
value: "sms",
|
42698 |
+
label: translate("settings.button_action.actions.chat.sms")
|
42699 |
+
}, {
|
42700 |
+
value: "messenger_chat",
|
42701 |
+
label: translate("settings.button_action.actions.chat.messenger_chat")
|
42702 |
+
}, {
|
42703 |
+
value: "messenger",
|
42704 |
+
label: translate("settings.button_action.actions.chat.messenger_link")
|
42705 |
+
}, {
|
42706 |
+
value: "twitter_dm",
|
42707 |
+
label: translate("settings.button_action.actions.chat.twitter_dm")
|
42708 |
+
}, {
|
42709 |
+
value: "skype",
|
42710 |
+
label: translate("settings.button_action.actions.chat.skype")
|
42711 |
+
}, {
|
42712 |
+
value: "line",
|
42713 |
+
label: translate("settings.button_action.actions.chat.line")
|
42714 |
+
}, {
|
42715 |
+
value: "telegram",
|
42716 |
+
label: translate("settings.button_action.actions.chat.telegram")
|
42717 |
+
}, {
|
42718 |
+
value: "viber",
|
42719 |
+
label: translate("settings.button_action.actions.chat.viber")
|
42720 |
+
}, {
|
42721 |
+
value: "signal_group",
|
42722 |
+
label: translate("settings.button_action.actions.chat.signal_group")
|
42723 |
+
}].map(function (obj) {
|
42724 |
+
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
42725 |
+
group: "chat"
|
42726 |
+
});
|
42727 |
+
});
|
42728 |
+
var socialMedia = [{
|
42729 |
+
value: "facebook",
|
42730 |
+
label: translate("settings.button_action.actions.social_media.facebook")
|
42731 |
+
}, {
|
42732 |
+
value: "twitter",
|
42733 |
+
label: translate("settings.button_action.actions.social_media.twitter")
|
42734 |
+
}, {
|
42735 |
+
value: "instagram",
|
42736 |
+
label: translate("settings.button_action.actions.social_media.instagram")
|
42737 |
+
}, {
|
42738 |
+
value: "snapchat",
|
42739 |
+
label: translate("settings.button_action.actions.social_media.snapchat")
|
42740 |
+
}, {
|
42741 |
+
value: "linkedin",
|
42742 |
+
label: translate("settings.button_action.actions.social_media.linkedin")
|
42743 |
+
}, {
|
42744 |
+
value: "vk",
|
42745 |
+
label: translate("settings.button_action.actions.social_media.vk")
|
42746 |
+
}, {
|
42747 |
+
value: "waze",
|
42748 |
+
label: translate("settings.button_action.actions.social_media.waze")
|
42749 |
+
}].map(function (obj) {
|
42750 |
+
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
42751 |
+
group: "social_media"
|
42752 |
+
});
|
42753 |
+
});
|
42754 |
+
var popup = [{
|
42755 |
+
value: "poptin",
|
42756 |
+
label: "Poptin"
|
42757 |
+
}, {
|
42758 |
+
value: "elementor_popup",
|
42759 |
+
label: "Elementor Popup"
|
42760 |
+
}, {
|
42761 |
+
value: "popup_maker",
|
42762 |
+
label: "Popup Maker"
|
42763 |
+
}, {
|
42764 |
+
value: "popups",
|
42765 |
+
label: "Popups - WordPress Popup"
|
42766 |
+
}, {
|
42767 |
+
value: "wppopups",
|
42768 |
+
label: "WP Popups - WordPress Popup builder"
|
42769 |
+
}].map(function (obj) {
|
42770 |
+
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
42771 |
+
group: "popup"
|
42772 |
+
});
|
42773 |
+
});
|
42774 |
+
var other = [{
|
42775 |
+
value: "clipboard",
|
42776 |
+
label: translate("settings.button_action.actions.clipboard")
|
42777 |
+
}, {
|
42778 |
+
value: "print",
|
42779 |
+
label: translate("settings.button_action.actions.print_page")
|
42780 |
+
}].map(function (obj) {
|
42781 |
+
return ButtonActionOptions_objectSpread(ButtonActionOptions_objectSpread({}, obj), {}, {
|
42782 |
+
group: "actions"
|
42783 |
+
});
|
42784 |
+
});
|
42785 |
+
/* harmony default export */ var ButtonActionOptions = ([].concat(ButtonActionOptions_toConsumableArray(popular), ButtonActionOptions_toConsumableArray(chat), ButtonActionOptions_toConsumableArray(socialMedia), ButtonActionOptions_toConsumableArray(popup), ButtonActionOptions_toConsumableArray(other)));
|
42786 |
+
;// CONCATENATED MODULE: ./node_modules/popper.js/dist/esm/popper.js
|
42787 |
+
/**!
|
42788 |
+
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
42789 |
+
* @version 1.16.1-lts
|
42790 |
+
* @license
|
42791 |
+
* Copyright (c) 2016 Federico Zivolo and contributors
|
42792 |
+
*
|
42793 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
42794 |
+
* of this software and associated documentation files (the "Software"), to deal
|
42795 |
+
* in the Software without restriction, including without limitation the rights
|
42796 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
42797 |
+
* copies of the Software, and to permit persons to whom the Software is
|
42798 |
+
* furnished to do so, subject to the following conditions:
|
42799 |
+
*
|
42800 |
+
* The above copyright notice and this permission notice shall be included in all
|
42801 |
+
* copies or substantial portions of the Software.
|
42802 |
+
*
|
42803 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
42804 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
42805 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
42806 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
42807 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
42808 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
42809 |
+
* SOFTWARE.
|
42810 |
+
*/
|
42811 |
+
var popper_isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
|
42812 |
|
42813 |
+
var timeoutDuration = function () {
|
42814 |
+
var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
|
42815 |
+
for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
|
42816 |
+
if (popper_isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
|
42817 |
+
return 1;
|
42818 |
+
}
|
42819 |
+
}
|
42820 |
+
return 0;
|
42821 |
+
}();
|
42822 |
|
42823 |
+
function microtaskDebounce(fn) {
|
42824 |
+
var called = false;
|
42825 |
+
return function () {
|
42826 |
+
if (called) {
|
42827 |
+
return;
|
42828 |
+
}
|
42829 |
+
called = true;
|
42830 |
+
window.Promise.resolve().then(function () {
|
42831 |
+
called = false;
|
42832 |
+
fn();
|
42833 |
+
});
|
42834 |
+
};
|
42835 |
+
}
|
42836 |
|
42837 |
+
function taskDebounce(fn) {
|
42838 |
+
var scheduled = false;
|
42839 |
+
return function () {
|
42840 |
+
if (!scheduled) {
|
42841 |
+
scheduled = true;
|
42842 |
+
setTimeout(function () {
|
42843 |
+
scheduled = false;
|
42844 |
+
fn();
|
42845 |
+
}, timeoutDuration);
|
42846 |
+
}
|
42847 |
+
};
|
42848 |
+
}
|
42849 |
|
42850 |
+
var supportsMicroTasks = popper_isBrowser && window.Promise;
|
42851 |
|
42852 |
+
/**
|
42853 |
+
* Create a debounced version of a method, that's asynchronously deferred
|
42854 |
+
* but called in the minimum time possible.
|
42855 |
+
*
|
42856 |
+
* @method
|
42857 |
+
* @memberof Popper.Utils
|
42858 |
+
* @argument {Function} fn
|
42859 |
+
* @returns {Function}
|
42860 |
+
*/
|
42861 |
+
var popper_debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
|
42862 |
|
42863 |
+
/**
|
42864 |
+
* Check if the given variable is a function
|
42865 |
+
* @method
|
42866 |
+
* @memberof Popper.Utils
|
42867 |
+
* @argument {Any} functionToCheck - variable to check
|
42868 |
+
* @returns {Boolean} answer to: is a function?
|
42869 |
+
*/
|
42870 |
+
function isFunction(functionToCheck) {
|
42871 |
+
var getType = {};
|
42872 |
+
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
42873 |
+
}
|
42874 |
|
42875 |
+
/**
|
42876 |
+
* Get CSS computed property of the given element
|
42877 |
+
* @method
|
42878 |
+
* @memberof Popper.Utils
|
42879 |
+
* @argument {Eement} element
|
42880 |
+
* @argument {String} property
|
42881 |
+
*/
|
42882 |
+
function getStyleComputedProperty(element, property) {
|
42883 |
+
if (element.nodeType !== 1) {
|
42884 |
+
return [];
|
42885 |
+
}
|
42886 |
+
// NOTE: 1 DOM access here
|
42887 |
+
var window = element.ownerDocument.defaultView;
|
42888 |
+
var css = window.getComputedStyle(element, null);
|
42889 |
+
return property ? css[property] : css;
|
42890 |
+
}
|
42891 |
|
42892 |
+
/**
|
42893 |
+
* Returns the parentNode or the host of the element
|
42894 |
+
* @method
|
42895 |
+
* @memberof Popper.Utils
|
42896 |
+
* @argument {Element} element
|
42897 |
+
* @returns {Element} parent
|
42898 |
+
*/
|
42899 |
+
function popper_getParentNode(element) {
|
42900 |
+
if (element.nodeName === 'HTML') {
|
42901 |
+
return element;
|
42902 |
+
}
|
42903 |
+
return element.parentNode || element.host;
|
42904 |
+
}
|
42905 |
|
42906 |
+
/**
|
42907 |
+
* Returns the scrolling parent of the given element
|
42908 |
+
* @method
|
42909 |
+
* @memberof Popper.Utils
|
42910 |
+
* @argument {Element} element
|
42911 |
+
* @returns {Element} scroll parent
|
42912 |
+
*/
|
42913 |
+
function popper_getScrollParent(element) {
|
42914 |
+
// Return body, `getScroll` will take care to get the correct `scrollTop` from it
|
42915 |
+
if (!element) {
|
42916 |
+
return document.body;
|
42917 |
+
}
|
42918 |
|
42919 |
+
switch (element.nodeName) {
|
42920 |
+
case 'HTML':
|
42921 |
+
case 'BODY':
|
42922 |
+
return element.ownerDocument.body;
|
42923 |
+
case '#document':
|
42924 |
+
return element.body;
|
42925 |
+
}
|
42926 |
|
42927 |
+
// Firefox want us to check `-x` and `-y` variations as well
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42928 |
|
42929 |
+
var _getStyleComputedProp = getStyleComputedProperty(element),
|
42930 |
+
overflow = _getStyleComputedProp.overflow,
|
42931 |
+
overflowX = _getStyleComputedProp.overflowX,
|
42932 |
+
overflowY = _getStyleComputedProp.overflowY;
|
42933 |
|
42934 |
+
if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
|
42935 |
+
return element;
|
42936 |
+
}
|
|
|
42937 |
|
42938 |
+
return popper_getScrollParent(popper_getParentNode(element));
|
42939 |
+
}
|
|
|
|
|
42940 |
|
42941 |
+
/**
|
42942 |
+
* Returns the reference node of the reference object, or the reference object itself.
|
42943 |
+
* @method
|
42944 |
+
* @memberof Popper.Utils
|
42945 |
+
* @param {Element|Object} reference - the reference element (the popper will be relative to this)
|
42946 |
+
* @returns {Element} parent
|
42947 |
+
*/
|
42948 |
+
function getReferenceNode(reference) {
|
42949 |
+
return reference && reference.referenceNode ? reference.referenceNode : reference;
|
42950 |
+
}
|
42951 |
|
42952 |
+
var isIE11 = popper_isBrowser && !!(window.MSInputMethodContext && document.documentMode);
|
42953 |
+
var isIE10 = popper_isBrowser && /MSIE 10/.test(navigator.userAgent);
|
|
|
|
|
|
|
|
|
|
|
42954 |
|
42955 |
+
/**
|
42956 |
+
* Determines if the browser is Internet Explorer
|
42957 |
+
* @method
|
42958 |
+
* @memberof Popper.Utils
|
42959 |
+
* @param {Number} version to check
|
42960 |
+
* @returns {Boolean} isIE
|
42961 |
+
*/
|
42962 |
+
function popper_isIE(version) {
|
42963 |
+
if (version === 11) {
|
42964 |
+
return isIE11;
|
42965 |
+
}
|
42966 |
+
if (version === 10) {
|
42967 |
+
return isIE10;
|
42968 |
+
}
|
42969 |
+
return isIE11 || isIE10;
|
42970 |
+
}
|
42971 |
|
42972 |
+
/**
|
42973 |
+
* Returns the offset parent of the given element
|
42974 |
+
* @method
|
42975 |
+
* @memberof Popper.Utils
|
42976 |
+
* @argument {Element} element
|
42977 |
+
* @returns {Element} offset parent
|
42978 |
+
*/
|
42979 |
+
function popper_getOffsetParent(element) {
|
42980 |
+
if (!element) {
|
42981 |
+
return document.documentElement;
|
42982 |
+
}
|
42983 |
|
42984 |
+
var noOffsetParent = popper_isIE(10) ? document.body : null;
|
|
|
42985 |
|
42986 |
+
// NOTE: 1 DOM access here
|
42987 |
+
var offsetParent = element.offsetParent || null;
|
42988 |
+
// Skip hidden elements which don't have an offsetParent
|
42989 |
+
while (offsetParent === noOffsetParent && element.nextElementSibling) {
|
42990 |
+
offsetParent = (element = element.nextElementSibling).offsetParent;
|
42991 |
+
}
|
42992 |
|
42993 |
+
var nodeName = offsetParent && offsetParent.nodeName;
|
|
|
|
|
|
|
42994 |
|
42995 |
+
if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
|
42996 |
+
return element ? element.ownerDocument.documentElement : document.documentElement;
|
42997 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42998 |
|
42999 |
+
// .offsetParent will return the closest TH, TD or TABLE in case
|
43000 |
+
// no offsetParent is present, I hate this job...
|
43001 |
+
if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
|
43002 |
+
return popper_getOffsetParent(offsetParent);
|
43003 |
+
}
|
|
|
|
|
|
|
|
|
43004 |
|
43005 |
+
return offsetParent;
|
43006 |
+
}
|
43007 |
|
43008 |
+
function isOffsetContainer(element) {
|
43009 |
+
var nodeName = element.nodeName;
|
|
|
43010 |
|
43011 |
+
if (nodeName === 'BODY') {
|
43012 |
+
return false;
|
43013 |
+
}
|
43014 |
+
return nodeName === 'HTML' || popper_getOffsetParent(element.firstElementChild) === element;
|
43015 |
+
}
|
43016 |
|
43017 |
+
/**
|
43018 |
+
* Finds the root node (document, shadowDOM root) of the given element
|
43019 |
+
* @method
|
43020 |
+
* @memberof Popper.Utils
|
43021 |
+
* @argument {Element} node
|
43022 |
+
* @returns {Element} root node
|
43023 |
+
*/
|
43024 |
+
function getRoot(node) {
|
43025 |
+
if (node.parentNode !== null) {
|
43026 |
+
return getRoot(node.parentNode);
|
43027 |
+
}
|
43028 |
|
43029 |
+
return node;
|
43030 |
+
}
|
|
|
|
|
|
|
|
|
43031 |
|
43032 |
+
/**
|
43033 |
+
* Finds the offset parent common to the two provided nodes
|
43034 |
+
* @method
|
43035 |
+
* @memberof Popper.Utils
|
43036 |
+
* @argument {Element} element1
|
43037 |
+
* @argument {Element} element2
|
43038 |
+
* @returns {Element} common offset parent
|
43039 |
+
*/
|
43040 |
+
function findCommonOffsetParent(element1, element2) {
|
43041 |
+
// This check is needed to avoid errors in case one of the elements isn't defined for any reason
|
43042 |
+
if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
|
43043 |
+
return document.documentElement;
|
43044 |
+
}
|
43045 |
|
43046 |
+
// Here we make sure to give as "start" the element that comes first in the DOM
|
43047 |
+
var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
|
43048 |
+
var start = order ? element1 : element2;
|
43049 |
+
var end = order ? element2 : element1;
|
43050 |
|
43051 |
+
// Get common ancestor container
|
43052 |
+
var range = document.createRange();
|
43053 |
+
range.setStart(start, 0);
|
43054 |
+
range.setEnd(end, 0);
|
43055 |
+
var commonAncestorContainer = range.commonAncestorContainer;
|
43056 |
|
43057 |
+
// Both nodes are inside #document
|
43058 |
+
|
43059 |
+
if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
|
43060 |
+
if (isOffsetContainer(commonAncestorContainer)) {
|
43061 |
+
return commonAncestorContainer;
|
|
|
|
|
|
|
|
|
|
|
|
|
43062 |
}
|
43063 |
|
43064 |
+
return popper_getOffsetParent(commonAncestorContainer);
|
43065 |
+
}
|
43066 |
|
43067 |
+
// one of the nodes is inside shadowDOM, find which one
|
43068 |
+
var element1root = getRoot(element1);
|
43069 |
+
if (element1root.host) {
|
43070 |
+
return findCommonOffsetParent(element1root.host, element2);
|
43071 |
+
} else {
|
43072 |
+
return findCommonOffsetParent(element1, getRoot(element2).host);
|
43073 |
+
}
|
43074 |
+
}
|
43075 |
|
43076 |
+
/**
|
43077 |
+
* Gets the scroll value of the given element in the given side (top and left)
|
43078 |
+
* @method
|
43079 |
+
* @memberof Popper.Utils
|
43080 |
+
* @argument {Element} element
|
43081 |
+
* @argument {String} side `top` or `left`
|
43082 |
+
* @returns {number} amount of scrolled pixels
|
43083 |
+
*/
|
43084 |
+
function popper_getScroll(element) {
|
43085 |
+
var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
|
43086 |
|
43087 |
+
var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
|
43088 |
+
var nodeName = element.nodeName;
|
43089 |
|
43090 |
+
if (nodeName === 'BODY' || nodeName === 'HTML') {
|
43091 |
+
var html = element.ownerDocument.documentElement;
|
43092 |
+
var scrollingElement = element.ownerDocument.scrollingElement || html;
|
43093 |
+
return scrollingElement[upperSide];
|
43094 |
+
}
|
43095 |
|
43096 |
+
return element[upperSide];
|
43097 |
+
}
|
|
|
|
|
|
|
43098 |
|
43099 |
+
/*
|
43100 |
+
* Sum or subtract the element scroll values (left and top) from a given rect object
|
43101 |
+
* @method
|
43102 |
+
* @memberof Popper.Utils
|
43103 |
+
* @param {Object} rect - Rect object you want to change
|
43104 |
+
* @param {HTMLElement} element - The element from the function reads the scroll values
|
43105 |
+
* @param {Boolean} subtract - set to true if you want to subtract the scroll values
|
43106 |
+
* @return {Object} rect - The modifier rect object
|
43107 |
+
*/
|
43108 |
+
function includeScroll(rect, element) {
|
43109 |
+
var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
43110 |
|
43111 |
+
var scrollTop = popper_getScroll(element, 'top');
|
43112 |
+
var scrollLeft = popper_getScroll(element, 'left');
|
43113 |
+
var modifier = subtract ? -1 : 1;
|
43114 |
+
rect.top += scrollTop * modifier;
|
43115 |
+
rect.bottom += scrollTop * modifier;
|
43116 |
+
rect.left += scrollLeft * modifier;
|
43117 |
+
rect.right += scrollLeft * modifier;
|
43118 |
+
return rect;
|
43119 |
+
}
|
43120 |
|
43121 |
+
/*
|
43122 |
+
* Helper to detect borders of a given element
|
43123 |
+
* @method
|
43124 |
+
* @memberof Popper.Utils
|
43125 |
+
* @param {CSSStyleDeclaration} styles
|
43126 |
+
* Result of `getStyleComputedProperty` on the given element
|
43127 |
+
* @param {String} axis - `x` or `y`
|
43128 |
+
* @return {number} borders - The borders size of the given axis
|
43129 |
+
*/
|
43130 |
|
43131 |
+
function popper_getBordersSize(styles, axis) {
|
43132 |
+
var sideA = axis === 'x' ? 'Left' : 'Top';
|
43133 |
+
var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
|
|
|
|
|
|
|
|
|
|
|
43134 |
|
43135 |
+
return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);
|
43136 |
+
}
|
43137 |
|
43138 |
+
function popper_getSize(axis, body, html, computedStyle) {
|
43139 |
+
return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], popper_isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
|
43140 |
+
}
|
|
|
|
|
43141 |
|
43142 |
+
function getWindowSizes(document) {
|
43143 |
+
var body = document.body;
|
43144 |
+
var html = document.documentElement;
|
43145 |
+
var computedStyle = popper_isIE(10) && getComputedStyle(html);
|
|
|
43146 |
|
43147 |
+
return {
|
43148 |
+
height: popper_getSize('Height', body, html, computedStyle),
|
43149 |
+
width: popper_getSize('Width', body, html, computedStyle)
|
43150 |
};
|
43151 |
+
}
|
43152 |
|
43153 |
+
var classCallCheck = function (instance, Constructor) {
|
43154 |
+
if (!(instance instanceof Constructor)) {
|
43155 |
+
throw new TypeError("Cannot call a class as a function");
|
43156 |
+
}
|
43157 |
+
};
|
|
|
|
|
43158 |
|
43159 |
+
var popper_createClass = function () {
|
43160 |
+
function defineProperties(target, props) {
|
43161 |
+
for (var i = 0; i < props.length; i++) {
|
43162 |
+
var descriptor = props[i];
|
43163 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
43164 |
+
descriptor.configurable = true;
|
43165 |
+
if ("value" in descriptor) descriptor.writable = true;
|
43166 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
43167 |
}
|
43168 |
+
}
|
43169 |
|
43170 |
+
return function (Constructor, protoProps, staticProps) {
|
43171 |
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
43172 |
+
if (staticProps) defineProperties(Constructor, staticProps);
|
43173 |
+
return Constructor;
|
43174 |
};
|
43175 |
+
}();
|
43176 |
|
|
|
|
|
|
|
43177 |
|
|
|
|
|
|
|
43178 |
|
43179 |
+
|
43180 |
+
|
43181 |
+
var popper_defineProperty = function (obj, key, value) {
|
43182 |
+
if (key in obj) {
|
43183 |
+
Object.defineProperty(obj, key, {
|
43184 |
+
value: value,
|
43185 |
+
enumerable: true,
|
43186 |
+
configurable: true,
|
43187 |
+
writable: true
|
43188 |
});
|
43189 |
+
} else {
|
43190 |
+
obj[key] = value;
|
43191 |
+
}
|
43192 |
|
43193 |
+
return obj;
|
43194 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43195 |
|
43196 |
+
var popper_extends = Object.assign || function (target) {
|
43197 |
+
for (var i = 1; i < arguments.length; i++) {
|
43198 |
+
var source = arguments[i];
|
|
|
43199 |
|
43200 |
+
for (var key in source) {
|
43201 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
43202 |
+
target[key] = source[key];
|
43203 |
+
}
|
43204 |
}
|
43205 |
+
}
|
43206 |
|
43207 |
+
return target;
|
43208 |
+
};
|
|
|
|
|
|
|
|
|
|
|
43209 |
|
43210 |
+
/**
|
43211 |
+
* Given element offsets, generate an output similar to getBoundingClientRect
|
43212 |
+
* @method
|
43213 |
+
* @memberof Popper.Utils
|
43214 |
+
* @argument {Object} offsets
|
43215 |
+
* @returns {Object} ClientRect like output
|
43216 |
+
*/
|
43217 |
+
function getClientRect(offsets) {
|
43218 |
+
return popper_extends({}, offsets, {
|
43219 |
+
right: offsets.left + offsets.width,
|
43220 |
+
bottom: offsets.top + offsets.height
|
43221 |
});
|
43222 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43223 |
|
43224 |
+
/**
|
43225 |
+
* Get bounding client rect of given element
|
43226 |
+
* @method
|
43227 |
+
* @memberof Popper.Utils
|
43228 |
+
* @param {HTMLElement} element
|
43229 |
+
* @return {Object} client rect
|
43230 |
+
*/
|
43231 |
+
function popper_getBoundingClientRect(element) {
|
43232 |
+
var rect = {};
|
43233 |
|
43234 |
+
// IE10 10 FIX: Please, don't ask, the element isn't
|
43235 |
+
// considered in DOM in some circumstances...
|
43236 |
+
// This isn't reproducible in IE10 compatibility mode of IE11
|
43237 |
+
try {
|
43238 |
+
if (popper_isIE(10)) {
|
43239 |
+
rect = element.getBoundingClientRect();
|
43240 |
+
var scrollTop = popper_getScroll(element, 'top');
|
43241 |
+
var scrollLeft = popper_getScroll(element, 'left');
|
43242 |
+
rect.top += scrollTop;
|
43243 |
+
rect.left += scrollLeft;
|
43244 |
+
rect.bottom += scrollTop;
|
43245 |
+
rect.right += scrollLeft;
|
43246 |
+
} else {
|
43247 |
+
rect = element.getBoundingClientRect();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43248 |
}
|
43249 |
+
} catch (e) {}
|
43250 |
|
43251 |
+
var result = {
|
43252 |
+
left: rect.left,
|
43253 |
+
top: rect.top,
|
43254 |
+
width: rect.right - rect.left,
|
43255 |
+
height: rect.bottom - rect.top
|
43256 |
+
};
|
43257 |
|
43258 |
+
// subtract scrollbar size from sizes
|
43259 |
+
var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
|
43260 |
+
var width = sizes.width || element.clientWidth || result.width;
|
43261 |
+
var height = sizes.height || element.clientHeight || result.height;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43262 |
|
43263 |
+
var horizScrollbar = element.offsetWidth - width;
|
43264 |
+
var vertScrollbar = element.offsetHeight - height;
|
|
|
|
|
43265 |
|
43266 |
+
// if an hypothetical scrollbar is detected, we must be sure it's not a `border`
|
43267 |
+
// we make this check conditional for performance reasons
|
43268 |
+
if (horizScrollbar || vertScrollbar) {
|
43269 |
+
var styles = getStyleComputedProperty(element);
|
43270 |
+
horizScrollbar -= popper_getBordersSize(styles, 'x');
|
43271 |
+
vertScrollbar -= popper_getBordersSize(styles, 'y');
|
43272 |
|
43273 |
+
result.width -= horizScrollbar;
|
43274 |
+
result.height -= vertScrollbar;
|
43275 |
+
}
|
43276 |
|
43277 |
+
return getClientRect(result);
|
43278 |
+
}
|
|
|
43279 |
|
43280 |
+
function getOffsetRectRelativeToArbitraryNode(children, parent) {
|
43281 |
+
var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
|
|
|
|
|
43282 |
|
43283 |
+
var isIE10 = popper_isIE(10);
|
43284 |
+
var isHTML = parent.nodeName === 'HTML';
|
43285 |
+
var childrenRect = popper_getBoundingClientRect(children);
|
43286 |
+
var parentRect = popper_getBoundingClientRect(parent);
|
43287 |
+
var scrollParent = popper_getScrollParent(children);
|
43288 |
|
43289 |
+
var styles = getStyleComputedProperty(parent);
|
43290 |
+
var borderTopWidth = parseFloat(styles.borderTopWidth);
|
43291 |
+
var borderLeftWidth = parseFloat(styles.borderLeftWidth);
|
43292 |
|
43293 |
+
// In cases where the parent is fixed, we must ignore negative scroll in offset calc
|
43294 |
+
if (fixedPosition && isHTML) {
|
43295 |
+
parentRect.top = Math.max(parentRect.top, 0);
|
43296 |
+
parentRect.left = Math.max(parentRect.left, 0);
|
43297 |
+
}
|
43298 |
+
var offsets = getClientRect({
|
43299 |
+
top: childrenRect.top - parentRect.top - borderTopWidth,
|
43300 |
+
left: childrenRect.left - parentRect.left - borderLeftWidth,
|
43301 |
+
width: childrenRect.width,
|
43302 |
+
height: childrenRect.height
|
43303 |
+
});
|
43304 |
+
offsets.marginTop = 0;
|
43305 |
+
offsets.marginLeft = 0;
|
43306 |
|
43307 |
+
// Subtract margins of documentElement in case it's being used as parent
|
43308 |
+
// we do this only on HTML because it's the only element that behaves
|
43309 |
+
// differently when margins are applied to it. The margins are included in
|
43310 |
+
// the box of the documentElement, in the other cases not.
|
43311 |
+
if (!isIE10 && isHTML) {
|
43312 |
+
var marginTop = parseFloat(styles.marginTop);
|
43313 |
+
var marginLeft = parseFloat(styles.marginLeft);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43314 |
|
43315 |
+
offsets.top -= borderTopWidth - marginTop;
|
43316 |
+
offsets.bottom -= borderTopWidth - marginTop;
|
43317 |
+
offsets.left -= borderLeftWidth - marginLeft;
|
43318 |
+
offsets.right -= borderLeftWidth - marginLeft;
|
43319 |
|
43320 |
+
// Attach marginTop and marginLeft because in some circumstances we may need them
|
43321 |
+
offsets.marginTop = marginTop;
|
43322 |
+
offsets.marginLeft = marginLeft;
|
43323 |
+
}
|
43324 |
|
43325 |
+
if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
|
43326 |
+
offsets = includeScroll(offsets, parent);
|
43327 |
+
}
|
43328 |
|
43329 |
+
return offsets;
|
|
|
|
|
|
|
|
|
43330 |
}
|
43331 |
|
43332 |
+
function getViewportOffsetRectRelativeToArtbitraryNode(element) {
|
43333 |
+
var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
|
|
|
|
|
|
|
|
|
43334 |
|
43335 |
+
var html = element.ownerDocument.documentElement;
|
43336 |
+
var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
|
43337 |
+
var width = Math.max(html.clientWidth, window.innerWidth || 0);
|
43338 |
+
var height = Math.max(html.clientHeight, window.innerHeight || 0);
|
43339 |
|
43340 |
+
var scrollTop = !excludeScroll ? popper_getScroll(html) : 0;
|
43341 |
+
var scrollLeft = !excludeScroll ? popper_getScroll(html, 'left') : 0;
|
43342 |
|
43343 |
+
var offset = {
|
43344 |
+
top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
|
43345 |
+
left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
|
43346 |
+
width: width,
|
43347 |
+
height: height
|
43348 |
+
};
|
43349 |
|
43350 |
+
return getClientRect(offset);
|
43351 |
+
}
|
43352 |
|
43353 |
+
/**
|
43354 |
+
* Check if the given element is fixed or is inside a fixed parent
|
43355 |
+
* @method
|
43356 |
+
* @memberof Popper.Utils
|
43357 |
+
* @argument {Element} element
|
43358 |
+
* @argument {Element} customContainer
|
43359 |
+
* @returns {Boolean} answer to "isFixed?"
|
43360 |
+
*/
|
43361 |
+
function isFixed(element) {
|
43362 |
+
var nodeName = element.nodeName;
|
43363 |
+
if (nodeName === 'BODY' || nodeName === 'HTML') {
|
43364 |
+
return false;
|
43365 |
+
}
|
43366 |
+
if (getStyleComputedProperty(element, 'position') === 'fixed') {
|
43367 |
+
return true;
|
43368 |
+
}
|
43369 |
+
var parentNode = popper_getParentNode(element);
|
43370 |
+
if (!parentNode) {
|
43371 |
+
return false;
|
43372 |
+
}
|
43373 |
+
return isFixed(parentNode);
|
43374 |
+
}
|
43375 |
|
43376 |
+
/**
|
43377 |
+
* Finds the first parent of an element that has a transformed property defined
|
43378 |
+
* @method
|
43379 |
+
* @memberof Popper.Utils
|
43380 |
+
* @argument {Element} element
|
43381 |
+
* @returns {Element} first transformed parent or documentElement
|
43382 |
+
*/
|
43383 |
|
43384 |
+
function getFixedPositionOffsetParent(element) {
|
43385 |
+
// This check is needed to avoid errors in case one of the elements isn't defined for any reason
|
43386 |
+
if (!element || !element.parentElement || popper_isIE()) {
|
43387 |
+
return document.documentElement;
|
43388 |
+
}
|
43389 |
+
var el = element.parentElement;
|
43390 |
+
while (el && getStyleComputedProperty(el, 'transform') === 'none') {
|
43391 |
+
el = el.parentElement;
|
43392 |
+
}
|
43393 |
+
return el || document.documentElement;
|
43394 |
+
}
|
43395 |
|
43396 |
+
/**
|
43397 |
+
* Computed the boundaries limits and return them
|
43398 |
+
* @method
|
43399 |
+
* @memberof Popper.Utils
|
43400 |
+
* @param {HTMLElement} popper
|
43401 |
+
* @param {HTMLElement} reference
|
43402 |
+
* @param {number} padding
|
43403 |
+
* @param {HTMLElement} boundariesElement - Element used to define the boundaries
|
43404 |
+
* @param {Boolean} fixedPosition - Is in fixed position mode
|
43405 |
+
* @returns {Object} Coordinates of the boundaries
|
43406 |
+
*/
|
43407 |
+
function getBoundaries(popper, reference, padding, boundariesElement) {
|
43408 |
+
var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
43409 |
|
43410 |
+
// NOTE: 1 DOM access here
|
43411 |
|
43412 |
+
var boundaries = { top: 0, left: 0 };
|
43413 |
+
var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
|
43414 |
|
43415 |
+
// Handle viewport case
|
43416 |
+
if (boundariesElement === 'viewport') {
|
43417 |
+
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
|
43418 |
+
} else {
|
43419 |
+
// Handle other cases based on DOM element used as boundaries
|
43420 |
+
var boundariesNode = void 0;
|
43421 |
+
if (boundariesElement === 'scrollParent') {
|
43422 |
+
boundariesNode = popper_getScrollParent(popper_getParentNode(reference));
|
43423 |
+
if (boundariesNode.nodeName === 'BODY') {
|
43424 |
+
boundariesNode = popper.ownerDocument.documentElement;
|
43425 |
+
}
|
43426 |
+
} else if (boundariesElement === 'window') {
|
43427 |
+
boundariesNode = popper.ownerDocument.documentElement;
|
43428 |
+
} else {
|
43429 |
+
boundariesNode = boundariesElement;
|
43430 |
}
|
|
|
|
|
43431 |
|
43432 |
+
var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
|
|
|
|
|
|
|
|
|
|
|
|
|
43433 |
|
43434 |
+
// In case of HTML, we need a different computation
|
43435 |
+
if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
|
43436 |
+
var _getWindowSizes = getWindowSizes(popper.ownerDocument),
|
43437 |
+
height = _getWindowSizes.height,
|
43438 |
+
width = _getWindowSizes.width;
|
43439 |
+
|
43440 |
+
boundaries.top += offsets.top - offsets.marginTop;
|
43441 |
+
boundaries.bottom = height + offsets.top;
|
43442 |
+
boundaries.left += offsets.left - offsets.marginLeft;
|
43443 |
+
boundaries.right = width + offsets.left;
|
43444 |
+
} else {
|
43445 |
+
// for all the other DOM elements, this one is good
|
43446 |
+
boundaries = offsets;
|
43447 |
+
}
|
43448 |
}
|
43449 |
|
43450 |
+
// Add paddings
|
43451 |
+
padding = padding || 0;
|
43452 |
+
var isPaddingNumber = typeof padding === 'number';
|
43453 |
+
boundaries.left += isPaddingNumber ? padding : padding.left || 0;
|
43454 |
+
boundaries.top += isPaddingNumber ? padding : padding.top || 0;
|
43455 |
+
boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
|
43456 |
+
boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
|
43457 |
|
43458 |
+
return boundaries;
|
43459 |
+
}
|
43460 |
|
43461 |
+
function getArea(_ref) {
|
43462 |
+
var width = _ref.width,
|
43463 |
+
height = _ref.height;
|
43464 |
|
43465 |
+
return width * height;
|
43466 |
+
}
|
|
|
43467 |
|
43468 |
+
/**
|
43469 |
+
* Utility used to transform the `auto` placement to the placement with more
|
43470 |
+
* available space.
|
43471 |
+
* @method
|
43472 |
+
* @memberof Popper.Utils
|
43473 |
+
* @argument {Object} data - The data object generated by update method
|
43474 |
+
* @argument {Object} options - Modifiers configuration and options
|
43475 |
+
* @returns {Object} The data object, properly modified
|
43476 |
+
*/
|
43477 |
+
function popper_computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
|
43478 |
+
var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
|
43479 |
|
43480 |
+
if (placement.indexOf('auto') === -1) {
|
43481 |
+
return placement;
|
43482 |
+
}
|
|
|
|
|
|
|
|
|
43483 |
|
43484 |
+
var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
|
|
|
43485 |
|
43486 |
+
var rects = {
|
43487 |
+
top: {
|
43488 |
+
width: boundaries.width,
|
43489 |
+
height: refRect.top - boundaries.top
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43490 |
},
|
43491 |
+
right: {
|
43492 |
+
width: boundaries.right - refRect.right,
|
43493 |
+
height: boundaries.height
|
43494 |
},
|
43495 |
+
bottom: {
|
43496 |
+
width: boundaries.width,
|
43497 |
+
height: boundaries.bottom - refRect.bottom
|
43498 |
+
},
|
43499 |
+
left: {
|
43500 |
+
width: refRect.left - boundaries.left,
|
43501 |
+
height: boundaries.height
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43502 |
}
|
43503 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
43504 |
|
43505 |
+
var sortedAreas = Object.keys(rects).map(function (key) {
|
43506 |
+
return popper_extends({
|
43507 |
+
key: key
|
43508 |
+
}, rects[key], {
|
43509 |
+
area: getArea(rects[key])
|
43510 |
+
});
|
43511 |
+
}).sort(function (a, b) {
|
43512 |
+
return b.area - a.area;
|
43513 |
+
});
|
43514 |
|
43515 |
+
var filteredAreas = sortedAreas.filter(function (_ref2) {
|
43516 |
+
var width = _ref2.width,
|
43517 |
+
height = _ref2.height;
|
43518 |
+
return width >= popper.clientWidth && height >= popper.clientHeight;
|
43519 |
+
});
|
43520 |
|
43521 |
+
var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
|
43522 |
|
43523 |
+
var variation = placement.split('-')[1];
|
43524 |
|
43525 |
+
return computedPlacement + (variation ? '-' + variation : '');
|
43526 |
+
}
|
43527 |
|
43528 |
+
/**
|
43529 |
+
* Get offsets to the reference element
|
43530 |
+
* @method
|
43531 |
+
* @memberof Popper.Utils
|
43532 |
+
* @param {Object} state
|
43533 |
+
* @param {Element} popper - the popper element
|
43534 |
+
* @param {Element} reference - the reference element (the popper will be relative to this)
|
43535 |
+
* @param {Element} fixedPosition - is in fixed position mode
|
43536 |
+
* @returns {Object} An object containing the offsets which will be applied to the popper
|
43537 |
+
*/
|
43538 |
+
function getReferenceOffsets(state, popper, reference) {
|
43539 |
+
var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
43540 |
|
43541 |
+
var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
|
43542 |
+
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
|
43543 |
+
}
|
|
|
|
|
|
|
43544 |
|
43545 |
+
/**
|
43546 |
+
* Get the outer sizes of the given element (offset size + margins)
|
43547 |
+
* @method
|
43548 |
+
* @memberof Popper.Utils
|
43549 |
+
* @argument {Element} element
|
43550 |
+
* @returns {Object} object containing width and height properties
|
43551 |
+
*/
|
43552 |
+
function getOuterSizes(element) {
|
43553 |
+
var window = element.ownerDocument.defaultView;
|
43554 |
+
var styles = window.getComputedStyle(element);
|
43555 |
+
var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
|
43556 |
+
var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
|
43557 |
+
var result = {
|
43558 |
+
width: element.offsetWidth + y,
|
43559 |
+
height: element.offsetHeight + x
|
43560 |
};
|
43561 |
+
return result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43562 |
}
|
43563 |
|
43564 |
+
/**
|
43565 |
+
* Get the opposite placement of the given one
|
43566 |
+
* @method
|
43567 |
+
* @memberof Popper.Utils
|
43568 |
+
* @argument {String} placement
|
43569 |
+
* @returns {String} flipped placement
|
43570 |
+
*/
|
43571 |
+
function popper_getOppositePlacement(placement) {
|
43572 |
+
var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
|
43573 |
+
return placement.replace(/left|right|bottom|top/g, function (matched) {
|
43574 |
+
return hash[matched];
|
43575 |
+
});
|
43576 |
+
}
|
43577 |
|
43578 |
+
/**
|
43579 |
+
* Get offsets to the popper
|
43580 |
+
* @method
|
43581 |
+
* @memberof Popper.Utils
|
43582 |
+
* @param {Object} position - CSS position the Popper will get applied
|
43583 |
+
* @param {HTMLElement} popper - the popper element
|
43584 |
+
* @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
|
43585 |
+
* @param {String} placement - one of the valid placement options
|
43586 |
+
* @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
|
43587 |
+
*/
|
43588 |
+
function getPopperOffsets(popper, referenceOffsets, placement) {
|
43589 |
+
placement = placement.split('-')[0];
|
43590 |
|
43591 |
+
// Get popper node sizes
|
43592 |
+
var popperRect = getOuterSizes(popper);
|
43593 |
|
43594 |
+
// Add position, width and height to our offsets object
|
43595 |
+
var popperOffsets = {
|
43596 |
+
width: popperRect.width,
|
43597 |
+
height: popperRect.height
|
43598 |
+
};
|
43599 |
|
43600 |
+
// depending by the popper placement we have to compute its offsets slightly differently
|
43601 |
+
var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
|
43602 |
+
var mainSide = isHoriz ? 'top' : 'left';
|
43603 |
+
var secondarySide = isHoriz ? 'left' : 'top';
|
43604 |
+
var measurement = isHoriz ? 'height' : 'width';
|
43605 |
+
var secondaryMeasurement = !isHoriz ? 'height' : 'width';
|
43606 |
|
43607 |
+
popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
|
43608 |
+
if (placement === secondarySide) {
|
43609 |
+
popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
|
43610 |
+
} else {
|
43611 |
+
popperOffsets[secondarySide] = referenceOffsets[popper_getOppositePlacement(secondarySide)];
|
43612 |
+
}
|
43613 |
|
43614 |
+
return popperOffsets;
|
43615 |
+
}
|
43616 |
|
43617 |
+
/**
|
43618 |
+
* Mimics the `find` method of Array
|
43619 |
+
* @method
|
43620 |
+
* @memberof Popper.Utils
|
43621 |
+
* @argument {Array} arr
|
43622 |
+
* @argument prop
|
43623 |
+
* @argument value
|
43624 |
+
* @returns index or -1
|
43625 |
+
*/
|
43626 |
+
function popper_find(arr, check) {
|
43627 |
+
// use native find if supported
|
43628 |
+
if (Array.prototype.find) {
|
43629 |
+
return arr.find(check);
|
43630 |
+
}
|
43631 |
|
43632 |
+
// use `filter` to obtain the same behavior of `find`
|
43633 |
+
return arr.filter(check)[0];
|
43634 |
+
}
|
43635 |
|
43636 |
+
/**
|
43637 |
+
* Return the index of the matching object
|
43638 |
+
* @method
|
43639 |
+
* @memberof Popper.Utils
|
43640 |
+
* @argument {Array} arr
|
43641 |
+
* @argument prop
|
43642 |
+
* @argument value
|
43643 |
+
* @returns index or -1
|
43644 |
+
*/
|
43645 |
+
function popper_findIndex(arr, prop, value) {
|
43646 |
+
// use native findIndex if supported
|
43647 |
+
if (Array.prototype.findIndex) {
|
43648 |
+
return arr.findIndex(function (cur) {
|
43649 |
+
return cur[prop] === value;
|
43650 |
+
});
|
43651 |
+
}
|
43652 |
|
43653 |
+
// use `find` + `indexOf` if `findIndex` isn't supported
|
43654 |
+
var match = popper_find(arr, function (obj) {
|
43655 |
+
return obj[prop] === value;
|
43656 |
+
});
|
43657 |
+
return arr.indexOf(match);
|
43658 |
+
}
|
43659 |
|
43660 |
+
/**
|
43661 |
+
* Loop trough the list of modifiers and run them in order,
|
43662 |
+
* each of them will then edit the data object.
|
43663 |
+
* @method
|
43664 |
+
* @memberof Popper.Utils
|
43665 |
+
* @param {dataObject} data
|
43666 |
+
* @param {Array} modifiers
|
43667 |
+
* @param {String} ends - Optional modifier name used as stopper
|
43668 |
+
* @returns {dataObject}
|
43669 |
+
*/
|
43670 |
+
function runModifiers(modifiers, data, ends) {
|
43671 |
+
var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, popper_findIndex(modifiers, 'name', ends));
|
43672 |
|
43673 |
+
modifiersToRun.forEach(function (modifier) {
|
43674 |
+
if (modifier['function']) {
|
43675 |
+
// eslint-disable-line dot-notation
|
43676 |
+
console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
|
43677 |
+
}
|
43678 |
+
var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
|
43679 |
+
if (modifier.enabled && isFunction(fn)) {
|
43680 |
+
// Add properties to offsets to make them a complete clientRect object
|
43681 |
+
// we do this before each modifier to make sure the previous one doesn't
|
43682 |
+
// mess with these values
|
43683 |
+
data.offsets.popper = getClientRect(data.offsets.popper);
|
43684 |
+
data.offsets.reference = getClientRect(data.offsets.reference);
|
43685 |
|
43686 |
+
data = fn(data, modifier);
|
43687 |
+
}
|
43688 |
+
});
|
43689 |
|
43690 |
+
return data;
|
43691 |
+
}
|
|
|
|
|
43692 |
|
43693 |
+
/**
|
43694 |
+
* Updates the position of the popper, computing the new offsets and applying
|
43695 |
+
* the new style.<br />
|
43696 |
+
* Prefer `scheduleUpdate` over `update` because of performance reasons.
|
43697 |
+
* @method
|
43698 |
+
* @memberof Popper
|
43699 |
+
*/
|
43700 |
+
function popper_update() {
|
43701 |
+
// if popper is destroyed, don't perform any further update
|
43702 |
+
if (this.state.isDestroyed) {
|
43703 |
+
return;
|
43704 |
+
}
|
43705 |
|
43706 |
+
var data = {
|
43707 |
+
instance: this,
|
43708 |
+
styles: {},
|
43709 |
+
arrowStyles: {},
|
43710 |
+
attributes: {},
|
43711 |
+
flipped: false,
|
43712 |
+
offsets: {}
|
43713 |
};
|
43714 |
|
43715 |
+
// compute reference element offsets
|
43716 |
+
data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43717 |
|
43718 |
+
// compute auto placement, store placement inside the data object,
|
43719 |
+
// modifiers will be able to edit `placement` if needed
|
43720 |
+
// and refer to originalPlacement to know the original value
|
43721 |
+
data.placement = popper_computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
|
43722 |
|
43723 |
+
// store the computed placement inside `originalPlacement`
|
43724 |
+
data.originalPlacement = data.placement;
|
43725 |
|
43726 |
+
data.positionFixed = this.options.positionFixed;
|
43727 |
|
43728 |
+
// compute the popper offsets
|
43729 |
+
data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
|
43730 |
|
43731 |
+
data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
|
43732 |
|
43733 |
+
// run the modifiers
|
43734 |
+
data = runModifiers(this.modifiers, data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43735 |
|
43736 |
+
// the first `update` will call `onCreate` callback
|
43737 |
+
// the other ones will call `onUpdate` callback
|
43738 |
+
if (!this.state.isCreated) {
|
43739 |
+
this.state.isCreated = true;
|
43740 |
+
this.options.onCreate(data);
|
43741 |
+
} else {
|
43742 |
+
this.options.onUpdate(data);
|
43743 |
+
}
|
43744 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43745 |
|
43746 |
+
/**
|
43747 |
+
* Helper used to know if the given modifier is enabled.
|
43748 |
+
* @method
|
43749 |
+
* @memberof Popper.Utils
|
43750 |
+
* @returns {Boolean}
|
43751 |
+
*/
|
43752 |
+
function isModifierEnabled(modifiers, modifierName) {
|
43753 |
+
return modifiers.some(function (_ref) {
|
43754 |
+
var name = _ref.name,
|
43755 |
+
enabled = _ref.enabled;
|
43756 |
+
return enabled && name === modifierName;
|
43757 |
+
});
|
43758 |
+
}
|
43759 |
|
43760 |
+
/**
|
43761 |
+
* Get the prefixed supported property name
|
43762 |
+
* @method
|
43763 |
+
* @memberof Popper.Utils
|
43764 |
+
* @argument {String} property (camelCase)
|
43765 |
+
* @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
|
43766 |
+
*/
|
43767 |
+
function getSupportedPropertyName(property) {
|
43768 |
+
var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
|
43769 |
+
var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
|
43770 |
|
43771 |
+
for (var i = 0; i < prefixes.length; i++) {
|
43772 |
+
var prefix = prefixes[i];
|
43773 |
+
var toCheck = prefix ? '' + prefix + upperProp : property;
|
43774 |
+
if (typeof document.body.style[toCheck] !== 'undefined') {
|
43775 |
+
return toCheck;
|
43776 |
+
}
|
43777 |
+
}
|
43778 |
+
return null;
|
43779 |
+
}
|
43780 |
|
43781 |
+
/**
|
43782 |
+
* Destroys the popper.
|
43783 |
+
* @method
|
43784 |
+
* @memberof Popper
|
43785 |
+
*/
|
43786 |
+
function destroy() {
|
43787 |
+
this.state.isDestroyed = true;
|
43788 |
|
43789 |
+
// touch DOM only if `applyStyle` modifier is enabled
|
43790 |
+
if (isModifierEnabled(this.modifiers, 'applyStyle')) {
|
43791 |
+
this.popper.removeAttribute('x-placement');
|
43792 |
+
this.popper.style.position = '';
|
43793 |
+
this.popper.style.top = '';
|
43794 |
+
this.popper.style.left = '';
|
43795 |
+
this.popper.style.right = '';
|
43796 |
+
this.popper.style.bottom = '';
|
43797 |
+
this.popper.style.willChange = '';
|
43798 |
+
this.popper.style[getSupportedPropertyName('transform')] = '';
|
43799 |
+
}
|
43800 |
|
43801 |
+
this.disableEventListeners();
|
|
|
|
|
|
|
43802 |
|
43803 |
+
// remove the popper if user explicitly asked for the deletion on destroy
|
43804 |
+
// do not use `remove` because IE11 doesn't support it
|
43805 |
+
if (this.options.removeOnDestroy) {
|
43806 |
+
this.popper.parentNode.removeChild(this.popper);
|
43807 |
+
}
|
43808 |
+
return this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43809 |
}
|
|
|
|
|
|
|
|
|
43810 |
|
43811 |
+
/**
|
43812 |
+
* Get the window associated with the element
|
43813 |
+
* @argument {Element} element
|
43814 |
+
* @returns {Window}
|
43815 |
+
*/
|
43816 |
+
function popper_getWindow(element) {
|
43817 |
+
var ownerDocument = element.ownerDocument;
|
43818 |
+
return ownerDocument ? ownerDocument.defaultView : window;
|
43819 |
+
}
|
43820 |
|
43821 |
+
function attachToScrollParents(scrollParent, event, callback, scrollParents) {
|
43822 |
+
var isBody = scrollParent.nodeName === 'BODY';
|
43823 |
+
var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
|
43824 |
+
target.addEventListener(event, callback, { passive: true });
|
43825 |
|
43826 |
+
if (!isBody) {
|
43827 |
+
attachToScrollParents(popper_getScrollParent(target.parentNode), event, callback, scrollParents);
|
43828 |
+
}
|
43829 |
+
scrollParents.push(target);
|
43830 |
+
}
|
43831 |
|
43832 |
+
/**
|
43833 |
+
* Setup needed event listeners used to update the popper position
|
43834 |
+
* @method
|
43835 |
+
* @memberof Popper.Utils
|
43836 |
+
* @private
|
43837 |
+
*/
|
43838 |
+
function setupEventListeners(reference, options, state, updateBound) {
|
43839 |
+
// Resize event listener on window
|
43840 |
+
state.updateBound = updateBound;
|
43841 |
+
popper_getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
|
43842 |
|
43843 |
+
// Scroll event listener on scroll parents
|
43844 |
+
var scrollElement = popper_getScrollParent(reference);
|
43845 |
+
attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
|
43846 |
+
state.scrollElement = scrollElement;
|
43847 |
+
state.eventsEnabled = true;
|
43848 |
|
43849 |
+
return state;
|
43850 |
+
}
|
43851 |
|
43852 |
+
/**
|
43853 |
+
* It will add resize/scroll events and start recalculating
|
43854 |
+
* position of the popper element when they are triggered.
|
43855 |
+
* @method
|
43856 |
+
* @memberof Popper
|
43857 |
+
*/
|
43858 |
+
function enableEventListeners() {
|
43859 |
+
if (!this.state.eventsEnabled) {
|
43860 |
+
this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
|
43861 |
+
}
|
43862 |
+
}
|
43863 |
|
43864 |
+
/**
|
43865 |
+
* Remove event listeners used to update the popper position
|
43866 |
+
* @method
|
43867 |
+
* @memberof Popper.Utils
|
43868 |
+
* @private
|
43869 |
+
*/
|
43870 |
+
function removeEventListeners(reference, state) {
|
43871 |
+
// Remove resize event listener on window
|
43872 |
+
popper_getWindow(reference).removeEventListener('resize', state.updateBound);
|
43873 |
|
43874 |
+
// Remove scroll event listener on scroll parents
|
43875 |
+
state.scrollParents.forEach(function (target) {
|
43876 |
+
target.removeEventListener('scroll', state.updateBound);
|
43877 |
+
});
|
43878 |
|
43879 |
+
// Reset state
|
43880 |
+
state.updateBound = null;
|
43881 |
+
state.scrollParents = [];
|
43882 |
+
state.scrollElement = null;
|
43883 |
+
state.eventsEnabled = false;
|
43884 |
+
return state;
|
43885 |
+
}
|
43886 |
|
43887 |
+
/**
|
43888 |
+
* It will remove resize/scroll events and won't recalculate popper position
|
43889 |
+
* when they are triggered. It also won't trigger `onUpdate` callback anymore,
|
43890 |
+
* unless you call `update` method manually.
|
43891 |
+
* @method
|
43892 |
+
* @memberof Popper
|
43893 |
+
*/
|
43894 |
+
function disableEventListeners() {
|
43895 |
+
if (this.state.eventsEnabled) {
|
43896 |
+
cancelAnimationFrame(this.scheduleUpdate);
|
43897 |
+
this.state = removeEventListeners(this.reference, this.state);
|
43898 |
+
}
|
43899 |
+
}
|
43900 |
|
43901 |
+
/**
|
43902 |
+
* Tells if a given input is a number
|
43903 |
+
* @method
|
43904 |
+
* @memberof Popper.Utils
|
43905 |
+
* @param {*} input to check
|
43906 |
+
* @return {Boolean}
|
43907 |
+
*/
|
43908 |
+
function isNumeric(n) {
|
43909 |
+
return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
|
43910 |
+
}
|
|
|
|
|
|
|
43911 |
|
43912 |
+
/**
|
43913 |
+
* Set the style to the given popper
|
43914 |
+
* @method
|
43915 |
+
* @memberof Popper.Utils
|
43916 |
+
* @argument {Element} element - Element to apply the style to
|
43917 |
+
* @argument {Object} styles
|
43918 |
+
* Object with a list of properties and values which will be applied to the element
|
43919 |
+
*/
|
43920 |
+
function setStyles(element, styles) {
|
43921 |
+
Object.keys(styles).forEach(function (prop) {
|
43922 |
+
var unit = '';
|
43923 |
+
// add unit if the value is numeric and is one of the following
|
43924 |
+
if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
|
43925 |
+
unit = 'px';
|
43926 |
+
}
|
43927 |
+
element.style[prop] = styles[prop] + unit;
|
43928 |
});
|
43929 |
}
|
|
|
|
|
|
|
|
|
|
|
43930 |
|
43931 |
+
/**
|
43932 |
+
* Set the attributes to the given popper
|
43933 |
+
* @method
|
43934 |
+
* @memberof Popper.Utils
|
43935 |
+
* @argument {Element} element - Element to apply the attributes to
|
43936 |
+
* @argument {Object} styles
|
43937 |
+
* Object with a list of properties and values which will be applied to the element
|
43938 |
+
*/
|
43939 |
+
function setAttributes(element, attributes) {
|
43940 |
+
Object.keys(attributes).forEach(function (prop) {
|
43941 |
+
var value = attributes[prop];
|
43942 |
+
if (value !== false) {
|
43943 |
+
element.setAttribute(prop, attributes[prop]);
|
43944 |
+
} else {
|
43945 |
+
element.removeAttribute(prop);
|
43946 |
+
}
|
43947 |
+
});
|
43948 |
+
}
|
43949 |
|
43950 |
+
/**
|
43951 |
+
* @function
|
43952 |
+
* @memberof Modifiers
|
43953 |
+
* @argument {Object} data - The data object generated by `update` method
|
43954 |
+
* @argument {Object} data.styles - List of style properties - values to apply to popper element
|
43955 |
+
* @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
|
43956 |
+
* @argument {Object} options - Modifiers configuration and options
|
43957 |
+
* @returns {Object} The same data object
|
43958 |
+
*/
|
43959 |
+
function applyStyle(data) {
|
43960 |
+
// any property present in `data.styles` will be applied to the popper,
|
43961 |
+
// in this way we can make the 3rd party modifiers add custom styles to it
|
43962 |
+
// Be aware, modifiers could override the properties defined in the previous
|
43963 |
+
// lines of this modifier!
|
43964 |
+
setStyles(data.instance.popper, data.styles);
|
43965 |
|
43966 |
+
// any property present in `data.attributes` will be applied to the popper,
|
43967 |
+
// they will be set as HTML attributes of the element
|
43968 |
+
setAttributes(data.instance.popper, data.attributes);
|
43969 |
|
43970 |
+
// if arrowElement is defined and arrowStyles has some properties
|
43971 |
+
if (data.arrowElement && Object.keys(data.arrowStyles).length) {
|
43972 |
+
setStyles(data.arrowElement, data.arrowStyles);
|
43973 |
+
}
|
43974 |
|
43975 |
+
return data;
|
43976 |
+
}
|
43977 |
|
43978 |
+
/**
|
43979 |
+
* Set the x-placement attribute before everything else because it could be used
|
43980 |
+
* to add margins to the popper margins needs to be calculated to get the
|
43981 |
+
* correct popper offsets.
|
43982 |
+
* @method
|
43983 |
+
* @memberof Popper.modifiers
|
43984 |
+
* @param {HTMLElement} reference - The reference element used to position the popper
|
43985 |
+
* @param {HTMLElement} popper - The HTML element used as popper
|
43986 |
+
* @param {Object} options - Popper.js options
|
43987 |
+
*/
|
43988 |
+
function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
|
43989 |
+
// compute reference element offsets
|
43990 |
+
var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
|
43991 |
|
43992 |
+
// compute auto placement, store placement inside the data object,
|
43993 |
+
// modifiers will be able to edit `placement` if needed
|
43994 |
+
// and refer to originalPlacement to know the original value
|
43995 |
+
var placement = popper_computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
|
43996 |
|
43997 |
+
popper.setAttribute('x-placement', placement);
|
43998 |
|
43999 |
+
// Apply `position` to popper before anything else because
|
44000 |
+
// without the position applied we can't guarantee correct computations
|
44001 |
+
setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });
|
44002 |
|
44003 |
+
return options;
|
44004 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44005 |
|
44006 |
+
/**
|
44007 |
+
* @function
|
44008 |
+
* @memberof Popper.Utils
|
44009 |
+
* @argument {Object} data - The data object generated by `update` method
|
44010 |
+
* @argument {Boolean} shouldRound - If the offsets should be rounded at all
|
44011 |
+
* @returns {Object} The popper's position offsets rounded
|
44012 |
+
*
|
44013 |
+
* The tale of pixel-perfect positioning. It's still not 100% perfect, but as
|
44014 |
+
* good as it can be within reason.
|
44015 |
+
* Discussion here: https://github.com/FezVrasta/popper.js/pull/715
|
44016 |
+
*
|
44017 |
+
* Low DPI screens cause a popper to be blurry if not using full pixels (Safari
|
44018 |
+
* as well on High DPI screens).
|
44019 |
+
*
|
44020 |
+
* Firefox prefers no rounding for positioning and does not have blurriness on
|
44021 |
+
* high DPI screens.
|
44022 |
+
*
|
44023 |
+
* Only horizontal placement and left/right values need to be considered.
|
44024 |
+
*/
|
44025 |
+
function getRoundedOffsets(data, shouldRound) {
|
44026 |
+
var _data$offsets = data.offsets,
|
44027 |
+
popper = _data$offsets.popper,
|
44028 |
+
reference = _data$offsets.reference;
|
44029 |
+
var round = Math.round,
|
44030 |
+
floor = Math.floor;
|
44031 |
|
44032 |
+
var noRound = function noRound(v) {
|
44033 |
+
return v;
|
44034 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44035 |
|
44036 |
+
var referenceWidth = round(reference.width);
|
44037 |
+
var popperWidth = round(popper.width);
|
44038 |
|
44039 |
+
var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;
|
44040 |
+
var isVariation = data.placement.indexOf('-') !== -1;
|
44041 |
+
var sameWidthParity = referenceWidth % 2 === popperWidth % 2;
|
44042 |
+
var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;
|
44043 |
|
44044 |
+
var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;
|
44045 |
+
var verticalToInteger = !shouldRound ? noRound : round;
|
44046 |
|
44047 |
+
return {
|
44048 |
+
left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),
|
44049 |
+
top: verticalToInteger(popper.top),
|
44050 |
+
bottom: verticalToInteger(popper.bottom),
|
44051 |
+
right: horizontalToInteger(popper.right)
|
44052 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44053 |
}
|
|
|
|
|
|
|
44054 |
|
44055 |
+
var isFirefox = popper_isBrowser && /Firefox/i.test(navigator.userAgent);
|
44056 |
|
44057 |
+
/**
|
44058 |
+
* @function
|
44059 |
+
* @memberof Modifiers
|
44060 |
+
* @argument {Object} data - The data object generated by `update` method
|
44061 |
+
* @argument {Object} options - Modifiers configuration and options
|
44062 |
+
* @returns {Object} The data object, properly modified
|
44063 |
+
*/
|
44064 |
+
function computeStyle(data, options) {
|
44065 |
+
var x = options.x,
|
44066 |
+
y = options.y;
|
44067 |
+
var popper = data.offsets.popper;
|
44068 |
|
44069 |
+
// Remove this legacy support in Popper.js v2
|
44070 |
|
44071 |
+
var legacyGpuAccelerationOption = popper_find(data.instance.modifiers, function (modifier) {
|
44072 |
+
return modifier.name === 'applyStyle';
|
44073 |
+
}).gpuAcceleration;
|
44074 |
+
if (legacyGpuAccelerationOption !== undefined) {
|
44075 |
+
console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
|
44076 |
+
}
|
44077 |
+
var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
|
44078 |
|
44079 |
+
var offsetParent = popper_getOffsetParent(data.instance.popper);
|
44080 |
+
var offsetParentRect = popper_getBoundingClientRect(offsetParent);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44081 |
|
44082 |
+
// Styles
|
44083 |
+
var styles = {
|
44084 |
+
position: popper.position
|
44085 |
+
};
|
44086 |
|
44087 |
+
var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);
|
|
|
|
|
|
|
44088 |
|
44089 |
+
var sideA = x === 'bottom' ? 'top' : 'bottom';
|
44090 |
+
var sideB = y === 'right' ? 'left' : 'right';
|
|
|
|
|
|
|
44091 |
|
44092 |
+
// if gpuAcceleration is set to `true` and transform is supported,
|
44093 |
+
// we use `translate3d` to apply the position to the popper we
|
44094 |
+
// automatically use the supported prefixed version if needed
|
44095 |
+
var prefixedProperty = getSupportedPropertyName('transform');
|
44096 |
|
44097 |
+
// now, let's make a step back and look at this code closely (wtf?)
|
44098 |
+
// If the content of the popper grows once it's been positioned, it
|
44099 |
+
// may happen that the popper gets misplaced because of the new content
|
44100 |
+
// overflowing its reference element
|
44101 |
+
// To avoid this problem, we provide two options (x and y), which allow
|
44102 |
+
// the consumer to define the offset origin.
|
44103 |
+
// If we position a popper on top of a reference element, we can set
|
44104 |
+
// `x` to `top` to make the popper grow towards its top instead of
|
44105 |
+
// its bottom.
|
44106 |
+
var left = void 0,
|
44107 |
+
top = void 0;
|
44108 |
+
if (sideA === 'bottom') {
|
44109 |
+
// when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)
|
44110 |
+
// and not the bottom of the html element
|
44111 |
+
if (offsetParent.nodeName === 'HTML') {
|
44112 |
+
top = -offsetParent.clientHeight + offsets.bottom;
|
44113 |
+
} else {
|
44114 |
+
top = -offsetParentRect.height + offsets.bottom;
|
44115 |
+
}
|
44116 |
+
} else {
|
44117 |
+
top = offsets.top;
|
44118 |
+
}
|
44119 |
+
if (sideB === 'right') {
|
44120 |
+
if (offsetParent.nodeName === 'HTML') {
|
44121 |
+
left = -offsetParent.clientWidth + offsets.right;
|
44122 |
+
} else {
|
44123 |
+
left = -offsetParentRect.width + offsets.right;
|
44124 |
}
|
44125 |
+
} else {
|
44126 |
+
left = offsets.left;
|
44127 |
+
}
|
44128 |
+
if (gpuAcceleration && prefixedProperty) {
|
44129 |
+
styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
|
44130 |
+
styles[sideA] = 0;
|
44131 |
+
styles[sideB] = 0;
|
44132 |
+
styles.willChange = 'transform';
|
44133 |
+
} else {
|
44134 |
+
// othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
|
44135 |
+
var invertTop = sideA === 'bottom' ? -1 : 1;
|
44136 |
+
var invertLeft = sideB === 'right' ? -1 : 1;
|
44137 |
+
styles[sideA] = top * invertTop;
|
44138 |
+
styles[sideB] = left * invertLeft;
|
44139 |
+
styles.willChange = sideA + ', ' + sideB;
|
44140 |
+
}
|
44141 |
+
|
44142 |
+
// Attributes
|
44143 |
+
var attributes = {
|
44144 |
+
'x-placement': data.placement
|
44145 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44146 |
|
44147 |
+
// Update `data` attributes, styles and arrowStyles
|
44148 |
+
data.attributes = popper_extends({}, attributes, data.attributes);
|
44149 |
+
data.styles = popper_extends({}, styles, data.styles);
|
44150 |
+
data.arrowStyles = popper_extends({}, data.offsets.arrow, data.arrowStyles);
|
|
|
|
|
|
|
|
|
|
|
|
|
44151 |
|
44152 |
+
return data;
|
44153 |
+
}
|
44154 |
|
44155 |
/**
|
44156 |
+
* Helper used to know if the given modifier depends from another one.<br />
|
44157 |
+
* It checks if the needed modifier is listed and enabled.
|
44158 |
+
* @method
|
44159 |
+
* @memberof Popper.Utils
|
44160 |
+
* @param {Array} modifiers - list of modifiers
|
44161 |
+
* @param {String} requestingName - name of requesting modifier
|
44162 |
+
* @param {String} requestedName - name of requested modifier
|
44163 |
+
* @returns {Boolean}
|
44164 |
*/
|
44165 |
+
function isModifierRequired(modifiers, requestingName, requestedName) {
|
44166 |
+
var requesting = popper_find(modifiers, function (_ref) {
|
44167 |
+
var name = _ref.name;
|
44168 |
+
return name === requestingName;
|
44169 |
+
});
|
44170 |
|
44171 |
+
var isRequired = !!requesting && modifiers.some(function (modifier) {
|
44172 |
+
return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
|
44173 |
+
});
|
|
|
|
|
|
|
44174 |
|
44175 |
+
if (!isRequired) {
|
44176 |
+
var _requesting = '`' + requestingName + '`';
|
44177 |
+
var requested = '`' + requestedName + '`';
|
44178 |
+
console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
|
44179 |
+
}
|
44180 |
+
return isRequired;
|
44181 |
+
}
|
44182 |
|
44183 |
+
/**
|
44184 |
+
* @function
|
44185 |
+
* @memberof Modifiers
|
44186 |
+
* @argument {Object} data - The data object generated by update method
|
44187 |
+
* @argument {Object} options - Modifiers configuration and options
|
44188 |
+
* @returns {Object} The data object, properly modified
|
44189 |
+
*/
|
44190 |
+
function popper_arrow(data, options) {
|
44191 |
+
var _data$offsets$arrow;
|
44192 |
|
44193 |
+
// arrow depends on keepTogether in order to work
|
44194 |
+
if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
|
44195 |
+
return data;
|
44196 |
+
}
|
44197 |
|
44198 |
+
var arrowElement = options.element;
|
44199 |
|
44200 |
+
// if arrowElement is a string, suppose it's a CSS selector
|
44201 |
+
if (typeof arrowElement === 'string') {
|
44202 |
+
arrowElement = data.instance.popper.querySelector(arrowElement);
|
44203 |
|
44204 |
+
// if arrowElement is not found, don't run the modifier
|
44205 |
+
if (!arrowElement) {
|
44206 |
+
return data;
|
44207 |
+
}
|
44208 |
+
} else {
|
44209 |
+
// if the arrowElement isn't a query selector we must check that the
|
44210 |
+
// provided DOM node is child of its popper node
|
44211 |
+
if (!data.instance.popper.contains(arrowElement)) {
|
44212 |
+
console.warn('WARNING: `arrow.element` must be child of its popper element!');
|
44213 |
+
return data;
|
44214 |
+
}
|
44215 |
+
}
|
44216 |
|
44217 |
+
var placement = data.placement.split('-')[0];
|
44218 |
+
var _data$offsets = data.offsets,
|
44219 |
+
popper = _data$offsets.popper,
|
44220 |
+
reference = _data$offsets.reference;
|
44221 |
|
44222 |
+
var isVertical = ['left', 'right'].indexOf(placement) !== -1;
|
44223 |
|
44224 |
+
var len = isVertical ? 'height' : 'width';
|
44225 |
+
var sideCapitalized = isVertical ? 'Top' : 'Left';
|
44226 |
+
var side = sideCapitalized.toLowerCase();
|
44227 |
+
var altSide = isVertical ? 'left' : 'top';
|
44228 |
+
var opSide = isVertical ? 'bottom' : 'right';
|
44229 |
+
var arrowElementSize = getOuterSizes(arrowElement)[len];
|
44230 |
|
44231 |
+
//
|
44232 |
+
// extends keepTogether behavior making sure the popper and its
|
44233 |
+
// reference have enough pixels in conjunction
|
44234 |
+
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44235 |
|
44236 |
+
// top/left side
|
44237 |
+
if (reference[opSide] - arrowElementSize < popper[side]) {
|
44238 |
+
data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
|
44239 |
+
}
|
44240 |
+
// bottom/right side
|
44241 |
+
if (reference[side] + arrowElementSize > popper[opSide]) {
|
44242 |
+
data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
|
44243 |
+
}
|
44244 |
+
data.offsets.popper = getClientRect(data.offsets.popper);
|
44245 |
|
44246 |
+
// compute center of the popper
|
44247 |
+
var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
|
|
|
|
|
|
|
44248 |
|
44249 |
+
// Compute the sideValue using the updated popper offsets
|
44250 |
+
// take popper margin in account because we don't have this info available
|
44251 |
+
var css = getStyleComputedProperty(data.instance.popper);
|
44252 |
+
var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);
|
44253 |
+
var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);
|
44254 |
+
var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
|
44255 |
|
44256 |
+
// prevent arrowElement from being placed not contiguously to its popper
|
44257 |
+
sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
|
44258 |
|
44259 |
+
data.arrowElement = arrowElement;
|
44260 |
+
data.offsets.arrow = (_data$offsets$arrow = {}, popper_defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), popper_defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44261 |
|
44262 |
+
return data;
|
44263 |
+
}
|
|
|
|
|
|
|
|
|
44264 |
|
44265 |
+
/**
|
44266 |
+
* Get the opposite placement variation of the given one
|
44267 |
+
* @method
|
44268 |
+
* @memberof Popper.Utils
|
44269 |
+
* @argument {String} placement variation
|
44270 |
+
* @returns {String} flipped placement variation
|
44271 |
+
*/
|
44272 |
+
function getOppositeVariation(variation) {
|
44273 |
+
if (variation === 'end') {
|
44274 |
+
return 'start';
|
44275 |
+
} else if (variation === 'start') {
|
44276 |
+
return 'end';
|
44277 |
+
}
|
44278 |
+
return variation;
|
44279 |
+
}
|
44280 |
|
44281 |
+
/**
|
44282 |
+
* List of accepted placements to use as values of the `placement` option.<br />
|
44283 |
+
* Valid placements are:
|
44284 |
+
* - `auto`
|
44285 |
+
* - `top`
|
44286 |
+
* - `right`
|
44287 |
+
* - `bottom`
|
44288 |
+
* - `left`
|
44289 |
+
*
|
44290 |
+
* Each placement can have a variation from this list:
|
44291 |
+
* - `-start`
|
44292 |
+
* - `-end`
|
44293 |
+
*
|
44294 |
+
* Variations are interpreted easily if you think of them as the left to right
|
44295 |
+
* written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
|
44296 |
+
* is right.<br />
|
44297 |
+
* Vertically (`left` and `right`), `start` is top and `end` is bottom.
|
44298 |
+
*
|
44299 |
+
* Some valid examples are:
|
44300 |
+
* - `top-end` (on top of reference, right aligned)
|
44301 |
+
* - `right-start` (on right of reference, top aligned)
|
44302 |
+
* - `bottom` (on bottom, centered)
|
44303 |
+
* - `auto-end` (on the side with more space available, alignment depends by placement)
|
44304 |
+
*
|
44305 |
+
* @static
|
44306 |
+
* @type {Array}
|
44307 |
+
* @enum {String}
|
44308 |
+
* @readonly
|
44309 |
+
* @method placements
|
44310 |
+
* @memberof Popper
|
44311 |
+
*/
|
44312 |
+
var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
|
44313 |
|
44314 |
+
// Get rid of `auto` `auto-start` and `auto-end`
|
44315 |
+
var validPlacements = placements.slice(3);
|
|
|
|
|
|
|
|
|
44316 |
|
44317 |
+
/**
|
44318 |
+
* Given an initial placement, returns all the subsequent placements
|
44319 |
+
* clockwise (or counter-clockwise).
|
44320 |
+
*
|
44321 |
+
* @method
|
44322 |
+
* @memberof Popper.Utils
|
44323 |
+
* @argument {String} placement - A valid placement (it accepts variations)
|
44324 |
+
* @argument {Boolean} counter - Set to true to walk the placements counterclockwise
|
44325 |
+
* @returns {Array} placements including their variations
|
44326 |
+
*/
|
44327 |
+
function clockwise(placement) {
|
44328 |
+
var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
44329 |
|
44330 |
+
var index = validPlacements.indexOf(placement);
|
44331 |
+
var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
|
44332 |
+
return counter ? arr.reverse() : arr;
|
44333 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44334 |
|
44335 |
+
var BEHAVIORS = {
|
44336 |
+
FLIP: 'flip',
|
44337 |
+
CLOCKWISE: 'clockwise',
|
44338 |
+
COUNTERCLOCKWISE: 'counterclockwise'
|
44339 |
+
};
|
|
|
|
|
|
|
44340 |
|
44341 |
+
/**
|
44342 |
+
* @function
|
44343 |
+
* @memberof Modifiers
|
44344 |
+
* @argument {Object} data - The data object generated by update method
|
44345 |
+
* @argument {Object} options - Modifiers configuration and options
|
44346 |
+
* @returns {Object} The data object, properly modified
|
44347 |
+
*/
|
44348 |
+
function popper_flip(data, options) {
|
44349 |
+
// if `inner` modifier is enabled, we can't use the `flip` modifier
|
44350 |
+
if (isModifierEnabled(data.instance.modifiers, 'inner')) {
|
44351 |
+
return data;
|
44352 |
+
}
|
44353 |
|
44354 |
+
if (data.flipped && data.placement === data.originalPlacement) {
|
44355 |
+
// seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
|
44356 |
+
return data;
|
44357 |
+
}
|
44358 |
|
44359 |
+
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
|
|
|
44360 |
|
44361 |
+
var placement = data.placement.split('-')[0];
|
44362 |
+
var placementOpposite = popper_getOppositePlacement(placement);
|
44363 |
+
var variation = data.placement.split('-')[1] || '';
|
44364 |
|
44365 |
+
var flipOrder = [];
|
|
|
44366 |
|
44367 |
+
switch (options.behavior) {
|
44368 |
+
case BEHAVIORS.FLIP:
|
44369 |
+
flipOrder = [placement, placementOpposite];
|
44370 |
+
break;
|
44371 |
+
case BEHAVIORS.CLOCKWISE:
|
44372 |
+
flipOrder = clockwise(placement);
|
44373 |
+
break;
|
44374 |
+
case BEHAVIORS.COUNTERCLOCKWISE:
|
44375 |
+
flipOrder = clockwise(placement, true);
|
44376 |
+
break;
|
44377 |
+
default:
|
44378 |
+
flipOrder = options.behavior;
|
44379 |
+
}
|
44380 |
|
44381 |
+
flipOrder.forEach(function (step, index) {
|
44382 |
+
if (placement !== step || flipOrder.length === index + 1) {
|
44383 |
+
return data;
|
44384 |
+
}
|
|
|
|
|
|
|
44385 |
|
44386 |
+
placement = data.placement.split('-')[0];
|
44387 |
+
placementOpposite = popper_getOppositePlacement(placement);
|
|
|
|
|
44388 |
|
44389 |
+
var popperOffsets = data.offsets.popper;
|
44390 |
+
var refOffsets = data.offsets.reference;
|
|
|
|
|
44391 |
|
44392 |
+
// using floor because the reference offsets may contain decimals we are not going to consider here
|
44393 |
+
var floor = Math.floor;
|
44394 |
+
var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
|
|
|
|
|
|
|
|
|
|
|
44395 |
|
44396 |
+
var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
|
44397 |
+
var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
|
44398 |
+
var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
|
44399 |
+
var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
|
|
|
44400 |
|
44401 |
+
var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44402 |
|
44403 |
+
// flip the variation if required
|
44404 |
+
var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
|
|
|
|
|
|
|
|
|
|
|
44405 |
|
44406 |
+
// flips variation if reference element overflows boundaries
|
44407 |
+
var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
|
|
|
|
|
|
|
|
|
|
|
44408 |
|
44409 |
+
// flips variation if popper content overflows boundaries
|
44410 |
+
var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);
|
|
|
|
|
|
|
|
|
|
|
44411 |
|
44412 |
+
var flippedVariation = flippedVariationByRef || flippedVariationByContent;
|
44413 |
+
|
44414 |
+
if (overlapsRef || overflowsBoundaries || flippedVariation) {
|
44415 |
+
// this boolean to detect any flip loop
|
44416 |
+
data.flipped = true;
|
44417 |
+
|
44418 |
+
if (overlapsRef || overflowsBoundaries) {
|
44419 |
+
placement = flipOrder[index + 1];
|
44420 |
}
|
|
|
44421 |
|
44422 |
+
if (flippedVariation) {
|
44423 |
+
variation = getOppositeVariation(variation);
|
|
|
|
|
|
|
44424 |
}
|
|
|
|
|
|
|
44425 |
|
44426 |
+
data.placement = placement + (variation ? '-' + variation : '');
|
44427 |
+
|
44428 |
+
// this object contains `position`, we want to preserve it along with
|
44429 |
+
// any additional property we may add in the future
|
44430 |
+
data.offsets.popper = popper_extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
|
44431 |
+
|
44432 |
+
data = runModifiers(data.instance.modifiers, data, 'flip');
|
44433 |
+
}
|
44434 |
+
});
|
44435 |
+
return data;
|
44436 |
}
|
44437 |
+
|
44438 |
/**
|
44439 |
+
* @function
|
44440 |
+
* @memberof Modifiers
|
44441 |
+
* @argument {Object} data - The data object generated by update method
|
44442 |
+
* @argument {Object} options - Modifiers configuration and options
|
44443 |
+
* @returns {Object} The data object, properly modified
|
44444 |
*/
|
44445 |
+
function keepTogether(data) {
|
44446 |
+
var _data$offsets = data.offsets,
|
44447 |
+
popper = _data$offsets.popper,
|
44448 |
+
reference = _data$offsets.reference;
|
44449 |
|
44450 |
+
var placement = data.placement.split('-')[0];
|
44451 |
+
var floor = Math.floor;
|
44452 |
+
var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
|
44453 |
+
var side = isVertical ? 'right' : 'bottom';
|
44454 |
+
var opSide = isVertical ? 'left' : 'top';
|
44455 |
+
var measurement = isVertical ? 'width' : 'height';
|
44456 |
|
44457 |
+
if (popper[side] < floor(reference[opSide])) {
|
44458 |
+
data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
|
44459 |
+
}
|
44460 |
+
if (popper[opSide] > floor(reference[side])) {
|
44461 |
+
data.offsets.popper[opSide] = floor(reference[side]);
|
44462 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44463 |
|
44464 |
+
return data;
|
44465 |
+
}
|
|
|
44466 |
|
44467 |
+
/**
|
44468 |
+
* Converts a string containing value + unit into a px value number
|
44469 |
+
* @function
|
44470 |
+
* @memberof {modifiers~offset}
|
44471 |
+
* @private
|
44472 |
+
* @argument {String} str - Value + unit string
|
44473 |
+
* @argument {String} measurement - `height` or `width`
|
44474 |
+
* @argument {Object} popperOffsets
|
44475 |
+
* @argument {Object} referenceOffsets
|
44476 |
+
* @returns {Number|String}
|
44477 |
+
* Value in pixels, or original string if no values were extracted
|
44478 |
+
*/
|
44479 |
+
function toValue(str, measurement, popperOffsets, referenceOffsets) {
|
44480 |
+
// separate value from unit
|
44481 |
+
var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
|
44482 |
+
var value = +split[1];
|
44483 |
+
var unit = split[2];
|
44484 |
|
44485 |
+
// If it's not a number it's an operator, I guess
|
44486 |
+
if (!value) {
|
44487 |
+
return str;
|
44488 |
+
}
|
|
|
|
|
|
|
44489 |
|
44490 |
+
if (unit.indexOf('%') === 0) {
|
44491 |
+
var element = void 0;
|
44492 |
+
switch (unit) {
|
44493 |
+
case '%p':
|
44494 |
+
element = popperOffsets;
|
44495 |
+
break;
|
44496 |
+
case '%':
|
44497 |
+
case '%r':
|
44498 |
+
default:
|
44499 |
+
element = referenceOffsets;
|
44500 |
}
|
|
|
44501 |
|
44502 |
+
var rect = getClientRect(element);
|
44503 |
+
return rect[measurement] / 100 * value;
|
44504 |
+
} else if (unit === 'vh' || unit === 'vw') {
|
44505 |
+
// if is a vh or vw, we calculate the size based on the viewport
|
44506 |
+
var size = void 0;
|
44507 |
+
if (unit === 'vh') {
|
44508 |
+
size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
44509 |
+
} else {
|
44510 |
+
size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
|
44511 |
}
|
44512 |
+
return size / 100 * value;
|
44513 |
+
} else {
|
44514 |
+
// if is an explicit pixel unit, we get rid of the unit and keep the value
|
44515 |
+
// if is an implicit unit, it's px, and we return just the value
|
44516 |
+
return value;
|
44517 |
+
}
|
44518 |
+
}
|
44519 |
|
44520 |
+
/**
|
44521 |
+
* Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
|
44522 |
+
* @function
|
44523 |
+
* @memberof {modifiers~offset}
|
44524 |
+
* @private
|
44525 |
+
* @argument {String} offset
|
44526 |
+
* @argument {Object} popperOffsets
|
44527 |
+
* @argument {Object} referenceOffsets
|
44528 |
+
* @argument {String} basePlacement
|
44529 |
+
* @returns {Array} a two cells array with x and y offsets in numbers
|
44530 |
+
*/
|
44531 |
+
function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
|
44532 |
+
var offsets = [0, 0];
|
44533 |
|
44534 |
+
// Use height if placement is left or right and index is 0 otherwise use width
|
44535 |
+
// in this way the first offset will use an axis and the second one
|
44536 |
+
// will use the other one
|
44537 |
+
var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
|
|
|
|
|
|
|
44538 |
|
44539 |
+
// Split the offset string to obtain a list of values and operands
|
44540 |
+
// The regex addresses values with the plus or minus sign in front (+10, -20, etc)
|
44541 |
+
var fragments = offset.split(/(\+|\-)/).map(function (frag) {
|
44542 |
+
return frag.trim();
|
44543 |
+
});
|
|
|
|
|
|
|
|
|
|
|
44544 |
|
44545 |
+
// Detect if the offset string contains a pair of values or a single one
|
44546 |
+
// they could be separated by comma or space
|
44547 |
+
var divider = fragments.indexOf(popper_find(fragments, function (frag) {
|
44548 |
+
return frag.search(/,|\s/) !== -1;
|
44549 |
+
}));
|
44550 |
|
44551 |
+
if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
|
44552 |
+
console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
|
|
|
|
|
44553 |
}
|
44554 |
|
44555 |
+
// If divider is found, we divide the list of values and operands to divide
|
44556 |
+
// them by ofset X and Y.
|
44557 |
+
var splitRegex = /\s*,\s*|\s+/;
|
44558 |
+
var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
|
44559 |
|
44560 |
+
// Convert the values with units to absolute pixels to allow our computations
|
44561 |
+
ops = ops.map(function (op, index) {
|
44562 |
+
// Most of the units rely on the orientation of the popper
|
44563 |
+
var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
|
44564 |
+
var mergeWithPrevious = false;
|
44565 |
+
return op
|
44566 |
+
// This aggregates any `+` or `-` sign that aren't considered operators
|
44567 |
+
// e.g.: 10 + +5 => [10, +, +5]
|
44568 |
+
.reduce(function (a, b) {
|
44569 |
+
if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
|
44570 |
+
a[a.length - 1] = b;
|
44571 |
+
mergeWithPrevious = true;
|
44572 |
+
return a;
|
44573 |
+
} else if (mergeWithPrevious) {
|
44574 |
+
a[a.length - 1] += b;
|
44575 |
+
mergeWithPrevious = false;
|
44576 |
+
return a;
|
44577 |
+
} else {
|
44578 |
+
return a.concat(b);
|
44579 |
+
}
|
44580 |
+
}, [])
|
44581 |
+
// Here we convert the string values into number values (in px)
|
44582 |
+
.map(function (str) {
|
44583 |
+
return toValue(str, measurement, popperOffsets, referenceOffsets);
|
44584 |
});
|
44585 |
+
});
|
44586 |
|
44587 |
+
// Loop trough the offsets arrays and execute the operations
|
44588 |
+
ops.forEach(function (op, index) {
|
44589 |
+
op.forEach(function (frag, index2) {
|
44590 |
+
if (isNumeric(frag)) {
|
44591 |
+
offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
|
44592 |
+
}
|
44593 |
+
});
|
44594 |
+
});
|
44595 |
+
return offsets;
|
44596 |
+
}
|
44597 |
|
44598 |
+
/**
|
44599 |
+
* @function
|
44600 |
+
* @memberof Modifiers
|
44601 |
+
* @argument {Object} data - The data object generated by update method
|
44602 |
+
* @argument {Object} options - Modifiers configuration and options
|
44603 |
+
* @argument {Number|String} options.offset=0
|
44604 |
+
* The offset value as described in the modifier description
|
44605 |
+
* @returns {Object} The data object, properly modified
|
44606 |
+
*/
|
44607 |
+
function popper_offset(data, _ref) {
|
44608 |
+
var offset = _ref.offset;
|
44609 |
+
var placement = data.placement,
|
44610 |
+
_data$offsets = data.offsets,
|
44611 |
+
popper = _data$offsets.popper,
|
44612 |
+
reference = _data$offsets.reference;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44613 |
|
44614 |
+
var basePlacement = placement.split('-')[0];
|
44615 |
|
44616 |
+
var offsets = void 0;
|
44617 |
+
if (isNumeric(+offset)) {
|
44618 |
+
offsets = [+offset, 0];
|
44619 |
+
} else {
|
44620 |
+
offsets = parseOffset(offset, popper, reference, basePlacement);
|
44621 |
+
}
|
44622 |
|
44623 |
+
if (basePlacement === 'left') {
|
44624 |
+
popper.top += offsets[0];
|
44625 |
+
popper.left -= offsets[1];
|
44626 |
+
} else if (basePlacement === 'right') {
|
44627 |
+
popper.top += offsets[0];
|
44628 |
+
popper.left += offsets[1];
|
44629 |
+
} else if (basePlacement === 'top') {
|
44630 |
+
popper.left += offsets[0];
|
44631 |
+
popper.top -= offsets[1];
|
44632 |
+
} else if (basePlacement === 'bottom') {
|
44633 |
+
popper.left += offsets[0];
|
44634 |
+
popper.top += offsets[1];
|
44635 |
+
}
|
44636 |
|
44637 |
+
data.popper = popper;
|
44638 |
+
return data;
|
44639 |
+
}
|
44640 |
|
44641 |
+
/**
|
44642 |
+
* @function
|
44643 |
+
* @memberof Modifiers
|
44644 |
+
* @argument {Object} data - The data object generated by `update` method
|
44645 |
+
* @argument {Object} options - Modifiers configuration and options
|
44646 |
+
* @returns {Object} The data object, properly modified
|
44647 |
+
*/
|
44648 |
+
function popper_preventOverflow(data, options) {
|
44649 |
+
var boundariesElement = options.boundariesElement || popper_getOffsetParent(data.instance.popper);
|
44650 |
+
|
44651 |
+
// If offsetParent is the reference element, we really want to
|
44652 |
+
// go one step up and use the next offsetParent as reference to
|
44653 |
+
// avoid to make this modifier completely useless and look like broken
|
44654 |
+
if (data.instance.reference === boundariesElement) {
|
44655 |
+
boundariesElement = popper_getOffsetParent(boundariesElement);
|
44656 |
+
}
|
44657 |
|
44658 |
+
// NOTE: DOM access here
|
44659 |
+
// resets the popper's position so that the document size can be calculated excluding
|
44660 |
+
// the size of the popper element itself
|
44661 |
+
var transformProp = getSupportedPropertyName('transform');
|
44662 |
+
var popperStyles = data.instance.popper.style; // assignment to help minification
|
44663 |
+
var top = popperStyles.top,
|
44664 |
+
left = popperStyles.left,
|
44665 |
+
transform = popperStyles[transformProp];
|
44666 |
|
44667 |
+
popperStyles.top = '';
|
44668 |
+
popperStyles.left = '';
|
44669 |
+
popperStyles[transformProp] = '';
|
44670 |
|
44671 |
+
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
|
44672 |
|
44673 |
+
// NOTE: DOM access here
|
44674 |
+
// restores the original style properties after the offsets have been computed
|
44675 |
+
popperStyles.top = top;
|
44676 |
+
popperStyles.left = left;
|
44677 |
+
popperStyles[transformProp] = transform;
|
44678 |
|
44679 |
+
options.boundaries = boundaries;
|
44680 |
|
44681 |
+
var order = options.priority;
|
44682 |
+
var popper = data.offsets.popper;
|
44683 |
|
44684 |
+
var check = {
|
44685 |
+
primary: function primary(placement) {
|
44686 |
+
var value = popper[placement];
|
44687 |
+
if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
|
44688 |
+
value = Math.max(popper[placement], boundaries[placement]);
|
44689 |
+
}
|
44690 |
+
return popper_defineProperty({}, placement, value);
|
44691 |
},
|
44692 |
+
secondary: function secondary(placement) {
|
44693 |
+
var mainSide = placement === 'right' ? 'left' : 'top';
|
44694 |
+
var value = popper[mainSide];
|
44695 |
+
if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
|
44696 |
+
value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
|
44697 |
+
}
|
44698 |
+
return popper_defineProperty({}, mainSide, value);
|
44699 |
}
|
44700 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44701 |
|
44702 |
+
order.forEach(function (placement) {
|
44703 |
+
var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
|
44704 |
+
popper = popper_extends({}, popper, check[side](placement));
|
44705 |
+
});
|
44706 |
|
44707 |
+
data.offsets.popper = popper;
|
|
|
|
|
|
|
44708 |
|
44709 |
+
return data;
|
44710 |
+
}
|
44711 |
|
44712 |
+
/**
|
44713 |
+
* @function
|
44714 |
+
* @memberof Modifiers
|
44715 |
+
* @argument {Object} data - The data object generated by `update` method
|
44716 |
+
* @argument {Object} options - Modifiers configuration and options
|
44717 |
+
* @returns {Object} The data object, properly modified
|
44718 |
+
*/
|
44719 |
+
function popper_shift(data) {
|
44720 |
+
var placement = data.placement;
|
44721 |
+
var basePlacement = placement.split('-')[0];
|
44722 |
+
var shiftvariation = placement.split('-')[1];
|
44723 |
|
44724 |
+
// if shift shiftvariation is specified, run the modifier
|
44725 |
+
if (shiftvariation) {
|
44726 |
+
var _data$offsets = data.offsets,
|
44727 |
+
reference = _data$offsets.reference,
|
44728 |
+
popper = _data$offsets.popper;
|
44729 |
|
44730 |
+
var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
|
44731 |
+
var side = isVertical ? 'left' : 'top';
|
44732 |
+
var measurement = isVertical ? 'width' : 'height';
|
44733 |
|
44734 |
+
var shiftOffsets = {
|
44735 |
+
start: popper_defineProperty({}, side, reference[side]),
|
44736 |
+
end: popper_defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
|
44737 |
+
};
|
44738 |
|
44739 |
+
data.offsets.popper = popper_extends({}, popper, shiftOffsets[shiftvariation]);
|
|
|
44740 |
}
|
44741 |
|
44742 |
+
return data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44743 |
}
|
|
|
|
|
44744 |
|
44745 |
+
/**
|
44746 |
+
* @function
|
44747 |
+
* @memberof Modifiers
|
44748 |
+
* @argument {Object} data - The data object generated by update method
|
44749 |
+
* @argument {Object} options - Modifiers configuration and options
|
44750 |
+
* @returns {Object} The data object, properly modified
|
44751 |
+
*/
|
44752 |
+
function popper_hide(data) {
|
44753 |
+
if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
|
44754 |
+
return data;
|
44755 |
+
}
|
44756 |
|
44757 |
+
var refRect = data.offsets.reference;
|
44758 |
+
var bound = popper_find(data.instance.modifiers, function (modifier) {
|
44759 |
+
return modifier.name === 'preventOverflow';
|
44760 |
+
}).boundaries;
|
44761 |
|
44762 |
+
if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
|
44763 |
+
// Avoid unnecessary DOM access if visibility hasn't changed
|
44764 |
+
if (data.hide === true) {
|
44765 |
+
return data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44766 |
}
|
|
|
|
|
|
|
44767 |
|
44768 |
+
data.hide = true;
|
44769 |
+
data.attributes['x-out-of-boundaries'] = '';
|
44770 |
+
} else {
|
44771 |
+
// Avoid unnecessary DOM access if visibility hasn't changed
|
44772 |
+
if (data.hide === false) {
|
44773 |
+
return data;
|
44774 |
+
}
|
44775 |
|
44776 |
+
data.hide = false;
|
44777 |
+
data.attributes['x-out-of-boundaries'] = false;
|
44778 |
+
}
|
44779 |
|
44780 |
+
return data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44781 |
}
|
|
|
44782 |
|
44783 |
+
/**
|
44784 |
+
* @function
|
44785 |
+
* @memberof Modifiers
|
44786 |
+
* @argument {Object} data - The data object generated by `update` method
|
44787 |
+
* @argument {Object} options - Modifiers configuration and options
|
44788 |
+
* @returns {Object} The data object, properly modified
|
44789 |
+
*/
|
44790 |
+
function inner(data) {
|
44791 |
+
var placement = data.placement;
|
44792 |
+
var basePlacement = placement.split('-')[0];
|
44793 |
+
var _data$offsets = data.offsets,
|
44794 |
+
popper = _data$offsets.popper,
|
44795 |
+
reference = _data$offsets.reference;
|
44796 |
|
44797 |
+
var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
|
44798 |
|
44799 |
+
var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
|
44800 |
|
44801 |
+
popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
|
44802 |
|
44803 |
+
data.placement = popper_getOppositePlacement(placement);
|
44804 |
+
data.offsets.popper = getClientRect(popper);
|
44805 |
|
44806 |
+
return data;
|
44807 |
+
}
|
44808 |
|
44809 |
+
/**
|
44810 |
+
* Modifier function, each modifier can have a function of this type assigned
|
44811 |
+
* to its `fn` property.<br />
|
44812 |
+
* These functions will be called on each update, this means that you must
|
44813 |
+
* make sure they are performant enough to avoid performance bottlenecks.
|
44814 |
+
*
|
44815 |
+
* @function ModifierFn
|
44816 |
+
* @argument {dataObject} data - The data object generated by `update` method
|
44817 |
+
* @argument {Object} options - Modifiers configuration and options
|
44818 |
+
* @returns {dataObject} The data object, properly modified
|
44819 |
+
*/
|
44820 |
+
|
44821 |
+
/**
|
44822 |
+
* Modifiers are plugins used to alter the behavior of your poppers.<br />
|
44823 |
+
* Popper.js uses a set of 9 modifiers to provide all the basic functionalities
|
44824 |
+
* needed by the library.
|
44825 |
+
*
|
44826 |
+
* Usually you don't want to override the `order`, `fn` and `onLoad` props.
|
44827 |
+
* All the other properties are configurations that could be tweaked.
|
44828 |
+
* @namespace modifiers
|
44829 |
+
*/
|
44830 |
+
var modifiers = {
|
44831 |
+
/**
|
44832 |
+
* Modifier used to shift the popper on the start or end of its reference
|
44833 |
+
* element.<br />
|
44834 |
+
* It will read the variation of the `placement` property.<br />
|
44835 |
+
* It can be one either `-end` or `-start`.
|
44836 |
+
* @memberof modifiers
|
44837 |
+
* @inner
|
44838 |
+
*/
|
44839 |
+
shift: {
|
44840 |
+
/** @prop {number} order=100 - Index used to define the order of execution */
|
44841 |
+
order: 100,
|
44842 |
+
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
44843 |
+
enabled: true,
|
44844 |
+
/** @prop {ModifierFn} */
|
44845 |
+
fn: popper_shift
|
44846 |
+
},
|
44847 |
+
|
44848 |
+
/**
|
44849 |
+
* The `offset` modifier can shift your popper on both its axis.
|
44850 |
+
*
|
44851 |
+
* It accepts the following units:
|
44852 |
+
* - `px` or unit-less, interpreted as pixels
|
44853 |
+
* - `%` or `%r`, percentage relative to the length of the reference element
|
44854 |
+
* - `%p`, percentage relative to the length of the popper element
|
44855 |
+
* - `vw`, CSS viewport width unit
|
44856 |
+
* - `vh`, CSS viewport height unit
|
44857 |
+
*
|
44858 |
+
* For length is intended the main axis relative to the placement of the popper.<br />
|
44859 |
+
* This means that if the placement is `top` or `bottom`, the length will be the
|
44860 |
+
* `width`. In case of `left` or `right`, it will be the `height`.
|
44861 |
+
*
|
44862 |
+
* You can provide a single value (as `Number` or `String`), or a pair of values
|
44863 |
+
* as `String` divided by a comma or one (or more) white spaces.<br />
|
44864 |
+
* The latter is a deprecated method because it leads to confusion and will be
|
44865 |
+
* removed in v2.<br />
|
44866 |
+
* Additionally, it accepts additions and subtractions between different units.
|
44867 |
+
* Note that multiplications and divisions aren't supported.
|
44868 |
+
*
|
44869 |
+
* Valid examples are:
|
44870 |
+
* ```
|
44871 |
+
* 10
|
44872 |
+
* '10%'
|
44873 |
+
* '10, 10'
|
44874 |
+
* '10%, 10'
|
44875 |
+
* '10 + 10%'
|
44876 |
+
* '10 - 5vh + 3%'
|
44877 |
+
* '-10px + 5vh, 5px - 6%'
|
44878 |
+
* ```
|
44879 |
+
* > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
|
44880 |
+
* > with their reference element, unfortunately, you will have to disable the `flip` modifier.
|
44881 |
+
* > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).
|
44882 |
+
*
|
44883 |
+
* @memberof modifiers
|
44884 |
+
* @inner
|
44885 |
+
*/
|
44886 |
+
offset: {
|
44887 |
+
/** @prop {number} order=200 - Index used to define the order of execution */
|
44888 |
+
order: 200,
|
44889 |
+
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
44890 |
+
enabled: true,
|
44891 |
+
/** @prop {ModifierFn} */
|
44892 |
+
fn: popper_offset,
|
44893 |
+
/** @prop {Number|String} offset=0
|
44894 |
+
* The offset value as described in the modifier description
|
44895 |
+
*/
|
44896 |
+
offset: 0
|
44897 |
+
},
|
44898 |
+
|
44899 |
+
/**
|
44900 |
+
* Modifier used to prevent the popper from being positioned outside the boundary.
|
44901 |
+
*
|
44902 |
+
* A scenario exists where the reference itself is not within the boundaries.<br />
|
44903 |
+
* We can say it has "escaped the boundaries" — or just "escaped".<br />
|
44904 |
+
* In this case we need to decide whether the popper should either:
|
44905 |
+
*
|
44906 |
+
* - detach from the reference and remain "trapped" in the boundaries, or
|
44907 |
+
* - if it should ignore the boundary and "escape with its reference"
|
44908 |
+
*
|
44909 |
+
* When `escapeWithReference` is set to`true` and reference is completely
|
44910 |
+
* outside its boundaries, the popper will overflow (or completely leave)
|
44911 |
+
* the boundaries in order to remain attached to the edge of the reference.
|
44912 |
+
*
|
44913 |
+
* @memberof modifiers
|
44914 |
+
* @inner
|
44915 |
+
*/
|
44916 |
+
preventOverflow: {
|
44917 |
+
/** @prop {number} order=300 - Index used to define the order of execution */
|
44918 |
+
order: 300,
|
44919 |
+
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
44920 |
+
enabled: true,
|
44921 |
+
/** @prop {ModifierFn} */
|
44922 |
+
fn: popper_preventOverflow,
|
44923 |
+
/**
|
44924 |
+
* @prop {Array} [priority=['left','right','top','bottom']]
|
44925 |
+
* Popper will try to prevent overflow following these priorities by default,
|
44926 |
+
* then, it could overflow on the left and on top of the `boundariesElement`
|
44927 |
+
*/
|
44928 |
+
priority: ['left', 'right', 'top', 'bottom'],
|
44929 |
+
/**
|
44930 |
+
* @prop {number} padding=5
|
44931 |
+
* Amount of pixel used to define a minimum distance between the boundaries
|
44932 |
+
* and the popper. This makes sure the popper always has a little padding
|
44933 |
+
* between the edges of its container
|
44934 |
+
*/
|
44935 |
+
padding: 5,
|
44936 |
+
/**
|
44937 |
+
* @prop {String|HTMLElement} boundariesElement='scrollParent'
|
44938 |
+
* Boundaries used by the modifier. Can be `scrollParent`, `window`,
|
44939 |
+
* `viewport` or any DOM element.
|
44940 |
+
*/
|
44941 |
+
boundariesElement: 'scrollParent'
|
44942 |
+
},
|
44943 |
+
|
44944 |
+
/**
|
44945 |
+
* Modifier used to make sure the reference and its popper stay near each other
|
44946 |
+
* without leaving any gap between the two. Especially useful when the arrow is
|
44947 |
+
* enabled and you want to ensure that it points to its reference element.
|
44948 |
+
* It cares only about the first axis. You can still have poppers with margin
|
44949 |
+
* between the popper and its reference element.
|
44950 |
+
* @memberof modifiers
|
44951 |
+
* @inner
|
44952 |
+
*/
|
44953 |
+
keepTogether: {
|
44954 |
+
/** @prop {number} order=400 - Index used to define the order of execution */
|
44955 |
+
order: 400,
|
44956 |
+
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
44957 |
+
enabled: true,
|
44958 |
+
/** @prop {ModifierFn} */
|
44959 |
+
fn: keepTogether
|
44960 |
+
},
|
44961 |
+
|
44962 |
+
/**
|
44963 |
+
* This modifier is used to move the `arrowElement` of the popper to make
|
44964 |
+
* sure it is positioned between the reference element and its popper element.
|
44965 |
+
* It will read the outer size of the `arrowElement` node to detect how many
|
44966 |
+
* pixels of conjunction are needed.
|
44967 |
+
*
|
44968 |
+
* It has no effect if no `arrowElement` is provided.
|
44969 |
+
* @memberof modifiers
|
44970 |
+
* @inner
|
44971 |
+
*/
|
44972 |
+
arrow: {
|
44973 |
+
/** @prop {number} order=500 - Index used to define the order of execution */
|
44974 |
+
order: 500,
|
44975 |
+
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
44976 |
+
enabled: true,
|
44977 |
+
/** @prop {ModifierFn} */
|
44978 |
+
fn: popper_arrow,
|
44979 |
+
/** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
|
44980 |
+
element: '[x-arrow]'
|
44981 |
+
},
|
44982 |
+
|
44983 |
+
/**
|
44984 |
+
* Modifier used to flip the popper's placement when it starts to overlap its
|
44985 |
+
* reference element.
|
44986 |
+
*
|
44987 |
+
* Requires the `preventOverflow` modifier before it in order to work.
|
44988 |
+
*
|
44989 |
+
* **NOTE:** this modifier will interrupt the current update cycle and will
|
44990 |
+
* restart it if it detects the need to flip the placement.
|
44991 |
+
* @memberof modifiers
|
44992 |
+
* @inner
|
44993 |
+
*/
|
44994 |
+
flip: {
|
44995 |
+
/** @prop {number} order=600 - Index used to define the order of execution */
|
44996 |
+
order: 600,
|
44997 |
+
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
44998 |
+
enabled: true,
|
44999 |
+
/** @prop {ModifierFn} */
|
45000 |
+
fn: popper_flip,
|
45001 |
+
/**
|
45002 |
+
* @prop {String|Array} behavior='flip'
|
45003 |
+
* The behavior used to change the popper's placement. It can be one of
|
45004 |
+
* `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
|
45005 |
+
* placements (with optional variations)
|
45006 |
+
*/
|
45007 |
+
behavior: 'flip',
|
45008 |
+
/**
|
45009 |
+
* @prop {number} padding=5
|
45010 |
+
* The popper will flip if it hits the edges of the `boundariesElement`
|
45011 |
+
*/
|
45012 |
+
padding: 5,
|
45013 |
+
/**
|
45014 |
+
* @prop {String|HTMLElement} boundariesElement='viewport'
|
45015 |
+
* The element which will define the boundaries of the popper position.
|
45016 |
+
* The popper will never be placed outside of the defined boundaries
|
45017 |
+
* (except if `keepTogether` is enabled)
|
45018 |
+
*/
|
45019 |
+
boundariesElement: 'viewport',
|
45020 |
+
/**
|
45021 |
+
* @prop {Boolean} flipVariations=false
|
45022 |
+
* The popper will switch placement variation between `-start` and `-end` when
|
45023 |
+
* the reference element overlaps its boundaries.
|
45024 |
+
*
|
45025 |
+
* The original placement should have a set variation.
|
45026 |
+
*/
|
45027 |
+
flipVariations: false,
|
45028 |
+
/**
|
45029 |
+
* @prop {Boolean} flipVariationsByContent=false
|
45030 |
+
* The popper will switch placement variation between `-start` and `-end` when
|
45031 |
+
* the popper element overlaps its reference boundaries.
|
45032 |
+
*
|
45033 |
+
* The original placement should have a set variation.
|
45034 |
+
*/
|
45035 |
+
flipVariationsByContent: false
|
45036 |
+
},
|
45037 |
+
|
45038 |
+
/**
|
45039 |
+
* Modifier used to make the popper flow toward the inner of the reference element.
|
45040 |
+
* By default, when this modifier is disabled, the popper will be placed outside
|
45041 |
+
* the reference element.
|
45042 |
+
* @memberof modifiers
|
45043 |
+
* @inner
|
45044 |
+
*/
|
45045 |
+
inner: {
|
45046 |
+
/** @prop {number} order=700 - Index used to define the order of execution */
|
45047 |
+
order: 700,
|
45048 |
+
/** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
|
45049 |
+
enabled: false,
|
45050 |
+
/** @prop {ModifierFn} */
|
45051 |
+
fn: inner
|
45052 |
+
},
|
45053 |
+
|
45054 |
+
/**
|
45055 |
+
* Modifier used to hide the popper when its reference element is outside of the
|
45056 |
+
* popper boundaries. It will set a `x-out-of-boundaries` attribute which can
|
45057 |
+
* be used to hide with a CSS selector the popper when its reference is
|
45058 |
+
* out of boundaries.
|
45059 |
+
*
|
45060 |
+
* Requires the `preventOverflow` modifier before it in order to work.
|
45061 |
+
* @memberof modifiers
|
45062 |
+
* @inner
|
45063 |
+
*/
|
45064 |
+
hide: {
|
45065 |
+
/** @prop {number} order=800 - Index used to define the order of execution */
|
45066 |
+
order: 800,
|
45067 |
+
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
45068 |
+
enabled: true,
|
45069 |
+
/** @prop {ModifierFn} */
|
45070 |
+
fn: popper_hide
|
45071 |
+
},
|
45072 |
+
|
45073 |
+
/**
|
45074 |
+
* Computes the style that will be applied to the popper element to gets
|
45075 |
+
* properly positioned.
|
45076 |
+
*
|
45077 |
+
* Note that this modifier will not touch the DOM, it just prepares the styles
|
45078 |
+
* so that `applyStyle` modifier can apply it. This separation is useful
|
45079 |
+
* in case you need to replace `applyStyle` with a custom implementation.
|
45080 |
+
*
|
45081 |
+
* This modifier has `850` as `order` value to maintain backward compatibility
|
45082 |
+
* with previous versions of Popper.js. Expect the modifiers ordering method
|
45083 |
+
* to change in future major versions of the library.
|
45084 |
+
*
|
45085 |
+
* @memberof modifiers
|
45086 |
+
* @inner
|
45087 |
+
*/
|
45088 |
+
computeStyle: {
|
45089 |
+
/** @prop {number} order=850 - Index used to define the order of execution */
|
45090 |
+
order: 850,
|
45091 |
+
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
45092 |
+
enabled: true,
|
45093 |
+
/** @prop {ModifierFn} */
|
45094 |
+
fn: computeStyle,
|
45095 |
+
/**
|
45096 |
+
* @prop {Boolean} gpuAcceleration=true
|
45097 |
+
* If true, it uses the CSS 3D transformation to position the popper.
|
45098 |
+
* Otherwise, it will use the `top` and `left` properties
|
45099 |
+
*/
|
45100 |
+
gpuAcceleration: true,
|
45101 |
+
/**
|
45102 |
+
* @prop {string} [x='bottom']
|
45103 |
+
* Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
|
45104 |
+
* Change this if your popper should grow in a direction different from `bottom`
|
45105 |
+
*/
|
45106 |
+
x: 'bottom',
|
45107 |
+
/**
|
45108 |
+
* @prop {string} [x='left']
|
45109 |
+
* Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
|
45110 |
+
* Change this if your popper should grow in a direction different from `right`
|
45111 |
+
*/
|
45112 |
+
y: 'right'
|
45113 |
+
},
|
45114 |
+
|
45115 |
+
/**
|
45116 |
+
* Applies the computed styles to the popper element.
|
45117 |
+
*
|
45118 |
+
* All the DOM manipulations are limited to this modifier. This is useful in case
|
45119 |
+
* you want to integrate Popper.js inside a framework or view library and you
|
45120 |
+
* want to delegate all the DOM manipulations to it.
|
45121 |
+
*
|
45122 |
+
* Note that if you disable this modifier, you must make sure the popper element
|
45123 |
+
* has its position set to `absolute` before Popper.js can do its work!
|
45124 |
+
*
|
45125 |
+
* Just disable this modifier and define your own to achieve the desired effect.
|
45126 |
+
*
|
45127 |
+
* @memberof modifiers
|
45128 |
+
* @inner
|
45129 |
+
*/
|
45130 |
+
applyStyle: {
|
45131 |
+
/** @prop {number} order=900 - Index used to define the order of execution */
|
45132 |
+
order: 900,
|
45133 |
+
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
|
45134 |
+
enabled: true,
|
45135 |
+
/** @prop {ModifierFn} */
|
45136 |
+
fn: applyStyle,
|
45137 |
+
/** @prop {Function} */
|
45138 |
+
onLoad: applyStyleOnLoad,
|
45139 |
+
/**
|
45140 |
+
* @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
|
45141 |
+
* @prop {Boolean} gpuAcceleration=true
|
45142 |
+
* If true, it uses the CSS 3D transformation to position the popper.
|
45143 |
+
* Otherwise, it will use the `top` and `left` properties
|
45144 |
+
*/
|
45145 |
+
gpuAcceleration: undefined
|
45146 |
+
}
|
45147 |
+
};
|
45148 |
+
|
45149 |
+
/**
|
45150 |
+
* The `dataObject` is an object containing all the information used by Popper.js.
|
45151 |
+
* This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
|
45152 |
+
* @name dataObject
|
45153 |
+
* @property {Object} data.instance The Popper.js instance
|
45154 |
+
* @property {String} data.placement Placement applied to popper
|
45155 |
+
* @property {String} data.originalPlacement Placement originally defined on init
|
45156 |
+
* @property {Boolean} data.flipped True if popper has been flipped by flip modifier
|
45157 |
+
* @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper
|
45158 |
+
* @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
|
45159 |
+
* @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)
|
45160 |
+
* @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)
|
45161 |
+
* @property {Object} data.boundaries Offsets of the popper boundaries
|
45162 |
+
* @property {Object} data.offsets The measurements of popper, reference and arrow elements
|
45163 |
+
* @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
|
45164 |
+
* @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
|
45165 |
+
* @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
|
45166 |
+
*/
|
45167 |
+
|
45168 |
+
/**
|
45169 |
+
* Default options provided to Popper.js constructor.<br />
|
45170 |
+
* These can be overridden using the `options` argument of Popper.js.<br />
|
45171 |
+
* To override an option, simply pass an object with the same
|
45172 |
+
* structure of the `options` object, as the 3rd argument. For example:
|
45173 |
+
* ```
|
45174 |
+
* new Popper(ref, pop, {
|
45175 |
+
* modifiers: {
|
45176 |
+
* preventOverflow: { enabled: false }
|
45177 |
+
* }
|
45178 |
+
* })
|
45179 |
+
* ```
|
45180 |
+
* @type {Object}
|
45181 |
+
* @static
|
45182 |
+
* @memberof Popper
|
45183 |
+
*/
|
45184 |
+
var Defaults = {
|
45185 |
+
/**
|
45186 |
+
* Popper's placement.
|
45187 |
+
* @prop {Popper.placements} placement='bottom'
|
45188 |
+
*/
|
45189 |
+
placement: 'bottom',
|
45190 |
+
|
45191 |
+
/**
|
45192 |
+
* Set this to true if you want popper to position it self in 'fixed' mode
|
45193 |
+
* @prop {Boolean} positionFixed=false
|
45194 |
+
*/
|
45195 |
+
positionFixed: false,
|
45196 |
+
|
45197 |
+
/**
|
45198 |
+
* Whether events (resize, scroll) are initially enabled.
|
45199 |
+
* @prop {Boolean} eventsEnabled=true
|
45200 |
+
*/
|
45201 |
+
eventsEnabled: true,
|
45202 |
+
|
45203 |
+
/**
|
45204 |
+
* Set to true if you want to automatically remove the popper when
|
45205 |
+
* you call the `destroy` method.
|
45206 |
+
* @prop {Boolean} removeOnDestroy=false
|
45207 |
+
*/
|
45208 |
+
removeOnDestroy: false,
|
45209 |
+
|
45210 |
+
/**
|
45211 |
+
* Callback called when the popper is created.<br />
|
45212 |
+
* By default, it is set to no-op.<br />
|
45213 |
+
* Access Popper.js instance with `data.instance`.
|
45214 |
+
* @prop {onCreate}
|
45215 |
+
*/
|
45216 |
+
onCreate: function onCreate() {},
|
45217 |
+
|
45218 |
+
/**
|
45219 |
+
* Callback called when the popper is updated. This callback is not called
|
45220 |
+
* on the initialization/creation of the popper, but only on subsequent
|
45221 |
+
* updates.<br />
|
45222 |
+
* By default, it is set to no-op.<br />
|
45223 |
+
* Access Popper.js instance with `data.instance`.
|
45224 |
+
* @prop {onUpdate}
|
45225 |
+
*/
|
45226 |
+
onUpdate: function onUpdate() {},
|
45227 |
+
|
45228 |
+
/**
|
45229 |
+
* List of modifiers used to modify the offsets before they are applied to the popper.
|
45230 |
+
* They provide most of the functionalities of Popper.js.
|
45231 |
+
* @prop {modifiers}
|
45232 |
+
*/
|
45233 |
+
modifiers: modifiers
|
45234 |
+
};
|
45235 |
+
|
45236 |
+
/**
|
45237 |
+
* @callback onCreate
|
45238 |
+
* @param {dataObject} data
|
45239 |
+
*/
|
45240 |
+
|
45241 |
+
/**
|
45242 |
+
* @callback onUpdate
|
45243 |
+
* @param {dataObject} data
|
45244 |
+
*/
|
45245 |
+
|
45246 |
+
// Utils
|
45247 |
+
// Methods
|
45248 |
+
var Popper = function () {
|
45249 |
+
/**
|
45250 |
+
* Creates a new Popper.js instance.
|
45251 |
+
* @class Popper
|
45252 |
+
* @param {Element|referenceObject} reference - The reference element used to position the popper
|
45253 |
+
* @param {Element} popper - The HTML / XML element used as the popper
|
45254 |
+
* @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
|
45255 |
+
* @return {Object} instance - The generated Popper.js instance
|
45256 |
+
*/
|
45257 |
+
function Popper(reference, popper) {
|
45258 |
+
var _this = this;
|
45259 |
+
|
45260 |
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
45261 |
+
classCallCheck(this, Popper);
|
45262 |
+
|
45263 |
+
this.scheduleUpdate = function () {
|
45264 |
+
return requestAnimationFrame(_this.update);
|
45265 |
+
};
|
45266 |
+
|
45267 |
+
// make update() debounced, so that it only runs at most once-per-tick
|
45268 |
+
this.update = popper_debounce(this.update.bind(this));
|
45269 |
+
|
45270 |
+
// with {} we create a new object with the options inside it
|
45271 |
+
this.options = popper_extends({}, Popper.Defaults, options);
|
45272 |
+
|
45273 |
+
// init state
|
45274 |
+
this.state = {
|
45275 |
+
isDestroyed: false,
|
45276 |
+
isCreated: false,
|
45277 |
+
scrollParents: []
|
45278 |
+
};
|
45279 |
+
|
45280 |
+
// get reference and popper elements (allow jQuery wrappers)
|
45281 |
+
this.reference = reference && reference.jquery ? reference[0] : reference;
|
45282 |
+
this.popper = popper && popper.jquery ? popper[0] : popper;
|
45283 |
+
|
45284 |
+
// Deep merge modifiers options
|
45285 |
+
this.options.modifiers = {};
|
45286 |
+
Object.keys(popper_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
|
45287 |
+
_this.options.modifiers[name] = popper_extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
|
45288 |
+
});
|
45289 |
+
|
45290 |
+
// Refactoring modifiers' list (Object => Array)
|
45291 |
+
this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
|
45292 |
+
return popper_extends({
|
45293 |
+
name: name
|
45294 |
+
}, _this.options.modifiers[name]);
|
45295 |
+
})
|
45296 |
+
// sort the modifiers by order
|
45297 |
+
.sort(function (a, b) {
|
45298 |
+
return a.order - b.order;
|
45299 |
+
});
|
45300 |
+
|
45301 |
+
// modifiers have the ability to execute arbitrary code when Popper.js get inited
|
45302 |
+
// such code is executed in the same order of its modifier
|
45303 |
+
// they could add new properties to their options configuration
|
45304 |
+
// BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
|
45305 |
+
this.modifiers.forEach(function (modifierOptions) {
|
45306 |
+
if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
|
45307 |
+
modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
|
45308 |
+
}
|
45309 |
+
});
|
45310 |
+
|
45311 |
+
// fire the first update to position the popper in the right place
|
45312 |
+
this.update();
|
45313 |
+
|
45314 |
+
var eventsEnabled = this.options.eventsEnabled;
|
45315 |
+
if (eventsEnabled) {
|
45316 |
+
// setup event listeners, they will take care of update the position in specific situations
|
45317 |
+
this.enableEventListeners();
|
45318 |
+
}
|
45319 |
+
|
45320 |
+
this.state.eventsEnabled = eventsEnabled;
|
45321 |
+
}
|
45322 |
+
|
45323 |
+
// We can't use class properties because they don't get listed in the
|
45324 |
+
// class prototype and break stuff like Sinon stubs
|
45325 |
+
|
45326 |
+
|
45327 |
+
popper_createClass(Popper, [{
|
45328 |
+
key: 'update',
|
45329 |
+
value: function update$$1() {
|
45330 |
+
return popper_update.call(this);
|
45331 |
+
}
|
45332 |
+
}, {
|
45333 |
+
key: 'destroy',
|
45334 |
+
value: function destroy$$1() {
|
45335 |
+
return destroy.call(this);
|
45336 |
+
}
|
45337 |
+
}, {
|
45338 |
+
key: 'enableEventListeners',
|
45339 |
+
value: function enableEventListeners$$1() {
|
45340 |
+
return enableEventListeners.call(this);
|
45341 |
+
}
|
45342 |
+
}, {
|
45343 |
+
key: 'disableEventListeners',
|
45344 |
+
value: function disableEventListeners$$1() {
|
45345 |
+
return disableEventListeners.call(this);
|
45346 |
+
}
|
45347 |
+
|
45348 |
+
/**
|
45349 |
+
* Schedules an update. It will run on the next UI update available.
|
45350 |
+
* @method scheduleUpdate
|
45351 |
+
* @memberof Popper
|
45352 |
+
*/
|
45353 |
+
|
45354 |
+
|
45355 |
+
/**
|
45356 |
+
* Collection of utilities useful when writing custom modifiers.
|
45357 |
+
* Starting from version 1.7, this method is available only if you
|
45358 |
+
* include `popper-utils.js` before `popper.js`.
|
45359 |
+
*
|
45360 |
+
* **DEPRECATION**: This way to access PopperUtils is deprecated
|
45361 |
+
* and will be removed in v2! Use the PopperUtils module directly instead.
|
45362 |
+
* Due to the high instability of the methods contained in Utils, we can't
|
45363 |
+
* guarantee them to follow semver. Use them at your own risk!
|
45364 |
+
* @static
|
45365 |
+
* @private
|
45366 |
+
* @type {Object}
|
45367 |
+
* @deprecated since version 1.8
|
45368 |
+
* @member Utils
|
45369 |
+
* @memberof Popper
|
45370 |
+
*/
|
45371 |
+
|
45372 |
+
}]);
|
45373 |
+
return Popper;
|
45374 |
+
}();
|
45375 |
+
|
45376 |
+
/**
|
45377 |
+
* The `referenceObject` is an object that provides an interface compatible with Popper.js
|
45378 |
+
* and lets you use it as replacement of a real DOM node.<br />
|
45379 |
+
* You can use this method to position a popper relatively to a set of coordinates
|
45380 |
+
* in case you don't have a DOM node to use as reference.
|
45381 |
+
*
|
45382 |
+
* ```
|
45383 |
+
* new Popper(referenceObject, popperNode);
|
45384 |
+
* ```
|
45385 |
+
*
|
45386 |
+
* NB: This feature isn't supported in Internet Explorer 10.
|
45387 |
+
* @name referenceObject
|
45388 |
+
* @property {Function} data.getBoundingClientRect
|
45389 |
+
* A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
|
45390 |
+
* @property {number} data.clientWidth
|
45391 |
+
* An ES6 getter that will return the width of the virtual reference element.
|
45392 |
+
* @property {number} data.clientHeight
|
45393 |
+
* An ES6 getter that will return the height of the virtual reference element.
|
45394 |
+
*/
|
45395 |
+
|
45396 |
+
|
45397 |
+
Popper.Utils = (typeof window !== 'undefined' ? window : __webpack_require__.g).PopperUtils;
|
45398 |
+
Popper.placements = placements;
|
45399 |
+
Popper.Defaults = Defaults;
|
45400 |
+
|
45401 |
+
/* harmony default export */ var esm_popper = (Popper);
|
45402 |
+
//# sourceMappingURL=popper.js.map
|
45403 |
+
|
45404 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Popper/Popper.js
|
45405 |
+
|
45406 |
+
|
45407 |
+
|
45408 |
+
|
45409 |
+
|
45410 |
+
|
45411 |
+
|
45412 |
+
|
45413 |
+
|
45414 |
+
|
45415 |
+
|
45416 |
+
|
45417 |
+
function flipPlacement(placement, theme) {
|
45418 |
+
var direction = theme && theme.direction || 'ltr';
|
45419 |
+
|
45420 |
+
if (direction === 'ltr') {
|
45421 |
+
return placement;
|
45422 |
+
}
|
45423 |
+
|
45424 |
+
switch (placement) {
|
45425 |
+
case 'bottom-end':
|
45426 |
+
return 'bottom-start';
|
45427 |
+
|
45428 |
+
case 'bottom-start':
|
45429 |
+
return 'bottom-end';
|
45430 |
+
|
45431 |
+
case 'top-end':
|
45432 |
+
return 'top-start';
|
45433 |
+
|
45434 |
+
case 'top-start':
|
45435 |
+
return 'top-end';
|
45436 |
+
|
45437 |
+
default:
|
45438 |
+
return placement;
|
45439 |
+
}
|
45440 |
+
}
|
45441 |
+
|
45442 |
+
function Popper_getAnchorEl(anchorEl) {
|
45443 |
+
return typeof anchorEl === 'function' ? anchorEl() : anchorEl;
|
45444 |
+
}
|
45445 |
+
|
45446 |
+
var Popper_useEnhancedEffect = typeof window !== 'undefined' ? react.useLayoutEffect : react.useEffect;
|
45447 |
+
var defaultPopperOptions = {};
|
45448 |
+
/**
|
45449 |
+
* Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v1/) for positioning.
|
45450 |
+
*/
|
45451 |
+
|
45452 |
+
var Popper_Popper = /*#__PURE__*/react.forwardRef(function Popper(props, ref) {
|
45453 |
+
var anchorEl = props.anchorEl,
|
45454 |
+
children = props.children,
|
45455 |
+
container = props.container,
|
45456 |
+
_props$disablePortal = props.disablePortal,
|
45457 |
+
disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,
|
45458 |
+
_props$keepMounted = props.keepMounted,
|
45459 |
+
keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,
|
45460 |
+
modifiers = props.modifiers,
|
45461 |
+
open = props.open,
|
45462 |
+
_props$placement = props.placement,
|
45463 |
+
initialPlacement = _props$placement === void 0 ? 'bottom' : _props$placement,
|
45464 |
+
_props$popperOptions = props.popperOptions,
|
45465 |
+
popperOptions = _props$popperOptions === void 0 ? defaultPopperOptions : _props$popperOptions,
|
45466 |
+
popperRefProp = props.popperRef,
|
45467 |
+
style = props.style,
|
45468 |
+
_props$transition = props.transition,
|
45469 |
+
transition = _props$transition === void 0 ? false : _props$transition,
|
45470 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["anchorEl", "children", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition"]);
|
45471 |
+
|
45472 |
+
var tooltipRef = react.useRef(null);
|
45473 |
+
var ownRef = (0,useForkRef/* default */.Z)(tooltipRef, ref);
|
45474 |
+
var popperRef = react.useRef(null);
|
45475 |
+
var handlePopperRef = (0,useForkRef/* default */.Z)(popperRef, popperRefProp);
|
45476 |
+
var handlePopperRefRef = react.useRef(handlePopperRef);
|
45477 |
+
Popper_useEnhancedEffect(function () {
|
45478 |
+
handlePopperRefRef.current = handlePopperRef;
|
45479 |
+
}, [handlePopperRef]);
|
45480 |
+
react.useImperativeHandle(popperRefProp, function () {
|
45481 |
+
return popperRef.current;
|
45482 |
+
}, []);
|
45483 |
+
|
45484 |
+
var _React$useState = react.useState(true),
|
45485 |
+
exited = _React$useState[0],
|
45486 |
+
setExited = _React$useState[1];
|
45487 |
+
|
45488 |
+
var theme = (0,useTheme/* default */.Z)();
|
45489 |
+
var rtlPlacement = flipPlacement(initialPlacement, theme);
|
45490 |
+
/**
|
45491 |
+
* placement initialized from prop but can change during lifetime if modifiers.flip.
|
45492 |
+
* modifiers.flip is essentially a flip for controlled/uncontrolled behavior
|
45493 |
+
*/
|
45494 |
+
|
45495 |
+
var _React$useState2 = react.useState(rtlPlacement),
|
45496 |
+
placement = _React$useState2[0],
|
45497 |
+
setPlacement = _React$useState2[1];
|
45498 |
+
|
45499 |
+
react.useEffect(function () {
|
45500 |
+
if (popperRef.current) {
|
45501 |
+
popperRef.current.update();
|
45502 |
+
}
|
45503 |
+
});
|
45504 |
+
var handleOpen = react.useCallback(function () {
|
45505 |
+
if (!tooltipRef.current || !anchorEl || !open) {
|
45506 |
+
return;
|
45507 |
+
}
|
45508 |
+
|
45509 |
+
if (popperRef.current) {
|
45510 |
+
popperRef.current.destroy();
|
45511 |
+
handlePopperRefRef.current(null);
|
45512 |
+
}
|
45513 |
+
|
45514 |
+
var handlePopperUpdate = function handlePopperUpdate(data) {
|
45515 |
+
setPlacement(data.placement);
|
45516 |
+
};
|
45517 |
+
|
45518 |
+
var resolvedAnchorEl = Popper_getAnchorEl(anchorEl);
|
45519 |
+
|
45520 |
+
if (false) { var box; }
|
45521 |
+
|
45522 |
+
var popper = new esm_popper(Popper_getAnchorEl(anchorEl), tooltipRef.current, (0,esm_extends/* default */.Z)({
|
45523 |
+
placement: rtlPlacement
|
45524 |
+
}, popperOptions, {
|
45525 |
+
modifiers: (0,esm_extends/* default */.Z)({}, disablePortal ? {} : {
|
45526 |
+
// It's using scrollParent by default, we can use the viewport when using a portal.
|
45527 |
+
preventOverflow: {
|
45528 |
+
boundariesElement: 'window'
|
45529 |
+
}
|
45530 |
+
}, modifiers, popperOptions.modifiers),
|
45531 |
+
// We could have been using a custom modifier like react-popper is doing.
|
45532 |
+
// But it seems this is the best public API for this use case.
|
45533 |
+
onCreate: (0,createChainedFunction/* default */.Z)(handlePopperUpdate, popperOptions.onCreate),
|
45534 |
+
onUpdate: (0,createChainedFunction/* default */.Z)(handlePopperUpdate, popperOptions.onUpdate)
|
45535 |
+
}));
|
45536 |
+
handlePopperRefRef.current(popper);
|
45537 |
+
}, [anchorEl, disablePortal, modifiers, open, rtlPlacement, popperOptions]);
|
45538 |
+
var handleRef = react.useCallback(function (node) {
|
45539 |
+
(0,setRef/* default */.Z)(ownRef, node);
|
45540 |
+
handleOpen();
|
45541 |
+
}, [ownRef, handleOpen]);
|
45542 |
+
|
45543 |
+
var handleEnter = function handleEnter() {
|
45544 |
+
setExited(false);
|
45545 |
+
};
|
45546 |
+
|
45547 |
+
var handleClose = function handleClose() {
|
45548 |
+
if (!popperRef.current) {
|
45549 |
+
return;
|
45550 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
45551 |
|
45552 |
+
popperRef.current.destroy();
|
45553 |
+
handlePopperRefRef.current(null);
|
45554 |
+
};
|
45555 |
|
45556 |
+
var handleExited = function handleExited() {
|
45557 |
+
setExited(true);
|
45558 |
+
handleClose();
|
45559 |
+
};
|
45560 |
|
45561 |
+
react.useEffect(function () {
|
45562 |
+
return function () {
|
45563 |
+
handleClose();
|
45564 |
+
};
|
45565 |
+
}, []);
|
45566 |
+
react.useEffect(function () {
|
45567 |
+
if (!open && !transition) {
|
45568 |
+
// Otherwise handleExited will call this.
|
45569 |
+
handleClose();
|
45570 |
+
}
|
45571 |
+
}, [open, transition]);
|
45572 |
|
45573 |
+
if (!keepMounted && !open && (!transition || exited)) {
|
45574 |
+
return null;
|
45575 |
+
}
|
45576 |
|
45577 |
+
var childProps = {
|
45578 |
+
placement: placement
|
45579 |
+
};
|
45580 |
|
45581 |
+
if (transition) {
|
45582 |
+
childProps.TransitionProps = {
|
45583 |
+
in: open,
|
45584 |
+
onEnter: handleEnter,
|
45585 |
+
onExited: handleExited
|
45586 |
+
};
|
45587 |
+
}
|
45588 |
|
45589 |
+
return /*#__PURE__*/react.createElement(Portal_Portal, {
|
45590 |
+
disablePortal: disablePortal,
|
45591 |
+
container: container
|
45592 |
+
}, /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({
|
45593 |
+
ref: handleRef,
|
45594 |
+
role: "tooltip"
|
45595 |
+
}, other, {
|
45596 |
+
style: (0,esm_extends/* default */.Z)({
|
45597 |
+
// Prevents scroll issue, waiting for Popper.js to add this style once initiated.
|
45598 |
+
position: 'fixed',
|
45599 |
+
// Fix Popper.js display issue
|
45600 |
+
top: 0,
|
45601 |
+
left: 0,
|
45602 |
+
display: !open && keepMounted && !transition ? 'none' : null
|
45603 |
+
}, style)
|
45604 |
+
}), typeof children === 'function' ? children(childProps) : children));
|
45605 |
+
});
|
45606 |
+
false ? 0 : void 0;
|
45607 |
+
/* harmony default export */ var esm_Popper_Popper = (Popper_Popper);
|
45608 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/ListSubheader/ListSubheader.js
|
45609 |
+
|
45610 |
+
|
45611 |
+
|
45612 |
+
|
45613 |
+
|
45614 |
+
|
45615 |
+
|
45616 |
+
var ListSubheader_styles = function styles(theme) {
|
45617 |
+
return {
|
45618 |
+
/* Styles applied to the root element. */
|
45619 |
+
root: {
|
45620 |
+
boxSizing: 'border-box',
|
45621 |
+
lineHeight: '48px',
|
45622 |
+
listStyle: 'none',
|
45623 |
+
color: theme.palette.text.secondary,
|
45624 |
+
fontFamily: theme.typography.fontFamily,
|
45625 |
+
fontWeight: theme.typography.fontWeightMedium,
|
45626 |
+
fontSize: theme.typography.pxToRem(14)
|
45627 |
+
},
|
45628 |
+
|
45629 |
+
/* Styles applied to the root element if `color="primary"`. */
|
45630 |
+
colorPrimary: {
|
45631 |
+
color: theme.palette.primary.main
|
45632 |
+
},
|
45633 |
+
|
45634 |
+
/* Styles applied to the root element if `color="inherit"`. */
|
45635 |
+
colorInherit: {
|
45636 |
+
color: 'inherit'
|
45637 |
+
},
|
45638 |
+
|
45639 |
+
/* Styles applied to the inner `component` element if `disableGutters={false}`. */
|
45640 |
+
gutters: {
|
45641 |
+
paddingLeft: 16,
|
45642 |
+
paddingRight: 16
|
45643 |
+
},
|
45644 |
+
|
45645 |
+
/* Styles applied to the root element if `inset={true}`. */
|
45646 |
+
inset: {
|
45647 |
+
paddingLeft: 72
|
45648 |
+
},
|
45649 |
+
|
45650 |
+
/* Styles applied to the root element if `disableSticky={false}`. */
|
45651 |
+
sticky: {
|
45652 |
+
position: 'sticky',
|
45653 |
+
top: 0,
|
45654 |
+
zIndex: 1,
|
45655 |
+
backgroundColor: 'inherit'
|
45656 |
}
|
45657 |
+
};
|
45658 |
+
};
|
45659 |
+
var ListSubheader = /*#__PURE__*/react.forwardRef(function ListSubheader(props, ref) {
|
45660 |
+
var classes = props.classes,
|
45661 |
+
className = props.className,
|
45662 |
+
_props$color = props.color,
|
45663 |
+
color = _props$color === void 0 ? 'default' : _props$color,
|
45664 |
+
_props$component = props.component,
|
45665 |
+
Component = _props$component === void 0 ? 'li' : _props$component,
|
45666 |
+
_props$disableGutters = props.disableGutters,
|
45667 |
+
disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,
|
45668 |
+
_props$disableSticky = props.disableSticky,
|
45669 |
+
disableSticky = _props$disableSticky === void 0 ? false : _props$disableSticky,
|
45670 |
+
_props$inset = props.inset,
|
45671 |
+
inset = _props$inset === void 0 ? false : _props$inset,
|
45672 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["classes", "className", "color", "component", "disableGutters", "disableSticky", "inset"]);
|
45673 |
+
|
45674 |
+
return /*#__PURE__*/react.createElement(Component, (0,esm_extends/* default */.Z)({
|
45675 |
+
className: (0,clsx_m/* default */.Z)(classes.root, className, color !== 'default' && classes["color".concat((0,capitalize/* default */.Z)(color))], inset && classes.inset, !disableSticky && classes.sticky, !disableGutters && classes.gutters),
|
45676 |
+
ref: ref
|
45677 |
+
}, other));
|
45678 |
+
});
|
45679 |
+
false ? 0 : void 0;
|
45680 |
+
/* harmony default export */ var ListSubheader_ListSubheader = ((0,withStyles/* default */.Z)(ListSubheader_styles, {
|
45681 |
+
name: 'MuiListSubheader'
|
45682 |
+
})(ListSubheader));
|
45683 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/lab/esm/internal/svg-icons/Close.js
|
45684 |
+
|
45685 |
+
|
45686 |
+
/**
|
45687 |
+
* @ignore - internal component.
|
45688 |
+
*/
|
45689 |
+
|
45690 |
+
/* harmony default export */ var Close = ((0,createSvgIcon/* default */.Z)( /*#__PURE__*/react.createElement("path", {
|
45691 |
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
45692 |
+
}), 'Close'));
|
45693 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/lab/esm/internal/svg-icons/ArrowDropDown.js
|
45694 |
+
|
45695 |
+
|
45696 |
+
/**
|
45697 |
+
* @ignore - internal component.
|
45698 |
+
*/
|
45699 |
+
|
45700 |
+
/* harmony default export */ var svg_icons_ArrowDropDown = ((0,createSvgIcon/* default */.Z)( /*#__PURE__*/react.createElement("path", {
|
45701 |
+
d: "M7 10l5 5 5-5z"
|
45702 |
+
}), 'ArrowDropDown'));
|
45703 |
+
// EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/utils/unstable_useId.js
|
45704 |
+
var unstable_useId = __webpack_require__(95001);
|
45705 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/lab/esm/useAutocomplete/useAutocomplete.js
|
45706 |
+
|
45707 |
+
|
45708 |
+
|
45709 |
+
|
45710 |
+
/* eslint-disable no-constant-condition */
|
45711 |
+
|
45712 |
+
// https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript
|
45713 |
+
// Give up on IE 11 support for this feature
|
45714 |
+
|
45715 |
+
function stripDiacritics(string) {
|
45716 |
+
return typeof string.normalize !== 'undefined' ? string.normalize('NFD').replace(/[\u0300-\u036f]/g, '') : string;
|
45717 |
+
}
|
45718 |
+
|
45719 |
+
function createFilterOptions() {
|
45720 |
+
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
45721 |
+
var _config$ignoreAccents = config.ignoreAccents,
|
45722 |
+
ignoreAccents = _config$ignoreAccents === void 0 ? true : _config$ignoreAccents,
|
45723 |
+
_config$ignoreCase = config.ignoreCase,
|
45724 |
+
ignoreCase = _config$ignoreCase === void 0 ? true : _config$ignoreCase,
|
45725 |
+
limit = config.limit,
|
45726 |
+
_config$matchFrom = config.matchFrom,
|
45727 |
+
matchFrom = _config$matchFrom === void 0 ? 'any' : _config$matchFrom,
|
45728 |
+
stringify = config.stringify,
|
45729 |
+
_config$trim = config.trim,
|
45730 |
+
trim = _config$trim === void 0 ? false : _config$trim;
|
45731 |
+
return function (options, _ref) {
|
45732 |
+
var inputValue = _ref.inputValue,
|
45733 |
+
getOptionLabel = _ref.getOptionLabel;
|
45734 |
+
var input = trim ? inputValue.trim() : inputValue;
|
45735 |
+
|
45736 |
+
if (ignoreCase) {
|
45737 |
+
input = input.toLowerCase();
|
45738 |
}
|
45739 |
+
|
45740 |
+
if (ignoreAccents) {
|
45741 |
+
input = stripDiacritics(input);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45742 |
}
|
45743 |
+
|
45744 |
+
var filteredOptions = options.filter(function (option) {
|
45745 |
+
var candidate = (stringify || getOptionLabel)(option);
|
45746 |
+
|
45747 |
+
if (ignoreCase) {
|
45748 |
+
candidate = candidate.toLowerCase();
|
45749 |
+
}
|
45750 |
+
|
45751 |
+
if (ignoreAccents) {
|
45752 |
+
candidate = stripDiacritics(candidate);
|
45753 |
+
}
|
45754 |
+
|
45755 |
+
return matchFrom === 'start' ? candidate.indexOf(input) === 0 : candidate.indexOf(input) > -1;
|
45756 |
+
});
|
45757 |
+
return typeof limit === 'number' ? filteredOptions.slice(0, limit) : filteredOptions;
|
45758 |
+
};
|
45759 |
+
} // To replace with .findIndex() once we stop IE 11 support.
|
45760 |
+
|
45761 |
+
function useAutocomplete_findIndex(array, comp) {
|
45762 |
+
for (var i = 0; i < array.length; i += 1) {
|
45763 |
+
if (comp(array[i])) {
|
45764 |
+
return i;
|
45765 |
}
|
45766 |
+
}
|
45767 |
+
|
45768 |
+
return -1;
|
|
|
45769 |
}
|
|
|
|
|
45770 |
|
45771 |
+
var defaultFilterOptions = createFilterOptions(); // Number of options to jump in list box when pageup and pagedown keys are used.
|
45772 |
|
45773 |
+
var pageSize = 5;
|
45774 |
+
function useAutocomplete(props) {
|
45775 |
+
var _props$autoComplete = props.autoComplete,
|
45776 |
+
autoComplete = _props$autoComplete === void 0 ? false : _props$autoComplete,
|
45777 |
+
_props$autoHighlight = props.autoHighlight,
|
45778 |
+
autoHighlight = _props$autoHighlight === void 0 ? false : _props$autoHighlight,
|
45779 |
+
_props$autoSelect = props.autoSelect,
|
45780 |
+
autoSelect = _props$autoSelect === void 0 ? false : _props$autoSelect,
|
45781 |
+
_props$blurOnSelect = props.blurOnSelect,
|
45782 |
+
blurOnSelect = _props$blurOnSelect === void 0 ? false : _props$blurOnSelect,
|
45783 |
+
_props$clearOnBlur = props.clearOnBlur,
|
45784 |
+
clearOnBlur = _props$clearOnBlur === void 0 ? !props.freeSolo : _props$clearOnBlur,
|
45785 |
+
_props$clearOnEscape = props.clearOnEscape,
|
45786 |
+
clearOnEscape = _props$clearOnEscape === void 0 ? false : _props$clearOnEscape,
|
45787 |
+
_props$componentName = props.componentName,
|
45788 |
+
componentName = _props$componentName === void 0 ? 'useAutocomplete' : _props$componentName,
|
45789 |
+
_props$debug = props.debug,
|
45790 |
+
debug = _props$debug === void 0 ? false : _props$debug,
|
45791 |
+
_props$defaultValue = props.defaultValue,
|
45792 |
+
defaultValue = _props$defaultValue === void 0 ? props.multiple ? [] : null : _props$defaultValue,
|
45793 |
+
_props$disableClearab = props.disableClearable,
|
45794 |
+
disableClearable = _props$disableClearab === void 0 ? false : _props$disableClearab,
|
45795 |
+
_props$disableCloseOn = props.disableCloseOnSelect,
|
45796 |
+
disableCloseOnSelect = _props$disableCloseOn === void 0 ? false : _props$disableCloseOn,
|
45797 |
+
_props$disabledItemsF = props.disabledItemsFocusable,
|
45798 |
+
disabledItemsFocusable = _props$disabledItemsF === void 0 ? false : _props$disabledItemsF,
|
45799 |
+
_props$disableListWra = props.disableListWrap,
|
45800 |
+
disableListWrap = _props$disableListWra === void 0 ? false : _props$disableListWra,
|
45801 |
+
_props$filterOptions = props.filterOptions,
|
45802 |
+
filterOptions = _props$filterOptions === void 0 ? defaultFilterOptions : _props$filterOptions,
|
45803 |
+
_props$filterSelected = props.filterSelectedOptions,
|
45804 |
+
filterSelectedOptions = _props$filterSelected === void 0 ? false : _props$filterSelected,
|
45805 |
+
_props$freeSolo = props.freeSolo,
|
45806 |
+
freeSolo = _props$freeSolo === void 0 ? false : _props$freeSolo,
|
45807 |
+
getOptionDisabled = props.getOptionDisabled,
|
45808 |
+
_props$getOptionLabel = props.getOptionLabel,
|
45809 |
+
getOptionLabelProp = _props$getOptionLabel === void 0 ? function (option) {
|
45810 |
+
return option;
|
45811 |
+
} : _props$getOptionLabel,
|
45812 |
+
_props$getOptionSelec = props.getOptionSelected,
|
45813 |
+
getOptionSelected = _props$getOptionSelec === void 0 ? function (option, value) {
|
45814 |
+
return option === value;
|
45815 |
+
} : _props$getOptionSelec,
|
45816 |
+
groupBy = props.groupBy,
|
45817 |
+
_props$handleHomeEndK = props.handleHomeEndKeys,
|
45818 |
+
handleHomeEndKeys = _props$handleHomeEndK === void 0 ? !props.freeSolo : _props$handleHomeEndK,
|
45819 |
+
idProp = props.id,
|
45820 |
+
_props$includeInputIn = props.includeInputInList,
|
45821 |
+
includeInputInList = _props$includeInputIn === void 0 ? false : _props$includeInputIn,
|
45822 |
+
inputValueProp = props.inputValue,
|
45823 |
+
_props$multiple = props.multiple,
|
45824 |
+
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
45825 |
+
onChange = props.onChange,
|
45826 |
+
onClose = props.onClose,
|
45827 |
+
onHighlightChange = props.onHighlightChange,
|
45828 |
+
onInputChange = props.onInputChange,
|
45829 |
+
onOpen = props.onOpen,
|
45830 |
+
openProp = props.open,
|
45831 |
+
_props$openOnFocus = props.openOnFocus,
|
45832 |
+
openOnFocus = _props$openOnFocus === void 0 ? false : _props$openOnFocus,
|
45833 |
+
options = props.options,
|
45834 |
+
_props$selectOnFocus = props.selectOnFocus,
|
45835 |
+
selectOnFocus = _props$selectOnFocus === void 0 ? !props.freeSolo : _props$selectOnFocus,
|
45836 |
+
valueProp = props.value;
|
45837 |
+
var id = (0,unstable_useId/* default */.Z)(idProp);
|
45838 |
+
var getOptionLabel = getOptionLabelProp;
|
45839 |
|
45840 |
+
if (false) {}
|
45841 |
|
45842 |
+
var ignoreFocus = react.useRef(false);
|
45843 |
+
var firstFocus = react.useRef(true);
|
45844 |
+
var inputRef = react.useRef(null);
|
45845 |
+
var listboxRef = react.useRef(null);
|
45846 |
|
45847 |
+
var _React$useState = react.useState(null),
|
45848 |
+
anchorEl = _React$useState[0],
|
45849 |
+
setAnchorEl = _React$useState[1];
|
45850 |
+
|
45851 |
+
var _React$useState2 = react.useState(-1),
|
45852 |
+
focusedTag = _React$useState2[0],
|
45853 |
+
setFocusedTag = _React$useState2[1];
|
45854 |
+
|
45855 |
+
var defaultHighlighted = autoHighlight ? 0 : -1;
|
45856 |
+
var highlightedIndexRef = react.useRef(defaultHighlighted);
|
45857 |
|
45858 |
+
var _useControlled = (0,useControlled/* default */.Z)({
|
45859 |
+
controlled: valueProp,
|
45860 |
+
default: defaultValue,
|
45861 |
+
name: componentName
|
45862 |
+
}),
|
45863 |
+
_useControlled2 = (0,slicedToArray/* default */.Z)(_useControlled, 2),
|
45864 |
+
value = _useControlled2[0],
|
45865 |
+
setValue = _useControlled2[1];
|
45866 |
|
45867 |
+
var _useControlled3 = (0,useControlled/* default */.Z)({
|
45868 |
+
controlled: inputValueProp,
|
45869 |
+
default: '',
|
45870 |
+
name: componentName,
|
45871 |
+
state: 'inputValue'
|
45872 |
+
}),
|
45873 |
+
_useControlled4 = (0,slicedToArray/* default */.Z)(_useControlled3, 2),
|
45874 |
+
inputValue = _useControlled4[0],
|
45875 |
+
setInputValue = _useControlled4[1];
|
45876 |
|
45877 |
+
var _React$useState3 = react.useState(false),
|
45878 |
+
focused = _React$useState3[0],
|
45879 |
+
setFocused = _React$useState3[1];
|
45880 |
|
45881 |
+
var resetInputValue = (0,useEventCallback/* default */.Z)(function (event, newValue) {
|
45882 |
+
var newInputValue;
|
45883 |
+
|
45884 |
+
if (multiple) {
|
45885 |
+
newInputValue = '';
|
45886 |
+
} else if (newValue == null) {
|
45887 |
+
newInputValue = '';
|
45888 |
+
} else {
|
45889 |
+
var optionLabel = getOptionLabel(newValue);
|
45890 |
+
newInputValue = typeof optionLabel === 'string' ? optionLabel : '';
|
45891 |
+
}
|
45892 |
+
|
45893 |
+
if (inputValue === newInputValue) {
|
45894 |
+
return;
|
45895 |
+
}
|
45896 |
+
|
45897 |
+
setInputValue(newInputValue);
|
45898 |
+
|
45899 |
+
if (onInputChange) {
|
45900 |
+
onInputChange(event, newInputValue, 'reset');
|
45901 |
+
}
|
45902 |
});
|
45903 |
+
react.useEffect(function () {
|
45904 |
+
resetInputValue(null, value);
|
45905 |
+
}, [value, resetInputValue]);
|
45906 |
|
45907 |
+
var _useControlled5 = (0,useControlled/* default */.Z)({
|
45908 |
+
controlled: openProp,
|
45909 |
+
default: false,
|
45910 |
+
name: componentName,
|
45911 |
+
state: 'open'
|
45912 |
+
}),
|
45913 |
+
_useControlled6 = (0,slicedToArray/* default */.Z)(_useControlled5, 2),
|
45914 |
+
open = _useControlled6[0],
|
45915 |
+
setOpenState = _useControlled6[1];
|
45916 |
|
45917 |
+
var inputValueIsSelectedValue = !multiple && value != null && inputValue === getOptionLabel(value);
|
45918 |
+
var popupOpen = open;
|
45919 |
+
var filteredOptions = popupOpen ? filterOptions(options.filter(function (option) {
|
45920 |
+
if (filterSelectedOptions && (multiple ? value : [value]).some(function (value2) {
|
45921 |
+
return value2 !== null && getOptionSelected(option, value2);
|
45922 |
+
})) {
|
45923 |
+
return false;
|
45924 |
+
}
|
45925 |
|
45926 |
+
return true;
|
45927 |
+
}), // we use the empty string to manipulate `filterOptions` to not filter any options
|
45928 |
+
// i.e. the filter predicate always returns true
|
45929 |
+
{
|
45930 |
+
inputValue: inputValueIsSelectedValue ? '' : inputValue,
|
45931 |
+
getOptionLabel: getOptionLabel
|
45932 |
+
}) : [];
|
45933 |
|
45934 |
+
if (false) { var missingValue; }
|
|
|
|
|
45935 |
|
45936 |
+
var focusTag = (0,useEventCallback/* default */.Z)(function (tagToFocus) {
|
45937 |
+
if (tagToFocus === -1) {
|
45938 |
+
inputRef.current.focus();
|
45939 |
+
} else {
|
45940 |
+
anchorEl.querySelector("[data-tag-index=\"".concat(tagToFocus, "\"]")).focus();
|
45941 |
}
|
45942 |
+
}); // Ensure the focusedTag is never inconsistent
|
45943 |
|
45944 |
+
react.useEffect(function () {
|
45945 |
+
if (multiple && focusedTag > value.length - 1) {
|
45946 |
+
setFocusedTag(-1);
|
45947 |
+
focusTag(-1);
|
45948 |
}
|
45949 |
+
}, [value, multiple, focusedTag, focusTag]);
|
45950 |
|
45951 |
+
function validOptionIndex(index, direction) {
|
45952 |
+
if (!listboxRef.current || index === -1) {
|
45953 |
+
return -1;
|
45954 |
+
}
|
45955 |
+
|
45956 |
+
var nextFocus = index;
|
45957 |
+
|
45958 |
+
while (true) {
|
45959 |
+
// Out of range
|
45960 |
+
if (direction === 'next' && nextFocus === filteredOptions.length || direction === 'previous' && nextFocus === -1) {
|
45961 |
+
return -1;
|
45962 |
+
}
|
45963 |
+
|
45964 |
+
var option = listboxRef.current.querySelector("[data-option-index=\"".concat(nextFocus, "\"]")); // Same logic as MenuList.js
|
45965 |
+
|
45966 |
+
var nextFocusDisabled = disabledItemsFocusable ? false : option && (option.disabled || option.getAttribute('aria-disabled') === 'true');
|
45967 |
+
|
45968 |
+
if (option && !option.hasAttribute('tabindex') || nextFocusDisabled) {
|
45969 |
+
// Move to the next element.
|
45970 |
+
nextFocus += direction === 'next' ? 1 : -1;
|
45971 |
+
} else {
|
45972 |
+
return nextFocus;
|
45973 |
+
}
|
45974 |
+
}
|
45975 |
+
}
|
45976 |
+
|
45977 |
+
var setHighlightedIndex = (0,useEventCallback/* default */.Z)(function (_ref2) {
|
45978 |
+
var event = _ref2.event,
|
45979 |
+
index = _ref2.index,
|
45980 |
+
_ref2$reason = _ref2.reason,
|
45981 |
+
reason = _ref2$reason === void 0 ? 'auto' : _ref2$reason;
|
45982 |
+
highlightedIndexRef.current = index; // does the index exist?
|
45983 |
+
|
45984 |
+
if (index === -1) {
|
45985 |
+
inputRef.current.removeAttribute('aria-activedescendant');
|
45986 |
+
} else {
|
45987 |
+
inputRef.current.setAttribute('aria-activedescendant', "".concat(id, "-option-").concat(index));
|
45988 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45989 |
|
45990 |
+
if (onHighlightChange) {
|
45991 |
+
onHighlightChange(event, index === -1 ? null : filteredOptions[index], reason);
|
45992 |
+
}
|
45993 |
|
45994 |
+
if (!listboxRef.current) {
|
45995 |
+
return;
|
45996 |
+
}
|
45997 |
|
45998 |
+
var prev = listboxRef.current.querySelector('[data-focus]');
|
45999 |
|
46000 |
+
if (prev) {
|
46001 |
+
prev.removeAttribute('data-focus');
|
46002 |
+
}
|
46003 |
|
46004 |
+
var listboxNode = listboxRef.current.parentElement.querySelector('[role="listbox"]'); // "No results"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46005 |
|
46006 |
+
if (!listboxNode) {
|
46007 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46008 |
}
|
46009 |
+
|
46010 |
+
if (index === -1) {
|
46011 |
+
listboxNode.scrollTop = 0;
|
46012 |
+
return;
|
46013 |
}
|
46014 |
+
|
46015 |
+
var option = listboxRef.current.querySelector("[data-option-index=\"".concat(index, "\"]"));
|
46016 |
+
|
46017 |
+
if (!option) {
|
46018 |
+
return;
|
46019 |
}
|
|
|
|
|
46020 |
|
46021 |
+
option.setAttribute('data-focus', 'true'); // Scroll active descendant into view.
|
46022 |
+
// Logic copied from https://www.w3.org/TR/wai-aria-practices/examples/listbox/js/listbox.js
|
46023 |
+
//
|
46024 |
+
// Consider this API instead once it has a better browser support:
|
46025 |
+
// .scrollIntoView({ scrollMode: 'if-needed', block: 'nearest' });
|
46026 |
+
|
46027 |
+
if (listboxNode.scrollHeight > listboxNode.clientHeight && reason !== 'mouse') {
|
46028 |
+
var element = option;
|
46029 |
+
var scrollBottom = listboxNode.clientHeight + listboxNode.scrollTop;
|
46030 |
+
var elementBottom = element.offsetTop + element.offsetHeight;
|
46031 |
+
|
46032 |
+
if (elementBottom > scrollBottom) {
|
46033 |
+
listboxNode.scrollTop = elementBottom - listboxNode.clientHeight;
|
46034 |
+
} else if (element.offsetTop - element.offsetHeight * (groupBy ? 1.3 : 0) < listboxNode.scrollTop) {
|
46035 |
+
listboxNode.scrollTop = element.offsetTop - element.offsetHeight * (groupBy ? 1.3 : 0);
|
46036 |
+
}
|
46037 |
}
|
46038 |
});
|
46039 |
+
var changeHighlightedIndex = (0,useEventCallback/* default */.Z)(function (_ref3) {
|
46040 |
+
var event = _ref3.event,
|
46041 |
+
diff = _ref3.diff,
|
46042 |
+
_ref3$direction = _ref3.direction,
|
46043 |
+
direction = _ref3$direction === void 0 ? 'next' : _ref3$direction,
|
46044 |
+
_ref3$reason = _ref3.reason,
|
46045 |
+
reason = _ref3$reason === void 0 ? 'auto' : _ref3$reason;
|
46046 |
|
46047 |
+
if (!popupOpen) {
|
46048 |
+
return;
|
46049 |
+
}
|
46050 |
|
46051 |
+
var getNextIndex = function getNextIndex() {
|
46052 |
+
var maxIndex = filteredOptions.length - 1;
|
46053 |
|
46054 |
+
if (diff === 'reset') {
|
46055 |
+
return defaultHighlighted;
|
46056 |
+
}
|
46057 |
|
46058 |
+
if (diff === 'start') {
|
46059 |
+
return 0;
|
46060 |
+
}
|
46061 |
|
46062 |
+
if (diff === 'end') {
|
46063 |
+
return maxIndex;
|
46064 |
+
}
|
46065 |
|
46066 |
+
var newIndex = highlightedIndexRef.current + diff;
|
46067 |
|
46068 |
+
if (newIndex < 0) {
|
46069 |
+
if (newIndex === -1 && includeInputInList) {
|
46070 |
+
return -1;
|
46071 |
+
}
|
46072 |
|
46073 |
+
if (disableListWrap && highlightedIndexRef.current !== -1 || Math.abs(diff) > 1) {
|
46074 |
+
return 0;
|
46075 |
+
}
|
46076 |
|
46077 |
+
return maxIndex;
|
46078 |
+
}
|
46079 |
|
46080 |
+
if (newIndex > maxIndex) {
|
46081 |
+
if (newIndex === maxIndex + 1 && includeInputInList) {
|
46082 |
+
return -1;
|
46083 |
+
}
|
46084 |
|
46085 |
+
if (disableListWrap || Math.abs(diff) > 1) {
|
46086 |
+
return maxIndex;
|
46087 |
+
}
|
46088 |
|
46089 |
+
return 0;
|
46090 |
+
}
|
46091 |
|
46092 |
+
return newIndex;
|
46093 |
+
};
|
46094 |
|
46095 |
+
var nextIndex = validOptionIndex(getNextIndex(), direction);
|
46096 |
+
setHighlightedIndex({
|
46097 |
+
index: nextIndex,
|
46098 |
+
reason: reason,
|
46099 |
+
event: event
|
46100 |
+
}); // Sync the content of the input with the highlighted option.
|
46101 |
|
46102 |
+
if (autoComplete && diff !== 'reset') {
|
46103 |
+
if (nextIndex === -1) {
|
46104 |
+
inputRef.current.value = inputValue;
|
46105 |
+
} else {
|
46106 |
+
var option = getOptionLabel(filteredOptions[nextIndex]);
|
46107 |
+
inputRef.current.value = option; // The portion of the selected suggestion that has not been typed by the user,
|
46108 |
+
// a completion string, appears inline after the input cursor in the textbox.
|
46109 |
|
46110 |
+
var index = option.toLowerCase().indexOf(inputValue.toLowerCase());
|
|
|
|
|
|
|
46111 |
|
46112 |
+
if (index === 0 && inputValue.length > 0) {
|
46113 |
+
inputRef.current.setSelectionRange(inputValue.length, option.length);
|
46114 |
+
}
|
46115 |
+
}
|
46116 |
+
}
|
46117 |
+
});
|
46118 |
+
var syncHighlightedIndex = react.useCallback(function () {
|
46119 |
+
if (!popupOpen) {
|
46120 |
+
return;
|
46121 |
+
}
|
46122 |
|
46123 |
+
var valueItem = multiple ? value[0] : value; // The popup is empty, reset
|
46124 |
|
46125 |
+
if (filteredOptions.length === 0 || valueItem == null) {
|
46126 |
+
changeHighlightedIndex({
|
46127 |
+
diff: 'reset'
|
46128 |
+
});
|
46129 |
+
return;
|
46130 |
+
}
|
46131 |
|
46132 |
+
if (!listboxRef.current) {
|
46133 |
+
return;
|
46134 |
+
} // Synchronize the value with the highlighted index
|
|
|
|
|
|
|
|
|
46135 |
|
46136 |
|
46137 |
+
if (!filterSelectedOptions && valueItem != null) {
|
46138 |
+
var currentOption = filteredOptions[highlightedIndexRef.current]; // Keep the current highlighted index if possible
|
46139 |
|
46140 |
+
if (multiple && currentOption && useAutocomplete_findIndex(value, function (val) {
|
46141 |
+
return getOptionSelected(currentOption, val);
|
46142 |
+
}) !== -1) {
|
46143 |
+
return;
|
46144 |
+
}
|
46145 |
|
46146 |
+
var itemIndex = useAutocomplete_findIndex(filteredOptions, function (optionItem) {
|
46147 |
+
return getOptionSelected(optionItem, valueItem);
|
46148 |
+
});
|
46149 |
|
46150 |
+
if (itemIndex === -1) {
|
46151 |
+
changeHighlightedIndex({
|
46152 |
+
diff: 'reset'
|
46153 |
+
});
|
46154 |
+
} else {
|
46155 |
+
setHighlightedIndex({
|
46156 |
+
index: itemIndex
|
46157 |
+
});
|
46158 |
}
|
|
|
|
|
46159 |
|
46160 |
+
return;
|
46161 |
+
} // Prevent the highlighted index to leak outside the boundaries.
|
46162 |
+
|
46163 |
+
|
46164 |
+
if (highlightedIndexRef.current >= filteredOptions.length - 1) {
|
46165 |
+
setHighlightedIndex({
|
46166 |
+
index: filteredOptions.length - 1
|
46167 |
+
});
|
46168 |
+
return;
|
46169 |
+
} // Restore the focus to the previous index.
|
46170 |
+
|
46171 |
+
|
46172 |
+
setHighlightedIndex({
|
46173 |
+
index: highlightedIndexRef.current
|
46174 |
+
}); // Ignore filteredOptions (and options, getOptionSelected, getOptionLabel) not to break the scroll position
|
46175 |
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
46176 |
+
}, [// Only sync the highlighted index when the option switch between empty and not
|
46177 |
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
46178 |
+
filteredOptions.length === 0, // Don't sync the highlighted index with the value when multiple
|
46179 |
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
46180 |
+
multiple ? false : value, filterSelectedOptions, changeHighlightedIndex, setHighlightedIndex, popupOpen, inputValue, multiple]);
|
46181 |
+
var handleListboxRef = (0,useEventCallback/* default */.Z)(function (node) {
|
46182 |
+
(0,setRef/* default */.Z)(listboxRef, node);
|
46183 |
+
|
46184 |
+
if (!node) {
|
46185 |
+
return;
|
46186 |
}
|
46187 |
+
|
46188 |
+
syncHighlightedIndex();
|
46189 |
+
});
|
46190 |
+
react.useEffect(function () {
|
46191 |
+
syncHighlightedIndex();
|
46192 |
+
}, [syncHighlightedIndex]);
|
46193 |
+
|
46194 |
+
var handleOpen = function handleOpen(event) {
|
46195 |
+
if (open) {
|
46196 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46197 |
}
|
46198 |
+
|
46199 |
+
setOpenState(true);
|
46200 |
+
|
46201 |
+
if (onOpen) {
|
46202 |
+
onOpen(event);
|
|
|
|
|
|
|
|
|
46203 |
}
|
46204 |
+
};
|
46205 |
+
|
46206 |
+
var handleClose = function handleClose(event, reason) {
|
46207 |
+
if (!open) {
|
46208 |
+
return;
|
46209 |
}
|
|
|
|
|
46210 |
|
46211 |
+
setOpenState(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46212 |
|
46213 |
+
if (onClose) {
|
46214 |
+
onClose(event, reason);
|
|
|
|
|
|
|
46215 |
}
|
46216 |
+
};
|
|
|
|
|
46217 |
|
46218 |
+
var handleValue = function handleValue(event, newValue, reason, details) {
|
46219 |
+
if (value === newValue) {
|
|
|
|
|
46220 |
return;
|
46221 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46222 |
|
46223 |
+
if (onChange) {
|
46224 |
+
onChange(event, newValue, reason, details);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46225 |
}
|
46226 |
+
|
46227 |
+
setValue(newValue);
|
46228 |
};
|
|
|
46229 |
|
46230 |
+
var isTouch = react.useRef(false);
|
46231 |
|
46232 |
+
var selectNewValue = function selectNewValue(event, option) {
|
46233 |
+
var reasonProp = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'select-option';
|
46234 |
+
var origin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'options';
|
46235 |
+
var reason = reasonProp;
|
46236 |
+
var newValue = option;
|
|
|
|
|
|
|
|
|
|
|
46237 |
|
46238 |
+
if (multiple) {
|
46239 |
+
newValue = Array.isArray(value) ? value.slice() : [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46240 |
|
46241 |
+
if (false) { var matches; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46242 |
|
46243 |
+
var itemIndex = useAutocomplete_findIndex(newValue, function (valueItem) {
|
46244 |
+
return getOptionSelected(option, valueItem);
|
46245 |
+
});
|
46246 |
+
|
46247 |
+
if (itemIndex === -1) {
|
46248 |
+
newValue.push(option);
|
46249 |
+
} else if (origin !== 'freeSolo') {
|
46250 |
+
newValue.splice(itemIndex, 1);
|
46251 |
+
reason = 'remove-option';
|
46252 |
+
}
|
46253 |
+
}
|
46254 |
+
|
46255 |
+
resetInputValue(event, newValue);
|
46256 |
+
handleValue(event, newValue, reason, {
|
46257 |
+
option: option
|
46258 |
+
});
|
46259 |
+
|
46260 |
+
if (!disableCloseOnSelect) {
|
46261 |
+
handleClose(event, reason);
|
46262 |
+
}
|
46263 |
|
46264 |
+
if (blurOnSelect === true || blurOnSelect === 'touch' && isTouch.current || blurOnSelect === 'mouse' && !isTouch.current) {
|
46265 |
+
inputRef.current.blur();
|
46266 |
+
}
|
46267 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46268 |
|
46269 |
+
function validTagIndex(index, direction) {
|
46270 |
+
if (index === -1) {
|
46271 |
+
return -1;
|
46272 |
+
}
|
|
|
|
|
|
|
46273 |
|
46274 |
+
var nextFocus = index;
|
46275 |
|
46276 |
+
while (true) {
|
46277 |
+
// Out of range
|
46278 |
+
if (direction === 'next' && nextFocus === value.length || direction === 'previous' && nextFocus === -1) {
|
46279 |
+
return -1;
|
46280 |
+
}
|
46281 |
|
46282 |
+
var option = anchorEl.querySelector("[data-tag-index=\"".concat(nextFocus, "\"]")); // Same logic as MenuList.js
|
46283 |
+
|
46284 |
+
if (option && (!option.hasAttribute('tabindex') || option.disabled || option.getAttribute('aria-disabled') === 'true')) {
|
46285 |
+
nextFocus += direction === 'next' ? 1 : -1;
|
46286 |
+
} else {
|
46287 |
+
return nextFocus;
|
46288 |
+
}
|
46289 |
+
}
|
46290 |
}
|
46291 |
|
46292 |
+
var handleFocusTag = function handleFocusTag(event, direction) {
|
46293 |
+
if (!multiple) {
|
46294 |
+
return;
|
46295 |
+
}
|
46296 |
|
46297 |
+
handleClose(event, 'toggleInput');
|
46298 |
+
var nextTag = focusedTag;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46299 |
|
46300 |
+
if (focusedTag === -1) {
|
46301 |
+
if (inputValue === '' && direction === 'previous') {
|
46302 |
+
nextTag = value.length - 1;
|
46303 |
+
}
|
46304 |
+
} else {
|
46305 |
+
nextTag += direction === 'next' ? 1 : -1;
|
46306 |
|
46307 |
+
if (nextTag < 0) {
|
46308 |
+
nextTag = 0;
|
46309 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46310 |
|
46311 |
+
if (nextTag === value.length) {
|
46312 |
+
nextTag = -1;
|
46313 |
+
}
|
46314 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46315 |
|
46316 |
+
nextTag = validTagIndex(nextTag, direction);
|
46317 |
+
setFocusedTag(nextTag);
|
46318 |
+
focusTag(nextTag);
|
46319 |
+
};
|
46320 |
|
46321 |
+
var handleClear = function handleClear(event) {
|
46322 |
+
ignoreFocus.current = true;
|
46323 |
+
setInputValue('');
|
|
|
|
|
|
|
46324 |
|
46325 |
+
if (onInputChange) {
|
46326 |
+
onInputChange(event, '', 'clear');
|
46327 |
+
}
|
46328 |
|
46329 |
+
handleValue(event, multiple ? [] : null, 'clear');
|
46330 |
+
};
|
|
|
46331 |
|
46332 |
+
var handleKeyDown = function handleKeyDown(other) {
|
46333 |
+
return function (event) {
|
46334 |
+
if (focusedTag !== -1 && ['ArrowLeft', 'ArrowRight'].indexOf(event.key) === -1) {
|
46335 |
+
setFocusedTag(-1);
|
46336 |
+
focusTag(-1);
|
46337 |
+
}
|
46338 |
|
46339 |
+
switch (event.key) {
|
46340 |
+
case 'Home':
|
46341 |
+
if (popupOpen && handleHomeEndKeys) {
|
46342 |
+
// Prevent scroll of the page
|
46343 |
+
event.preventDefault();
|
46344 |
+
changeHighlightedIndex({
|
46345 |
+
diff: 'start',
|
46346 |
+
direction: 'next',
|
46347 |
+
reason: 'keyboard',
|
46348 |
+
event: event
|
46349 |
+
});
|
46350 |
+
}
|
46351 |
|
46352 |
+
break;
|
|
|
46353 |
|
46354 |
+
case 'End':
|
46355 |
+
if (popupOpen && handleHomeEndKeys) {
|
46356 |
+
// Prevent scroll of the page
|
46357 |
+
event.preventDefault();
|
46358 |
+
changeHighlightedIndex({
|
46359 |
+
diff: 'end',
|
46360 |
+
direction: 'previous',
|
46361 |
+
reason: 'keyboard',
|
46362 |
+
event: event
|
46363 |
+
});
|
46364 |
+
}
|
46365 |
|
46366 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46367 |
|
46368 |
+
case 'PageUp':
|
46369 |
+
// Prevent scroll of the page
|
46370 |
+
event.preventDefault();
|
46371 |
+
changeHighlightedIndex({
|
46372 |
+
diff: -pageSize,
|
46373 |
+
direction: 'previous',
|
46374 |
+
reason: 'keyboard',
|
46375 |
+
event: event
|
46376 |
+
});
|
46377 |
+
handleOpen(event);
|
46378 |
+
break;
|
46379 |
|
46380 |
+
case 'PageDown':
|
46381 |
+
// Prevent scroll of the page
|
46382 |
+
event.preventDefault();
|
46383 |
+
changeHighlightedIndex({
|
46384 |
+
diff: pageSize,
|
46385 |
+
direction: 'next',
|
46386 |
+
reason: 'keyboard',
|
46387 |
+
event: event
|
46388 |
+
});
|
46389 |
+
handleOpen(event);
|
46390 |
+
break;
|
|
|
|
|
46391 |
|
46392 |
+
case 'ArrowDown':
|
46393 |
+
// Prevent cursor move
|
46394 |
+
event.preventDefault();
|
46395 |
+
changeHighlightedIndex({
|
46396 |
+
diff: 1,
|
46397 |
+
direction: 'next',
|
46398 |
+
reason: 'keyboard',
|
46399 |
+
event: event
|
46400 |
+
});
|
46401 |
+
handleOpen(event);
|
46402 |
+
break;
|
46403 |
|
46404 |
+
case 'ArrowUp':
|
46405 |
+
// Prevent cursor move
|
46406 |
+
event.preventDefault();
|
46407 |
+
changeHighlightedIndex({
|
46408 |
+
diff: -1,
|
46409 |
+
direction: 'previous',
|
46410 |
+
reason: 'keyboard',
|
46411 |
+
event: event
|
46412 |
+
});
|
46413 |
+
handleOpen(event);
|
46414 |
+
break;
|
46415 |
|
46416 |
+
case 'ArrowLeft':
|
46417 |
+
handleFocusTag(event, 'previous');
|
46418 |
+
break;
|
46419 |
|
46420 |
+
case 'ArrowRight':
|
46421 |
+
handleFocusTag(event, 'next');
|
46422 |
+
break;
|
|
|
46423 |
|
46424 |
+
case 'Enter':
|
46425 |
+
// Wait until IME is settled.
|
46426 |
+
if (event.which === 229) {
|
46427 |
+
break;
|
46428 |
+
}
|
46429 |
|
46430 |
+
if (highlightedIndexRef.current !== -1 && popupOpen) {
|
46431 |
+
var option = filteredOptions[highlightedIndexRef.current];
|
46432 |
+
var disabled = getOptionDisabled ? getOptionDisabled(option) : false; // We don't want to validate the form.
|
|
|
|
|
|
|
|
|
|
|
46433 |
|
46434 |
+
event.preventDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46435 |
|
46436 |
+
if (disabled) {
|
46437 |
+
return;
|
46438 |
+
}
|
46439 |
|
46440 |
+
selectNewValue(event, option, 'select-option'); // Move the selection to the end.
|
|
|
|
|
|
|
|
|
46441 |
|
46442 |
+
if (autoComplete) {
|
46443 |
+
inputRef.current.setSelectionRange(inputRef.current.value.length, inputRef.current.value.length);
|
46444 |
+
}
|
46445 |
+
} else if (freeSolo && inputValue !== '' && inputValueIsSelectedValue === false) {
|
46446 |
+
if (multiple) {
|
46447 |
+
// Allow people to add new values before they submit the form.
|
46448 |
+
event.preventDefault();
|
46449 |
+
}
|
46450 |
|
46451 |
+
selectNewValue(event, inputValue, 'create-option', 'freeSolo');
|
46452 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46453 |
|
46454 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46455 |
|
46456 |
+
case 'Escape':
|
46457 |
+
if (popupOpen) {
|
46458 |
+
// Avoid Opera to exit fullscreen mode.
|
46459 |
+
event.preventDefault(); // Avoid the Modal to handle the event.
|
|
|
|
|
|
|
|
|
|
|
46460 |
|
46461 |
+
event.stopPropagation();
|
46462 |
+
handleClose(event, 'escape');
|
46463 |
+
} else if (clearOnEscape && (inputValue !== '' || multiple && value.length > 0)) {
|
46464 |
+
// Avoid Opera to exit fullscreen mode.
|
46465 |
+
event.preventDefault(); // Avoid the Modal to handle the event.
|
46466 |
|
46467 |
+
event.stopPropagation();
|
46468 |
+
handleClear(event);
|
46469 |
+
}
|
46470 |
|
46471 |
+
break;
|
|
|
|
|
46472 |
|
46473 |
+
case 'Backspace':
|
46474 |
+
if (multiple && inputValue === '' && value.length > 0) {
|
46475 |
+
var index = focusedTag === -1 ? value.length - 1 : focusedTag;
|
46476 |
+
var newValue = value.slice();
|
46477 |
+
newValue.splice(index, 1);
|
46478 |
+
handleValue(event, newValue, 'remove-option', {
|
46479 |
+
option: value[index]
|
46480 |
+
});
|
46481 |
+
}
|
46482 |
|
46483 |
+
break;
|
46484 |
+
|
46485 |
+
default:
|
46486 |
+
}
|
46487 |
+
|
46488 |
+
if (other.onKeyDown) {
|
46489 |
+
other.onKeyDown(event);
|
46490 |
+
}
|
46491 |
+
};
|
46492 |
};
|
|
|
46493 |
|
46494 |
+
var handleFocus = function handleFocus(event) {
|
46495 |
+
setFocused(true);
|
|
|
|
|
|
|
46496 |
|
46497 |
+
if (openOnFocus && !ignoreFocus.current) {
|
46498 |
+
handleOpen(event);
|
|
|
|
|
|
|
|
|
|
|
|
|
46499 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
46500 |
};
|
|
|
46501 |
|
46502 |
+
var handleBlur = function handleBlur(event) {
|
46503 |
+
// Ignore the event when using the scrollbar with IE 11
|
46504 |
+
if (listboxRef.current !== null && document.activeElement === listboxRef.current.parentElement) {
|
46505 |
+
inputRef.current.focus();
|
46506 |
+
return;
|
46507 |
+
}
|
46508 |
|
46509 |
+
setFocused(false);
|
46510 |
+
firstFocus.current = true;
|
46511 |
+
ignoreFocus.current = false;
|
46512 |
|
46513 |
+
if (debug && inputValue !== '') {
|
46514 |
+
return;
|
46515 |
+
}
|
46516 |
|
46517 |
+
if (autoSelect && highlightedIndexRef.current !== -1 && popupOpen) {
|
46518 |
+
selectNewValue(event, filteredOptions[highlightedIndexRef.current], 'blur');
|
46519 |
+
} else if (autoSelect && freeSolo && inputValue !== '') {
|
46520 |
+
selectNewValue(event, inputValue, 'blur', 'freeSolo');
|
46521 |
+
} else if (clearOnBlur) {
|
46522 |
+
resetInputValue(event, value);
|
46523 |
+
}
|
46524 |
|
46525 |
+
handleClose(event, 'blur');
|
46526 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46527 |
|
46528 |
+
var handleInputChange = function handleInputChange(event) {
|
46529 |
+
var newValue = event.target.value;
|
46530 |
|
46531 |
+
if (inputValue !== newValue) {
|
46532 |
+
setInputValue(newValue);
|
|
|
46533 |
|
46534 |
+
if (onInputChange) {
|
46535 |
+
onInputChange(event, newValue, 'input');
|
|
|
46536 |
}
|
46537 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46538 |
|
46539 |
+
if (newValue === '') {
|
46540 |
+
if (!disableClearable && !multiple) {
|
46541 |
+
handleValue(event, null, 'clear');
|
46542 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46543 |
} else {
|
46544 |
+
handleOpen(event);
|
46545 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46546 |
};
|
46547 |
|
46548 |
+
var handleOptionMouseOver = function handleOptionMouseOver(event) {
|
46549 |
+
setHighlightedIndex({
|
46550 |
+
event: event,
|
46551 |
+
index: Number(event.currentTarget.getAttribute('data-option-index')),
|
46552 |
+
reason: 'mouse'
|
46553 |
+
});
|
46554 |
+
};
|
46555 |
|
46556 |
+
var handleOptionTouchStart = function handleOptionTouchStart() {
|
46557 |
+
isTouch.current = true;
|
46558 |
+
};
|
46559 |
|
46560 |
+
var handleOptionClick = function handleOptionClick(event) {
|
46561 |
+
var index = Number(event.currentTarget.getAttribute('data-option-index'));
|
46562 |
+
selectNewValue(event, filteredOptions[index], 'select-option');
|
46563 |
+
isTouch.current = false;
|
46564 |
+
};
|
|
|
46565 |
|
46566 |
+
var handleTagDelete = function handleTagDelete(index) {
|
46567 |
+
return function (event) {
|
46568 |
+
var newValue = value.slice();
|
46569 |
+
newValue.splice(index, 1);
|
46570 |
+
handleValue(event, newValue, 'remove-option', {
|
46571 |
+
option: value[index]
|
46572 |
+
});
|
46573 |
+
};
|
46574 |
+
};
|
46575 |
|
46576 |
+
var handlePopupIndicator = function handlePopupIndicator(event) {
|
46577 |
+
if (open) {
|
46578 |
+
handleClose(event, 'toggleInput');
|
46579 |
+
} else {
|
46580 |
+
handleOpen(event);
|
46581 |
+
}
|
46582 |
+
}; // Prevent input blur when interacting with the combobox
|
46583 |
|
|
|
|
|
46584 |
|
46585 |
+
var handleMouseDown = function handleMouseDown(event) {
|
46586 |
+
if (event.target.getAttribute('id') !== id) {
|
46587 |
+
event.preventDefault();
|
46588 |
+
}
|
46589 |
+
}; // Focus the input when interacting with the combobox
|
46590 |
|
|
|
|
|
|
|
46591 |
|
46592 |
+
var handleClick = function handleClick() {
|
46593 |
+
inputRef.current.focus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46594 |
|
46595 |
+
if (selectOnFocus && firstFocus.current && inputRef.current.selectionEnd - inputRef.current.selectionStart === 0) {
|
46596 |
+
inputRef.current.select();
|
46597 |
+
}
|
|
|
|
|
|
|
|
|
46598 |
|
46599 |
+
firstFocus.current = false;
|
46600 |
+
};
|
|
|
|
|
46601 |
|
46602 |
+
var handleInputMouseDown = function handleInputMouseDown(event) {
|
46603 |
+
if (inputValue === '' || !open) {
|
46604 |
+
handlePopupIndicator(event);
|
46605 |
+
}
|
46606 |
+
};
|
46607 |
|
46608 |
+
var dirty = freeSolo && inputValue.length > 0;
|
46609 |
+
dirty = dirty || (multiple ? value.length > 0 : value !== null);
|
46610 |
+
var groupedOptions = filteredOptions;
|
46611 |
|
46612 |
+
if (groupBy) {
|
46613 |
+
// used to keep track of key and indexes in the result array
|
46614 |
+
var indexBy = new Map();
|
46615 |
+
var warn = false;
|
46616 |
+
groupedOptions = filteredOptions.reduce(function (acc, option, index) {
|
46617 |
+
var group = groupBy(option);
|
46618 |
|
46619 |
+
if (acc.length > 0 && acc[acc.length - 1].group === group) {
|
46620 |
+
acc[acc.length - 1].options.push(option);
|
46621 |
+
} else {
|
46622 |
+
if (false) {}
|
46623 |
|
46624 |
+
acc.push({
|
46625 |
+
key: index,
|
46626 |
+
index: index,
|
46627 |
+
group: group,
|
46628 |
+
options: [option]
|
46629 |
+
});
|
46630 |
+
}
|
46631 |
|
46632 |
+
return acc;
|
46633 |
+
}, []);
|
46634 |
+
}
|
46635 |
|
46636 |
+
return {
|
46637 |
+
getRootProps: function getRootProps() {
|
46638 |
+
var other = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
46639 |
+
return (0,esm_extends/* default */.Z)({
|
46640 |
+
'aria-owns': popupOpen ? "".concat(id, "-popup") : null,
|
46641 |
+
role: 'combobox',
|
46642 |
+
'aria-expanded': popupOpen
|
46643 |
+
}, other, {
|
46644 |
+
onKeyDown: handleKeyDown(other),
|
46645 |
+
onMouseDown: handleMouseDown,
|
46646 |
+
onClick: handleClick
|
46647 |
+
});
|
46648 |
+
},
|
46649 |
+
getInputLabelProps: function getInputLabelProps() {
|
46650 |
+
return {
|
46651 |
+
id: "".concat(id, "-label"),
|
46652 |
+
htmlFor: id
|
46653 |
+
};
|
46654 |
+
},
|
46655 |
+
getInputProps: function getInputProps() {
|
46656 |
+
return {
|
46657 |
+
id: id,
|
46658 |
+
value: inputValue,
|
46659 |
+
onBlur: handleBlur,
|
46660 |
+
onFocus: handleFocus,
|
46661 |
+
onChange: handleInputChange,
|
46662 |
+
onMouseDown: handleInputMouseDown,
|
46663 |
+
// if open then this is handled imperativeley so don't let react override
|
46664 |
+
// only have an opinion about this when closed
|
46665 |
+
'aria-activedescendant': popupOpen ? '' : null,
|
46666 |
+
'aria-autocomplete': autoComplete ? 'both' : 'list',
|
46667 |
+
'aria-controls': popupOpen ? "".concat(id, "-popup") : null,
|
46668 |
+
// Disable browser's suggestion that might overlap with the popup.
|
46669 |
+
// Handle autocomplete but not autofill.
|
46670 |
+
autoComplete: 'off',
|
46671 |
+
ref: inputRef,
|
46672 |
+
autoCapitalize: 'none',
|
46673 |
+
spellCheck: 'false'
|
46674 |
+
};
|
46675 |
+
},
|
46676 |
+
getClearProps: function getClearProps() {
|
46677 |
+
return {
|
46678 |
+
tabIndex: -1,
|
46679 |
+
onClick: handleClear
|
46680 |
+
};
|
46681 |
+
},
|
46682 |
+
getPopupIndicatorProps: function getPopupIndicatorProps() {
|
46683 |
+
return {
|
46684 |
+
tabIndex: -1,
|
46685 |
+
onClick: handlePopupIndicator
|
46686 |
+
};
|
46687 |
+
},
|
46688 |
+
getTagProps: function getTagProps(_ref4) {
|
46689 |
+
var index = _ref4.index;
|
46690 |
+
return {
|
46691 |
+
key: index,
|
46692 |
+
'data-tag-index': index,
|
46693 |
+
tabIndex: -1,
|
46694 |
+
onDelete: handleTagDelete(index)
|
46695 |
+
};
|
46696 |
+
},
|
46697 |
+
getListboxProps: function getListboxProps() {
|
46698 |
+
return {
|
46699 |
+
role: 'listbox',
|
46700 |
+
id: "".concat(id, "-popup"),
|
46701 |
+
'aria-labelledby': "".concat(id, "-label"),
|
46702 |
+
ref: handleListboxRef,
|
46703 |
+
onMouseDown: function onMouseDown(event) {
|
46704 |
+
// Prevent blur
|
46705 |
+
event.preventDefault();
|
46706 |
+
}
|
46707 |
+
};
|
46708 |
+
},
|
46709 |
+
getOptionProps: function getOptionProps(_ref5) {
|
46710 |
+
var index = _ref5.index,
|
46711 |
+
option = _ref5.option;
|
46712 |
+
var selected = (multiple ? value : [value]).some(function (value2) {
|
46713 |
+
return value2 != null && getOptionSelected(option, value2);
|
46714 |
+
});
|
46715 |
+
var disabled = getOptionDisabled ? getOptionDisabled(option) : false;
|
46716 |
+
return {
|
46717 |
+
key: index,
|
46718 |
+
tabIndex: -1,
|
46719 |
+
role: 'option',
|
46720 |
+
id: "".concat(id, "-option-").concat(index),
|
46721 |
+
onMouseOver: handleOptionMouseOver,
|
46722 |
+
onClick: handleOptionClick,
|
46723 |
+
onTouchStart: handleOptionTouchStart,
|
46724 |
+
'data-option-index': index,
|
46725 |
+
'aria-disabled': disabled,
|
46726 |
+
'aria-selected': selected
|
46727 |
+
};
|
46728 |
+
},
|
46729 |
+
id: id,
|
46730 |
+
inputValue: inputValue,
|
46731 |
+
value: value,
|
46732 |
+
dirty: dirty,
|
46733 |
+
popupOpen: popupOpen,
|
46734 |
+
focused: focused || focusedTag !== -1,
|
46735 |
+
anchorEl: anchorEl,
|
46736 |
+
setAnchorEl: setAnchorEl,
|
46737 |
+
focusedTag: focusedTag,
|
46738 |
+
groupedOptions: groupedOptions
|
46739 |
};
|
|
|
|
|
46740 |
}
|
46741 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/lab/esm/Autocomplete/Autocomplete.js
|
46742 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46743 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46744 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46745 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46746 |
|
|
|
46747 |
|
|
|
|
|
46748 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46749 |
|
|
|
46750 |
|
|
|
|
|
|
|
|
|
|
|
46751 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46752 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46753 |
|
|
|
|
|
46754 |
|
|
|
|
|
|
|
46755 |
|
|
|
|
|
46756 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46757 |
|
46758 |
+
var Autocomplete_styles = function styles(theme) {
|
46759 |
+
var _option;
|
|
|
46760 |
|
46761 |
+
return {
|
46762 |
+
/* Styles applied to the root element. */
|
46763 |
+
root: {
|
46764 |
+
'&$focused $clearIndicatorDirty': {
|
46765 |
+
visibility: 'visible'
|
46766 |
+
},
|
46767 |
|
46768 |
+
/* Avoid double tap issue on iOS */
|
46769 |
+
'@media (pointer: fine)': {
|
46770 |
+
'&:hover $clearIndicatorDirty': {
|
46771 |
+
visibility: 'visible'
|
46772 |
+
}
|
46773 |
+
}
|
|
|
|
|
46774 |
},
|
46775 |
+
|
46776 |
+
/* Styles applied to the root element if `fullWidth={true}`. */
|
46777 |
+
fullWidth: {
|
46778 |
+
width: '100%'
|
46779 |
},
|
|
|
|
|
|
|
|
|
|
|
46780 |
|
46781 |
+
/* Pseudo-class applied to the root element if focused. */
|
46782 |
+
focused: {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46783 |
|
46784 |
+
/* Styles applied to the tag elements, e.g. the chips. */
|
46785 |
+
tag: {
|
46786 |
+
margin: 3,
|
46787 |
+
maxWidth: 'calc(100% - 6px)'
|
46788 |
+
},
|
46789 |
|
46790 |
+
/* Styles applied to the tag elements, e.g. the chips if `size="small"`. */
|
46791 |
+
tagSizeSmall: {
|
46792 |
+
margin: 2,
|
46793 |
+
maxWidth: 'calc(100% - 4px)'
|
46794 |
+
},
|
46795 |
|
46796 |
+
/* Styles applied when the popup icon is rendered. */
|
46797 |
+
hasPopupIcon: {},
|
46798 |
|
46799 |
+
/* Styles applied when the clear icon is rendered. */
|
46800 |
+
hasClearIcon: {},
|
46801 |
+
|
46802 |
+
/* Styles applied to the Input element. */
|
46803 |
+
inputRoot: {
|
46804 |
+
flexWrap: 'wrap',
|
46805 |
+
'$hasPopupIcon &, $hasClearIcon &': {
|
46806 |
+
paddingRight: 26 + 4
|
46807 |
+
},
|
46808 |
+
'$hasPopupIcon$hasClearIcon &': {
|
46809 |
+
paddingRight: 52 + 4
|
46810 |
+
},
|
46811 |
+
'& $input': {
|
46812 |
+
width: 0,
|
46813 |
+
minWidth: 30
|
46814 |
+
},
|
46815 |
+
'&[class*="MuiInput-root"]': {
|
46816 |
+
paddingBottom: 1,
|
46817 |
+
'& $input': {
|
46818 |
+
padding: 4
|
46819 |
+
},
|
46820 |
+
'& $input:first-child': {
|
46821 |
+
padding: '6px 0'
|
46822 |
+
}
|
46823 |
+
},
|
46824 |
+
'&[class*="MuiInput-root"][class*="MuiInput-marginDense"]': {
|
46825 |
+
'& $input': {
|
46826 |
+
padding: '4px 4px 5px'
|
46827 |
+
},
|
46828 |
+
'& $input:first-child': {
|
46829 |
+
padding: '3px 0 6px'
|
46830 |
+
}
|
46831 |
+
},
|
46832 |
+
'&[class*="MuiOutlinedInput-root"]': {
|
46833 |
+
padding: 9,
|
46834 |
+
'$hasPopupIcon &, $hasClearIcon &': {
|
46835 |
+
paddingRight: 26 + 4 + 9
|
46836 |
+
},
|
46837 |
+
'$hasPopupIcon$hasClearIcon &': {
|
46838 |
+
paddingRight: 52 + 4 + 9
|
46839 |
+
},
|
46840 |
+
'& $input': {
|
46841 |
+
padding: '9.5px 4px'
|
46842 |
+
},
|
46843 |
+
'& $input:first-child': {
|
46844 |
+
paddingLeft: 6
|
46845 |
+
},
|
46846 |
+
'& $endAdornment': {
|
46847 |
+
right: 9
|
46848 |
+
}
|
46849 |
+
},
|
46850 |
+
'&[class*="MuiOutlinedInput-root"][class*="MuiOutlinedInput-marginDense"]': {
|
46851 |
+
padding: 6,
|
46852 |
+
'& $input': {
|
46853 |
+
padding: '4.5px 4px'
|
46854 |
+
}
|
46855 |
+
},
|
46856 |
+
'&[class*="MuiFilledInput-root"]': {
|
46857 |
+
paddingTop: 19,
|
46858 |
+
paddingLeft: 8,
|
46859 |
+
'$hasPopupIcon &, $hasClearIcon &': {
|
46860 |
+
paddingRight: 26 + 4 + 9
|
46861 |
+
},
|
46862 |
+
'$hasPopupIcon$hasClearIcon &': {
|
46863 |
+
paddingRight: 52 + 4 + 9
|
46864 |
+
},
|
46865 |
+
'& $input': {
|
46866 |
+
padding: '9px 4px'
|
46867 |
+
},
|
46868 |
+
'& $endAdornment': {
|
46869 |
+
right: 9
|
46870 |
+
}
|
46871 |
+
},
|
46872 |
+
'&[class*="MuiFilledInput-root"][class*="MuiFilledInput-marginDense"]': {
|
46873 |
+
paddingBottom: 1,
|
46874 |
+
'& $input': {
|
46875 |
+
padding: '4.5px 4px'
|
46876 |
+
}
|
46877 |
+
}
|
46878 |
+
},
|
46879 |
|
46880 |
+
/* Styles applied to the input element. */
|
46881 |
+
input: {
|
46882 |
+
flexGrow: 1,
|
46883 |
+
textOverflow: 'ellipsis',
|
46884 |
+
opacity: 0
|
46885 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
46886 |
|
46887 |
+
/* Styles applied to the input element if tag focused. */
|
46888 |
+
inputFocused: {
|
46889 |
+
opacity: 1
|
46890 |
+
},
|
46891 |
|
46892 |
+
/* Styles applied to the endAdornment element. */
|
46893 |
+
endAdornment: {
|
46894 |
+
// We use a position absolute to support wrapping tags.
|
46895 |
+
position: 'absolute',
|
46896 |
+
right: 0,
|
46897 |
+
top: 'calc(50% - 14px)' // Center vertically
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46898 |
|
46899 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46900 |
|
46901 |
+
/* Styles applied to the clear indicator. */
|
46902 |
+
clearIndicator: {
|
46903 |
+
marginRight: -2,
|
46904 |
+
padding: 4,
|
46905 |
+
visibility: 'hidden'
|
46906 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
46907 |
|
46908 |
+
/* Styles applied to the clear indicator if the input is dirty. */
|
46909 |
+
clearIndicatorDirty: {},
|
46910 |
|
46911 |
+
/* Styles applied to the popup indicator. */
|
46912 |
+
popupIndicator: {
|
46913 |
+
padding: 2,
|
46914 |
+
marginRight: -2
|
46915 |
+
},
|
46916 |
|
46917 |
+
/* Styles applied to the popup indicator if the popup is open. */
|
46918 |
+
popupIndicatorOpen: {
|
46919 |
+
transform: 'rotate(180deg)'
|
46920 |
+
},
|
|
|
|
|
46921 |
|
46922 |
+
/* Styles applied to the popper element. */
|
46923 |
+
popper: {
|
46924 |
+
zIndex: theme.zIndex.modal
|
46925 |
+
},
|
|
|
|
|
46926 |
|
46927 |
+
/* Styles applied to the popper element if `disablePortal={true}`. */
|
46928 |
+
popperDisablePortal: {
|
46929 |
+
position: 'absolute'
|
46930 |
+
},
|
46931 |
|
46932 |
+
/* Styles applied to the `Paper` component. */
|
46933 |
+
paper: (0,esm_extends/* default */.Z)({}, theme.typography.body1, {
|
46934 |
+
overflow: 'hidden',
|
46935 |
+
margin: '4px 0'
|
46936 |
+
}),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46937 |
|
46938 |
+
/* Styles applied to the `listbox` component. */
|
46939 |
+
listbox: {
|
46940 |
+
listStyle: 'none',
|
46941 |
+
margin: 0,
|
46942 |
+
padding: '8px 0',
|
46943 |
+
maxHeight: '40vh',
|
46944 |
+
overflow: 'auto'
|
46945 |
+
},
|
46946 |
|
46947 |
+
/* Styles applied to the loading wrapper. */
|
46948 |
+
loading: {
|
46949 |
+
color: theme.palette.text.secondary,
|
46950 |
+
padding: '14px 16px'
|
46951 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46952 |
|
46953 |
+
/* Styles applied to the no option wrapper. */
|
46954 |
+
noOptions: {
|
46955 |
+
color: theme.palette.text.secondary,
|
46956 |
+
padding: '14px 16px'
|
46957 |
+
},
|
|
|
46958 |
|
46959 |
+
/* Styles applied to the option elements. */
|
46960 |
+
option: (_option = {
|
46961 |
+
minHeight: 48,
|
46962 |
+
display: 'flex',
|
46963 |
+
justifyContent: 'flex-start',
|
46964 |
+
alignItems: 'center',
|
46965 |
+
cursor: 'pointer',
|
46966 |
+
paddingTop: 6,
|
46967 |
+
boxSizing: 'border-box',
|
46968 |
+
outline: '0',
|
46969 |
+
WebkitTapHighlightColor: 'transparent',
|
46970 |
+
paddingBottom: 6,
|
46971 |
+
paddingLeft: 16,
|
46972 |
+
paddingRight: 16
|
46973 |
+
}, (0,defineProperty/* default */.Z)(_option, theme.breakpoints.up('sm'), {
|
46974 |
+
minHeight: 'auto'
|
46975 |
+
}), (0,defineProperty/* default */.Z)(_option, '&[aria-selected="true"]', {
|
46976 |
+
backgroundColor: theme.palette.action.selected
|
46977 |
+
}), (0,defineProperty/* default */.Z)(_option, '&[data-focus="true"]', {
|
46978 |
+
backgroundColor: theme.palette.action.hover
|
46979 |
+
}), (0,defineProperty/* default */.Z)(_option, '&:active', {
|
46980 |
+
backgroundColor: theme.palette.action.selected
|
46981 |
+
}), (0,defineProperty/* default */.Z)(_option, '&[aria-disabled="true"]', {
|
46982 |
+
opacity: theme.palette.action.disabledOpacity,
|
46983 |
+
pointerEvents: 'none'
|
46984 |
+
}), _option),
|
46985 |
|
46986 |
+
/* Styles applied to the group's label elements. */
|
46987 |
+
groupLabel: {
|
46988 |
+
backgroundColor: theme.palette.background.paper,
|
46989 |
+
top: -8
|
46990 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46991 |
|
46992 |
+
/* Styles applied to the group's ul elements. */
|
46993 |
+
groupUl: {
|
46994 |
+
padding: 0,
|
46995 |
+
'& $option': {
|
46996 |
+
paddingLeft: 24
|
46997 |
+
}
|
46998 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46999 |
};
|
47000 |
+
};
|
47001 |
|
47002 |
+
function DisablePortal(props) {
|
47003 |
+
// eslint-disable-next-line react/prop-types
|
47004 |
+
var anchorEl = props.anchorEl,
|
47005 |
+
open = props.open,
|
47006 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["anchorEl", "open"]);
|
47007 |
|
47008 |
+
return /*#__PURE__*/react.createElement("div", other);
|
47009 |
+
}
|
|
|
|
|
47010 |
|
47011 |
+
var Autocomplete_ref = /*#__PURE__*/react.createElement(Close, {
|
47012 |
+
fontSize: "small"
|
47013 |
+
});
|
47014 |
|
47015 |
+
var Autocomplete_ref2 = /*#__PURE__*/react.createElement(svg_icons_ArrowDropDown, null);
|
47016 |
|
47017 |
+
var Autocomplete = /*#__PURE__*/react.forwardRef(function Autocomplete(props, ref) {
|
47018 |
+
/* eslint-disable no-unused-vars */
|
47019 |
+
var _props$autoComplete = props.autoComplete,
|
47020 |
+
autoComplete = _props$autoComplete === void 0 ? false : _props$autoComplete,
|
47021 |
+
_props$autoHighlight = props.autoHighlight,
|
47022 |
+
autoHighlight = _props$autoHighlight === void 0 ? false : _props$autoHighlight,
|
47023 |
+
_props$autoSelect = props.autoSelect,
|
47024 |
+
autoSelect = _props$autoSelect === void 0 ? false : _props$autoSelect,
|
47025 |
+
_props$blurOnSelect = props.blurOnSelect,
|
47026 |
+
blurOnSelect = _props$blurOnSelect === void 0 ? false : _props$blurOnSelect,
|
47027 |
+
ChipProps = props.ChipProps,
|
47028 |
+
classes = props.classes,
|
47029 |
+
className = props.className,
|
47030 |
+
_props$clearOnBlur = props.clearOnBlur,
|
47031 |
+
clearOnBlur = _props$clearOnBlur === void 0 ? !props.freeSolo : _props$clearOnBlur,
|
47032 |
+
_props$clearOnEscape = props.clearOnEscape,
|
47033 |
+
clearOnEscape = _props$clearOnEscape === void 0 ? false : _props$clearOnEscape,
|
47034 |
+
_props$clearText = props.clearText,
|
47035 |
+
clearText = _props$clearText === void 0 ? 'Clear' : _props$clearText,
|
47036 |
+
_props$closeIcon = props.closeIcon,
|
47037 |
+
closeIcon = _props$closeIcon === void 0 ? Autocomplete_ref : _props$closeIcon,
|
47038 |
+
_props$closeText = props.closeText,
|
47039 |
+
closeText = _props$closeText === void 0 ? 'Close' : _props$closeText,
|
47040 |
+
_props$debug = props.debug,
|
47041 |
+
debug = _props$debug === void 0 ? false : _props$debug,
|
47042 |
+
_props$defaultValue = props.defaultValue,
|
47043 |
+
defaultValue = _props$defaultValue === void 0 ? props.multiple ? [] : null : _props$defaultValue,
|
47044 |
+
_props$disableClearab = props.disableClearable,
|
47045 |
+
disableClearable = _props$disableClearab === void 0 ? false : _props$disableClearab,
|
47046 |
+
_props$disableCloseOn = props.disableCloseOnSelect,
|
47047 |
+
disableCloseOnSelect = _props$disableCloseOn === void 0 ? false : _props$disableCloseOn,
|
47048 |
+
_props$disabled = props.disabled,
|
47049 |
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
47050 |
+
_props$disabledItemsF = props.disabledItemsFocusable,
|
47051 |
+
disabledItemsFocusable = _props$disabledItemsF === void 0 ? false : _props$disabledItemsF,
|
47052 |
+
_props$disableListWra = props.disableListWrap,
|
47053 |
+
disableListWrap = _props$disableListWra === void 0 ? false : _props$disableListWra,
|
47054 |
+
_props$disablePortal = props.disablePortal,
|
47055 |
+
disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,
|
47056 |
+
filterOptions = props.filterOptions,
|
47057 |
+
_props$filterSelected = props.filterSelectedOptions,
|
47058 |
+
filterSelectedOptions = _props$filterSelected === void 0 ? false : _props$filterSelected,
|
47059 |
+
_props$forcePopupIcon = props.forcePopupIcon,
|
47060 |
+
forcePopupIcon = _props$forcePopupIcon === void 0 ? 'auto' : _props$forcePopupIcon,
|
47061 |
+
_props$freeSolo = props.freeSolo,
|
47062 |
+
freeSolo = _props$freeSolo === void 0 ? false : _props$freeSolo,
|
47063 |
+
_props$fullWidth = props.fullWidth,
|
47064 |
+
fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,
|
47065 |
+
_props$getLimitTagsTe = props.getLimitTagsText,
|
47066 |
+
getLimitTagsText = _props$getLimitTagsTe === void 0 ? function (more) {
|
47067 |
+
return "+".concat(more);
|
47068 |
+
} : _props$getLimitTagsTe,
|
47069 |
+
getOptionDisabled = props.getOptionDisabled,
|
47070 |
+
_props$getOptionLabel = props.getOptionLabel,
|
47071 |
+
getOptionLabel = _props$getOptionLabel === void 0 ? function (x) {
|
47072 |
+
return x;
|
47073 |
+
} : _props$getOptionLabel,
|
47074 |
+
getOptionSelected = props.getOptionSelected,
|
47075 |
+
groupBy = props.groupBy,
|
47076 |
+
_props$handleHomeEndK = props.handleHomeEndKeys,
|
47077 |
+
handleHomeEndKeys = _props$handleHomeEndK === void 0 ? !props.freeSolo : _props$handleHomeEndK,
|
47078 |
+
idProp = props.id,
|
47079 |
+
_props$includeInputIn = props.includeInputInList,
|
47080 |
+
includeInputInList = _props$includeInputIn === void 0 ? false : _props$includeInputIn,
|
47081 |
+
inputValueProp = props.inputValue,
|
47082 |
+
_props$limitTags = props.limitTags,
|
47083 |
+
limitTags = _props$limitTags === void 0 ? -1 : _props$limitTags,
|
47084 |
+
_props$ListboxCompone = props.ListboxComponent,
|
47085 |
+
ListboxComponent = _props$ListboxCompone === void 0 ? 'ul' : _props$ListboxCompone,
|
47086 |
+
ListboxProps = props.ListboxProps,
|
47087 |
+
_props$loading = props.loading,
|
47088 |
+
loading = _props$loading === void 0 ? false : _props$loading,
|
47089 |
+
_props$loadingText = props.loadingText,
|
47090 |
+
loadingText = _props$loadingText === void 0 ? 'Loading…' : _props$loadingText,
|
47091 |
+
_props$multiple = props.multiple,
|
47092 |
+
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
47093 |
+
_props$noOptionsText = props.noOptionsText,
|
47094 |
+
noOptionsText = _props$noOptionsText === void 0 ? 'No options' : _props$noOptionsText,
|
47095 |
+
onChange = props.onChange,
|
47096 |
+
onClose = props.onClose,
|
47097 |
+
onHighlightChange = props.onHighlightChange,
|
47098 |
+
onInputChange = props.onInputChange,
|
47099 |
+
onOpen = props.onOpen,
|
47100 |
+
open = props.open,
|
47101 |
+
_props$openOnFocus = props.openOnFocus,
|
47102 |
+
openOnFocus = _props$openOnFocus === void 0 ? false : _props$openOnFocus,
|
47103 |
+
_props$openText = props.openText,
|
47104 |
+
openText = _props$openText === void 0 ? 'Open' : _props$openText,
|
47105 |
+
options = props.options,
|
47106 |
+
_props$PaperComponent = props.PaperComponent,
|
47107 |
+
PaperComponent = _props$PaperComponent === void 0 ? Paper_Paper : _props$PaperComponent,
|
47108 |
+
_props$PopperComponen = props.PopperComponent,
|
47109 |
+
PopperComponentProp = _props$PopperComponen === void 0 ? esm_Popper_Popper : _props$PopperComponen,
|
47110 |
+
_props$popupIcon = props.popupIcon,
|
47111 |
+
popupIcon = _props$popupIcon === void 0 ? Autocomplete_ref2 : _props$popupIcon,
|
47112 |
+
renderGroupProp = props.renderGroup,
|
47113 |
+
renderInput = props.renderInput,
|
47114 |
+
renderOptionProp = props.renderOption,
|
47115 |
+
renderTags = props.renderTags,
|
47116 |
+
_props$selectOnFocus = props.selectOnFocus,
|
47117 |
+
selectOnFocus = _props$selectOnFocus === void 0 ? !props.freeSolo : _props$selectOnFocus,
|
47118 |
+
_props$size = props.size,
|
47119 |
+
size = _props$size === void 0 ? 'medium' : _props$size,
|
47120 |
+
valueProp = props.value,
|
47121 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "classes", "className", "clearOnBlur", "clearOnEscape", "clearText", "closeIcon", "closeText", "debug", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "getOptionSelected", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "value"]);
|
47122 |
+
/* eslint-enable no-unused-vars */
|
47123 |
|
|
|
47124 |
|
47125 |
+
var PopperComponent = disablePortal ? DisablePortal : PopperComponentProp;
|
|
|
47126 |
|
47127 |
+
var _useAutocomplete = useAutocomplete((0,esm_extends/* default */.Z)({}, props, {
|
47128 |
+
componentName: 'Autocomplete'
|
47129 |
+
})),
|
47130 |
+
getRootProps = _useAutocomplete.getRootProps,
|
47131 |
+
getInputProps = _useAutocomplete.getInputProps,
|
47132 |
+
getInputLabelProps = _useAutocomplete.getInputLabelProps,
|
47133 |
+
getPopupIndicatorProps = _useAutocomplete.getPopupIndicatorProps,
|
47134 |
+
getClearProps = _useAutocomplete.getClearProps,
|
47135 |
+
getTagProps = _useAutocomplete.getTagProps,
|
47136 |
+
getListboxProps = _useAutocomplete.getListboxProps,
|
47137 |
+
getOptionProps = _useAutocomplete.getOptionProps,
|
47138 |
+
value = _useAutocomplete.value,
|
47139 |
+
dirty = _useAutocomplete.dirty,
|
47140 |
+
id = _useAutocomplete.id,
|
47141 |
+
popupOpen = _useAutocomplete.popupOpen,
|
47142 |
+
focused = _useAutocomplete.focused,
|
47143 |
+
focusedTag = _useAutocomplete.focusedTag,
|
47144 |
+
anchorEl = _useAutocomplete.anchorEl,
|
47145 |
+
setAnchorEl = _useAutocomplete.setAnchorEl,
|
47146 |
+
inputValue = _useAutocomplete.inputValue,
|
47147 |
+
groupedOptions = _useAutocomplete.groupedOptions;
|
47148 |
|
47149 |
+
var startAdornment;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47150 |
|
47151 |
+
if (multiple && value.length > 0) {
|
47152 |
+
var getCustomizedTagProps = function getCustomizedTagProps(params) {
|
47153 |
+
return (0,esm_extends/* default */.Z)({
|
47154 |
+
className: (0,clsx_m/* default */.Z)(classes.tag, size === 'small' && classes.tagSizeSmall),
|
47155 |
+
disabled: disabled
|
47156 |
+
}, getTagProps(params));
|
47157 |
+
};
|
|
|
|
|
|
|
47158 |
|
47159 |
+
if (renderTags) {
|
47160 |
+
startAdornment = renderTags(value, getCustomizedTagProps);
|
47161 |
+
} else {
|
47162 |
+
startAdornment = value.map(function (option, index) {
|
47163 |
+
return /*#__PURE__*/react.createElement(Chip_Chip, (0,esm_extends/* default */.Z)({
|
47164 |
+
label: getOptionLabel(option),
|
47165 |
+
size: size
|
47166 |
+
}, getCustomizedTagProps({
|
47167 |
+
index: index
|
47168 |
+
}), ChipProps));
|
47169 |
+
});
|
47170 |
}
|
47171 |
}
|
|
|
|
|
47172 |
|
47173 |
+
if (limitTags > -1 && Array.isArray(startAdornment)) {
|
47174 |
+
var more = startAdornment.length - limitTags;
|
|
|
|
|
|
|
|
|
|
|
47175 |
|
47176 |
+
if (!focused && more > 0) {
|
47177 |
+
startAdornment = startAdornment.splice(0, limitTags);
|
47178 |
+
startAdornment.push( /*#__PURE__*/react.createElement("span", {
|
47179 |
+
className: classes.tag,
|
47180 |
+
key: startAdornment.length
|
47181 |
+
}, getLimitTagsText(more)));
|
47182 |
+
}
|
|
|
|
|
|
|
47183 |
}
|
47184 |
|
47185 |
+
var defaultRenderGroup = function defaultRenderGroup(params) {
|
47186 |
+
return /*#__PURE__*/react.createElement("li", {
|
47187 |
+
key: params.key
|
47188 |
+
}, /*#__PURE__*/react.createElement(ListSubheader_ListSubheader, {
|
47189 |
+
className: classes.groupLabel,
|
47190 |
+
component: "div"
|
47191 |
+
}, params.group), /*#__PURE__*/react.createElement("ul", {
|
47192 |
+
className: classes.groupUl
|
47193 |
+
}, params.children));
|
47194 |
+
};
|
47195 |
|
47196 |
+
var renderGroup = renderGroupProp || defaultRenderGroup;
|
47197 |
+
var renderOption = renderOptionProp || getOptionLabel;
|
|
|
|
|
|
|
|
|
|
|
47198 |
|
47199 |
+
var renderListOption = function renderListOption(option, index) {
|
47200 |
+
var optionProps = getOptionProps({
|
47201 |
+
option: option,
|
47202 |
+
index: index
|
47203 |
+
});
|
47204 |
+
return /*#__PURE__*/react.createElement("li", (0,esm_extends/* default */.Z)({}, optionProps, {
|
47205 |
+
className: classes.option
|
47206 |
+
}), renderOption(option, {
|
47207 |
+
selected: optionProps['aria-selected'],
|
47208 |
+
inputValue: inputValue
|
47209 |
+
}));
|
47210 |
+
};
|
47211 |
|
47212 |
+
var hasClearIcon = !disableClearable && !disabled;
|
47213 |
+
var hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
|
47214 |
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({
|
47215 |
+
ref: ref,
|
47216 |
+
className: (0,clsx_m/* default */.Z)(classes.root, className, focused && classes.focused, fullWidth && classes.fullWidth, hasClearIcon && classes.hasClearIcon, hasPopupIcon && classes.hasPopupIcon)
|
47217 |
+
}, getRootProps(other)), renderInput({
|
47218 |
+
id: id,
|
47219 |
+
disabled: disabled,
|
47220 |
+
fullWidth: true,
|
47221 |
+
size: size === 'small' ? 'small' : undefined,
|
47222 |
+
InputLabelProps: getInputLabelProps(),
|
47223 |
+
InputProps: {
|
47224 |
+
ref: setAnchorEl,
|
47225 |
+
className: classes.inputRoot,
|
47226 |
+
startAdornment: startAdornment,
|
47227 |
+
endAdornment: /*#__PURE__*/react.createElement("div", {
|
47228 |
+
className: classes.endAdornment
|
47229 |
+
}, hasClearIcon ? /*#__PURE__*/react.createElement(IconButton_IconButton, (0,esm_extends/* default */.Z)({}, getClearProps(), {
|
47230 |
+
"aria-label": clearText,
|
47231 |
+
title: clearText,
|
47232 |
+
className: (0,clsx_m/* default */.Z)(classes.clearIndicator, dirty && classes.clearIndicatorDirty)
|
47233 |
+
}), closeIcon) : null, hasPopupIcon ? /*#__PURE__*/react.createElement(IconButton_IconButton, (0,esm_extends/* default */.Z)({}, getPopupIndicatorProps(), {
|
47234 |
+
disabled: disabled,
|
47235 |
+
"aria-label": popupOpen ? closeText : openText,
|
47236 |
+
title: popupOpen ? closeText : openText,
|
47237 |
+
className: (0,clsx_m/* default */.Z)(classes.popupIndicator, popupOpen && classes.popupIndicatorOpen)
|
47238 |
+
}), popupIcon) : null)
|
47239 |
+
},
|
47240 |
+
inputProps: (0,esm_extends/* default */.Z)({
|
47241 |
+
className: (0,clsx_m/* default */.Z)(classes.input, focusedTag === -1 && classes.inputFocused),
|
47242 |
+
disabled: disabled
|
47243 |
+
}, getInputProps())
|
47244 |
+
})), popupOpen && anchorEl ? /*#__PURE__*/react.createElement(PopperComponent, {
|
47245 |
+
className: (0,clsx_m/* default */.Z)(classes.popper, disablePortal && classes.popperDisablePortal),
|
47246 |
+
style: {
|
47247 |
+
width: anchorEl ? anchorEl.clientWidth : null
|
47248 |
+
},
|
47249 |
+
role: "presentation",
|
47250 |
+
anchorEl: anchorEl,
|
47251 |
+
open: true
|
47252 |
+
}, /*#__PURE__*/react.createElement(PaperComponent, {
|
47253 |
+
className: classes.paper
|
47254 |
+
}, loading && groupedOptions.length === 0 ? /*#__PURE__*/react.createElement("div", {
|
47255 |
+
className: classes.loading
|
47256 |
+
}, loadingText) : null, groupedOptions.length === 0 && !freeSolo && !loading ? /*#__PURE__*/react.createElement("div", {
|
47257 |
+
className: classes.noOptions
|
47258 |
+
}, noOptionsText) : null, groupedOptions.length > 0 ? /*#__PURE__*/react.createElement(ListboxComponent, (0,esm_extends/* default */.Z)({
|
47259 |
+
className: classes.listbox
|
47260 |
+
}, getListboxProps(), ListboxProps), groupedOptions.map(function (option, index) {
|
47261 |
+
if (groupBy) {
|
47262 |
+
return renderGroup({
|
47263 |
+
key: option.key,
|
47264 |
+
group: option.group,
|
47265 |
+
children: option.options.map(function (option2, index2) {
|
47266 |
+
return renderListOption(option2, option.index + index2);
|
47267 |
+
})
|
47268 |
+
});
|
47269 |
+
}
|
47270 |
|
47271 |
+
return renderListOption(option, index);
|
47272 |
+
})) : null)) : null);
|
47273 |
+
});
|
47274 |
+
false ? 0 : void 0;
|
47275 |
+
/* harmony default export */ var Autocomplete_Autocomplete = ((0,withStyles/* default */.Z)(Autocomplete_styles, {
|
47276 |
+
name: 'MuiAutocomplete'
|
47277 |
+
})(Autocomplete));
|
47278 |
+
// EXTERNAL MODULE: ./node_modules/lodash/find.js
|
47279 |
+
var lodash_find = __webpack_require__(13311);
|
47280 |
+
var find_default = /*#__PURE__*/__webpack_require__.n(lodash_find);
|
47281 |
+
// EXTERNAL MODULE: ./node_modules/lodash/map.js
|
47282 |
+
var map = __webpack_require__(35161);
|
47283 |
+
var map_default = /*#__PURE__*/__webpack_require__.n(map);
|
47284 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Dialogs/TemplatesDialog/FilterTemplateOptions.js
|
47285 |
+
function FilterTemplateOptions_extends() { FilterTemplateOptions_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return FilterTemplateOptions_extends.apply(this, arguments); }
|
47286 |
|
47287 |
+
function FilterTemplateOptions_slicedToArray(arr, i) { return FilterTemplateOptions_arrayWithHoles(arr) || FilterTemplateOptions_iterableToArrayLimit(arr, i) || FilterTemplateOptions_unsupportedIterableToArray(arr, i) || FilterTemplateOptions_nonIterableRest(); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47288 |
|
47289 |
+
function FilterTemplateOptions_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
|
|
|
|
|
|
|
47290 |
|
47291 |
+
function FilterTemplateOptions_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return FilterTemplateOptions_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return FilterTemplateOptions_arrayLikeToArray(o, minLen); }
|
|
|
47292 |
|
47293 |
+
function FilterTemplateOptions_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47294 |
|
47295 |
+
function FilterTemplateOptions_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47296 |
|
47297 |
+
function FilterTemplateOptions_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
|
|
47298 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47300 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47302 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47304 |
|
|
|
|
|
|
|
47305 |
|
|
|
|
|
|
|
|
|
47306 |
|
47307 |
+
var FilterTemplateOptions = function FilterTemplateOptions(_ref) {
|
47308 |
+
var _ref$filterOptions = _ref.filterOptions,
|
47309 |
+
filterOptions = _ref$filterOptions === void 0 ? [] : _ref$filterOptions,
|
47310 |
+
setFilterOptions = _ref.setFilterOptions,
|
47311 |
+
filterList = _ref.filterList,
|
47312 |
+
label = _ref.label,
|
47313 |
+
setReturnedTemplates = _ref.setReturnedTemplates,
|
47314 |
+
button = _ref.button;
|
47315 |
|
47316 |
+
var _useState = (0,react.useState)([]),
|
47317 |
+
_useState2 = FilterTemplateOptions_slicedToArray(_useState, 2),
|
47318 |
+
importFilteredList = _useState2[0],
|
47319 |
+
setImportFilteredList = _useState2[1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47320 |
|
47321 |
+
var _useState3 = (0,react.useState)(true),
|
47322 |
+
_useState4 = FilterTemplateOptions_slicedToArray(_useState3, 2),
|
47323 |
+
isLoading = _useState4[0],
|
47324 |
+
setIsLoading = _useState4[1];
|
47325 |
|
47326 |
+
var _useState5 = (0,react.useState)(""),
|
47327 |
+
_useState6 = FilterTemplateOptions_slicedToArray(_useState5, 2),
|
47328 |
+
currentText = _useState6[0],
|
47329 |
+
setCurrentText = _useState6[1];
|
47330 |
|
47331 |
+
(0,react.useEffect)(function () {
|
47332 |
+
importTemplates().then(function (result) {
|
47333 |
+
setImportFilteredList(result);
|
47334 |
+
setIsLoading(false);
|
47335 |
+
})["catch"](function (err) {
|
47336 |
+
console.error(err);
|
47337 |
+
});
|
47338 |
+
}, []);
|
47339 |
+
return /*#__PURE__*/react.createElement(Autocomplete_Autocomplete, {
|
47340 |
+
"data-testid": "templates:filter-dropdown",
|
47341 |
+
multiple: true,
|
47342 |
+
disableCloseOnSelect: true,
|
47343 |
+
openOnFocus: true,
|
47344 |
+
filterSelectedOptions: true,
|
47345 |
+
style: {
|
47346 |
+
marginLeft: 20,
|
47347 |
+
width: "100%"
|
47348 |
+
},
|
47349 |
+
options: isLoading ? [] : button ? filterList.filter(function (action) {
|
47350 |
+
return importFilteredList.find(function (template) {
|
47351 |
+
return action.value === template.type;
|
47352 |
+
});
|
47353 |
+
}) : filterList,
|
47354 |
+
value: filterOptions.map(function (item) {
|
47355 |
+
return find_default()(filterList, function (obj) {
|
47356 |
+
return obj.value === item;
|
47357 |
+
});
|
47358 |
+
}),
|
47359 |
+
onChange: function onChange(event, newValue) {
|
47360 |
+
setFilterOptions(map_default()(newValue, "value"));
|
47361 |
+
setCurrentText("");
|
47362 |
+
newValue.length ? setReturnedTemplates(true) : setReturnedTemplates(false);
|
47363 |
+
},
|
47364 |
+
getOptionLabel: function getOptionLabel(option) {
|
47365 |
+
return option.isPro && !app.hasPremium() ? "".concat(option.label, " (PRO)") : option.label || "";
|
47366 |
+
},
|
47367 |
+
getOptionDisabled: function getOptionDisabled(option) {
|
47368 |
+
return option.isPro && !app.hasPremium();
|
47369 |
+
},
|
47370 |
+
getOptionSelected: function getOptionSelected(option, value) {
|
47371 |
+
return option.value === value.value;
|
47372 |
+
},
|
47373 |
+
groupBy: function groupBy(option) {
|
47374 |
+
return button ? translate("settings.button_action.actions.group_".concat(option.group)) : null;
|
47375 |
+
},
|
47376 |
+
noOptionsText: translate("utils.search_not_found") + " " + currentText,
|
47377 |
+
inputValue: currentText,
|
47378 |
+
popupIcon: /*#__PURE__*/react.createElement("i", {
|
47379 |
+
className: "fas fa-caret-down",
|
47380 |
+
style: {
|
47381 |
+
fontSize: "0.8em"
|
47382 |
+
},
|
47383 |
+
"data-testid": "filter-dropdown-icon"
|
47384 |
+
}),
|
47385 |
+
renderInput: function renderInput(params) {
|
47386 |
+
return /*#__PURE__*/react.createElement(TextField_TextField, FilterTemplateOptions_extends({}, params, {
|
47387 |
+
onChange: function onChange(e) {
|
47388 |
+
setCurrentText(e.target.value);
|
47389 |
+
},
|
47390 |
+
label: label,
|
47391 |
+
variant: "outlined",
|
47392 |
+
"data-testid": "filter-dropdown-input"
|
47393 |
+
}));
|
47394 |
+
},
|
47395 |
+
renderTags: function renderTags(value, getTagProps) {
|
47396 |
+
return value.map(function (option, index) {
|
47397 |
+
return /*#__PURE__*/react.createElement(Chip_Chip, FilterTemplateOptions_extends({
|
47398 |
+
label: option.label,
|
47399 |
+
size: "small"
|
47400 |
+
}, getTagProps({
|
47401 |
+
index: index
|
47402 |
+
})));
|
47403 |
+
});
|
47404 |
+
},
|
47405 |
+
loadingText: translate("loading.loading"),
|
47406 |
+
loading: isLoading
|
47407 |
+
});
|
47408 |
+
};
|
47409 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Dialogs/TemplatesDialog/TemplatesDialog.js
|
47410 |
+
function TemplatesDialog_slicedToArray(arr, i) { return TemplatesDialog_arrayWithHoles(arr) || TemplatesDialog_iterableToArrayLimit(arr, i) || TemplatesDialog_unsupportedIterableToArray(arr, i) || TemplatesDialog_nonIterableRest(); }
|
47411 |
|
47412 |
+
function TemplatesDialog_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
|
47413 |
|
47414 |
+
function TemplatesDialog_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return TemplatesDialog_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return TemplatesDialog_arrayLikeToArray(o, minLen); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47415 |
|
47416 |
+
function TemplatesDialog_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
|
|
|
47417 |
|
47418 |
+
function TemplatesDialog_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
47419 |
|
47420 |
+
function TemplatesDialog_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
|
|
47421 |
|
|
|
|
|
47422 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47423 |
|
|
|
47424 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47425 |
|
|
|
47426 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47427 |
|
|
|
|
|
47428 |
|
|
|
|
|
|
|
|
|
47429 |
|
47430 |
+
function TemplatesDialog(_ref) {
|
47431 |
+
var open = _ref.open,
|
47432 |
+
onClose = _ref.onClose,
|
47433 |
+
_ref$showButtons = _ref.showButtons,
|
47434 |
+
showButtons = _ref$showButtons === void 0 ? false : _ref$showButtons,
|
47435 |
+
index = _ref.index,
|
47436 |
+
currentGroup = _ref.currentGroup;
|
47437 |
|
47438 |
+
var _useState = (0,react.useState)([]),
|
47439 |
+
_useState2 = TemplatesDialog_slicedToArray(_useState, 2),
|
47440 |
+
filterPopularAction = _useState2[0],
|
47441 |
+
setFilterPopularAction = _useState2[1];
|
47442 |
|
47443 |
+
var _useState3 = (0,react.useState)([]),
|
47444 |
+
_useState4 = TemplatesDialog_slicedToArray(_useState3, 2),
|
47445 |
+
filterFrameDesign = _useState4[0],
|
47446 |
+
setFilterFrameDesign = _useState4[1];
|
47447 |
|
47448 |
+
var _useState5 = (0,react.useState)(showButtons ? "button" : "group"),
|
47449 |
+
_useState6 = TemplatesDialog_slicedToArray(_useState5, 2),
|
47450 |
+
filterButtons = _useState6[0],
|
47451 |
+
setFilterButtons = _useState6[1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47452 |
|
47453 |
+
var _useState7 = (0,react.useState)(false),
|
47454 |
+
_useState8 = TemplatesDialog_slicedToArray(_useState7, 2),
|
47455 |
+
returnedTemplates = _useState8[0],
|
47456 |
+
setReturnedTemplates = _useState8[1];
|
47457 |
|
47458 |
+
var handleCloseDialog = function handleCloseDialog() {
|
47459 |
+
onClose();
|
47460 |
+
setFilterButtons(showButtons ? "button" : "group");
|
47461 |
+
setReturnedTemplates(false);
|
47462 |
+
setFilterPopularAction([]);
|
47463 |
+
setFilterFrameDesign([]);
|
47464 |
+
};
|
47465 |
|
47466 |
+
var frameDesignList = [{
|
47467 |
+
label: "Social media",
|
47468 |
+
value: "social-media"
|
47469 |
+
}, {
|
47470 |
+
label: "Business",
|
47471 |
+
value: "business"
|
47472 |
+
}, {
|
47473 |
+
label: "Contact",
|
47474 |
+
value: "contact"
|
47475 |
+
}, {
|
47476 |
+
label: "Actions",
|
47477 |
+
value: "actions"
|
47478 |
+
}, {
|
47479 |
+
label: "Social sharing",
|
47480 |
+
value: "social-sharing"
|
47481 |
+
}];
|
47482 |
+
return /*#__PURE__*/react.createElement(Dialog_Dialog, {
|
47483 |
+
open: open,
|
47484 |
+
onClose: function onClose() {
|
47485 |
+
handleCloseDialog();
|
47486 |
+
},
|
47487 |
+
maxWidth: "md",
|
47488 |
+
fullWidth: true,
|
47489 |
+
className: "templates-dialog",
|
47490 |
+
"data-testid": "dialog:templates-dialog",
|
47491 |
+
scroll: "paper"
|
47492 |
+
}, /*#__PURE__*/react.createElement("div", {
|
47493 |
+
className: "header"
|
47494 |
+
}, /*#__PURE__*/react.createElement("div", {
|
47495 |
+
className: "titles"
|
47496 |
+
}, /*#__PURE__*/react.createElement(DialogTitle_DialogTitle, {
|
47497 |
+
className: "title"
|
47498 |
+
}, filterButtons === "button" ? translate("utils.new_button") : translate("utils.new_group")), /*#__PURE__*/react.createElement("h3", {
|
47499 |
+
className: "subtitle"
|
47500 |
+
}, translate("templates.all_templates_description"))), /*#__PURE__*/react.createElement(IconButton_IconButton, {
|
47501 |
+
onClick: function onClick() {
|
47502 |
+
handleCloseDialog();
|
47503 |
+
},
|
47504 |
+
className: "close-button",
|
47505 |
+
"data-testid": "templates-dialog:close-button"
|
47506 |
+
}, /*#__PURE__*/react.createElement(Icon_Icon, {
|
47507 |
+
fontSize: "inherit",
|
47508 |
+
className: "fas fa-times"
|
47509 |
+
}))), /*#__PURE__*/react.createElement("div", {
|
47510 |
+
className: "container-filter-buttons"
|
47511 |
+
}, /*#__PURE__*/react.createElement(DialogContent_DialogContent, {
|
47512 |
+
dividers: true,
|
47513 |
+
className: "midsection"
|
47514 |
+
}, /*#__PURE__*/react.createElement("div", {
|
47515 |
+
className: "button-group"
|
47516 |
+
}, /*#__PURE__*/react.createElement("div", {
|
47517 |
+
className: "buttons-title"
|
47518 |
+
}, translate("templates.number_of_buttons")), /*#__PURE__*/react.createElement("div", {
|
47519 |
+
className: "buttons"
|
47520 |
+
}, /*#__PURE__*/react.createElement("div", {
|
47521 |
+
className: "buttons-numbers"
|
47522 |
+
}, /*#__PURE__*/react.createElement(Button_Button, {
|
47523 |
+
onClick: function onClick() {
|
47524 |
+
setFilterButtons("button");
|
47525 |
+
setFilterPopularAction([]);
|
47526 |
+
setReturnedTemplates(false);
|
47527 |
+
},
|
47528 |
+
className: ("button", filterButtons === "button" ? "current" : null),
|
47529 |
+
variant: "outlined",
|
47530 |
+
style: {
|
47531 |
+
borderRadius: "20px",
|
47532 |
+
marginRight: "10px"
|
47533 |
+
},
|
47534 |
+
"data-testid": "templates:filter-buttons-button"
|
47535 |
+
}, "1"), /*#__PURE__*/react.createElement(Button_Button, {
|
47536 |
+
disabled: showButtons,
|
47537 |
+
onClick: function onClick() {
|
47538 |
+
setFilterButtons("group");
|
47539 |
+
setFilterFrameDesign([]);
|
47540 |
+
setReturnedTemplates(false);
|
47541 |
+
},
|
47542 |
+
className: ("button", filterButtons === "group" ? "current" : null),
|
47543 |
+
variant: "outlined",
|
47544 |
+
style: {
|
47545 |
+
borderRadius: "20px"
|
47546 |
+
},
|
47547 |
+
"data-testid": "templates:filter-buttons-group"
|
47548 |
+
}, "2 +")))), filterButtons === "group" && /*#__PURE__*/react.createElement(FilterTemplateOptions, {
|
47549 |
+
filterOptions: filterFrameDesign,
|
47550 |
+
setFilterOptions: setFilterFrameDesign,
|
47551 |
+
filterList: frameDesignList,
|
47552 |
+
label: translate("templates.framedesign.label"),
|
47553 |
+
setReturnedTemplates: setReturnedTemplates
|
47554 |
+
}), filterButtons === "button" && /*#__PURE__*/react.createElement(FilterTemplateOptions, {
|
47555 |
+
filterOptions: filterPopularAction,
|
47556 |
+
setFilterOptions: setFilterPopularAction,
|
47557 |
+
filterList: ButtonActionOptions,
|
47558 |
+
label: translate("templates.popular_actions.label"),
|
47559 |
+
setReturnedTemplates: setReturnedTemplates,
|
47560 |
+
button: true
|
47561 |
+
}))), /*#__PURE__*/react.createElement(TemplateOptions, {
|
47562 |
+
onClose: handleCloseDialog,
|
47563 |
+
index: index,
|
47564 |
+
currentGroup: currentGroup,
|
47565 |
+
returnedTemplates: returnedTemplates,
|
47566 |
+
filterButtons: filterButtons,
|
47567 |
+
filterFrameDesign: filterFrameDesign,
|
47568 |
+
filterPopularAction: filterPopularAction
|
47569 |
+
}));
|
47570 |
}
|
47571 |
|
47572 |
+
/* harmony default export */ var TemplatesDialog_TemplatesDialog = (TemplatesDialog);
|
47573 |
+
// EXTERNAL MODULE: ./node_modules/@seznam/compose-react-refs/composeRefs.js
|
47574 |
+
var composeRefs = __webpack_require__(99601);
|
47575 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Containers/ButtonGroupContainer/ButtonGroupContainer.js
|
47576 |
+
function ButtonGroupContainer_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = ButtonGroupContainer_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47577 |
|
47578 |
+
function ButtonGroupContainer_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
|
|
|
|
|
|
|
|
|
|
|
47579 |
|
47580 |
+
function ButtonGroupContainer_extends() { ButtonGroupContainer_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonGroupContainer_extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47581 |
|
47582 |
+
function ButtonGroupContainer_slicedToArray(arr, i) { return ButtonGroupContainer_arrayWithHoles(arr) || ButtonGroupContainer_iterableToArrayLimit(arr, i) || ButtonGroupContainer_unsupportedIterableToArray(arr, i) || ButtonGroupContainer_nonIterableRest(); }
|
|
|
|
|
|
|
47583 |
|
47584 |
+
function ButtonGroupContainer_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
47585 |
|
47586 |
+
function ButtonGroupContainer_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ButtonGroupContainer_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ButtonGroupContainer_arrayLikeToArray(o, minLen); }
|
|
|
|
|
47587 |
|
47588 |
+
function ButtonGroupContainer_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47589 |
|
47590 |
+
function ButtonGroupContainer_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
|
|
|
47591 |
|
47592 |
+
function ButtonGroupContainer_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
47593 |
|
47594 |
+
function ButtonGroupContainer_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
|
|
|
|
|
|
|
|
|
47595 |
|
47596 |
+
function ButtonGroupContainer_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ButtonGroupContainer_ownKeys(Object(source), true).forEach(function (key) { ButtonGroupContainer_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ButtonGroupContainer_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
|
|
|
|
|
47597 |
|
47598 |
+
function ButtonGroupContainer_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47599 |
|
|
|
|
|
47600 |
|
|
|
|
|
|
|
|
|
|
|
|
|
47601 |
|
|
|
|
|
47602 |
|
|
|
|
|
47603 |
|
|
|
|
|
47604 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47605 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47606 |
|
|
|
|
|
47607 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47608 |
|
|
|
|
|
|
|
|
|
47609 |
|
|
|
|
|
|
|
|
|
|
|
47610 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47611 |
|
|
|
|
|
|
|
|
|
47612 |
|
|
|
47613 |
|
|
|
|
|
|
|
47614 |
|
|
|
47615 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47616 |
|
|
|
|
|
|
|
|
|
47617 |
|
|
|
|
|
47618 |
|
|
|
|
|
47619 |
|
|
|
|
|
|
|
47620 |
|
|
|
|
|
|
|
|
|
47621 |
|
|
|
47622 |
|
|
|
|
|
47623 |
|
|
|
|
|
47624 |
|
47625 |
+
function ButtonGroupContainer_getStyle(style, snapshot) {
|
47626 |
+
if (!snapshot.isDropAnimating) {
|
47627 |
+
return style;
|
47628 |
+
} // patching the existing style
|
47629 |
|
|
|
47630 |
|
47631 |
+
return ButtonGroupContainer_objectSpread(ButtonGroupContainer_objectSpread({}, style), {}, {
|
47632 |
+
opacity: "0.5"
|
47633 |
+
});
|
47634 |
+
}
|
47635 |
|
47636 |
+
function ButtonGroupContainer(_ref) {
|
47637 |
+
var groupId = _ref.groupId,
|
47638 |
+
groups = _ref.groups,
|
47639 |
+
set = _ref.set,
|
47640 |
+
provided = _ref.provided,
|
47641 |
+
currentDrop = _ref.currentDrop,
|
47642 |
+
getButtonsCount = _ref.getButtonsCount,
|
47643 |
+
getGroupCount = _ref.getGroupCount,
|
47644 |
+
removeGroup = _ref.removeGroup,
|
47645 |
+
duplicateGroup = _ref.duplicateGroup,
|
47646 |
+
isNewGroup = _ref.isNewGroup;
|
47647 |
|
47648 |
+
var _useState = (0,react.useState)(getCookie("buttonizer_bar_state_opened") ? dlv_umd_default()(JSON.parse(getCookie("buttonizer_bar_state_opened")), groupId, false) : false),
|
47649 |
+
_useState2 = ButtonGroupContainer_slicedToArray(_useState, 2),
|
47650 |
+
opened = _useState2[0],
|
47651 |
+
setOpened = _useState2[1];
|
47652 |
|
47653 |
+
var _useState3 = (0,react.useState)(false),
|
47654 |
+
_useState4 = ButtonGroupContainer_slicedToArray(_useState3, 2),
|
47655 |
+
newButtonDialogOpened = _useState4[0],
|
47656 |
+
setNewButtonDialogOpened = _useState4[1];
|
47657 |
|
47658 |
+
var _useState5 = (0,react.useState)(groups[groupId]),
|
47659 |
+
_useState6 = ButtonGroupContainer_slicedToArray(_useState5, 2),
|
47660 |
+
group = _useState6[0],
|
47661 |
+
setGroup = _useState6[1];
|
47662 |
|
47663 |
+
var buttonGroupContainer = (0,react.useRef)(null);
|
47664 |
+
var openCollapsibleGroup = useSelector(function (store) {
|
47665 |
+
return dlv_umd_default()(store, "misc.open_collapsible_group", "button_group_container");
|
47666 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47667 |
|
47668 |
+
var handleOpenState = function handleOpenState() {
|
47669 |
+
var currentCookie = getCookie("buttonizer_bar_state_opened") ? JSON.parse(getCookie("buttonizer_bar_state_opened")) : {};
|
47670 |
+
currentCookie[groupId] = !opened;
|
47671 |
+
setOpened(!opened);
|
47672 |
+
setCookie("buttonizer_bar_state_opened", JSON.stringify(currentCookie));
|
47673 |
+
};
|
47674 |
|
47675 |
+
if (typeof group === "undefined") {
|
47676 |
+
withScope(function (scope) {
|
47677 |
+
scope.setExtra({
|
47678 |
+
groups: groups,
|
47679 |
+
groupId: groupId,
|
47680 |
+
group: group
|
47681 |
+
});
|
47682 |
+
captureException(new Error("group is undefined. Send groups and groupId data"));
|
47683 |
+
});
|
47684 |
}
|
47685 |
|
47686 |
+
(0,react.useEffect)(function () {
|
47687 |
+
if (openCollapsibleGroup === "button_group_container") {
|
47688 |
+
setOpened(true);
|
47689 |
+
} else {
|
47690 |
+
setOpened(false);
|
47691 |
+
}
|
47692 |
+
}, [openCollapsibleGroup]);
|
47693 |
+
(0,react.useEffect)(function () {
|
47694 |
+
setGroup(groups[groupId]);
|
47695 |
+
}, [groups[groupId]]);
|
47696 |
+
(0,react.useEffect)(function () {
|
47697 |
+
if (isNewGroup) {
|
47698 |
+
if (buttonGroupContainer && buttonGroupContainer.current) buttonGroupContainer.current.scrollIntoView({
|
47699 |
+
behavior: "smooth"
|
47700 |
+
});
|
47701 |
+
}
|
47702 |
+
}, [isNewGroup]);
|
47703 |
+
|
47704 |
+
var duplicateButton = function duplicateButton() {
|
47705 |
+
/* webpack-strip-block:removed */
|
47706 |
+
return /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
47707 |
+
content: translate("premium.warning_duplicate"),
|
47708 |
+
trigger: "click"
|
47709 |
+
}, /*#__PURE__*/react.createElement("span", {
|
47710 |
+
tabIndex: 0
|
47711 |
+
}, /*#__PURE__*/react.createElement(DuplicateButton, {
|
47712 |
+
name: group.name,
|
47713 |
+
disabled: true
|
47714 |
+
})));
|
47715 |
+
};
|
47716 |
+
|
47717 |
+
return /*#__PURE__*/react.createElement("div", {
|
47718 |
+
className: (0,clsx_m/* default */.Z)("button-group-container mdc-card", opened && "opened", isNewGroup && "new-group", currentDrop && !opened && currentDrop),
|
47719 |
+
ref: (0,composeRefs/* default */.Z)(provided.innerRef, buttonGroupContainer),
|
47720 |
+
style: {
|
47721 |
+
scrollMargin: 100
|
47722 |
+
}
|
47723 |
+
}, /*#__PURE__*/react.createElement("div", {
|
47724 |
+
className: "group-info"
|
47725 |
+
}, /*#__PURE__*/react.createElement(Button_Button, {
|
47726 |
+
onClick: handleOpenState,
|
47727 |
+
color: "primary",
|
47728 |
+
"data-testid": "open-group"
|
47729 |
+
}, /*#__PURE__*/react.createElement("i", {
|
47730 |
+
className: "group-arrow"
|
47731 |
+
}, /*#__PURE__*/react.createElement("i", {
|
47732 |
+
className: "fas fa-chevron-right"
|
47733 |
+
})), /*#__PURE__*/react.createElement("span", {
|
47734 |
+
className: "group-name"
|
47735 |
+
}, group.name)), /*#__PURE__*/react.createElement("div", {
|
47736 |
+
className: "group-action-spacer"
|
47737 |
+
}), /*#__PURE__*/react.createElement("div", {
|
47738 |
+
className: "group-actions"
|
47739 |
+
}, /*#__PURE__*/react.createElement(EditButton, {
|
47740 |
+
onClick: function onClick() {
|
47741 |
+
return document.location.hash = "#/group/" + group.id;
|
47742 |
+
},
|
47743 |
+
"data-testid": "edit-button-group",
|
47744 |
+
className: "group-actions edit-button"
|
47745 |
+
}), duplicateButton(), /*#__PURE__*/react.createElement(ContainerActionsDropdown, null, /*#__PURE__*/react.createElement(ContainerActions_RenameButton, {
|
47746 |
+
name: group.name,
|
47747 |
+
onChange: function onChange(val) {
|
47748 |
+
return set("groups", group.id, "name", val);
|
47749 |
+
},
|
47750 |
+
inDropdown: true
|
47751 |
+
}), /*#__PURE__*/react.createElement(ExportButton, {
|
47752 |
+
object: group,
|
47753 |
+
type: "group"
|
47754 |
+
}), /*#__PURE__*/react.createElement(ImportButton, {
|
47755 |
+
currentGroup: group,
|
47756 |
+
label: translate("import_export.import.into_group.button"),
|
47757 |
+
kbLink: 653,
|
47758 |
+
inDropdown: true
|
47759 |
+
}), /*#__PURE__*/react.createElement(ContainerActions_DeleteButton, {
|
47760 |
+
model: "group",
|
47761 |
+
"data-testid": "delete-button-group",
|
47762 |
+
buttonCount: getButtonsCount(group.id),
|
47763 |
+
deleteDisabled: getGroupCount() <= 1,
|
47764 |
+
onClose: function onClose() {
|
47765 |
+
return removeGroup(group.id);
|
47766 |
+
},
|
47767 |
+
inDropdown: true
|
47768 |
+
})))), /*#__PURE__*/react.createElement("div", ButtonGroupContainer_extends({
|
47769 |
+
className: "buttons" + currentDrop
|
47770 |
+
}, provided.droppableProps), group.children.map(function (id, key) {
|
47771 |
+
return /*#__PURE__*/react.createElement(PublicDraggable, {
|
47772 |
+
draggableId: id,
|
47773 |
+
index: key,
|
47774 |
+
key: id
|
47775 |
+
}, function (provided, snapshot) {
|
47776 |
+
return /*#__PURE__*/react.createElement(ButtonContainer_ButtonContainer, {
|
47777 |
+
provided: provided // key={key}
|
47778 |
+
,
|
47779 |
+
groupId: group.id,
|
47780 |
+
buttonId: id,
|
47781 |
+
currentDrag: snapshot.isDragging ? " currentDrag" : "",
|
47782 |
+
styleDrop: ButtonGroupContainer_getStyle(provided.draggableProps.style, snapshot),
|
47783 |
+
openNewButtonDialog: function openNewButtonDialog(shiftKey) {
|
47784 |
+
if (shiftKey) return addButton({
|
47785 |
+
name: translate("utils.new_button")
|
47786 |
+
}, group.id, key + 1);
|
47787 |
+
setNewButtonDialogOpened(key + 1);
|
47788 |
+
}
|
47789 |
+
});
|
47790 |
+
});
|
47791 |
+
}), provided.placeholder, /*#__PURE__*/react.createElement("div", {
|
47792 |
+
style: {
|
47793 |
+
textAlign: "center"
|
47794 |
+
}
|
47795 |
+
}, /*#__PURE__*/react.createElement(TemplatesDialog_TemplatesDialog, {
|
47796 |
+
open: newButtonDialogOpened !== false,
|
47797 |
+
currentGroup: group,
|
47798 |
+
onClose: function onClose() {
|
47799 |
+
return setNewButtonDialogOpened(false);
|
47800 |
+
},
|
47801 |
+
index: newButtonDialogOpened,
|
47802 |
+
showButtons: true
|
47803 |
+
}))));
|
47804 |
}
|
47805 |
|
47806 |
+
/* harmony default export */ var ButtonGroupContainer_ButtonGroupContainer = (connect(function (state) {
|
47807 |
+
return {
|
47808 |
+
getButtonsCount: function getButtonsCount(groupId) {
|
47809 |
+
return selectors_getButtonsCount(groupId, state);
|
47810 |
+
},
|
47811 |
+
getGroupCount: function getGroupCount() {
|
47812 |
+
return selectors_getGroupCount(state);
|
47813 |
+
},
|
47814 |
+
groups: state.groups,
|
47815 |
+
state: state
|
47816 |
+
};
|
47817 |
+
}, function (dispatch) {
|
47818 |
+
return {
|
47819 |
+
set: function set() {
|
47820 |
+
return dispatch(dataActions_set.apply(void 0, arguments));
|
47821 |
+
},
|
47822 |
+
dispatch: dispatch
|
47823 |
+
};
|
47824 |
+
}, function (_ref2, _ref3, props) {
|
47825 |
+
var state = _ref2.state,
|
47826 |
+
stateProps = ButtonGroupContainer_objectWithoutProperties(_ref2, ["state"]);
|
47827 |
|
47828 |
+
var dispatch = _ref3.dispatch,
|
47829 |
+
dispatchProps = ButtonGroupContainer_objectWithoutProperties(_ref3, ["dispatch"]);
|
|
|
|
|
47830 |
|
47831 |
+
return ButtonGroupContainer_objectSpread(ButtonGroupContainer_objectSpread(ButtonGroupContainer_objectSpread({
|
47832 |
+
removeGroup: function removeGroup(id) {
|
47833 |
+
return GroupActions_removeGroup(id, state, dispatch);
|
47834 |
+
},
|
47835 |
+
duplicateGroup: function duplicateGroup(id, payload) {
|
47836 |
+
return GroupActions_duplicateGroup(id, payload, state, dispatch);
|
|
|
|
|
|
|
|
|
47837 |
}
|
47838 |
+
}, dispatchProps), stateProps), props);
|
47839 |
+
})(ButtonGroupContainer));
|
47840 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/PremiumTag/PremiumTag.js
|
47841 |
|
47842 |
+
|
47843 |
+
function PremiumTag() {
|
47844 |
+
return /*#__PURE__*/react.createElement("span", {
|
47845 |
+
className: "buttonizer-premium",
|
47846 |
+
"data-testid": "buttonizer-premium-tag"
|
47847 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47848 |
}
|
47849 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Pages/Overview/Overview.js
|
47850 |
+
function Overview_slicedToArray(arr, i) { return Overview_arrayWithHoles(arr) || Overview_iterableToArrayLimit(arr, i) || Overview_unsupportedIterableToArray(arr, i) || Overview_nonIterableRest(); }
|
47851 |
|
47852 |
+
function Overview_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
47853 |
+
|
47854 |
+
function Overview_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Overview_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Overview_arrayLikeToArray(o, minLen); }
|
47855 |
+
|
47856 |
+
function Overview_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
47857 |
+
|
47858 |
+
function Overview_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
47859 |
+
|
47860 |
+
function Overview_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
|
|
|
|
47861 |
|
|
|
|
|
|
|
|
|
47862 |
|
|
|
|
|
|
|
|
|
|
|
47863 |
|
47864 |
+
// import ConfirmDialog from "Components/Dialogs/ConfirmDialog";
|
|
|
|
|
|
|
|
|
47865 |
|
|
|
|
|
|
|
47866 |
|
|
|
|
|
|
|
|
|
47867 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47868 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47869 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47870 |
|
|
|
47871 |
|
|
|
|
|
|
|
|
|
|
|
|
|
47872 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47873 |
|
|
|
|
|
|
|
47874 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47875 |
|
|
|
|
|
|
|
|
|
|
|
|
|
47876 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47877 |
|
47878 |
+
function Overview(_ref) {
|
47879 |
+
var _ref$groups = _ref.groups,
|
47880 |
+
groups = _ref$groups === void 0 ? null : _ref$groups,
|
47881 |
+
changeRelation = _ref.changeRelation,
|
47882 |
+
_ref$testDragSensor = _ref.testDragSensor,
|
47883 |
+
testDragSensor = _ref$testDragSensor === void 0 ? function () {} : _ref$testDragSensor,
|
47884 |
+
hasPremium = _ref.hasPremium,
|
47885 |
+
addGroup = _ref.addGroup,
|
47886 |
+
isPremiumCode = _ref.isPremiumCode,
|
47887 |
+
_ref$scrollBar = _ref.scrollBar,
|
47888 |
+
scrollBar = _ref$scrollBar === void 0 ? false : _ref$scrollBar;
|
47889 |
|
47890 |
+
// Create new group
|
47891 |
+
var _useState = (0,react.useState)(false),
|
47892 |
+
_useState2 = Overview_slicedToArray(_useState, 2),
|
47893 |
+
dialogOpen = _useState2[0],
|
47894 |
+
openDialog = _useState2[1];
|
47895 |
|
47896 |
+
var _useState3 = (0,react.useState)(null),
|
47897 |
+
_useState4 = Overview_slicedToArray(_useState3, 2),
|
47898 |
+
oldGroups = _useState4[0],
|
47899 |
+
setOldGroups = _useState4[1];
|
|
|
47900 |
|
47901 |
+
var _useState5 = (0,react.useState)(null),
|
47902 |
+
_useState6 = Overview_slicedToArray(_useState5, 2),
|
47903 |
+
newGroup = _useState6[0],
|
47904 |
+
setNewGroup = _useState6[1];
|
47905 |
|
47906 |
+
(0,react.useEffect)(function () {
|
47907 |
+
if (scrollBar && scrollBar.current) scrollBar.current.scrollTop = getCookie("buttonizer_bar_state_scroll") || 0;
|
47908 |
+
return function () {
|
47909 |
+
if (scrollBar && scrollBar.current) scrollBar.current.scrollTop = 0;
|
47910 |
+
};
|
47911 |
+
}, []);
|
47912 |
+
(0,react.useEffect)(function () {
|
47913 |
+
if (oldGroups !== null) {
|
47914 |
+
// Added a new group
|
47915 |
+
if (Object.keys(groups).length > Object.keys(oldGroups).length) setNewGroup(difference_default()(Object.keys(groups), Object.keys(oldGroups))); // Removed a group
|
47916 |
|
47917 |
+
if (Object.keys(groups).length < Object.keys(oldGroups).length) setNewGroup(null);
|
47918 |
+
}
|
47919 |
+
|
47920 |
+
setOldGroups(groups);
|
47921 |
+
}, [groups]); // Drag started
|
47922 |
+
|
47923 |
+
var onDragStart = (0,react.useCallback)(function () {
|
47924 |
+
// vibrate on touch
|
47925 |
+
if (window.navigator.vibrate) {
|
47926 |
+
window.navigator.vibrate(100);
|
47927 |
+
}
|
47928 |
+
}, []); // Drag ended
|
47929 |
+
|
47930 |
+
var onDragEnd = (0,react.useCallback)(function (result) {
|
47931 |
+
var destination = result.destination,
|
47932 |
+
source = result.source,
|
47933 |
+
draggableId = result.draggableId; // Didn't dragged into a group
|
47934 |
+
|
47935 |
+
if (!destination) {
|
47936 |
+
return;
|
47937 |
+
} // Didn't dragged into a new location
|
47938 |
+
|
47939 |
+
|
47940 |
+
if (source.droppableId === destination.droppableId && source.index === destination.index) {
|
47941 |
+
return;
|
47942 |
+
}
|
47943 |
+
|
47944 |
+
changeRelation(draggableId, source.droppableId, destination.droppableId, destination.index);
|
47945 |
+
}, [groups]);
|
47946 |
+
|
47947 |
+
var addGroupButton = function addGroupButton(index) {
|
47948 |
+
/* webpack-strip-block:removed */
|
47949 |
+
return /*#__PURE__*/react.createElement("div", {
|
47950 |
+
style: {
|
47951 |
+
textAlign: "center",
|
47952 |
+
marginTop: "20px"
|
47953 |
}
|
47954 |
+
}, /*#__PURE__*/react.createElement(Button_Button, {
|
47955 |
+
onClick: function onClick() {
|
47956 |
+
return app.showPremiumDialog(translate("premium.multiple_button_groups"), "Qxs1oGCVATU");
|
47957 |
+
},
|
47958 |
+
color: "primary",
|
47959 |
+
className: "Mui-buzz-premium",
|
47960 |
+
startIcon: /*#__PURE__*/react.createElement(Icon_Icon, {
|
47961 |
+
className: "fas fa-plus-circle"
|
47962 |
+
}),
|
47963 |
+
"data-testid": "new-group"
|
47964 |
+
}, translate("utils.create_group"), " ", /*#__PURE__*/react.createElement(PremiumTag, null)));
|
47965 |
+
};
|
47966 |
+
|
47967 |
+
var buttonGroupContainer = function buttonGroupContainer() {
|
47968 |
+
/* webpack-strip-block:removed */
|
47969 |
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(ConnectedDroppable, {
|
47970 |
+
droppableId: Object.keys(groups)[0]
|
47971 |
+
}, function (provided, snapshot) {
|
47972 |
+
return /*#__PURE__*/react.createElement(ButtonGroupContainer_ButtonGroupContainer, {
|
47973 |
+
groupId: Object.keys(groups)[0],
|
47974 |
+
provided: provided,
|
47975 |
+
currentDrop: snapshot.isDraggingOver ? " currentDrop" : ""
|
47976 |
+
});
|
47977 |
+
}), addGroupButton());
|
47978 |
+
};
|
47979 |
+
|
47980 |
+
return /*#__PURE__*/react.createElement("div", {
|
47981 |
+
className: "overview"
|
47982 |
+
}, /*#__PURE__*/react.createElement("div", {
|
47983 |
+
className: "buttonizer-logo"
|
47984 |
+
}, /*#__PURE__*/react.createElement("img", {
|
47985 |
+
src: window.buttonizer_admin.assets + "/images/logo.png"
|
47986 |
+
})), /*#__PURE__*/react.createElement(RandomTip_RandomTip, null), hasPremium && !isPremiumCode && /*#__PURE__*/react.createElement("div", {
|
47987 |
+
className: "mdc-card dashboard-warning-msg"
|
47988 |
+
}, /*#__PURE__*/react.createElement("b", null, translate("warnings.premium_license_free_version.title")), translate("warnings.premium_license_free_version.information"), " ", /*#__PURE__*/react.createElement("a", {
|
47989 |
+
href: "https://community.buttonizer.pro/knowledgebase/321",
|
47990 |
+
target: "_blank"
|
47991 |
+
}, translate("common.learn_more"), ".")), !buttonizer_admin.php_version_supported && /*#__PURE__*/react.createElement("div", {
|
47992 |
+
className: "mdc-card dashboard-warning-msg"
|
47993 |
+
}, /*#__PURE__*/react.createElement("b", null, translate("warnings.php_version_outdated.title")), translate("warnings.php_version_outdated.information", buttonizer_admin.php_version), " ", /*#__PURE__*/react.createElement("a", {
|
47994 |
+
href: "https://community.buttonizer.pro/knowledgebase/434",
|
47995 |
+
target: "_blank"
|
47996 |
+
}, translate("common.learn_more"), ".")), /*#__PURE__*/react.createElement(DragDropContext, {
|
47997 |
+
sensors: [testDragSensor],
|
47998 |
+
onDragEnd: onDragEnd,
|
47999 |
+
onDragStart: onDragStart
|
48000 |
+
}, buttonGroupContainer()));
|
48001 |
+
}
|
48002 |
+
|
48003 |
+
/* harmony default export */ var Overview_Overview = (connect(function (state) {
|
48004 |
+
return {
|
48005 |
+
groups: state.groups,
|
48006 |
+
hasPremium: state.misc._premium,
|
48007 |
+
isPremiumCode: state.misc._premiumCode
|
48008 |
+
};
|
48009 |
+
}, function (dispatch) {
|
48010 |
+
return {
|
48011 |
+
addRelation: function addRelation(args) {
|
48012 |
+
return dispatch(dataActions_addRelation(args));
|
48013 |
},
|
48014 |
+
addRecord: function addRecord(args) {
|
48015 |
+
return dispatch(dataActions_addRecord(args));
|
48016 |
+
},
|
48017 |
+
addGroup: function addGroup(payload, index) {
|
48018 |
+
return GroupActions_addGroup(payload, index, dispatch);
|
48019 |
+
},
|
48020 |
+
changeRelation: function changeRelation() {
|
48021 |
+
return dispatch(dataActions_changeRelation.apply(void 0, arguments));
|
48022 |
}
|
48023 |
};
|
48024 |
+
})(Overview));
|
48025 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Pages/ItemNotFound/ItemNotFound.js
|
48026 |
|
|
|
|
|
|
|
|
|
48027 |
|
|
|
48028 |
|
48029 |
+
function ItemNotFound(_ref) {
|
48030 |
+
var _ref$isButtonGroupNot = _ref.isButtonGroupNotFound,
|
48031 |
+
isButtonGroupNotFound = _ref$isButtonGroupNot === void 0 ? false : _ref$isButtonGroupNot;
|
48032 |
+
return /*#__PURE__*/react.createElement("div", {
|
48033 |
+
className: "item-not-found"
|
48034 |
+
}, /*#__PURE__*/react.createElement("div", {
|
48035 |
+
className: "buttonizer-logo"
|
48036 |
+
}, /*#__PURE__*/react.createElement("img", {
|
48037 |
+
src: window.buttonizer_admin.assets + "/images/logo.png"
|
48038 |
+
})), /*#__PURE__*/react.createElement("i", {
|
48039 |
+
className: isButtonGroupNotFound ? "fas fa-binoculars" : "far fa-dizzy"
|
48040 |
+
}), /*#__PURE__*/react.createElement("h4", null, "Sorry! We could not find this ".concat(isButtonGroupNotFound ? "button or group" : "page", "!")), /*#__PURE__*/react.createElement(Button_Button, {
|
48041 |
+
onClick: function onClick() {
|
48042 |
+
document.location.hash = "#/";
|
48043 |
+
},
|
48044 |
+
color: "primary",
|
48045 |
+
variant: "contained",
|
48046 |
+
"data-testid": "return-to-overview"
|
48047 |
+
}, "Return to overview"));
|
48048 |
}
|
48049 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Tab/Tab.js
|
48050 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48051 |
|
|
|
|
|
|
|
|
|
|
|
48052 |
|
|
|
|
|
|
|
48053 |
|
|
|
|
|
|
|
|
|
48054 |
|
|
|
|
|
48055 |
|
|
|
|
|
48056 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48057 |
|
|
|
|
|
|
|
|
|
48058 |
|
|
|
|
|
|
|
|
|
|
|
48059 |
|
48060 |
+
var Tab_styles = function styles(theme) {
|
48061 |
+
var _extends2;
|
|
|
|
|
|
|
|
|
|
|
48062 |
|
48063 |
+
return {
|
48064 |
+
/* Styles applied to the root element. */
|
48065 |
+
root: (0,esm_extends/* default */.Z)({}, theme.typography.button, (_extends2 = {
|
48066 |
+
maxWidth: 264,
|
48067 |
+
minWidth: 72,
|
48068 |
+
position: 'relative',
|
48069 |
+
boxSizing: 'border-box',
|
48070 |
+
minHeight: 48,
|
48071 |
+
flexShrink: 0,
|
48072 |
+
padding: '6px 12px'
|
48073 |
+
}, (0,defineProperty/* default */.Z)(_extends2, theme.breakpoints.up('sm'), {
|
48074 |
+
padding: '6px 24px'
|
48075 |
+
}), (0,defineProperty/* default */.Z)(_extends2, "overflow", 'hidden'), (0,defineProperty/* default */.Z)(_extends2, "whiteSpace", 'normal'), (0,defineProperty/* default */.Z)(_extends2, "textAlign", 'center'), (0,defineProperty/* default */.Z)(_extends2, theme.breakpoints.up('sm'), {
|
48076 |
+
minWidth: 160
|
48077 |
+
}), _extends2)),
|
48078 |
|
48079 |
+
/* Styles applied to the root element if both `icon` and `label` are provided. */
|
48080 |
+
labelIcon: {
|
48081 |
+
minHeight: 72,
|
48082 |
+
paddingTop: 9,
|
48083 |
+
'& $wrapper > *:first-child': {
|
48084 |
+
marginBottom: 6
|
48085 |
+
}
|
48086 |
+
},
|
48087 |
|
48088 |
+
/* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor="inherit"`. */
|
48089 |
+
textColorInherit: {
|
48090 |
+
color: 'inherit',
|
48091 |
+
opacity: 0.7,
|
48092 |
+
'&$selected': {
|
48093 |
+
opacity: 1
|
48094 |
+
},
|
48095 |
+
'&$disabled': {
|
48096 |
+
opacity: 0.5
|
48097 |
+
}
|
48098 |
+
},
|
|
|
|
|
48099 |
|
48100 |
+
/* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor="primary"`. */
|
48101 |
+
textColorPrimary: {
|
48102 |
+
color: theme.palette.text.secondary,
|
48103 |
+
'&$selected': {
|
48104 |
+
color: theme.palette.primary.main
|
48105 |
+
},
|
48106 |
+
'&$disabled': {
|
48107 |
+
color: theme.palette.text.disabled
|
48108 |
+
}
|
48109 |
+
},
|
48110 |
|
48111 |
+
/* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor="secondary"`. */
|
48112 |
+
textColorSecondary: {
|
48113 |
+
color: theme.palette.text.secondary,
|
48114 |
+
'&$selected': {
|
48115 |
+
color: theme.palette.secondary.main
|
48116 |
+
},
|
48117 |
+
'&$disabled': {
|
48118 |
+
color: theme.palette.text.disabled
|
48119 |
+
}
|
48120 |
+
},
|
48121 |
|
48122 |
+
/* Pseudo-class applied to the root element if `selected={true}` (controlled by the Tabs component). */
|
48123 |
+
selected: {},
|
48124 |
|
48125 |
+
/* Pseudo-class applied to the root element if `disabled={true}` (controlled by the Tabs component). */
|
48126 |
+
disabled: {},
|
48127 |
|
48128 |
+
/* Styles applied to the root element if `fullWidth={true}` (controlled by the Tabs component). */
|
48129 |
+
fullWidth: {
|
48130 |
+
flexShrink: 1,
|
48131 |
+
flexGrow: 1,
|
48132 |
+
flexBasis: 0,
|
48133 |
+
maxWidth: 'none'
|
48134 |
+
},
|
48135 |
|
48136 |
+
/* Styles applied to the root element if `wrapped={true}`. */
|
48137 |
+
wrapped: {
|
48138 |
+
fontSize: theme.typography.pxToRem(12),
|
48139 |
+
lineHeight: 1.5
|
48140 |
+
},
|
48141 |
+
|
48142 |
+
/* Styles applied to the `icon` and `label`'s wrapper element. */
|
48143 |
+
wrapper: {
|
48144 |
+
display: 'inline-flex',
|
48145 |
+
alignItems: 'center',
|
48146 |
+
justifyContent: 'center',
|
48147 |
+
width: '100%',
|
48148 |
+
flexDirection: 'column'
|
48149 |
+
}
|
48150 |
+
};
|
48151 |
+
};
|
48152 |
+
var Tab = /*#__PURE__*/react.forwardRef(function Tab(props, ref) {
|
48153 |
+
var classes = props.classes,
|
48154 |
+
className = props.className,
|
48155 |
+
_props$disabled = props.disabled,
|
48156 |
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
48157 |
+
_props$disableFocusRi = props.disableFocusRipple,
|
48158 |
+
disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,
|
48159 |
+
fullWidth = props.fullWidth,
|
48160 |
+
icon = props.icon,
|
48161 |
+
indicator = props.indicator,
|
48162 |
+
label = props.label,
|
48163 |
+
onChange = props.onChange,
|
48164 |
+
onClick = props.onClick,
|
48165 |
+
onFocus = props.onFocus,
|
48166 |
+
selected = props.selected,
|
48167 |
+
selectionFollowsFocus = props.selectionFollowsFocus,
|
48168 |
+
_props$textColor = props.textColor,
|
48169 |
+
textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,
|
48170 |
+
value = props.value,
|
48171 |
+
_props$wrapped = props.wrapped,
|
48172 |
+
wrapped = _props$wrapped === void 0 ? false : _props$wrapped,
|
48173 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["classes", "className", "disabled", "disableFocusRipple", "fullWidth", "icon", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"]);
|
48174 |
+
|
48175 |
+
var handleClick = function handleClick(event) {
|
48176 |
+
if (onChange) {
|
48177 |
+
onChange(event, value);
|
48178 |
+
}
|
48179 |
+
|
48180 |
+
if (onClick) {
|
48181 |
+
onClick(event);
|
48182 |
+
}
|
48183 |
+
};
|
48184 |
+
|
48185 |
+
var handleFocus = function handleFocus(event) {
|
48186 |
+
if (selectionFollowsFocus && !selected && onChange) {
|
48187 |
+
onChange(event, value);
|
48188 |
+
}
|
48189 |
+
|
48190 |
+
if (onFocus) {
|
48191 |
+
onFocus(event);
|
48192 |
+
}
|
48193 |
+
};
|
48194 |
|
48195 |
+
return /*#__PURE__*/react.createElement(ButtonBase_ButtonBase, (0,esm_extends/* default */.Z)({
|
48196 |
+
focusRipple: !disableFocusRipple,
|
48197 |
+
className: (0,clsx_m/* default */.Z)(classes.root, classes["textColor".concat((0,capitalize/* default */.Z)(textColor))], className, disabled && classes.disabled, selected && classes.selected, label && icon && classes.labelIcon, fullWidth && classes.fullWidth, wrapped && classes.wrapped),
|
48198 |
+
ref: ref,
|
48199 |
+
role: "tab",
|
48200 |
+
"aria-selected": selected,
|
48201 |
+
disabled: disabled,
|
48202 |
+
onClick: handleClick,
|
48203 |
+
onFocus: handleFocus,
|
48204 |
+
tabIndex: selected ? 0 : -1
|
48205 |
+
}, other), /*#__PURE__*/react.createElement("span", {
|
48206 |
+
className: classes.wrapper
|
48207 |
+
}, icon, label), indicator);
|
48208 |
+
});
|
48209 |
+
false ? 0 : void 0;
|
48210 |
+
/* harmony default export */ var Tab_Tab = ((0,withStyles/* default */.Z)(Tab_styles, {
|
48211 |
+
name: 'MuiTab'
|
48212 |
+
})(Tab));
|
48213 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/utils/scrollLeft.js
|
48214 |
+
// Source from https://github.com/alitaheri/normalize-scroll-left
|
48215 |
+
var cachedType;
|
48216 |
/**
|
48217 |
+
* Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type
|
|
|
|
|
48218 |
*
|
48219 |
+
* Types of scrollLeft, assuming scrollWidth=100 and direction is rtl.
|
48220 |
+
*
|
48221 |
+
* Type | <- Most Left | Most Right -> | Initial
|
48222 |
+
* ---------------- | ------------ | ------------- | -------
|
48223 |
+
* default | 0 | 100 | 100
|
48224 |
+
* negative (spec*) | -100 | 0 | 0
|
48225 |
+
* reverse | 100 | 0 | 0
|
48226 |
+
*
|
48227 |
+
* Edge 85: default
|
48228 |
+
* Safari 14: negative
|
48229 |
+
* Chrome 85: negative
|
48230 |
+
* Firefox 81: negative
|
48231 |
+
* IE 11: reverse
|
48232 |
+
*
|
48233 |
+
* spec* https://drafts.csswg.org/cssom-view/#dom-window-scroll
|
48234 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48235 |
|
48236 |
+
function detectScrollType() {
|
48237 |
+
if (cachedType) {
|
48238 |
+
return cachedType;
|
48239 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48240 |
|
48241 |
+
var dummy = document.createElement('div');
|
48242 |
+
var container = document.createElement('div');
|
48243 |
+
container.style.width = '10px';
|
48244 |
+
container.style.height = '1px';
|
48245 |
+
dummy.appendChild(container);
|
48246 |
+
dummy.dir = 'rtl';
|
48247 |
+
dummy.style.fontSize = '14px';
|
48248 |
+
dummy.style.width = '4px';
|
48249 |
+
dummy.style.height = '1px';
|
48250 |
+
dummy.style.position = 'absolute';
|
48251 |
+
dummy.style.top = '-1000px';
|
48252 |
+
dummy.style.overflow = 'scroll';
|
48253 |
+
document.body.appendChild(dummy);
|
48254 |
+
cachedType = 'reverse';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48255 |
|
48256 |
+
if (dummy.scrollLeft > 0) {
|
48257 |
+
cachedType = 'default';
|
48258 |
+
} else {
|
48259 |
+
dummy.scrollLeft = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48260 |
|
48261 |
+
if (dummy.scrollLeft === 0) {
|
48262 |
+
cachedType = 'negative';
|
48263 |
+
}
|
48264 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48265 |
|
48266 |
+
document.body.removeChild(dummy);
|
48267 |
+
return cachedType;
|
48268 |
+
} // Based on https://stackoverflow.com/a/24394376
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48269 |
|
48270 |
+
function getNormalizedScrollLeft(element, direction) {
|
48271 |
+
var scrollLeft = element.scrollLeft; // Perform the calculations only when direction is rtl to avoid messing up the ltr bahavior
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48272 |
|
48273 |
+
if (direction !== 'rtl') {
|
48274 |
+
return scrollLeft;
|
48275 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48276 |
|
48277 |
+
var type = detectScrollType();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48278 |
|
48279 |
+
switch (type) {
|
48280 |
+
case 'negative':
|
48281 |
+
return element.scrollWidth - element.clientWidth + scrollLeft;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48282 |
|
48283 |
+
case 'reverse':
|
48284 |
+
return element.scrollWidth - element.clientWidth - scrollLeft;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48285 |
|
48286 |
+
default:
|
48287 |
+
return scrollLeft;
|
48288 |
+
}
|
48289 |
+
}
|
48290 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/animate.js
|
48291 |
+
function easeInOutSin(time) {
|
48292 |
+
return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;
|
48293 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48294 |
|
48295 |
+
function animate(property, element, to) {
|
48296 |
+
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
48297 |
+
var cb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {};
|
48298 |
+
var _options$ease = options.ease,
|
48299 |
+
ease = _options$ease === void 0 ? easeInOutSin : _options$ease,
|
48300 |
+
_options$duration = options.duration,
|
48301 |
+
duration = _options$duration === void 0 ? 300 : _options$duration;
|
48302 |
+
var start = null;
|
48303 |
+
var from = element[property];
|
48304 |
+
var cancelled = false;
|
48305 |
|
48306 |
+
var cancel = function cancel() {
|
48307 |
+
cancelled = true;
|
48308 |
+
};
|
|
|
|
|
48309 |
|
48310 |
+
var step = function step(timestamp) {
|
48311 |
+
if (cancelled) {
|
48312 |
+
cb(new Error('Animation cancelled'));
|
48313 |
+
return;
|
48314 |
+
}
|
|
|
48315 |
|
48316 |
+
if (start === null) {
|
48317 |
+
start = timestamp;
|
48318 |
+
}
|
|
|
|
|
|
|
|
|
48319 |
|
48320 |
+
var time = Math.min(1, (timestamp - start) / duration);
|
48321 |
+
element[property] = ease(time) * (to - from) + from;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48322 |
|
48323 |
+
if (time >= 1) {
|
48324 |
+
requestAnimationFrame(function () {
|
48325 |
+
cb(null);
|
48326 |
+
});
|
48327 |
+
return;
|
48328 |
+
}
|
48329 |
+
|
48330 |
+
requestAnimationFrame(step);
|
48331 |
+
};
|
48332 |
|
48333 |
+
if (from === to) {
|
48334 |
+
cb(new Error('Element already at target position'));
|
48335 |
+
return cancel;
|
48336 |
+
}
|
48337 |
|
48338 |
+
requestAnimationFrame(step);
|
48339 |
+
return cancel;
|
48340 |
+
}
|
48341 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Tabs/ScrollbarSize.js
|
48342 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48343 |
|
|
|
|
|
48344 |
|
|
|
|
|
|
|
48345 |
|
|
|
|
|
48346 |
|
48347 |
+
var ScrollbarSize_styles = {
|
48348 |
+
width: 99,
|
48349 |
+
height: 99,
|
48350 |
+
position: 'absolute',
|
48351 |
+
top: -9999,
|
48352 |
+
overflow: 'scroll'
|
48353 |
+
};
|
48354 |
+
/**
|
48355 |
+
* @ignore - internal component.
|
48356 |
+
* The component originates from https://github.com/STORIS/react-scrollbar-size.
|
48357 |
+
* It has been moved into the core in order to minimize the bundle size.
|
48358 |
+
*/
|
48359 |
|
48360 |
+
function ScrollbarSize(props) {
|
48361 |
+
var onChange = props.onChange,
|
48362 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["onChange"]);
|
|
|
|
|
|
|
48363 |
|
48364 |
+
var scrollbarHeight = react.useRef();
|
48365 |
+
var nodeRef = react.useRef(null);
|
|
|
48366 |
|
48367 |
+
var setMeasurements = function setMeasurements() {
|
48368 |
+
scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;
|
48369 |
+
};
|
|
|
|
|
48370 |
|
48371 |
+
react.useEffect(function () {
|
48372 |
+
var handleResize = (0,utils_debounce/* default */.Z)(function () {
|
48373 |
+
var prevHeight = scrollbarHeight.current;
|
48374 |
+
setMeasurements();
|
|
|
|
|
|
|
|
|
|
|
|
|
48375 |
|
48376 |
+
if (prevHeight !== scrollbarHeight.current) {
|
48377 |
+
onChange(scrollbarHeight.current);
|
|
|
|
|
|
|
|
|
|
|
48378 |
}
|
48379 |
});
|
48380 |
+
window.addEventListener('resize', handleResize);
|
48381 |
+
return function () {
|
48382 |
+
handleResize.clear();
|
48383 |
+
window.removeEventListener('resize', handleResize);
|
48384 |
+
};
|
48385 |
+
}, [onChange]);
|
48386 |
+
react.useEffect(function () {
|
48387 |
+
setMeasurements();
|
48388 |
+
onChange(scrollbarHeight.current);
|
48389 |
+
}, [onChange]);
|
48390 |
+
return /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({
|
48391 |
+
style: ScrollbarSize_styles,
|
48392 |
+
ref: nodeRef
|
48393 |
+
}, other));
|
48394 |
+
}
|
48395 |
+
false ? 0 : void 0;
|
48396 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Tabs/TabIndicator.js
|
48397 |
|
|
|
|
|
48398 |
|
|
|
|
|
|
|
|
|
|
|
48399 |
|
|
|
|
|
48400 |
|
|
|
|
|
48401 |
|
48402 |
|
48403 |
+
|
48404 |
+
var TabIndicator_styles = function styles(theme) {
|
48405 |
+
return {
|
48406 |
+
root: {
|
48407 |
+
position: 'absolute',
|
48408 |
+
height: 2,
|
48409 |
+
bottom: 0,
|
48410 |
+
width: '100%',
|
48411 |
+
transition: theme.transitions.create()
|
48412 |
+
},
|
48413 |
+
colorPrimary: {
|
48414 |
+
backgroundColor: theme.palette.primary.main
|
48415 |
+
},
|
48416 |
+
colorSecondary: {
|
48417 |
+
backgroundColor: theme.palette.secondary.main
|
48418 |
+
},
|
48419 |
+
vertical: {
|
48420 |
+
height: '100%',
|
48421 |
+
width: 2,
|
48422 |
+
right: 0
|
48423 |
}
|
48424 |
+
};
|
48425 |
+
};
|
48426 |
+
/**
|
48427 |
+
* @ignore - internal component.
|
48428 |
+
*/
|
48429 |
|
48430 |
+
var TabIndicator = /*#__PURE__*/react.forwardRef(function TabIndicator(props, ref) {
|
48431 |
+
var classes = props.classes,
|
48432 |
+
className = props.className,
|
48433 |
+
color = props.color,
|
48434 |
+
orientation = props.orientation,
|
48435 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["classes", "className", "color", "orientation"]);
|
48436 |
|
48437 |
+
return /*#__PURE__*/react.createElement("span", (0,esm_extends/* default */.Z)({
|
48438 |
+
className: (0,clsx_m/* default */.Z)(classes.root, classes["color".concat((0,capitalize/* default */.Z)(color))], className, orientation === 'vertical' && classes.vertical),
|
48439 |
+
ref: ref
|
48440 |
+
}, other));
|
48441 |
+
});
|
48442 |
+
false ? 0 : void 0;
|
48443 |
+
/* harmony default export */ var Tabs_TabIndicator = ((0,withStyles/* default */.Z)(TabIndicator_styles, {
|
48444 |
+
name: 'PrivateTabIndicator'
|
48445 |
+
})(TabIndicator));
|
48446 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowLeft.js
|
48447 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48448 |
|
48449 |
+
/**
|
48450 |
+
* @ignore - internal component.
|
48451 |
+
*/
|
48452 |
+
|
48453 |
+
/* harmony default export */ var KeyboardArrowLeft = ((0,createSvgIcon/* default */.Z)( /*#__PURE__*/react.createElement("path", {
|
48454 |
+
d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
|
48455 |
+
}), 'KeyboardArrowLeft'));
|
48456 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowRight.js
|
48457 |
+
|
48458 |
|
48459 |
/**
|
48460 |
+
* @ignore - internal component.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48461 |
*/
|
48462 |
|
48463 |
+
/* harmony default export */ var KeyboardArrowRight = ((0,createSvgIcon/* default */.Z)( /*#__PURE__*/react.createElement("path", {
|
48464 |
+
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
48465 |
+
}), 'KeyboardArrowRight'));
|
48466 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/TabScrollButton/TabScrollButton.js
|
48467 |
+
|
48468 |
+
|
48469 |
+
|
48470 |
+
/* eslint-disable jsx-a11y/aria-role */
|
48471 |
|
|
|
|
|
|
|
48472 |
|
|
|
|
|
48473 |
|
|
|
48474 |
|
48475 |
|
48476 |
|
48477 |
|
48478 |
+
var TabScrollButton_styles = {
|
48479 |
+
/* Styles applied to the root element. */
|
48480 |
+
root: {
|
48481 |
+
width: 40,
|
48482 |
+
flexShrink: 0,
|
48483 |
+
opacity: 0.8,
|
48484 |
+
'&$disabled': {
|
48485 |
+
opacity: 0
|
48486 |
+
}
|
48487 |
+
},
|
48488 |
+
|
48489 |
+
/* Styles applied to the root element if `orientation="vertical"`. */
|
48490 |
+
vertical: {
|
48491 |
+
width: '100%',
|
48492 |
+
height: 40,
|
48493 |
+
'& svg': {
|
48494 |
+
transform: 'rotate(90deg)'
|
48495 |
+
}
|
48496 |
+
},
|
48497 |
+
|
48498 |
+
/* Pseudo-class applied to the root element if `disabled={true}`. */
|
48499 |
+
disabled: {}
|
48500 |
+
};
|
48501 |
|
48502 |
+
var TabScrollButton_ref = /*#__PURE__*/react.createElement(KeyboardArrowLeft, {
|
48503 |
+
fontSize: "small"
|
48504 |
+
});
|
48505 |
|
48506 |
+
var TabScrollButton_ref2 = /*#__PURE__*/react.createElement(KeyboardArrowRight, {
|
48507 |
+
fontSize: "small"
|
48508 |
+
});
|
48509 |
|
48510 |
+
var TabScrollButton = /*#__PURE__*/react.forwardRef(function TabScrollButton(props, ref) {
|
48511 |
+
var classes = props.classes,
|
48512 |
+
classNameProp = props.className,
|
48513 |
+
direction = props.direction,
|
48514 |
+
orientation = props.orientation,
|
48515 |
+
disabled = props.disabled,
|
48516 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["classes", "className", "direction", "orientation", "disabled"]);
|
48517 |
|
48518 |
+
return /*#__PURE__*/react.createElement(ButtonBase_ButtonBase, (0,esm_extends/* default */.Z)({
|
48519 |
+
component: "div",
|
48520 |
+
className: (0,clsx_m/* default */.Z)(classes.root, classNameProp, disabled && classes.disabled, orientation === 'vertical' && classes.vertical),
|
48521 |
+
ref: ref,
|
48522 |
+
role: null,
|
48523 |
+
tabIndex: null
|
48524 |
+
}, other), direction === 'left' ? TabScrollButton_ref : TabScrollButton_ref2);
|
48525 |
+
});
|
48526 |
+
false ? 0 : void 0;
|
48527 |
+
/* harmony default export */ var TabScrollButton_TabScrollButton = ((0,withStyles/* default */.Z)(TabScrollButton_styles, {
|
48528 |
+
name: 'MuiTabScrollButton'
|
48529 |
+
})(TabScrollButton));
|
48530 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Tabs/Tabs.js
|
48531 |
|
48532 |
|
48533 |
|
48534 |
|
|
|
|
|
48535 |
|
|
|
|
|
|
|
48536 |
|
|
|
|
|
|
|
48537 |
|
|
|
|
|
48538 |
|
|
|
|
|
48539 |
|
|
|
|
|
48540 |
|
|
|
|
|
|
|
|
|
48541 |
|
|
|
|
|
|
|
48542 |
|
|
|
|
|
|
|
|
|
|
|
48543 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48544 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48545 |
|
|
|
|
|
|
|
48546 |
|
|
|
|
|
|
|
|
|
|
|
|
|
48547 |
|
|
|
|
|
|
|
48548 |
|
48549 |
+
var Tabs_styles = function styles(theme) {
|
48550 |
+
return {
|
48551 |
+
/* Styles applied to the root element. */
|
48552 |
+
root: {
|
48553 |
+
overflow: 'hidden',
|
48554 |
+
minHeight: 48,
|
48555 |
+
WebkitOverflowScrolling: 'touch',
|
48556 |
+
// Add iOS momentum scrolling.
|
48557 |
+
display: 'flex'
|
48558 |
+
},
|
48559 |
|
48560 |
+
/* Styles applied to the root element if `orientation="vertical"`. */
|
48561 |
+
vertical: {
|
48562 |
+
flexDirection: 'column'
|
48563 |
+
},
|
48564 |
|
48565 |
+
/* Styles applied to the flex container element. */
|
48566 |
+
flexContainer: {
|
48567 |
+
display: 'flex'
|
48568 |
+
},
|
48569 |
|
48570 |
+
/* Styles applied to the flex container element if `orientation="vertical"`. */
|
48571 |
+
flexContainerVertical: {
|
48572 |
+
flexDirection: 'column'
|
48573 |
+
},
|
48574 |
|
48575 |
+
/* Styles applied to the flex container element if `centered={true}` & `!variant="scrollable"`. */
|
48576 |
+
centered: {
|
48577 |
+
justifyContent: 'center'
|
48578 |
+
},
|
48579 |
|
48580 |
+
/* Styles applied to the tablist element. */
|
48581 |
+
scroller: {
|
48582 |
+
position: 'relative',
|
48583 |
+
display: 'inline-block',
|
48584 |
+
flex: '1 1 auto',
|
48585 |
+
whiteSpace: 'nowrap'
|
48586 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48587 |
|
48588 |
+
/* Styles applied to the tablist element if `!variant="scrollable"`. */
|
48589 |
+
fixed: {
|
48590 |
+
overflowX: 'hidden',
|
48591 |
+
width: '100%'
|
48592 |
+
},
|
48593 |
|
48594 |
+
/* Styles applied to the tablist element if `variant="scrollable"`. */
|
48595 |
+
scrollable: {
|
48596 |
+
overflowX: 'scroll',
|
48597 |
+
// Hide dimensionless scrollbar on MacOS
|
48598 |
+
scrollbarWidth: 'none',
|
48599 |
+
// Firefox
|
48600 |
+
'&::-webkit-scrollbar': {
|
48601 |
+
display: 'none' // Safari + Chrome
|
48602 |
|
48603 |
+
}
|
48604 |
+
},
|
|
|
48605 |
|
48606 |
+
/* Styles applied to the `ScrollButtonComponent` component. */
|
48607 |
+
scrollButtons: {},
|
|
|
|
|
48608 |
|
48609 |
+
/* Styles applied to the `ScrollButtonComponent` component if `scrollButtons="auto"` or scrollButtons="desktop"`. */
|
48610 |
+
scrollButtonsDesktop: (0,defineProperty/* default */.Z)({}, theme.breakpoints.down('xs'), {
|
48611 |
+
display: 'none'
|
48612 |
+
}),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48613 |
|
48614 |
+
/* Styles applied to the `TabIndicator` component. */
|
48615 |
+
indicator: {}
|
48616 |
+
};
|
48617 |
+
};
|
48618 |
+
var Tabs = /*#__PURE__*/react.forwardRef(function Tabs(props, ref) {
|
48619 |
+
var ariaLabel = props['aria-label'],
|
48620 |
+
ariaLabelledBy = props['aria-labelledby'],
|
48621 |
+
action = props.action,
|
48622 |
+
_props$centered = props.centered,
|
48623 |
+
centered = _props$centered === void 0 ? false : _props$centered,
|
48624 |
+
childrenProp = props.children,
|
48625 |
+
classes = props.classes,
|
48626 |
+
className = props.className,
|
48627 |
+
_props$component = props.component,
|
48628 |
+
Component = _props$component === void 0 ? 'div' : _props$component,
|
48629 |
+
_props$indicatorColor = props.indicatorColor,
|
48630 |
+
indicatorColor = _props$indicatorColor === void 0 ? 'secondary' : _props$indicatorColor,
|
48631 |
+
onChange = props.onChange,
|
48632 |
+
_props$orientation = props.orientation,
|
48633 |
+
orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,
|
48634 |
+
_props$ScrollButtonCo = props.ScrollButtonComponent,
|
48635 |
+
ScrollButtonComponent = _props$ScrollButtonCo === void 0 ? TabScrollButton_TabScrollButton : _props$ScrollButtonCo,
|
48636 |
+
_props$scrollButtons = props.scrollButtons,
|
48637 |
+
scrollButtons = _props$scrollButtons === void 0 ? 'auto' : _props$scrollButtons,
|
48638 |
+
selectionFollowsFocus = props.selectionFollowsFocus,
|
48639 |
+
_props$TabIndicatorPr = props.TabIndicatorProps,
|
48640 |
+
TabIndicatorProps = _props$TabIndicatorPr === void 0 ? {} : _props$TabIndicatorPr,
|
48641 |
+
TabScrollButtonProps = props.TabScrollButtonProps,
|
48642 |
+
_props$textColor = props.textColor,
|
48643 |
+
textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,
|
48644 |
+
value = props.value,
|
48645 |
+
_props$variant = props.variant,
|
48646 |
+
variant = _props$variant === void 0 ? 'standard' : _props$variant,
|
48647 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["aria-label", "aria-labelledby", "action", "centered", "children", "classes", "className", "component", "indicatorColor", "onChange", "orientation", "ScrollButtonComponent", "scrollButtons", "selectionFollowsFocus", "TabIndicatorProps", "TabScrollButtonProps", "textColor", "value", "variant"]);
|
48648 |
|
48649 |
+
var theme = useTheme_useTheme();
|
48650 |
+
var scrollable = variant === 'scrollable';
|
48651 |
+
var isRtl = theme.direction === 'rtl';
|
48652 |
+
var vertical = orientation === 'vertical';
|
48653 |
+
var scrollStart = vertical ? 'scrollTop' : 'scrollLeft';
|
48654 |
+
var start = vertical ? 'top' : 'left';
|
48655 |
+
var end = vertical ? 'bottom' : 'right';
|
48656 |
+
var clientSize = vertical ? 'clientHeight' : 'clientWidth';
|
48657 |
+
var size = vertical ? 'height' : 'width';
|
48658 |
|
48659 |
+
if (false) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
48660 |
|
48661 |
+
var _React$useState = react.useState(false),
|
48662 |
+
mounted = _React$useState[0],
|
48663 |
+
setMounted = _React$useState[1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48664 |
|
48665 |
+
var _React$useState2 = react.useState({}),
|
48666 |
+
indicatorStyle = _React$useState2[0],
|
48667 |
+
setIndicatorStyle = _React$useState2[1];
|
48668 |
|
48669 |
+
var _React$useState3 = react.useState({
|
48670 |
+
start: false,
|
48671 |
+
end: false
|
48672 |
+
}),
|
48673 |
+
displayScroll = _React$useState3[0],
|
48674 |
+
setDisplayScroll = _React$useState3[1];
|
48675 |
|
48676 |
+
var _React$useState4 = react.useState({
|
48677 |
+
overflow: 'hidden',
|
48678 |
+
marginBottom: null
|
48679 |
+
}),
|
48680 |
+
scrollerStyle = _React$useState4[0],
|
48681 |
+
setScrollerStyle = _React$useState4[1];
|
48682 |
|
48683 |
+
var valueToIndex = new Map();
|
48684 |
+
var tabsRef = react.useRef(null);
|
48685 |
+
var tabListRef = react.useRef(null);
|
48686 |
|
48687 |
+
var getTabsMeta = function getTabsMeta() {
|
48688 |
+
var tabsNode = tabsRef.current;
|
48689 |
+
var tabsMeta;
|
48690 |
|
48691 |
+
if (tabsNode) {
|
48692 |
+
var rect = tabsNode.getBoundingClientRect(); // create a new object with ClientRect class props + scrollLeft
|
|
|
|
|
|
|
|
|
48693 |
|
48694 |
+
tabsMeta = {
|
48695 |
+
clientWidth: tabsNode.clientWidth,
|
48696 |
+
scrollLeft: tabsNode.scrollLeft,
|
48697 |
+
scrollTop: tabsNode.scrollTop,
|
48698 |
+
scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, theme.direction),
|
48699 |
+
scrollWidth: tabsNode.scrollWidth,
|
48700 |
+
top: rect.top,
|
48701 |
+
bottom: rect.bottom,
|
48702 |
+
left: rect.left,
|
48703 |
+
right: rect.right
|
48704 |
+
};
|
48705 |
+
}
|
48706 |
|
48707 |
+
var tabMeta;
|
48708 |
|
48709 |
+
if (tabsNode && value !== false) {
|
48710 |
+
var _children = tabListRef.current.children;
|
48711 |
|
48712 |
+
if (_children.length > 0) {
|
48713 |
+
var tab = _children[valueToIndex.get(value)];
|
48714 |
|
48715 |
+
if (false) {}
|
|
|
48716 |
|
48717 |
+
tabMeta = tab ? tab.getBoundingClientRect() : null;
|
48718 |
+
}
|
48719 |
+
}
|
48720 |
|
48721 |
+
return {
|
48722 |
+
tabsMeta: tabsMeta,
|
48723 |
+
tabMeta: tabMeta
|
48724 |
+
};
|
48725 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48726 |
|
48727 |
+
var updateIndicatorState = (0,useEventCallback/* default */.Z)(function () {
|
48728 |
+
var _newIndicatorStyle;
|
|
|
48729 |
|
48730 |
+
var _getTabsMeta = getTabsMeta(),
|
48731 |
+
tabsMeta = _getTabsMeta.tabsMeta,
|
48732 |
+
tabMeta = _getTabsMeta.tabMeta;
|
48733 |
|
48734 |
+
var startValue = 0;
|
|
|
48735 |
|
48736 |
+
if (tabMeta && tabsMeta) {
|
48737 |
+
if (vertical) {
|
48738 |
+
startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;
|
48739 |
+
} else {
|
48740 |
+
var correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;
|
48741 |
+
startValue = tabMeta.left - tabsMeta.left + correction;
|
48742 |
}
|
48743 |
+
}
|
48744 |
|
48745 |
+
var newIndicatorStyle = (_newIndicatorStyle = {}, (0,defineProperty/* default */.Z)(_newIndicatorStyle, start, startValue), (0,defineProperty/* default */.Z)(_newIndicatorStyle, size, tabMeta ? tabMeta[size] : 0), _newIndicatorStyle);
|
|
|
|
|
48746 |
|
48747 |
+
if (isNaN(indicatorStyle[start]) || isNaN(indicatorStyle[size])) {
|
48748 |
+
setIndicatorStyle(newIndicatorStyle);
|
48749 |
+
} else {
|
48750 |
+
var dStart = Math.abs(indicatorStyle[start] - newIndicatorStyle[start]);
|
48751 |
+
var dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);
|
48752 |
|
48753 |
+
if (dStart >= 1 || dSize >= 1) {
|
48754 |
+
setIndicatorStyle(newIndicatorStyle);
|
48755 |
+
}
|
|
|
48756 |
}
|
48757 |
+
});
|
48758 |
|
48759 |
+
var scroll = function scroll(scrollValue) {
|
48760 |
+
animate(scrollStart, tabsRef.current, scrollValue);
|
48761 |
+
};
|
48762 |
|
48763 |
+
var moveTabsScroll = function moveTabsScroll(delta) {
|
48764 |
+
var scrollValue = tabsRef.current[scrollStart];
|
48765 |
|
48766 |
+
if (vertical) {
|
48767 |
+
scrollValue += delta;
|
48768 |
+
} else {
|
48769 |
+
scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48770 |
|
48771 |
+
scrollValue *= isRtl && detectScrollType() === 'reverse' ? -1 : 1;
|
48772 |
+
}
|
48773 |
|
48774 |
+
scroll(scrollValue);
|
48775 |
+
};
|
|
|
|
|
48776 |
|
48777 |
+
var handleStartScrollClick = function handleStartScrollClick() {
|
48778 |
+
moveTabsScroll(-tabsRef.current[clientSize]);
|
48779 |
+
};
|
48780 |
|
48781 |
+
var handleEndScrollClick = function handleEndScrollClick() {
|
48782 |
+
moveTabsScroll(tabsRef.current[clientSize]);
|
48783 |
+
};
|
48784 |
|
48785 |
+
var handleScrollbarSizeChange = react.useCallback(function (scrollbarHeight) {
|
48786 |
+
setScrollerStyle({
|
48787 |
+
overflow: null,
|
48788 |
+
marginBottom: -scrollbarHeight
|
48789 |
+
});
|
48790 |
+
}, []);
|
48791 |
|
48792 |
+
var getConditionalElements = function getConditionalElements() {
|
48793 |
+
var conditionalElements = {};
|
48794 |
+
conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/react.createElement(ScrollbarSize, {
|
48795 |
+
className: classes.scrollable,
|
48796 |
+
onChange: handleScrollbarSizeChange
|
48797 |
+
}) : null;
|
48798 |
+
var scrollButtonsActive = displayScroll.start || displayScroll.end;
|
48799 |
+
var showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === 'desktop' || scrollButtons === 'on');
|
48800 |
+
conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/react.createElement(ScrollButtonComponent, (0,esm_extends/* default */.Z)({
|
48801 |
+
orientation: orientation,
|
48802 |
+
direction: isRtl ? 'right' : 'left',
|
48803 |
+
onClick: handleStartScrollClick,
|
48804 |
+
disabled: !displayScroll.start,
|
48805 |
+
className: (0,clsx_m/* default */.Z)(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)
|
48806 |
+
}, TabScrollButtonProps)) : null;
|
48807 |
+
conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/react.createElement(ScrollButtonComponent, (0,esm_extends/* default */.Z)({
|
48808 |
+
orientation: orientation,
|
48809 |
+
direction: isRtl ? 'left' : 'right',
|
48810 |
+
onClick: handleEndScrollClick,
|
48811 |
+
disabled: !displayScroll.end,
|
48812 |
+
className: (0,clsx_m/* default */.Z)(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)
|
48813 |
+
}, TabScrollButtonProps)) : null;
|
48814 |
+
return conditionalElements;
|
48815 |
+
};
|
48816 |
|
48817 |
+
var scrollSelectedIntoView = (0,useEventCallback/* default */.Z)(function () {
|
48818 |
+
var _getTabsMeta2 = getTabsMeta(),
|
48819 |
+
tabsMeta = _getTabsMeta2.tabsMeta,
|
48820 |
+
tabMeta = _getTabsMeta2.tabMeta;
|
|
|
|
|
|
|
|
|
|
|
48821 |
|
48822 |
+
if (!tabMeta || !tabsMeta) {
|
48823 |
+
return;
|
48824 |
+
}
|
48825 |
|
48826 |
+
if (tabMeta[start] < tabsMeta[start]) {
|
48827 |
+
// left side of button is out of view
|
48828 |
+
var nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);
|
48829 |
+
scroll(nextScrollStart);
|
48830 |
+
} else if (tabMeta[end] > tabsMeta[end]) {
|
48831 |
+
// right side of button is out of view
|
48832 |
+
var _nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);
|
48833 |
|
48834 |
+
scroll(_nextScrollStart);
|
|
|
|
|
|
|
|
|
|
|
|
|
48835 |
}
|
48836 |
+
});
|
48837 |
+
var updateScrollButtonState = (0,useEventCallback/* default */.Z)(function () {
|
48838 |
+
if (scrollable && scrollButtons !== 'off') {
|
48839 |
+
var _tabsRef$current = tabsRef.current,
|
48840 |
+
scrollTop = _tabsRef$current.scrollTop,
|
48841 |
+
scrollHeight = _tabsRef$current.scrollHeight,
|
48842 |
+
clientHeight = _tabsRef$current.clientHeight,
|
48843 |
+
scrollWidth = _tabsRef$current.scrollWidth,
|
48844 |
+
clientWidth = _tabsRef$current.clientWidth;
|
48845 |
+
var showStartScroll;
|
48846 |
+
var showEndScroll;
|
48847 |
|
48848 |
+
if (vertical) {
|
48849 |
+
showStartScroll = scrollTop > 1;
|
48850 |
+
showEndScroll = scrollTop < scrollHeight - clientHeight - 1;
|
48851 |
+
} else {
|
48852 |
+
var scrollLeft = getNormalizedScrollLeft(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms.
|
48853 |
|
48854 |
+
showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;
|
48855 |
+
showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;
|
48856 |
+
}
|
48857 |
|
48858 |
+
if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) {
|
48859 |
+
setDisplayScroll({
|
48860 |
+
start: showStartScroll,
|
48861 |
+
end: showEndScroll
|
48862 |
+
});
|
48863 |
+
}
|
48864 |
}
|
48865 |
});
|
48866 |
react.useEffect(function () {
|
48867 |
+
var handleResize = (0,utils_debounce/* default */.Z)(function () {
|
48868 |
+
updateIndicatorState();
|
48869 |
+
updateScrollButtonState();
|
48870 |
+
});
|
48871 |
+
var win = (0,ownerWindow/* default */.Z)(tabsRef.current);
|
48872 |
+
win.addEventListener('resize', handleResize);
|
48873 |
+
return function () {
|
48874 |
+
handleResize.clear();
|
48875 |
+
win.removeEventListener('resize', handleResize);
|
48876 |
+
};
|
48877 |
+
}, [updateIndicatorState, updateScrollButtonState]);
|
48878 |
+
var handleTabsScroll = react.useCallback((0,utils_debounce/* default */.Z)(function () {
|
48879 |
+
updateScrollButtonState();
|
48880 |
+
}));
|
48881 |
+
react.useEffect(function () {
|
48882 |
+
return function () {
|
48883 |
+
handleTabsScroll.clear();
|
48884 |
+
};
|
48885 |
+
}, [handleTabsScroll]);
|
48886 |
+
react.useEffect(function () {
|
48887 |
+
setMounted(true);
|
48888 |
+
}, []);
|
48889 |
+
react.useEffect(function () {
|
48890 |
+
updateIndicatorState();
|
48891 |
+
updateScrollButtonState();
|
48892 |
+
});
|
48893 |
+
react.useEffect(function () {
|
48894 |
+
scrollSelectedIntoView();
|
48895 |
+
}, [scrollSelectedIntoView, indicatorStyle]);
|
48896 |
+
react.useImperativeHandle(action, function () {
|
48897 |
+
return {
|
48898 |
+
updateIndicator: updateIndicatorState,
|
48899 |
+
updateScrollButtons: updateScrollButtonState
|
48900 |
+
};
|
48901 |
+
}, [updateIndicatorState, updateScrollButtonState]);
|
48902 |
+
var indicator = /*#__PURE__*/react.createElement(Tabs_TabIndicator, (0,esm_extends/* default */.Z)({
|
48903 |
+
className: classes.indicator,
|
48904 |
+
orientation: orientation,
|
48905 |
+
color: indicatorColor
|
48906 |
+
}, TabIndicatorProps, {
|
48907 |
+
style: (0,esm_extends/* default */.Z)({}, indicatorStyle, TabIndicatorProps.style)
|
48908 |
+
}));
|
48909 |
+
var childIndex = 0;
|
48910 |
+
var children = react.Children.map(childrenProp, function (child) {
|
48911 |
+
if (! /*#__PURE__*/react.isValidElement(child)) {
|
48912 |
+
return null;
|
48913 |
+
}
|
48914 |
|
48915 |
+
if (false) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48916 |
|
48917 |
+
var childValue = child.props.value === undefined ? childIndex : child.props.value;
|
48918 |
+
valueToIndex.set(childValue, childIndex);
|
48919 |
+
var selected = childValue === value;
|
48920 |
+
childIndex += 1;
|
48921 |
+
return /*#__PURE__*/react.cloneElement(child, {
|
48922 |
+
fullWidth: variant === 'fullWidth',
|
48923 |
+
indicator: selected && !mounted && indicator,
|
48924 |
+
selected: selected,
|
48925 |
+
selectionFollowsFocus: selectionFollowsFocus,
|
48926 |
+
onChange: onChange,
|
48927 |
+
textColor: textColor,
|
48928 |
+
value: childValue
|
48929 |
+
});
|
48930 |
+
});
|
48931 |
|
48932 |
+
var handleKeyDown = function handleKeyDown(event) {
|
48933 |
+
var target = event.target; // Keyboard navigation assumes that [role="tab"] are siblings
|
48934 |
+
// though we might warn in the future about nested, interactive elements
|
48935 |
+
// as a a11y violation
|
|
|
|
|
|
|
48936 |
|
48937 |
+
var role = target.getAttribute('role');
|
48938 |
|
48939 |
+
if (role !== 'tab') {
|
48940 |
+
return;
|
|
|
|
|
|
|
48941 |
}
|
|
|
48942 |
|
48943 |
+
var newFocusTarget = null;
|
48944 |
+
var previousItemKey = orientation !== "vertical" ? 'ArrowLeft' : 'ArrowUp';
|
48945 |
+
var nextItemKey = orientation !== "vertical" ? 'ArrowRight' : 'ArrowDown';
|
48946 |
+
|
48947 |
+
if (orientation !== "vertical" && theme.direction === 'rtl') {
|
48948 |
+
// swap previousItemKey with nextItemKey
|
48949 |
+
previousItemKey = 'ArrowRight';
|
48950 |
+
nextItemKey = 'ArrowLeft';
|
48951 |
+
}
|
48952 |
+
|
48953 |
+
switch (event.key) {
|
48954 |
+
case previousItemKey:
|
48955 |
+
newFocusTarget = target.previousElementSibling || tabListRef.current.lastChild;
|
48956 |
+
break;
|
48957 |
+
|
48958 |
+
case nextItemKey:
|
48959 |
+
newFocusTarget = target.nextElementSibling || tabListRef.current.firstChild;
|
48960 |
+
break;
|
48961 |
+
|
48962 |
+
case 'Home':
|
48963 |
+
newFocusTarget = tabListRef.current.firstChild;
|
48964 |
+
break;
|
48965 |
+
|
48966 |
+
case 'End':
|
48967 |
+
newFocusTarget = tabListRef.current.lastChild;
|
48968 |
+
break;
|
48969 |
|
48970 |
+
default:
|
48971 |
+
break;
|
|
|
48972 |
}
|
48973 |
|
48974 |
+
if (newFocusTarget !== null) {
|
48975 |
+
newFocusTarget.focus();
|
48976 |
+
event.preventDefault();
|
48977 |
+
}
|
48978 |
+
};
|
48979 |
|
48980 |
+
var conditionalElements = getConditionalElements();
|
48981 |
+
return /*#__PURE__*/react.createElement(Component, (0,esm_extends/* default */.Z)({
|
48982 |
+
className: (0,clsx_m/* default */.Z)(classes.root, className, vertical && classes.vertical),
|
48983 |
+
ref: ref
|
48984 |
+
}, other), conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/react.createElement("div", {
|
48985 |
+
className: (0,clsx_m/* default */.Z)(classes.scroller, scrollable ? classes.scrollable : classes.fixed),
|
48986 |
+
style: scrollerStyle,
|
48987 |
+
ref: tabsRef,
|
48988 |
+
onScroll: handleTabsScroll
|
48989 |
+
}, /*#__PURE__*/react.createElement("div", {
|
48990 |
+
"aria-label": ariaLabel,
|
48991 |
+
"aria-labelledby": ariaLabelledBy,
|
48992 |
+
className: (0,clsx_m/* default */.Z)(classes.flexContainer, vertical && classes.flexContainerVertical, centered && !scrollable && classes.centered),
|
48993 |
+
onKeyDown: handleKeyDown,
|
48994 |
+
ref: tabListRef,
|
48995 |
+
role: "tablist"
|
48996 |
+
}, children), mounted && indicator), conditionalElements.scrollButtonEnd);
|
48997 |
+
});
|
48998 |
+
false ? 0 : void 0;
|
48999 |
+
/* harmony default export */ var Tabs_Tabs = ((0,withStyles/* default */.Z)(Tabs_styles, {
|
49000 |
+
name: 'MuiTabs'
|
49001 |
+
})(Tabs));
|
49002 |
+
// EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js + 4 modules
|
49003 |
+
var makeStyles = __webpack_require__(73914);
|
49004 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/styles/makeStyles.js
|
49005 |
|
|
|
49006 |
|
|
|
49007 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49008 |
|
49009 |
+
function makeStyles_makeStyles(stylesOrCreator) {
|
49010 |
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
49011 |
+
return (0,makeStyles/* default */.Z)(stylesOrCreator, (0,esm_extends/* default */.Z)({
|
49012 |
+
defaultTheme: defaultTheme/* default */.Z
|
49013 |
+
}, options));
|
49014 |
+
}
|
49015 |
|
49016 |
+
/* harmony default export */ var styles_makeStyles = (makeStyles_makeStyles);
|
49017 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Containers/ContainerSettings/BreadcrumbSelect/BreadcrumbSelect.js
|
49018 |
+
function BreadcrumbSelect_slicedToArray(arr, i) { return BreadcrumbSelect_arrayWithHoles(arr) || BreadcrumbSelect_iterableToArrayLimit(arr, i) || BreadcrumbSelect_unsupportedIterableToArray(arr, i) || BreadcrumbSelect_nonIterableRest(); }
|
|
|
|
|
49019 |
|
49020 |
+
function BreadcrumbSelect_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
|
|
|
49021 |
|
49022 |
+
function BreadcrumbSelect_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return BreadcrumbSelect_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return BreadcrumbSelect_arrayLikeToArray(o, minLen); }
|
|
|
|
|
49023 |
|
49024 |
+
function BreadcrumbSelect_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
49025 |
|
49026 |
+
function BreadcrumbSelect_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
|
49027 |
|
49028 |
+
function BreadcrumbSelect_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
49029 |
|
|
|
|
|
|
|
49030 |
|
|
|
|
|
|
|
|
|
49031 |
|
|
|
49032 |
|
|
|
|
|
|
|
49033 |
|
|
|
|
|
|
|
|
|
|
|
49034 |
|
|
|
|
|
|
|
|
|
49035 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49036 |
|
49037 |
+
var useStyles = styles_makeStyles(function () {
|
49038 |
+
return {
|
49039 |
+
selected: {
|
49040 |
+
color: "#ed8219",
|
49041 |
+
backgroundColor: "#fae1ca !important",
|
49042 |
+
cursor: "default",
|
49043 |
+
pointerEvents: "none"
|
49044 |
}
|
49045 |
+
};
|
49046 |
+
});
|
49047 |
|
49048 |
+
function BreadcrumbSelect(_ref) {
|
49049 |
+
var button = _ref.button,
|
49050 |
+
group = _ref.group,
|
49051 |
+
groups = _ref.groups,
|
49052 |
+
history = _ref.history,
|
49053 |
+
getChildrenIndex = _ref.getChildrenIndex;
|
49054 |
+
var page = "";
|
49055 |
|
49056 |
+
if (["style", "general", "advanced"].indexOf(history.location.pathname.substr(history.location.pathname.lastIndexOf("/") + 1)) > -1) {
|
49057 |
+
page = "/".concat(history.location.pathname.substr(history.location.pathname.lastIndexOf("/") + 1));
|
49058 |
+
}
|
49059 |
|
49060 |
+
var _React$useState = react.useState(null),
|
49061 |
+
_React$useState2 = BreadcrumbSelect_slicedToArray(_React$useState, 2),
|
49062 |
+
anchorEl = _React$useState2[0],
|
49063 |
+
setAnchorEl = _React$useState2[1];
|
49064 |
|
49065 |
+
var classes = useStyles();
|
|
|
|
|
49066 |
|
49067 |
+
var handleClick = function handleClick(event) {
|
49068 |
+
setAnchorEl(event.currentTarget);
|
49069 |
+
};
|
49070 |
|
49071 |
+
var handleClose = function handleClose() {
|
49072 |
+
setAnchorEl(null);
|
49073 |
+
};
|
|
|
49074 |
|
49075 |
+
var handleRedirect = function handleRedirect(objectId) {
|
49076 |
+
setAnchorEl(null); // If button is defined and not group
|
|
|
49077 |
|
49078 |
+
if (button) {
|
49079 |
+
history.push("/group/".concat(button.parent, "/button/").concat(objectId).concat(page));
|
49080 |
+
} // If group is defined and not button
|
49081 |
+
else if (group) {
|
49082 |
+
history.push("/group/".concat(objectId).concat(page));
|
49083 |
}
|
49084 |
+
};
|
49085 |
|
49086 |
+
var open = Boolean(anchorEl);
|
49087 |
+
var id = open ? "simple-popover" : undefined; // Return Element
|
|
|
|
|
49088 |
|
49089 |
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(Button_Button, {
|
49090 |
+
className: "breadcrumb-button",
|
49091 |
+
"aria-describedby": id,
|
49092 |
+
color: "secondary",
|
49093 |
+
variant: "contained",
|
49094 |
+
onClick: handleClick,
|
49095 |
+
"data-testid": "breadcrumb:button"
|
49096 |
+
}, /*#__PURE__*/react.createElement("span", {
|
49097 |
+
className: "breadcrumb-text",
|
49098 |
+
"data-testid": "breadcrumb:name"
|
49099 |
+
}, button ? button.name : group.name), /*#__PURE__*/react.createElement("i", {
|
49100 |
+
className: "fas fa-chevron-down"
|
49101 |
+
})), /*#__PURE__*/react.createElement(Popover_Popover, {
|
49102 |
+
id: id,
|
49103 |
+
className: "button-select-menu",
|
49104 |
+
open: open,
|
49105 |
+
anchorEl: anchorEl,
|
49106 |
+
onClose: handleClose,
|
49107 |
+
anchorOrigin: {
|
49108 |
+
vertical: "bottom",
|
49109 |
+
horizontal: "center"
|
49110 |
+
},
|
49111 |
+
transformOrigin: {
|
49112 |
+
vertical: "top",
|
49113 |
+
horizontal: "center"
|
49114 |
+
},
|
49115 |
+
"data-testid": "breadcrumb:popup"
|
49116 |
+
}, button ? Object.values(getChildrenIndex(groups[button.parent].children)).map(function (buttonData, key) {
|
49117 |
+
return /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49118 |
+
key: key,
|
49119 |
+
className: "breadcrumb-select-options",
|
49120 |
+
onClick: function onClick() {
|
49121 |
+
return handleRedirect(buttonData.id);
|
49122 |
+
},
|
49123 |
+
"data-testid": "breadcrumbitem:".concat(dlv_umd_default()(buttonData, "name", "test-id")),
|
49124 |
+
classes: {
|
49125 |
+
selected: classes.selected
|
49126 |
+
},
|
49127 |
+
selected: button.id === buttonData.id
|
49128 |
+
}, buttonData.name);
|
49129 |
+
}) : Object.entries(groups).map(function (groupData, key) {
|
49130 |
+
return /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49131 |
+
className: "breadcrumb-select-options",
|
49132 |
+
key: key,
|
49133 |
+
onClick: function onClick() {
|
49134 |
+
return handleRedirect(groupData[1].id);
|
49135 |
+
},
|
49136 |
+
classes: {
|
49137 |
+
selected: classes.selected
|
49138 |
+
},
|
49139 |
+
"data-testid": "breadcrumbitem:".concat(dlv_umd_default()(groupData[1], "name", "test-id")),
|
49140 |
+
selected: button ? button.parent === groupData[1].id : group.id === groupData[1].id
|
49141 |
+
}, groupData[1].name);
|
49142 |
+
})));
|
49143 |
+
}
|
49144 |
|
49145 |
+
var BreadcrumbSelectWithRouter = withRouter(BreadcrumbSelect);
|
49146 |
+
/* harmony default export */ var BreadcrumbSelect_BreadcrumbSelect = (connect(function (state) {
|
49147 |
+
return {
|
49148 |
+
groups: state.groups,
|
49149 |
+
getChildrenIndex: function getChildrenIndex(groupId) {
|
49150 |
+
return selectors_getChildrenIndex(groupId, state);
|
49151 |
+
}
|
49152 |
+
};
|
49153 |
+
})(BreadcrumbSelectWithRouter));
|
49154 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Containers/ButtonContainer/ButtonHeader/ButtonHeader.js
|
49155 |
+
function ButtonHeader_extends() { ButtonHeader_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonHeader_extends.apply(this, arguments); }
|
49156 |
|
|
|
|
|
49157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
49158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49159 |
|
|
|
49160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49161 |
|
|
|
49162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
49163 |
|
|
|
|
|
|
|
49164 |
|
49165 |
|
49166 |
+
function ButtonHeader(_ref) {
|
49167 |
+
var group = _ref.group,
|
49168 |
+
button = _ref.button,
|
49169 |
+
history = _ref.history,
|
49170 |
+
_ref$tab = _ref.tab,
|
49171 |
+
tab = _ref$tab === void 0 ? 0 : _ref$tab;
|
49172 |
|
49173 |
+
var LinkTab = function LinkTab(props) {
|
49174 |
+
var url = "/group/".concat(group.id, "/button/").concat(button.id, "/").concat(props.page);
|
49175 |
+
return /*#__PURE__*/react.createElement(Tab_Tab, ButtonHeader_extends({
|
49176 |
+
component: "a",
|
49177 |
+
href: "#".concat(url),
|
49178 |
+
onClick: function onClick() {
|
49179 |
+
if (history.location.pathname !== url) {
|
49180 |
+
history.push(url);
|
49181 |
+
}
|
49182 |
+
},
|
49183 |
+
"data-testid": "buttongroupheader:button:".concat(props.page)
|
49184 |
+
}, props));
|
49185 |
+
};
|
49186 |
|
49187 |
+
return /*#__PURE__*/react.createElement("div", {
|
49188 |
+
className: "bar-header"
|
49189 |
+
}, /*#__PURE__*/react.createElement("div", {
|
49190 |
+
className: "breadcrumb"
|
49191 |
+
}, /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
49192 |
+
content: translate("bar.breadcrumb.tippy_home"),
|
49193 |
+
arrow: false
|
49194 |
+
}, /*#__PURE__*/react.createElement(Button_Button, {
|
49195 |
+
onClick: function onClick() {
|
49196 |
+
history.push("/");
|
49197 |
+
},
|
49198 |
+
color: "primary",
|
49199 |
+
className: "home-button"
|
49200 |
+
}, /*#__PURE__*/react.createElement("span", {
|
49201 |
+
className: "breadcrumb-text"
|
49202 |
+
}, translate("bar.breadcrumb.home")), /*#__PURE__*/react.createElement("i", {
|
49203 |
+
className: "fas fa-chevron-right"
|
49204 |
+
}))), /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
49205 |
+
content: translate("bar.breadcrumb.tippy_group"),
|
49206 |
+
arrow: false
|
49207 |
+
}, /*#__PURE__*/react.createElement(Button_Button, {
|
49208 |
+
onClick: function onClick() {
|
49209 |
+
history.push("/group/".concat(group.id));
|
49210 |
+
},
|
49211 |
+
color: "primary"
|
49212 |
+
}, /*#__PURE__*/react.createElement("span", {
|
49213 |
+
className: "breadcrumb-text"
|
49214 |
+
}, group.name), /*#__PURE__*/react.createElement("i", {
|
49215 |
+
className: "fas fa-chevron-right"
|
49216 |
+
}))), /*#__PURE__*/react.createElement(BreadcrumbSelect_BreadcrumbSelect, {
|
49217 |
+
button: button
|
49218 |
+
})), /*#__PURE__*/react.createElement(RandomTip_RandomTip, null), /*#__PURE__*/react.createElement("div", {
|
49219 |
+
className: "back-to-group"
|
49220 |
+
}, /*#__PURE__*/react.createElement("a", {
|
49221 |
+
href: "#/group/" + group.id
|
49222 |
+
}, /*#__PURE__*/react.createElement("i", {
|
49223 |
+
className: "fas fa-chevron-down"
|
49224 |
+
}), translate("bar.edit_group_settings"))), /*#__PURE__*/react.createElement("div", {
|
49225 |
+
className: "mdc-card top-header"
|
49226 |
+
}, /*#__PURE__*/react.createElement(Tabs_Tabs, {
|
49227 |
+
value: tab,
|
49228 |
+
variant: "fullWidth",
|
49229 |
+
indicatorColor: "secondary",
|
49230 |
+
textColor: "secondary",
|
49231 |
+
className: "tab-bordered"
|
49232 |
+
}, /*#__PURE__*/react.createElement(LinkTab, {
|
49233 |
+
label: translate("settings.setting_categories.general"),
|
49234 |
+
id: 0,
|
49235 |
+
page: "general",
|
49236 |
+
"data-testid": "general-tab",
|
49237 |
+
icon: /*#__PURE__*/react.createElement("i", {
|
49238 |
+
className: "fas fa-wrench"
|
49239 |
+
})
|
49240 |
+
}), /*#__PURE__*/react.createElement(LinkTab, {
|
49241 |
+
label: translate("utils.style"),
|
49242 |
+
id: 1,
|
49243 |
+
page: "style",
|
49244 |
+
"data-testid": "style-tab",
|
49245 |
+
icon: /*#__PURE__*/react.createElement("i", {
|
49246 |
+
className: "fas fa-paint-brush"
|
49247 |
+
})
|
49248 |
+
}), /*#__PURE__*/react.createElement(LinkTab, {
|
49249 |
+
label: translate("utils.advanced"),
|
49250 |
+
id: 2,
|
49251 |
+
page: "advanced",
|
49252 |
+
"data-testid": "advanced-tab",
|
49253 |
+
icon: /*#__PURE__*/react.createElement("i", {
|
49254 |
+
className: "fas fa-sliders-h"
|
49255 |
+
})
|
49256 |
+
}))));
|
49257 |
+
}
|
49258 |
|
49259 |
+
/* harmony default export */ var ButtonHeader_ButtonHeader = (withRouter(ButtonHeader));
|
49260 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/CollapsibleGroup/CollapsibleGroup.js
|
49261 |
+
function CollapsibleGroup_extends() { CollapsibleGroup_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return CollapsibleGroup_extends.apply(this, arguments); }
|
|
|
|
|
|
|
|
|
|
|
|
|
49262 |
|
49263 |
+
function CollapsibleGroup_slicedToArray(arr, i) { return CollapsibleGroup_arrayWithHoles(arr) || CollapsibleGroup_iterableToArrayLimit(arr, i) || CollapsibleGroup_unsupportedIterableToArray(arr, i) || CollapsibleGroup_nonIterableRest(); }
|
|
|
49264 |
|
49265 |
+
function CollapsibleGroup_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
49266 |
|
49267 |
+
function CollapsibleGroup_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return CollapsibleGroup_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return CollapsibleGroup_arrayLikeToArray(o, minLen); }
|
|
|
|
|
|
|
|
|
|
|
49268 |
|
49269 |
+
function CollapsibleGroup_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
49270 |
|
49271 |
+
function CollapsibleGroup_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49272 |
|
49273 |
+
function CollapsibleGroup_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
49274 |
|
49275 |
+
function CollapsibleGroup_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = CollapsibleGroup_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
|
|
|
|
|
|
|
49276 |
|
49277 |
+
function CollapsibleGroup_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
|
|
|
|
|
49278 |
|
|
|
49279 |
|
|
|
|
|
|
|
|
|
49280 |
|
|
|
|
|
|
|
|
|
49281 |
|
|
|
49282 |
|
49283 |
+
function CollapsibleGroup(_ref) {
|
49284 |
+
var _ref$opened = _ref.opened,
|
49285 |
+
opened = _ref$opened === void 0 ? false : _ref$opened,
|
49286 |
+
_ref$title = _ref.title,
|
49287 |
+
title = _ref$title === void 0 ? "" : _ref$title,
|
49288 |
+
_ref$bodySpacing = _ref.bodySpacing,
|
49289 |
+
bodySpacing = _ref$bodySpacing === void 0 ? true : _ref$bodySpacing,
|
49290 |
+
_ref$className = _ref.className,
|
49291 |
+
className = _ref$className === void 0 ? null : _ref$className,
|
49292 |
+
children = _ref.children,
|
49293 |
+
onSetIsOpened = _ref.onSetIsOpened,
|
49294 |
+
groupProps = CollapsibleGroup_objectWithoutProperties(_ref, ["opened", "title", "bodySpacing", "className", "children", "onSetIsOpened"]);
|
49295 |
|
49296 |
+
if (children == null) return null;
|
|
|
|
|
|
|
49297 |
|
49298 |
+
var _useState = (0,react.useState)(opened),
|
49299 |
+
_useState2 = CollapsibleGroup_slicedToArray(_useState, 2),
|
49300 |
+
isOpened = _useState2[0],
|
49301 |
+
setIsOpened = _useState2[1];
|
49302 |
|
49303 |
+
(0,react.useEffect)(function () {
|
49304 |
+
setIsOpened(opened);
|
49305 |
+
}, [opened]);
|
49306 |
+
|
49307 |
+
var handleClick = function handleClick() {
|
49308 |
+
var newIsOpened = !isOpened;
|
49309 |
+
onSetIsOpened && onSetIsOpened(newIsOpened);
|
49310 |
+
setIsOpened(newIsOpened);
|
49311 |
};
|
49312 |
|
49313 |
+
return /*#__PURE__*/react.createElement("div", {
|
49314 |
+
className: (0,clsx_m/* default */.Z)("collapsible-group mdc-card", isOpened && "collapsible-opened", className)
|
49315 |
+
}, /*#__PURE__*/react.createElement(Button_Button, CollapsibleGroup_extends({
|
49316 |
+
onClick: handleClick,
|
49317 |
+
color: "primary"
|
49318 |
+
}, groupProps), title, " ", /*#__PURE__*/react.createElement("i", {
|
49319 |
+
className: "fas fa-chevron-down"
|
49320 |
+
})), isOpened && /*#__PURE__*/react.createElement("div", {
|
49321 |
+
className: (0,clsx_m/* default */.Z)(bodySpacing && "collapsible-body")
|
49322 |
+
}, children));
|
49323 |
+
}
|
49324 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/SettingsContainer/SettingsContainer.js
|
49325 |
+
function SettingsContainer_extends() { SettingsContainer_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return SettingsContainer_extends.apply(this, arguments); }
|
49326 |
|
49327 |
+
function SettingsContainer_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = SettingsContainer_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
|
|
|
|
|
|
|
49328 |
|
49329 |
+
function SettingsContainer_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
|
49330 |
|
|
|
49331 |
|
|
|
|
|
|
|
49332 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49333 |
|
|
|
|
|
|
|
|
|
49334 |
|
|
|
|
|
|
|
49335 |
|
49336 |
+
function SettingsContainer(_ref) {
|
49337 |
+
var _ref$className = _ref.className,
|
49338 |
+
className = _ref$className === void 0 ? null : _ref$className,
|
49339 |
+
_ref$title = _ref.title,
|
49340 |
+
title = _ref$title === void 0 ? null : _ref$title,
|
49341 |
+
_ref$children = _ref.children,
|
49342 |
+
children = _ref$children === void 0 ? null : _ref$children,
|
49343 |
+
_ref$fullWidth = _ref.fullWidth,
|
49344 |
+
fullWidth = _ref$fullWidth === void 0 ? true : _ref$fullWidth,
|
49345 |
+
_ref$tooltip = _ref.tooltip,
|
49346 |
+
tooltip = _ref$tooltip === void 0 ? null : _ref$tooltip,
|
49347 |
+
props = SettingsContainer_objectWithoutProperties(_ref, ["className", "title", "children", "fullWidth", "tooltip"]);
|
49348 |
|
49349 |
+
return /*#__PURE__*/react.createElement("div", SettingsContainer_extends({
|
49350 |
+
className: (0,clsx_m/* default */.Z)("settings-container", fullWidth && "container-full-width", className)
|
49351 |
+
}, props), title ? /*#__PURE__*/react.createElement("span", {
|
49352 |
+
className: "settings-title"
|
49353 |
+
}, title, tooltip == null ? null : /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
49354 |
+
content: tooltip,
|
49355 |
+
ignorePreference: true,
|
49356 |
+
disabled: tooltip == null
|
49357 |
+
}, /*#__PURE__*/react.createElement(Icon_Icon, {
|
49358 |
+
color: "primary",
|
49359 |
+
fontSize: "small",
|
49360 |
+
className: "fas fa-info-circle"
|
49361 |
+
}))) : /*#__PURE__*/react.createElement(react.Fragment, null), /*#__PURE__*/react.createElement("div", {
|
49362 |
+
className: "settings-content"
|
49363 |
+
}, children));
|
49364 |
+
}
|
49365 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/Visibility/Visibility.js
|
49366 |
+
function Visibility_slicedToArray(arr, i) { return Visibility_arrayWithHoles(arr) || Visibility_iterableToArrayLimit(arr, i) || Visibility_unsupportedIterableToArray(arr, i) || Visibility_nonIterableRest(); }
|
49367 |
|
49368 |
+
function Visibility_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
49369 |
|
49370 |
+
function Visibility_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Visibility_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Visibility_arrayLikeToArray(o, minLen); }
|
|
|
|
|
|
|
|
|
49371 |
|
49372 |
+
function Visibility_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
49373 |
|
49374 |
+
function Visibility_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
|
|
|
|
|
|
|
|
|
49375 |
|
49376 |
+
function Visibility_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
|
|
49377 |
|
|
|
|
|
49378 |
|
|
|
|
|
|
|
|
|
|
|
|
|
49379 |
|
|
|
|
|
|
|
49380 |
|
|
|
|
|
|
|
|
|
49381 |
|
|
|
|
|
|
|
|
|
49382 |
|
|
|
|
|
|
|
49383 |
|
49384 |
+
function Visibility(_ref) {
|
49385 |
+
var _ref$mobile = _ref.mobile,
|
49386 |
+
mobile = _ref$mobile === void 0 ? false : _ref$mobile,
|
49387 |
+
_ref$desktop = _ref.desktop,
|
49388 |
+
desktop = _ref$desktop === void 0 ? false : _ref$desktop,
|
49389 |
+
onChange = _ref.onChange;
|
49390 |
|
49391 |
+
var _useState = (0,react.useState)(mobile),
|
49392 |
+
_useState2 = Visibility_slicedToArray(_useState, 2),
|
49393 |
+
mobileSelected = _useState2[0],
|
49394 |
+
setMobileSelected = _useState2[1];
|
49395 |
|
49396 |
+
var _useState3 = (0,react.useState)(desktop),
|
49397 |
+
_useState4 = Visibility_slicedToArray(_useState3, 2),
|
49398 |
+
desktopSelected = _useState4[0],
|
49399 |
+
setDesktopSelected = _useState4[1];
|
|
|
|
|
49400 |
|
49401 |
+
(0,react.useEffect)(function () {
|
49402 |
+
setMobileSelected(mobile);
|
49403 |
+
setDesktopSelected(desktop);
|
49404 |
+
}, [mobile, desktop]);
|
49405 |
+
return /*#__PURE__*/react.createElement(SettingsContainer, {
|
49406 |
+
title: translate("settings.show_mobile_desktop.title"),
|
49407 |
+
fullWidth: false,
|
49408 |
+
className: "desktop-mobile-visibility"
|
49409 |
+
}, /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
49410 |
+
content: translate("settings.show_mobile_desktop.mobile")
|
49411 |
+
}, /*#__PURE__*/react.createElement(Button_Button, {
|
49412 |
+
className: "buttonMobile",
|
49413 |
+
onClick: function onClick() {
|
49414 |
+
var update = !mobileSelected;
|
49415 |
+
setMobileSelected(update);
|
49416 |
+
onChange("show_mobile", update);
|
49417 |
+
},
|
49418 |
+
variant: mobileSelected ? "contained" : "outlined",
|
49419 |
+
color: "primary",
|
49420 |
+
"data-testid": "setting:mobile-visibility"
|
49421 |
+
}, /*#__PURE__*/react.createElement("i", {
|
49422 |
+
className: "fas fa-mobile-alt"
|
49423 |
+
}))), /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
49424 |
+
content: translate("settings.show_mobile_desktop.desktop")
|
49425 |
+
}, /*#__PURE__*/react.createElement(Button_Button, {
|
49426 |
+
onClick: function onClick() {
|
49427 |
+
var update = !desktopSelected;
|
49428 |
+
setDesktopSelected(update);
|
49429 |
+
onChange("show_desktop", update);
|
49430 |
+
},
|
49431 |
+
variant: desktopSelected ? "contained" : "outlined",
|
49432 |
+
color: "primary",
|
49433 |
+
"data-testid": "setting:desktop-visibility"
|
49434 |
+
}, /*#__PURE__*/react.createElement("i", {
|
49435 |
+
className: "fas fa-desktop"
|
49436 |
+
}))));
|
49437 |
+
}
|
49438 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/Label/Label.js
|
49439 |
+
function Label_slicedToArray(arr, i) { return Label_arrayWithHoles(arr) || Label_iterableToArrayLimit(arr, i) || Label_unsupportedIterableToArray(arr, i) || Label_nonIterableRest(); }
|
49440 |
|
49441 |
+
function Label_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
49442 |
|
49443 |
+
function Label_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Label_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Label_arrayLikeToArray(o, minLen); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49444 |
|
49445 |
+
function Label_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
49446 |
|
49447 |
+
function Label_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49448 |
|
49449 |
+
function Label_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49450 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49452 |
|
|
|
|
|
|
|
49453 |
|
49454 |
+
function Label(_ref) {
|
49455 |
+
var value = _ref.value,
|
49456 |
+
_onChange = _ref.onChange,
|
49457 |
+
_ref$placeholder = _ref.placeholder,
|
49458 |
+
placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder;
|
49459 |
|
49460 |
+
var _useState = (0,react.useState)(value),
|
49461 |
+
_useState2 = Label_slicedToArray(_useState, 2),
|
49462 |
+
label = _useState2[0],
|
49463 |
+
setLabel = _useState2[1];
|
|
|
49464 |
|
49465 |
+
var _useState3 = (0,react.useState)(true),
|
49466 |
+
_useState4 = Label_slicedToArray(_useState3, 2),
|
49467 |
+
usePlaceholder = _useState4[0],
|
49468 |
+
setUsePlaceholder = _useState4[1];
|
49469 |
|
49470 |
+
var _useState5 = (0,react.useState)(placeholder),
|
49471 |
+
_useState6 = Label_slicedToArray(_useState5, 2),
|
49472 |
+
labelPlaceholder = _useState6[0],
|
49473 |
+
setPlaceholder = _useState6[1];
|
49474 |
|
49475 |
+
(0,react.useEffect)(function () {
|
49476 |
+
setLabel(value);
|
49477 |
+
}, [value]);
|
49478 |
+
(0,react.useEffect)(function () {
|
49479 |
+
setPlaceholder(placeholder);
|
49480 |
+
setUsePlaceholder(true);
|
49481 |
+
}, [placeholder]);
|
49482 |
+
return /*#__PURE__*/react.createElement(TextField_TextField, {
|
49483 |
+
variant: "outlined",
|
49484 |
+
label: translate("settings.label.placeholder"),
|
49485 |
+
onChange: function onChange(obj) {
|
49486 |
+
setUsePlaceholder(false);
|
49487 |
+
setLabel(obj.target.value);
|
49488 |
|
49489 |
+
_onChange(obj.target.value);
|
49490 |
+
},
|
49491 |
+
value: label ? label : usePlaceholder ? labelPlaceholder : label,
|
49492 |
+
fullWidth: true,
|
49493 |
+
inputProps: {
|
49494 |
+
"data-testid": "setting:label"
|
49495 |
+
},
|
49496 |
+
className: "general-label-text"
|
49497 |
+
});
|
49498 |
+
}
|
49499 |
+
// EXTERNAL MODULE: ./node_modules/validator/lib/isEmail.js
|
49500 |
+
var isEmail = __webpack_require__(83868);
|
49501 |
+
var isEmail_default = /*#__PURE__*/__webpack_require__.n(isEmail);
|
49502 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/Mail/Mail.js
|
49503 |
+
function Mail_slicedToArray(arr, i) { return Mail_arrayWithHoles(arr) || Mail_iterableToArrayLimit(arr, i) || Mail_unsupportedIterableToArray(arr, i) || Mail_nonIterableRest(); }
|
49504 |
|
49505 |
+
function Mail_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49506 |
|
49507 |
+
function Mail_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Mail_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Mail_arrayLikeToArray(o, minLen); }
|
|
|
49508 |
|
49509 |
+
function Mail_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
49510 |
|
49511 |
+
function Mail_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
|
|
|
49512 |
|
49513 |
+
function Mail_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
|
|
|
|
49514 |
|
|
|
|
|
|
|
49515 |
|
|
|
49516 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49517 |
|
|
|
49518 |
|
49519 |
+
function Mail(_ref) {
|
49520 |
+
var _ref$value = _ref.value,
|
49521 |
+
value = _ref$value === void 0 ? "" : _ref$value,
|
49522 |
+
_ref$subject = _ref.subject,
|
49523 |
+
subject = _ref$subject === void 0 ? "" : _ref$subject,
|
49524 |
+
_ref$body = _ref.body,
|
49525 |
+
body = _ref$body === void 0 ? "" : _ref$body,
|
49526 |
+
_ref$cc = _ref.cc,
|
49527 |
+
cc = _ref$cc === void 0 ? "" : _ref$cc,
|
49528 |
+
_ref$bcc = _ref.bcc,
|
49529 |
+
bcc = _ref$bcc === void 0 ? "" : _ref$bcc,
|
49530 |
+
_onChange = _ref.onChange;
|
49531 |
|
49532 |
+
var _useState = (0,react.useState)(cc !== ""),
|
49533 |
+
_useState2 = Mail_slicedToArray(_useState, 2),
|
49534 |
+
showCC = _useState2[0],
|
49535 |
+
setShowCC = _useState2[1];
|
|
|
49536 |
|
49537 |
+
var _useState3 = (0,react.useState)(bcc !== ""),
|
49538 |
+
_useState4 = Mail_slicedToArray(_useState3, 2),
|
49539 |
+
showBCC = _useState4[0],
|
49540 |
+
setShowBCC = _useState4[1];
|
49541 |
|
49542 |
+
var isInvalid = value !== "" ? !isEmail_default()(value) : false;
|
49543 |
+
return /*#__PURE__*/react.createElement("div", {
|
49544 |
+
className: "button-action-value"
|
49545 |
+
}, /*#__PURE__*/react.createElement(TextField_TextField, {
|
49546 |
+
variant: "outlined",
|
49547 |
+
fullWidth: true,
|
49548 |
+
value: value,
|
49549 |
+
inputProps: {
|
49550 |
+
"data-testid": "action:field"
|
49551 |
+
},
|
49552 |
+
label: translate("settings.button_action.placeholders.mail.recipient"),
|
49553 |
+
helperText: isInvalid ? translate("settings.button_action.actions.mail.invalid") : null,
|
49554 |
+
error: isInvalid,
|
49555 |
+
onChange: function onChange(obj) {
|
49556 |
+
_onChange(obj.target.value);
|
49557 |
}
|
49558 |
+
}), /*#__PURE__*/react.createElement(TextField_TextField, {
|
49559 |
+
variant: "outlined",
|
49560 |
+
fullWidth: true,
|
49561 |
+
value: subject,
|
49562 |
+
label: translate("settings.button_action.placeholders.mail.subject"),
|
49563 |
+
onChange: function onChange(obj) {
|
49564 |
+
_onChange(obj.target.value, "text_subject");
|
49565 |
+
},
|
49566 |
+
inputProps: {
|
49567 |
+
"data-testid": "action:field"
|
49568 |
+
}
|
49569 |
+
}), showCC ? /*#__PURE__*/react.createElement(TextField_TextField, {
|
49570 |
+
variant: "outlined",
|
49571 |
+
fullWidth: true,
|
49572 |
+
value: cc,
|
49573 |
+
label: translate("settings.button_action.placeholders.mail.cc"),
|
49574 |
+
onChange: function onChange(obj) {
|
49575 |
+
_onChange(obj.target.value, "text_cc");
|
49576 |
+
}
|
49577 |
+
}) : /*#__PURE__*/react.createElement(Button_Button, {
|
49578 |
+
color: "primary",
|
49579 |
+
size: "small",
|
49580 |
+
style: {
|
49581 |
+
textTransform: "capitalize",
|
49582 |
+
marginBottom: "15px"
|
49583 |
+
},
|
49584 |
+
startIcon: "+",
|
49585 |
+
onClick: function onClick() {
|
49586 |
+
return setShowCC(true);
|
49587 |
+
}
|
49588 |
+
}, "Cc"), showBCC ? /*#__PURE__*/react.createElement(TextField_TextField, {
|
49589 |
+
variant: "outlined",
|
49590 |
+
fullWidth: true,
|
49591 |
+
value: bcc,
|
49592 |
+
label: translate("settings.button_action.placeholders.mail.bcc"),
|
49593 |
+
onChange: function onChange(obj) {
|
49594 |
+
_onChange(obj.target.value, "text_bcc");
|
49595 |
+
}
|
49596 |
+
}) : /*#__PURE__*/react.createElement(Button_Button, {
|
49597 |
+
color: "primary",
|
49598 |
+
size: "small",
|
49599 |
+
style: {
|
49600 |
+
textTransform: "capitalize",
|
49601 |
+
marginBottom: "15px"
|
49602 |
+
},
|
49603 |
+
onClick: function onClick() {
|
49604 |
+
return setShowBCC(true);
|
49605 |
+
},
|
49606 |
+
startIcon: "+"
|
49607 |
+
}, "Bcc"), /*#__PURE__*/react.createElement(TextField_TextField, {
|
49608 |
+
variant: "outlined",
|
49609 |
+
fullWidth: true,
|
49610 |
+
multiline: true,
|
49611 |
+
rows: 4,
|
49612 |
+
inputProps: {
|
49613 |
+
"data-testid": "action:field"
|
49614 |
+
},
|
49615 |
+
value: body,
|
49616 |
+
label: translate("settings.button_action.placeholders.mail.body"),
|
49617 |
+
onChange: function onChange(obj) {
|
49618 |
+
_onChange(obj.target.value, "text_body");
|
49619 |
}
|
49620 |
+
}));
|
49621 |
+
}
|
49622 |
+
// EXTERNAL MODULE: ./node_modules/validator/lib/isMobilePhone.js
|
49623 |
+
var isMobilePhone = __webpack_require__(28355);
|
49624 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/WhatsApp/WhatsApp.js
|
49625 |
|
|
|
|
|
|
|
49626 |
|
|
|
|
|
|
|
49627 |
|
49628 |
+
|
49629 |
+
function WhatsApp(_ref) {
|
49630 |
+
var _ref$value = _ref.value,
|
49631 |
+
value = _ref$value === void 0 ? "" : _ref$value,
|
49632 |
+
_ref$body = _ref.body,
|
49633 |
+
body = _ref$body === void 0 ? "" : _ref$body,
|
49634 |
+
_onChange = _ref.onChange;
|
49635 |
+
var isValidPhoneNumber = value !== "" ? (0,isMobilePhone/* default */.ZP)(value, "any", {}) : true;
|
49636 |
+
return /*#__PURE__*/react.createElement("div", {
|
49637 |
+
className: "button-action-subject"
|
49638 |
+
}, /*#__PURE__*/react.createElement(TextField_TextField, {
|
49639 |
+
variant: "outlined",
|
49640 |
+
fullWidth: true,
|
49641 |
+
value: value,
|
49642 |
+
helperText: !isValidPhoneNumber ? translate("settings.button_action.actions.phone_number.invalid") : null,
|
49643 |
+
error: !isValidPhoneNumber,
|
49644 |
+
label: translate("settings.button_action.actions.phone_number.number"),
|
49645 |
+
inputProps: {
|
49646 |
+
"data-testid": "action:field"
|
49647 |
+
},
|
49648 |
+
onChange: function onChange(obj) {
|
49649 |
+
_onChange(obj.target.value);
|
49650 |
+
}
|
49651 |
+
}), /*#__PURE__*/react.createElement(TextField_TextField, {
|
49652 |
+
variant: "outlined",
|
49653 |
+
fullWidth: true,
|
49654 |
+
multiline: true,
|
49655 |
+
rows: 4,
|
49656 |
+
value: body,
|
49657 |
+
label: translate("settings.button_action.placeholders.message"),
|
49658 |
+
inputProps: {
|
49659 |
+
"data-testid": "action:field"
|
49660 |
+
},
|
49661 |
+
onChange: function onChange(obj) {
|
49662 |
+
_onChange(obj.target.value, "text_body");
|
49663 |
}
|
49664 |
+
}), /*#__PURE__*/react.createElement("p", {
|
49665 |
+
dangerouslySetInnerHTML: {
|
49666 |
+
__html: translate("settings.button_action.actions.whatsapp_info")
|
49667 |
+
}
|
49668 |
+
}));
|
49669 |
+
}
|
49670 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/SocialSharing/SocialSharing.js
|
49671 |
+
function SocialSharing_slicedToArray(arr, i) { return SocialSharing_arrayWithHoles(arr) || SocialSharing_iterableToArrayLimit(arr, i) || SocialSharing_unsupportedIterableToArray(arr, i) || SocialSharing_nonIterableRest(); }
|
49672 |
|
49673 |
+
function SocialSharing_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
|
49674 |
|
49675 |
+
function SocialSharing_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return SocialSharing_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return SocialSharing_arrayLikeToArray(o, minLen); }
|
|
|
49676 |
|
49677 |
+
function SocialSharing_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
|
49678 |
|
49679 |
+
function SocialSharing_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
|
|
|
49680 |
|
49681 |
+
function SocialSharing_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49682 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49683 |
|
|
|
|
|
|
|
49684 |
|
|
|
|
|
|
|
|
|
|
|
49685 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49686 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49687 |
|
49688 |
|
49689 |
+
var SocialSharing_useStyles = styles_makeStyles(function (theme) {
|
49690 |
+
return {
|
49691 |
+
item: {
|
49692 |
+
padding: "6px 31px"
|
49693 |
+
},
|
49694 |
+
group: {
|
49695 |
+
fontWeight: theme.typography.fontWeightMedium,
|
49696 |
+
opacity: 1,
|
49697 |
+
cursor: "default",
|
49698 |
+
pointerEvents: "none",
|
49699 |
+
userSelect: "none",
|
49700 |
+
fontSize: "17px"
|
49701 |
}
|
49702 |
+
};
|
49703 |
+
});
|
49704 |
+
function SocialSharing(_ref) {
|
49705 |
+
var _ref$value = _ref.value,
|
49706 |
+
value = _ref$value === void 0 ? "" : _ref$value,
|
49707 |
+
_ref$body = _ref.body,
|
49708 |
+
body = _ref$body === void 0 ? "" : _ref$body,
|
49709 |
+
_onChange = _ref.onChange;
|
49710 |
+
var values = ["facebook", "twitter", "whatsapp", "linkedin", "pinterest", "mail", "sms", "reddit", "tumblr", "weibo", "vk", "ok", "xing", "blogger", "flipboard", "line"];
|
49711 |
+
var valuesWithBody = ["twitter", "whatsapp", "mail", "sms", "vk", "blogger", "tumblr", "weibo"];
|
49712 |
+
var parameters = {
|
49713 |
+
"Site URL": "[site-url]",
|
49714 |
+
"Site Title": "[site-title]"
|
49715 |
+
};
|
49716 |
+
var inputLabel = (0,react.useRef)(null);
|
49717 |
+
var bodyInputRef = (0,react.useRef)(null);
|
49718 |
|
49719 |
+
var _useState = (0,react.useState)([]),
|
49720 |
+
_useState2 = SocialSharing_slicedToArray(_useState, 2),
|
49721 |
+
selection = _useState2[0],
|
49722 |
+
setSelection = _useState2[1]; // make sure parameters are inserted at selection
|
49723 |
|
|
|
|
|
49724 |
|
49725 |
+
var changeSelection = function changeSelection() {
|
49726 |
+
return setSelection([bodyInputRef.current.selectionStart, bodyInputRef.current.selectionEnd]);
|
49727 |
+
}; // we want the parameter to insert at the end if there is no focus
|
49728 |
|
|
|
|
|
49729 |
|
49730 |
+
var removeSelection = function removeSelection(event) {
|
49731 |
+
return !dlv_umd_default()(event, "relatedTarget.className", "").includes("MuiChip") && setSelection([body.length, body.length]);
|
|
|
|
|
49732 |
};
|
49733 |
|
49734 |
+
var insertParameter = function insertParameter(parameter) {
|
49735 |
+
// insert text
|
49736 |
+
var newString = body.split("");
|
49737 |
+
newString.splice(selection[0], selection[1] - selection[0], parameter);
|
49738 |
|
49739 |
+
_onChange(newString.join(""), "text_body"); // Timeout, otherwise it doesn't work.
|
49740 |
+
// select at the end of inserted parameter string
|
|
|
|
|
|
|
|
|
49741 |
|
|
|
|
|
|
|
|
|
49742 |
|
49743 |
+
setTimeout(function () {
|
49744 |
+
return bodyInputRef.current.setSelectionRange(selection[0] + parameter.length, selection[0] + parameter.length);
|
49745 |
+
}, 100);
|
49746 |
+
};
|
|
|
|
|
|
|
49747 |
|
49748 |
+
var classes = SocialSharing_useStyles();
|
49749 |
+
|
49750 |
+
var _useState3 = (0,react.useState)(0),
|
49751 |
+
_useState4 = SocialSharing_slicedToArray(_useState3, 2),
|
49752 |
+
labelWidth = _useState4[0],
|
49753 |
+
setLabelWidth = _useState4[1];
|
49754 |
+
|
49755 |
+
if (!values.includes(value)) {
|
49756 |
+
_onChange("facebook");
|
49757 |
}
|
49758 |
|
49759 |
+
(0,react.useEffect)(function () {
|
49760 |
+
setLabelWidth(inputLabel.current.offsetWidth);
|
49761 |
+
}, []);
|
49762 |
+
return /*#__PURE__*/react.createElement(FormControl_FormControl, {
|
49763 |
+
variant: "outlined",
|
49764 |
+
fullWidth: true,
|
49765 |
+
className: "button-action-value"
|
49766 |
+
}, /*#__PURE__*/react.createElement(InputLabel_InputLabel, {
|
49767 |
+
ref: inputLabel
|
49768 |
+
}, translate("settings.button_action.title")), /*#__PURE__*/react.createElement(Select_Select, {
|
49769 |
+
labelId: "button-action-value",
|
49770 |
+
value: value,
|
49771 |
+
onChange: function onChange(e) {
|
49772 |
+
_onChange(e.target.value);
|
49773 |
},
|
49774 |
+
labelWidth: labelWidth,
|
49775 |
+
MenuProps: {
|
49776 |
+
anchorOrigin: {
|
49777 |
+
vertical: "bottom",
|
49778 |
+
horizontal: "center"
|
49779 |
+
},
|
49780 |
+
transformOrigin: {
|
49781 |
+
vertical: "top",
|
49782 |
+
horizontal: "center"
|
49783 |
+
},
|
49784 |
+
getContentAnchorEl: null
|
49785 |
},
|
49786 |
+
style: {
|
49787 |
+
marginBottom: "15px"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49788 |
},
|
49789 |
+
inputProps: {
|
49790 |
+
"data-testid": "action:select"
|
49791 |
+
}
|
49792 |
+
}, /*#__PURE__*/react.createElement(ListSubheader_ListSubheader, {
|
49793 |
+
disableSticky: true,
|
49794 |
+
value: null,
|
49795 |
+
className: classes.group
|
49796 |
+
}, translate("settings.button_action.actions.social_sharing.popular") + ":"), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49797 |
+
value: "facebook",
|
49798 |
+
className: classes.item
|
49799 |
+
}, translate("settings.button_action.actions.share_page_on", "Facebook")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49800 |
+
value: "twitter",
|
49801 |
+
className: classes.item
|
49802 |
+
}, translate("settings.button_action.actions.share_page_on", "Twitter")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49803 |
+
value: "whatsapp",
|
49804 |
+
className: classes.item
|
49805 |
+
}, translate("settings.button_action.actions.share_page_on", "Whatsapp")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49806 |
+
value: "linkedin",
|
49807 |
+
className: classes.item
|
49808 |
+
}, translate("settings.button_action.actions.share_page_on", "LinkedIn")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49809 |
+
value: "pinterest",
|
49810 |
+
className: classes.item
|
49811 |
+
}, translate("settings.button_action.actions.share_page_on", "Pinterest")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49812 |
+
value: "mail",
|
49813 |
+
className: classes.item
|
49814 |
+
}, translate("settings.button_action.actions.share_page_via", "email")), /*#__PURE__*/react.createElement(ListSubheader_ListSubheader, {
|
49815 |
+
disableSticky: true,
|
49816 |
+
value: null,
|
49817 |
+
className: classes.group
|
49818 |
+
}, translate("settings.button_action.actions.social_sharing.other") + ":"), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49819 |
+
value: "sms",
|
49820 |
+
className: classes.item
|
49821 |
+
}, translate("settings.button_action.actions.share_page_on", "SMS")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49822 |
+
value: "reddit",
|
49823 |
+
className: classes.item
|
49824 |
+
}, translate("settings.button_action.actions.share_page_on", "Reddit")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49825 |
+
value: "tumblr",
|
49826 |
+
className: classes.item
|
49827 |
+
}, translate("settings.button_action.actions.share_page_on", "Tumblr")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49828 |
+
value: "weibo",
|
49829 |
+
className: classes.item
|
49830 |
+
}, translate("settings.button_action.actions.share_page_on", "Weibo")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49831 |
+
value: "vk",
|
49832 |
+
className: classes.item
|
49833 |
+
}, translate("settings.button_action.actions.share_page_on", "VK")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49834 |
+
value: "ok",
|
49835 |
+
className: classes.item
|
49836 |
+
}, translate("settings.button_action.actions.share_page_on", "OK.ru (Odnoklassniki)")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49837 |
+
value: "xing",
|
49838 |
+
className: classes.item
|
49839 |
+
}, translate("settings.button_action.actions.share_page_on", "Xing")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49840 |
+
value: "blogger",
|
49841 |
+
className: classes.item
|
49842 |
+
}, translate("settings.button_action.actions.share_page_on", "Blogger")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49843 |
+
value: "flipboard",
|
49844 |
+
className: classes.item
|
49845 |
+
}, translate("settings.button_action.actions.share_page_on", "Flipboard")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
49846 |
+
value: "line",
|
49847 |
+
className: classes.item
|
49848 |
+
}, translate("settings.button_action.actions.share_page_on", "Line"))), valuesWithBody.includes(value) ? /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(TextField_TextField, {
|
49849 |
+
variant: "outlined",
|
49850 |
+
fullWidth: true,
|
49851 |
+
multiline: true,
|
49852 |
+
rows: 2,
|
49853 |
+
onSelect: changeSelection,
|
49854 |
+
onBlur: removeSelection,
|
49855 |
+
inputRef: bodyInputRef,
|
49856 |
+
label: translate("settings.button_action.placeholders.mail.body"),
|
49857 |
+
value: body,
|
49858 |
+
inputProps: {
|
49859 |
+
"data-testid": "action:field"
|
49860 |
},
|
49861 |
+
onChange: function onChange(obj) {
|
49862 |
+
_onChange(obj.target.value, "text_body");
|
49863 |
+
}
|
49864 |
+
}), /*#__PURE__*/react.createElement("div", null, "Insert parameter:", Object.entries(parameters).map(function (_ref2, index) {
|
49865 |
+
var _ref3 = SocialSharing_slicedToArray(_ref2, 2),
|
49866 |
+
name = _ref3[0],
|
49867 |
+
value = _ref3[1];
|
49868 |
+
|
49869 |
+
return /*#__PURE__*/react.createElement(Chip_Chip, {
|
49870 |
+
onClick: function onClick() {
|
49871 |
+
return insertParameter(value);
|
49872 |
+
},
|
49873 |
+
size: "small",
|
49874 |
+
variant: "outlined",
|
49875 |
+
key: index,
|
49876 |
+
label: name,
|
49877 |
+
style: {
|
49878 |
+
marginLeft: "5px"
|
49879 |
+
}
|
49880 |
+
});
|
49881 |
+
})), /*#__PURE__*/react.createElement("br", null), "Body will look as follows: ", /*#__PURE__*/react.createElement("br", null), /*#__PURE__*/react.createElement(Typography_Typography, {
|
49882 |
+
variant: "caption"
|
49883 |
+
}, body.replace(/\[site-url\]/g, document.location).replace(/\[site-title\]/g, document.title))) : null);
|
49884 |
+
}
|
49885 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/Sms/Sms.js
|
49886 |
+
|
49887 |
+
|
49888 |
+
|
49889 |
+
|
49890 |
+
function Sms(_ref) {
|
49891 |
+
var _ref$value = _ref.value,
|
49892 |
+
value = _ref$value === void 0 ? "" : _ref$value,
|
49893 |
+
_ref$body = _ref.body,
|
49894 |
+
body = _ref$body === void 0 ? "" : _ref$body,
|
49895 |
+
_onChange = _ref.onChange;
|
49896 |
+
var isValidPhoneNumber = value !== "" ? (0,isMobilePhone/* default */.ZP)(value, "any", {}) : true;
|
49897 |
+
return /*#__PURE__*/react.createElement("div", {
|
49898 |
+
className: "button-action-value"
|
49899 |
+
}, /*#__PURE__*/react.createElement(TextField_TextField, {
|
49900 |
+
variant: "outlined",
|
49901 |
+
fullWidth: true,
|
49902 |
+
value: value,
|
49903 |
+
label: translate("settings.button_action.actions.phone_number.number"),
|
49904 |
+
helperText: !isValidPhoneNumber ? translate("settings.button_action.actions.phone_number.invalid") : null,
|
49905 |
+
error: !isValidPhoneNumber,
|
49906 |
+
onChange: function onChange(obj) {
|
49907 |
+
_onChange(obj.target.value);
|
49908 |
},
|
49909 |
+
inputProps: {
|
49910 |
+
"data-testid": "action:field"
|
49911 |
+
}
|
49912 |
+
}), /*#__PURE__*/react.createElement(TextField_TextField, {
|
49913 |
+
variant: "outlined",
|
49914 |
+
fullWidth: true,
|
49915 |
+
multiline: true,
|
49916 |
+
rows: 4,
|
49917 |
+
inputProps: {
|
49918 |
+
"data-testid": "action:field"
|
49919 |
},
|
49920 |
+
value: body,
|
49921 |
+
label: "SMS" + " " + translate("settings.button_action.placeholders.mail.body"),
|
49922 |
+
onChange: function onChange(obj) {
|
49923 |
+
_onChange(obj.target.value, "text_body");
|
49924 |
+
}
|
49925 |
+
}), /*#__PURE__*/react.createElement("p", {
|
49926 |
+
dangerouslySetInnerHTML: {
|
49927 |
+
__html: translate("settings.button_action.actions.sms")
|
49928 |
+
}
|
49929 |
+
}));
|
49930 |
+
}
|
49931 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/TwitterDm/TwitterDm.js
|
49932 |
+
|
49933 |
+
|
49934 |
+
|
49935 |
+
function TwitterDm(_ref) {
|
49936 |
+
var _ref$value = _ref.value,
|
49937 |
+
value = _ref$value === void 0 ? "" : _ref$value,
|
49938 |
+
_ref$body = _ref.body,
|
49939 |
+
body = _ref$body === void 0 ? "" : _ref$body,
|
49940 |
+
_onChange = _ref.onChange;
|
49941 |
+
var check = /^\d+$/;
|
49942 |
+
return /*#__PURE__*/react.createElement("div", {
|
49943 |
+
className: "button-action-value"
|
49944 |
+
}, /*#__PURE__*/react.createElement(TextField_TextField, {
|
49945 |
+
variant: "outlined",
|
49946 |
+
fullWidth: true,
|
49947 |
+
value: value,
|
49948 |
+
label: "Account ID",
|
49949 |
+
helperText: !check.test(value) && value !== "" ? "Invalid account ID." : null,
|
49950 |
+
error: !check.test(value) && value !== "",
|
49951 |
+
onChange: function onChange(obj) {
|
49952 |
+
_onChange(obj.target.value.replace(/[^0-9]/gm, ""));
|
49953 |
},
|
49954 |
+
inputProps: {
|
49955 |
+
"data-testid": "action:field"
|
49956 |
+
}
|
49957 |
+
}), /*#__PURE__*/react.createElement(TextField_TextField, {
|
49958 |
+
variant: "outlined",
|
49959 |
+
fullWidth: true,
|
49960 |
+
inputProps: {
|
49961 |
+
"data-testid": "action:field"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49962 |
},
|
49963 |
+
multiline: true,
|
49964 |
+
rows: 4,
|
49965 |
+
value: body,
|
49966 |
+
label: translate("settings.button_action.placeholders.message"),
|
49967 |
+
onChange: function onChange(obj) {
|
49968 |
+
_onChange(obj.target.value, "text_body");
|
49969 |
+
}
|
49970 |
+
}), /*#__PURE__*/react.createElement("p", {
|
49971 |
+
dangerouslySetInnerHTML: {
|
49972 |
+
__html: translate("settings.button_action.actions.twitter_info")
|
49973 |
+
}
|
49974 |
+
}));
|
49975 |
}
|
49976 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/ElementorPopup/ElementorPopup.js
|
49977 |
+
|
49978 |
+
|
49979 |
+
|
49980 |
|
49981 |
|
49982 |
|
49983 |
|
49984 |
+
function ElementorPopup(_ref) {
|
49985 |
+
var _ref$value = _ref.value,
|
49986 |
+
value = _ref$value === void 0 ? "" : _ref$value,
|
49987 |
+
onChange = _ref.onChange;
|
49988 |
+
(0,react.useEffect)(function () {
|
49989 |
+
if (value.substring(0, 9) !== "elementor") {
|
49990 |
+
// Don't change old one
|
49991 |
+
if (value.substring(value.length - 1) === "E") return;
|
49992 |
+
if (value.substring(value.length - 3) !== "Ev2") onChange("elementor" + uniqueCharset() + "Ev2");
|
49993 |
+
}
|
49994 |
+
}, []);
|
49995 |
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("p", {
|
49996 |
+
dangerouslySetInnerHTML: {
|
49997 |
+
__html: translate("settings.popups.elementor_guide")
|
49998 |
+
}
|
49999 |
+
}), /*#__PURE__*/react.createElement("pre", {
|
50000 |
+
style: {
|
50001 |
+
display: "flex"
|
50002 |
+
}
|
50003 |
+
}, /*#__PURE__*/react.createElement("code", {
|
50004 |
+
style: {
|
50005 |
+
fontSize: "11px",
|
50006 |
+
padding: "5.5px"
|
50007 |
+
}
|
50008 |
+
}, "a[", value.substring(value.length - 3) === "Ev2" ? "buttonizer-popup" : "href", "=\"#", value, "\"]"), /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
50009 |
+
content: translate("settings.popups.generate")
|
50010 |
+
}, /*#__PURE__*/react.createElement(IconButton_IconButton, {
|
50011 |
+
onClick: function onClick() {
|
50012 |
+
onChange("elementor" + uniqueCharset() + "Ev2");
|
50013 |
+
},
|
50014 |
+
variant: "contained",
|
50015 |
+
color: "primary",
|
50016 |
+
style: {
|
50017 |
+
padding: "5px"
|
50018 |
+
}
|
50019 |
+
}, /*#__PURE__*/react.createElement("i", {
|
50020 |
+
className: "fas fa-redo-alt",
|
50021 |
+
style: {
|
50022 |
+
fontSize: "14px"
|
50023 |
+
}
|
50024 |
+
})))), /*#__PURE__*/react.createElement(KnowledgeBaseLink, {
|
50025 |
+
articleId: 76,
|
50026 |
+
setting: "Elementor Popup"
|
50027 |
+
}));
|
50028 |
+
}
|
50029 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/PopupMaker/PopupMaker.js
|
50030 |
+
|
50031 |
+
|
50032 |
|
50033 |
|
50034 |
|
50035 |
|
50036 |
|
50037 |
+
function PopupMaker(_ref) {
|
50038 |
+
var _ref$value = _ref.value,
|
50039 |
+
value = _ref$value === void 0 ? "" : _ref$value,
|
50040 |
+
onChange = _ref.onChange;
|
50041 |
+
(0,react.useEffect)(function () {
|
50042 |
+
if (value.substring(0, 10) !== "popupMaker") {
|
50043 |
+
// Don't change old one
|
50044 |
+
if (value.substring(value.length - 1) === "P") return;
|
50045 |
+
if (value.substring(value.length - 3) !== "Pv2") onChange("popupMaker" + uniqueCharset() + "Pv2");
|
50046 |
+
}
|
50047 |
+
}, []);
|
50048 |
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("p", {
|
50049 |
+
dangerouslySetInnerHTML: {
|
50050 |
+
__html: translate("settings.popups.popup_maker_guide")
|
50051 |
+
}
|
50052 |
+
}), /*#__PURE__*/react.createElement("pre", {
|
50053 |
+
style: {
|
50054 |
+
display: "flex"
|
50055 |
+
}
|
50056 |
+
}, /*#__PURE__*/react.createElement("code", {
|
50057 |
+
style: {
|
50058 |
+
fontSize: "11px",
|
50059 |
+
padding: "5.5px"
|
50060 |
+
}
|
50061 |
+
}, "a[", value.substring(value.length - 3) === "Pv2" ? "buttonizer-popup" : "href", "=\"#", value, "\"]"), /*#__PURE__*/react.createElement(Tippy_Tippy, {
|
50062 |
+
content: translate("settings.popups.generate")
|
50063 |
+
}, /*#__PURE__*/react.createElement(IconButton_IconButton, {
|
50064 |
+
onClick: function onClick() {
|
50065 |
+
onChange("popupMaker" + uniqueCharset() + "Pv2");
|
50066 |
+
},
|
50067 |
+
variant: "contained",
|
50068 |
+
color: "primary",
|
50069 |
+
style: {
|
50070 |
+
padding: "5px"
|
50071 |
+
}
|
50072 |
+
}, /*#__PURE__*/react.createElement("i", {
|
50073 |
+
className: "fas fa-redo-alt",
|
50074 |
+
style: {
|
50075 |
+
fontSize: "14px"
|
50076 |
+
}
|
50077 |
+
})))), /*#__PURE__*/react.createElement(KnowledgeBaseLink, {
|
50078 |
+
articleId: 77,
|
50079 |
+
setting: "Popup Maker"
|
50080 |
+
}));
|
50081 |
+
}
|
50082 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/ButtonActionNewTab/ButtonActionNewTab.js
|
50083 |
+
function ButtonActionNewTab_slicedToArray(arr, i) { return ButtonActionNewTab_arrayWithHoles(arr) || ButtonActionNewTab_iterableToArrayLimit(arr, i) || ButtonActionNewTab_unsupportedIterableToArray(arr, i) || ButtonActionNewTab_nonIterableRest(); }
|
50084 |
|
50085 |
+
function ButtonActionNewTab_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
50086 |
|
50087 |
+
function ButtonActionNewTab_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ButtonActionNewTab_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ButtonActionNewTab_arrayLikeToArray(o, minLen); }
|
50088 |
|
50089 |
+
function ButtonActionNewTab_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
50090 |
|
50091 |
+
function ButtonActionNewTab_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
50092 |
|
50093 |
+
function ButtonActionNewTab_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
50094 |
|
50095 |
|
|
|
|
|
50096 |
|
|
|
|
|
|
|
|
|
|
|
|
|
50097 |
|
50098 |
+
function ButtonActionNewTab(_ref) {
|
50099 |
+
var value = _ref.value,
|
50100 |
+
onChange = _ref.onChange;
|
50101 |
+
var useStyles = styles_makeStyles(function (theme) {
|
50102 |
+
return {
|
50103 |
+
formControl: {
|
50104 |
+
margin: theme.spacing(0),
|
50105 |
+
marginTop: 10,
|
50106 |
+
paddingBottom: 20
|
50107 |
}
|
50108 |
+
};
|
50109 |
+
});
|
50110 |
+
var classes = useStyles();
|
50111 |
+
var inputLabel = (0,react.useRef)(null);
|
50112 |
|
50113 |
+
var _useState = (0,react.useState)(0),
|
50114 |
+
_useState2 = ButtonActionNewTab_slicedToArray(_useState, 2),
|
50115 |
+
labelWidth = _useState2[0],
|
50116 |
+
setLabelWidth = _useState2[1];
|
50117 |
|
50118 |
+
var new_tab = "_self";
|
|
|
50119 |
|
50120 |
+
if (value) {
|
50121 |
+
if (value === true) new_tab = "_blank";else if (typeof value === "string") new_tab = value;
|
50122 |
+
}
|
|
|
|
|
50123 |
|
50124 |
+
(0,react.useEffect)(function () {
|
50125 |
+
setLabelWidth(inputLabel.current.offsetWidth);
|
50126 |
+
}, []);
|
|
|
|
|
50127 |
|
50128 |
+
var handleChange = function handleChange(e) {
|
50129 |
+
if (e.target.value) {
|
50130 |
+
onChange(e.target.value);
|
50131 |
+
}
|
50132 |
|
50133 |
+
if (e.target.value === null) {
|
50134 |
+
onChange("_blank");
|
50135 |
+
}
|
50136 |
+
};
|
50137 |
|
50138 |
+
return /*#__PURE__*/react.createElement(FormControl_FormControl, {
|
50139 |
+
variant: "outlined",
|
50140 |
+
className: classes.formControl,
|
50141 |
+
fullWidth: true,
|
50142 |
+
size: "small"
|
50143 |
+
}, /*#__PURE__*/react.createElement(InputLabel_InputLabel, {
|
50144 |
+
ref: inputLabel
|
50145 |
+
}, translate("settings.button_action.open_url.title")), /*#__PURE__*/react.createElement(Select_Select, {
|
50146 |
+
onChange: handleChange,
|
50147 |
+
labelWidth: labelWidth,
|
50148 |
+
className: "open-url-in",
|
50149 |
+
value: new_tab,
|
50150 |
+
MenuProps: {
|
50151 |
+
anchorOrigin: {
|
50152 |
+
vertical: "bottom",
|
50153 |
+
horizontal: "center"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50154 |
},
|
50155 |
+
transformOrigin: {
|
50156 |
+
vertical: "top",
|
50157 |
+
horizontal: "center"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50158 |
},
|
50159 |
+
getContentAnchorEl: null
|
50160 |
+
}
|
50161 |
+
}, /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
50162 |
+
value: "_self"
|
50163 |
+
}, "Current window"), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
50164 |
+
value: "_blank"
|
50165 |
+
}, "New tab"), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
50166 |
+
value: "_newWindow"
|
50167 |
+
}, "New window"), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
50168 |
+
value: "_popupWindow"
|
50169 |
+
}, "Pop-up window")));
|
50170 |
+
}
|
50171 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/DefaultTextField/DefaultTextField.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50172 |
|
|
|
|
|
|
|
|
|
|
|
50173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50174 |
|
|
|
|
|
|
|
|
|
|
|
50175 |
|
|
|
|
|
|
|
|
|
|
|
50176 |
|
50177 |
+
/**
|
50178 |
+
* DefaultTextField
|
50179 |
+
* Create a textfield that changes placeholder and such
|
50180 |
+
*
|
50181 |
+
* @param type string: Specify textfield type
|
50182 |
+
* @param placeholder string: Add a placholder in textfield
|
50183 |
+
* @param newTab bool: Add open in new tab toggle
|
50184 |
+
* @param paragraph string: Add paragraph under textfield
|
50185 |
+
* @param knowledge permalink, name: Add knowledgebase link under textfield
|
50186 |
+
* @param object object: Button object
|
50187 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50188 |
|
50189 |
+
function DefaultTextField(_ref) {
|
50190 |
+
var _ref$value = _ref.value,
|
50191 |
+
value = _ref$value === void 0 ? "" : _ref$value,
|
50192 |
+
newTab = _ref.newTab,
|
50193 |
+
placeholder = _ref.placeholder,
|
50194 |
+
type = _ref.type,
|
50195 |
+
paragraph = _ref.paragraph,
|
50196 |
+
knowledge = _ref.knowledge,
|
50197 |
+
_onChange = _ref.onChange,
|
50198 |
+
_ref$checkPhoneNumber = _ref.checkPhoneNumber,
|
50199 |
+
checkPhoneNumber = _ref$checkPhoneNumber === void 0 ? false : _ref$checkPhoneNumber,
|
50200 |
+
_ref$checkText = _ref.checkText,
|
50201 |
+
checkText = _ref$checkText === void 0 ? "Invalid" : _ref$checkText,
|
50202 |
+
_ref$children = _ref.children,
|
50203 |
+
children = _ref$children === void 0 ? false : _ref$children;
|
50204 |
+
var isValidPhoneNumber = checkPhoneNumber ? value !== "" ? (0,isMobilePhone/* default */.ZP)(value, "any", {}) : true : true;
|
50205 |
+
return /*#__PURE__*/react.createElement("div", {
|
50206 |
+
className: "button-action-value"
|
50207 |
+
}, /*#__PURE__*/react.createElement(TextField_TextField, {
|
50208 |
+
variant: "outlined",
|
50209 |
+
fullWidth: true,
|
50210 |
+
inputProps: {
|
50211 |
+
"data-testid": "action:field"
|
50212 |
},
|
50213 |
+
type: type ? type : "text",
|
50214 |
+
helperText: //is there an error check?
|
50215 |
+
checkPhoneNumber ? // check if else
|
50216 |
+
!isValidPhoneNumber ? checkText : null : null,
|
50217 |
+
error: //is there an error check?
|
50218 |
+
checkPhoneNumber ? // check for errors
|
50219 |
+
!isValidPhoneNumber : false,
|
50220 |
+
value: value,
|
50221 |
+
label: placeholder,
|
50222 |
+
onChange: function onChange(obj) {
|
50223 |
+
_onChange(obj.target.value);
|
50224 |
}
|
50225 |
+
}), children && children, newTab ? /*#__PURE__*/react.createElement(ButtonActionNewTab, {
|
50226 |
+
value: newTab.action_new_tab,
|
50227 |
+
onChange: function onChange(val) {
|
50228 |
+
_onChange(val, "action_new_tab");
|
50229 |
+
}
|
50230 |
+
}) : /*#__PURE__*/react.createElement(react.Fragment, null), paragraph ? /*#__PURE__*/react.createElement("p", {
|
50231 |
+
dangerouslySetInnerHTML: {
|
50232 |
+
__html: paragraph
|
50233 |
+
}
|
50234 |
+
}) : /*#__PURE__*/react.createElement(react.Fragment, null), knowledge ? addKnowledgeBaseLink(knowledge) : /*#__PURE__*/react.createElement(react.Fragment, null));
|
50235 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50236 |
|
50237 |
+
function addKnowledgeBaseLink(knowledge) {
|
50238 |
+
return /*#__PURE__*/react.createElement("a", {
|
50239 |
+
className: "info-link has-margin-everywhere",
|
50240 |
+
href: "https://community.buttonizer.pro/knowledgebase" + (knowledge.permalink === "" ? "" : "/" + knowledge.permalink),
|
50241 |
+
dangerouslySetInnerHTML: {
|
50242 |
+
__html: knowledge.name ? translate("utils.knowledge_link", knowledge.name) : translate("utils.visit_knowledgebase")
|
50243 |
+
}
|
50244 |
+
});
|
50245 |
+
}
|
50246 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/MessengerChat/MessengerLanguageCodes.json
|
50247 |
+
var MessengerLanguageCodes_namespaceObject = JSON.parse('{"af_ZA":"Afrikaans","ar_AR":"Arabic","az_AZ":"Azerbaijani","be_BY":"Belarusian","bg_BG":"Bulgarian","bn_IN":"Bengali","bs_BA":"Bosnian","ca_ES":"Catalan","cs_CZ":"Czech","cy_GB":"Welsh","da_DK":"Danish","de_DE":"German","el_GR":"Greek","en_GB":"English (UK)","en_PI":"English (Pirate)","en_UD":"English (Upside Down)","en_US":"English (US)","eo_EO":"Esperanto","es_ES":"Spanish (Spain)","es_LA":"Spanish","et_EE":"Estonian","eu_ES":"Basque","fa_IR":"Persian","fb_LT":"Leet Speak","fi_FI":"Finnish","fo_FO":"Faroese","fr_CA":"French (Canada)","fr_FR":"French (France)","fy_NL":"Frisian","ga_IE":"Irish","gl_ES":"Galician","he_IL":"Hebrew","hi_IN":"Hindi","hr_HR":"Croatian","hu_HU":"Hungarian","hy_AM":"Armenian","id_ID":"Indonesian","is_IS":"Icelandic","it_IT":"Italian","ja_JP":"Japanese","ka_GE":"Georgian","km_KH":"Khmer","ko_KR":"Korean","ku_TR":"Kurdish","la_VA":"Latin","lt_LT":"Lithuanian","lv_LV":"Latvian","mk_MK":"Macedonian","ml_IN":"Malayalam","ms_MY":"Malay","nb_NO":"Norwegian (bokmal)","ne_NP":"Nepali","nl_NL":"Dutch","nn_NO":"Norwegian (nynorsk)","pa_IN":"Punjabi","pl_PL":"Polish","ps_AF":"Pashto","pt_BR":"Portuguese (Brazil)","pt_PT":"Portuguese (Portugal)","ro_RO":"Romanian","ru_RU":"Russian","sk_SK":"Slovak","sl_SI":"Slovenian","sq_AL":"Albanian","sr_RS":"Serbian","sv_SE":"Swedish","sw_KE":"Swahili","ta_IN":"Tamil","te_IN":"Telugu","th_TH":"Thai","tl_PH":"Filipino","tr_TR":"Turkish","uk_UA":"Ukrainian","vi_VN":"Vietnamese","zh_CN":"Simplified Chinese (China)","zh_HK":"Traditional Chinese (Hong Kong)","zh_TW":"Traditional Chinese (Taiwan)"}');
|
50248 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/MessengerChat/MessengerChat.js
|
50249 |
+
function MessengerChat_slicedToArray(arr, i) { return MessengerChat_arrayWithHoles(arr) || MessengerChat_iterableToArrayLimit(arr, i) || MessengerChat_unsupportedIterableToArray(arr, i) || MessengerChat_nonIterableRest(); }
|
50250 |
|
50251 |
+
function MessengerChat_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
50252 |
|
50253 |
+
function MessengerChat_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return MessengerChat_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return MessengerChat_arrayLikeToArray(o, minLen); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50254 |
|
50255 |
+
function MessengerChat_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
50256 |
|
50257 |
+
function MessengerChat_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
|
|
|
|
|
|
|
|
|
50258 |
|
50259 |
+
function MessengerChat_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50260 |
|
|
|
|
|
50261 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50262 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50263 |
|
|
|
|
|
50264 |
|
50265 |
+
|
50266 |
+
|
50267 |
+
|
50268 |
+
|
50269 |
+
function MessengerChat(_ref) {
|
50270 |
+
var data = _ref.data,
|
50271 |
+
_onChange = _ref.onChange,
|
50272 |
+
buttonId = _ref.buttonId,
|
50273 |
+
buttons = _ref.buttons;
|
50274 |
+
|
50275 |
+
var _useState = (0,react.useState)(false),
|
50276 |
+
_useState2 = MessengerChat_slicedToArray(_useState, 2),
|
50277 |
+
dialogOpened = _useState2[0],
|
50278 |
+
setDialogOpened = _useState2[1];
|
50279 |
+
|
50280 |
+
var _useState3 = (0,react.useState)(false),
|
50281 |
+
_useState4 = MessengerChat_slicedToArray(_useState3, 2),
|
50282 |
+
dialogShowed = _useState4[0],
|
50283 |
+
setDialogShowed = _useState4[1];
|
50284 |
+
|
50285 |
+
var _useState5 = (0,react.useState)(0),
|
50286 |
+
_useState6 = MessengerChat_slicedToArray(_useState5, 2),
|
50287 |
+
labelWidth = _useState6[0],
|
50288 |
+
setLabelWidth = _useState6[1];
|
50289 |
+
|
50290 |
+
var inputLabel = (0,react.useRef)(null);
|
50291 |
+
|
50292 |
+
var messengerLanguages = function messengerLanguages() {
|
50293 |
+
var all = [];
|
50294 |
+
Object.entries(MessengerLanguageCodes_namespaceObject).map(function (_ref2, key) {
|
50295 |
+
var _ref3 = MessengerChat_slicedToArray(_ref2, 2),
|
50296 |
+
code = _ref3[0],
|
50297 |
+
name = _ref3[1];
|
50298 |
+
|
50299 |
+
all.push( /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
50300 |
+
value: code,
|
50301 |
+
key: key
|
50302 |
+
}, name));
|
50303 |
});
|
50304 |
+
return all;
|
50305 |
+
}; // Handle close button
|
50306 |
+
|
50307 |
+
|
50308 |
+
var handleClose = function handleClose() {
|
50309 |
+
_onChange("url", "type");
|
50310 |
+
|
50311 |
+
setDialogOpened(false);
|
50312 |
};
|
50313 |
|
50314 |
+
if (!dialogShowed) {
|
50315 |
+
for (var _i2 = 0, _Object$entries = Object.entries(buttons); _i2 < _Object$entries.length; _i2++) {
|
50316 |
+
var button = _Object$entries[_i2];
|
50317 |
+
|
50318 |
+
if (button[1].type === "messenger_chat" && button[1].id !== buttonId) {
|
50319 |
+
setDialogOpened(true);
|
50320 |
+
setDialogShowed(true);
|
50321 |
+
}
|
50322 |
+
}
|
50323 |
+
}
|
50324 |
+
|
50325 |
+
(0,react.useEffect)(function () {
|
50326 |
+
setLabelWidth(inputLabel.current.offsetWidth); // setButtonAction(value || "facebook");
|
50327 |
+
}, []);
|
50328 |
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(DefaultTextField, {
|
50329 |
+
value: data.action,
|
50330 |
+
check: /^\d+$/,
|
50331 |
+
checkText: translate("settings.button_action.actions.messenger_chat.invalid"),
|
50332 |
+
placeholder: translate("settings.button_action.actions.messenger_chat.page_id"),
|
50333 |
+
paragraph: translate("settings.button_action.actions.messenger_chat.description"),
|
50334 |
+
knowledge: {
|
50335 |
+
permalink: 59,
|
50336 |
+
name: "Facebook Messenger Chat Widget"
|
|
|
|
|
|
|
|
|
50337 |
},
|
50338 |
+
onChange: function onChange(val, type) {
|
50339 |
+
_onChange(val, type);
|
50340 |
+
}
|
50341 |
+
}, /*#__PURE__*/react.createElement(FormControl_FormControl, {
|
50342 |
+
variant: "outlined",
|
50343 |
+
fullWidth: true,
|
50344 |
style: {
|
50345 |
+
marginBottom: "15px"
|
50346 |
+
}
|
50347 |
+
}, /*#__PURE__*/react.createElement(InputLabel_InputLabel, {
|
50348 |
+
ref: inputLabel
|
50349 |
+
}, translate("settings.button_action.actions.messenger_chat.language")), /*#__PURE__*/react.createElement(Select_Select, {
|
50350 |
+
value: data.messenger_lang || "en_US",
|
50351 |
+
onChange: function onChange(e) {
|
50352 |
+
_onChange(e.target.value, "messenger_lang");
|
50353 |
},
|
50354 |
+
labelWidth: labelWidth,
|
50355 |
+
MenuProps: {
|
50356 |
+
anchorOrigin: {
|
50357 |
+
vertical: "bottom",
|
50358 |
+
horizontal: "center"
|
50359 |
+
},
|
50360 |
+
transformOrigin: {
|
50361 |
+
vertical: "top",
|
50362 |
+
horizontal: "center"
|
50363 |
+
},
|
50364 |
+
getContentAnchorEl: null
|
50365 |
+
}
|
50366 |
+
}, messengerLanguages()))), /*#__PURE__*/react.createElement(ConfirmDialog, {
|
50367 |
+
open: dialogOpened,
|
50368 |
+
title: "This is getting out of hand. Now, there are two of them!",
|
50369 |
+
buttons: [{
|
50370 |
+
value: "close",
|
50371 |
+
text: "I understand"
|
50372 |
+
}],
|
50373 |
+
onClose: function onClose() {
|
50374 |
+
return handleClose();
|
50375 |
}
|
50376 |
+
}, /*#__PURE__*/react.createElement(Typography_Typography, null, "You currently have a button with a Facebook Messenger Chat Widget action.", /*#__PURE__*/react.createElement("br", null), "As of now, the Facebook Messenger SDK can only support ", /*#__PURE__*/react.createElement("b", null, "1"), " ", "Facebook Messenger Chat Widget.", /*#__PURE__*/react.createElement("br", null), /*#__PURE__*/react.createElement("br", null), "Button with Facebook Messenger Widget: ", /*#__PURE__*/react.createElement("br", null), "Button:", Object.entries(buttons).map(function (button) {
|
50377 |
+
if (button[1].type === "messenger_chat" && button[1].id !== buttonId) {
|
50378 |
+
return " ".concat(button[1].name);
|
50379 |
+
}
|
50380 |
+
}))));
|
50381 |
+
}
|
50382 |
|
50383 |
+
/* harmony default export */ var MessengerChat_MessengerChat = (connect(function (state) {
|
50384 |
+
return {
|
50385 |
+
buttons: state.buttons
|
50386 |
+
};
|
50387 |
+
})(MessengerChat));
|
|
|
|
|
50388 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonActionValue/ButtonActionRelAttributes/ButtonActionRelAttributes.js
|
50389 |
function ButtonActionRelAttributes_extends() { ButtonActionRelAttributes_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonActionRelAttributes_extends.apply(this, arguments); }
|
50390 |
|
51299 |
button: buttons[id]
|
51300 |
}, props);
|
51301 |
})(ButtonActionValue));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51302 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ButtonAction/ButtonAction.js
|
51303 |
function ButtonAction_extends() { ButtonAction_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonAction_extends.apply(this, arguments); }
|
51304 |
|
51411 |
_onChange("type", newValue.value);
|
51412 |
},
|
51413 |
getOptionLabel: function getOptionLabel(option) {
|
51414 |
+
/* webpack-strip-block:removed */
|
51415 |
+
if (option.isPro) return "".concat(option.label, " (PRO)");
|
51416 |
+
return option.label;
|
51417 |
},
|
51418 |
getOptionDisabled: function getOptionDisabled(option) {
|
51419 |
+
/* webpack-strip-block:removed */
|
51420 |
+
return option.isPro;
|
51421 |
},
|
51422 |
groupBy: function groupBy(option) {
|
51423 |
return translate("settings.button_action.actions.group_".concat(option.group));
|
51451 |
|
51452 |
|
51453 |
|
51454 |
+
|
51455 |
+
/**
|
51456 |
+
* Get value with format. combine with connect function to remove record arg.
|
51457 |
+
* @param {string} key to be getted key
|
51458 |
+
* @param {obj} record object to get key out of
|
51459 |
+
* @param {string} model (optional) when filled with (button|group), returns default if value not present. when defaults is left blank, returns "" when there is no value.
|
51460 |
+
* @param {string} parent (optional) when filled with parent's data, returns parent's data if value is not present. when parent is left blank, return default or returns "" when there is no value.
|
51461 |
+
* @param {Object} options options to apply.
|
51462 |
+
* @param {boolean} options.excludeSelf Exclude set value from results. ( only return defaults )
|
51463 |
+
* @param {boolean} options.returnSelf Return normal if hover is empty.
|
51464 |
+
* @param {boolean} options.defToGroup Use parent as a fallback. If value is empty, return parent.
|
51465 |
+
* @param {boolean} options.returnParent Return parent's normal if parent's hover is empty.
|
51466 |
+
* @param {boolean} options.returnDefault Use defaults as a fallback.
|
51467 |
*/
|
51468 |
|
51469 |
function _get(key, record) {
|
51470 |
var menu_style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "default";
|
51471 |
var model = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
51472 |
+
|
51473 |
+
var _ref = arguments.length > 4 ? arguments[4] : undefined,
|
51474 |
+
_ref$excludeSelf = _ref.excludeSelf,
|
51475 |
+
excludeSelf = _ref$excludeSelf === void 0 ? false : _ref$excludeSelf,
|
51476 |
+
_ref$returnSelf = _ref.returnSelf,
|
51477 |
+
returnSelf = _ref$returnSelf === void 0 ? false : _ref$returnSelf,
|
51478 |
+
_ref$returnParent = _ref.returnParent,
|
51479 |
+
returnParent = _ref$returnParent === void 0 ? false : _ref$returnParent,
|
51480 |
+
_ref$defToGroup = _ref.defToGroup,
|
51481 |
+
defToGroup = _ref$defToGroup === void 0 ? null : _ref$defToGroup,
|
51482 |
+
_ref$returnDefault = _ref.returnDefault,
|
51483 |
+
returnDefault = _ref$returnDefault === void 0 ? false : _ref$returnDefault;
|
51484 |
|
51485 |
if (typeof record === "undefined" || typeof key === "undefined") {
|
51486 |
console.log("record: " + record);
|
51488 |
throw TypeError("'record' argument or 'key' argument of type undefined");
|
51489 |
}
|
51490 |
|
51491 |
+
var value = record[key]; // When not in formatted list/doesn't have hover settings, don't format.
|
51492 |
|
51493 |
if (!buttonizer_defaults_default().formatted.includes(key)) {
|
51494 |
// value == null will be true also if value == undefined, because undefined == null
|
51495 |
if (value == null) {
|
51496 |
// Get default
|
51497 |
+
return !returnDefault ? "" : _def(model, key, menu_style, dlv_umd_default()(defToGroup, key, null));
|
51498 |
}
|
51499 |
|
51500 |
return value;
|
51501 |
}
|
51502 |
|
51503 |
+
var parentValue = defToGroup ? formats.normal_hover.parse(defToGroup[key]) : []; // def returns formatted value
|
51504 |
|
51505 |
+
if (value == null) return _defs(model, key, menu_style, [], parentValue, {
|
51506 |
+
excludeSelf: excludeSelf,
|
51507 |
+
returnSelf: returnSelf,
|
51508 |
+
returnParent: returnParent,
|
51509 |
+
returnDefault: returnDefault
|
51510 |
+
});
|
51511 |
var result = formats.normal_hover.parse(value);
|
51512 |
+
return model ? _defs(model, key, menu_style, result, parentValue, {
|
51513 |
+
excludeSelf: excludeSelf,
|
51514 |
+
returnSelf: returnSelf,
|
51515 |
+
returnParent: returnParent,
|
51516 |
+
returnDefault: returnDefault
|
51517 |
+
}) : merge_default()(["", ""], result);
|
51518 |
}
|
51519 |
+
/**
|
51520 |
+
* Return non-hover default
|
51521 |
+
*/
|
51522 |
+
|
51523 |
function _def(model, key) {
|
51524 |
var menu_style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "default";
|
51525 |
+
var defToGroup = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
51526 |
var def = merge_default()({}, (buttonizer_defaults_default()), (buttonizer_defaults_default()).menuStyle[menu_style]);
|
51527 |
|
51528 |
if (!Object.keys(def).includes(model)) {
|
51533 |
if (!Object.keys(def[model]).includes(key)) {
|
51534 |
if (false) {}
|
51535 |
return "";
|
51536 |
+
} // return group data first then defaults
|
51537 |
+
|
51538 |
|
51539 |
+
return def[model][key] == null ? "" : defToGroup !== null ? defToGroup : def[model][key];
|
51540 |
}
|
51541 |
+
/**
|
51542 |
+
* Return hover default
|
51543 |
+
*/
|
51544 |
+
|
51545 |
function _defs(model, key) {
|
51546 |
var menu_style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "default";
|
51547 |
var self = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
51568 |
var self = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
51569 |
var def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
51570 |
|
51571 |
+
var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
51572 |
+
_ref2$excludeSelf = _ref2.excludeSelf,
|
51573 |
+
excludeSelf = _ref2$excludeSelf === void 0 ? false : _ref2$excludeSelf,
|
51574 |
+
_ref2$returnSelf = _ref2.returnSelf,
|
51575 |
+
returnSelf = _ref2$returnSelf === void 0 ? false : _ref2$returnSelf,
|
51576 |
+
_ref2$returnDefault = _ref2.returnDefault,
|
51577 |
+
returnDefault = _ref2$returnDefault === void 0 ? false : _ref2$returnDefault;
|
51578 |
|
51579 |
+
var arr = [self, returnSelf && [self[0], self[0]], returnDefault && def, returnDefault && [def[0], def[0]], !returnDefault && self.length === 0 && ["", ""]];
|
51580 |
if (excludeSelf) arr.shift(); // exclude 'self'
|
51581 |
|
51582 |
return defaults_default().apply(void 0, arr);
|
51587 |
var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
51588 |
var def = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
51589 |
|
51590 |
+
var _ref3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
|
51591 |
+
_ref3$excludeSelf = _ref3.excludeSelf,
|
51592 |
+
excludeSelf = _ref3$excludeSelf === void 0 ? false : _ref3$excludeSelf,
|
51593 |
+
_ref3$returnSelf = _ref3.returnSelf,
|
51594 |
+
returnSelf = _ref3$returnSelf === void 0 ? false : _ref3$returnSelf,
|
51595 |
+
_ref3$returnParent = _ref3.returnParent,
|
51596 |
+
returnParent = _ref3$returnParent === void 0 ? false : _ref3$returnParent,
|
51597 |
+
_ref3$returnDefault = _ref3.returnDefault,
|
51598 |
+
returnDefault = _ref3$returnDefault === void 0 ? false : _ref3$returnDefault;
|
51599 |
+
|
51600 |
+
var arr = [self, parent, returnSelf && [undefined, self[0]], returnParent && [undefined, parent[0]], returnDefault && def, returnDefault && [undefined, def[0]], !returnDefault && self.length === 0 && ["", ""]];
|
51601 |
if (excludeSelf) arr.shift(); // remove 'self'
|
51602 |
|
51603 |
return defaults_default().apply(void 0, arr);
|
51663 |
}, /*#__PURE__*/react.createElement("div", {
|
51664 |
className: "setting-group-title"
|
51665 |
}, translate("settings.button_action.title")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(ButtonAction, {
|
51666 |
+
actionType: get("type", {
|
51667 |
+
returnDefault: true
|
51668 |
+
}),
|
51669 |
id: get("id"),
|
51670 |
onChange: function onChange(type, val) {
|
51671 |
return set(type, val);
|
51722 |
set: function set(key, value) {
|
51723 |
return _set(models.BUTTON, buttonId, key, value);
|
51724 |
},
|
|
|
|
|
|
|
51725 |
get: function get(key) {
|
51726 |
+
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
51727 |
+
_ref5$getParent = _ref5.getParent,
|
51728 |
+
getParent = _ref5$getParent === void 0 ? false : _ref5$getParent,
|
51729 |
+
_ref5$defToGroup = _ref5.defToGroup,
|
51730 |
+
defToGroup = _ref5$defToGroup === void 0 ? true : _ref5$defToGroup,
|
51731 |
+
options = Options_objectWithoutProperties(_ref5, ["getParent", "defToGroup"]);
|
51732 |
+
|
51733 |
+
return _get(key, getParent ? group : button, group.menu_style, getParent ? "group" : "button", Options_objectSpread({
|
51734 |
+
defToGroup: defToGroup && group
|
51735 |
+
}, options));
|
51736 |
}
|
51737 |
}, props);
|
51738 |
})(Options));
|
60465 |
* _.map(users, 'user');
|
60466 |
* // => ['barney', 'fred']
|
60467 |
*/
|
60468 |
+
function map_map(collection, iteratee) {
|
60469 |
var func = lodash_es_isArray(collection) ? _arrayMap : _baseMap;
|
60470 |
return func(collection, _baseIteratee(iteratee, 3));
|
60471 |
}
|
60472 |
|
60473 |
+
/* harmony default export */ var lodash_es_map = (map_map);
|
60474 |
|
60475 |
;// CONCATENATED MODULE: ./node_modules/react-color/es/components/block/BlockSwatches.js
|
60476 |
|
64872 |
|
64873 |
|
64874 |
|
64875 |
+
|
64876 |
+
|
64877 |
var initialColor = "rgb(238, 241, 11)";
|
64878 |
|
64879 |
var makePalette = function makePalette() {
|
64903 |
_ref$noGradient = _ref.noGradient,
|
64904 |
noGradient = _ref$noGradient === void 0 ? false : _ref$noGradient,
|
64905 |
_ref$className = _ref.className,
|
64906 |
+
className = _ref$className === void 0 ? null : _ref$className,
|
64907 |
+
_ref$small = _ref.small,
|
64908 |
+
small = _ref$small === void 0 ? false : _ref$small,
|
64909 |
+
_ref$container = _ref.container,
|
64910 |
+
container = _ref$container === void 0 ? true : _ref$container;
|
64911 |
|
|
|
64912 |
var _useState = (0,react.useState)(null),
|
64913 |
_useState2 = ColorPicker_slicedToArray(_useState, 2),
|
64914 |
currentRef = _useState2[0],
|
64937 |
_useState10 = ColorPicker_slicedToArray(_useState9, 2),
|
64938 |
palette = _useState10[0],
|
64939 |
setPalette = _useState10[1],
|
64940 |
+
_useState11 = (0,react.useState)(app.hasPremium() || buttonizer_admin.is_stand_alone ? getColorType(value === "" ? defaultValue : value) : "solid"),
|
64941 |
_useState12 = ColorPicker_slicedToArray(_useState11, 2),
|
64942 |
colorType = _useState12[0],
|
64943 |
setColorType = _useState12[1];
|
64952 |
}, [swatches]);
|
64953 |
(0,react.useEffect)(function () {
|
64954 |
var parsedValues = value === "" ? getPaletteAngle(defaultValue) : getPaletteAngle(value);
|
64955 |
+
setColorType(app.hasPremium() || buttonizer_admin.is_stand_alone ? getColorType(value === "" ? defaultValue : value) : "solid");
|
64956 |
setPalette(parsedValues.palette);
|
64957 |
setAngle(parsedValues.angle);
|
64958 |
}, [value, defaultValue]);
|
64988 |
onChange(getPreview(newPalette, angle, newType).background);
|
64989 |
};
|
64990 |
|
64991 |
+
var render = function render() {
|
64992 |
+
return /*#__PURE__*/react.createElement("div", {
|
64993 |
+
className: (0,clsx_m/* default */.Z)("color-picker-main", small && "small")
|
64994 |
+
}, /*#__PURE__*/react.createElement("div", {
|
64995 |
+
className: "color-picker"
|
64996 |
+
}, /*#__PURE__*/react.createElement(ColorPicker_ColorPickerPopover, {
|
64997 |
+
open: open,
|
64998 |
+
setOpen: setOpen,
|
64999 |
+
angle: angle,
|
65000 |
+
setAngle: handleAngleChange,
|
65001 |
+
showAnglePicker: true,
|
65002 |
+
width: 300,
|
65003 |
+
maxStops: 3,
|
65004 |
+
paletteHeight: 32,
|
65005 |
+
palette: palette,
|
65006 |
+
colorType: colorType,
|
65007 |
+
setColorType: handleColorTypeChange,
|
65008 |
+
currentRef: currentRef,
|
65009 |
+
noGradient: noGradient,
|
65010 |
+
onPaletteChange: handlePaletteChange,
|
65011 |
+
trigger: function trigger() {
|
65012 |
+
return /*#__PURE__*/react.createElement("span", {
|
65013 |
+
onClick: function onClick() {
|
65014 |
+
return setOpen(true);
|
65015 |
+
},
|
65016 |
+
className: "color-preview",
|
65017 |
+
"data-testid": "color-picker-preview-span",
|
65018 |
+
style: {
|
65019 |
+
background: value == "" ? defaultValue : value
|
65020 |
+
}
|
65021 |
+
});
|
65022 |
+
}
|
65023 |
+
}, /*#__PURE__*/react.createElement(ColorPickerContainer, {
|
65024 |
+
wrapped: colorType !== "solid",
|
65025 |
+
onChange: function onChange(c) {
|
65026 |
+
var _c$rgb = c.rgb,
|
65027 |
+
r = _c$rgb.r,
|
65028 |
+
g = _c$rgb.g,
|
65029 |
+
b = _c$rgb.b,
|
65030 |
+
a = _c$rgb.a;
|
65031 |
+
handlePaletteChange("rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(a, ")"));
|
65032 |
+
},
|
65033 |
+
swatches: swatches,
|
65034 |
+
setSwatches: setSwatches,
|
65035 |
+
color: palette
|
65036 |
+
})), /*#__PURE__*/react.createElement(Button_Button, {
|
65037 |
+
className: "color-button",
|
65038 |
+
variant: "contained",
|
65039 |
+
size: "small",
|
65040 |
+
onClick: function onClick() {
|
65041 |
+
return setOpen(true);
|
65042 |
+
},
|
65043 |
+
color: "primary",
|
65044 |
+
disabled: disabled,
|
65045 |
+
"data-testid": "setting:color-picker-open"
|
65046 |
+
}, /*#__PURE__*/react.createElement("i", {
|
65047 |
+
className: "fas fa-palette"
|
65048 |
+
}))), trashButton ? /*#__PURE__*/react.createElement(TrashButton, {
|
65049 |
+
onClick: function onClick() {
|
65050 |
+
onChange("unset");
|
65051 |
+
setOpen(false);
|
65052 |
+
},
|
65053 |
+
disabled: !value
|
65054 |
+
}) : null);
|
65055 |
+
};
|
65056 |
+
|
65057 |
return /*#__PURE__*/react.createElement("div", {
|
65058 |
onClick: function onClick(e) {
|
65059 |
if (currentRef === null) {
|
65060 |
setCurrentRef(e.currentTarget);
|
65061 |
}
|
65062 |
}
|
65063 |
+
}, container ? /*#__PURE__*/react.createElement(SettingsContainer, {
|
65064 |
title: title,
|
65065 |
+
children: render(),
|
65066 |
className: className
|
65067 |
+
}) : render());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65068 |
}
|
65069 |
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Slider/ValueLabel.js
|
65070 |
|
66147 |
|
66148 |
|
66149 |
|
66150 |
+
|
66151 |
function SliderContainer(_ref) {
|
66152 |
var _ref$title = _ref.title,
|
66153 |
title = _ref$title === void 0 ? "" : _ref$title,
|
66266 |
"data-testid": "slider-input",
|
66267 |
"aria-labelledby": "input-slider"
|
66268 |
}
|
66269 |
+
}), trashButton ? /*#__PURE__*/react.createElement(TrashButton, {
|
66270 |
disabled: sliderDisabled,
|
66271 |
onClick: function onClick() {
|
66272 |
setSliderValue("");
|
66273 |
onChange("unset");
|
66274 |
setSliderDisabled(true);
|
66275 |
},
|
66276 |
+
"data-testid": "delete"
|
66277 |
+
}) : null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66278 |
}
|
66279 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/ImageBorderRadius/ImageBorderRadius.js
|
66280 |
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
66292 |
|
66293 |
return imageRadius();
|
66294 |
}
|
66295 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/IconType/IconType.js
|
66296 |
+
function IconType_slicedToArray(arr, i) { return IconType_arrayWithHoles(arr) || IconType_iterableToArrayLimit(arr, i) || IconType_unsupportedIterableToArray(arr, i) || IconType_nonIterableRest(); }
|
66297 |
|
66298 |
+
function IconType_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
66299 |
|
66300 |
+
function IconType_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return IconType_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return IconType_arrayLikeToArray(o, minLen); }
|
66301 |
|
66302 |
+
function IconType_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
66303 |
|
66304 |
+
function IconType_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
66305 |
|
66306 |
+
function IconType_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
66307 |
|
66308 |
|
66309 |
|
66311 |
|
66312 |
|
66313 |
|
66314 |
+
function IconType(_ref) {
|
66315 |
+
var onChange = _ref.onChange,
|
66316 |
_ref$value = _ref.value,
|
66317 |
value = _ref$value === void 0 ? false : _ref$value,
|
66318 |
+
_ref$trashButton = _ref.trashButton,
|
66319 |
+
trashButton = _ref$trashButton === void 0 ? false : _ref$trashButton;
|
66320 |
+
var inputLabel = (0,react.useRef)(null);
|
|
|
|
|
|
|
66321 |
|
66322 |
+
var _useState = (0,react.useState)(0),
|
66323 |
+
_useState2 = IconType_slicedToArray(_useState, 2),
|
66324 |
+
labelWidth = _useState2[0],
|
66325 |
+
setLabelWidth = _useState2[1];
|
66326 |
|
66327 |
(0,react.useEffect)(function () {
|
66328 |
+
setLabelWidth(inputLabel.current.offsetWidth);
|
66329 |
+
}, []);
|
66330 |
+
|
66331 |
+
var handleChange = function handleChange(e) {
|
66332 |
+
/* webpack-strip-block:removed */
|
66333 |
+
if (e.target.value === "image") {
|
66334 |
+
app.showPremiumDialog(translate("premium.custom_image"));
|
66335 |
+
return;
|
66336 |
+
}
|
66337 |
+
|
66338 |
+
onChange(e.target.value);
|
66339 |
+
};
|
66340 |
+
|
66341 |
+
var items = function items() {
|
66342 |
+
/* webpack-strip-block:removed */
|
66343 |
+
return [/*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
66344 |
+
value: "off",
|
66345 |
+
key: 0
|
66346 |
+
}, /*#__PURE__*/react.createElement("i", {
|
66347 |
+
className: "fas fa-ban",
|
66348 |
+
style: {
|
66349 |
+
marginRight: 10
|
66350 |
+
}
|
66351 |
+
}), translate("common.off")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
66352 |
+
value: "icon",
|
66353 |
+
key: 1
|
66354 |
+
}, /*#__PURE__*/react.createElement("i", {
|
66355 |
+
className: "far fa-heart",
|
66356 |
+
style: {
|
66357 |
+
marginRight: 10
|
66358 |
}
|
66359 |
+
}), translate("utils.icon")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
66360 |
+
value: "image",
|
66361 |
+
style: {
|
66362 |
+
opacity: 0.5
|
66363 |
+
},
|
66364 |
+
key: 2
|
66365 |
+
}, /*#__PURE__*/react.createElement("i", {
|
66366 |
+
className: "fas fa-image",
|
66367 |
+
style: {
|
66368 |
+
marginRight: 10
|
66369 |
+
}
|
66370 |
+
}), translate("utils.image"), " ", /*#__PURE__*/react.createElement(PremiumTag, null))];
|
66371 |
+
};
|
66372 |
+
|
66373 |
+
return /*#__PURE__*/react.createElement(SettingsContainer, {
|
66374 |
+
title: translate("common.type")
|
66375 |
+
}, /*#__PURE__*/react.createElement(FormControl_FormControl, {
|
66376 |
+
variant: "outlined",
|
66377 |
+
fullWidth: true,
|
66378 |
+
size: "small"
|
66379 |
+
}, /*#__PURE__*/react.createElement(InputLabel_InputLabel, {
|
66380 |
+
ref: inputLabel
|
66381 |
+
}, translate("settings.icon_or_image.label")), /*#__PURE__*/react.createElement(Select_Select, {
|
66382 |
+
onChange: handleChange,
|
66383 |
+
labelWidth: labelWidth,
|
66384 |
+
value: value,
|
66385 |
+
MenuProps: {
|
66386 |
+
anchorOrigin: {
|
66387 |
+
vertical: "bottom",
|
66388 |
+
horizontal: "center"
|
66389 |
+
},
|
66390 |
+
transformOrigin: {
|
66391 |
+
vertical: "top",
|
66392 |
+
horizontal: "center"
|
66393 |
+
},
|
66394 |
+
getContentAnchorEl: null
|
66395 |
},
|
66396 |
+
inputProps: {
|
66397 |
+
"data-testid": "setting:icon-type"
|
66398 |
+
}
|
66399 |
+
}, items())), /*#__PURE__*/react.createElement(TrashButton, {
|
66400 |
+
disabled: trashButton,
|
66401 |
+
onClick: function onClick() {
|
66402 |
+
return onChange("unset");
|
66403 |
+
}
|
66404 |
+
}));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66405 |
}
|
66406 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/DisableSetting/DisableSetting.js
|
66407 |
|
66484 |
|
66485 |
function IconGroup(_ref) {
|
66486 |
var get = _ref.get,
|
|
|
66487 |
set = _ref.set,
|
66488 |
+
groupProps = IconGroup_objectWithoutProperties(_ref, ["get", "set"]);
|
66489 |
|
66490 |
var _useState = (0,react.useState)(0),
|
66491 |
_useState2 = IconGroup_slicedToArray(_useState, 2),
|
66493 |
setHoverSettings = _useState2[1]; // 0 = normal, 1 = hover
|
66494 |
|
66495 |
|
66496 |
+
var iconType = function iconType() {
|
66497 |
+
return /*#__PURE__*/react.createElement(IconType, {
|
66498 |
+
value: get("icon_type", {
|
66499 |
+
defToGroup: false,
|
66500 |
+
returnDefault: true
|
66501 |
+
}),
|
66502 |
+
trashButton: get("icon_type") === "",
|
66503 |
+
onChange: function onChange(val) {
|
66504 |
+
set("icon_type", val);
|
66505 |
}
|
66506 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66507 |
};
|
66508 |
|
66509 |
var settings = function settings() {
|
66510 |
var color = get("icon_color");
|
66511 |
+
var icon = get("icon", {
|
66512 |
+
returnDefault: true,
|
66513 |
+
returnSelf: true,
|
66514 |
+
returnParent: true,
|
66515 |
+
defToGroup: false
|
66516 |
+
});
|
66517 |
/* webpack-strip-block:removed */
|
66518 |
|
66519 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(DisableSetting, {
|
66531 |
})), /*#__PURE__*/react.createElement(ColorPicker, {
|
66532 |
title: translate("utils.color"),
|
66533 |
value: color[hoverSettings],
|
66534 |
+
defaultValue: get("icon_color", {
|
66535 |
+
returnDefault: true,
|
66536 |
+
returnSelf: true
|
66537 |
+
})[hoverSettings],
|
66538 |
onChange: function onChange(val) {
|
66539 |
var newValues = color;
|
66540 |
newValues[hoverSettings] = val;
|
66544 |
};
|
66545 |
|
66546 |
var sliders = function sliders() {
|
66547 |
+
var icon_size = get("icon_size", {
|
66548 |
+
defToGroup: false
|
66549 |
+
});
|
66550 |
/* webpack-strip-block:removed */
|
66551 |
|
66552 |
return /*#__PURE__*/react.createElement(DisableSetting, {
|
66558 |
}, /*#__PURE__*/react.createElement(SliderContainer, {
|
66559 |
title: translate("settings.icon_size.title"),
|
66560 |
value: icon_size[0],
|
66561 |
+
defaultValue: get("icon_size", {
|
66562 |
+
returnDefault: true,
|
66563 |
+
returnSelf: true,
|
66564 |
+
returnParent: true,
|
66565 |
+
defToGroup: false
|
66566 |
+
})[0],
|
66567 |
"data-testid": "settingcontainer:icon-size",
|
66568 |
inputText: "px",
|
66569 |
premium: hoverSettings === 1,
|
66579 |
return /*#__PURE__*/react.createElement(CollapsibleGroup, IconGroup_extends({
|
66580 |
title: translate("utils.icon"),
|
66581 |
"data-testid": "group:icon"
|
66582 |
+
}, groupProps), iconType(), get("icon_type", {
|
66583 |
+
defToGroup: false,
|
66584 |
+
returnDefault: true
|
66585 |
+
}) === "off" ? null : /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(Tabs_Tabs, {
|
66586 |
onChange: function onChange(_, val) {
|
66587 |
return setHoverSettings(val);
|
66588 |
},
|
66628 |
return _set(models.BUTTON, buttonId, key, val);
|
66629 |
},
|
66630 |
get: function get(key) {
|
66631 |
+
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
66632 |
+
_ref5$getParent = _ref5.getParent,
|
66633 |
+
getParent = _ref5$getParent === void 0 ? false : _ref5$getParent,
|
66634 |
+
_ref5$defToGroup = _ref5.defToGroup,
|
66635 |
+
defToGroup = _ref5$defToGroup === void 0 ? true : _ref5$defToGroup,
|
66636 |
+
options = IconGroup_objectWithoutProperties(_ref5, ["getParent", "defToGroup"]);
|
66637 |
+
|
66638 |
+
return _get(key, getParent ? group : button, group.menu_style, getParent ? "group" : "button", IconGroup_objectSpread({
|
66639 |
+
defToGroup: defToGroup && group
|
66640 |
+
}, options));
|
66641 |
}
|
66642 |
}, props);
|
66643 |
})(IconGroup));
|
66993 |
|
66994 |
|
66995 |
|
66996 |
+
function BorderRadius(props) {
|
66997 |
+
return /*#__PURE__*/react.createElement(TextFieldCorners, BorderRadius_extends({
|
66998 |
+
title: translate("settings.border_radius.title"),
|
66999 |
+
type: "corners"
|
67000 |
+
}, props));
|
67001 |
+
}
|
67002 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/LabelVisibility/LabelVisibility.js
|
67003 |
+
|
67004 |
+
|
67005 |
+
|
67006 |
+
|
67007 |
+
|
67008 |
+
|
67009 |
+
|
67010 |
+
function LabelVisibility(_ref) {
|
67011 |
+
var _onChange = _ref.onChange,
|
67012 |
+
value = _ref.value,
|
67013 |
+
_ref$title = _ref.title,
|
67014 |
+
title = _ref$title === void 0 ? "" : _ref$title,
|
67015 |
+
_ref$device = _ref.device,
|
67016 |
+
device = _ref$device === void 0 ? "" : _ref$device,
|
67017 |
+
trashButton = _ref.trashButton;
|
67018 |
+
return /*#__PURE__*/react.createElement(SettingsContainer, {
|
67019 |
+
title: title
|
67020 |
+
}, /*#__PURE__*/react.createElement(FormControl_FormControl, {
|
67021 |
+
variant: "outlined",
|
67022 |
+
fullWidth: true
|
67023 |
+
}, /*#__PURE__*/react.createElement(Select_Select, {
|
67024 |
+
id: "label-visibility",
|
67025 |
+
value: value || "",
|
67026 |
+
onChange: function onChange(e) {
|
67027 |
+
_onChange(e.target.value);
|
67028 |
+
},
|
67029 |
+
className: "MuiSelect-small",
|
67030 |
+
inputProps: {
|
67031 |
+
"data-testid": "setting:".concat(device, "-visibility")
|
67032 |
+
},
|
67033 |
+
displayEmpty: true
|
67034 |
+
}, trashButton && /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
67035 |
+
value: "",
|
67036 |
+
key: "group-default",
|
67037 |
+
disabled: true,
|
67038 |
+
style: {
|
67039 |
+
display: "none"
|
67040 |
+
}
|
67041 |
+
}, translate("settings.label_styles.group_default")), device === "desktop" ? [/*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
67042 |
+
value: "always",
|
67043 |
+
key: "always"
|
67044 |
+
}, translate("settings.label_styles.always")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
67045 |
+
value: "hover",
|
67046 |
+
key: "hover"
|
67047 |
+
}, translate("settings.label_styles.hover")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
67048 |
+
value: "hide",
|
67049 |
+
key: "hide"
|
67050 |
+
}, translate("settings.label_styles.hide"))] : [/*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
67051 |
+
value: "always",
|
67052 |
+
key: "always"
|
67053 |
+
}, translate("settings.label_styles.always")), /*#__PURE__*/react.createElement(MenuItem_MenuItem, {
|
67054 |
+
value: "hide",
|
67055 |
+
key: "hide"
|
67056 |
+
}, translate("settings.label_styles.hide"))])), trashButton ? /*#__PURE__*/react.createElement(TrashButton, {
|
67057 |
+
onClick: function onClick() {
|
67058 |
+
return _onChange("unset");
|
67059 |
+
},
|
67060 |
+
disabled: !value
|
67061 |
+
}) : null);
|
67062 |
+
}
|
67063 |
+
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Switch/Switch.js
|
67064 |
+
|
67065 |
+
|
67066 |
+
// @inheritedComponent IconButton
|
67067 |
+
|
67068 |
+
|
67069 |
+
|
67070 |
+
|
67071 |
+
|
67072 |
+
|
67073 |
+
|
67074 |
+
|
67075 |
+
var Switch_styles = function styles(theme) {
|
67076 |
+
return {
|
67077 |
+
/* Styles applied to the root element. */
|
67078 |
+
root: {
|
67079 |
+
display: 'inline-flex',
|
67080 |
+
width: 34 + 12 * 2,
|
67081 |
+
height: 14 + 12 * 2,
|
67082 |
+
overflow: 'hidden',
|
67083 |
+
padding: 12,
|
67084 |
+
boxSizing: 'border-box',
|
67085 |
+
position: 'relative',
|
67086 |
+
flexShrink: 0,
|
67087 |
+
zIndex: 0,
|
67088 |
+
// Reset the stacking context.
|
67089 |
+
verticalAlign: 'middle',
|
67090 |
+
// For correct alignment with the text.
|
67091 |
+
'@media print': {
|
67092 |
+
colorAdjust: 'exact'
|
67093 |
+
}
|
67094 |
+
},
|
67095 |
+
|
67096 |
+
/* Styles applied to the root element if `edge="start"`. */
|
67097 |
+
edgeStart: {
|
67098 |
+
marginLeft: -8
|
67099 |
+
},
|
67100 |
+
|
67101 |
+
/* Styles applied to the root element if `edge="end"`. */
|
67102 |
+
edgeEnd: {
|
67103 |
+
marginRight: -8
|
67104 |
+
},
|
67105 |
+
|
67106 |
+
/* Styles applied to the internal `SwitchBase` component's `root` class. */
|
67107 |
+
switchBase: {
|
67108 |
+
position: 'absolute',
|
67109 |
+
top: 0,
|
67110 |
+
left: 0,
|
67111 |
+
zIndex: 1,
|
67112 |
+
// Render above the focus ripple.
|
67113 |
+
color: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[400],
|
67114 |
+
transition: theme.transitions.create(['left', 'transform'], {
|
67115 |
+
duration: theme.transitions.duration.shortest
|
67116 |
+
}),
|
67117 |
+
'&$checked': {
|
67118 |
+
transform: 'translateX(20px)'
|
67119 |
+
},
|
67120 |
+
'&$disabled': {
|
67121 |
+
color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]
|
67122 |
+
},
|
67123 |
+
'&$checked + $track': {
|
67124 |
+
opacity: 0.5
|
67125 |
+
},
|
67126 |
+
'&$disabled + $track': {
|
67127 |
+
opacity: theme.palette.type === 'light' ? 0.12 : 0.1
|
67128 |
+
}
|
67129 |
+
},
|
67130 |
+
|
67131 |
+
/* Styles applied to the internal SwitchBase component's root element if `color="primary"`. */
|
67132 |
+
colorPrimary: {
|
67133 |
+
'&$checked': {
|
67134 |
+
color: theme.palette.primary.main,
|
67135 |
+
'&:hover': {
|
67136 |
+
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.primary.main, theme.palette.action.hoverOpacity),
|
67137 |
+
'@media (hover: none)': {
|
67138 |
+
backgroundColor: 'transparent'
|
67139 |
+
}
|
67140 |
+
}
|
67141 |
+
},
|
67142 |
+
'&$disabled': {
|
67143 |
+
color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]
|
67144 |
+
},
|
67145 |
+
'&$checked + $track': {
|
67146 |
+
backgroundColor: theme.palette.primary.main
|
67147 |
+
},
|
67148 |
+
'&$disabled + $track': {
|
67149 |
+
backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white
|
67150 |
+
}
|
67151 |
+
},
|
67152 |
+
|
67153 |
+
/* Styles applied to the internal SwitchBase component's root element if `color="secondary"`. */
|
67154 |
+
colorSecondary: {
|
67155 |
+
'&$checked': {
|
67156 |
+
color: theme.palette.secondary.main,
|
67157 |
+
'&:hover': {
|
67158 |
+
backgroundColor: (0,colorManipulator/* fade */.U1)(theme.palette.secondary.main, theme.palette.action.hoverOpacity),
|
67159 |
+
'@media (hover: none)': {
|
67160 |
+
backgroundColor: 'transparent'
|
67161 |
+
}
|
67162 |
+
}
|
67163 |
+
},
|
67164 |
+
'&$disabled': {
|
67165 |
+
color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]
|
67166 |
+
},
|
67167 |
+
'&$checked + $track': {
|
67168 |
+
backgroundColor: theme.palette.secondary.main
|
67169 |
+
},
|
67170 |
+
'&$disabled + $track': {
|
67171 |
+
backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white
|
67172 |
+
}
|
67173 |
+
},
|
67174 |
+
|
67175 |
+
/* Styles applied to the root element if `size="small"`. */
|
67176 |
+
sizeSmall: {
|
67177 |
+
width: 40,
|
67178 |
+
height: 24,
|
67179 |
+
padding: 7,
|
67180 |
+
'& $thumb': {
|
67181 |
+
width: 16,
|
67182 |
+
height: 16
|
67183 |
+
},
|
67184 |
+
'& $switchBase': {
|
67185 |
+
padding: 4,
|
67186 |
+
'&$checked': {
|
67187 |
+
transform: 'translateX(16px)'
|
67188 |
+
}
|
67189 |
+
}
|
67190 |
+
},
|
67191 |
+
|
67192 |
+
/* Pseudo-class applied to the internal `SwitchBase` component's `checked` class. */
|
67193 |
+
checked: {},
|
67194 |
+
|
67195 |
+
/* Pseudo-class applied to the internal SwitchBase component's disabled class. */
|
67196 |
+
disabled: {},
|
67197 |
+
|
67198 |
+
/* Styles applied to the internal SwitchBase component's input element. */
|
67199 |
+
input: {
|
67200 |
+
left: '-100%',
|
67201 |
+
width: '300%'
|
67202 |
+
},
|
67203 |
+
|
67204 |
+
/* Styles used to create the thumb passed to the internal `SwitchBase` component `icon` prop. */
|
67205 |
+
thumb: {
|
67206 |
+
boxShadow: theme.shadows[1],
|
67207 |
+
backgroundColor: 'currentColor',
|
67208 |
+
width: 20,
|
67209 |
+
height: 20,
|
67210 |
+
borderRadius: '50%'
|
67211 |
+
},
|
67212 |
+
|
67213 |
+
/* Styles applied to the track element. */
|
67214 |
+
track: {
|
67215 |
+
height: '100%',
|
67216 |
+
width: '100%',
|
67217 |
+
borderRadius: 14 / 2,
|
67218 |
+
zIndex: -1,
|
67219 |
+
transition: theme.transitions.create(['opacity', 'background-color'], {
|
67220 |
+
duration: theme.transitions.duration.shortest
|
67221 |
+
}),
|
67222 |
+
backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white,
|
67223 |
+
opacity: theme.palette.type === 'light' ? 0.38 : 0.3
|
67224 |
+
}
|
67225 |
+
};
|
67226 |
+
};
|
67227 |
+
var Switch_Switch = /*#__PURE__*/react.forwardRef(function Switch(props, ref) {
|
67228 |
+
var classes = props.classes,
|
67229 |
+
className = props.className,
|
67230 |
+
_props$color = props.color,
|
67231 |
+
color = _props$color === void 0 ? 'secondary' : _props$color,
|
67232 |
+
_props$edge = props.edge,
|
67233 |
+
edge = _props$edge === void 0 ? false : _props$edge,
|
67234 |
+
_props$size = props.size,
|
67235 |
+
size = _props$size === void 0 ? 'medium' : _props$size,
|
67236 |
+
other = (0,objectWithoutProperties/* default */.Z)(props, ["classes", "className", "color", "edge", "size"]);
|
67237 |
+
|
67238 |
+
var icon = /*#__PURE__*/react.createElement("span", {
|
67239 |
+
className: classes.thumb
|
67240 |
+
});
|
67241 |
+
return /*#__PURE__*/react.createElement("span", {
|
67242 |
+
className: (0,clsx_m/* default */.Z)(classes.root, className, {
|
67243 |
+
'start': classes.edgeStart,
|
67244 |
+
'end': classes.edgeEnd
|
67245 |
+
}[edge], size === "small" && classes["size".concat((0,capitalize/* default */.Z)(size))])
|
67246 |
+
}, /*#__PURE__*/react.createElement(internal_SwitchBase, (0,esm_extends/* default */.Z)({
|
67247 |
+
type: "checkbox",
|
67248 |
+
icon: icon,
|
67249 |
+
checkedIcon: icon,
|
67250 |
+
classes: {
|
67251 |
+
root: (0,clsx_m/* default */.Z)(classes.switchBase, classes["color".concat((0,capitalize/* default */.Z)(color))]),
|
67252 |
+
input: classes.input,
|
67253 |
+
checked: classes.checked,
|
67254 |
+
disabled: classes.disabled
|
67255 |
+
},
|
67256 |
+
ref: ref
|
67257 |
+
}, other)), /*#__PURE__*/react.createElement("span", {
|
67258 |
+
className: classes.track
|
67259 |
+
}));
|
67260 |
+
});
|
67261 |
+
false ? 0 : void 0;
|
67262 |
+
/* harmony default export */ var esm_Switch_Switch = ((0,withStyles/* default */.Z)(Switch_styles, {
|
67263 |
+
name: 'MuiSwitch'
|
67264 |
+
})(Switch_Switch));
|
67265 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Form/BoxShadow/BoxShadow.js
|
67266 |
+
function BoxShadow_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { BoxShadow_typeof = function _typeof(obj) { return typeof obj; }; } else { BoxShadow_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return BoxShadow_typeof(obj); }
|
67267 |
+
|
67268 |
+
function BoxShadow_slicedToArray(arr, i) { return BoxShadow_arrayWithHoles(arr) || BoxShadow_iterableToArrayLimit(arr, i) || BoxShadow_unsupportedIterableToArray(arr, i) || BoxShadow_nonIterableRest(); }
|
67269 |
+
|
67270 |
+
function BoxShadow_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
67271 |
+
|
67272 |
+
function BoxShadow_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
67273 |
+
|
67274 |
+
function BoxShadow_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
67275 |
|
67276 |
+
function BoxShadow_toConsumableArray(arr) { return BoxShadow_arrayWithoutHoles(arr) || BoxShadow_iterableToArray(arr) || BoxShadow_unsupportedIterableToArray(arr) || BoxShadow_nonIterableSpread(); }
|
67277 |
|
67278 |
+
function BoxShadow_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
67279 |
|
67280 |
+
function BoxShadow_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return BoxShadow_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return BoxShadow_arrayLikeToArray(o, minLen); }
|
67281 |
|
67282 |
+
function BoxShadow_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
67283 |
|
67284 |
+
function BoxShadow_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return BoxShadow_arrayLikeToArray(arr); }
|
67285 |
|
67286 |
+
function BoxShadow_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
67287 |
+
|
67288 |
+
function _wrapRegExp(re, groups) { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, undefined, groups); }; var _RegExp = _wrapNativeSuper(RegExp); var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = _RegExp.call(this, re, flags); _groups.set(_this, groups || _groups.get(re)); return _this; } BoxShadow_inherits(BabelRegExp, _RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === "string") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } else if (typeof substitution === "function") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = []; args.push.apply(args, arguments); if (BoxShadow_typeof(args[args.length - 1]) !== "object") { args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }
|
67289 |
+
|
67290 |
+
function BoxShadow_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) BoxShadow_setPrototypeOf(subClass, superClass); }
|
67291 |
+
|
67292 |
+
function BoxShadow_possibleConstructorReturn(self, call) { if (call && (BoxShadow_typeof(call) === "object" || typeof call === "function")) { return call; } return BoxShadow_assertThisInitialized(self); }
|
67293 |
+
|
67294 |
+
function BoxShadow_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
67295 |
+
|
67296 |
+
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, BoxShadow_getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return BoxShadow_setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
67297 |
+
|
67298 |
+
function _construct(Parent, args, Class) { if (BoxShadow_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) BoxShadow_setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
67299 |
+
|
67300 |
+
function BoxShadow_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
67301 |
+
|
67302 |
+
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
67303 |
+
|
67304 |
+
function BoxShadow_setPrototypeOf(o, p) { BoxShadow_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return BoxShadow_setPrototypeOf(o, p); }
|
67305 |
+
|
67306 |
+
function BoxShadow_getPrototypeOf(o) { BoxShadow_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return BoxShadow_getPrototypeOf(o); }
|
67307 |
+
|
67308 |
+
|
67309 |
+
|
67310 |
+
|
67311 |
+
|
67312 |
+
|
67313 |
+
|
67314 |
+
|
67315 |
+
function BoxShadow(_ref) {
|
67316 |
+
var _ref$value = _ref.value,
|
67317 |
+
value = _ref$value === void 0 ? "" : _ref$value,
|
67318 |
+
_ref$enabled = _ref.enabled,
|
67319 |
+
enabled = _ref$enabled === void 0 ? true : _ref$enabled,
|
67320 |
_ref$title = _ref.title,
|
67321 |
+
title = _ref$title === void 0 ? translate("settings.box_shadow.title") : _ref$title,
|
67322 |
+
_onChange = _ref.onChange,
|
67323 |
+
_ref$defaultValue = _ref.defaultValue,
|
67324 |
+
defaultValue = _ref$defaultValue === void 0 ? "0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)" : _ref$defaultValue,
|
67325 |
+
_ref$updateValue = _ref.updateValue,
|
67326 |
+
updateValue = _ref$updateValue === void 0 ? false : _ref$updateValue,
|
67327 |
+
_ref$rowAmount = _ref.rowAmount,
|
67328 |
+
rowAmount = _ref$rowAmount === void 0 ? 1 : _ref$rowAmount,
|
67329 |
trashButton = _ref.trashButton;
|
67330 |
+
|
67331 |
+
var numberPattern = /*#__PURE__*/_wrapRegExp(/,?([0-9]+)?[,\.]?[0-9]*?px ([0-9]+)?[,\.]?[0-9]*?px ([0-9]+)?[,\.]?[0-9]*?px ([0-9]+)?[,\.]?[0-9]*?px (rgba\(.*?\))/g, {
|
67332 |
+
x: 1,
|
67333 |
+
y: 2,
|
67334 |
+
blur: 3,
|
67335 |
+
spread: 4,
|
67336 |
+
rgba: 5
|
67337 |
+
});
|
67338 |
+
|
67339 |
+
var valueArray = new Array(rowAmount).fill(null).map(function (val, k) {
|
67340 |
+
var defaultRow = [];
|
67341 |
+
defaultRow["groups"] = {
|
67342 |
+
x: "",
|
67343 |
+
y: "",
|
67344 |
+
blur: "",
|
67345 |
+
spread: "",
|
67346 |
+
rgba: ""
|
67347 |
+
};
|
67348 |
+
return BoxShadow_toConsumableArray(value.matchAll(numberPattern))[k] || defaultRow;
|
67349 |
+
});
|
67350 |
+
var defaultArray = new Array(rowAmount).fill(null).map(function (val, k) {
|
67351 |
+
var defaultRow = [];
|
67352 |
+
defaultRow["groups"] = {
|
67353 |
+
x: "0",
|
67354 |
+
y: "0",
|
67355 |
+
blur: "0",
|
67356 |
+
spread: "0",
|
67357 |
+
rgba: "rgba(0, 0, 0, 0)"
|
67358 |
+
};
|
67359 |
+
return BoxShadow_toConsumableArray(defaultValue.matchAll(numberPattern))[k] || defaultRow;
|
67360 |
+
});
|
67361 |
+
|
67362 |
+
var _useState = (0,react.useState)(valueArray),
|
67363 |
+
_useState2 = BoxShadow_slicedToArray(_useState, 2),
|
67364 |
+
values = _useState2[0],
|
67365 |
+
setValues = _useState2[1];
|
67366 |
+
|
67367 |
+
var handleChangeShadow = function handleChangeShadow(row, key) {
|
67368 |
+
var newValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
67369 |
+
|
67370 |
+
var newValues = BoxShadow_toConsumableArray(values);
|
67371 |
+
|
67372 |
+
newValues[row]["groups"][key] = newValue;
|
67373 |
+
setValues(newValues);
|
67374 |
+
if (newValues.every(function (row) {
|
67375 |
+
return !Object.values(row["groups"]).some(function (x) {
|
67376 |
+
return x !== null && x !== "";
|
67377 |
+
});
|
67378 |
+
})) return _onChange("unset");
|
67379 |
+
handleOnchange();
|
67380 |
+
};
|
67381 |
+
|
67382 |
+
var handleOnchange = function handleOnchange() {
|
67383 |
+
var combined = "";
|
67384 |
+
|
67385 |
+
var _loop = function _loop(row) {
|
67386 |
+
combined += Object.entries(values[row]["groups"]).map(function (_ref2) {
|
67387 |
+
var _ref3 = BoxShadow_slicedToArray(_ref2, 2),
|
67388 |
+
key = _ref3[0],
|
67389 |
+
val = _ref3[1];
|
67390 |
+
|
67391 |
+
if (key === "rgba") return val || defaultArray[row]["groups"][key];
|
67392 |
+
return "".concat(val || defaultArray[row]["groups"][key], "px");
|
67393 |
+
}).join(" ") + ", ";
|
67394 |
+
};
|
67395 |
+
|
67396 |
+
for (var row in values) {
|
67397 |
+
_loop(row);
|
67398 |
+
}
|
67399 |
+
|
67400 |
+
_onChange(combined.slice(0, -2), "box_shadow");
|
67401 |
+
};
|
67402 |
+
|
67403 |
+
(0,react.useEffect)(function () {
|
67404 |
+
var valueArray = new Array(rowAmount).fill(null).map(function (val, k) {
|
67405 |
+
var defaultRow = [];
|
67406 |
+
defaultRow["groups"] = {
|
67407 |
+
x: "",
|
67408 |
+
y: "",
|
67409 |
+
blur: "",
|
67410 |
+
spread: "",
|
67411 |
+
rgba: ""
|
67412 |
+
};
|
67413 |
+
return BoxShadow_toConsumableArray(value.matchAll(numberPattern))[k] || defaultRow;
|
67414 |
+
});
|
67415 |
+
setValues(valueArray);
|
67416 |
+
}, [updateValue]);
|
67417 |
+
|
67418 |
+
var layerRowEl = function layerRowEl() {
|
67419 |
+
var rowEl = [];
|
67420 |
+
times(rowAmount)(function (row) {
|
67421 |
+
var textfields = [];
|
67422 |
+
|
67423 |
+
for (var _i2 = 0, _Object$keys = Object.keys(values[row]["groups"]); _i2 < _Object$keys.length; _i2++) {
|
67424 |
+
var key = _Object$keys[_i2];
|
67425 |
+
|
67426 |
+
if (key !== "rgba") {
|
67427 |
+
textfields.push(createTextfield({
|
67428 |
+
key: key,
|
67429 |
+
row: row,
|
67430 |
+
value: values[row]["groups"] && values[row]["groups"][key],
|
67431 |
+
def: defaultArray[row]["groups"] && defaultArray[row]["groups"][key],
|
67432 |
+
onChange: partial(handleChangeShadow, row, key)
|
67433 |
+
}));
|
67434 |
+
}
|
67435 |
+
}
|
67436 |
+
|
67437 |
+
rowEl.push( /*#__PURE__*/react.createElement(SettingsContainer, {
|
67438 |
+
key: row,
|
67439 |
+
fullWidth: false,
|
67440 |
+
"data-testid": "row-" + row
|
67441 |
+
}, /*#__PURE__*/react.createElement("div", {
|
67442 |
+
style: {
|
67443 |
+
display: "inline-flex"
|
67444 |
+
}
|
67445 |
+
}, textfields), /*#__PURE__*/react.createElement(ColorPicker, {
|
67446 |
+
value: values[row]["groups"] && values[row]["groups"]["rgba"],
|
67447 |
+
defaultValue: defaultArray[row]["groups"]["rgba"],
|
67448 |
+
noGradient: true,
|
67449 |
+
onChange: function onChange(val) {
|
67450 |
+
if (val === "unset") return handleChangeShadow(row, "rgba", "");
|
67451 |
+
handleChangeShadow(row, "rgba", val);
|
67452 |
+
},
|
67453 |
+
small: true,
|
67454 |
+
container: false
|
67455 |
+
})));
|
67456 |
+
});
|
67457 |
+
return rowEl;
|
67458 |
+
};
|
67459 |
+
|
67460 |
+
return /*#__PURE__*/react.createElement("div", null, /*#__PURE__*/react.createElement(SettingsContainer, {
|
67461 |
+
title: title,
|
67462 |
+
fullWidth: false,
|
67463 |
+
style: {
|
67464 |
+
marginBottom: "unset"
|
67465 |
+
}
|
67466 |
+
}, /*#__PURE__*/react.createElement(esm_Switch_Switch, {
|
67467 |
+
onChange: function onChange(obj) {
|
67468 |
+
// if (obj.target.checked === false) {
|
67469 |
+
// onChange("unset", "box_shadow");
|
67470 |
+
// }
|
67471 |
+
_onChange(obj.target.checked, "enable");
|
67472 |
},
|
67473 |
+
checked: enabled,
|
67474 |
inputProps: {
|
67475 |
+
"data-testid": "box-shadow:enable"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67476 |
}
|
67477 |
+
}), /*#__PURE__*/react.createElement(TrashButton, {
|
67478 |
+
disabled: trashButton === "" || trashButton == null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67479 |
onClick: function onClick() {
|
67480 |
+
return _onChange("unset", "enable");
|
67481 |
+
}
|
67482 |
+
})), enabled && layerRowEl());
|
67483 |
+
}
|
67484 |
+
|
67485 |
+
function createTextfield(_ref4) {
|
67486 |
+
var key = _ref4.key,
|
67487 |
+
row = _ref4.row,
|
67488 |
+
_ref4$value = _ref4.value,
|
67489 |
+
value = _ref4$value === void 0 ? "" : _ref4$value,
|
67490 |
+
def = _ref4.def,
|
67491 |
+
_onChange2 = _ref4.onChange;
|
67492 |
+
return /*#__PURE__*/react.createElement(TextField_TextField, {
|
67493 |
+
key: key,
|
67494 |
+
value: value,
|
67495 |
+
type: "number",
|
67496 |
+
className: "box-shadow-input",
|
67497 |
+
margin: "dense",
|
67498 |
+
placeholder: def,
|
67499 |
+
variant: "outlined",
|
67500 |
+
InputProps: {
|
67501 |
+
endAdornment: /*#__PURE__*/react.createElement("div", {
|
67502 |
+
className: "box-shadow-input-adornment"
|
67503 |
+
}, "px")
|
67504 |
},
|
67505 |
+
inputProps: {
|
67506 |
+
"data-testid": "box-shadow:".concat(key, "-").concat(row)
|
|
|
|
|
|
|
67507 |
},
|
67508 |
+
helperText: key,
|
67509 |
+
onChange: function onChange(e) {
|
67510 |
+
return _onChange2(e.target.value.replace(/^0+(.+)/, "$1"));
|
67511 |
+
}
|
67512 |
+
});
|
67513 |
+
}
|
67514 |
+
|
67515 |
+
function partial(func
|
67516 |
+
/*, 0..n args */
|
67517 |
+
) {
|
67518 |
+
var args = Array.prototype.slice.call(arguments, 1);
|
67519 |
+
return function () {
|
67520 |
+
var allArguments = args.concat(Array.prototype.slice.call(arguments));
|
67521 |
+
return func.apply(this, allArguments);
|
67522 |
+
};
|
67523 |
}
|
67524 |
+
|
67525 |
+
var times = function times(n) {
|
67526 |
+
return function (f) {
|
67527 |
+
var iter = function iter(i) {
|
67528 |
+
if (i === n) return;
|
67529 |
+
f(i);
|
67530 |
+
iter(i + 1);
|
67531 |
+
};
|
67532 |
+
|
67533 |
+
return iter(0);
|
67534 |
+
};
|
67535 |
+
};
|
67536 |
;// CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/Grid/Grid.js
|
67537 |
|
67538 |
|
67820 |
|
67821 |
|
67822 |
|
67823 |
+
|
67824 |
var LabelPosition = function LabelPosition(_ref) {
|
67825 |
var onChange = _ref.onChange,
|
67826 |
_ref$title = _ref.title,
|
67827 |
title = _ref$title === void 0 ? "" : _ref$title,
|
67828 |
value = _ref.value,
|
67829 |
defaultValue = _ref.defaultValue,
|
67830 |
+
trashButton = _ref.trashButton;
|
|
|
67831 |
|
67832 |
var _useState = (0,react.useState)(value || defaultValue),
|
67833 |
_useState2 = LabelPosition_slicedToArray(_useState, 2),
|
67879 |
},
|
67880 |
"data-testid": "setting:position-label-right",
|
67881 |
size: "small"
|
67882 |
+
}, translate("settings.label_position.directions.right")))), /*#__PURE__*/react.createElement(TrashButton, {
|
67883 |
"data-testid": "delete-label-position-value",
|
67884 |
onClick: function onClick() {
|
67885 |
onChange("unset");
|
67886 |
},
|
67887 |
+
disabled: trashButton
|
67888 |
+
})));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67889 |
};
|
67890 |
;// CONCATENATED MODULE: ./src/js/dashboard/Pages/Button/Tabs/Styling/LabelGroup.js
|
67891 |
function LabelGroup_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
67929 |
|
67930 |
|
67931 |
|
67932 |
+
|
67933 |
function _LabelGroup(_ref) {
|
67934 |
var set = _ref.set,
|
67935 |
get = _ref.get,
|
67936 |
+
groupProps = LabelGroup_objectWithoutProperties(_ref, ["set", "get"]);
|
|
|
67937 |
|
67938 |
var _useState = (0,react.useState)(0),
|
67939 |
_useState2 = LabelGroup_slicedToArray(_useState, 2),
|
67945 |
return /*#__PURE__*/react.createElement(DisableSetting, {
|
67946 |
premiumTag: true
|
67947 |
}, /*#__PURE__*/react.createElement(FontFamily, null));
|
67948 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67949 |
|
67950 |
+
var labelSpacing = function labelSpacing() {
|
67951 |
+
var label_spacing = get("label_spacing");
|
67952 |
+
return /*#__PURE__*/react.createElement(SliderContainer, {
|
67953 |
+
title: "Label Spacing",
|
67954 |
+
value: label_spacing,
|
67955 |
+
inputText: "px",
|
67956 |
+
onChange: function onChange(val) {
|
67957 |
+
var newValues = label_spacing;
|
67958 |
+
newValues = val;
|
67959 |
+
set("label_spacing", newValues);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67960 |
},
|
67961 |
+
defaultValue: get("label_spacing", {
|
67962 |
+
excludeSelf: true,
|
67963 |
+
returnDefault: true,
|
67964 |
+
defToGroup: true
|
67965 |
+
})
|
67966 |
+
});
|
67967 |
+
};
|
67968 |
|
67969 |
+
var margin = function margin() {
|
67970 |
+
/* webpack-strip-block:removed */
|
67971 |
+
return /*#__PURE__*/react.createElement(DisableSetting, {
|
67972 |
+
premiumTag: true,
|
67973 |
+
onClick: function onClick() {
|
67974 |
+
app.showPremiumDialog(translate("premium.margin"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67975 |
}
|
67976 |
+
}, /*#__PURE__*/react.createElement(TextFieldCorners, {
|
67977 |
+
title: translate("settings.margin.title") + " (PRO)",
|
67978 |
+
type: "sides"
|
67979 |
+
}));
|
67980 |
+
};
|
67981 |
|
67982 |
+
var padding = function padding() {
|
67983 |
+
/* webpack-strip-block:removed */
|
67984 |
+
return /*#__PURE__*/react.createElement(DisableSetting, {
|
67985 |
+
premiumTag: true,
|
67986 |
+
onClick: function onClick() {
|
67987 |
+
app.showPremiumDialog(translate("premium.padding"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67988 |
}
|
67989 |
+
}, /*#__PURE__*/react.createElement(TextFieldCorners, {
|
67990 |
+
title: translate("settings.padding.title") + " (PRO)",
|
67991 |
+
type: "sides"
|
67992 |
+
}));
|
67993 |
+
};
|
67994 |
|
67995 |
+
var fontSize = function fontSize() {
|
67996 |
+
var label_font_size = get("label_font_size");
|
67997 |
+
var label_font_size_parent = get("label_font_size", {
|
67998 |
+
returnDefault: true,
|
67999 |
+
returnSelf: true,
|
68000 |
+
defToGroup: true
|
68001 |
+
});
|
68002 |
+
/* webpack-strip-block:removed */
|
68003 |
+
|
68004 |
+
return /*#__PURE__*/react.createElement(DisableSetting, {
|
68005 |
+
condition: hoverSettings === 1,
|
68006 |
+
premiumTag: true,
|
68007 |
+
onClick: function onClick() {
|
68008 |
+
app.showPremiumDialog("More hover settings!");
|
68009 |
+
}
|
68010 |
+
}, /*#__PURE__*/react.createElement(SliderContainer, {
|
68011 |
+
title: translate("settings.font_size"),
|
68012 |
+
"data-testid": "styling:font_size",
|
68013 |
+
value: label_font_size[0],
|
68014 |
+
inputText: "px",
|
68015 |
+
onChange: function onChange(val) {
|
68016 |
+
set("label_font_size", val);
|
68017 |
},
|
68018 |
+
defaultValue: label_font_size_parent[0],
|
68019 |
+
disabled: hoverSettings === 1,
|
68020 |
+
premium: hoverSettings === 1
|
68021 |
+
}));
|
68022 |
+
};
|
68023 |
+
|
68024 |
+
var borderRadius = function borderRadius() {
|
68025 |
+
var label_border_radius = get("label_border_radius");
|
68026 |
+
var label_border_radius_parent = get("label_border_radius", {
|
68027 |
+
returnDefault: true,
|
68028 |
+
returnSelf: true,
|
68029 |
+
defToGroup: true
|
68030 |
+
});
|
68031 |
+
/* webpack-strip-block:removed */
|
68032 |
+
|
68033 |
+
return /*#__PURE__*/react.createElement(DisableSetting, {
|
68034 |
+
condition: hoverSettings === 1,
|
68035 |
+
premiumTag: true,
|
68036 |
+
onClick: function onClick() {
|
68037 |
+
app.showPremiumDialog("More hover settings!");
|
68038 |
}
|
68039 |
+
}, /*#__PURE__*/react.createElement(BorderRadius, {
|
68040 |
+
defaultValue: label_border_radius_parent[0],
|
68041 |
+
value: label_border_radius[0],
|
68042 |
+
disabled: hoverSettings === 1,
|
68043 |
+
onChange: function onChange(val) {
|
68044 |
+
var newValues = label_border_radius;
|
68045 |
+
newValues[0] = val || "unset";
|
68046 |
+
set("label_border_radius", newValues);
|
68047 |
+
}
|
68048 |
+
}));
|
68049 |
+
};
|
68050 |
|
68051 |
+
var boxShadow = function boxShadow() {
|
68052 |
+
return /*#__PURE__*/react.createElement(BoxShadow, {
|
68053 |
+
value: get("label_box_shadow")[hoverSettings] // if label_box_shadow_enabled is enabled by group/button || if parent is disabled AND button is undefined AND has shadow.
|
68054 |
+
,
|
68055 |
+
enabled: get("label_box_shadow_enabled", {
|
68056 |
+
returnSelf: true,
|
68057 |
+
returnDefault: true,
|
68058 |
+
defToGroup: true,
|
68059 |
+
returnParent: true
|
68060 |
+
})[hoverSettings],
|
68061 |
+
defaultValue: get("label_box_shadow", {
|
68062 |
+
excludeSelf: true,
|
68063 |
+
returnDefault: true,
|
68064 |
+
returnSelf: true,
|
68065 |
+
defToGroup: true
|
68066 |
+
})[hoverSettings],
|
68067 |
+
trashButton: get("label_box_shadow_enabled")[hoverSettings],
|
68068 |
+
updateValue: "".concat(get("id")).concat(hoverSettings),
|
68069 |
+
onChange: function onChange(val, type) {
|
68070 |
+
if (type === "enable") {
|
68071 |
+
var _newValues = get("label_box_shadow_enabled");
|
68072 |
+
|
68073 |
+
_newValues[hoverSettings] = val;
|
68074 |
+
set("label_box_shadow_enabled", _newValues);
|
68075 |
+
return;
|
68076 |
+
}
|
68077 |
|
68078 |
+
var newValues = get("label_box_shadow");
|
68079 |
+
newValues[hoverSettings] = val;
|
68080 |
+
set("label_box_shadow", newValues);
|
68081 |
+
}
|
68082 |
+
});
|
68083 |
+
};
|
68084 |
|
68085 |
+
var label_color = get("label_color");
|
68086 |
+
var label_color_parent = get("label_color", {
|
68087 |
+
returnDefault: true,
|
68088 |
+
returnSelf: true,
|
68089 |
+
defToGroup: true
|
68090 |
+
});
|
68091 |
+
var label_background_color = get("label_background_color");
|
68092 |
+
var label_background_color_parent = get("label_background_color", {
|
68093 |
+
returnDefault: true,
|
68094 |
+
returnSelf: true,
|
68095 |
+
defToGroup: true
|
68096 |
+
});
|
68097 |
+
return /*#__PURE__*/react.createElement(CollapsibleGroup, LabelGroup_extends({
|
68098 |
+
title: translate("settings.label.title"),
|
68099 |
+
"data-testid": "group:label"
|
68100 |
+
}, groupProps), /*#__PURE__*/react.createElement("div", {
|
68101 |
+
className: "setting-group-title"
|
68102 |
+
}, "Style"), /*#__PURE__*/react.createElement("hr", null), labelSpacing(), get("label_inside", {
|
68103 |
+
getParent: true,
|
68104 |
+
returnDefault: true
|
68105 |
+
}) ? null : /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
68106 |
+
className: "label-device-visibility"
|
68107 |
+
}, /*#__PURE__*/react.createElement("div", {
|
68108 |
+
className: "setting-group-title"
|
68109 |
+
}, translate("settings.label_desktop.title")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(LabelVisibility, {
|
68110 |
+
title: translate("settings.show_mobile_desktop.desktop"),
|
68111 |
+
device: "desktop",
|
68112 |
+
value: get("show_label_desktop", {
|
68113 |
+
returnDefault: true,
|
68114 |
+
returnSelf: true
|
68115 |
+
}),
|
68116 |
+
onChange: function onChange(val) {
|
68117 |
+
return set("show_label_desktop", val);
|
68118 |
},
|
68119 |
+
trashButton: true
|
68120 |
+
}), /*#__PURE__*/react.createElement(LabelVisibility, {
|
68121 |
+
title: translate("settings.show_mobile_desktop.mobile"),
|
68122 |
+
device: "mobile",
|
68123 |
+
value: get("show_label_mobile", {
|
68124 |
+
returnDefault: true,
|
68125 |
+
returnSelf: true
|
68126 |
+
}),
|
68127 |
+
onChange: function onChange(val) {
|
68128 |
+
return set("show_label_mobile", val);
|
68129 |
+
},
|
68130 |
+
trashButton: true
|
68131 |
+
})), /*#__PURE__*/react.createElement("div", {
|
68132 |
+
className: "setting-group-title"
|
68133 |
+
}, translate("settings.label_position.title")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(LabelPosition, {
|
68134 |
+
title: translate("settings.label_position.description"),
|
68135 |
+
value: get("horizontal_position_label"),
|
68136 |
+
defaultValue: get("horizontal_position_label", {
|
68137 |
+
returnDefault: true,
|
68138 |
+
getParent: true,
|
68139 |
+
excludeSelf: true
|
68140 |
+
}),
|
68141 |
+
onChange: function onChange(val) {
|
68142 |
+
set("horizontal_position_label", val);
|
68143 |
+
},
|
68144 |
+
trashButton: get("horizontal_position_label") === ""
|
68145 |
+
})), /*#__PURE__*/react.createElement(Tabs_Tabs, {
|
68146 |
+
onChange: function onChange(_, val) {
|
68147 |
+
return setHoverSettings(val);
|
68148 |
+
},
|
68149 |
+
style: {
|
68150 |
+
marginBottom: "20px",
|
68151 |
+
marginTop: get("label_inside", {
|
68152 |
+
getParent: true,
|
68153 |
+
returnDefault: true
|
68154 |
+
}) ? "0" : "20px"
|
68155 |
},
|
68156 |
+
value: hoverSettings,
|
68157 |
+
variant: "fullWidth",
|
68158 |
+
centered: true
|
68159 |
+
}, /*#__PURE__*/react.createElement(Tab_Tab, {
|
68160 |
+
label: "Normal",
|
68161 |
+
"data-testid": "normal_hover:normal"
|
68162 |
+
}), /*#__PURE__*/react.createElement(Tab_Tab, {
|
68163 |
+
label: "Hover",
|
68164 |
+
"data-testid": "normal_hover:hover"
|
68165 |
+
})), /*#__PURE__*/react.createElement("div", {
|
68166 |
+
className: "setting-group-title"
|
68167 |
+
}, translate("utils.text")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(ColorPicker, {
|
68168 |
+
noGradient: true,
|
68169 |
+
title: translate("utils.color"),
|
68170 |
+
value: label_color[hoverSettings],
|
68171 |
+
defaultValue: label_color_parent[hoverSettings],
|
68172 |
+
onChange: function onChange(val) {
|
68173 |
+
var newValues = label_color;
|
68174 |
+
newValues[hoverSettings] = val;
|
68175 |
+
set("label_color", newValues);
|
68176 |
+
}
|
68177 |
+
}), fontSize(), fontFamily(), get("label_inside", {
|
68178 |
+
getParent: true,
|
68179 |
+
returnDefault: true
|
68180 |
+
}) ? null : /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
68181 |
+
className: "setting-group-title"
|
68182 |
+
}, translate("utils.background")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(ColorPicker, {
|
68183 |
+
title: translate("utils.color"),
|
68184 |
+
value: label_background_color[hoverSettings],
|
68185 |
+
defaultValue: label_background_color_parent[hoverSettings],
|
68186 |
+
onChange: function onChange(val) {
|
68187 |
+
var newValues = label_background_color;
|
68188 |
+
newValues[hoverSettings] = val;
|
68189 |
+
set("label_background_color", newValues);
|
68190 |
+
}
|
68191 |
+
}), borderRadius(), margin(), padding(), boxShadow()));
|
68192 |
+
}
|
68193 |
|
68194 |
+
/* harmony default export */ var LabelGroup = (connect(function (state) {
|
68195 |
+
return {
|
68196 |
+
buttons: state.buttons,
|
68197 |
+
groups: state.groups
|
68198 |
+
};
|
68199 |
+
}, function (dispatch) {
|
68200 |
+
return {
|
68201 |
+
_set: function _set() {
|
68202 |
+
return dispatch(dataActions_set.apply(void 0, arguments));
|
|
|
|
|
68203 |
}
|
68204 |
};
|
68205 |
+
}, function (_ref2, _ref3, _ref4) {
|
68206 |
+
var buttons = _ref2.buttons,
|
68207 |
+
groups = _ref2.groups;
|
68208 |
+
var _set = _ref3._set;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68209 |
|
68210 |
+
var buttonId = _ref4.buttonId,
|
68211 |
+
props = LabelGroup_objectWithoutProperties(_ref4, ["buttonId"]);
|
68212 |
+
|
68213 |
+
var button = buttons[buttonId];
|
68214 |
+
var group = groups[buttons[buttonId].parent];
|
68215 |
+
return LabelGroup_objectSpread({
|
68216 |
+
set: function set(key, val) {
|
68217 |
+
return _set(models.BUTTON, buttonId, key, val);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68218 |
},
|
68219 |
+
get: function get(key) {
|
68220 |
+
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
68221 |
+
_ref5$getParent = _ref5.getParent,
|
68222 |
+
getParent = _ref5$getParent === void 0 ? false : _ref5$getParent,
|
68223 |
+
_ref5$defToGroup = _ref5.defToGroup,
|
68224 |
+
defToGroup = _ref5$defToGroup === void 0 ? false : _ref5$defToGroup,
|
68225 |
+
options = LabelGroup_objectWithoutProperties(_ref5, ["getParent", "defToGroup"]);
|
68226 |
+
|
68227 |
+
return _get(key, getParent ? group : button, group.menu_style, getParent ? "group" : "button", LabelGroup_objectSpread({
|
68228 |
+
defToGroup: defToGroup && group
|
68229 |
+
}, options));
|
68230 |
+
}
|
68231 |
+
}, props);
|
68232 |
+
})(_LabelGroup));
|
68233 |
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Settings/UseBackgroundImage/index.js
|
68234 |
|
68235 |
|
68236 |
|
68237 |
|
68238 |
|
68239 |
+
|
68240 |
function UseBackgroundImage(_ref) {
|
68241 |
var value = _ref.value,
|
68242 |
+
trashButton = _ref.trashButton,
|
|
|
68243 |
onChange = _ref.onChange,
|
68244 |
_ref$disabled = _ref.disabled,
|
68245 |
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
68246 |
+
value = value === "" || value == null ? null : value; // defaultValue = defaultValue === "" ? null : defaultValue;
|
68247 |
+
|
68248 |
if (disabled) return /*#__PURE__*/react.createElement(DisableSetting, {
|
68249 |
premiumTag: true,
|
68250 |
onClick: function onClick() {
|
68262 |
})));
|
68263 |
|
68264 |
var handleChange = function handleChange(event) {
|
68265 |
+
onChange(event.target.checked);
|
|
|
68266 |
};
|
68267 |
|
68268 |
return /*#__PURE__*/react.createElement(SettingsContainer, {
|
68269 |
title: translate("settings.background_image.title"),
|
68270 |
fullWidth: false
|
68271 |
}, /*#__PURE__*/react.createElement(esm_Switch_Switch, {
|
68272 |
+
checked: value,
|
68273 |
onChange: handleChange,
|
68274 |
inputProps: {
|
68275 |
"data-testid": "setting:image-choice"
|
68276 |
}
|
68277 |
+
}), /*#__PURE__*/react.createElement(TrashButton, {
|
68278 |
+
disabled: trashButton == null || trashButton === "",
|
68279 |
+
onClick: function onClick() {
|
68280 |
+
return onChange("unset");
|
68281 |
+
}
|
68282 |
}));
|
68283 |
}
|
68284 |
;// CONCATENATED MODULE: ./src/js/dashboard/Pages/Button/Tabs/Styling/ButtonGroup.js
|
68319 |
|
68320 |
|
68321 |
|
68322 |
+
|
68323 |
/* webpack-strip-block:removed */
|
68324 |
|
68325 |
function Styling_ButtonGroup_ButtonGroup(_ref) {
|
68326 |
var get = _ref.get,
|
68327 |
set = _ref.set,
|
68328 |
+
groupProps = ButtonGroup_objectWithoutProperties(_ref, ["get", "set"]);
|
|
|
68329 |
|
68330 |
var _useState = (0,react.useState)(0),
|
68331 |
_useState2 = ButtonGroup_slicedToArray(_useState, 2),
|
68332 |
hoverSettings = _useState2[0],
|
68333 |
setHoverSettings = _useState2[1];
|
68334 |
|
68335 |
+
var color = function color() {
|
68336 |
var colors = get("background_color");
|
68337 |
var colors_returnValue = get("background_color", {
|
68338 |
+
returnSelf: true,
|
68339 |
+
returnDefault: true
|
68340 |
});
|
68341 |
var colors_parent = get("background_color", {
|
68342 |
getParent: true,
|
68343 |
+
returnSelf: true,
|
68344 |
+
returnDefault: true
|
68345 |
});
|
68346 |
/* webpack-strip-block:removed */
|
68347 |
|
68348 |
+
return /*#__PURE__*/react.createElement(ColorPicker, {
|
68349 |
title: translate("utils.color"),
|
68350 |
value: getFirstColor(colors[hoverSettings]),
|
68351 |
defaultValue: colors[0] ? getFirstColor(colors_returnValue[hoverSettings]) : getFirstColor(colors_parent[hoverSettings]),
|
68355 |
set("background_color", newValues);
|
68356 |
},
|
68357 |
className: "style-background-color"
|
68358 |
+
});
|
68359 |
+
};
|
68360 |
+
|
68361 |
+
var image = function image() {
|
68362 |
+
/* webpack-strip-block:removed */
|
68363 |
+
return /*#__PURE__*/react.createElement(UseBackgroundImage, {
|
68364 |
disabled: true
|
68365 |
+
});
|
68366 |
};
|
68367 |
|
68368 |
var borderRadius = function borderRadius() {
|
68373 |
}, /*#__PURE__*/react.createElement(BorderRadius, {
|
68374 |
value: get("border_radius")[0],
|
68375 |
defaultValue: get("border_radius", {
|
68376 |
+
returnSelf: true,
|
68377 |
+
returnDefault: true
|
68378 |
})[0],
|
68379 |
disabled: hoverSettings === 1,
|
68380 |
onChange: function onChange(val) {
|
68386 |
}));
|
68387 |
};
|
68388 |
|
68389 |
+
var boxShadow = function boxShadow() {
|
68390 |
+
return /*#__PURE__*/react.createElement(BoxShadow, {
|
68391 |
+
value: get("box_shadow")[hoverSettings] // if box_shadow_enabled is enabled by group/button || if parent is disabled AND button is undefined AND has shadow.
|
68392 |
+
,
|
68393 |
+
enabled: get("box_shadow_enabled", {
|
68394 |
+
returnSelf: true,
|
68395 |
+
returnDefault: true,
|
68396 |
+
defToGroup: true,
|
68397 |
+
returnParent: true
|
68398 |
+
})[hoverSettings],
|
68399 |
+
defaultValue: get("box_shadow", {
|
68400 |
+
excludeSelf: true,
|
68401 |
+
returnDefault: true,
|
68402 |
+
defToGroup: true
|
68403 |
+
})[hoverSettings],
|
68404 |
+
trashButton: get("box_shadow_enabled")[hoverSettings],
|
68405 |
+
updateValue: "".concat(get("id")).concat(hoverSettings),
|
68406 |
+
onChange: function onChange(val, type) {
|
68407 |
+
if (type === "enable") {
|
68408 |
+
var _newValues = get("box_shadow_enabled");
|
68409 |
+
|
68410 |
+
_newValues[hoverSettings] = val;
|
68411 |
+
set("box_shadow_enabled", _newValues);
|
68412 |
+
return;
|
68413 |
+
}
|
68414 |
+
|
68415 |
+
var newValues = get("box_shadow");
|
68416 |
+
newValues[hoverSettings] = val;
|
68417 |
+
set("box_shadow", newValues);
|
68418 |
+
}
|
68419 |
+
});
|
68420 |
+
};
|
68421 |
+
|
68422 |
return /*#__PURE__*/react.createElement(CollapsibleGroup, ButtonGroup_extends({
|
68423 |
title: translate("common.button")
|
68424 |
}, groupProps, {
|
68442 |
"data-testid": "normal_hover:hover"
|
68443 |
})), /*#__PURE__*/react.createElement("div", {
|
68444 |
className: "setting-group-title"
|
68445 |
+
}, translate("settings.setting_categories.background")), /*#__PURE__*/react.createElement("hr", null), color(), image(), /*#__PURE__*/react.createElement("div", {
|
68446 |
className: "setting-group-title"
|
68447 |
+
}, translate("settings.setting_categories.button_style")), /*#__PURE__*/react.createElement("hr", null), borderRadius(), boxShadow());
|
68448 |
}
|
68449 |
|
68450 |
/* harmony default export */ var Styling_ButtonGroup = (connect(function (state) {
|
68476 |
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
68477 |
_ref5$getParent = _ref5.getParent,
|
68478 |
getParent = _ref5$getParent === void 0 ? false : _ref5$getParent,
|
|
|
|
|
68479 |
_ref5$defToGroup = _ref5.defToGroup,
|
68480 |
defToGroup = _ref5$defToGroup === void 0 ? false : _ref5$defToGroup,
|
68481 |
+
options = ButtonGroup_objectWithoutProperties(_ref5, ["getParent", "defToGroup"]);
|
68482 |
|
68483 |
+
return _get(key, getParent ? group : button, group.menu_style, getParent ? "group" : "button", ButtonGroup_objectSpread({
|
68484 |
+
defToGroup: defToGroup && group
|
68485 |
+
}, options));
|
68486 |
+
}
|
68487 |
}, props);
|
68488 |
})(Styling_ButtonGroup_ButtonGroup));
|
68489 |
;// CONCATENATED MODULE: ./src/js/dashboard/Pages/Button/Tabs/Styling/index.js
|
69281 |
function OpeningAnimation(_ref) {
|
69282 |
var _ref$value = _ref.value,
|
69283 |
value = _ref$value === void 0 ? "" : _ref$value,
|
69284 |
+
_ref$label_inside = _ref.label_inside,
|
69285 |
+
label_inside = _ref$label_inside === void 0 ? false : _ref$label_inside,
|
69286 |
_onChange = _ref.onChange,
|
69287 |
visible = _ref.visible;
|
69288 |
var inputLabel = (0,react.useRef)(null);
|
69535 |
title: translate("settings.menu.title"),
|
69536 |
fullWidth: false
|
69537 |
}, /*#__PURE__*/react.createElement(esm_Switch_Switch, {
|
69538 |
+
checked: get("is_menu"),
|
69539 |
onChange: function onChange(event) {
|
69540 |
if (event.target.checked) set("is_menu", true);else set("is_menu", false);
|
69541 |
},
|
69545 |
})), /*#__PURE__*/react.createElement("div", {
|
69546 |
className: "setting-group-title"
|
69547 |
}, translate("settings.menu_style.title_short")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(MenuStyle, {
|
69548 |
+
value: get("menu_style"),
|
69549 |
onChange: function onChange(val) {
|
69550 |
set("menu_style", val);
|
69551 |
}
|
69552 |
}), /*#__PURE__*/react.createElement(OpeningAnimation, {
|
69553 |
+
value: get("menu_opening_animation"),
|
69554 |
+
label_inside: get("label_inside"),
|
69555 |
onChange: function onChange(val) {
|
69556 |
set("menu_opening_animation", val);
|
69557 |
},
|
69558 |
+
visible: get("is_menu") == true
|
69559 |
+
}), get("is_menu") === true && /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
69560 |
className: "setting-group-title"
|
69561 |
}, translate("settings.menu.title_settings")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(StartOpened, {
|
69562 |
+
value: get("start_opened") == true,
|
69563 |
onChange: function onChange(val) {
|
69564 |
return set("start_opened", val);
|
69565 |
}
|
69566 |
}), /*#__PURE__*/react.createElement(CloseOnClickInside, {
|
69567 |
+
value: get("close_on_click_inside") == true,
|
69568 |
+
openOnMouseOverEnabled: get("open_on_mouseover") == true,
|
69569 |
onChange: function onChange(val) {
|
69570 |
return set("close_on_click_inside", val);
|
69571 |
}
|
69572 |
}), /*#__PURE__*/react.createElement(CloseOnClickOutside, {
|
69573 |
+
value: get("close_on_click_outside") == true,
|
69574 |
+
openOnMouseOverEnabled: get("open_on_mouseover") == true,
|
69575 |
+
closeOnMouseLeaveEnabled: get("close_on_mouseleave") == true,
|
69576 |
onChange: function onChange(val) {
|
69577 |
return set("close_on_click_outside", val);
|
69578 |
}
|
69579 |
}), /*#__PURE__*/react.createElement(OpenOnMouseOver, {
|
69580 |
+
openOnHover: get("open_on_mouseover") == true,
|
69581 |
+
closeOnMouseLeave: get("close_on_mouseleave") == true,
|
69582 |
onChange: function onChange(key, val) {
|
69583 |
return set(key, val);
|
69584 |
}
|
69609 |
}, props), {}, {
|
69610 |
group: groups[groupId],
|
69611 |
get: function get(key) {
|
69612 |
+
var returnDefault = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
69613 |
+
return dlv_umd_default()(groups[groupId], key, returnDefault ? _def("group", key, groups[groupId].menu_style) : "");
|
69614 |
}
|
69615 |
});
|
69616 |
})(Options_Options));
|
69708 |
|
69709 |
|
69710 |
|
69711 |
+
|
69712 |
function ImageSelector(_ref) {
|
69713 |
ImageSelector_objectDestructuringEmpty(_ref);
|
69714 |
|
69773 |
hoverSettings = _useState2[0],
|
69774 |
setHoverSettings = _useState2[1];
|
69775 |
|
69776 |
+
var iconType = function iconType() {
|
69777 |
+
return /*#__PURE__*/react.createElement(IconType, {
|
69778 |
+
value: get("icon_type", {
|
69779 |
+
returnDefault: true
|
69780 |
+
}),
|
69781 |
+
trashButton: get("icon_type") === "",
|
69782 |
+
onChange: function onChange(val) {
|
69783 |
+
set("icon_type", val);
|
69784 |
}
|
69785 |
+
});
|
|
|
|
|
|
|
|
|
69786 |
};
|
69787 |
|
69788 |
var settings = function settings() {
|
69796 |
app.showPremiumDialog("More hover settings!");
|
69797 |
}
|
69798 |
}, /*#__PURE__*/react.createElement(IconSelector_IconSelector, {
|
69799 |
+
value: get("icon", {
|
69800 |
+
returnDefault: true,
|
69801 |
+
returnSelf: true
|
69802 |
+
})[0],
|
69803 |
hoverDisabled: hoverSettings === 1,
|
69804 |
onChange: function onChange(val) {
|
69805 |
set("icon", val);
|
69844 |
return /*#__PURE__*/react.createElement(CollapsibleGroup, Styling_IconGroup_extends({
|
69845 |
title: translate("utils.icon"),
|
69846 |
"data-testid": "group:icon"
|
69847 |
+
}, groupProps), iconType(), get("icon_type", {
|
69848 |
+
returnDefault: true
|
69849 |
+
}) === "off" ? null : /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(Tabs_Tabs, {
|
69850 |
onChange: function onChange(_, val) {
|
69851 |
return setHoverSettings(val);
|
69852 |
},
|
69888 |
defs: function defs(key) {
|
69889 |
return _defs("group", key, group.menu_style, formats.normal_hover.parse(group[key]).map(function (val) {
|
69890 |
return val === "" ? undefined : val;
|
69891 |
+
}), null, {
|
69892 |
+
returnDefault: true,
|
69893 |
+
returnSelf: true
|
69894 |
+
});
|
69895 |
},
|
69896 |
set: function set(key, val) {
|
69897 |
return _set(models.GROUP, groupId, key, val);
|
69898 |
},
|
69899 |
get: function get(key) {
|
69900 |
+
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
69901 |
+
options = Styling_IconGroup_extends({}, _ref5);
|
69902 |
+
|
69903 |
+
return _get(key, group, group.menu_style, "group", Styling_IconGroup_objectSpread({}, options));
|
69904 |
}
|
69905 |
}, ownProps);
|
69906 |
})(_IconGroup));
|
69944 |
|
69945 |
|
69946 |
|
69947 |
+
|
69948 |
+
|
69949 |
function Tabs_Styling_ButtonGroup_ButtonGroup(_ref) {
|
69950 |
+
var singleButton = _ref.singleButton,
|
69951 |
+
get = _ref.get,
|
69952 |
+
def = _ref.def,
|
69953 |
set = _ref.set,
|
69954 |
+
groupProps = Styling_ButtonGroup_objectWithoutProperties(_ref, ["singleButton", "get", "def", "set"]);
|
69955 |
|
69956 |
var _useState = (0,react.useState)(0),
|
69957 |
_useState2 = Styling_ButtonGroup_slicedToArray(_useState, 2),
|
69958 |
hoverSettings = _useState2[0],
|
69959 |
setHoverSettings = _useState2[1];
|
69960 |
|
69961 |
+
var color = function color() {
|
69962 |
/* webpack-strip-block:removed */
|
69963 |
+
return /*#__PURE__*/react.createElement(ColorPicker, {
|
69964 |
title: translate("utils.color"),
|
69965 |
+
value: get("background_color")[hoverSettings],
|
69966 |
+
defaultValue: get("background_color", {
|
69967 |
+
returnDefault: true,
|
69968 |
+
returnSelf: true
|
69969 |
+
})[hoverSettings],
|
69970 |
onChange: function onChange(val) {
|
69971 |
var newValues = get("background_color");
|
69972 |
newValues[hoverSettings] = val;
|
69973 |
set("background_color", newValues);
|
69974 |
}
|
69975 |
+
});
|
69976 |
+
};
|
69977 |
+
|
69978 |
+
var image = function image() {
|
69979 |
+
/* webpack-strip-block:removed */
|
69980 |
+
return /*#__PURE__*/react.createElement(UseBackgroundImage, {
|
69981 |
disabled: true
|
69982 |
+
});
|
69983 |
};
|
69984 |
|
69985 |
var borderRadius = function borderRadius() {
|
69988 |
condition: hoverSettings === 1,
|
69989 |
premiumTag: true
|
69990 |
}, /*#__PURE__*/react.createElement(BorderRadius, {
|
69991 |
+
defaultValue: get("border_radius", {
|
69992 |
+
returnSelf: true,
|
69993 |
+
returnDefault: true
|
69994 |
+
})[0],
|
69995 |
disabled: hoverSettings === 1,
|
69996 |
value: get("border_radius")[0],
|
69997 |
onChange: function onChange(val) {
|
70002 |
}));
|
70003 |
};
|
70004 |
|
70005 |
+
var boxShadow = function boxShadow() {
|
70006 |
+
return /*#__PURE__*/react.createElement(BoxShadow, {
|
70007 |
+
value: get("box_shadow")[hoverSettings] // if box_shadow_enabled is enabled by group/button || if parent is disabled AND button is undefined AND has shadow.
|
70008 |
+
,
|
70009 |
+
enabled: get("box_shadow_enabled", {
|
70010 |
+
returnSelf: true,
|
70011 |
+
returnDefault: true
|
70012 |
+
})[hoverSettings],
|
70013 |
+
defaultValue: get("box_shadow", {
|
70014 |
+
excludeSelf: true,
|
70015 |
+
returnDefault: true
|
70016 |
+
})[hoverSettings],
|
70017 |
+
trashButton: get("box_shadow_enabled")[hoverSettings],
|
70018 |
+
updateValue: "".concat(get("id")).concat(hoverSettings),
|
70019 |
+
onChange: function onChange(val, type) {
|
70020 |
+
if (type === "enable") {
|
70021 |
+
var _newValues = get("box_shadow_enabled");
|
70022 |
+
|
70023 |
+
_newValues[hoverSettings] = val;
|
70024 |
+
set("box_shadow_enabled", _newValues);
|
70025 |
+
return;
|
70026 |
+
}
|
70027 |
+
|
70028 |
+
var newValues = get("box_shadow");
|
70029 |
+
newValues[hoverSettings] = val;
|
70030 |
+
set("box_shadow", newValues);
|
70031 |
+
}
|
70032 |
+
});
|
70033 |
+
};
|
70034 |
+
|
70035 |
+
var buttonSizes = function buttonSizes() {
|
70036 |
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(SliderContainer, {
|
70037 |
+
title: translate("settings.button_size.menu_button"),
|
70038 |
+
value: get("group_size"),
|
70039 |
+
defaultValue: def("group_size"),
|
70040 |
+
"data-testid": "settingcontainer:top-level-size",
|
70041 |
+
inputText: "px",
|
70042 |
+
onChange: function onChange(val) {
|
70043 |
+
set("group_size", val);
|
70044 |
+
}
|
70045 |
+
}), !singleButton && /*#__PURE__*/react.createElement(SliderContainer, {
|
70046 |
+
title: translate("settings.button_size.sub_button"),
|
70047 |
+
value: get("button_size"),
|
70048 |
+
defaultValue: def("button_size"),
|
70049 |
+
"data-testid": "settingcontainer:bottom-level-size",
|
70050 |
+
inputText: "px",
|
70051 |
+
onChange: function onChange(val) {
|
70052 |
+
set("button_size", val);
|
70053 |
+
}
|
70054 |
+
}));
|
70055 |
+
};
|
70056 |
+
|
70057 |
+
var buttonSpacing = function buttonSpacing() {
|
70058 |
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(SliderContainer, {
|
70059 |
+
title: "Button spacing",
|
70060 |
+
value: get("space"),
|
70061 |
+
defaultValue: get("space", {
|
70062 |
+
excludeSelf: true,
|
70063 |
+
returnDefault: true
|
70064 |
+
}),
|
70065 |
+
"data-testid": "settingcontainer:button-spacing",
|
70066 |
+
inputText: "px",
|
70067 |
+
onChange: function onChange(val) {
|
70068 |
+
set("space", val);
|
70069 |
+
}
|
70070 |
+
}));
|
70071 |
+
};
|
70072 |
+
|
70073 |
return /*#__PURE__*/react.createElement(CollapsibleGroup, Styling_ButtonGroup_extends({
|
70074 |
title: translate("common.button")
|
70075 |
}, groupProps, {
|
70076 |
"data-testid": "group:button"
|
70077 |
+
}), /*#__PURE__*/react.createElement("div", {
|
70078 |
+
className: "setting-group-title"
|
70079 |
+
}, translate("settings.button_size.title")), /*#__PURE__*/react.createElement("hr", null), buttonSizes(), /*#__PURE__*/react.createElement(Tabs_Tabs, {
|
70080 |
onChange: function onChange(_, val) {
|
70081 |
return setHoverSettings(val);
|
70082 |
},
|
70094 |
"data-testid": "normal_hover:hover"
|
70095 |
})), /*#__PURE__*/react.createElement("div", {
|
70096 |
className: "setting-group-title"
|
70097 |
+
}, translate("utils.background")), /*#__PURE__*/react.createElement("hr", null), color(), image(), /*#__PURE__*/react.createElement("div", {
|
70098 |
className: "setting-group-title"
|
70099 |
+
}, translate("settings.setting_categories.button_style")), /*#__PURE__*/react.createElement("hr", null), borderRadius(), hoverSettings === 0 && buttonSpacing(), boxShadow());
|
70100 |
}
|
70101 |
|
70102 |
/* harmony default export */ var Tabs_Styling_ButtonGroup = (connect(function (state) {
|
70118 |
|
70119 |
var group = groups[groupId];
|
70120 |
return Styling_ButtonGroup_objectSpread({
|
70121 |
+
singleButton: group.children.length === 1,
|
70122 |
set: function set(key, val) {
|
70123 |
return _set(models.GROUP, groupId, key, val);
|
70124 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
70125 |
get: function get(key) {
|
70126 |
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
70127 |
+
options = Styling_ButtonGroup_extends({}, _ref5);
|
|
|
70128 |
|
70129 |
+
return _get(key, group, group.menu_style, "group", Styling_ButtonGroup_objectSpread({}, options));
|
70130 |
+
},
|
70131 |
+
def: function def(key) {
|
70132 |
+
return _def("group", key, group.menu_style);
|
70133 |
}
|
70134 |
}, ownProps);
|
70135 |
})(Tabs_Styling_ButtonGroup_ButtonGroup));
|
70174 |
|
70175 |
|
70176 |
|
70177 |
+
|
70178 |
+
|
70179 |
+
|
70180 |
|
70181 |
|
70182 |
function LabelGroup_LabelGroup(_ref) {
|
70183 |
var defs = _ref.defs,
|
70184 |
set = _ref.set,
|
70185 |
get = _ref.get,
|
70186 |
+
groupProps = Styling_LabelGroup_objectWithoutProperties(_ref, ["defs", "set", "get"]);
|
|
|
70187 |
|
70188 |
var _useState = (0,react.useState)(0),
|
70189 |
_useState2 = Styling_LabelGroup_slicedToArray(_useState, 2),
|
70197 |
}, /*#__PURE__*/react.createElement(FontFamily, null));
|
70198 |
};
|
70199 |
|
70200 |
+
var labelSpacing = function labelSpacing() {
|
70201 |
+
var label_spacing = get("label_spacing");
|
70202 |
+
return /*#__PURE__*/react.createElement(SliderContainer, {
|
70203 |
+
title: "Label Spacing",
|
70204 |
+
value: label_spacing,
|
70205 |
+
inputText: "px",
|
70206 |
+
onChange: function onChange(val) {
|
70207 |
+
var newValues = label_spacing;
|
70208 |
+
newValues = val;
|
70209 |
+
set("label_spacing", newValues);
|
70210 |
+
},
|
70211 |
+
defaultValue: get("label_spacing", {
|
70212 |
+
excludeSelf: true,
|
70213 |
+
returnDefault: true
|
70214 |
+
})
|
70215 |
+
});
|
70216 |
+
};
|
70217 |
+
|
70218 |
+
var labelWidth = function labelWidth() {
|
70219 |
+
return /*#__PURE__*/react.createElement(SettingsContainer, {
|
70220 |
+
title: translate("settings.label_same_width.title"),
|
70221 |
+
fullWidth: false
|
70222 |
+
}, /*#__PURE__*/react.createElement(esm_Switch_Switch, {
|
70223 |
+
onChange: function onChange(obj) {
|
70224 |
+
set("label_same_width", obj.target.checked);
|
70225 |
+
},
|
70226 |
+
checked: get("label_same_width", {
|
70227 |
+
returnDefault: true
|
70228 |
+
}),
|
70229 |
+
inputProps: {
|
70230 |
+
"data-testid": "setting:label_same_width"
|
70231 |
+
}
|
70232 |
+
}), /*#__PURE__*/react.createElement(TrashButton, {
|
70233 |
+
onClick: function onClick() {
|
70234 |
+
set("label_same_width", "unset");
|
70235 |
+
},
|
70236 |
+
disabled: get("label_same_width") === ""
|
70237 |
+
}));
|
70238 |
+
};
|
70239 |
+
|
70240 |
var margin = function margin() {
|
70241 |
/* webpack-strip-block:removed */
|
70242 |
return /*#__PURE__*/react.createElement(DisableSetting, {
|
70278 |
}
|
70279 |
}, /*#__PURE__*/react.createElement(SliderContainer, {
|
70280 |
title: translate("settings.font_size"),
|
70281 |
+
"data-testid": "styling:font_size",
|
70282 |
value: label_font_size[0],
|
70283 |
inputText: "px",
|
70284 |
onChange: function onChange(val) {
|
70310 |
}));
|
70311 |
};
|
70312 |
|
70313 |
+
var boxShadow = function boxShadow() {
|
70314 |
+
return /*#__PURE__*/react.createElement(BoxShadow, {
|
70315 |
+
value: get("label_box_shadow")[hoverSettings] // if label_box_shadow_enabled is enabled by group/button || if parent is disabled AND button is undefined AND has shadow.
|
70316 |
+
,
|
70317 |
+
enabled: get("label_box_shadow_enabled", {
|
70318 |
+
returnSelf: true,
|
70319 |
+
returnDefault: true
|
70320 |
+
})[hoverSettings],
|
70321 |
+
defaultValue: get("label_box_shadow", {
|
70322 |
+
excludeSelf: true,
|
70323 |
+
returnDefault: true,
|
70324 |
+
returnSelf: true
|
70325 |
+
})[hoverSettings],
|
70326 |
+
trashButton: get("label_box_shadow_enabled")[hoverSettings],
|
70327 |
+
updateValue: "".concat(get("id")).concat(hoverSettings),
|
70328 |
+
onChange: function onChange(val, type) {
|
70329 |
+
if (type === "enable") {
|
70330 |
+
var _newValues = get("label_box_shadow_enabled");
|
70331 |
+
|
70332 |
+
_newValues[hoverSettings] = val;
|
70333 |
+
set("label_box_shadow_enabled", _newValues);
|
70334 |
+
return;
|
70335 |
+
}
|
70336 |
+
|
70337 |
+
var newValues = get("label_box_shadow");
|
70338 |
+
newValues[hoverSettings] = val;
|
70339 |
+
set("label_box_shadow", newValues);
|
70340 |
+
}
|
70341 |
+
});
|
70342 |
+
};
|
70343 |
+
|
70344 |
+
var setLabelInside = function setLabelInside() {
|
70345 |
+
return /*#__PURE__*/react.createElement(SettingsContainer, {
|
70346 |
+
title: translate("settings.label_inside.title"),
|
70347 |
+
fullWidth: false
|
70348 |
+
}, /*#__PURE__*/react.createElement(esm_Switch_Switch, {
|
70349 |
+
checked: get("label_inside", {
|
70350 |
+
returnDefault: true
|
70351 |
+
}),
|
70352 |
+
onChange: function onChange(event) {
|
70353 |
+
set("label_inside", event.target.checked);
|
70354 |
+
},
|
70355 |
+
inputProps: {
|
70356 |
+
"data-testid": "setting:label_inside"
|
70357 |
+
}
|
70358 |
+
}), /*#__PURE__*/react.createElement(TrashButton, {
|
70359 |
+
onClick: function onClick() {
|
70360 |
+
set("label_inside", "unset");
|
70361 |
+
},
|
70362 |
+
disabled: get("label_inside") === ""
|
70363 |
+
}));
|
70364 |
+
};
|
70365 |
+
|
70366 |
+
var setSameHeightLabels = function setSameHeightLabels() {
|
70367 |
+
return /*#__PURE__*/react.createElement(SettingsContainer, {
|
70368 |
+
title: translate("settings.label_same_height.title"),
|
70369 |
+
fullWidth: false
|
70370 |
+
}, /*#__PURE__*/react.createElement(esm_Switch_Switch, {
|
70371 |
+
checked: get("label_same_height", {
|
70372 |
+
returnDefault: true
|
70373 |
+
}),
|
70374 |
+
onChange: function onChange(event) {
|
70375 |
+
set("label_same_height", event.target.checked);
|
70376 |
+
},
|
70377 |
+
inputProps: {
|
70378 |
+
"data-testid": "setting:label_same_height"
|
70379 |
+
}
|
70380 |
+
}), /*#__PURE__*/react.createElement(TrashButton, {
|
70381 |
+
onClick: function onClick() {
|
70382 |
+
set("label_same_height", "unset");
|
70383 |
+
},
|
70384 |
+
disabled: get("label_same_height") === ""
|
70385 |
+
}));
|
70386 |
+
};
|
70387 |
+
|
70388 |
var label_color = get("label_color");
|
70389 |
var label_background_color = get("label_background_color");
|
70390 |
var label_border_radius = get("label_border_radius");
|
70391 |
return /*#__PURE__*/react.createElement(CollapsibleGroup, Styling_LabelGroup_extends({
|
70392 |
title: translate("settings.label.title"),
|
70393 |
"data-testid": "group:label"
|
70394 |
+
}, groupProps), /*#__PURE__*/react.createElement("div", {
|
70395 |
+
className: "setting-group-title"
|
70396 |
+
}, "Style"), /*#__PURE__*/react.createElement("hr", null), setLabelInside(), labelWidth(), get("label_inside", {
|
70397 |
+
returnDefault: true
|
70398 |
+
}) ? null : /*#__PURE__*/react.createElement(react.Fragment, null, setSameHeightLabels(), labelSpacing(), /*#__PURE__*/react.createElement("div", {
|
70399 |
className: "setting-group-title"
|
70400 |
}, translate("settings.label_desktop.title")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(LabelVisibility, {
|
70401 |
title: translate("settings.show_mobile_desktop.desktop"),
|
70402 |
device: "desktop",
|
70403 |
+
value: get("show_label_desktop", {
|
70404 |
+
returnDefault: true
|
70405 |
+
}),
|
70406 |
onChange: function onChange(val) {
|
70407 |
return set("show_label_desktop", val);
|
70408 |
}
|
70409 |
}), /*#__PURE__*/react.createElement(LabelVisibility, {
|
70410 |
title: translate("settings.show_mobile_desktop.mobile"),
|
70411 |
device: "mobile",
|
70412 |
+
value: get("show_label_mobile", {
|
70413 |
+
returnDefault: true
|
70414 |
+
}),
|
70415 |
onChange: function onChange(val) {
|
70416 |
return set("show_label_mobile", val);
|
70417 |
}
|
70418 |
+
})), /*#__PURE__*/react.createElement("div", {
|
70419 |
className: "setting-group-title"
|
70420 |
}, translate("settings.label_position.title")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(LabelPosition, {
|
70421 |
title: translate("settings.label_position.description"),
|
70422 |
+
value: get("horizontal_position_label", {
|
70423 |
+
returnDefault: true
|
70424 |
+
}),
|
70425 |
+
trashButton: get("horizontal_position_label") === "",
|
70426 |
+
defaultValue: get("horizontal_position_label", {
|
70427 |
+
returnDefault: true,
|
70428 |
+
excludeSelf: true
|
70429 |
+
}),
|
70430 |
onChange: function onChange(val) {
|
70431 |
set("horizontal_position_label", val);
|
70432 |
+
}
|
70433 |
+
}), /*#__PURE__*/react.createElement(Tabs_Tabs, {
|
|
|
70434 |
onChange: function onChange(_, val) {
|
70435 |
return setHoverSettings(val);
|
70436 |
},
|
70437 |
style: {
|
70438 |
marginBottom: "20px",
|
70439 |
+
marginTop: get("label_inside", {
|
70440 |
+
returnDefault: true
|
70441 |
+
}) ? "0" : "20px"
|
70442 |
},
|
70443 |
value: hoverSettings,
|
70444 |
variant: "fullWidth",
|
70461 |
newValues[hoverSettings] = val;
|
70462 |
set("label_color", newValues);
|
70463 |
}
|
70464 |
+
}), fontSize(), fontFamily(), get("label_inside", {
|
70465 |
+
returnDefault: true
|
70466 |
+
}) ? null : /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
70467 |
className: "setting-group-title"
|
70468 |
}, translate("utils.background")), /*#__PURE__*/react.createElement("hr", null), /*#__PURE__*/react.createElement(ColorPicker, {
|
70469 |
title: translate("utils.color"),
|
70474 |
newValues[hoverSettings] = val;
|
70475 |
set("label_background_color", newValues);
|
70476 |
}
|
70477 |
+
}), borderRadius(), margin(), padding(), boxShadow()));
|
70478 |
}
|
70479 |
|
70480 |
/* harmony default export */ var Styling_LabelGroup = (connect(function (state) {
|
70499 |
defs: function defs(key) {
|
70500 |
return _defs("group", key, group.menu_style, formats.normal_hover.parse(group[key]).map(function (val) {
|
70501 |
return val === "" ? undefined : val;
|
70502 |
+
}), null, {
|
70503 |
+
returnDefault: true,
|
70504 |
+
returnSelf: true
|
70505 |
+
});
|
70506 |
},
|
70507 |
set: function set(key, val) {
|
70508 |
return _set(models.GROUP, groupId, key, val);
|
70509 |
},
|
70510 |
get: function get(key) {
|
70511 |
+
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
70512 |
+
options = Styling_LabelGroup_extends({}, _ref5);
|
70513 |
+
|
70514 |
+
return _get(key, group, group.menu_style, "group", Styling_LabelGroup_objectSpread({}, options));
|
|
|
|
|
70515 |
}
|
70516 |
}, ownProps);
|
70517 |
})(LabelGroup_LabelGroup));
|
71196 |
}
|
71197 |
};
|
71198 |
};
|
71199 |
+
var Radio_defaultCheckedIcon = /*#__PURE__*/react.createElement(Radio_RadioButtonIcon, {
|
71200 |
checked: true
|
71201 |
});
|
71202 |
+
var Radio_defaultIcon = /*#__PURE__*/react.createElement(Radio_RadioButtonIcon, null);
|
71203 |
var Radio = /*#__PURE__*/react.forwardRef(function Radio(props, ref) {
|
71204 |
var checkedProp = props.checked,
|
71205 |
classes = props.classes,
|
71229 |
return /*#__PURE__*/react.createElement(internal_SwitchBase, (0,esm_extends/* default */.Z)({
|
71230 |
color: color,
|
71231 |
type: "radio",
|
71232 |
+
icon: /*#__PURE__*/react.cloneElement(Radio_defaultIcon, {
|
71233 |
fontSize: size === 'small' ? 'small' : 'default'
|
71234 |
}),
|
71235 |
+
checkedIcon: /*#__PURE__*/react.cloneElement(Radio_defaultCheckedIcon, {
|
71236 |
fontSize: size === 'small' ? 'small' : 'default'
|
71237 |
}),
|
71238 |
classes: {
|
71536 |
return setOpenedGroup(val ? "animation" : "");
|
71537 |
},
|
71538 |
"data-testid": "group:animation"
|
71539 |
+
}, /*#__PURE__*/react.createElement(Animation, {
|
71540 |
value: function () {
|
71541 |
/* webpack-strip-block:removed */
|
71542 |
return {
|
71624 |
return _set2(models.GROUP, groupId, obj, val);
|
71625 |
},
|
71626 |
get: function get(key) {
|
71627 |
+
return dlv_umd_default()(groups[groupId], key, _def("group", key, groups[groupId].menu_style));
|
71628 |
},
|
71629 |
singleButton: groups[groupId].children.length < 2
|
71630 |
}, dispatchProps), stateProps), props);
|
72388 |
|
72389 |
var isMenu = false;
|
72390 |
return /*#__PURE__*/react.createElement("div", {
|
72391 |
+
className: (0,clsx_m/* default */.Z)("buttonizer-bar", !loading && "ready")
|
72392 |
}, /*#__PURE__*/react.createElement("div", {
|
72393 |
className: "router-window"
|
72394 |
}, /*#__PURE__*/react.createElement(SavingDialog_SavingDialog, null), /*#__PURE__*/react.createElement(simplebar_react_esm, {
|
72505 |
});
|
72506 |
|
72507 |
try {
|
72508 |
+
apiRequest(buttonizer_admin.is_stand_alone ? "" : "/dashboard?nonce=".concat(buttonizer_admin.nonce), {
|
72509 |
method: "GET"
|
72510 |
}).then(function (_ref2) {
|
72511 |
var data = _ref2.data,
|
73113 |
|
73114 |
function MenuDrawer_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
73115 |
|
|
|
73116 |
|
73117 |
|
73118 |
|
73277 |
return setOpenedGroup(val ? "menu_support" : "");
|
73278 |
},
|
73279 |
bodySpacing: false,
|
73280 |
+
"data-testid": "menudrawer:support",
|
73281 |
+
className: "menu-support"
|
73282 |
}, /*#__PURE__*/react.createElement(MenuItem_MenuItem_MenuItem, {
|
73283 |
title: translate("bar.menu.knowledgebase.title"),
|
73284 |
description: translate("bar.menu.knowledgebase.description"),
|
73309 |
}, /*#__PURE__*/react.createElement(MenuItem_MenuItem_MenuItem, {
|
73310 |
title: translate("bar.menu.account.title"),
|
73311 |
description: translate("bar.menu.account.description"),
|
73312 |
+
href: buttonizer_admin.is_stand_alone ? "https://app.buttonizer.pro/account" : "".concat(buttonizer_admin.admin, "?page=Buttonizer-account"),
|
73313 |
newWindow: true,
|
73314 |
dataTestid: "menuitem:account"
|
73315 |
}), /*#__PURE__*/react.createElement(MenuItem_MenuItem_MenuItem, {
|
73316 |
title: translate("bar.menu.upgrade.title"),
|
73317 |
description: translate("bar.menu.upgrade.description"),
|
73318 |
+
href: buttonizer_admin.is_stand_alone ? "https://app.buttonizer.pro/upgrade" : "".concat(buttonizer_admin.admin, "?page=Buttonizer-pricing"),
|
73319 |
newWindow: true,
|
73320 |
dataTestid: "menuitem:upgrade"
|
73321 |
}), /*#__PURE__*/react.createElement(MenuItem_MenuItem_MenuItem, {
|
73322 |
title: translate("bar.menu.affiliation.title"),
|
73323 |
description: translate("bar.menu.affiliation.description"),
|
73324 |
+
href: buttonizer_admin.is_stand_alone ? "https://app.buttonizer.pro/affiliate" : "".concat(buttonizer_admin.admin, "?page=Buttonizer-affiliation"),
|
73325 |
newWindow: true,
|
73326 |
dataTestid: "menuitem:affiliation"
|
73327 |
}), /*#__PURE__*/react.createElement(MenuItem_MenuItem_MenuItem, {
|
73328 |
title: "Buttonizer",
|
73329 |
description: translate("bar.menu.version"),
|
73330 |
+
href: buttonizer_admin.is_stand_alone ? "https://community.buttonizer.pro/d/895" : "https://buttonizer.pro",
|
73331 |
newWindow: true,
|
73332 |
dataTestid: "menuitem:version"
|
73333 |
})), /*#__PURE__*/react.createElement("div", {
|
73334 |
className: "menu-drawer-bottom"
|
73335 |
+
}, !buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(Button_Button, {
|
73336 |
variant: "contained",
|
73337 |
color: "secondary",
|
73338 |
style: {
|
73342 |
className: "fab fa-wordpress-simple"
|
73343 |
}),
|
73344 |
"data-testid": "menudrawer:admin",
|
73345 |
+
href: buttonizer_admin.admin_base
|
73346 |
+
}, translate("bar.menu.wp_admin")), buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(Button_Button, {
|
73347 |
+
variant: "contained",
|
73348 |
+
color: "secondary",
|
73349 |
+
style: {
|
73350 |
+
width: "100%"
|
73351 |
+
},
|
73352 |
+
startIcon: /*#__PURE__*/react.createElement("i", {
|
73353 |
+
className: "fas fa-running"
|
73354 |
+
}),
|
73355 |
+
"data-testid": "menudrawer:admin",
|
73356 |
+
href: "https://app.buttonizer.pro"
|
73357 |
+
}, "Back to the dashboard"), /*#__PURE__*/react.createElement("div", {
|
73358 |
className: "social-media-buttons"
|
73359 |
}, /*#__PURE__*/react.createElement("b", null, translate("bar.menu.follow")), /*#__PURE__*/react.createElement("div", {
|
73360 |
className: "buttons-container"
|
73518 |
className: "fas fa-times"
|
73519 |
})), /*#__PURE__*/react.createElement(FormDialog, {
|
73520 |
open: dialogOpen,
|
73521 |
+
title: translate("utils.rename"),
|
73522 |
+
text: translate("utils.rename_to"),
|
73523 |
defaultValue: "",
|
73524 |
"data-testid": "drawersplitter:dialog",
|
73525 |
clearOnConfirm: true,
|
73630 |
|
73631 |
_onChange("google_analytics_enabled", value.target.checked);
|
73632 |
}
|
73633 |
+
})))), !buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement("div", null, /*#__PURE__*/react.createElement(Typography_Typography, {
|
73634 |
variant: "body1"
|
73635 |
}, "Google Analytics tracking code"), /*#__PURE__*/react.createElement(Typography_Typography, {
|
73636 |
variant: "body2",
|
74043 |
}, [adminBar, toolTips, tips, subDomains, noAjax, canSendErrors]);
|
74044 |
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
74045 |
className: "description"
|
74046 |
+
}, translate("settings_window.other_settings.description")), /*#__PURE__*/react.createElement(List_List, null, !buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
74047 |
disableGutters: true,
|
74048 |
className: "with-secondary-action"
|
74049 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
74118 |
|
74119 |
_onChange("tips_enabled", value.target.checked);
|
74120 |
}
|
74121 |
+
}))), !buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
74122 |
disableGutters: true,
|
74123 |
className: "with-secondary-action"
|
74124 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
74143 |
|
74144 |
_onChange("no_ajax", !value.target.checked);
|
74145 |
}
|
74146 |
+
}))), !buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
74147 |
disableGutters: true,
|
74148 |
className: "with-secondary-action"
|
74149 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
74168 |
|
74169 |
_onChange("allow_subdomains", value.target.checked);
|
74170 |
}
|
74171 |
+
}))), !buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
74172 |
disableGutters: true,
|
74173 |
className: "with-secondary-action"
|
74174 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
74193 |
|
74194 |
_onChange("can_send_errors", value.target.checked);
|
74195 |
}
|
74196 |
+
}))), !buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
74197 |
disableGutters: true,
|
74198 |
className: "with-secondary-action"
|
74199 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
74218 |
|
74219 |
_onChange("no_limit", value.target.checked);
|
74220 |
}
|
74221 |
+
}))), !dashboard_store.getState().misc.is_opt_in && !buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
74222 |
disableGutters: true,
|
74223 |
className: "with-optin-action"
|
74224 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
74241 |
});
|
74242 |
},
|
74243 |
disabled: resettingOptin
|
74244 |
+
}, translate(resettingOptin ? "loading.loading" : "settings_window.other_settings.reset_opt_in.button")))), !buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(PermissionComponent_PermissionComponent, {
|
74245 |
value: additionalPermissions,
|
74246 |
onChange: function onChange(val) {
|
74247 |
return _onChange("additional_permissions", val);
|
74564 |
(0,react.useEffect)(function () {
|
74565 |
openCollapsibleGroup ? openCollapsibleGroup : "button_group_container";
|
74566 |
}, [openCollapsibleGroup]);
|
74567 |
+
return /*#__PURE__*/react.createElement(Dialog_Dialog, {
|
74568 |
open: open,
|
74569 |
onClose: onClose,
|
74570 |
+
className: "buttonizer-tour-options",
|
74571 |
+
"data-testid": "dialog:buttonizer-tour-options-dialog"
|
74572 |
}, /*#__PURE__*/react.createElement("div", {
|
74573 |
+
className: "header"
|
74574 |
+
}, /*#__PURE__*/react.createElement(DialogTitle_DialogTitle, null, /*#__PURE__*/react.createElement("i", {
|
|
|
|
|
74575 |
className: "fas fa-globe-europe"
|
74576 |
}), translate("settings_window.buttonizer_tour.title")), /*#__PURE__*/react.createElement(IconButton_IconButton, {
|
74577 |
onClick: onClose,
|
74578 |
+
className: "skip-button",
|
74579 |
"data-testid": "buttonizer-tour-options:close-button"
|
74580 |
+
}, /*#__PURE__*/react.createElement("i", {
|
74581 |
className: "fas fa-times"
|
74582 |
+
}))), /*#__PURE__*/react.createElement(DialogContent_DialogContent, null, /*#__PURE__*/react.createElement(List_List, null, /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
74583 |
+
className: "list-item"
|
|
|
|
|
74584 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
74585 |
primary: translate("settings_window.buttonizer_tour.interface.title"),
|
74586 |
+
secondary: translate("settings_window.buttonizer_tour.interface.description")
|
74587 |
+
}), /*#__PURE__*/react.createElement(Button_Button, {
|
|
|
74588 |
variant: "contained",
|
74589 |
color: "primary",
|
74590 |
"data-testid": "buttonizer-tour-options:interface-tour",
|
74598 |
}, 200);
|
74599 |
closeDrawer();
|
74600 |
}
|
74601 |
+
}, translate("buttonizer_tour.take_tour"))), /*#__PURE__*/react.createElement(ListItem_ListItem, {
|
74602 |
+
className: "list-item"
|
74603 |
}, /*#__PURE__*/react.createElement(ListItemText_ListItemText, {
|
74604 |
primary: translate("settings_window.buttonizer_tour.create_button.title"),
|
74605 |
+
secondary: translate("settings_window.buttonizer_tour.create_button.description")
|
74606 |
+
}), /*#__PURE__*/react.createElement(Button_Button, {
|
|
|
74607 |
variant: "contained",
|
74608 |
color: "primary",
|
74609 |
"data-testid": "buttonizer-tour-options:create-button-tour",
|
74617 |
}, 200);
|
74618 |
closeDrawer();
|
74619 |
}
|
74620 |
+
}, translate("buttonizer_tour.take_tour"))))));
|
74621 |
}
|
74622 |
|
74623 |
/* harmony default export */ var SettingsDialog_ButtonizerTourOptions = (connect(function (state) {
|
74716 |
|
74717 |
var handleClose = function handleClose(status) {
|
74718 |
if (status === "confirm") {
|
74719 |
+
window.location.href = buttonizer_admin.is_stand_alone ? "https://app.buttonizer.pro/subscriptions" : buttonizer_admin.admin + "?page=Buttonizer-pricing";
|
74720 |
return;
|
74721 |
}
|
74722 |
|
75086 |
|
75087 |
|
75088 |
function SuperContributorDialog(_ref) {
|
75089 |
+
var _ref$tour = _ref.tour,
|
75090 |
+
tour = _ref$tour === void 0 ? null : _ref$tour,
|
75091 |
+
_ref$welcome_super_co = _ref.welcome_super_contributor,
|
75092 |
welcome_super_contributor = _ref$welcome_super_co === void 0 ? false : _ref$welcome_super_co,
|
75093 |
setSetting = _ref.setSetting;
|
75094 |
|
75104 |
};
|
75105 |
|
75106 |
return /*#__PURE__*/react.createElement(Dialog_Dialog, {
|
75107 |
+
open: tour === null && welcome_super_contributor,
|
75108 |
onClose: handleClose,
|
75109 |
fullWidth: true,
|
75110 |
maxWidth: "md",
|
75119 |
marginRight: 20,
|
75120 |
marginBottom: 10
|
75121 |
}
|
75122 |
+
}), /*#__PURE__*/react.createElement(DialogContentText_DialogContentText, null, translate("welcome.super-contributor"), /*#__PURE__*/react.createElement(Link_Link, {
|
75123 |
href: "https://buttonizer.pro/super-contributor/",
|
75124 |
target: "_blank",
|
75125 |
rel: "noopener"
|
75137 |
|
75138 |
/* harmony default export */ var Dialogs_SuperContributorDialog = (connect(function (state) {
|
75139 |
return {
|
75140 |
+
welcome_super_contributor: state.settings.welcome_super_contributor,
|
75141 |
+
welcome: state.settings.welcome
|
75142 |
};
|
75143 |
}, function (dispatch) {
|
75144 |
return {
|
75161 |
id: "myVideo",
|
75162 |
autoPlay: true,
|
75163 |
loop: true
|
75164 |
+
}), /*#__PURE__*/react.createElement("h2", null, translate("buttonizer_tour.interface_tour.step_0.title")), translate("buttonizer_tour.interface_tour.step_0.intro")),
|
75165 |
tooltipClass: "videoDialog",
|
75166 |
position: "right"
|
75167 |
}, {
|
75173 |
}, // Go to next page, skip step
|
75174 |
{
|
75175 |
element: ".simplebar-content-wrapper",
|
75176 |
+
title: translate("buttonizer_tour.interface_tour.step_2.title"),
|
75177 |
+
intro: translate("buttonizer_tour.interface_tour.step_2.intro"),
|
75178 |
+
tooltipClass: "centerTopDialog",
|
75179 |
+
position: "right"
|
75180 |
}, {
|
75181 |
element: ".simplebar-content-wrapper",
|
75182 |
title: translate("buttonizer_tour.interface_tour.step_2.title"),
|
75183 |
intro: translate("buttonizer_tour.interface_tour.step_2.intro"),
|
75184 |
+
tooltipClass: "centerTopDialog",
|
75185 |
position: "right"
|
75186 |
}, {
|
75187 |
element: ".simplebar-content-wrapper",
|
75191 |
id: "myVideo",
|
75192 |
autoPlay: true,
|
75193 |
loop: true
|
75194 |
+
}), /*#__PURE__*/react.createElement("h2", null, translate("buttonizer_tour.interface_tour.step_3.title")), translate("buttonizer_tour.interface_tour.step_3.intro")),
|
75195 |
+
tooltipClass: "centerVideoDialog",
|
75196 |
position: "right"
|
75197 |
}, {
|
75198 |
element: ".breadcrumb-button",
|
75204 |
element: ".MuiButton-Publish",
|
75205 |
title: translate("buttonizer_tour.interface_tour.step_5.title"),
|
75206 |
intro: translate("buttonizer_tour.interface_tour.step_5.intro"),
|
75207 |
+
tooltipClass: "centerBottomDialog",
|
75208 |
position: "right"
|
75209 |
}, // Go to next page, skip step
|
75210 |
{
|
75211 |
+
element: ".menu-container",
|
75212 |
+
title: translate("buttonizer_tour.interface_tour.step_6.title"),
|
75213 |
+
intro: translate("buttonizer_tour.interface_tour.step_6.intro"),
|
75214 |
+
tooltipClass: "centerTopDialog",
|
75215 |
+
position: "right"
|
75216 |
}, {
|
75217 |
element: ".menu-container",
|
75218 |
title: translate("buttonizer_tour.interface_tour.step_6.title"),
|
75219 |
intro: translate("buttonizer_tour.interface_tour.step_6.intro"),
|
75220 |
+
tooltipClass: "centerTopDialog",
|
75221 |
position: "right"
|
75222 |
}, {
|
75223 |
element: ".menu-settings",
|
75224 |
title: translate("buttonizer_tour.interface_tour.step_7.title"),
|
75225 |
intro: translate("buttonizer_tour.interface_tour.step_7.intro"),
|
75226 |
tooltipClass: "tourDialog",
|
|
|
75227 |
position: "right"
|
75228 |
}, {
|
75229 |
element: ".menu-item.buttonizer-tour",
|
75234 |
}, // Go to next page, skip step
|
75235 |
{
|
75236 |
element: ".menu-support",
|
75237 |
+
title: translate("buttonizer_tour.interface_tour.step_9.title"),
|
75238 |
+
intro: translate("buttonizer_tour.interface_tour.step_9.intro"),
|
75239 |
+
tooltipClass: "tourDialog",
|
75240 |
+
position: "right"
|
75241 |
}, {
|
75242 |
element: ".menu-support",
|
75243 |
title: translate("buttonizer_tour.interface_tour.step_9.title"),
|
75244 |
intro: translate("buttonizer_tour.interface_tour.step_9.intro"),
|
75245 |
tooltipClass: "tourDialog",
|
|
|
75246 |
position: "right"
|
75247 |
}, {
|
75248 |
element: ".menu-item.community",
|
75268 |
if (nextStepIndex === 3) {
|
75269 |
// Going to general page
|
75270 |
if (introJsRef.introJs._direction === "forward") {
|
75271 |
+
document.location.href = buttonizer_admin.admin + "?page=Buttonizer#/group/".concat(groupId, "/general");
|
75272 |
openCollapsibleGroup("group_general_general");
|
75273 |
} // Going back to general page
|
75274 |
else if (introJsRef.introJs._direction === "backward") {
|
75275 |
+
document.location.href = buttonizer_admin.admin + "?page=Buttonizer#/group/".concat(groupId, "/general");
|
75276 |
}
|
75277 |
|
75278 |
openCollapsibleGroup("group_general_general");
|
75281 |
if (nextStepIndex === 4) {
|
75282 |
// Going to style page
|
75283 |
if (introJsRef.introJs._direction === "forward") {
|
75284 |
+
document.location.href = buttonizer_admin.admin + "?page=Buttonizer#/group/".concat(groupId, "/style");
|
75285 |
}
|
75286 |
|
75287 |
openCollapsibleGroup("group_style_button");
|
75290 |
if (nextStepIndex === 6) {
|
75291 |
// Going back to style page
|
75292 |
if (introJsRef.introJs._direction === "backward") {
|
75293 |
+
document.location.href = buttonizer_admin.admin + "?page=Buttonizer#/group/".concat(groupId, "/style");
|
75294 |
}
|
75295 |
|
75296 |
openCollapsibleGroup("group_style_button");
|
75297 |
}
|
75298 |
|
75299 |
if (nextStepIndex === 7) {
|
75300 |
+
document.location.href = buttonizer_admin.admin + "?page=Buttonizer#/group/".concat(groupId, "/style/menu"); // Open menu settings container
|
75301 |
|
75302 |
if (introJsRef.introJs._direction === "forward") setTimeout(function () {
|
75303 |
introJsRef.introJs.nextStep();
|
75351 |
}, // Go to next page, skip step
|
75352 |
{
|
75353 |
element: ".simplebar-content-wrapper",
|
75354 |
+
title: translate("buttonizer_tour.create_button_tour.step_2.title"),
|
75355 |
+
intro: translate("buttonizer_tour.create_button_tour.step_2.intro"),
|
75356 |
+
tooltipClass: "centerTopDialog"
|
75357 |
}, // Go to style page
|
75358 |
{
|
75359 |
element: ".simplebar-content-wrapper",
|
75360 |
title: translate("buttonizer_tour.create_button_tour.step_2.title"),
|
75361 |
intro: translate("buttonizer_tour.create_button_tour.step_2.intro"),
|
75362 |
+
tooltipClass: "centerTopDialog"
|
75363 |
}, {
|
75364 |
element: ".button-action-type",
|
75365 |
title: translate("buttonizer_tour.create_button_tour.step_3.title"),
|
75381 |
}, // Go to next page, skip step
|
75382 |
{
|
75383 |
element: ".general-label-text",
|
75384 |
+
title: translate("buttonizer_tour.create_button_tour.step_6.title"),
|
75385 |
+
intro: translate("buttonizer_tour.create_button_tour.step_6.intro"),
|
75386 |
+
tooltipClass: "tourDialog",
|
75387 |
+
position: "right"
|
75388 |
}, {
|
75389 |
element: ".general-label-text",
|
75390 |
title: translate("buttonizer_tour.create_button_tour.step_6.title"),
|
75394 |
}, // Go to next page, skip step
|
75395 |
{
|
75396 |
element: ".simplebar-content-wrapper",
|
75397 |
+
title: translate("buttonizer_tour.create_button_tour.step_7.title"),
|
75398 |
+
intro: translate("buttonizer_tour.create_button_tour.step_7.intro"),
|
75399 |
+
tooltipClass: "centerTopDialog"
|
75400 |
}, {
|
75401 |
element: ".simplebar-content-wrapper",
|
75402 |
title: translate("buttonizer_tour.create_button_tour.step_7.title"),
|
75403 |
intro: translate("buttonizer_tour.create_button_tour.step_7.intro"),
|
75404 |
+
tooltipClass: "centerTopDialog"
|
75405 |
}, {
|
75406 |
element: ".normal-or-hover",
|
75407 |
title: translate("buttonizer_tour.create_button_tour.step_8.title"),
|
75445 |
position: "right"
|
75446 |
}, // Go to next page, skip step
|
75447 |
{
|
75448 |
+
element: ".label-device-visibility",
|
75449 |
+
title: translate("buttonizer_tour.create_button_tour.step_15.title"),
|
75450 |
+
intro: translate("buttonizer_tour.create_button_tour.step_15.intro"),
|
75451 |
+
tooltipClass: "tourDialog",
|
75452 |
+
position: "right"
|
75453 |
}, {
|
75454 |
element: ".label-device-visibility",
|
75455 |
title: translate("buttonizer_tour.create_button_tour.step_15.title"),
|
75462 |
intro: translate("buttonizer_tour.create_button_tour.step_16.intro"),
|
75463 |
tooltipClass: "tourDialog",
|
75464 |
position: "right"
|
75465 |
+
}, {
|
75466 |
+
element: ".label-font-family",
|
75467 |
+
title: translate("buttonizer_tour.create_button_tour.step_17.title"),
|
75468 |
+
intro: translate("buttonizer_tour.create_button_tour.step_17.intro"),
|
75469 |
+
tooltipClass: "tourDialog",
|
75470 |
+
position: "right"
|
75471 |
+
}, {
|
75472 |
+
element: ".style-label-margin",
|
75473 |
+
title: translate("buttonizer_tour.create_button_tour.step_18.title"),
|
75474 |
+
intro: translate("buttonizer_tour.create_button_tour.step_18.intro"),
|
75475 |
+
tooltipClass: "tourDialog",
|
75476 |
+
position: "right"
|
75477 |
+
}, {
|
75478 |
+
element: ".style-label-padding",
|
75479 |
+
title: translate("buttonizer_tour.create_button_tour.step_19.title"),
|
75480 |
+
intro: translate("buttonizer_tour.create_button_tour.step_19.intro"),
|
75481 |
+
tooltipClass: "tourDialog",
|
75482 |
+
position: "right"
|
75483 |
+
}, {
|
75484 |
+
element: ".style-label-padding",
|
75485 |
title: translate("buttonizer_tour.final.title"),
|
75486 |
intro: translate("buttonizer_tour.final.intro"),
|
75487 |
tooltipClass: "tourDialog",
|
75504 |
if (nextStepIndex === 3) {
|
75505 |
// Going to general page and open the general container
|
75506 |
if (introJsRef.introJs._direction === "forward") {
|
75507 |
+
document.location.href = "?page=Buttonizer#/group/".concat(groupId, "/button/").concat(buttonId, "/general");
|
75508 |
}
|
75509 |
|
75510 |
openCollapsibleGroup("button_general_general");
|
75531 |
if (nextStepIndex === 9) {
|
75532 |
// Going back to general page and open the label container
|
75533 |
if (introJsRef.introJs._direction === "backward") {
|
75534 |
+
document.location.href = buttonizer_admin.admin + "?page=Buttonizer#/group/".concat(groupId, "/button/").concat(buttonId, "/general");
|
75535 |
openCollapsibleGroup("button_general_label");
|
75536 |
}
|
75537 |
|
75546 |
if (nextStepIndex === 10) {
|
75547 |
// Going to style page and open the button container
|
75548 |
if (introJsRef.introJs._direction === "forward") {
|
75549 |
+
document.location.href = buttonizer_admin.admin + "?page=Buttonizer#/group/".concat(groupId, "/button/").concat(buttonId, "/style");
|
75550 |
openCollapsibleGroup("button_style_button");
|
75551 |
}
|
75552 |
}
|
75615 |
var tour = _ref.tour,
|
75616 |
groups = _ref.groups,
|
75617 |
buttons = _ref.buttons,
|
75618 |
+
openCollapsibleGroup = _ref.openCollapsibleGroup,
|
75619 |
+
setSetting = _ref.setSetting,
|
75620 |
+
welcome = _ref.welcome;
|
75621 |
var groupId = Object.keys(groups)[0];
|
75622 |
var buttonId = Object.keys(buttons)[0];
|
75623 |
var ref = (0,react.useRef)();
|
75624 |
var state = {
|
75625 |
stepsEnabled: true,
|
75626 |
initialStep: 0,
|
75627 |
+
steps: welcome ? Tours.interface_tour[0] : tour ? Tours[tour][0] : [],
|
75628 |
onBeforeChange: function onBeforeChange(nextStepIndex) {
|
75629 |
+
return Tours[welcome ? "interface_tour" : tour && tour][1](nextStepIndex, ref.current ? ref.current : null, groupId, buttonId, openCollapsibleGroup);
|
75630 |
}
|
75631 |
};
|
|
|
75632 |
|
75633 |
var onExit = function onExit() {
|
75634 |
app.closeButtonizerTour(); // Users go to home page if they stop in the middle of the tour
|
75635 |
|
75636 |
document.location.href = "#/";
|
75637 |
openCollapsibleGroup(null);
|
75638 |
+
setSetting("welcome", false);
|
75639 |
}; // Disable downscroll in the menu during the last dialogs
|
75640 |
|
75641 |
|
75653 |
|
75654 |
});
|
75655 |
return /*#__PURE__*/react.createElement(intro_js_react_lib/* Steps */.Rg, {
|
75656 |
+
enabled: tour || welcome,
|
75657 |
steps: state.steps,
|
75658 |
initialStep: state.initialStep,
|
75659 |
onExit: onExit,
|
75680 |
};
|
75681 |
}, function (dispatch) {
|
75682 |
return {
|
75683 |
+
setSetting: function setSetting() {
|
75684 |
+
return dispatch(dataActions_setSetting.apply(void 0, arguments));
|
75685 |
+
},
|
75686 |
setMisc: function setMisc() {
|
75687 |
return dispatch(dataActions_setMisc.apply(void 0, arguments));
|
75688 |
},
|
75691 |
}
|
75692 |
};
|
75693 |
})(ButtonizerTour));
|
75694 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Dialogs/SessionExpiredDialog/SessionExpiredDialog.js
|
75695 |
+
function SessionExpiredDialog_slicedToArray(arr, i) { return SessionExpiredDialog_arrayWithHoles(arr) || SessionExpiredDialog_iterableToArrayLimit(arr, i) || SessionExpiredDialog_unsupportedIterableToArray(arr, i) || SessionExpiredDialog_nonIterableRest(); }
|
75696 |
|
75697 |
+
function SessionExpiredDialog_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
75698 |
|
75699 |
+
function SessionExpiredDialog_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return SessionExpiredDialog_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return SessionExpiredDialog_arrayLikeToArray(o, minLen); }
|
75700 |
|
75701 |
+
function SessionExpiredDialog_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
75702 |
|
75703 |
+
function SessionExpiredDialog_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
75704 |
|
75705 |
+
function SessionExpiredDialog_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
75706 |
|
75707 |
|
75708 |
|
75709 |
|
75710 |
|
75711 |
|
75712 |
+
var popupCloseEventInterval = setTimeout(function () {}, 0); // Try to refresh
|
75713 |
|
75714 |
+
function updateRefreshToken() {
|
75715 |
+
return axios_default()({
|
75716 |
+
url: "".concat(window.buttonizer_admin.mainApi, "/auth/refresh"),
|
75717 |
+
method: "POST",
|
75718 |
+
withCredentials: true,
|
75719 |
+
data: {
|
75720 |
+
token: getCookie("__token")
|
75721 |
+
}
|
75722 |
+
});
|
75723 |
+
}
|
75724 |
|
75725 |
+
function SessionExpiredDialog(_ref) {
|
75726 |
+
var isOpened = _ref.isOpened;
|
|
|
|
|
|
|
75727 |
|
75728 |
+
var _useState = (0,react.useState)(false),
|
75729 |
+
_useState2 = SessionExpiredDialog_slicedToArray(_useState, 2),
|
75730 |
+
isWaiting = _useState2[0],
|
75731 |
+
setIsWaiting = _useState2[1];
|
75732 |
|
75733 |
+
var _useState3 = (0,react.useState)(false),
|
75734 |
+
_useState4 = SessionExpiredDialog_slicedToArray(_useState3, 2),
|
75735 |
+
hasTriedRefreshToken = _useState4[0],
|
75736 |
+
setHasTriedRefreshToken = _useState4[1];
|
75737 |
+
|
75738 |
+
var _useState5 = (0,react.useState)(false),
|
75739 |
+
_useState6 = SessionExpiredDialog_slicedToArray(_useState5, 2),
|
75740 |
+
isUsingRefreshtoken = _useState6[0],
|
75741 |
+
setUsingRefreshtoken = _useState6[1];
|
75742 |
|
75743 |
(0,react.useEffect)(function () {
|
75744 |
+
return function () {
|
75745 |
+
clearInterval(popupCloseEventInterval);
|
75746 |
+
};
|
75747 |
+
}, [isOpened]); // Trying to use the refresh token method
|
75748 |
+
|
75749 |
+
if (!isUsingRefreshtoken && !hasTriedRefreshToken && isOpened) {
|
75750 |
+
setUsingRefreshtoken(true);
|
75751 |
+
setHasTriedRefreshToken(true);
|
75752 |
+
updateRefreshToken().then(function (refreshTokenData) {
|
75753 |
+
// Update token
|
75754 |
+
window.buttonizer_admin.auth = refreshTokenData.data.token;
|
75755 |
+
retryApiRequest().then(function () {
|
75756 |
+
return app.standAloneEvent("userauthenticated");
|
75757 |
+
})["catch"](function () {
|
75758 |
+
return setUsingRefreshtoken(false);
|
75759 |
+
});
|
75760 |
+
})["catch"](function () {
|
75761 |
+
return setUsingRefreshtoken(false);
|
75762 |
+
});
|
75763 |
+
}
|
75764 |
+
|
75765 |
+
var openPopup = function openPopup() {
|
75766 |
+
setIsWaiting(true);
|
75767 |
+
var popupWindow = window.open("".concat(buttonizer_admin.admin, "/auth/editor"), "logInPopup", "width=500," + "height=580," + "top=".concat(window.innerHeight / 2 - 580 / 2, ",") + "left=".concat(window.innerWidth / 2 - 500 / 2, ",") + "status=no,scrollbars=yes,resizable=no");
|
75768 |
+
popupCloseEventInterval = setInterval(function () {
|
75769 |
+
if (popupWindow.closed) {
|
75770 |
+
clearInterval(popupCloseEventInterval);
|
75771 |
+
window.buttonizer_admin.auth = getCookie("__token");
|
75772 |
+
retryApiRequest().then(function () {
|
75773 |
+
return app.standAloneEvent("userauthenticated");
|
75774 |
+
})["catch"](function () {
|
75775 |
+
document.location.reload();
|
75776 |
+
}).then(function () {
|
75777 |
+
return setIsWaiting(false);
|
75778 |
+
});
|
75779 |
+
}
|
75780 |
+
});
|
75781 |
+
};
|
75782 |
+
|
75783 |
+
return /*#__PURE__*/react.createElement(Dialog_Dialog, {
|
75784 |
+
open: isOpened,
|
75785 |
fullWidth: true,
|
75786 |
+
"aria-labelledby": "temp-reauthenticate-dialog-title",
|
75787 |
+
"aria-describedby": "temp-reauthenticate-dialog-description"
|
75788 |
+
}, /*#__PURE__*/react.createElement(DialogTitle_DialogTitle, {
|
75789 |
+
id: "temp-reauthenticate-dialog-title"
|
75790 |
+
}, "Reauthenticate"), /*#__PURE__*/react.createElement(DialogContent_DialogContent, null, /*#__PURE__*/react.createElement(DialogContentText_DialogContentText, null, isUsingRefreshtoken ? /*#__PURE__*/react.createElement(react.Fragment, null, "Gathering information..") : /*#__PURE__*/react.createElement(react.Fragment, null, "Your editor authentication session has expired, this mostly happens after 30 minutes."))), /*#__PURE__*/react.createElement(DialogActions_DialogActions, null, /*#__PURE__*/react.createElement(Button_Button, {
|
75791 |
+
onClick: openPopup,
|
75792 |
+
disabled: isWaiting || isUsingRefreshtoken,
|
75793 |
+
color: "primary"
|
75794 |
+
}, "Reauthenticate", " ", (isWaiting || isUsingRefreshtoken) && /*#__PURE__*/react.createElement(CircularProgress_CircularProgress, {
|
75795 |
+
size: 25,
|
75796 |
style: {
|
75797 |
+
marginLeft: 20
|
|
|
75798 |
}
|
75799 |
+
}))));
|
75800 |
+
}
|
75801 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Dialogs/ChangelogDialog/Slides.js
|
75802 |
+
|
75803 |
+
var updates = [[// New features (first slide)
|
75804 |
+
{
|
75805 |
+
title: translate("settings_window.changelog_dialog.new_features"),
|
75806 |
+
info: [{
|
75807 |
+
title: translate("settings_window.changelog_dialog.first_feature.title"),
|
75808 |
+
info: translate("settings_window.changelog_dialog.first_feature.info")
|
75809 |
+
}, {
|
75810 |
+
title: translate("settings_window.changelog_dialog.second_feature.title"),
|
75811 |
+
info: translate("settings_window.changelog_dialog.second_feature.info")
|
75812 |
+
}, {
|
75813 |
+
title: translate("settings_window.changelog_dialog.third_feature.title"),
|
75814 |
+
info: translate("settings_window.changelog_dialog.third_feature.info")
|
75815 |
+
}, {
|
75816 |
+
title: translate("settings_window.changelog_dialog.fourth_feature.title"),
|
75817 |
+
info: translate("settings_window.changelog_dialog.fourth_feature.info")
|
75818 |
+
}]
|
75819 |
+
} // {
|
75820 |
+
// New updates & bug fixes (first slide)
|
75821 |
+
// },
|
75822 |
+
] // [
|
75823 |
+
// {
|
75824 |
+
// Additional slide(s)
|
75825 |
+
// },
|
75826 |
+
// ],
|
75827 |
+
];
|
75828 |
+
|
75829 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/Dialogs/ChangelogDialog/ChangelogDialog.js
|
75830 |
+
function ChangelogDialog_slicedToArray(arr, i) { return ChangelogDialog_arrayWithHoles(arr) || ChangelogDialog_iterableToArrayLimit(arr, i) || ChangelogDialog_unsupportedIterableToArray(arr, i) || ChangelogDialog_nonIterableRest(); }
|
75831 |
+
|
75832 |
+
function ChangelogDialog_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
75833 |
+
|
75834 |
+
function ChangelogDialog_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ChangelogDialog_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ChangelogDialog_arrayLikeToArray(o, minLen); }
|
75835 |
+
|
75836 |
+
function ChangelogDialog_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
75837 |
+
|
75838 |
+
function ChangelogDialog_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
75839 |
+
|
75840 |
+
function ChangelogDialog_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
75841 |
+
|
75842 |
+
|
75843 |
+
|
75844 |
+
|
75845 |
+
|
75846 |
+
|
75847 |
+
|
75848 |
+
|
75849 |
+
|
75850 |
+
function ChangelogDialog(_ref) {
|
75851 |
+
var welcome = _ref.welcome,
|
75852 |
+
setSetting = _ref.setSetting,
|
75853 |
+
changelogDialogUpdated = _ref.changelogDialogUpdated;
|
75854 |
+
|
75855 |
+
var _useState = (0,react.useState)(parseInt(buttonizer_admin.changelog_dialog_updated) > changelogDialogUpdated),
|
75856 |
+
_useState2 = ChangelogDialog_slicedToArray(_useState, 2),
|
75857 |
+
dialogOpened = _useState2[0],
|
75858 |
+
setDialogOpened = _useState2[1];
|
75859 |
+
|
75860 |
+
var _useState3 = (0,react.useState)(0),
|
75861 |
+
_useState4 = ChangelogDialog_slicedToArray(_useState3, 2),
|
75862 |
+
currentSlide = _useState4[0],
|
75863 |
+
setCurrentSlide = _useState4[1]; // Pagination for the slides
|
75864 |
+
|
75865 |
+
|
75866 |
+
var previousFeatureIndex = function previousFeatureIndex() {
|
75867 |
+
var getPreviousIndex = currentSlide - 1;
|
75868 |
+
|
75869 |
+
if (getPreviousIndex <= 0) {
|
75870 |
+
getPreviousIndex = 0;
|
75871 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
75872 |
|
75873 |
+
setCurrentSlide(getPreviousIndex);
|
75874 |
+
};
|
75875 |
|
75876 |
+
var nextFeatureIndex = function nextFeatureIndex() {
|
75877 |
+
var getNextIndex = currentSlide + 1;
|
75878 |
+
|
75879 |
+
if (getNextIndex >= updates.length) {
|
75880 |
+
getNextIndex = updates.length - 1;
|
75881 |
+
}
|
75882 |
+
|
75883 |
+
setCurrentSlide(getNextIndex);
|
75884 |
+
}; // Show dialog
|
75885 |
+
|
75886 |
+
|
75887 |
+
(0,react.useEffect)(function () {
|
75888 |
+
setDialogOpened(parseInt(buttonizer_admin.changelog_dialog_updated) > changelogDialogUpdated);
|
75889 |
+
}, [changelogDialogUpdated]); // Keyboard navigation for the slides
|
75890 |
+
|
75891 |
+
(0,react.useEffect)(function () {
|
75892 |
+
var onKeyEvent = function onKeyEvent(event) {
|
75893 |
+
switch (event.key) {
|
75894 |
+
case "ArrowLeft":
|
75895 |
+
previousFeatureIndex();
|
75896 |
+
break;
|
75897 |
+
|
75898 |
+
case "ArrowRight":
|
75899 |
+
nextFeatureIndex();
|
75900 |
+
break;
|
75901 |
+
|
75902 |
+
default:
|
75903 |
+
return;
|
75904 |
+
}
|
75905 |
+
};
|
75906 |
+
|
75907 |
+
window.addEventListener("keyup", onKeyEvent);
|
75908 |
+
return function () {
|
75909 |
+
// OnDestroy
|
75910 |
+
window.removeEventListener("keyup", onKeyEvent);
|
75911 |
+
};
|
75912 |
+
}, [currentSlide]);
|
75913 |
+
|
75914 |
+
var handleClose = function handleClose() {
|
75915 |
+
setDialogOpened(false);
|
75916 |
+
setSetting("changelog_dialog_updated", parseInt(buttonizer_admin.changelog_dialog_updated));
|
75917 |
+
};
|
75918 |
+
|
75919 |
+
return /*#__PURE__*/react.createElement(Dialog_Dialog, {
|
75920 |
+
open: !welcome && dialogOpened,
|
75921 |
+
onClose: handleClose,
|
75922 |
+
fullWidth: true,
|
75923 |
+
"aria-labelledby": "changelog-dialog-title",
|
75924 |
+
"aria-describedby": "changelog-dialog-description",
|
75925 |
+
className: "changelog-dialog",
|
75926 |
+
"data-testid": "dialog:changelog-dialog"
|
75927 |
+
}, /*#__PURE__*/react.createElement("img", {
|
75928 |
+
src: "".concat(buttonizer_admin.assets, "/images/changelog-dialog-header.png")
|
75929 |
+
}), /*#__PURE__*/react.createElement(IconButton_IconButton, {
|
75930 |
+
onClick: handleClose,
|
75931 |
+
className: "close-down",
|
75932 |
+
"data-testid": "changelog-dialog:close-down"
|
75933 |
+
}, /*#__PURE__*/react.createElement("i", {
|
75934 |
+
className: "fas fa-times"
|
75935 |
+
})), /*#__PURE__*/react.createElement(DialogTitle_DialogTitle, null, translate("settings_window.changelog_dialog.title")), /*#__PURE__*/react.createElement(DialogContent_DialogContent, {
|
75936 |
+
className: "content"
|
75937 |
+
}, updates[currentSlide].map(function (type, key) {
|
75938 |
+
return /*#__PURE__*/react.createElement("div", {
|
75939 |
+
key: key
|
75940 |
+
}, /*#__PURE__*/react.createElement("h3", null, type.title), type.info.map(function (listItem, index) {
|
75941 |
+
return /*#__PURE__*/react.createElement("div", {
|
75942 |
+
className: "list",
|
75943 |
+
key: index
|
75944 |
+
}, /*#__PURE__*/react.createElement("ul", null, /*#__PURE__*/react.createElement("li", {
|
75945 |
+
className: "name"
|
75946 |
+
}, listItem.title), /*#__PURE__*/react.createElement("p", {
|
75947 |
+
className: "info"
|
75948 |
+
}, listItem.info)));
|
75949 |
+
}));
|
75950 |
+
})), /*#__PURE__*/react.createElement(DialogActions_DialogActions, {
|
75951 |
+
className: "footer"
|
75952 |
+
}, updates.length > 1 && /*#__PURE__*/react.createElement("div", {
|
75953 |
+
className: "pagination"
|
75954 |
+
}, /*#__PURE__*/react.createElement(IconButton_IconButton, {
|
75955 |
+
className: "previous",
|
75956 |
+
onClick: function onClick() {
|
75957 |
+
return previousFeatureIndex();
|
75958 |
},
|
75959 |
+
disabled: currentSlide === 0
|
75960 |
+
}, /*#__PURE__*/react.createElement("i", {
|
75961 |
+
className: "fas fa-chevron-left"
|
75962 |
+
})), /*#__PURE__*/react.createElement("div", {
|
75963 |
+
className: "progress-bar"
|
75964 |
+
}, updates.map(function (type, key) {
|
75965 |
+
return /*#__PURE__*/react.createElement("span", {
|
75966 |
+
className: "dot",
|
75967 |
+
key: key,
|
75968 |
+
style: currentSlide === key ? {
|
75969 |
+
backgroundColor: "#f08419"
|
75970 |
+
} : null
|
75971 |
+
});
|
75972 |
+
})), /*#__PURE__*/react.createElement(IconButton_IconButton, {
|
75973 |
+
className: "next",
|
75974 |
onClick: function onClick() {
|
75975 |
+
return nextFeatureIndex();
|
|
|
75976 |
},
|
75977 |
+
disabled: currentSlide === updates.length - 1
|
75978 |
+
}, /*#__PURE__*/react.createElement("i", {
|
75979 |
+
className: "fas fa-chevron-right"
|
75980 |
+
}))), /*#__PURE__*/react.createElement(IconButton_IconButton, {
|
75981 |
+
onClick: function onClick() {
|
75982 |
+
window.open("https://community.buttonizer.pro/t/updates");
|
75983 |
+
},
|
75984 |
+
className: "external-link",
|
75985 |
+
"data-testid": "changelog-dialog:external-link"
|
75986 |
+
}, translate("settings_window.changelog_dialog.all_changelogs"), /*#__PURE__*/react.createElement("i", {
|
75987 |
+
className: "fas fa-external-link-alt"
|
75988 |
+
})), /*#__PURE__*/react.createElement("span", {
|
75989 |
+
className: "version"
|
75990 |
+
}, translate("bar.menu.version"))));
|
75991 |
}
|
75992 |
|
75993 |
+
/* harmony default export */ var ChangelogDialog_ChangelogDialog = (connect(function (state) {
|
75994 |
return {
|
75995 |
+
welcome: state.settings.welcome,
|
75996 |
+
changelogDialogUpdated: state.settings.changelog_dialog_updated
|
75997 |
};
|
75998 |
}, function (dispatch) {
|
75999 |
return {
|
76000 |
setSetting: function setSetting() {
|
76001 |
return dispatch(dataActions_setSetting.apply(void 0, arguments));
|
|
|
|
|
|
|
76002 |
}
|
76003 |
};
|
76004 |
+
})(ChangelogDialog));
|
76005 |
+
;// CONCATENATED MODULE: ./src/js/dashboard/Components/UrlBar/UrlBar.js
|
76006 |
+
function UrlBar_slicedToArray(arr, i) { return UrlBar_arrayWithHoles(arr) || UrlBar_iterableToArrayLimit(arr, i) || UrlBar_unsupportedIterableToArray(arr, i) || UrlBar_nonIterableRest(); }
|
76007 |
+
|
76008 |
+
function UrlBar_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
76009 |
+
|
76010 |
+
function UrlBar_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return UrlBar_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return UrlBar_arrayLikeToArray(o, minLen); }
|
76011 |
+
|
76012 |
+
function UrlBar_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
76013 |
+
|
76014 |
+
function UrlBar_iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
76015 |
+
|
76016 |
+
function UrlBar_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
76017 |
+
|
76018 |
+
|
76019 |
+
// import ArrowDropDownIcon from "@material-ui/icons/ArrowDropDown";
|
76020 |
+
|
76021 |
+
|
76022 |
+
|
76023 |
+
|
76024 |
+
|
76025 |
+
|
76026 |
+
function UrlBar(_ref) {
|
76027 |
+
var _ref$loading = _ref.loading,
|
76028 |
+
loading = _ref$loading === void 0 ? true : _ref$loading;
|
76029 |
+
|
76030 |
+
var _useState = (0,react.useState)("/"),
|
76031 |
+
_useState2 = UrlBar_slicedToArray(_useState, 2),
|
76032 |
+
currentPath = _useState2[0],
|
76033 |
+
setCurrentPath = _useState2[1]; // const [opened, setOpened] = useState(false);
|
76034 |
+
|
76035 |
+
|
76036 |
+
var buttonRef = (0,react.useRef)();
|
76037 |
+
var domain = useSelector(function (_ref2) {
|
76038 |
+
var misc = _ref2.misc;
|
76039 |
+
return misc.domain;
|
76040 |
+
});
|
76041 |
+
var isUrl = currentPath.indexOf("http://") >= 0 || currentPath.indexOf("https://") >= 0;
|
76042 |
+
|
76043 |
+
var handlePageChange = function handlePageChange() {
|
76044 |
+
try {
|
76045 |
+
var path = currentPath; // If empty, add /
|
76046 |
+
|
76047 |
+
if (path === "") {
|
76048 |
+
path = "/";
|
76049 |
+
}
|
76050 |
+
|
76051 |
+
var _isUrl = path.indexOf("http://") >= 0 || path.indexOf("https://") >= 0; // Add slash before URL
|
76052 |
+
|
76053 |
+
|
76054 |
+
if (!_isUrl && path.substring(0, 1) !== "/") {
|
76055 |
+
path = "/".concat(path);
|
76056 |
+
} else if (_isUrl) {
|
76057 |
+
var url = new URL(path);
|
76058 |
+
|
76059 |
+
if (url.pathname !== path) {
|
76060 |
+
path = "".concat(url.pathname).concat(url.search);
|
76061 |
+
}
|
76062 |
+
} // Update path if it has been changed
|
76063 |
+
|
76064 |
+
|
76065 |
+
if (path !== currentPath) {
|
76066 |
+
setCurrentPath(path);
|
76067 |
+
}
|
76068 |
+
|
76069 |
+
updateFrontendPreviewPath({
|
76070 |
+
path: path
|
76071 |
+
});
|
76072 |
+
} catch (err) {}
|
76073 |
+
};
|
76074 |
+
|
76075 |
+
return /*#__PURE__*/react.createElement("div", {
|
76076 |
+
className: (0,clsx_m/* default */.Z)("buzzy-urlbar", !loading && "ready")
|
76077 |
+
}, /*#__PURE__*/react.createElement(Grid_Grid, {
|
76078 |
+
container: true,
|
76079 |
+
spacing: 2,
|
76080 |
+
style: {
|
76081 |
+
padding: 10
|
76082 |
+
}
|
76083 |
+
}, /*#__PURE__*/react.createElement(Grid_Grid, {
|
76084 |
+
item: true,
|
76085 |
+
xs: true
|
76086 |
+
}, /*#__PURE__*/react.createElement(TextField_TextField, {
|
76087 |
+
variant: "outlined",
|
76088 |
+
value: currentPath,
|
76089 |
+
className: "whitten",
|
76090 |
+
size: "small",
|
76091 |
+
label: "Preview URL",
|
76092 |
+
placeholder: "/",
|
76093 |
+
fullWidth: true,
|
76094 |
+
onChange: function onChange(e) {
|
76095 |
+
setCurrentPath(e.target.value);
|
76096 |
+
},
|
76097 |
+
InputProps: {
|
76098 |
+
startAdornment: !isUrl && /*#__PURE__*/react.createElement("div", null, "https://", domain),
|
76099 |
+
endAdornment: /*#__PURE__*/react.createElement(KnowledgeBaseLink, {
|
76100 |
+
articleId: 960,
|
76101 |
+
tiny: true
|
76102 |
+
})
|
76103 |
+
},
|
76104 |
+
onPaste: function onPaste() {
|
76105 |
+
return handlePageChange();
|
76106 |
+
},
|
76107 |
+
onFocus: function onFocus(e) {
|
76108 |
+
return e.target.select();
|
76109 |
+
},
|
76110 |
+
onBlur: function onBlur() {
|
76111 |
+
return handlePageChange();
|
76112 |
+
},
|
76113 |
+
onKeyUp: function onKeyUp(e) {
|
76114 |
+
if (e.keyCode === 13) {
|
76115 |
+
handlePageChange();
|
76116 |
+
}
|
76117 |
+
}
|
76118 |
+
})), /*#__PURE__*/react.createElement(Grid_Grid, {
|
76119 |
+
item: true
|
76120 |
+
}, /*#__PURE__*/react.createElement(ButtonGroup_ButtonGroup, {
|
76121 |
+
variant: "contained",
|
76122 |
+
ref: buttonRef,
|
76123 |
+
"aria-label": "split button"
|
76124 |
+
}, /*#__PURE__*/react.createElement(Button_Button, {
|
76125 |
+
onClick: function onClick() {
|
76126 |
+
return handlePageChange();
|
76127 |
+
},
|
76128 |
+
color: "primary"
|
76129 |
+
}, "Preview")))));
|
76130 |
+
}
|
76131 |
;// CONCATENATED MODULE: ./src/js/dashboard/App.js
|
76132 |
function App_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { App_typeof = function _typeof(obj) { return typeof obj; }; } else { App_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return App_typeof(obj); }
|
76133 |
|
76167 |
|
76168 |
|
76169 |
|
76170 |
+
|
76171 |
+
|
76172 |
+
|
76173 |
|
76174 |
|
76175 |
|
76188 |
_this = _super.call(this, props);
|
76189 |
__webpack_require__.g.app = App_assertThisInitialized(_this); // FontAwesome
|
76190 |
|
76191 |
+
_this.loadFontAwesome(); // Frame URL
|
76192 |
+
|
76193 |
|
76194 |
+
_this.frameUrl = props.frameUrl;
|
76195 |
+
_this.loading = props.loading;
|
76196 |
_this.state = {
|
76197 |
hasError: false,
|
76198 |
error: "",
|
76202 |
text: "DEFAULT DIALOG",
|
76203 |
video: null
|
76204 |
},
|
76205 |
+
buttonizerTour: null,
|
|
|
76206 |
|
76207 |
+
/* webpack-strip-block:removed */
|
76208 |
+
sessionExpired: false,
|
76209 |
+
devicePreview: "desktop"
|
76210 |
};
|
76211 |
_this.isUpdatingTimeout = null;
|
76212 |
document.body.classList.add("buttonizer-mobile-hide"); // Add favicon
|
76302 |
loaded: this.props.loading.loaded
|
76303 |
}), /*#__PURE__*/react.createElement(Bar, {
|
76304 |
loading: !this.props.loading.loaded
|
76305 |
+
}), window.buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(UrlBar, {
|
76306 |
+
loading: !this.props.loading.loaded || this.props.loading.showLoading
|
76307 |
+
}), !this.props.loading.showLoading && /*#__PURE__*/react.createElement("button", {
|
76308 |
className: "hide-bar-button",
|
76309 |
onClick: function onClick() {
|
76310 |
document.body.classList.toggle("hide-buttonizer-bar");
|
76314 |
}), /*#__PURE__*/react.createElement("i", {
|
76315 |
className: "fas fa-chevron-left"
|
76316 |
})), /*#__PURE__*/react.createElement("div", {
|
76317 |
+
className: (0,clsx_m/* default */.Z)("buttonizer-preview", !window.buttonizer_admin.is_stand_alone && "is-wp-version", this.state.devicePreview === "mobile" && "frame-size-mobile", this.state.devicePreview === "tablet" && "frame-size-tablet")
|
76318 |
}, this.state.showOutOfPreviewWarning && /*#__PURE__*/react.createElement(IframeOutbreak, null), /*#__PURE__*/react.createElement("iframe", {
|
76319 |
src: this.props.frameUrl,
|
76320 |
width: "100%",
|
76321 |
height: "100%",
|
76322 |
frameBorder: "0",
|
76323 |
+
className: (0,clsx_m/* default */.Z)((!this.props.loading.loaded || this.props.loading.showLoading) && "waitfor"),
|
76324 |
onLoad: function onLoad(e) {
|
76325 |
if (_this3.props.loading.loadingIframe && _this3.props.frameUrl !== "about:blank") {
|
76326 |
dashboard_store.dispatch(stopLoading());
|
76333 |
});
|
76334 |
}
|
76335 |
}
|
76336 |
+
}, "Your browser does somehow not support iframes. Please try a recent version of Google Chrome, FireFox or Microsoft Edge"))), /*#__PURE__*/react.createElement(Dialogs_SuperContributorDialog, {
|
|
|
|
|
76337 |
tour: this.state.buttonizerTour
|
76338 |
+
}), /*#__PURE__*/react.createElement(ChangelogDialog_ChangelogDialog, null), /*#__PURE__*/react.createElement(ButtonizerTour_ButtonizerTour, {
|
76339 |
+
tour: this.state.buttonizerTour,
|
76340 |
+
welcome: this.props.welcome || document.location.hash === "#/welcome-splash"
|
76341 |
}), /*#__PURE__*/react.createElement(PremiumDialog, {
|
76342 |
open: this.state.premiumDialog.open,
|
76343 |
text: this.state.premiumDialog.text,
|
76352 |
}
|
76353 |
});
|
76354 |
}
|
76355 |
+
}), permalinkError(), javascriptError(), window.buttonizer_admin.is_stand_alone && /*#__PURE__*/react.createElement(SessionExpiredDialog, {
|
76356 |
+
isOpened: this.state.sessionExpired
|
76357 |
+
})));
|
76358 |
}
|
76359 |
}, {
|
76360 |
key: "loadFontAwesome",
|
76423 |
value: function getSaver() {
|
76424 |
return this.buttonSaver;
|
76425 |
}
|
76426 |
+
}, {
|
76427 |
+
key: "setDevicePreview",
|
76428 |
+
value: function setDevicePreview(state) {
|
76429 |
+
this.setState({
|
76430 |
+
devicePreview: state
|
76431 |
+
});
|
76432 |
+
}
|
76433 |
}, {
|
76434 |
key: "getCurrentButtonizerTour",
|
76435 |
value: function getCurrentButtonizerTour() {
|
76475 |
}
|
76476 |
});
|
76477 |
}
|
76478 |
+
}, {
|
76479 |
+
key: "standAloneEvent",
|
76480 |
+
value: function standAloneEvent(eventType) {
|
76481 |
+
if (eventType === "unauthenticated") {
|
76482 |
+
return this.setState({
|
76483 |
+
sessionExpired: true
|
76484 |
+
});
|
76485 |
+
} else if (eventType === "userauthenticated") {
|
76486 |
+
return this.setState({
|
76487 |
+
sessionExpired: false
|
76488 |
+
});
|
76489 |
+
}
|
76490 |
+
}
|
76491 |
/**
|
76492 |
* Open a page on the dashboard when clicking on a button/group
|
76493 |
* @param {*} action
|
80886 |
/* global module */
|
80887 |
module.exports = {
|
80888 |
group: {
|
80889 |
+
height: 56,
|
80890 |
+
width: 56
|
|
|
80891 |
},
|
80892 |
button: {}
|
80893 |
};
|
80905 |
|
80906 |
/* global module */
|
80907 |
var button = {
|
80908 |
+
group_size: 56,
|
80909 |
+
button_size: 56,
|
80910 |
+
box_shadow_enabled: [false],
|
80911 |
+
label_box_shadow_enabled: [false],
|
80912 |
+
border_radius: ["0px"],
|
80913 |
+
label_spacing: 0,
|
80914 |
+
label_border_radius: ["0px"]
|
|
|
|
|
|
|
|
|
80915 |
};
|
80916 |
module.exports = {
|
80917 |
button: _objectSpread({}, button),
|
80918 |
group: _objectSpread(_objectSpread({}, button), {}, {
|
80919 |
+
label_same_width: true,
|
80920 |
+
label_same_height: true,
|
80921 |
+
space: 0
|
80922 |
+
})
|
|
|
|
|
|
|
|
|
80923 |
};
|
80924 |
|
80925 |
/***/ }),
|
80935 |
|
80936 |
/* global module */
|
80937 |
var button = {
|
80938 |
+
group_size: 56,
|
80939 |
+
button_size: 56,
|
80940 |
+
box_shadow_enabled: [false],
|
80941 |
+
label_box_shadow_enabled: [false],
|
80942 |
+
border_radius: ["0px"],
|
80943 |
+
label_spacing: 0,
|
80944 |
+
label_border_radius: ["0px"]
|
|
|
|
|
|
|
|
|
80945 |
};
|
80946 |
module.exports = {
|
80947 |
button: _objectSpread({}, button),
|
80948 |
group: _objectSpread(_objectSpread({}, button), {}, {
|
80949 |
show_label_desktop: "hover",
|
80950 |
+
show_label_mobile: "hide",
|
80951 |
+
label_same_height: true,
|
80952 |
+
space: 0
|
80953 |
+
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80954 |
};
|
80955 |
|
80956 |
/***/ }),
|
80964 |
var Square = __webpack_require__(78867);
|
80965 |
|
80966 |
var Rectangle = __webpack_require__(98588);
|
80967 |
+
/* webpack-strip-block:removed */
|
80968 |
|
|
|
|
|
|
|
80969 |
|
80970 |
module.exports = {
|
80971 |
"default": Default,
|
80972 |
square: Square,
|
80973 |
+
rectangle: Rectangle
|
80974 |
+
/* webpack-strip-block:removed */
|
80975 |
+
|
80976 |
};
|
80977 |
|
80978 |
/***/ }),
|
95450 |
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
95451 |
|
95452 |
/*!
|
95453 |
+
* Intro.js v4.3.0
|
95454 |
* https://introjs.com
|
95455 |
*
|
95456 |
* Copyright (C) 2012-2021 Afshin Mehrabani (@afshinmeh).
|
95457 |
* https://raw.githubusercontent.com/usablica/intro.js/master/license.md
|
95458 |
*
|
95459 |
+
* Date: Sat, 06 Nov 2021 14:22:05 GMT
|
95460 |
*/
|
95461 |
|
95462 |
(function (global, factory) {
|
95463 |
true ? module.exports = factory() :
|
95464 |
0;
|
95465 |
+
})(this, (function () { 'use strict';
|
95466 |
|
95467 |
function _typeof(obj) {
|
95468 |
"@babel/helpers - typeof";
|
95670 |
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
95671 |
});
|
95672 |
|
95673 |
+
var call$2 = Function.prototype.call;
|
95674 |
+
|
95675 |
+
var functionCall = call$2.bind ? call$2.bind(call$2) : function () {
|
95676 |
+
return call$2.apply(call$2, arguments);
|
95677 |
+
};
|
95678 |
+
|
95679 |
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
95680 |
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
95681 |
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
95703 |
};
|
95704 |
};
|
95705 |
|
95706 |
+
var FunctionPrototype$2 = Function.prototype;
|
95707 |
+
var bind$2 = FunctionPrototype$2.bind;
|
95708 |
+
var call$1 = FunctionPrototype$2.call;
|
95709 |
+
var callBind = bind$2 && bind$2.bind(call$1);
|
95710 |
+
|
95711 |
+
var functionUncurryThis = bind$2 ? function (fn) {
|
95712 |
+
return fn && callBind(call$1, fn);
|
95713 |
+
} : function (fn) {
|
95714 |
+
return fn && function () {
|
95715 |
+
return call$1.apply(fn, arguments);
|
95716 |
+
};
|
95717 |
+
};
|
95718 |
+
|
95719 |
+
var toString$1 = functionUncurryThis({}.toString);
|
95720 |
+
var stringSlice$5 = functionUncurryThis(''.slice);
|
95721 |
|
95722 |
var classofRaw = function (it) {
|
95723 |
+
return stringSlice$5(toString$1(it), 8, -1);
|
95724 |
};
|
95725 |
|
95726 |
+
var Object$4 = global_1.Object;
|
95727 |
+
var split = functionUncurryThis(''.split);
|
95728 |
|
95729 |
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
95730 |
var indexedObject = fails(function () {
|
95731 |
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
95732 |
// eslint-disable-next-line no-prototype-builtins -- safe
|
95733 |
+
return !Object$4('z').propertyIsEnumerable(0);
|
95734 |
}) ? function (it) {
|
95735 |
+
return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
|
95736 |
+
} : Object$4;
|
95737 |
+
|
95738 |
+
var TypeError$c = global_1.TypeError;
|
95739 |
|
95740 |
// `RequireObjectCoercible` abstract operation
|
95741 |
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
95742 |
var requireObjectCoercible = function (it) {
|
95743 |
+
if (it == undefined) throw TypeError$c("Can't call method on " + it);
|
95744 |
return it;
|
95745 |
};
|
95746 |
|
95752 |
return indexedObject(requireObjectCoercible(it));
|
95753 |
};
|
95754 |
|
95755 |
+
// `IsCallable` abstract operation
|
95756 |
+
// https://tc39.es/ecma262/#sec-iscallable
|
95757 |
+
var isCallable = function (argument) {
|
95758 |
+
return typeof argument == 'function';
|
95759 |
+
};
|
95760 |
+
|
95761 |
var isObject = function (it) {
|
95762 |
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
95763 |
};
|
95764 |
|
95765 |
+
var aFunction = function (argument) {
|
95766 |
+
return isCallable(argument) ? argument : undefined;
|
95767 |
};
|
95768 |
|
95769 |
var getBuiltIn = function (namespace, method) {
|
95770 |
+
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
95771 |
};
|
95772 |
|
95773 |
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
95774 |
+
|
95775 |
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
95776 |
|
95777 |
var process = global_1.process;
|
95782 |
|
95783 |
if (v8) {
|
95784 |
match = v8.split('.');
|
95785 |
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
95786 |
+
// but their correct versions are not interesting for us
|
95787 |
+
version$1 = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
95788 |
+
}
|
95789 |
+
|
95790 |
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
95791 |
+
// so check `userAgent` even if `.v8` exists, but 0
|
95792 |
+
if (!version$1 && engineUserAgent) {
|
95793 |
match = engineUserAgent.match(/Edge\/(\d+)/);
|
95794 |
if (!match || match[1] >= 74) {
|
95795 |
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
95796 |
+
if (match) version$1 = +match[1];
|
95797 |
}
|
95798 |
}
|
95799 |
|
95800 |
+
var engineV8Version = version$1;
|
95801 |
|
95802 |
/* eslint-disable es/no-symbol -- required for testing */
|
95803 |
|
95820 |
&& !Symbol.sham
|
95821 |
&& typeof Symbol.iterator == 'symbol';
|
95822 |
|
95823 |
+
var Object$3 = global_1.Object;
|
95824 |
+
|
95825 |
var isSymbol = useSymbolAsUid ? function (it) {
|
95826 |
return typeof it == 'symbol';
|
95827 |
} : function (it) {
|
95828 |
var $Symbol = getBuiltIn('Symbol');
|
95829 |
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
|
95830 |
+
};
|
95831 |
+
|
95832 |
+
var String$3 = global_1.String;
|
95833 |
+
|
95834 |
+
var tryToString = function (argument) {
|
95835 |
+
try {
|
95836 |
+
return String$3(argument);
|
95837 |
+
} catch (error) {
|
95838 |
+
return 'Object';
|
95839 |
+
}
|
95840 |
};
|
95841 |
|
95842 |
+
var TypeError$b = global_1.TypeError;
|
95843 |
+
|
95844 |
+
// `Assert: IsCallable(argument) is true`
|
95845 |
+
var aCallable = function (argument) {
|
95846 |
+
if (isCallable(argument)) return argument;
|
95847 |
+
throw TypeError$b(tryToString(argument) + ' is not a function');
|
95848 |
+
};
|
95849 |
+
|
95850 |
+
// `GetMethod` abstract operation
|
95851 |
+
// https://tc39.es/ecma262/#sec-getmethod
|
95852 |
+
var getMethod = function (V, P) {
|
95853 |
+
var func = V[P];
|
95854 |
+
return func == null ? undefined : aCallable(func);
|
95855 |
+
};
|
95856 |
+
|
95857 |
+
var TypeError$a = global_1.TypeError;
|
95858 |
+
|
95859 |
// `OrdinaryToPrimitive` abstract operation
|
95860 |
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
95861 |
var ordinaryToPrimitive = function (input, pref) {
|
95862 |
var fn, val;
|
95863 |
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
95864 |
+
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
95865 |
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
95866 |
+
throw TypeError$a("Can't convert object to primitive value");
|
95867 |
};
|
95868 |
|
95869 |
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
95870 |
+
var defineProperty$1 = Object.defineProperty;
|
95871 |
+
|
95872 |
var setGlobal = function (key, value) {
|
95873 |
try {
|
95874 |
+
defineProperty$1(global_1, key, { value: value, configurable: true, writable: true });
|
|
|
95875 |
} catch (error) {
|
95876 |
global_1[key] = value;
|
95877 |
} return value;
|
95886 |
(module.exports = function (key, value) {
|
95887 |
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
95888 |
})('versions', []).push({
|
95889 |
+
version: '3.19.1',
|
95890 |
mode: 'global',
|
95891 |
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
95892 |
});
|
95893 |
});
|
95894 |
|
95895 |
+
var Object$2 = global_1.Object;
|
95896 |
+
|
95897 |
// `ToObject` abstract operation
|
95898 |
// https://tc39.es/ecma262/#sec-toobject
|
95899 |
var toObject = function (argument) {
|
95900 |
+
return Object$2(requireObjectCoercible(argument));
|
95901 |
};
|
95902 |
|
95903 |
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
95904 |
|
95905 |
+
// `HasOwnProperty` abstract operation
|
95906 |
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
95907 |
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
95908 |
+
return hasOwnProperty(toObject(it), key);
|
95909 |
};
|
95910 |
|
95911 |
var id = 0;
|
95912 |
var postfix = Math.random();
|
95913 |
+
var toString = functionUncurryThis(1.0.toString);
|
95914 |
|
95915 |
var uid = function (key) {
|
95916 |
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
95917 |
};
|
95918 |
|
95919 |
var WellKnownSymbolsStore = shared('wks');
|
95920 |
var Symbol$1 = global_1.Symbol;
|
95921 |
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
95922 |
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
95923 |
|
95924 |
var wellKnownSymbol = function (name) {
|
95925 |
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
95926 |
+
var description = 'Symbol.' + name;
|
95927 |
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
95928 |
WellKnownSymbolsStore[name] = Symbol$1[name];
|
95929 |
+
} else if (useSymbolAsUid && symbolFor) {
|
95930 |
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
95931 |
} else {
|
95932 |
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
95933 |
}
|
95934 |
} return WellKnownSymbolsStore[name];
|
95935 |
};
|
95936 |
|
95937 |
+
var TypeError$9 = global_1.TypeError;
|
95938 |
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
95939 |
|
95940 |
// `ToPrimitive` abstract operation
|
95941 |
// https://tc39.es/ecma262/#sec-toprimitive
|
95942 |
var toPrimitive = function (input, pref) {
|
95943 |
if (!isObject(input) || isSymbol(input)) return input;
|
95944 |
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
95945 |
var result;
|
95946 |
+
if (exoticToPrim) {
|
95947 |
if (pref === undefined) pref = 'default';
|
95948 |
+
result = functionCall(exoticToPrim, input, pref);
|
95949 |
if (!isObject(result) || isSymbol(result)) return result;
|
95950 |
+
throw TypeError$9("Can't convert object to primitive value");
|
95951 |
}
|
95952 |
if (pref === undefined) pref = 'number';
|
95953 |
return ordinaryToPrimitive(input, pref);
|
95957 |
// https://tc39.es/ecma262/#sec-topropertykey
|
95958 |
var toPropertyKey = function (argument) {
|
95959 |
var key = toPrimitive(argument, 'string');
|
95960 |
+
return isSymbol(key) ? key : key + '';
|
95961 |
};
|
95962 |
|
95963 |
var document$1 = global_1.document;
|
95964 |
// typeof document.createElement is 'object' in old IE
|
95965 |
+
var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
|
95966 |
|
95967 |
var documentCreateElement = function (it) {
|
95968 |
+
return EXISTS$1 ? document$1.createElement(it) : {};
|
95969 |
};
|
95970 |
|
95971 |
// Thank's IE8 for his funny defineProperty
|
95987 |
if (ie8DomDefine) try {
|
95988 |
return $getOwnPropertyDescriptor(O, P);
|
95989 |
} catch (error) { /* empty */ }
|
95990 |
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
95991 |
};
|
95992 |
|
95993 |
var objectGetOwnPropertyDescriptor = {
|
95994 |
f: f$3
|
95995 |
};
|
95996 |
|
95997 |
+
var String$2 = global_1.String;
|
95998 |
+
var TypeError$8 = global_1.TypeError;
|
95999 |
+
|
96000 |
+
// `Assert: Type(argument) is Object`
|
96001 |
+
var anObject = function (argument) {
|
96002 |
+
if (isObject(argument)) return argument;
|
96003 |
+
throw TypeError$8(String$2(argument) + ' is not an object');
|
96004 |
};
|
96005 |
|
96006 |
+
var TypeError$7 = global_1.TypeError;
|
96007 |
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
96008 |
var $defineProperty = Object.defineProperty;
|
96009 |
|
96016 |
if (ie8DomDefine) try {
|
96017 |
return $defineProperty(O, P, Attributes);
|
96018 |
} catch (error) { /* empty */ }
|
96019 |
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$7('Accessors not supported');
|
96020 |
if ('value' in Attributes) O[P] = Attributes.value;
|
96021 |
return O;
|
96022 |
};
|
96032 |
return object;
|
96033 |
};
|
96034 |
|
96035 |
+
var functionToString = functionUncurryThis(Function.toString);
|
96036 |
|
96037 |
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
96038 |
+
if (!isCallable(sharedStore.inspectSource)) {
|
96039 |
sharedStore.inspectSource = function (it) {
|
96040 |
+
return functionToString(it);
|
96041 |
};
|
96042 |
}
|
96043 |
|
96045 |
|
96046 |
var WeakMap$1 = global_1.WeakMap;
|
96047 |
|
96048 |
+
var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
|
96049 |
|
96050 |
var keys = shared('keys');
|
96051 |
|
96056 |
var hiddenKeys$1 = {};
|
96057 |
|
96058 |
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
96059 |
+
var TypeError$6 = global_1.TypeError;
|
96060 |
var WeakMap = global_1.WeakMap;
|
96061 |
var set, get, has;
|
96062 |
|
96068 |
return function (it) {
|
96069 |
var state;
|
96070 |
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
96071 |
+
throw TypeError$6('Incompatible receiver, ' + TYPE + ' required');
|
96072 |
} return state;
|
96073 |
};
|
96074 |
};
|
96075 |
|
96076 |
if (nativeWeakMap || sharedStore.state) {
|
96077 |
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
96078 |
+
var wmget = functionUncurryThis(store.get);
|
96079 |
+
var wmhas = functionUncurryThis(store.has);
|
96080 |
+
var wmset = functionUncurryThis(store.set);
|
96081 |
set = function (it, metadata) {
|
96082 |
+
if (wmhas(store, it)) throw new TypeError$6(OBJECT_ALREADY_INITIALIZED);
|
96083 |
metadata.facade = it;
|
96084 |
+
wmset(store, it, metadata);
|
96085 |
return metadata;
|
96086 |
};
|
96087 |
get = function (it) {
|
96088 |
+
return wmget(store, it) || {};
|
96089 |
};
|
96090 |
has = function (it) {
|
96091 |
+
return wmhas(store, it);
|
96092 |
};
|
96093 |
} else {
|
96094 |
var STATE = sharedKey('state');
|
96095 |
hiddenKeys$1[STATE] = true;
|
96096 |
set = function (it, metadata) {
|
96097 |
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$6(OBJECT_ALREADY_INITIALIZED);
|
96098 |
metadata.facade = it;
|
96099 |
createNonEnumerableProperty(it, STATE, metadata);
|
96100 |
return metadata;
|
96101 |
};
|
96102 |
get = function (it) {
|
96103 |
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
96104 |
};
|
96105 |
has = function (it) {
|
96106 |
+
return hasOwnProperty_1(it, STATE);
|
96107 |
};
|
96108 |
}
|
96109 |
|
96115 |
getterFor: getterFor
|
96116 |
};
|
96117 |
|
96118 |
+
var FunctionPrototype$1 = Function.prototype;
|
96119 |
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
96120 |
+
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
96121 |
+
|
96122 |
+
var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
96123 |
+
// additional protection from minified / mangled / dropped function names
|
96124 |
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
96125 |
+
var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
96126 |
+
|
96127 |
+
var functionName = {
|
96128 |
+
EXISTS: EXISTS,
|
96129 |
+
PROPER: PROPER,
|
96130 |
+
CONFIGURABLE: CONFIGURABLE
|
96131 |
+
};
|
96132 |
+
|
96133 |
var redefine = createCommonjsModule(function (module) {
|
96134 |
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
96135 |
+
|
96136 |
var getInternalState = internalState.get;
|
96137 |
var enforceInternalState = internalState.enforce;
|
96138 |
var TEMPLATE = String(String).split('String');
|
96141 |
var unsafe = options ? !!options.unsafe : false;
|
96142 |
var simple = options ? !!options.enumerable : false;
|
96143 |
var noTargetGet = options ? !!options.noTargetGet : false;
|
96144 |
+
var name = options && options.name !== undefined ? options.name : key;
|
96145 |
var state;
|
96146 |
+
if (isCallable(value)) {
|
96147 |
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
96148 |
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
96149 |
+
}
|
96150 |
+
if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
96151 |
+
createNonEnumerableProperty(value, 'name', name);
|
96152 |
}
|
96153 |
state = enforceInternalState(value);
|
96154 |
if (!state.source) {
|
96155 |
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
96156 |
}
|
96157 |
}
|
96158 |
if (O === global_1) {
|
96168 |
else createNonEnumerableProperty(O, key, value);
|
96169 |
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
96170 |
})(Function.prototype, 'toString', function toString() {
|
96171 |
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
96172 |
});
|
96173 |
});
|
96174 |
|
96175 |
var ceil = Math.ceil;
|
96176 |
var floor$2 = Math.floor;
|
96177 |
|
96178 |
+
// `ToIntegerOrInfinity` abstract operation
|
96179 |
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
96180 |
+
var toIntegerOrInfinity = function (argument) {
|
96181 |
+
var number = +argument;
|
96182 |
+
// eslint-disable-next-line no-self-compare -- safe
|
96183 |
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor$2 : ceil)(number);
|
96184 |
};
|
96185 |
|
96186 |
+
var max$3 = Math.max;
|
96187 |
var min$4 = Math.min;
|
96188 |
|
96189 |
+
// Helper for a popular repeating case of the spec:
|
96190 |
+
// Let integer be ? ToInteger(index).
|
96191 |
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
96192 |
+
var toAbsoluteIndex = function (index, length) {
|
96193 |
+
var integer = toIntegerOrInfinity(index);
|
96194 |
+
return integer < 0 ? max$3(integer + length, 0) : min$4(integer, length);
|
96195 |
+
};
|
96196 |
+
|
96197 |
+
var min$3 = Math.min;
|
96198 |
+
|
96199 |
// `ToLength` abstract operation
|
96200 |
// https://tc39.es/ecma262/#sec-tolength
|
96201 |
var toLength = function (argument) {
|
96202 |
+
return argument > 0 ? min$3(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
96203 |
};
|
96204 |
|
96205 |
+
// `LengthOfArrayLike` abstract operation
|
96206 |
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
96207 |
+
var lengthOfArrayLike = function (obj) {
|
96208 |
+
return toLength(obj.length);
|
|
|
|
|
|
|
|
|
|
|
96209 |
};
|
96210 |
|
96211 |
// `Array.prototype.{ indexOf, includes }` methods implementation
|
96212 |
var createMethod$2 = function (IS_INCLUDES) {
|
96213 |
return function ($this, el, fromIndex) {
|
96214 |
var O = toIndexedObject($this);
|
96215 |
+
var length = lengthOfArrayLike(O);
|
96216 |
var index = toAbsoluteIndex(fromIndex, length);
|
96217 |
var value;
|
96218 |
// Array#includes uses SameValueZero equality algorithm
|
96237 |
indexOf: createMethod$2(false)
|
96238 |
};
|
96239 |
|
96240 |
+
var indexOf$1 = arrayIncludes.indexOf;
|
96241 |
|
96242 |
|
96243 |
+
var push$4 = functionUncurryThis([].push);
|
96244 |
+
|
96245 |
var objectKeysInternal = function (object, names) {
|
96246 |
var O = toIndexedObject(object);
|
96247 |
var i = 0;
|
96248 |
var result = [];
|
96249 |
var key;
|
96250 |
+
for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$4(result, key);
|
96251 |
// Don't enum bug & hidden keys
|
96252 |
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
96253 |
+
~indexOf$1(result, key) || push$4(result, key);
|
96254 |
}
|
96255 |
return result;
|
96256 |
};
|
96286 |
f: f
|
96287 |
};
|
96288 |
|
96289 |
+
var concat$2 = functionUncurryThis([].concat);
|
96290 |
+
|
96291 |
// all object keys, includes non-enumerable and symbols
|
96292 |
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
96293 |
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
96294 |
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
96295 |
+
return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
|
96296 |
};
|
96297 |
|
96298 |
var copyConstructorProperties = function (target, source) {
|
96301 |
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
96302 |
for (var i = 0; i < keys.length; i++) {
|
96303 |
var key = keys[i];
|
96304 |
+
if (!hasOwnProperty_1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
96305 |
}
|
96306 |
};
|
96307 |
|
96311 |
var value = data[normalize(feature)];
|
96312 |
return value == POLYFILL ? true
|
96313 |
: value == NATIVE ? false
|
96314 |
+
: isCallable(detection) ? fails(detection)
|
96315 |
: !!detection;
|
96316 |
};
|
96317 |
|
96345 |
options.sham - add a flag to not completely full polyfills
|
96346 |
options.enumerable - export as enumerable property
|
96347 |
options.noTargetGet - prevent calling a getter on target
|
96348 |
+
options.name - the .name of the function if it does not match the key
|
96349 |
*/
|
96350 |
var _export = function (options, source) {
|
96351 |
var TARGET = options.target;
|
96368 |
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
96369 |
// contained in target
|
96370 |
if (!FORCED && targetProperty !== undefined) {
|
96371 |
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
96372 |
copyConstructorProperties(sourceProperty, targetProperty);
|
96373 |
}
|
96374 |
// add a flag to not completely full polyfills
|
96380 |
}
|
96381 |
};
|
96382 |
|
96383 |
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
96384 |
+
var test$1 = {};
|
96385 |
+
|
96386 |
+
test$1[TO_STRING_TAG$1] = 'z';
|
96387 |
+
|
96388 |
+
var toStringTagSupport = String(test$1) === '[object z]';
|
96389 |
+
|
96390 |
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
96391 |
+
var Object$1 = global_1.Object;
|
96392 |
+
|
96393 |
+
// ES3 wrong here
|
96394 |
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
96395 |
+
|
96396 |
+
// fallback for IE11 Script Access Denied error
|
96397 |
+
var tryGet = function (it, key) {
|
96398 |
+
try {
|
96399 |
+
return it[key];
|
96400 |
+
} catch (error) { /* empty */ }
|
96401 |
+
};
|
96402 |
+
|
96403 |
+
// getting tag from ES6+ `Object.prototype.toString`
|
96404 |
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
96405 |
+
var O, tag, result;
|
96406 |
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
96407 |
+
// @@toStringTag case
|
96408 |
+
: typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
|
96409 |
+
// builtinTag case
|
96410 |
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
96411 |
+
// ES3 arguments fallback
|
96412 |
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
96413 |
+
};
|
96414 |
+
|
96415 |
+
var String$1 = global_1.String;
|
96416 |
+
|
96417 |
var toString_1 = function (argument) {
|
96418 |
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
96419 |
+
return String$1(argument);
|
96420 |
};
|
96421 |
|
96422 |
// `RegExp.prototype.flags` getter implementation
|
96433 |
return result;
|
96434 |
};
|
96435 |
|
96436 |
+
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
96437 |
+
var $RegExp$2 = global_1.RegExp;
|
|
|
|
|
96438 |
|
96439 |
var UNSUPPORTED_Y$2 = fails(function () {
|
96440 |
+
var re = $RegExp$2('a', 'y');
|
96441 |
re.lastIndex = 2;
|
96442 |
return re.exec('abcd') != null;
|
96443 |
});
|
96444 |
|
96445 |
var BROKEN_CARET = fails(function () {
|
96446 |
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
96447 |
+
var re = $RegExp$2('^r', 'gy');
|
96448 |
re.lastIndex = 2;
|
96449 |
return re.exec('str') != null;
|
96450 |
});
|
96466 |
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
96467 |
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
96468 |
anObject(O);
|
96469 |
+
var props = toIndexedObject(Properties);
|
96470 |
var keys = objectKeys(Properties);
|
96471 |
var length = keys.length;
|
96472 |
var index = 0;
|
96473 |
var key;
|
96474 |
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
96475 |
return O;
|
96476 |
};
|
96477 |
|
96513 |
var iframe = documentCreateElement('iframe');
|
96514 |
var JS = 'java' + SCRIPT + ':';
|
96515 |
var iframeDocument;
|
96516 |
+
iframe.style.display = 'none';
|
96517 |
+
html.appendChild(iframe);
|
96518 |
+
// https://github.com/zloirock/core-js/issues/475
|
96519 |
+
iframe.src = String(JS);
|
96520 |
+
iframeDocument = iframe.contentWindow.document;
|
96521 |
+
iframeDocument.open();
|
96522 |
+
iframeDocument.write(scriptTag('document.F=Object'));
|
96523 |
+
iframeDocument.close();
|
96524 |
+
return iframeDocument.F;
|
|
|
|
|
96525 |
};
|
96526 |
|
96527 |
// Check for document.domain and active x support
|
96534 |
try {
|
96535 |
activeXDocument = new ActiveXObject('htmlfile');
|
96536 |
} catch (error) { /* ignore */ }
|
96537 |
+
NullProtoObject = typeof document != 'undefined'
|
96538 |
+
? document.domain && activeXDocument
|
96539 |
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
96540 |
+
: NullProtoObjectViaIFrame()
|
96541 |
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
96542 |
var length = enumBugKeys.length;
|
96543 |
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
96544 |
return NullProtoObject();
|
96560 |
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
96561 |
};
|
96562 |
|
96563 |
+
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
96564 |
+
var $RegExp$1 = global_1.RegExp;
|
96565 |
+
|
96566 |
var regexpUnsupportedDotAll = fails(function () {
|
96567 |
+
var re = $RegExp$1('.', 's');
|
|
|
96568 |
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
96569 |
});
|
96570 |
|
96571 |
+
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
96572 |
+
var $RegExp = global_1.RegExp;
|
96573 |
+
|
96574 |
var regexpUnsupportedNcg = fails(function () {
|
96575 |
+
var re = $RegExp('(?<a>b)', 'g');
|
|
|
96576 |
return re.exec('b').groups.a !== 'b' ||
|
96577 |
'b'.replace(re, '$<a>c') !== 'bc';
|
96578 |
});
|
96579 |
|
96580 |
+
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
96581 |
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
96582 |
|
96583 |
|
96584 |
|
96585 |
|
96586 |
|
96587 |
+
|
96588 |
+
|
96589 |
var getInternalState = internalState.get;
|
96590 |
|
96591 |
|
96592 |
|
|
|
96593 |
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
96594 |
+
var nativeExec = RegExp.prototype.exec;
|
96595 |
var patchedExec = nativeExec;
|
96596 |
+
var charAt$3 = functionUncurryThis(''.charAt);
|
96597 |
+
var indexOf = functionUncurryThis(''.indexOf);
|
96598 |
+
var replace$1 = functionUncurryThis(''.replace);
|
96599 |
+
var stringSlice$4 = functionUncurryThis(''.slice);
|
96600 |
|
96601 |
var UPDATES_LAST_INDEX_WRONG = (function () {
|
96602 |
var re1 = /a/;
|
96603 |
var re2 = /b*/g;
|
96604 |
+
functionCall(nativeExec, re1, 'a');
|
96605 |
+
functionCall(nativeExec, re2, 'a');
|
96606 |
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
96607 |
})();
|
96608 |
|
96624 |
|
96625 |
if (raw) {
|
96626 |
raw.lastIndex = re.lastIndex;
|
96627 |
+
result = functionCall(patchedExec, raw, str);
|
96628 |
re.lastIndex = raw.lastIndex;
|
96629 |
return result;
|
96630 |
}
|
96631 |
|
96632 |
var groups = state.groups;
|
96633 |
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
96634 |
+
var flags = functionCall(regexpFlags, re);
|
96635 |
var source = re.source;
|
96636 |
var charsAdded = 0;
|
96637 |
var strCopy = str;
|
96638 |
|
96639 |
if (sticky) {
|
96640 |
+
flags = replace$1(flags, 'y', '');
|
96641 |
+
if (indexOf(flags, 'g') === -1) {
|
96642 |
flags += 'g';
|
96643 |
}
|
96644 |
|
96645 |
+
strCopy = stringSlice$4(str, re.lastIndex);
|
96646 |
// Support anchored sticky behavior.
|
96647 |
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
|
96648 |
source = '(?: ' + source + ')';
|
96649 |
strCopy = ' ' + strCopy;
|
96650 |
charsAdded++;
|
96659 |
}
|
96660 |
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
96661 |
|
96662 |
+
match = functionCall(nativeExec, sticky ? reCopy : re, strCopy);
|
96663 |
|
96664 |
if (sticky) {
|
96665 |
if (match) {
|
96666 |
+
match.input = stringSlice$4(match.input, charsAdded);
|
96667 |
+
match[0] = stringSlice$4(match[0], charsAdded);
|
96668 |
match.index = re.lastIndex;
|
96669 |
re.lastIndex += match[0].length;
|
96670 |
} else re.lastIndex = 0;
|
96674 |
if (NPCG_INCLUDED && match && match.length > 1) {
|
96675 |
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
96676 |
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
96677 |
+
functionCall(nativeReplace, match[0], reCopy, function () {
|
96678 |
for (i = 1; i < arguments.length - 2; i++) {
|
96679 |
if (arguments[i] === undefined) match[i] = undefined;
|
96680 |
}
|
96709 |
|
96710 |
|
96711 |
|
96712 |
+
|
96713 |
var SPECIES$4 = wellKnownSymbol('species');
|
96714 |
var RegExpPrototype$1 = RegExp.prototype;
|
96715 |
|
96752 |
!DELEGATES_TO_EXEC ||
|
96753 |
FORCED
|
96754 |
) {
|
96755 |
+
var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]);
|
96756 |
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
96757 |
+
var uncurriedNativeMethod = functionUncurryThis(nativeMethod);
|
96758 |
var $exec = regexp.exec;
|
96759 |
if ($exec === regexpExec || $exec === RegExpPrototype$1.exec) {
|
96760 |
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
96761 |
// The native String method already delegates to @@method (this
|
96762 |
// polyfilled function), leasing to infinite recursion.
|
96763 |
// We avoid it by directly calling the native @@method method.
|
96764 |
+
return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
|
96765 |
}
|
96766 |
+
return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
|
96767 |
}
|
96768 |
return { done: false };
|
96769 |
});
|
96775 |
if (SHAM) createNonEnumerableProperty(RegExpPrototype$1[SYMBOL], 'sham', true);
|
96776 |
};
|
96777 |
|
96778 |
+
var charAt$2 = functionUncurryThis(''.charAt);
|
96779 |
+
var charCodeAt = functionUncurryThis(''.charCodeAt);
|
96780 |
+
var stringSlice$3 = functionUncurryThis(''.slice);
|
96781 |
+
|
96782 |
var createMethod$1 = function (CONVERT_TO_STRING) {
|
96783 |
return function ($this, pos) {
|
96784 |
var S = toString_1(requireObjectCoercible($this));
|
96785 |
+
var position = toIntegerOrInfinity(pos);
|
96786 |
var size = S.length;
|
96787 |
var first, second;
|
96788 |
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
96789 |
+
first = charCodeAt(S, position);
|
96790 |
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
96791 |
+
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
96792 |
+
? CONVERT_TO_STRING
|
96793 |
+
? charAt$2(S, position)
|
96794 |
+
: first
|
96795 |
+
: CONVERT_TO_STRING
|
96796 |
+
? stringSlice$3(S, position, position + 2)
|
96797 |
+
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
96798 |
};
|
96799 |
};
|
96800 |
|
96807 |
charAt: createMethod$1(true)
|
96808 |
};
|
96809 |
|
96810 |
+
var charAt$1 = stringMultibyte.charAt;
|
96811 |
|
96812 |
// `AdvanceStringIndex` abstract operation
|
96813 |
// https://tc39.es/ecma262/#sec-advancestringindex
|
96814 |
var advanceStringIndex = function (S, index, unicode) {
|
96815 |
+
return index + (unicode ? charAt$1(S, index).length : 1);
|
96816 |
};
|
96817 |
|
96818 |
+
var TypeError$5 = global_1.TypeError;
|
96819 |
+
|
96820 |
// `RegExpExec` abstract operation
|
96821 |
// https://tc39.es/ecma262/#sec-regexpexec
|
96822 |
var regexpExecAbstract = function (R, S) {
|
96823 |
var exec = R.exec;
|
96824 |
+
if (isCallable(exec)) {
|
96825 |
+
var result = functionCall(exec, R, S);
|
96826 |
+
if (result !== null) anObject(result);
|
|
|
|
|
96827 |
return result;
|
96828 |
}
|
96829 |
+
if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
|
96830 |
+
throw TypeError$5('RegExp#exec called on incompatible receiver');
|
|
|
|
|
|
|
|
|
96831 |
};
|
96832 |
|
96833 |
// @@match logic
|
96837 |
// https://tc39.es/ecma262/#sec-string.prototype.match
|
96838 |
function match(regexp) {
|
96839 |
var O = requireObjectCoercible(this);
|
96840 |
+
var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH);
|
96841 |
+
return matcher ? functionCall(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString_1(O));
|
96842 |
},
|
96843 |
// `RegExp.prototype[@@match]` method
|
96844 |
// https://tc39.es/ecma262/#sec-regexp.prototype-@@match
|
96870 |
// `IsArray` abstract operation
|
96871 |
// https://tc39.es/ecma262/#sec-isarray
|
96872 |
// eslint-disable-next-line es/no-array-isarray -- safe
|
96873 |
+
var isArray = Array.isArray || function isArray(argument) {
|
96874 |
+
return classofRaw(argument) == 'Array';
|
96875 |
};
|
96876 |
|
96877 |
var createProperty = function (object, key, value) {
|
96880 |
else object[propertyKey] = value;
|
96881 |
};
|
96882 |
|
96883 |
+
var noop = function () { /* empty */ };
|
96884 |
+
var empty = [];
|
96885 |
+
var construct = getBuiltIn('Reflect', 'construct');
|
96886 |
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
96887 |
+
var exec$1 = functionUncurryThis(constructorRegExp.exec);
|
96888 |
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
96889 |
+
|
96890 |
+
var isConstructorModern = function (argument) {
|
96891 |
+
if (!isCallable(argument)) return false;
|
96892 |
+
try {
|
96893 |
+
construct(noop, empty, argument);
|
96894 |
+
return true;
|
96895 |
+
} catch (error) {
|
96896 |
+
return false;
|
96897 |
+
}
|
96898 |
+
};
|
96899 |
+
|
96900 |
+
var isConstructorLegacy = function (argument) {
|
96901 |
+
if (!isCallable(argument)) return false;
|
96902 |
+
switch (classof(argument)) {
|
96903 |
+
case 'AsyncFunction':
|
96904 |
+
case 'GeneratorFunction':
|
96905 |
+
case 'AsyncGeneratorFunction': return false;
|
96906 |
+
// we can't check .prototype since constructors produced by .bind haven't it
|
96907 |
+
} return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
|
96908 |
+
};
|
96909 |
+
|
96910 |
+
// `IsConstructor` abstract operation
|
96911 |
+
// https://tc39.es/ecma262/#sec-isconstructor
|
96912 |
+
var isConstructor = !construct || fails(function () {
|
96913 |
+
var called;
|
96914 |
+
return isConstructorModern(isConstructorModern.call)
|
96915 |
+
|| !isConstructorModern(Object)
|
96916 |
+
|| !isConstructorModern(function () { called = true; })
|
96917 |
+
|| called;
|
96918 |
+
}) ? isConstructorLegacy : isConstructorModern;
|
96919 |
+
|
96920 |
var SPECIES$3 = wellKnownSymbol('species');
|
96921 |
+
var Array$2 = global_1.Array;
|
96922 |
|
96923 |
// a part of `ArraySpeciesCreate` abstract operation
|
96924 |
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
96927 |
if (isArray(originalArray)) {
|
96928 |
C = originalArray.constructor;
|
96929 |
// cross-realm fallback
|
96930 |
+
if (isConstructor(C) && (C === Array$2 || isArray(C.prototype))) C = undefined;
|
96931 |
else if (isObject(C)) {
|
96932 |
C = C[SPECIES$3];
|
96933 |
if (C === null) C = undefined;
|
96934 |
}
|
96935 |
+
} return C === undefined ? Array$2 : C;
|
96936 |
};
|
96937 |
|
96938 |
// `ArraySpeciesCreate` abstract operation
|
96960 |
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
96961 |
var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
|
96962 |
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
96963 |
+
var TypeError$4 = global_1.TypeError;
|
96964 |
|
96965 |
// We can't use this feature detection in V8 since it causes
|
96966 |
// deoptimization and serious performance degradation
|
96994 |
for (i = -1, length = arguments.length; i < length; i++) {
|
96995 |
E = i === -1 ? O : arguments[i];
|
96996 |
if (isConcatSpreadable(E)) {
|
96997 |
+
len = lengthOfArrayLike(E);
|
96998 |
+
if (n + len > MAX_SAFE_INTEGER$1) throw TypeError$4(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
96999 |
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
97000 |
} else {
|
97001 |
+
if (n >= MAX_SAFE_INTEGER$1) throw TypeError$4(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
97002 |
createProperty(A, n++, E);
|
97003 |
}
|
97004 |
}
|
97007 |
}
|
97008 |
});
|
97009 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97010 |
// `Object.prototype.toString` method implementation
|
97011 |
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
97012 |
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
97019 |
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
|
97020 |
}
|
97021 |
|
97022 |
+
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
97023 |
+
|
97024 |
+
|
97025 |
+
|
97026 |
+
|
97027 |
+
|
97028 |
+
|
97029 |
+
|
97030 |
var TO_STRING = 'toString';
|
97031 |
var RegExpPrototype = RegExp.prototype;
|
97032 |
+
var n$ToString = RegExpPrototype[TO_STRING];
|
97033 |
+
var getFlags = functionUncurryThis(regexpFlags);
|
97034 |
|
97035 |
+
var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
97036 |
// FF44- RegExp#toString has a wrong name
|
97037 |
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
|
97038 |
|
97039 |
// `RegExp.prototype.toString` method
|
97040 |
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
97043 |
var R = anObject(this);
|
97044 |
var p = toString_1(R.source);
|
97045 |
var rf = R.flags;
|
97046 |
+
var f = toString_1(rf === undefined && objectIsPrototypeOf(RegExpPrototype, R) && !('flags' in RegExpPrototype) ? getFlags(R) : rf);
|
97047 |
return '/' + p + '/' + f;
|
97048 |
}, { unsafe: true });
|
97049 |
}
|
97050 |
|
97051 |
+
var FunctionPrototype = Function.prototype;
|
97052 |
+
var apply = FunctionPrototype.apply;
|
97053 |
+
var bind$1 = FunctionPrototype.bind;
|
97054 |
+
var call = FunctionPrototype.call;
|
97055 |
+
|
97056 |
+
// eslint-disable-next-line es/no-reflect -- safe
|
97057 |
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (bind$1 ? call.bind(apply) : function () {
|
97058 |
+
return call.apply(apply, arguments);
|
97059 |
+
});
|
97060 |
+
|
97061 |
var MATCH$1 = wellKnownSymbol('match');
|
97062 |
|
97063 |
// `IsRegExp` abstract operation
|
97067 |
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
97068 |
};
|
97069 |
|
97070 |
+
var TypeError$3 = global_1.TypeError;
|
97071 |
+
|
97072 |
+
// `Assert: IsConstructor(argument) is true`
|
97073 |
+
var aConstructor = function (argument) {
|
97074 |
+
if (isConstructor(argument)) return argument;
|
97075 |
+
throw TypeError$3(tryToString(argument) + ' is not a constructor');
|
97076 |
};
|
97077 |
|
97078 |
var SPECIES$1 = wellKnownSymbol('species');
|
97082 |
var speciesConstructor = function (O, defaultConstructor) {
|
97083 |
var C = anObject(O).constructor;
|
97084 |
var S;
|
97085 |
+
return C === undefined || (S = anObject(C)[SPECIES$1]) == undefined ? defaultConstructor : aConstructor(S);
|
97086 |
};
|
97087 |
|
97088 |
+
var arraySlice = functionUncurryThis([].slice);
|
97089 |
+
|
97090 |
var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y;
|
|
|
|
|
97091 |
var MAX_UINT32 = 0xFFFFFFFF;
|
97092 |
+
var min$2 = Math.min;
|
97093 |
+
var $push = [].push;
|
97094 |
+
var exec = functionUncurryThis(/./.exec);
|
97095 |
+
var push$3 = functionUncurryThis($push);
|
97096 |
+
var stringSlice$2 = functionUncurryThis(''.slice);
|
97097 |
|
97098 |
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
97099 |
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
97115 |
'test'.split(/(?:)/, -1).length != 4 ||
|
97116 |
'ab'.split(/(?:ab)*/).length != 2 ||
|
97117 |
'.'.split(/(.?)(.?)/).length != 4 ||
|
97118 |
+
// eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
|
97119 |
'.'.split(/()()/).length > 1 ||
|
97120 |
''.split(/.?/).length
|
97121 |
) {
|
97127 |
if (separator === undefined) return [string];
|
97128 |
// If `separator` is not a regex, use native split
|
97129 |
if (!isRegexp(separator)) {
|
97130 |
+
return functionCall(nativeSplit, string, separator, lim);
|
97131 |
}
|
97132 |
var output = [];
|
97133 |
var flags = (separator.ignoreCase ? 'i' : '') +
|
97138 |
// Make `global` and avoid `lastIndex` issues by working with a copy
|
97139 |
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
97140 |
var match, lastIndex, lastLength;
|
97141 |
+
while (match = functionCall(regexpExec, separatorCopy, string)) {
|
97142 |
lastIndex = separatorCopy.lastIndex;
|
97143 |
if (lastIndex > lastLastIndex) {
|
97144 |
+
push$3(output, stringSlice$2(string, lastLastIndex, match.index));
|
97145 |
+
if (match.length > 1 && match.index < string.length) functionApply($push, output, arraySlice(match, 1));
|
97146 |
lastLength = match[0].length;
|
97147 |
lastLastIndex = lastIndex;
|
97148 |
if (output.length >= lim) break;
|
97150 |
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
97151 |
}
|
97152 |
if (lastLastIndex === string.length) {
|
97153 |
+
if (lastLength || !exec(separatorCopy, '')) push$3(output, '');
|
97154 |
+
} else push$3(output, stringSlice$2(string, lastLastIndex));
|
97155 |
+
return output.length > lim ? arraySlice(output, 0, lim) : output;
|
97156 |
};
|
97157 |
// Chakra, V8
|
97158 |
} else if ('0'.split(undefined, 0).length) {
|
97159 |
internalSplit = function (separator, limit) {
|
97160 |
+
return separator === undefined && limit === 0 ? [] : functionCall(nativeSplit, this, separator, limit);
|
97161 |
};
|
97162 |
} else internalSplit = nativeSplit;
|
97163 |
|
97166 |
// https://tc39.es/ecma262/#sec-string.prototype.split
|
97167 |
function split(separator, limit) {
|
97168 |
var O = requireObjectCoercible(this);
|
97169 |
+
var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);
|
97170 |
+
return splitter
|
97171 |
+
? functionCall(splitter, separator, O, limit)
|
97172 |
+
: functionCall(internalSplit, toString_1(O), separator, limit);
|
97173 |
},
|
97174 |
// `RegExp.prototype[@@split]` method
|
97175 |
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
97202 |
var A = [];
|
97203 |
while (q < S.length) {
|
97204 |
splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
|
97205 |
+
var z = regexpExecAbstract(splitter, UNSUPPORTED_Y ? stringSlice$2(S, q) : S);
|
97206 |
var e;
|
97207 |
if (
|
97208 |
z === null ||
|
97210 |
) {
|
97211 |
q = advanceStringIndex(S, q, unicodeMatching);
|
97212 |
} else {
|
97213 |
+
push$3(A, stringSlice$2(S, p, q));
|
97214 |
if (A.length === lim) return A;
|
97215 |
for (var i = 1; i <= z.length - 1; i++) {
|
97216 |
+
push$3(A, z[i]);
|
97217 |
if (A.length === lim) return A;
|
97218 |
}
|
97219 |
q = p = e;
|
97220 |
}
|
97221 |
}
|
97222 |
+
push$3(A, stringSlice$2(S, p));
|
97223 |
return A;
|
97224 |
}
|
97225 |
];
|
97435 |
var $assign = Object.assign;
|
97436 |
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
97437 |
var defineProperty = Object.defineProperty;
|
97438 |
+
var concat$1 = functionUncurryThis([].concat);
|
97439 |
|
97440 |
// `Object.assign` method
|
97441 |
// https://tc39.es/ecma262/#sec-object.assign
|
97467 |
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
97468 |
while (argumentsLength > index) {
|
97469 |
var S = indexedObject(arguments[index++]);
|
97470 |
+
var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
97471 |
var length = keys.length;
|
97472 |
var j = 0;
|
97473 |
var key;
|
97474 |
while (length > j) {
|
97475 |
key = keys[j++];
|
97476 |
+
if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
|
97477 |
}
|
97478 |
} return T;
|
97479 |
} : $assign;
|
97556 |
}
|
97557 |
|
97558 |
var floor$1 = Math.floor;
|
97559 |
+
var charAt = functionUncurryThis(''.charAt);
|
97560 |
+
var replace = functionUncurryThis(''.replace);
|
97561 |
+
var stringSlice$1 = functionUncurryThis(''.slice);
|
97562 |
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
97563 |
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
97564 |
|
97572 |
namedCaptures = toObject(namedCaptures);
|
97573 |
symbols = SUBSTITUTION_SYMBOLS;
|
97574 |
}
|
97575 |
+
return replace(replacement, symbols, function (match, ch) {
|
97576 |
var capture;
|
97577 |
+
switch (charAt(ch, 0)) {
|
97578 |
case '$': return '$';
|
97579 |
case '&': return matched;
|
97580 |
+
case '`': return stringSlice$1(str, 0, position);
|
97581 |
+
case "'": return stringSlice$1(str, tailPos);
|
97582 |
case '<':
|
97583 |
+
capture = namedCaptures[stringSlice$1(ch, 1, -1)];
|
97584 |
break;
|
97585 |
default: // \d\d?
|
97586 |
var n = +ch;
|
97588 |
if (n > m) {
|
97589 |
var f = floor$1(n / 10);
|
97590 |
if (f === 0) return match;
|
97591 |
+
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
|
97592 |
return match;
|
97593 |
}
|
97594 |
capture = captures[n - 1];
|
97600 |
var REPLACE = wellKnownSymbol('replace');
|
97601 |
var max$2 = Math.max;
|
97602 |
var min$1 = Math.min;
|
97603 |
+
var concat = functionUncurryThis([].concat);
|
97604 |
+
var push$2 = functionUncurryThis([].push);
|
97605 |
+
var stringIndexOf$1 = functionUncurryThis(''.indexOf);
|
97606 |
+
var stringSlice = functionUncurryThis(''.slice);
|
97607 |
|
97608 |
var maybeToString = function (it) {
|
97609 |
return it === undefined ? it : String(it);
|
97631 |
result.groups = { a: '7' };
|
97632 |
return result;
|
97633 |
};
|
97634 |
+
// eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
|
97635 |
return ''.replace(re, '$<a>') !== '7';
|
97636 |
});
|
97637 |
|
97644 |
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
97645 |
function replace(searchValue, replaceValue) {
|
97646 |
var O = requireObjectCoercible(this);
|
97647 |
+
var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
|
97648 |
+
return replacer
|
97649 |
+
? functionCall(replacer, searchValue, O, replaceValue)
|
97650 |
+
: functionCall(nativeReplace, toString_1(O), searchValue, replaceValue);
|
97651 |
},
|
97652 |
// `RegExp.prototype[@@replace]` method
|
97653 |
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
97656 |
var S = toString_1(string);
|
97657 |
|
97658 |
if (
|
97659 |
+
typeof replaceValue == 'string' &&
|
97660 |
+
stringIndexOf$1(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
|
97661 |
+
stringIndexOf$1(replaceValue, '$<') === -1
|
97662 |
) {
|
97663 |
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
97664 |
if (res.done) return res.value;
|
97665 |
}
|
97666 |
|
97667 |
+
var functionalReplace = isCallable(replaceValue);
|
97668 |
if (!functionalReplace) replaceValue = toString_1(replaceValue);
|
97669 |
|
97670 |
var global = rx.global;
|
97677 |
var result = regexpExecAbstract(rx, S);
|
97678 |
if (result === null) break;
|
97679 |
|
97680 |
+
push$2(results, result);
|
97681 |
if (!global) break;
|
97682 |
|
97683 |
var matchStr = toString_1(result[0]);
|
97690 |
result = results[i];
|
97691 |
|
97692 |
var matched = toString_1(result[0]);
|
97693 |
+
var position = max$2(min$1(toIntegerOrInfinity(result.index), S.length), 0);
|
97694 |
var captures = [];
|
97695 |
// NOTE: This is equivalent to
|
97696 |
// captures = result.slice(1).map(maybeToString)
|
97697 |
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
97698 |
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
97699 |
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
97700 |
+
for (var j = 1; j < result.length; j++) push$2(captures, maybeToString(result[j]));
|
97701 |
var namedCaptures = result.groups;
|
97702 |
if (functionalReplace) {
|
97703 |
+
var replacerArgs = concat([matched], captures, position, S);
|
97704 |
+
if (namedCaptures !== undefined) push$2(replacerArgs, namedCaptures);
|
97705 |
+
var replacement = toString_1(functionApply(replaceValue, undefined, replacerArgs));
|
97706 |
} else {
|
97707 |
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
97708 |
}
|
97709 |
if (position >= nextSourcePosition) {
|
97710 |
+
accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
|
97711 |
nextSourcePosition = position + matched.length;
|
97712 |
}
|
97713 |
}
|
97714 |
+
return accumulatedResult + stringSlice(S, nextSourcePosition);
|
97715 |
}
|
97716 |
];
|
97717 |
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
97831 |
var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('slice');
|
97832 |
|
97833 |
var SPECIES = wellKnownSymbol('species');
|
97834 |
+
var Array$1 = global_1.Array;
|
97835 |
var max$1 = Math.max;
|
97836 |
|
97837 |
// `Array.prototype.slice` method
|
97840 |
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
|
97841 |
slice: function slice(start, end) {
|
97842 |
var O = toIndexedObject(this);
|
97843 |
+
var length = lengthOfArrayLike(O);
|
97844 |
var k = toAbsoluteIndex(start, length);
|
97845 |
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
97846 |
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
|
97848 |
if (isArray(O)) {
|
97849 |
Constructor = O.constructor;
|
97850 |
// cross-realm fallback
|
97851 |
+
if (isConstructor(Constructor) && (Constructor === Array$1 || isArray(Constructor.prototype))) {
|
97852 |
Constructor = undefined;
|
97853 |
} else if (isObject(Constructor)) {
|
97854 |
Constructor = Constructor[SPECIES];
|
97855 |
if (Constructor === null) Constructor = undefined;
|
97856 |
}
|
97857 |
+
if (Constructor === Array$1 || Constructor === undefined) {
|
97858 |
+
return arraySlice(O, k, fin);
|
97859 |
}
|
97860 |
}
|
97861 |
+
result = new (Constructor === undefined ? Array$1 : Constructor)(max$1(fin - k, 0));
|
97862 |
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
97863 |
result.length = n;
|
97864 |
return result;
|
97865 |
}
|
97866 |
});
|
97867 |
|
97868 |
+
var TypeError$2 = global_1.TypeError;
|
97869 |
+
|
97870 |
var notARegexp = function (it) {
|
97871 |
if (isRegexp(it)) {
|
97872 |
+
throw TypeError$2("The method doesn't accept regular expressions");
|
97873 |
} return it;
|
97874 |
};
|
97875 |
|
97887 |
} return false;
|
97888 |
};
|
97889 |
|
97890 |
+
var stringIndexOf = functionUncurryThis(''.indexOf);
|
97891 |
+
|
97892 |
// `String.prototype.includes` method
|
97893 |
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
97894 |
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
97895 |
includes: function includes(searchString /* , position = 0 */) {
|
97896 |
+
return !!~stringIndexOf(
|
97897 |
+
toString_1(requireObjectCoercible(this)),
|
97898 |
+
toString_1(notARegexp(searchString)),
|
97899 |
+
arguments.length > 1 ? arguments[1] : undefined
|
97900 |
+
);
|
97901 |
}
|
97902 |
});
|
97903 |
|
97909 |
});
|
97910 |
};
|
97911 |
|
97912 |
+
var un$Join = functionUncurryThis([].join);
|
97913 |
|
97914 |
var ES3_STRINGS = indexedObject != Object;
|
97915 |
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
97918 |
// https://tc39.es/ecma262/#sec-array.prototype.join
|
97919 |
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
97920 |
join: function join(separator) {
|
97921 |
+
return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
|
97922 |
}
|
97923 |
});
|
97924 |
|
97925 |
+
var bind = functionUncurryThis(functionUncurryThis.bind);
|
97926 |
+
|
97927 |
// optional / simple context binding
|
97928 |
+
var functionBindContext = function (fn, that) {
|
97929 |
+
aCallable(fn);
|
97930 |
+
return that === undefined ? fn : bind ? bind(fn, that) : function (/* ...args */) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97931 |
return fn.apply(that, arguments);
|
97932 |
};
|
97933 |
};
|
97934 |
|
97935 |
+
var push$1 = functionUncurryThis([].push);
|
97936 |
|
97937 |
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
97938 |
var createMethod = function (TYPE) {
|
97946 |
return function ($this, callbackfn, that, specificCreate) {
|
97947 |
var O = toObject($this);
|
97948 |
var self = indexedObject(O);
|
97949 |
+
var boundFunction = functionBindContext(callbackfn, that);
|
97950 |
+
var length = lengthOfArrayLike(self);
|
97951 |
var index = 0;
|
97952 |
var create = specificCreate || arraySpeciesCreate;
|
97953 |
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
97961 |
case 3: return true; // some
|
97962 |
case 5: return value; // find
|
97963 |
case 6: return index; // findIndex
|
97964 |
+
case 2: push$1(target, value); // filter
|
97965 |
} else switch (TYPE) {
|
97966 |
case 4: return false; // every
|
97967 |
+
case 7: push$1(target, value); // filterReject
|
97968 |
}
|
97969 |
}
|
97970 |
}
|
98047 |
|
98048 |
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
|
98049 |
|
98050 |
+
var TypeError$1 = global_1.TypeError;
|
98051 |
var max = Math.max;
|
98052 |
var min = Math.min;
|
98053 |
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
98059 |
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
98060 |
splice: function splice(start, deleteCount /* , ...items */) {
|
98061 |
var O = toObject(this);
|
98062 |
+
var len = lengthOfArrayLike(O);
|
98063 |
var actualStart = toAbsoluteIndex(start, len);
|
98064 |
var argumentsLength = arguments.length;
|
98065 |
var insertCount, actualDeleteCount, A, k, from, to;
|
98070 |
actualDeleteCount = len - actualStart;
|
98071 |
} else {
|
98072 |
insertCount = argumentsLength - 2;
|
98073 |
+
actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
|
98074 |
}
|
98075 |
if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
|
98076 |
+
throw TypeError$1(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
|
98077 |
}
|
98078 |
A = arraySpeciesCreate(O, actualDeleteCount);
|
98079 |
for (k = 0; k < actualDeleteCount; k++) {
|
98773 |
nextStep.call(self);
|
98774 |
} else if (/introjs-donebutton/gi.test(nextTooltipButton.className)) {
|
98775 |
if (typeof self._introCompleteCallback === "function") {
|
98776 |
+
self._introCompleteCallback.call(self, self._currentStep, "done");
|
98777 |
}
|
98778 |
|
98779 |
exitIntro.call(self, self._targetElement);
|
98802 |
|
98803 |
skipTooltipButton.onclick = function () {
|
98804 |
if (self._introItems.length - 1 === self._currentStep && typeof self._introCompleteCallback === "function") {
|
98805 |
+
self._introCompleteCallback.call(self, self._currentStep, "skip");
|
98806 |
}
|
98807 |
|
98808 |
if (typeof self._introSkipCallback === "function") {
|
98995 |
//end of the intro
|
98996 |
//check if any callback is defined
|
98997 |
if (typeof this._introCompleteCallback === "function") {
|
98998 |
+
this._introCompleteCallback.call(this, this._currentStep, "end");
|
98999 |
}
|
99000 |
|
99001 |
exitIntro.call(this, this._targetElement);
|
99090 |
} else if (target && target.className.match("introjs-skipbutton")) {
|
99091 |
//user hit enter while focusing on skip button
|
99092 |
if (this._introItems.length - 1 === this._currentStep && typeof this._introCompleteCallback === "function") {
|
99093 |
+
this._introCompleteCallback.call(this, this._currentStep, "skip");
|
99094 |
}
|
99095 |
|
99096 |
exitIntro.call(this, this._targetElement);
|
99134 |
return temp;
|
99135 |
}
|
99136 |
|
99137 |
+
function debounce(func, timeout) {
|
99138 |
+
var _this = this;
|
99139 |
+
|
99140 |
+
var timer;
|
99141 |
+
return function () {
|
99142 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
99143 |
+
args[_key] = arguments[_key];
|
99144 |
+
}
|
99145 |
+
|
99146 |
+
clearTimeout(timer);
|
99147 |
+
timer = setTimeout(function () {
|
99148 |
+
func.apply(_this, args);
|
99149 |
+
}, timeout);
|
99150 |
+
};
|
99151 |
+
}
|
99152 |
+
|
99153 |
/**
|
99154 |
* Get a queryselector within the hint wrapper
|
99155 |
*
|
99245 |
forEach(hints, function (hint) {
|
99246 |
removeHint.call(_this3, hint.getAttribute("data-step"));
|
99247 |
});
|
99248 |
+
DOMEvent.off(document, "click", removeHintTooltip, this, false);
|
99249 |
+
DOMEvent.off(window, "resize", reAlignHints, this, true);
|
99250 |
+
if (this._hintsAutoRefreshFunction) DOMEvent.off(window, "scroll", this._hintsAutoRefreshFunction, this, true);
|
99251 |
}
|
99252 |
/**
|
99253 |
* Remove one single hint element from the page
|
99351 |
if (typeof this._hintsAddedCallback !== "undefined") {
|
99352 |
this._hintsAddedCallback.call(this);
|
99353 |
}
|
99354 |
+
|
99355 |
+
if (this._options.hintAutoRefreshInterval >= 0) {
|
99356 |
+
this._hintsAutoRefreshFunction = debounce(function () {
|
99357 |
+
return reAlignHints.call(_this4);
|
99358 |
+
}, this._options.hintAutoRefreshInterval);
|
99359 |
+
DOMEvent.on(window, "scroll", this._hintsAutoRefreshFunction, this, true);
|
99360 |
+
}
|
99361 |
}
|
99362 |
/**
|
99363 |
* Aligns hint position
|
99467 |
tooltipTextLayer.className = "introjs-tooltiptext";
|
99468 |
var tooltipWrapper = _createElement("p");
|
99469 |
tooltipWrapper.innerHTML = item.hint;
|
|
|
|
|
|
|
|
|
|
|
99470 |
tooltipTextLayer.appendChild(tooltipWrapper);
|
99471 |
+
|
99472 |
+
if (this._options.hintShowButton) {
|
99473 |
+
var closeButton = _createElement("a");
|
99474 |
+
closeButton.className = this._options.buttonClass;
|
99475 |
+
closeButton.setAttribute("role", "button");
|
99476 |
+
closeButton.innerHTML = this._options.hintButtonLabel;
|
99477 |
+
closeButton.onclick = hideHint.bind(this, stepId);
|
99478 |
+
tooltipTextLayer.appendChild(closeButton);
|
99479 |
+
}
|
99480 |
+
|
99481 |
arrowLayer.className = "introjs-arrow";
|
99482 |
tooltipLayer.appendChild(arrowLayer);
|
99483 |
tooltipLayer.appendChild(tooltipTextLayer); // set current step for _placeTooltip function
|
99567 |
}
|
99568 |
|
99569 |
addHints.call(this);
|
|
|
|
|
|
|
|
|
|
|
99570 |
DOMEvent.on(document, "click", removeHintTooltip, this, false);
|
99571 |
DOMEvent.on(window, "resize", reAlignHints, this, true);
|
99572 |
}
|
99593 |
});
|
99594 |
}
|
99595 |
|
|
|
99596 |
var floor = Math.floor;
|
99597 |
|
99598 |
var mergeSort = function (array, comparefn) {
|
99599 |
var length = array.length;
|
99600 |
var middle = floor(length / 2);
|
99601 |
return length < 8 ? insertionSort(array, comparefn) : merge(
|
99602 |
+
array,
|
99603 |
+
mergeSort(arraySlice(array, 0, middle), comparefn),
|
99604 |
+
mergeSort(arraySlice(array, middle), comparefn),
|
99605 |
comparefn
|
99606 |
);
|
99607 |
};
|
99621 |
} return array;
|
99622 |
};
|
99623 |
|
99624 |
+
var merge = function (array, left, right, comparefn) {
|
99625 |
var llength = left.length;
|
99626 |
var rlength = right.length;
|
99627 |
var lindex = 0;
|
99628 |
var rindex = 0;
|
|
|
99629 |
|
99630 |
while (lindex < llength || rindex < rlength) {
|
99631 |
+
array[lindex + rindex] = (lindex < llength && rindex < rlength)
|
99632 |
+
? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
|
99633 |
+
: lindex < llength ? left[lindex++] : right[rindex++];
|
99634 |
+
} return array;
|
|
|
|
|
99635 |
};
|
99636 |
|
99637 |
var arraySort = mergeSort;
|
99647 |
var engineWebkitVersion = !!webkit && +webkit[1];
|
99648 |
|
99649 |
var test = [];
|
99650 |
+
var un$Sort = functionUncurryThis(test.sort);
|
99651 |
+
var push = functionUncurryThis(test.push);
|
99652 |
|
99653 |
// IE8-
|
99654 |
var FAILS_ON_UNDEFINED = fails(function () {
|
99711 |
// https://tc39.es/ecma262/#sec-array.prototype.sort
|
99712 |
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
99713 |
sort: function sort(comparefn) {
|
99714 |
+
if (comparefn !== undefined) aCallable(comparefn);
|
99715 |
|
99716 |
var array = toObject(this);
|
99717 |
|
99718 |
+
if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
|
99719 |
|
99720 |
var items = [];
|
99721 |
+
var arrayLength = lengthOfArrayLike(array);
|
99722 |
var itemsLength, index;
|
99723 |
|
99724 |
for (index = 0; index < arrayLength; index++) {
|
99725 |
+
if (index in array) push(items, array[index]);
|
99726 |
}
|
99727 |
|
99728 |
+
arraySort(items, getSortCompare(comparefn));
|
99729 |
+
|
99730 |
itemsLength = items.length;
|
99731 |
index = 0;
|
99732 |
|
99916 |
if (this._currentStep !== undefined && this._currentStep !== null) {
|
99917 |
var oldArrowLayer = document.querySelector(".introjs-arrow");
|
99918 |
var oldtooltipContainer = document.querySelector(".introjs-tooltip");
|
99919 |
+
|
99920 |
+
if (oldtooltipContainer && oldArrowLayer) {
|
99921 |
+
placeTooltip.call(this, this._introItems[this._currentStep].element, oldtooltipContainer, oldArrowLayer);
|
99922 |
+
}
|
99923 |
} //re-align hints
|
99924 |
|
99925 |
|
100060 |
*/
|
100061 |
|
100062 |
function introForElement(targetElm) {
|
100063 |
+
if (this._introStartCallback !== undefined) {
|
100064 |
+
this._introStartCallback.call(this, targetElm);
|
100065 |
+
} //set it to the introJs object
|
100066 |
+
|
100067 |
+
|
100068 |
var steps = fetchIntroSteps.call(this, targetElm);
|
100069 |
|
100070 |
if (steps.length === 0) {
|
100088 |
return false;
|
100089 |
}
|
100090 |
|
100091 |
+
var version = "4.3.0";
|
100092 |
|
100093 |
/**
|
100094 |
* IntroJs main class
|
100188 |
/* Hint button label */
|
100189 |
hintButtonLabel: "Got it",
|
100190 |
|
100191 |
+
/* Display the "Got it" button? */
|
100192 |
+
hintShowButton: true,
|
100193 |
+
|
100194 |
+
/* Hints auto-refresh interval in ms (set to -1 to disable) */
|
100195 |
+
hintAutoRefreshInterval: 10,
|
100196 |
+
|
100197 |
/* Adding animation to hints? */
|
100198 |
hintAnimation: true,
|
100199 |
|
100377 |
|
100378 |
return this;
|
100379 |
},
|
100380 |
+
onstart: function onstart(providedCallback) {
|
100381 |
+
if (typeof providedCallback === "function") {
|
100382 |
+
this._introStartCallback = providedCallback;
|
100383 |
+
} else {
|
100384 |
+
throw new Error("Provided callback for onstart was not a function.");
|
100385 |
+
}
|
100386 |
+
|
100387 |
+
return this;
|
100388 |
+
},
|
100389 |
onexit: function onexit(providedCallback) {
|
100390 |
if (typeof providedCallback === "function") {
|
100391 |
this._introExitCallback = providedCallback;
|
100456 |
|
100457 |
return introJs;
|
100458 |
|
100459 |
+
}));
|
100460 |
|
100461 |
|
100462 |
/***/ }),
|
104640 |
module.exports = arrayFilter;
|
104641 |
|
104642 |
|
104643 |
+
/***/ }),
|
104644 |
+
|
104645 |
+
/***/ 47443:
|
104646 |
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
104647 |
+
|
104648 |
+
var baseIndexOf = __webpack_require__(42118);
|
104649 |
+
|
104650 |
+
/**
|
104651 |
+
* A specialized version of `_.includes` for arrays without support for
|
104652 |
+
* specifying an index to search from.
|
104653 |
+
*
|
104654 |
+
* @private
|
104655 |
+
* @param {Array} [array] The array to inspect.
|
104656 |
+
* @param {*} target The value to search for.
|
104657 |
+
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
104658 |
+
*/
|
104659 |
+
function arrayIncludes(array, value) {
|
104660 |
+
var length = array == null ? 0 : array.length;
|
104661 |
+
return !!length && baseIndexOf(array, value, 0) > -1;
|
104662 |
+
}
|
104663 |
+
|
104664 |
+
module.exports = arrayIncludes;
|
104665 |
+
|
104666 |
+
|
104667 |
+
/***/ }),
|
104668 |
+
|
104669 |
+
/***/ 1196:
|
104670 |
+
/***/ (function(module) {
|
104671 |
+
|
104672 |
+
/**
|
104673 |
+
* This function is like `arrayIncludes` except that it accepts a comparator.
|
104674 |
+
*
|
104675 |
+
* @private
|
104676 |
+
* @param {Array} [array] The array to inspect.
|
104677 |
+
* @param {*} target The value to search for.
|
104678 |
+
* @param {Function} comparator The comparator invoked per element.
|
104679 |
+
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
104680 |
+
*/
|
104681 |
+
function arrayIncludesWith(array, value, comparator) {
|
104682 |
+
var index = -1,
|
104683 |
+
length = array == null ? 0 : array.length;
|
104684 |
+
|