@elementor/editor-global-classes 3.33.0-117 → 3.33.0-119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -7,18 +7,18 @@ import {
7
7
  } from "@elementor/editor-editing-panel";
8
8
  import { __registerPanel as registerPanel } from "@elementor/editor-panels";
9
9
  import { stylesRepository } from "@elementor/editor-styles-repository";
10
- import { __privateListenTo as listenTo, v1ReadyEvent } from "@elementor/editor-v1-adapters";
11
10
  import { __registerSlice as registerSlice } from "@elementor/store";
12
11
 
13
12
  // src/components/class-manager/class-manager-button.tsx
14
- import * as React18 from "react";
13
+ import * as React19 from "react";
15
14
  import {
16
15
  __useActiveDocument as useActiveDocument2,
17
16
  __useActiveDocumentActions as useActiveDocumentActions
18
17
  } from "@elementor/editor-documents";
19
18
  import { useUserStylesCapability } from "@elementor/editor-styles-repository";
19
+ import { SaveChangesDialog as SaveChangesDialog2, useDialog as useDialog2 } from "@elementor/editor-ui";
20
20
  import { IconButton as IconButton5, Tooltip as Tooltip6 } from "@elementor/ui";
21
- import { __ as __14 } from "@wordpress/i18n";
21
+ import { __ as __15 } from "@wordpress/i18n";
22
22
 
23
23
  // src/global-classes-styles-provider.ts
24
24
  import { generateId } from "@elementor/editor-styles";
@@ -179,6 +179,13 @@ var slice = createSlice({
179
179
  state.data.items[payload.style.id] = mergedData;
180
180
  state.isDirty = true;
181
181
  },
182
+ updateMultiple(state, { payload }) {
183
+ localHistory.next(state.data);
184
+ Object.entries(payload).forEach(([id2, { modified }]) => {
185
+ state.data.items[id2].label = modified;
186
+ });
187
+ state.isDirty = false;
188
+ },
182
189
  updateProps(state, {
183
190
  payload
184
191
  }) {
@@ -361,6 +368,9 @@ var apiClient = {
361
368
  }
362
369
  })
363
370
  };
371
+ var API_ERROR_CODES = {
372
+ DUPLICATED_LABEL: "DUPLICATED_LABEL"
373
+ };
364
374
 
365
375
  // src/components/css-class-usage/utils.ts
366
376
  var transformData = (data) => Object.entries(data).reduce((acc, [key, value]) => {
@@ -391,7 +401,7 @@ function usePrefetchCssClassUsage() {
391
401
  }
392
402
 
393
403
  // src/components/class-manager/class-manager-panel.tsx
394
- import * as React17 from "react";
404
+ import * as React18 from "react";
395
405
  import { useEffect as useEffect2 } from "react";
396
406
  import { setDocumentModifiedStatus } from "@elementor/editor-documents";
397
407
  import {
@@ -402,23 +412,23 @@ import {
402
412
  PanelHeader,
403
413
  PanelHeaderTitle
404
414
  } from "@elementor/editor-panels";
405
- import { ThemeProvider } from "@elementor/editor-ui";
415
+ import { SaveChangesDialog, ThemeProvider, useDialog } from "@elementor/editor-ui";
406
416
  import { changeEditMode } from "@elementor/editor-v1-adapters";
407
417
  import { XIcon } from "@elementor/icons";
408
418
  import { useMutation } from "@elementor/query";
409
419
  import { __dispatch as dispatch4 } from "@elementor/store";
410
420
  import {
411
- Alert,
412
- Box as Box9,
421
+ Alert as Alert2,
422
+ Box as Box10,
413
423
  Button as Button3,
414
424
  Chip as Chip4,
415
- DialogHeader,
416
- Divider as Divider3,
425
+ DialogHeader as DialogHeader2,
426
+ Divider as Divider4,
417
427
  ErrorBoundary,
418
428
  IconButton as IconButton4,
419
- Stack as Stack8
429
+ Stack as Stack9
420
430
  } from "@elementor/ui";
421
- import { __ as __13 } from "@wordpress/i18n";
431
+ import { __ as __14 } from "@wordpress/i18n";
422
432
 
423
433
  // src/hooks/use-classes-order.ts
424
434
  import { __useSelector as useSelector } from "@elementor/store";
@@ -447,9 +457,17 @@ var INIT_CHECKED_FILTERS = {
447
457
  };
448
458
  var SearchAndFilterProvider = ({ children }) => {
449
459
  const [filters, setFilters] = React.useState(INIT_CHECKED_FILTERS);
460
+ const getInitialSearchValue = () => {
461
+ const storedValue = localStorage.getItem("elementor-global-classes-search");
462
+ if (storedValue) {
463
+ localStorage.removeItem("elementor-global-classes-search");
464
+ return storedValue;
465
+ }
466
+ return "";
467
+ };
450
468
  const { debouncedValue, inputValue, handleChange } = useDebounceState({
451
469
  delay: 300,
452
- initialValue: ""
470
+ initialValue: getInitialSearchValue()
453
471
  });
454
472
  const onClearSearch = () => {
455
473
  handleChange("");
@@ -580,25 +598,146 @@ var useFilters = () => {
580
598
  }, [filters, allFilters]);
581
599
  };
582
600
 
583
- // src/save-global-classes.ts
601
+ // src/save-global-classes.tsx
602
+ import * as React3 from "react";
603
+ import { openDialog } from "@elementor/editor-ui";
584
604
  import { __dispatch as dispatch2, __getState as getState2 } from "@elementor/store";
585
605
  import { hash } from "@elementor/utils";
586
- async function saveGlobalClasses({ context: context2 }) {
606
+
607
+ // src/components/class-manager/duplicate-label-dialog.tsx
608
+ import * as React2 from "react";
609
+ import { closeDialog, EllipsisWithTooltip } from "@elementor/editor-ui";
610
+ import { InfoCircleFilledIcon } from "@elementor/icons";
611
+ import {
612
+ Alert,
613
+ Box,
614
+ Button,
615
+ DialogActions,
616
+ DialogContent,
617
+ DialogHeader,
618
+ Divider,
619
+ Icon,
620
+ Stack,
621
+ Typography
622
+ } from "@elementor/ui";
623
+ import { __ as __2 } from "@wordpress/i18n";
624
+ var DUP_PREFIX = "DUP_";
625
+ var DuplicateLabelDialog = ({
626
+ modifiedLabels,
627
+ onApprove
628
+ }) => {
629
+ const handleButtonClick = () => {
630
+ localStorage.setItem("elementor-global-classes-search", DUP_PREFIX);
631
+ onApprove?.();
632
+ closeDialog();
633
+ };
634
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React2.createElement(Box, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React2.createElement(Icon, { color: "secondary" }, /* @__PURE__ */ React2.createElement(InfoCircleFilledIcon, { fontSize: "medium" })), /* @__PURE__ */ React2.createElement(Typography, { variant: "subtitle1" }, __2("We've published your page and updated class names.", "elementor")))), /* @__PURE__ */ React2.createElement(DialogContent, null, /* @__PURE__ */ React2.createElement(Stack, { spacing: 2, direction: "column" }, /* @__PURE__ */ React2.createElement(Typography, { variant: "body2" }, __2(
635
+ "Some new classes used the same names as existing ones. To prevent conflicts, we added the prefix",
636
+ "elementor"
637
+ ), /* @__PURE__ */ React2.createElement("strong", null, " ", DUP_PREFIX)), /* @__PURE__ */ React2.createElement(Box, null, /* @__PURE__ */ React2.createElement(
638
+ Box,
639
+ {
640
+ sx: {
641
+ width: "100%",
642
+ display: "flex",
643
+ gap: 2,
644
+ alignItems: "flex-start"
645
+ }
646
+ },
647
+ /* @__PURE__ */ React2.createElement(
648
+ Typography,
649
+ {
650
+ variant: "subtitle2",
651
+ sx: {
652
+ fontWeight: "bold",
653
+ flex: 1,
654
+ flexShrink: 1,
655
+ flexGrow: 1,
656
+ minWidth: 0
657
+ }
658
+ },
659
+ __2("Before", "elementor")
660
+ ),
661
+ /* @__PURE__ */ React2.createElement(
662
+ Typography,
663
+ {
664
+ variant: "subtitle2",
665
+ sx: {
666
+ minWidth: "200px",
667
+ fontWeight: "bold",
668
+ flexShrink: 0,
669
+ flexGrow: 0,
670
+ width: "200px",
671
+ maxWidth: "200px"
672
+ }
673
+ },
674
+ __2("After", "elementor")
675
+ )
676
+ ), /* @__PURE__ */ React2.createElement(Divider, { sx: { mt: 0.5, mb: 0.5 } }), /* @__PURE__ */ React2.createElement(Stack, { direction: "column", gap: 0.5, sx: { pb: 2 } }, Object.values(modifiedLabels).map(({ original, modified }, index) => /* @__PURE__ */ React2.createElement(
677
+ Box,
678
+ {
679
+ key: index,
680
+ sx: {
681
+ width: "100%",
682
+ display: "flex",
683
+ gap: 2,
684
+ alignItems: "flex-start"
685
+ }
686
+ },
687
+ /* @__PURE__ */ React2.createElement(
688
+ Box,
689
+ {
690
+ sx: {
691
+ flex: 1,
692
+ flexShrink: 1,
693
+ flexGrow: 1,
694
+ minWidth: 0
695
+ }
696
+ },
697
+ /* @__PURE__ */ React2.createElement(EllipsisWithTooltip, { title: original }, /* @__PURE__ */ React2.createElement(Typography, { variant: "body2", sx: { color: "text.secondary" } }, original))
698
+ ),
699
+ /* @__PURE__ */ React2.createElement(
700
+ Box,
701
+ {
702
+ sx: {
703
+ minWidth: "200px",
704
+ flexShrink: 0,
705
+ flexGrow: 0,
706
+ width: "200px",
707
+ maxWidth: "200px"
708
+ }
709
+ },
710
+ /* @__PURE__ */ React2.createElement(EllipsisWithTooltip, { title: modified }, /* @__PURE__ */ React2.createElement(Typography, { variant: "body2", sx: { color: "text.primary" } }, modified))
711
+ )
712
+ ))), /* @__PURE__ */ React2.createElement(Box, null, /* @__PURE__ */ React2.createElement(Alert, { severity: "info", size: "small", color: "secondary" }, /* @__PURE__ */ React2.createElement("strong", null, __2("Your designs and classes are safe.", "elementor")), __2(
713
+ "Only the prefixes were added.Find them in Class Manager by searching",
714
+ "elementor"
715
+ ), /* @__PURE__ */ React2.createElement("strong", null, DUP_PREFIX)))))), /* @__PURE__ */ React2.createElement(DialogActions, null, /* @__PURE__ */ React2.createElement(Button, { color: "secondary", variant: "text", onClick: handleButtonClick }, __2("Go to Class Manager", "elementor")), /* @__PURE__ */ React2.createElement(Button, { color: "secondary", variant: "contained", onClick: closeDialog }, __2("Done", "elementor"))));
716
+ };
717
+
718
+ // src/save-global-classes.tsx
719
+ async function saveGlobalClasses({ context: context2, onApprove }) {
587
720
  const state = selectData(getState2());
588
- if (context2 === "preview") {
589
- await apiClient.saveDraft({
590
- items: state.items,
591
- order: state.order,
592
- changes: calculateChanges(state, selectPreviewInitialData(getState2()))
593
- });
594
- } else {
595
- await apiClient.publish({
596
- items: state.items,
597
- order: state.order,
598
- changes: calculateChanges(state, selectFrontendInitialData(getState2()))
721
+ const apiAction = context2 === "preview" ? apiClient.saveDraft : apiClient.publish;
722
+ const currentContext = context2 === "preview" ? selectPreviewInitialData : selectFrontendInitialData;
723
+ const response = await apiAction({
724
+ items: state.items,
725
+ order: state.order,
726
+ changes: calculateChanges(state, currentContext(getState2()))
727
+ });
728
+ dispatch2(slice.actions.reset({ context: context2 }));
729
+ if (response?.data?.data?.code === API_ERROR_CODES.DUPLICATED_LABEL) {
730
+ dispatch2(slice.actions.updateMultiple(response.data.data.modifiedLabels));
731
+ openDialog({
732
+ component: /* @__PURE__ */ React3.createElement(
733
+ DuplicateLabelDialog,
734
+ {
735
+ modifiedLabels: response.data.data.modifiedLabels || [],
736
+ onApprove
737
+ }
738
+ )
599
739
  });
600
740
  }
601
- dispatch2(slice.actions.reset({ context: context2 }));
602
741
  }
603
742
  function calculateChanges(state, initialData) {
604
743
  const stateIds = Object.keys(state.items);
@@ -613,19 +752,19 @@ function calculateChanges(state, initialData) {
613
752
  }
614
753
 
615
754
  // src/components/search-and-filter/components/filter/active-filters.tsx
616
- import * as React4 from "react";
617
- import { Chip as Chip2, Stack as Stack2 } from "@elementor/ui";
618
- import { __ as __3 } from "@wordpress/i18n";
755
+ import * as React6 from "react";
756
+ import { Chip as Chip2, Stack as Stack3 } from "@elementor/ui";
757
+ import { __ as __4 } from "@wordpress/i18n";
619
758
 
620
759
  // src/components/search-and-filter/components/filter/clear-icon-button.tsx
621
- import * as React2 from "react";
760
+ import * as React4 from "react";
622
761
  import { BrushBigIcon } from "@elementor/icons";
623
- import { Box, IconButton, styled, Tooltip } from "@elementor/ui";
762
+ import { Box as Box2, IconButton, styled, Tooltip } from "@elementor/ui";
624
763
  var ClearIconButton = ({ tooltipText, sx }) => {
625
764
  const {
626
765
  filters: { onClearFilter }
627
766
  } = useSearchAndFilters();
628
- return /* @__PURE__ */ React2.createElement(Tooltip, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React2.createElement(Box, null, /* @__PURE__ */ React2.createElement(CustomIconButton, { "aria-label": tooltipText, size: "tiny", onClick: onClearFilter, sx }, /* @__PURE__ */ React2.createElement(BrushBigIcon, { fontSize: "tiny" }))));
767
+ return /* @__PURE__ */ React4.createElement(Tooltip, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React4.createElement(Box2, null, /* @__PURE__ */ React4.createElement(CustomIconButton, { "aria-label": tooltipText, size: "tiny", onClick: onClearFilter, sx }, /* @__PURE__ */ React4.createElement(BrushBigIcon, { fontSize: "tiny" }))));
629
768
  };
630
769
  var CustomIconButton = styled(IconButton)(({ theme }) => ({
631
770
  "&.Mui-disabled": {
@@ -637,13 +776,13 @@ var CustomIconButton = styled(IconButton)(({ theme }) => ({
637
776
  }));
638
777
 
639
778
  // src/components/search-and-filter/components/filter/filter-list.tsx
640
- import * as React3 from "react";
641
- import { Checkbox, Chip, MenuItem, MenuList, Stack, Typography } from "@elementor/ui";
642
- import { __ as __2 } from "@wordpress/i18n";
779
+ import * as React5 from "react";
780
+ import { Checkbox, Chip, MenuItem, MenuList, Stack as Stack2, Typography as Typography2 } from "@elementor/ui";
781
+ import { __ as __3 } from "@wordpress/i18n";
643
782
  var filterConfig = {
644
- unused: __2("Unused", "elementor"),
645
- empty: __2("Empty", "elementor"),
646
- onThisPage: __2("On this page", "elementor")
783
+ unused: __3("Unused", "elementor"),
784
+ empty: __3("Empty", "elementor"),
785
+ onThisPage: __3("On this page", "elementor")
647
786
  };
648
787
  var FilterList = () => {
649
788
  const {
@@ -653,30 +792,30 @@ var FilterList = () => {
653
792
  const handleOnClick = (value) => {
654
793
  setFilters((prev) => ({ ...prev, [value]: !prev[value] }));
655
794
  };
656
- return /* @__PURE__ */ React3.createElement(MenuList, null, /* @__PURE__ */ React3.createElement(MenuItem, { onClick: () => handleOnClick("unused") }, /* @__PURE__ */ React3.createElement(
795
+ return /* @__PURE__ */ React5.createElement(MenuList, null, /* @__PURE__ */ React5.createElement(MenuItem, { onClick: () => handleOnClick("unused") }, /* @__PURE__ */ React5.createElement(
657
796
  LabeledCheckbox,
658
797
  {
659
798
  label: filterConfig.unused,
660
799
  checked: filters.unused,
661
- suffix: /* @__PURE__ */ React3.createElement(Chip, { size: "tiny", sx: { ml: "auto" }, label: filteredCssClass.unused.length })
800
+ suffix: /* @__PURE__ */ React5.createElement(Chip, { size: "tiny", sx: { ml: "auto" }, label: filteredCssClass.unused.length })
662
801
  }
663
- )), /* @__PURE__ */ React3.createElement(MenuItem, { onClick: () => handleOnClick("empty") }, /* @__PURE__ */ React3.createElement(
802
+ )), /* @__PURE__ */ React5.createElement(MenuItem, { onClick: () => handleOnClick("empty") }, /* @__PURE__ */ React5.createElement(
664
803
  LabeledCheckbox,
665
804
  {
666
805
  label: filterConfig.empty,
667
806
  checked: filters.empty,
668
- suffix: /* @__PURE__ */ React3.createElement(Chip, { size: "tiny", sx: { ml: "auto" }, label: filteredCssClass.empty.length })
807
+ suffix: /* @__PURE__ */ React5.createElement(Chip, { size: "tiny", sx: { ml: "auto" }, label: filteredCssClass.empty.length })
669
808
  }
670
- )), /* @__PURE__ */ React3.createElement(MenuItem, { onClick: () => handleOnClick("onThisPage") }, /* @__PURE__ */ React3.createElement(
809
+ )), /* @__PURE__ */ React5.createElement(MenuItem, { onClick: () => handleOnClick("onThisPage") }, /* @__PURE__ */ React5.createElement(
671
810
  LabeledCheckbox,
672
811
  {
673
812
  label: filterConfig.onThisPage,
674
813
  checked: filters.onThisPage,
675
- suffix: /* @__PURE__ */ React3.createElement(Chip, { size: "tiny", sx: { ml: "auto" }, label: filteredCssClass.onThisPage.length })
814
+ suffix: /* @__PURE__ */ React5.createElement(Chip, { size: "tiny", sx: { ml: "auto" }, label: filteredCssClass.onThisPage.length })
676
815
  }
677
816
  )));
678
817
  };
679
- var LabeledCheckbox = ({ label, suffix, checked }) => /* @__PURE__ */ React3.createElement(Stack, { direction: "row", alignItems: "center", gap: 0.5, flex: 1 }, /* @__PURE__ */ React3.createElement(
818
+ var LabeledCheckbox = ({ label, suffix, checked }) => /* @__PURE__ */ React5.createElement(Stack2, { direction: "row", alignItems: "center", gap: 0.5, flex: 1 }, /* @__PURE__ */ React5.createElement(
680
819
  Checkbox,
681
820
  {
682
821
  size: "small",
@@ -689,7 +828,7 @@ var LabeledCheckbox = ({ label, suffix, checked }) => /* @__PURE__ */ React3.cre
689
828
  }
690
829
  }
691
830
  }
692
- ), /* @__PURE__ */ React3.createElement(Typography, { variant: "caption", sx: { color: "text.secondary" } }, label), suffix);
831
+ ), /* @__PURE__ */ React5.createElement(Typography2, { variant: "caption", sx: { color: "text.secondary" } }, label), suffix);
693
832
 
694
833
  // src/components/search-and-filter/components/filter/active-filters.tsx
695
834
  var ActiveFilters = () => {
@@ -701,7 +840,7 @@ var ActiveFilters = () => {
701
840
  };
702
841
  const activeKeys = Object.keys(filters).filter((key) => filters[key]);
703
842
  const showClearIcon = activeKeys.length > 0;
704
- return /* @__PURE__ */ React4.createElement(Stack2, { direction: "row", alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React4.createElement(Stack2, { direction: "row", gap: 0.5, alignItems: "center", flexWrap: "wrap" }, activeKeys.map((key) => /* @__PURE__ */ React4.createElement(
843
+ return /* @__PURE__ */ React6.createElement(Stack3, { direction: "row", alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React6.createElement(Stack3, { direction: "row", gap: 0.5, alignItems: "center", flexWrap: "wrap" }, activeKeys.map((key) => /* @__PURE__ */ React6.createElement(
705
844
  Chip2,
706
845
  {
707
846
  key,
@@ -710,10 +849,10 @@ var ActiveFilters = () => {
710
849
  sx: chipSx,
711
850
  size: "tiny"
712
851
  }
713
- ))), showClearIcon && /* @__PURE__ */ React4.createElement(
852
+ ))), showClearIcon && /* @__PURE__ */ React6.createElement(
714
853
  ClearIconButton,
715
854
  {
716
- tooltipText: __3("Clear Filters", "elementor"),
855
+ tooltipText: __4("Clear Filters", "elementor"),
717
856
  sx: { margin: "0 0 auto auto" }
718
857
  }
719
858
  ));
@@ -729,11 +868,11 @@ var chipSx = {
729
868
  };
730
869
 
731
870
  // src/components/search-and-filter/components/filter/css-class-filter.tsx
732
- import * as React5 from "react";
871
+ import * as React7 from "react";
733
872
  import { PopoverBody, PopoverHeader } from "@elementor/editor-ui";
734
873
  import { FilterIcon } from "@elementor/icons";
735
- import { bindPopover, bindToggle, Divider, Popover, ToggleButton, Tooltip as Tooltip2, usePopupState } from "@elementor/ui";
736
- import { __ as __4 } from "@wordpress/i18n";
874
+ import { bindPopover, bindToggle, Divider as Divider2, Popover, ToggleButton, Tooltip as Tooltip2, usePopupState } from "@elementor/ui";
875
+ import { __ as __5 } from "@wordpress/i18n";
737
876
  var CssClassFilter = () => {
738
877
  const {
739
878
  filters: { filters }
@@ -743,7 +882,7 @@ var CssClassFilter = () => {
743
882
  disableAutoFocus: true
744
883
  });
745
884
  const showCleanIcon = Object.values(filters).some((value) => value);
746
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Tooltip2, { title: __4("Filters", "elementor"), placement: "top" }, /* @__PURE__ */ React5.createElement(
885
+ return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(Tooltip2, { title: __5("Filters", "elementor"), placement: "top" }, /* @__PURE__ */ React7.createElement(
747
886
  ToggleButton,
748
887
  {
749
888
  value: "filter",
@@ -751,8 +890,8 @@ var CssClassFilter = () => {
751
890
  selected: popupState.isOpen,
752
891
  ...bindToggle(popupState)
753
892
  },
754
- /* @__PURE__ */ React5.createElement(FilterIcon, { fontSize: "tiny" })
755
- )), /* @__PURE__ */ React5.createElement(
893
+ /* @__PURE__ */ React7.createElement(FilterIcon, { fontSize: "tiny" })
894
+ )), /* @__PURE__ */ React7.createElement(
756
895
  Popover,
757
896
  {
758
897
  sx: {
@@ -768,76 +907,76 @@ var CssClassFilter = () => {
768
907
  },
769
908
  ...bindPopover(popupState)
770
909
  },
771
- /* @__PURE__ */ React5.createElement(
910
+ /* @__PURE__ */ React7.createElement(
772
911
  PopoverHeader,
773
912
  {
774
913
  actions: showCleanIcon ? [
775
- /* @__PURE__ */ React5.createElement(
914
+ /* @__PURE__ */ React7.createElement(
776
915
  ClearIconButton,
777
916
  {
778
917
  key: "clear-all-button",
779
- tooltipText: __4("Clear all", "elementor")
918
+ tooltipText: __5("Clear all", "elementor")
780
919
  }
781
920
  )
782
921
  ] : [],
783
922
  onClose: popupState.close,
784
- title: __4("Filters", "elementor"),
785
- icon: /* @__PURE__ */ React5.createElement(FilterIcon, { fontSize: "tiny" })
923
+ title: __5("Filters", "elementor"),
924
+ icon: /* @__PURE__ */ React7.createElement(FilterIcon, { fontSize: "tiny" })
786
925
  }
787
926
  ),
788
- /* @__PURE__ */ React5.createElement(
789
- Divider,
927
+ /* @__PURE__ */ React7.createElement(
928
+ Divider2,
790
929
  {
791
930
  sx: {
792
931
  borderWidth: "1px 0 0 0"
793
932
  }
794
933
  }
795
934
  ),
796
- /* @__PURE__ */ React5.createElement(PopoverBody, { width: 344, height: 125 }, /* @__PURE__ */ React5.createElement(FilterList, null))
935
+ /* @__PURE__ */ React7.createElement(PopoverBody, { width: 344, height: 125 }, /* @__PURE__ */ React7.createElement(FilterList, null))
797
936
  ));
798
937
  };
799
938
 
800
939
  // src/components/search-and-filter/components/search/class-manager-search.tsx
801
- import * as React6 from "react";
940
+ import * as React8 from "react";
802
941
  import { SearchIcon } from "@elementor/icons";
803
- import { Box as Box2, InputAdornment, Stack as Stack3, TextField } from "@elementor/ui";
804
- import { __ as __5 } from "@wordpress/i18n";
942
+ import { Box as Box3, InputAdornment, Stack as Stack4, TextField } from "@elementor/ui";
943
+ import { __ as __6 } from "@wordpress/i18n";
805
944
  var ClassManagerSearch = () => {
806
945
  const {
807
946
  search: { inputValue, handleChange }
808
947
  } = useSearchAndFilters();
809
- return /* @__PURE__ */ React6.createElement(Stack3, { direction: "row", gap: 0.5, sx: { width: "100%" } }, /* @__PURE__ */ React6.createElement(Box2, { sx: { flexGrow: 1 } }, /* @__PURE__ */ React6.createElement(
948
+ return /* @__PURE__ */ React8.createElement(Stack4, { direction: "row", gap: 0.5, sx: { width: "100%" } }, /* @__PURE__ */ React8.createElement(Box3, { sx: { flexGrow: 1 } }, /* @__PURE__ */ React8.createElement(
810
949
  TextField,
811
950
  {
812
951
  role: "search",
813
952
  fullWidth: true,
814
953
  size: "tiny",
815
954
  value: inputValue,
816
- placeholder: __5("Search", "elementor"),
955
+ placeholder: __6("Search", "elementor"),
817
956
  onChange: (e) => handleChange(e.target.value),
818
957
  InputProps: {
819
- startAdornment: /* @__PURE__ */ React6.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React6.createElement(SearchIcon, { fontSize: "tiny" }))
958
+ startAdornment: /* @__PURE__ */ React8.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React8.createElement(SearchIcon, { fontSize: "tiny" }))
820
959
  }
821
960
  }
822
961
  )));
823
962
  };
824
963
 
825
964
  // src/components/class-manager/class-manager-introduction.tsx
826
- import * as React7 from "react";
965
+ import * as React9 from "react";
827
966
  import { useState as useState2 } from "react";
828
967
  import { useSuppressedMessage } from "@elementor/editor-current-user";
829
968
  import { IntroductionModal } from "@elementor/editor-ui";
830
- import { Box as Box3, Image, Typography as Typography2 } from "@elementor/ui";
831
- import { __ as __6 } from "@wordpress/i18n";
969
+ import { Box as Box4, Image, Typography as Typography3 } from "@elementor/ui";
970
+ import { __ as __7 } from "@wordpress/i18n";
832
971
  var MESSAGE_KEY = "global-class-manager";
833
972
  var ClassManagerIntroduction = () => {
834
973
  const [isMessageSuppressed, suppressMessage] = useSuppressedMessage(MESSAGE_KEY);
835
974
  const [shouldShowIntroduction, setShouldShowIntroduction] = useState2(!isMessageSuppressed);
836
- return /* @__PURE__ */ React7.createElement(
975
+ return /* @__PURE__ */ React9.createElement(
837
976
  IntroductionModal,
838
977
  {
839
978
  open: shouldShowIntroduction,
840
- title: __6("Class Manager", "elementor"),
979
+ title: __7("Class Manager", "elementor"),
841
980
  handleClose: (shouldShowAgain) => {
842
981
  if (!shouldShowAgain) {
843
982
  suppressMessage();
@@ -845,7 +984,7 @@ var ClassManagerIntroduction = () => {
845
984
  setShouldShowIntroduction(false);
846
985
  }
847
986
  },
848
- /* @__PURE__ */ React7.createElement(
987
+ /* @__PURE__ */ React9.createElement(
849
988
  Image,
850
989
  {
851
990
  sx: { width: "100%", aspectRatio: "16 / 9" },
@@ -853,14 +992,14 @@ var ClassManagerIntroduction = () => {
853
992
  alt: ""
854
993
  }
855
994
  ),
856
- /* @__PURE__ */ React7.createElement(IntroductionContent, null)
995
+ /* @__PURE__ */ React9.createElement(IntroductionContent, null)
857
996
  );
858
997
  };
859
998
  var IntroductionContent = () => {
860
- return /* @__PURE__ */ React7.createElement(Box3, { p: 3 }, /* @__PURE__ */ React7.createElement(Typography2, { variant: "body2" }, __6(
999
+ return /* @__PURE__ */ React9.createElement(Box4, { p: 3 }, /* @__PURE__ */ React9.createElement(Typography3, { variant: "body2" }, __7(
861
1000
  "The Class Manager lets you see all the classes you've created, plus adjust their priority, rename them, and delete unused classes to keep your CSS structured.",
862
1001
  "elementor"
863
- )), /* @__PURE__ */ React7.createElement("br", null), /* @__PURE__ */ React7.createElement(Typography2, { variant: "body2" }, __6(
1002
+ )), /* @__PURE__ */ React9.createElement("br", null), /* @__PURE__ */ React9.createElement(Typography3, { variant: "body2" }, __7(
864
1003
  "Remember, when editing an item within a specific class, any changes you make will apply across all elements in that class.",
865
1004
  "elementor"
866
1005
  )));
@@ -892,16 +1031,16 @@ var reloadDocument = () => {
892
1031
  };
893
1032
 
894
1033
  // src/components/class-manager/flipped-color-swatch-icon.tsx
895
- import * as React8 from "react";
1034
+ import * as React10 from "react";
896
1035
  import { ColorSwatchIcon } from "@elementor/icons";
897
- var FlippedColorSwatchIcon = ({ sx, ...props }) => /* @__PURE__ */ React8.createElement(ColorSwatchIcon, { sx: { transform: "rotate(90deg)", ...sx }, ...props });
1036
+ var FlippedColorSwatchIcon = ({ sx, ...props }) => /* @__PURE__ */ React10.createElement(ColorSwatchIcon, { sx: { transform: "rotate(90deg)", ...sx }, ...props });
898
1037
 
899
1038
  // src/components/class-manager/global-classes-list.tsx
900
- import * as React15 from "react";
1039
+ import * as React17 from "react";
901
1040
  import { useEffect, useMemo as useMemo3 } from "react";
902
1041
  import { __useDispatch as useDispatch } from "@elementor/store";
903
- import { List, Stack as Stack7, styled as styled6, Typography as Typography7 } from "@elementor/ui";
904
- import { __ as __12 } from "@wordpress/i18n";
1042
+ import { List, Stack as Stack8, styled as styled6, Typography as Typography8 } from "@elementor/ui";
1043
+ import { __ as __13 } from "@wordpress/i18n";
905
1044
 
906
1045
  // src/hooks/use-ordered-classes.ts
907
1046
  import { __useSelector as useSelector3 } from "@elementor/store";
@@ -910,31 +1049,31 @@ var useOrderedClasses = () => {
910
1049
  };
911
1050
 
912
1051
  // src/components/class-manager/class-item.tsx
913
- import * as React13 from "react";
1052
+ import * as React15 from "react";
914
1053
  import { useRef, useState as useState4 } from "react";
915
1054
  import { validateStyleLabel } from "@elementor/editor-styles-repository";
916
- import { EditableField, EllipsisWithTooltip as EllipsisWithTooltip2, MenuListItem, useEditable, WarningInfotip } from "@elementor/editor-ui";
1055
+ import { EditableField, EllipsisWithTooltip as EllipsisWithTooltip3, MenuListItem, useEditable, WarningInfotip } from "@elementor/editor-ui";
917
1056
  import { DotsVerticalIcon } from "@elementor/icons";
918
1057
  import {
919
1058
  bindMenu,
920
1059
  bindTrigger as bindTrigger2,
921
- Box as Box7,
1060
+ Box as Box8,
922
1061
  IconButton as IconButton3,
923
1062
  ListItemButton,
924
1063
  Menu,
925
- Stack as Stack5,
1064
+ Stack as Stack6,
926
1065
  styled as styled5,
927
1066
  Tooltip as Tooltip5,
928
- Typography as Typography5,
1067
+ Typography as Typography6,
929
1068
  usePopupState as usePopupState3
930
1069
  } from "@elementor/ui";
931
- import { __ as __10 } from "@wordpress/i18n";
1070
+ import { __ as __11 } from "@wordpress/i18n";
932
1071
 
933
1072
  // src/components/css-class-usage/components/css-class-usage-popover.tsx
934
- import * as React9 from "react";
1073
+ import * as React11 from "react";
935
1074
  import { __useOpenDocumentInNewTab as useOpenDocumentInNewTab } from "@elementor/editor-documents";
936
1075
  import {
937
- EllipsisWithTooltip,
1076
+ EllipsisWithTooltip as EllipsisWithTooltip2,
938
1077
  PopoverBody as PopoverBody2,
939
1078
  PopoverHeader as PopoverHeader2,
940
1079
  PopoverMenuList
@@ -948,8 +1087,8 @@ import {
948
1087
  PopupTemplateIcon,
949
1088
  PostTypeIcon
950
1089
  } from "@elementor/icons";
951
- import { Box as Box4, Chip as Chip3, Divider as Divider2, Icon, MenuList as MenuList2, Stack as Stack4, styled as styled2, Tooltip as Tooltip3, Typography as Typography3 } from "@elementor/ui";
952
- import { __ as __7 } from "@wordpress/i18n";
1090
+ import { Box as Box5, Chip as Chip3, Divider as Divider3, Icon as Icon2, MenuList as MenuList2, Stack as Stack5, styled as styled2, Tooltip as Tooltip3, Typography as Typography4 } from "@elementor/ui";
1091
+ import { __ as __8 } from "@wordpress/i18n";
953
1092
 
954
1093
  // src/hooks/use-css-class-usage-by-id.ts
955
1094
  var EMPTY_CLASS_USAGE = {
@@ -965,24 +1104,24 @@ var useCssClassUsageByID = (id2) => {
965
1104
  // src/components/css-class-usage/components/css-class-usage-popover.tsx
966
1105
  var iconMapper = {
967
1106
  "wp-post": {
968
- label: __7("Post", "elementor"),
969
- icon: /* @__PURE__ */ React9.createElement(PostTypeIcon, { fontSize: "inherit" })
1107
+ label: __8("Post", "elementor"),
1108
+ icon: /* @__PURE__ */ React11.createElement(PostTypeIcon, { fontSize: "inherit" })
970
1109
  },
971
1110
  "wp-page": {
972
- label: __7("Page", "elementor"),
973
- icon: /* @__PURE__ */ React9.createElement(PagesIcon, { fontSize: "inherit" })
1111
+ label: __8("Page", "elementor"),
1112
+ icon: /* @__PURE__ */ React11.createElement(PagesIcon, { fontSize: "inherit" })
974
1113
  },
975
1114
  popup: {
976
- label: __7("Popup", "elementor"),
977
- icon: /* @__PURE__ */ React9.createElement(PopupTemplateIcon, { fontSize: "inherit" })
1115
+ label: __8("Popup", "elementor"),
1116
+ icon: /* @__PURE__ */ React11.createElement(PopupTemplateIcon, { fontSize: "inherit" })
978
1117
  },
979
1118
  header: {
980
- label: __7("Header", "elementor"),
981
- icon: /* @__PURE__ */ React9.createElement(HeaderTemplateIcon, { fontSize: "inherit" })
1119
+ label: __8("Header", "elementor"),
1120
+ icon: /* @__PURE__ */ React11.createElement(HeaderTemplateIcon, { fontSize: "inherit" })
982
1121
  },
983
1122
  footer: {
984
- label: __7("Footer", "elementor"),
985
- icon: /* @__PURE__ */ React9.createElement(FooterTemplateIcon, { fontSize: "inherit" })
1123
+ label: __8("Footer", "elementor"),
1124
+ icon: /* @__PURE__ */ React11.createElement(FooterTemplateIcon, { fontSize: "inherit" })
986
1125
  }
987
1126
  };
988
1127
  var CssClassUsagePopover = ({
@@ -1000,14 +1139,14 @@ var CssClassUsagePopover = ({
1000
1139
  docType: type
1001
1140
  })
1002
1141
  ) ?? [];
1003
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(
1142
+ return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
1004
1143
  PopoverHeader2,
1005
1144
  {
1006
- icon: /* @__PURE__ */ React9.createElement(CurrentLocationIcon, { fontSize: "tiny" }),
1007
- title: /* @__PURE__ */ React9.createElement(Stack4, { flexDirection: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React9.createElement(Box4, { "aria-label": "header-title" }, __7("Locator", "elementor")), /* @__PURE__ */ React9.createElement(Box4, null, /* @__PURE__ */ React9.createElement(Chip3, { sx: { lineHeight: 1 }, size: "tiny", label: classUsage.total }))),
1145
+ icon: /* @__PURE__ */ React11.createElement(CurrentLocationIcon, { fontSize: "tiny" }),
1146
+ title: /* @__PURE__ */ React11.createElement(Stack5, { flexDirection: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React11.createElement(Box5, { "aria-label": "header-title" }, __8("Locator", "elementor")), /* @__PURE__ */ React11.createElement(Box5, null, /* @__PURE__ */ React11.createElement(Chip3, { sx: { lineHeight: 1 }, size: "tiny", label: classUsage.total }))),
1008
1147
  onClose
1009
1148
  }
1010
- ), /* @__PURE__ */ React9.createElement(Divider2, null), /* @__PURE__ */ React9.createElement(PopoverBody2, { width: 300 }, /* @__PURE__ */ React9.createElement(
1149
+ ), /* @__PURE__ */ React11.createElement(Divider3, null), /* @__PURE__ */ React11.createElement(PopoverBody2, { width: 300 }, /* @__PURE__ */ React11.createElement(
1011
1150
  PopoverMenuList,
1012
1151
  {
1013
1152
  onSelect: (value) => onNavigate(+value),
@@ -1015,26 +1154,26 @@ var CssClassUsagePopover = ({
1015
1154
  onClose: () => {
1016
1155
  },
1017
1156
  menuListTemplate: StyledCssClassUsageItem,
1018
- menuItemContentTemplate: (cssClassUsageRecord) => /* @__PURE__ */ React9.createElement(Stack4, { flexDirection: "row", flex: 1, alignItems: "center" }, /* @__PURE__ */ React9.createElement(Box4, { display: "flex", sx: { pr: 1 } }, /* @__PURE__ */ React9.createElement(
1157
+ menuItemContentTemplate: (cssClassUsageRecord) => /* @__PURE__ */ React11.createElement(Stack5, { flexDirection: "row", flex: 1, alignItems: "center" }, /* @__PURE__ */ React11.createElement(Box5, { display: "flex", sx: { pr: 1 } }, /* @__PURE__ */ React11.createElement(
1019
1158
  Tooltip3,
1020
1159
  {
1021
1160
  disableInteractive: true,
1022
1161
  title: iconMapper?.[cssClassUsageRecord.docType]?.label ?? cssClassUsageRecord.docType,
1023
1162
  placement: "top"
1024
1163
  },
1025
- /* @__PURE__ */ React9.createElement(Icon, { fontSize: "small" }, iconMapper?.[cssClassUsageRecord.docType]?.icon || /* @__PURE__ */ React9.createElement(PagesIcon, { fontSize: "inherit" }))
1026
- )), /* @__PURE__ */ React9.createElement(Box4, { sx: { pr: 0.5, maxWidth: "173px" }, display: "flex" }, /* @__PURE__ */ React9.createElement(
1027
- EllipsisWithTooltip,
1164
+ /* @__PURE__ */ React11.createElement(Icon2, { fontSize: "small" }, iconMapper?.[cssClassUsageRecord.docType]?.icon || /* @__PURE__ */ React11.createElement(PagesIcon, { fontSize: "inherit" }))
1165
+ )), /* @__PURE__ */ React11.createElement(Box5, { sx: { pr: 0.5, maxWidth: "173px" }, display: "flex" }, /* @__PURE__ */ React11.createElement(
1166
+ EllipsisWithTooltip2,
1028
1167
  {
1029
1168
  title: cssClassUsageRecord.label,
1030
- as: Typography3,
1169
+ as: Typography4,
1031
1170
  variant: "caption",
1032
1171
  maxWidth: "173px",
1033
1172
  sx: {
1034
1173
  lineHeight: 1
1035
1174
  }
1036
1175
  }
1037
- )), /* @__PURE__ */ React9.createElement(ExternalLinkIcon, { className: "hover-only-icon", fontSize: "tiny" }), /* @__PURE__ */ React9.createElement(
1176
+ )), /* @__PURE__ */ React11.createElement(ExternalLinkIcon, { className: "hover-only-icon", fontSize: "tiny" }), /* @__PURE__ */ React11.createElement(
1038
1177
  Chip3,
1039
1178
  {
1040
1179
  sx: {
@@ -1081,13 +1220,13 @@ var StyledCssClassUsageItem = styled2(MenuList2)(({ theme }) => ({
1081
1220
  }));
1082
1221
 
1083
1222
  // src/components/css-class-usage/components/css-class-usage-trigger.tsx
1084
- import * as React10 from "react";
1223
+ import * as React12 from "react";
1085
1224
  import { InfoAlert } from "@elementor/editor-ui";
1086
1225
  import { CurrentLocationIcon as CurrentLocationIcon2 } from "@elementor/icons";
1087
1226
  import {
1088
1227
  bindPopover as bindPopover2,
1089
1228
  bindTrigger,
1090
- Box as Box5,
1229
+ Box as Box6,
1091
1230
  IconButton as IconButton2,
1092
1231
  Infotip,
1093
1232
  Popover as Popover2,
@@ -1095,7 +1234,7 @@ import {
1095
1234
  Tooltip as Tooltip4,
1096
1235
  usePopupState as usePopupState2
1097
1236
  } from "@elementor/ui";
1098
- import { __ as __8 } from "@wordpress/i18n";
1237
+ import { __ as __9 } from "@wordpress/i18n";
1099
1238
  var CssClassUsageTrigger = ({ id: id2, onClick }) => {
1100
1239
  const {
1101
1240
  data: { total },
@@ -1106,7 +1245,7 @@ var CssClassUsageTrigger = ({ id: id2, onClick }) => {
1106
1245
  return null;
1107
1246
  }
1108
1247
  const WrapperComponent = total !== 0 ? TooltipWrapper : InfoAlertMessage;
1109
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Box5, { position: "relative" }, /* @__PURE__ */ React10.createElement(WrapperComponent, { total }, /* @__PURE__ */ React10.createElement(
1248
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Box6, { position: "relative" }, /* @__PURE__ */ React12.createElement(WrapperComponent, { total }, /* @__PURE__ */ React12.createElement(
1110
1249
  CustomIconButton2,
1111
1250
  {
1112
1251
  disabled: total === 0,
@@ -1119,8 +1258,8 @@ var CssClassUsageTrigger = ({ id: id2, onClick }) => {
1119
1258
  }
1120
1259
  }
1121
1260
  },
1122
- /* @__PURE__ */ React10.createElement(CurrentLocationIcon2, { fontSize: "tiny" })
1123
- ))), /* @__PURE__ */ React10.createElement(Box5, null, /* @__PURE__ */ React10.createElement(
1261
+ /* @__PURE__ */ React12.createElement(CurrentLocationIcon2, { fontSize: "tiny" })
1262
+ ))), /* @__PURE__ */ React12.createElement(Box6, null, /* @__PURE__ */ React12.createElement(
1124
1263
  Popover2,
1125
1264
  {
1126
1265
  anchorOrigin: {
@@ -1137,7 +1276,7 @@ var CssClassUsageTrigger = ({ id: id2, onClick }) => {
1137
1276
  onClick("");
1138
1277
  }
1139
1278
  },
1140
- /* @__PURE__ */ React10.createElement(
1279
+ /* @__PURE__ */ React12.createElement(
1141
1280
  CssClassUsagePopover,
1142
1281
  {
1143
1282
  onClose: cssClassUsagePopover.close,
@@ -1159,80 +1298,80 @@ var CustomIconButton2 = styled3(IconButton2)(({ theme }) => ({
1159
1298
  height: "22px",
1160
1299
  width: "22px"
1161
1300
  }));
1162
- var TooltipWrapper = ({ children, total }) => /* @__PURE__ */ React10.createElement(
1301
+ var TooltipWrapper = ({ children, total }) => /* @__PURE__ */ React12.createElement(
1163
1302
  Tooltip4,
1164
1303
  {
1165
1304
  disableInteractive: true,
1166
1305
  placement: "top",
1167
- title: `${__8("Show {{number}} {{locations}}", "elementor").replace("{{number}}", total.toString()).replace(
1306
+ title: `${__9("Show {{number}} {{locations}}", "elementor").replace("{{number}}", total.toString()).replace(
1168
1307
  "{{locations}}",
1169
- total === 1 ? __8("location", "elementor") : __8("locations", "elementor")
1308
+ total === 1 ? __9("location", "elementor") : __9("locations", "elementor")
1170
1309
  )}`
1171
1310
  },
1172
- /* @__PURE__ */ React10.createElement("span", null, children)
1311
+ /* @__PURE__ */ React12.createElement("span", null, children)
1173
1312
  );
1174
- var InfoAlertMessage = ({ children }) => /* @__PURE__ */ React10.createElement(
1313
+ var InfoAlertMessage = ({ children }) => /* @__PURE__ */ React12.createElement(
1175
1314
  Infotip,
1176
1315
  {
1177
1316
  disableInteractive: true,
1178
1317
  placement: "top",
1179
1318
  color: "secondary",
1180
- content: /* @__PURE__ */ React10.createElement(InfoAlert, { sx: { mt: 1 } }, __8("This class isn\u2019t being used yet.", "elementor"))
1319
+ content: /* @__PURE__ */ React12.createElement(InfoAlert, { sx: { mt: 1 } }, __9("This class isn\u2019t being used yet.", "elementor"))
1181
1320
  },
1182
- /* @__PURE__ */ React10.createElement("span", null, children)
1321
+ /* @__PURE__ */ React12.createElement("span", null, children)
1183
1322
  );
1184
1323
 
1185
1324
  // src/components/class-manager/delete-confirmation-dialog.tsx
1186
- import * as React11 from "react";
1325
+ import * as React13 from "react";
1187
1326
  import { createContext as createContext2, useContext as useContext2, useState as useState3 } from "react";
1188
1327
  import { AlertOctagonFilledIcon } from "@elementor/icons";
1189
1328
  import {
1190
- Button,
1329
+ Button as Button2,
1191
1330
  Dialog,
1192
- DialogActions,
1193
- DialogContent,
1331
+ DialogActions as DialogActions2,
1332
+ DialogContent as DialogContent2,
1194
1333
  DialogContentText,
1195
1334
  DialogTitle,
1196
- Typography as Typography4
1335
+ Typography as Typography5
1197
1336
  } from "@elementor/ui";
1198
- import { __ as __9 } from "@wordpress/i18n";
1337
+ import { __ as __10 } from "@wordpress/i18n";
1199
1338
  var context = createContext2(null);
1200
1339
  var DeleteConfirmationProvider = ({ children }) => {
1201
1340
  const [dialogProps, setDialogProps] = useState3(null);
1202
- const openDialog = (props) => {
1341
+ const openDialog2 = (props) => {
1203
1342
  setDialogProps(props);
1204
1343
  };
1205
- const closeDialog = () => {
1344
+ const closeDialog2 = () => {
1206
1345
  setDialogProps(null);
1207
1346
  };
1208
- return /* @__PURE__ */ React11.createElement(context.Provider, { value: { openDialog, closeDialog, dialogProps } }, children, !!dialogProps && /* @__PURE__ */ React11.createElement(DeleteConfirmationDialog, { ...dialogProps }));
1347
+ return /* @__PURE__ */ React13.createElement(context.Provider, { value: { openDialog: openDialog2, closeDialog: closeDialog2, dialogProps } }, children, !!dialogProps && /* @__PURE__ */ React13.createElement(DeleteConfirmationDialog, { ...dialogProps }));
1209
1348
  };
1210
1349
  var TITLE_ID = "delete-class-dialog";
1211
1350
  var DeleteConfirmationDialog = ({ label, id: id2 }) => {
1212
- const { closeDialog } = useDeleteConfirmation();
1351
+ const { closeDialog: closeDialog2 } = useDeleteConfirmation();
1213
1352
  const {
1214
1353
  data: { total, content }
1215
1354
  } = useCssClassUsageByID(id2);
1216
1355
  const onConfirm = () => {
1217
1356
  deleteClass(id2);
1218
- closeDialog();
1357
+ closeDialog2();
1219
1358
  };
1220
- const text = total && content.length ? __9(
1359
+ const text = total && content.length ? __10(
1221
1360
  "Will permanently remove it from your project and may affect the design across all elements using it. Used %1 times across %2 pages. This action cannot be undone.",
1222
1361
  "elementor"
1223
- ).replace("%1", total.toString()).replace("%2", content.length.toString()) : __9(
1362
+ ).replace("%1", total.toString()).replace("%2", content.length.toString()) : __10(
1224
1363
  "Will permanently remove it from your project and may affect the design across all elements using it. This action cannot be undone.",
1225
1364
  "elementor"
1226
1365
  );
1227
- return /* @__PURE__ */ React11.createElement(Dialog, { open: true, onClose: closeDialog, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, /* @__PURE__ */ React11.createElement(DialogTitle, { id: TITLE_ID, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React11.createElement(AlertOctagonFilledIcon, { color: "error" }), __9("Delete this class?", "elementor")), /* @__PURE__ */ React11.createElement(DialogContent, null, /* @__PURE__ */ React11.createElement(DialogContentText, { variant: "body2", color: "textPrimary" }, __9("Deleting", "elementor"), /* @__PURE__ */ React11.createElement(Typography4, { variant: "subtitle2", component: "span" }, "\xA0", label, "\xA0"), text)), /* @__PURE__ */ React11.createElement(DialogActions, null, /* @__PURE__ */ React11.createElement(Button, { color: "secondary", onClick: closeDialog }, __9("Not now", "elementor")), /* @__PURE__ */ React11.createElement(
1228
- Button,
1366
+ return /* @__PURE__ */ React13.createElement(Dialog, { open: true, onClose: closeDialog2, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, /* @__PURE__ */ React13.createElement(DialogTitle, { id: TITLE_ID, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React13.createElement(AlertOctagonFilledIcon, { color: "error" }), __10("Delete this class?", "elementor")), /* @__PURE__ */ React13.createElement(DialogContent2, null, /* @__PURE__ */ React13.createElement(DialogContentText, { variant: "body2", color: "textPrimary" }, __10("Deleting", "elementor"), /* @__PURE__ */ React13.createElement(Typography5, { variant: "subtitle2", component: "span" }, "\xA0", label, "\xA0"), text)), /* @__PURE__ */ React13.createElement(DialogActions2, null, /* @__PURE__ */ React13.createElement(Button2, { color: "secondary", onClick: closeDialog2 }, __10("Not now", "elementor")), /* @__PURE__ */ React13.createElement(
1367
+ Button2,
1229
1368
  {
1230
1369
  autoFocus: true,
1231
1370
  variant: "contained",
1232
1371
  color: "error",
1233
1372
  onClick: onConfirm
1234
1373
  },
1235
- __9("Delete", "elementor")
1374
+ __10("Delete", "elementor")
1236
1375
  )));
1237
1376
  };
1238
1377
  var useDeleteConfirmation = () => {
@@ -1244,18 +1383,18 @@ var useDeleteConfirmation = () => {
1244
1383
  };
1245
1384
 
1246
1385
  // src/components/class-manager/sortable.tsx
1247
- import * as React12 from "react";
1386
+ import * as React14 from "react";
1248
1387
  import { GripVerticalIcon } from "@elementor/icons";
1249
1388
  import {
1250
- Box as Box6,
1389
+ Box as Box7,
1251
1390
  styled as styled4,
1252
1391
  UnstableSortableItem,
1253
1392
  UnstableSortableProvider
1254
1393
  } from "@elementor/ui";
1255
- var SortableProvider = (props) => /* @__PURE__ */ React12.createElement(UnstableSortableProvider, { restrictAxis: true, variant: "static", dragPlaceholderStyle: { opacity: "1" }, ...props });
1256
- var SortableTrigger = (props) => /* @__PURE__ */ React12.createElement(StyledSortableTrigger, { ...props, role: "button", className: "class-item-sortable-trigger", "aria-label": "sort" }, /* @__PURE__ */ React12.createElement(GripVerticalIcon, { fontSize: "tiny" }));
1394
+ var SortableProvider = (props) => /* @__PURE__ */ React14.createElement(UnstableSortableProvider, { restrictAxis: true, variant: "static", dragPlaceholderStyle: { opacity: "1" }, ...props });
1395
+ var SortableTrigger = (props) => /* @__PURE__ */ React14.createElement(StyledSortableTrigger, { ...props, role: "button", className: "class-item-sortable-trigger", "aria-label": "sort" }, /* @__PURE__ */ React14.createElement(GripVerticalIcon, { fontSize: "tiny" }));
1257
1396
  var SortableItem = ({ children, id: id2, ...props }) => {
1258
- return /* @__PURE__ */ React12.createElement(
1397
+ return /* @__PURE__ */ React14.createElement(
1259
1398
  UnstableSortableItem,
1260
1399
  {
1261
1400
  ...props,
@@ -1271,8 +1410,8 @@ var SortableItem = ({ children, id: id2, ...props }) => {
1271
1410
  isDragOverlay,
1272
1411
  isDragPlaceholder
1273
1412
  }) => {
1274
- return /* @__PURE__ */ React12.createElement(
1275
- Box6,
1413
+ return /* @__PURE__ */ React14.createElement(
1414
+ Box7,
1276
1415
  {
1277
1416
  ...itemProps,
1278
1417
  style: itemStyle,
@@ -1290,7 +1429,7 @@ var SortableItem = ({ children, id: id2, ...props }) => {
1290
1429
  triggerStyle,
1291
1430
  isDragPlaceholder
1292
1431
  }),
1293
- showDropIndication && /* @__PURE__ */ React12.createElement(SortableItemIndicator, { style: dropIndicationStyle })
1432
+ showDropIndication && /* @__PURE__ */ React14.createElement(SortableItemIndicator, { style: dropIndicationStyle })
1294
1433
  );
1295
1434
  }
1296
1435
  }
@@ -1303,7 +1442,7 @@ var StyledSortableTrigger = styled4("div")(({ theme }) => ({
1303
1442
  transform: `translate( -${theme.spacing(1.5)}, -50% )`,
1304
1443
  color: theme.palette.action.active
1305
1444
  }));
1306
- var SortableItemIndicator = styled4(Box6)`
1445
+ var SortableItemIndicator = styled4(Box7)`
1307
1446
  width: 100%;
1308
1447
  height: 1px;
1309
1448
  background-color: ${({ theme }) => theme.palette.text.primary};
@@ -1332,13 +1471,13 @@ var ClassItem = ({
1332
1471
  validation: validateLabel
1333
1472
  });
1334
1473
  const [selectedCssUsage, setSelectedCssUsage] = useState4("");
1335
- const { openDialog } = useDeleteConfirmation();
1474
+ const { openDialog: openDialog2 } = useDeleteConfirmation();
1336
1475
  const popupState = usePopupState3({
1337
1476
  variant: "popover",
1338
1477
  disableAutoFocus: true
1339
1478
  });
1340
1479
  const isSelected = (selectedCssUsage === id2 || selected || popupState.isOpen) && !disabled;
1341
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(Stack5, { p: 0 }, /* @__PURE__ */ React13.createElement(
1480
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Stack6, { p: 0 }, /* @__PURE__ */ React15.createElement(
1342
1481
  WarningInfotip,
1343
1482
  {
1344
1483
  open: Boolean(error),
@@ -1347,7 +1486,7 @@ var ClassItem = ({
1347
1486
  width: itemRef.current?.getBoundingClientRect().width,
1348
1487
  offset: [0, -15]
1349
1488
  },
1350
- /* @__PURE__ */ React13.createElement(
1489
+ /* @__PURE__ */ React15.createElement(
1351
1490
  StyledListItemButton,
1352
1491
  {
1353
1492
  ref: itemRef,
@@ -1361,28 +1500,28 @@ var ClassItem = ({
1361
1500
  disabled,
1362
1501
  focusVisibleClassName: "visible-class-item"
1363
1502
  },
1364
- /* @__PURE__ */ React13.createElement(SortableTrigger, { ...sortableTriggerProps }),
1365
- /* @__PURE__ */ React13.createElement(Indicator, { isActive: isEditing, isError: !!error }, isEditing ? /* @__PURE__ */ React13.createElement(
1503
+ /* @__PURE__ */ React15.createElement(SortableTrigger, { ...sortableTriggerProps }),
1504
+ /* @__PURE__ */ React15.createElement(Indicator, { isActive: isEditing, isError: !!error }, isEditing ? /* @__PURE__ */ React15.createElement(
1366
1505
  EditableField,
1367
1506
  {
1368
1507
  ref: editableRef,
1369
- as: Typography5,
1508
+ as: Typography6,
1370
1509
  variant: "caption",
1371
1510
  ...getEditableProps()
1372
1511
  }
1373
- ) : /* @__PURE__ */ React13.createElement(EllipsisWithTooltip2, { title: label, as: Typography5, variant: "caption" })),
1374
- /* @__PURE__ */ React13.createElement(Box7, { className: "class-item-locator" }, /* @__PURE__ */ React13.createElement(CssClassUsageTrigger, { id: id2, onClick: setSelectedCssUsage })),
1375
- /* @__PURE__ */ React13.createElement(
1512
+ ) : /* @__PURE__ */ React15.createElement(EllipsisWithTooltip3, { title: label, as: Typography6, variant: "caption" })),
1513
+ /* @__PURE__ */ React15.createElement(Box8, { className: "class-item-locator" }, /* @__PURE__ */ React15.createElement(CssClassUsageTrigger, { id: id2, onClick: setSelectedCssUsage })),
1514
+ /* @__PURE__ */ React15.createElement(
1376
1515
  Tooltip5,
1377
1516
  {
1378
1517
  placement: "top",
1379
1518
  className: "class-item-more-actions",
1380
- title: __10("More actions", "elementor")
1519
+ title: __11("More actions", "elementor")
1381
1520
  },
1382
- /* @__PURE__ */ React13.createElement(IconButton3, { size: "tiny", ...bindTrigger2(popupState), "aria-label": "More actions" }, /* @__PURE__ */ React13.createElement(DotsVerticalIcon, { fontSize: "tiny" }))
1521
+ /* @__PURE__ */ React15.createElement(IconButton3, { size: "tiny", ...bindTrigger2(popupState), "aria-label": "More actions" }, /* @__PURE__ */ React15.createElement(DotsVerticalIcon, { fontSize: "tiny" }))
1383
1522
  )
1384
1523
  )
1385
- )), /* @__PURE__ */ React13.createElement(
1524
+ )), /* @__PURE__ */ React15.createElement(
1386
1525
  Menu,
1387
1526
  {
1388
1527
  ...bindMenu(popupState),
@@ -1395,7 +1534,7 @@ var ClassItem = ({
1395
1534
  horizontal: "right"
1396
1535
  }
1397
1536
  },
1398
- /* @__PURE__ */ React13.createElement(
1537
+ /* @__PURE__ */ React15.createElement(
1399
1538
  MenuListItem,
1400
1539
  {
1401
1540
  sx: { minWidth: "160px" },
@@ -1404,17 +1543,17 @@ var ClassItem = ({
1404
1543
  openEditMode();
1405
1544
  }
1406
1545
  },
1407
- /* @__PURE__ */ React13.createElement(Typography5, { variant: "caption", sx: { color: "text.primary" } }, __10("Rename", "elementor"))
1546
+ /* @__PURE__ */ React15.createElement(Typography6, { variant: "caption", sx: { color: "text.primary" } }, __11("Rename", "elementor"))
1408
1547
  ),
1409
- /* @__PURE__ */ React13.createElement(
1548
+ /* @__PURE__ */ React15.createElement(
1410
1549
  MenuListItem,
1411
1550
  {
1412
1551
  onClick: () => {
1413
1552
  popupState.close();
1414
- openDialog({ id: id2, label });
1553
+ openDialog2({ id: id2, label });
1415
1554
  }
1416
1555
  },
1417
- /* @__PURE__ */ React13.createElement(Typography5, { variant: "caption", sx: { color: "error.light" } }, __10("Delete", "elementor"))
1556
+ /* @__PURE__ */ React15.createElement(Typography6, { variant: "caption", sx: { color: "error.light" } }, __11("Delete", "elementor"))
1418
1557
  )
1419
1558
  ));
1420
1559
  };
@@ -1447,7 +1586,7 @@ var StyledListItemButton = styled5(ListItemButton, {
1447
1586
  }
1448
1587
  `
1449
1588
  );
1450
- var Indicator = styled5(Box7, {
1589
+ var Indicator = styled5(Box8, {
1451
1590
  shouldForwardProp: (prop) => !["isActive", "isError"].includes(prop)
1452
1591
  })(({ theme, isActive, isError }) => ({
1453
1592
  display: "flex",
@@ -1477,10 +1616,10 @@ var validateLabel = (newLabel) => {
1477
1616
  };
1478
1617
 
1479
1618
  // src/components/class-manager/not-found.tsx
1480
- import * as React14 from "react";
1619
+ import * as React16 from "react";
1481
1620
  import { ColorSwatchIcon as ColorSwatchIcon2, PhotoIcon } from "@elementor/icons";
1482
- import { Box as Box8, Link, Stack as Stack6, Typography as Typography6 } from "@elementor/ui";
1483
- import { __ as __11 } from "@wordpress/i18n";
1621
+ import { Box as Box9, Link, Stack as Stack7, Typography as Typography7 } from "@elementor/ui";
1622
+ import { __ as __12 } from "@wordpress/i18n";
1484
1623
  var getNotFoundType = (searchValue, filters, filteredClasses) => {
1485
1624
  const searchNotFound = filteredClasses.length <= 0 && searchValue.length > 1;
1486
1625
  const filterNotFound = filters && filters.length === 0;
@@ -1498,19 +1637,19 @@ var getNotFoundType = (searchValue, filters, filteredClasses) => {
1498
1637
  };
1499
1638
  var notFound = {
1500
1639
  filterAndSearch: {
1501
- mainText: __11("Sorry, nothing matched.", "elementor"),
1502
- sceneryText: __11("Try something else.", "elementor"),
1503
- icon: /* @__PURE__ */ React14.createElement(PhotoIcon, { color: "inherit", fontSize: "large" })
1640
+ mainText: __12("Sorry, nothing matched.", "elementor"),
1641
+ sceneryText: __12("Try something else.", "elementor"),
1642
+ icon: /* @__PURE__ */ React16.createElement(PhotoIcon, { color: "inherit", fontSize: "large" })
1504
1643
  },
1505
1644
  search: {
1506
- mainText: __11("Sorry, nothing matched", "elementor"),
1507
- sceneryText: __11("Clear your input and try something else.", "elementor"),
1508
- icon: /* @__PURE__ */ React14.createElement(PhotoIcon, { color: "inherit", fontSize: "large" })
1645
+ mainText: __12("Sorry, nothing matched", "elementor"),
1646
+ sceneryText: __12("Clear your input and try something else.", "elementor"),
1647
+ icon: /* @__PURE__ */ React16.createElement(PhotoIcon, { color: "inherit", fontSize: "large" })
1509
1648
  },
1510
1649
  filter: {
1511
- mainText: __11("Sorry, nothing matched that search.", "elementor"),
1512
- sceneryText: __11("Clear the filters and try something else.", "elementor"),
1513
- icon: /* @__PURE__ */ React14.createElement(ColorSwatchIcon2, { color: "inherit", fontSize: "large" })
1650
+ mainText: __12("Sorry, nothing matched that search.", "elementor"),
1651
+ sceneryText: __12("Clear the filters and try something else.", "elementor"),
1652
+ icon: /* @__PURE__ */ React16.createElement(ColorSwatchIcon2, { color: "inherit", fontSize: "large" })
1514
1653
  }
1515
1654
  };
1516
1655
  var NotFound = ({ notFoundType }) => {
@@ -1520,11 +1659,11 @@ var NotFound = ({ notFoundType }) => {
1520
1659
  } = useSearchAndFilters();
1521
1660
  switch (notFoundType) {
1522
1661
  case "filter":
1523
- return /* @__PURE__ */ React14.createElement(NotFoundLayout, { ...notFound.filter, onClear: onClearFilter });
1662
+ return /* @__PURE__ */ React16.createElement(NotFoundLayout, { ...notFound.filter, onClear: onClearFilter });
1524
1663
  case "search":
1525
- return /* @__PURE__ */ React14.createElement(NotFoundLayout, { ...notFound.search, searchValue: inputValue, onClear: onClearSearch });
1664
+ return /* @__PURE__ */ React16.createElement(NotFoundLayout, { ...notFound.search, searchValue: inputValue, onClear: onClearSearch });
1526
1665
  case "filterAndSearch":
1527
- return /* @__PURE__ */ React14.createElement(
1666
+ return /* @__PURE__ */ React16.createElement(
1528
1667
  NotFoundLayout,
1529
1668
  {
1530
1669
  ...notFound.filterAndSearch,
@@ -1536,8 +1675,8 @@ var NotFound = ({ notFoundType }) => {
1536
1675
  );
1537
1676
  }
1538
1677
  };
1539
- var NotFoundLayout = ({ onClear, searchValue, mainText, sceneryText, icon }) => /* @__PURE__ */ React14.createElement(
1540
- Stack6,
1678
+ var NotFoundLayout = ({ onClear, searchValue, mainText, sceneryText, icon }) => /* @__PURE__ */ React16.createElement(
1679
+ Stack7,
1541
1680
  {
1542
1681
  color: "text.secondary",
1543
1682
  pt: 5,
@@ -1547,16 +1686,16 @@ var NotFoundLayout = ({ onClear, searchValue, mainText, sceneryText, icon }) =>
1547
1686
  justifySelf: "center"
1548
1687
  },
1549
1688
  icon,
1550
- /* @__PURE__ */ React14.createElement(
1551
- Box8,
1689
+ /* @__PURE__ */ React16.createElement(
1690
+ Box9,
1552
1691
  {
1553
1692
  sx: {
1554
1693
  width: "100%"
1555
1694
  }
1556
1695
  },
1557
- /* @__PURE__ */ React14.createElement(Typography6, { align: "center", variant: "subtitle2", color: "inherit" }, mainText),
1558
- searchValue && /* @__PURE__ */ React14.createElement(
1559
- Typography6,
1696
+ /* @__PURE__ */ React16.createElement(Typography7, { align: "center", variant: "subtitle2", color: "inherit" }, mainText),
1697
+ searchValue && /* @__PURE__ */ React16.createElement(
1698
+ Typography7,
1560
1699
  {
1561
1700
  variant: "subtitle2",
1562
1701
  color: "inherit",
@@ -1566,8 +1705,8 @@ var NotFoundLayout = ({ onClear, searchValue, mainText, sceneryText, icon }) =>
1566
1705
  justifyContent: "center"
1567
1706
  }
1568
1707
  },
1569
- /* @__PURE__ */ React14.createElement("span", null, "\u201C"),
1570
- /* @__PURE__ */ React14.createElement(
1708
+ /* @__PURE__ */ React16.createElement("span", null, "\u201C"),
1709
+ /* @__PURE__ */ React16.createElement(
1571
1710
  "span",
1572
1711
  {
1573
1712
  style: {
@@ -1578,11 +1717,11 @@ var NotFoundLayout = ({ onClear, searchValue, mainText, sceneryText, icon }) =>
1578
1717
  },
1579
1718
  searchValue
1580
1719
  ),
1581
- /* @__PURE__ */ React14.createElement("span", null, "\u201D.")
1720
+ /* @__PURE__ */ React16.createElement("span", null, "\u201D.")
1582
1721
  )
1583
1722
  ),
1584
- /* @__PURE__ */ React14.createElement(Typography6, { align: "center", variant: "caption", color: "inherit" }, sceneryText),
1585
- /* @__PURE__ */ React14.createElement(Typography6, { align: "center", variant: "caption", color: "inherit" }, /* @__PURE__ */ React14.createElement(Link, { color: "secondary", variant: "caption", component: "button", onClick: onClear }, __11("Clear & try again", "elementor")))
1723
+ /* @__PURE__ */ React16.createElement(Typography7, { align: "center", variant: "caption", color: "inherit" }, sceneryText),
1724
+ /* @__PURE__ */ React16.createElement(Typography7, { align: "center", variant: "caption", color: "inherit" }, /* @__PURE__ */ React16.createElement(Link, { color: "secondary", variant: "caption", component: "button", onClick: onClear }, __12("Clear & try again", "elementor")))
1586
1725
  );
1587
1726
 
1588
1727
  // src/components/class-manager/global-classes-list.tsx
@@ -1613,22 +1752,22 @@ var GlobalClassesList = ({ disabled }) => {
1613
1752
  return () => window.removeEventListener("keydown", handler);
1614
1753
  }, [dispatch5]);
1615
1754
  if (!cssClasses?.length) {
1616
- return /* @__PURE__ */ React15.createElement(EmptyState, null);
1755
+ return /* @__PURE__ */ React17.createElement(EmptyState, null);
1617
1756
  }
1618
1757
  const notFoundType = getNotFoundType(searchValue, filters, filteredCssClasses);
1619
1758
  if (notFoundType) {
1620
- return /* @__PURE__ */ React15.createElement(NotFound, { notFoundType });
1759
+ return /* @__PURE__ */ React17.createElement(NotFound, { notFoundType });
1621
1760
  }
1622
1761
  const isFiltersApplied = filters?.length || searchValue;
1623
1762
  const allowSorting = filteredCssClasses.length > 1 && !isFiltersApplied;
1624
- return /* @__PURE__ */ React15.createElement(DeleteConfirmationProvider, null, /* @__PURE__ */ React15.createElement(List, { sx: { display: "flex", flexDirection: "column", gap: 0.5 } }, /* @__PURE__ */ React15.createElement(
1763
+ return /* @__PURE__ */ React17.createElement(DeleteConfirmationProvider, null, /* @__PURE__ */ React17.createElement(List, { sx: { display: "flex", flexDirection: "column", gap: 0.5 } }, /* @__PURE__ */ React17.createElement(
1625
1764
  SortableProvider,
1626
1765
  {
1627
1766
  value: classesOrder,
1628
1767
  onChange: reorderClasses,
1629
1768
  disableDragOverlay: !allowSorting
1630
1769
  },
1631
- filteredCssClasses?.map(({ id: id2, label }) => /* @__PURE__ */ React15.createElement(SortableItem, { key: id2, id: id2 }, ({ isDragged, isDragPlaceholder, triggerProps, triggerStyle }) => /* @__PURE__ */ React15.createElement(
1770
+ filteredCssClasses?.map(({ id: id2, label }) => /* @__PURE__ */ React17.createElement(SortableItem, { key: id2, id: id2 }, ({ isDragged, isDragPlaceholder, triggerProps, triggerStyle }) => /* @__PURE__ */ React17.createElement(
1632
1771
  ClassItem,
1633
1772
  {
1634
1773
  id: id2,
@@ -1651,11 +1790,11 @@ var GlobalClassesList = ({ disabled }) => {
1651
1790
  )))
1652
1791
  )));
1653
1792
  };
1654
- var EmptyState = () => /* @__PURE__ */ React15.createElement(Stack7, { alignItems: "center", gap: 1.5, pt: 10, px: 0.5, maxWidth: "260px", margin: "auto" }, /* @__PURE__ */ React15.createElement(FlippedColorSwatchIcon, { fontSize: "large" }), /* @__PURE__ */ React15.createElement(StyledHeader, { variant: "subtitle2", component: "h2", color: "text.secondary" }, __12("There are no global classes yet.", "elementor")), /* @__PURE__ */ React15.createElement(Typography7, { align: "center", variant: "caption", color: "text.secondary" }, __12(
1793
+ var EmptyState = () => /* @__PURE__ */ React17.createElement(Stack8, { alignItems: "center", gap: 1.5, pt: 10, px: 0.5, maxWidth: "260px", margin: "auto" }, /* @__PURE__ */ React17.createElement(FlippedColorSwatchIcon, { fontSize: "large" }), /* @__PURE__ */ React17.createElement(StyledHeader, { variant: "subtitle2", component: "h2", color: "text.secondary" }, __13("There are no global classes yet.", "elementor")), /* @__PURE__ */ React17.createElement(Typography8, { align: "center", variant: "caption", color: "text.secondary" }, __13(
1655
1794
  "CSS classes created in the editor panel will appear here. Once they are available, you can arrange their hierarchy, rename them, or delete them as needed.",
1656
1795
  "elementor"
1657
1796
  )));
1658
- var StyledHeader = styled6(Typography7)(({ theme, variant }) => ({
1797
+ var StyledHeader = styled6(Typography8)(({ theme, variant }) => ({
1659
1798
  "&.MuiTypography-root": {
1660
1799
  ...theme.typography[variant]
1661
1800
  }
@@ -1705,44 +1844,6 @@ function unblockPanelInteractions() {
1705
1844
  extendedWindow.$e?.components?.get?.("panel")?.unblockUserInteractions?.();
1706
1845
  }
1707
1846
 
1708
- // src/components/class-manager/save-changes-dialog.tsx
1709
- import * as React16 from "react";
1710
- import { useState as useState5 } from "react";
1711
- import { AlertTriangleFilledIcon } from "@elementor/icons";
1712
- import {
1713
- Button as Button2,
1714
- Dialog as Dialog2,
1715
- DialogActions as DialogActions2,
1716
- DialogContent as DialogContent2,
1717
- DialogContentText as DialogContentText2,
1718
- DialogTitle as DialogTitle2
1719
- } from "@elementor/ui";
1720
- var TITLE_ID2 = "save-changes-dialog";
1721
- var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */ React16.createElement(Dialog2, { open: true, onClose, "aria-labelledby": TITLE_ID2, maxWidth: "xs" }, children);
1722
- var SaveChangesDialogTitle = ({ children }) => /* @__PURE__ */ React16.createElement(DialogTitle2, { id: TITLE_ID2, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React16.createElement(AlertTriangleFilledIcon, { color: "secondary" }), children);
1723
- var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */ React16.createElement(DialogContent2, null, children);
1724
- var SaveChangesDialogContentText = (props) => /* @__PURE__ */ React16.createElement(DialogContentText2, { variant: "body2", color: "textPrimary", display: "flex", flexDirection: "column", ...props });
1725
- var SaveChangesDialogActions = ({ actions }) => {
1726
- const [isConfirming, setIsConfirming] = useState5(false);
1727
- const { cancel, confirm, discard } = actions;
1728
- const onConfirm = async () => {
1729
- setIsConfirming(true);
1730
- await confirm.action();
1731
- setIsConfirming(false);
1732
- };
1733
- return /* @__PURE__ */ React16.createElement(DialogActions2, null, cancel && /* @__PURE__ */ React16.createElement(Button2, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React16.createElement(Button2, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React16.createElement(Button2, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
1734
- };
1735
- SaveChangesDialog.Title = SaveChangesDialogTitle;
1736
- SaveChangesDialog.Content = SaveChangesDialogContent;
1737
- SaveChangesDialog.ContentText = SaveChangesDialogContentText;
1738
- SaveChangesDialog.Actions = SaveChangesDialogActions;
1739
- var useDialog = () => {
1740
- const [isOpen, setIsOpen] = useState5(false);
1741
- const open = () => setIsOpen(true);
1742
- const close = () => setIsOpen(false);
1743
- return { isOpen, open, close };
1744
- };
1745
-
1746
1847
  // src/components/class-manager/class-manager-panel.tsx
1747
1848
  var id = "global-classes-manager";
1748
1849
  var { panel, usePanelActions } = createPanel({
@@ -1768,7 +1869,7 @@ function ClassManagerPanel() {
1768
1869
  closeSaveChangesDialog();
1769
1870
  };
1770
1871
  usePreventUnload();
1771
- return /* @__PURE__ */ React17.createElement(ThemeProvider, null, /* @__PURE__ */ React17.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React17.createElement(ErrorBoundaryFallback, null) }, /* @__PURE__ */ React17.createElement(Panel, null, /* @__PURE__ */ React17.createElement(SearchAndFilterProvider, null, /* @__PURE__ */ React17.createElement(PanelHeader, null, /* @__PURE__ */ React17.createElement(Stack8, { p: 1, pl: 2, width: "100%", direction: "row", alignItems: "center" }, /* @__PURE__ */ React17.createElement(Stack8, { width: "100%", direction: "row", gap: 1 }, /* @__PURE__ */ React17.createElement(PanelHeaderTitle, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React17.createElement(FlippedColorSwatchIcon, { fontSize: "inherit" }), __13("Class Manager", "elementor")), /* @__PURE__ */ React17.createElement(TotalCssClassCounter, null)), /* @__PURE__ */ React17.createElement(
1872
+ return /* @__PURE__ */ React18.createElement(ThemeProvider, null, /* @__PURE__ */ React18.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React18.createElement(ErrorBoundaryFallback, null) }, /* @__PURE__ */ React18.createElement(Panel, null, /* @__PURE__ */ React18.createElement(SearchAndFilterProvider, null, /* @__PURE__ */ React18.createElement(PanelHeader, null, /* @__PURE__ */ React18.createElement(Stack9, { p: 1, pl: 2, width: "100%", direction: "row", alignItems: "center" }, /* @__PURE__ */ React18.createElement(Stack9, { width: "100%", direction: "row", gap: 1 }, /* @__PURE__ */ React18.createElement(PanelHeaderTitle, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React18.createElement(FlippedColorSwatchIcon, { fontSize: "inherit" }), __14("Class Manager", "elementor")), /* @__PURE__ */ React18.createElement(TotalCssClassCounter, null)), /* @__PURE__ */ React18.createElement(
1772
1873
  CloseButton,
1773
1874
  {
1774
1875
  sx: { marginLeft: "auto" },
@@ -1781,7 +1882,7 @@ function ClassManagerPanel() {
1781
1882
  closePanel();
1782
1883
  }
1783
1884
  }
1784
- ))), /* @__PURE__ */ React17.createElement(
1885
+ ))), /* @__PURE__ */ React18.createElement(
1785
1886
  PanelBody,
1786
1887
  {
1787
1888
  sx: {
@@ -1790,10 +1891,10 @@ function ClassManagerPanel() {
1790
1891
  height: "100%"
1791
1892
  }
1792
1893
  },
1793
- /* @__PURE__ */ React17.createElement(Box9, { px: 2, pb: 1 }, /* @__PURE__ */ React17.createElement(Stack8, { direction: "row", justifyContent: "spaceBetween", gap: 0.5, sx: { pb: 0.5 } }, /* @__PURE__ */ React17.createElement(Box9, { sx: { flexGrow: 1 } }, /* @__PURE__ */ React17.createElement(ClassManagerSearch, null)), /* @__PURE__ */ React17.createElement(CssClassFilter, null)), /* @__PURE__ */ React17.createElement(ActiveFilters, null)),
1794
- /* @__PURE__ */ React17.createElement(Divider3, null),
1795
- /* @__PURE__ */ React17.createElement(
1796
- Box9,
1894
+ /* @__PURE__ */ React18.createElement(Box10, { px: 2, pb: 1 }, /* @__PURE__ */ React18.createElement(Stack9, { direction: "row", justifyContent: "spaceBetween", gap: 0.5, sx: { pb: 0.5 } }, /* @__PURE__ */ React18.createElement(Box10, { sx: { flexGrow: 1 } }, /* @__PURE__ */ React18.createElement(ClassManagerSearch, null)), /* @__PURE__ */ React18.createElement(CssClassFilter, null)), /* @__PURE__ */ React18.createElement(ActiveFilters, null)),
1895
+ /* @__PURE__ */ React18.createElement(Divider4, null),
1896
+ /* @__PURE__ */ React18.createElement(
1897
+ Box10,
1797
1898
  {
1798
1899
  px: 2,
1799
1900
  sx: {
@@ -1801,9 +1902,9 @@ function ClassManagerPanel() {
1801
1902
  overflowY: "auto"
1802
1903
  }
1803
1904
  },
1804
- /* @__PURE__ */ React17.createElement(GlobalClassesList, { disabled: isPublishing })
1905
+ /* @__PURE__ */ React18.createElement(GlobalClassesList, { disabled: isPublishing })
1805
1906
  )
1806
- ), /* @__PURE__ */ React17.createElement(PanelFooter, null, /* @__PURE__ */ React17.createElement(
1907
+ ), /* @__PURE__ */ React18.createElement(PanelFooter, null, /* @__PURE__ */ React18.createElement(
1807
1908
  Button3,
1808
1909
  {
1809
1910
  fullWidth: true,
@@ -1814,19 +1915,19 @@ function ClassManagerPanel() {
1814
1915
  disabled: !isDirty2,
1815
1916
  loading: isPublishing
1816
1917
  },
1817
- __13("Save changes", "elementor")
1818
- ))))), /* @__PURE__ */ React17.createElement(ClassManagerIntroduction, null), isSaveChangesDialogOpen && /* @__PURE__ */ React17.createElement(SaveChangesDialog, null, /* @__PURE__ */ React17.createElement(DialogHeader, { onClose: closeSaveChangesDialog, logo: false }, /* @__PURE__ */ React17.createElement(SaveChangesDialog.Title, null, __13("You have unsaved changes", "elementor"))), /* @__PURE__ */ React17.createElement(SaveChangesDialog.Content, null, /* @__PURE__ */ React17.createElement(SaveChangesDialog.ContentText, null, __13("You have unsaved changes in the Class Manager.", "elementor")), /* @__PURE__ */ React17.createElement(SaveChangesDialog.ContentText, null, __13("To avoid losing your updates, save your changes before leaving.", "elementor"))), /* @__PURE__ */ React17.createElement(
1918
+ __14("Save changes", "elementor")
1919
+ ))))), /* @__PURE__ */ React18.createElement(ClassManagerIntroduction, null), isSaveChangesDialogOpen && /* @__PURE__ */ React18.createElement(SaveChangesDialog, null, /* @__PURE__ */ React18.createElement(DialogHeader2, { onClose: closeSaveChangesDialog, logo: false }, /* @__PURE__ */ React18.createElement(SaveChangesDialog.Title, null, __14("You have unsaved changes", "elementor"))), /* @__PURE__ */ React18.createElement(SaveChangesDialog.Content, null, /* @__PURE__ */ React18.createElement(SaveChangesDialog.ContentText, null, __14("You have unsaved changes in the Class Manager.", "elementor")), /* @__PURE__ */ React18.createElement(SaveChangesDialog.ContentText, null, __14("To avoid losing your updates, save your changes before leaving.", "elementor"))), /* @__PURE__ */ React18.createElement(
1819
1920
  SaveChangesDialog.Actions,
1820
1921
  {
1821
1922
  actions: {
1822
1923
  discard: {
1823
- label: __13("Discard", "elementor"),
1924
+ label: __14("Discard", "elementor"),
1824
1925
  action: () => {
1825
1926
  resetAndClosePanel();
1826
1927
  }
1827
1928
  },
1828
1929
  confirm: {
1829
- label: __13("Save & Continue", "elementor"),
1930
+ label: __14("Save & Continue", "elementor"),
1830
1931
  action: async () => {
1831
1932
  await publish();
1832
1933
  closeSaveChangesDialog();
@@ -1837,8 +1938,8 @@ function ClassManagerPanel() {
1837
1938
  }
1838
1939
  )));
1839
1940
  }
1840
- var CloseButton = ({ onClose, ...props }) => /* @__PURE__ */ React17.createElement(IconButton4, { size: "small", color: "secondary", onClick: onClose, "aria-label": "Close", ...props }, /* @__PURE__ */ React17.createElement(XIcon, { fontSize: "small" }));
1841
- var ErrorBoundaryFallback = () => /* @__PURE__ */ React17.createElement(Box9, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React17.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React17.createElement("strong", null, __13("Something went wrong", "elementor"))));
1941
+ var CloseButton = ({ onClose, ...props }) => /* @__PURE__ */ React18.createElement(IconButton4, { size: "small", color: "secondary", onClick: onClose, "aria-label": "Close", ...props }, /* @__PURE__ */ React18.createElement(XIcon, { fontSize: "small" }));
1942
+ var ErrorBoundaryFallback = () => /* @__PURE__ */ React18.createElement(Box10, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React18.createElement(Alert2, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React18.createElement("strong", null, __14("Something went wrong", "elementor"))));
1842
1943
  var usePreventUnload = () => {
1843
1944
  const isDirty2 = useDirtyState();
1844
1945
  useEffect2(() => {
@@ -1867,7 +1968,7 @@ var usePublish = () => {
1867
1968
  var TotalCssClassCounter = () => {
1868
1969
  const filters = useFilters();
1869
1970
  const cssClasses = useClassesOrder();
1870
- return /* @__PURE__ */ React17.createElement(
1971
+ return /* @__PURE__ */ React18.createElement(
1871
1972
  Chip4,
1872
1973
  {
1873
1974
  size: "small",
@@ -1881,7 +1982,7 @@ var ClassManagerButton = () => {
1881
1982
  const document = useActiveDocument2();
1882
1983
  const { open: openPanel } = usePanelActions();
1883
1984
  const { save: saveDocument } = useActiveDocumentActions();
1884
- const { open: openSaveChangesDialog, close: closeSaveChangesDialog, isOpen: isSaveChangesDialogOpen } = useDialog();
1985
+ const { open: openSaveChangesDialog, close: closeSaveChangesDialog, isOpen: isSaveChangesDialogOpen } = useDialog2();
1885
1986
  const { prefetchClassesUsage } = usePrefetchCssClassUsage();
1886
1987
  const { userCan } = useUserStylesCapability();
1887
1988
  const isUserAllowedToUpdateClass = userCan(globalClassesStylesProvider.getKey()).update;
@@ -1896,19 +1997,19 @@ var ClassManagerButton = () => {
1896
1997
  openPanel();
1897
1998
  prefetchClassesUsage();
1898
1999
  };
1899
- return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(Tooltip6, { title: __14("Class Manager", "elementor"), placement: "top" }, /* @__PURE__ */ React18.createElement(IconButton5, { size: "tiny", onClick: handleOpenPanel, sx: { marginInlineEnd: -0.75 } }, /* @__PURE__ */ React18.createElement(FlippedColorSwatchIcon, { fontSize: "tiny" }))), isSaveChangesDialogOpen && /* @__PURE__ */ React18.createElement(SaveChangesDialog, null, /* @__PURE__ */ React18.createElement(SaveChangesDialog.Title, null, __14("You have unsaved changes", "elementor")), /* @__PURE__ */ React18.createElement(SaveChangesDialog.Content, null, /* @__PURE__ */ React18.createElement(SaveChangesDialog.ContentText, { sx: { mb: 2 } }, __14(
2000
+ return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(Tooltip6, { title: __15("Class Manager", "elementor"), placement: "top" }, /* @__PURE__ */ React19.createElement(IconButton5, { size: "tiny", onClick: handleOpenPanel, sx: { marginInlineEnd: -0.75 } }, /* @__PURE__ */ React19.createElement(FlippedColorSwatchIcon, { fontSize: "tiny" }))), isSaveChangesDialogOpen && /* @__PURE__ */ React19.createElement(SaveChangesDialog2, null, /* @__PURE__ */ React19.createElement(SaveChangesDialog2.Title, null, __15("You have unsaved changes", "elementor")), /* @__PURE__ */ React19.createElement(SaveChangesDialog2.Content, null, /* @__PURE__ */ React19.createElement(SaveChangesDialog2.ContentText, { sx: { mb: 2 } }, __15(
1900
2001
  "To open the Class Manager, save your page first. You can't continue without saving.",
1901
2002
  "elementor"
1902
- ))), /* @__PURE__ */ React18.createElement(
1903
- SaveChangesDialog.Actions,
2003
+ ))), /* @__PURE__ */ React19.createElement(
2004
+ SaveChangesDialog2.Actions,
1904
2005
  {
1905
2006
  actions: {
1906
2007
  cancel: {
1907
- label: __14("Stay here", "elementor"),
2008
+ label: __15("Stay here", "elementor"),
1908
2009
  action: closeSaveChangesDialog
1909
2010
  },
1910
2011
  confirm: {
1911
- label: __14("Save & Continue", "elementor"),
2012
+ label: __15("Save & Continue", "elementor"),
1912
2013
  action: async () => {
1913
2014
  await saveDocument();
1914
2015
  closeSaveChangesDialog();
@@ -1922,11 +2023,11 @@ var ClassManagerButton = () => {
1922
2023
  };
1923
2024
 
1924
2025
  // src/components/convert-local-class-to-global-class.tsx
1925
- import * as React19 from "react";
2026
+ import * as React20 from "react";
1926
2027
  import { validateStyleLabel as validateStyleLabel2 } from "@elementor/editor-styles-repository";
1927
2028
  import { MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
1928
- import { Divider as Divider4 } from "@elementor/ui";
1929
- import { __ as __15 } from "@wordpress/i18n";
2029
+ import { Divider as Divider5 } from "@elementor/ui";
2030
+ import { __ as __16 } from "@wordpress/i18n";
1930
2031
  var ConvertLocalClassToGlobalClass = (props) => {
1931
2032
  const localStyleData = props.styleDef;
1932
2033
  const handleConversion = () => {
@@ -1939,7 +2040,7 @@ var ConvertLocalClassToGlobalClass = (props) => {
1939
2040
  props.successCallback(newId);
1940
2041
  }
1941
2042
  };
1942
- return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
2043
+ return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(
1943
2044
  MenuListItem2,
1944
2045
  {
1945
2046
  disabled: !props.canConvert,
@@ -1953,8 +2054,8 @@ var ConvertLocalClassToGlobalClass = (props) => {
1953
2054
  }
1954
2055
  }
1955
2056
  },
1956
- __15("Convert to global class", "elementor")
1957
- ), /* @__PURE__ */ React19.createElement(Divider4, null));
2057
+ __16("Convert to global class", "elementor")
2058
+ ), /* @__PURE__ */ React20.createElement(Divider5, null));
1958
2059
  };
1959
2060
  function createClassName(prefix) {
1960
2061
  let i = 1;
@@ -1993,14 +2094,18 @@ function PopulateStore() {
1993
2094
  return null;
1994
2095
  }
1995
2096
 
2097
+ // src/sync-with-document.tsx
2098
+ import { useEffect as useEffect4 } from "react";
2099
+ import { __privateListenTo as listenTo, v1ReadyEvent } from "@elementor/editor-v1-adapters";
2100
+
1996
2101
  // src/sync-with-document-save.ts
1997
2102
  import { getCurrentUser } from "@elementor/editor-current-user";
1998
2103
  import { setDocumentModifiedStatus as setDocumentModifiedStatus2 } from "@elementor/editor-documents";
1999
2104
  import { registerDataHook } from "@elementor/editor-v1-adapters";
2000
2105
  import { __getState as getState3, __subscribeWithSelector as subscribeWithSelector2 } from "@elementor/store";
2001
- function syncWithDocumentSave() {
2106
+ function syncWithDocumentSave(panelActions) {
2002
2107
  const unsubscribe = syncDirtyState();
2003
- bindSaveAction();
2108
+ bindSaveAction(panelActions);
2004
2109
  return unsubscribe;
2005
2110
  }
2006
2111
  function syncDirtyState() {
@@ -2011,15 +2116,16 @@ function syncDirtyState() {
2011
2116
  setDocumentModifiedStatus2(true);
2012
2117
  });
2013
2118
  }
2014
- function bindSaveAction() {
2119
+ function bindSaveAction(panelActions) {
2015
2120
  registerDataHook("after", "document/save/save", (args) => {
2016
2121
  const user = getCurrentUser();
2017
2122
  const canEdit = user?.capabilities.includes(UPDATE_CLASS_CAPABILITY_KEY);
2018
2123
  if (!canEdit) {
2019
2124
  return;
2020
2125
  }
2021
- return saveGlobalClasses({
2022
- context: args.status === "publish" ? "frontend" : "preview"
2126
+ saveGlobalClasses({
2127
+ context: args.status === "publish" ? "frontend" : "preview",
2128
+ onApprove: panelActions?.open
2023
2129
  });
2024
2130
  });
2025
2131
  }
@@ -2027,6 +2133,17 @@ function isDirty() {
2027
2133
  return selectIsDirty(getState3());
2028
2134
  }
2029
2135
 
2136
+ // src/sync-with-document.tsx
2137
+ function SyncWithDocumentSave() {
2138
+ const panelActions = usePanelActions();
2139
+ useEffect4(() => {
2140
+ listenTo(v1ReadyEvent(), () => {
2141
+ syncWithDocumentSave(panelActions);
2142
+ });
2143
+ }, []);
2144
+ return null;
2145
+ }
2146
+
2030
2147
  // src/init.ts
2031
2148
  function init() {
2032
2149
  registerSlice(slice);
@@ -2036,6 +2153,10 @@ function init() {
2036
2153
  id: "global-classes-populate-store",
2037
2154
  component: PopulateStore
2038
2155
  });
2156
+ injectIntoLogic({
2157
+ id: "global-classes-sync-with-document",
2158
+ component: SyncWithDocumentSave
2159
+ });
2039
2160
  injectIntoCssClassConvert({
2040
2161
  id: "global-classes-convert-from-local-class",
2041
2162
  component: ConvertLocalClassToGlobalClass
@@ -2048,9 +2169,6 @@ function init() {
2048
2169
  name: "global",
2049
2170
  getThemeColor: (theme) => theme.palette.global.dark
2050
2171
  });
2051
- listenTo(v1ReadyEvent(), () => {
2052
- syncWithDocumentSave();
2053
- });
2054
2172
  }
2055
2173
  export {
2056
2174
  init