@elementor/editor-global-classes 0.21.0 → 0.22.0

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,14 +7,14 @@ import { __privateListenTo as listenTo, v1ReadyEvent } from "@elementor/editor-v
7
7
  import { __registerSlice as registerSlice } from "@elementor/store";
8
8
 
9
9
  // src/components/class-manager/class-manager-button.tsx
10
- import * as React8 from "react";
10
+ import * as React11 from "react";
11
11
  import {
12
12
  __useActiveDocument as useActiveDocument,
13
13
  __useActiveDocumentActions as useActiveDocumentActions
14
14
  } from "@elementor/editor-documents";
15
15
  import { useUserStylesCapability } from "@elementor/editor-styles-repository";
16
16
  import { IconButton as IconButton3, Tooltip as Tooltip2 } from "@elementor/ui";
17
- import { __ as __6 } from "@wordpress/i18n";
17
+ import { __ as __9 } from "@wordpress/i18n";
18
18
 
19
19
  // src/global-classes-styles-provider.ts
20
20
  import { generateId } from "@elementor/editor-styles";
@@ -308,9 +308,10 @@ var globalClassesStylesProvider = createStylesProvider({
308
308
  });
309
309
 
310
310
  // src/components/class-manager/class-manager-panel.tsx
311
- import * as React7 from "react";
312
311
  import { useEffect as useEffect2 } from "react";
312
+ import * as React10 from "react";
313
313
  import { setDocumentModifiedStatus } from "@elementor/editor-documents";
314
+ import { EXPERIMENTAL_FEATURES as EXPERIMENTAL_FEATURES2 } from "@elementor/editor-editing-panel";
314
315
  import {
315
316
  __createPanel as createPanel,
316
317
  Panel,
@@ -320,20 +321,22 @@ import {
320
321
  PanelHeaderTitle
321
322
  } from "@elementor/editor-panels";
322
323
  import { ThemeProvider } from "@elementor/editor-ui";
323
- import { changeEditMode } from "@elementor/editor-v1-adapters";
324
+ import { changeEditMode, isExperimentActive as isExperimentActive4 } from "@elementor/editor-v1-adapters";
324
325
  import { XIcon } from "@elementor/icons";
325
326
  import { useMutation } from "@elementor/query";
326
327
  import { __dispatch as dispatch4 } from "@elementor/store";
327
328
  import {
328
329
  Alert,
329
- Box as Box4,
330
+ Box as Box6,
330
331
  Button as Button3,
331
332
  DialogHeader,
333
+ Divider,
332
334
  ErrorBoundary,
333
335
  IconButton as IconButton2,
334
- Stack as Stack2
336
+ Stack as Stack5
335
337
  } from "@elementor/ui";
336
- import { __ as __5 } from "@wordpress/i18n";
338
+ import { useDebounceState } from "@elementor/utils";
339
+ import { __ as __8 } from "@wordpress/i18n";
337
340
 
338
341
  // src/hooks/use-dirty-state.ts
339
342
  import { __useSelector as useSelector } from "@elementor/store";
@@ -449,6 +452,26 @@ var IntroductionContent = () => {
449
452
  )));
450
453
  };
451
454
 
455
+ // src/components/class-manager/class-manager-search.tsx
456
+ import * as React2 from "react";
457
+ import { SearchIcon } from "@elementor/icons";
458
+ import { Box as Box2, Grid, InputAdornment, Stack, TextField } from "@elementor/ui";
459
+ import { __ as __3 } from "@wordpress/i18n";
460
+ var ClassManagerSearch = ({ searchValue, onChange }) => /* @__PURE__ */ React2.createElement(Grid, { item: true, xs: 6, px: 2, pb: 1 }, /* @__PURE__ */ React2.createElement(Stack, { direction: "row", gap: 0.5, sx: { width: "100%" } }, /* @__PURE__ */ React2.createElement(Box2, { sx: { flexGrow: 1 } }, /* @__PURE__ */ React2.createElement(
461
+ TextField,
462
+ {
463
+ role: "search",
464
+ fullWidth: true,
465
+ size: "tiny",
466
+ value: searchValue,
467
+ placeholder: __3("Search", "elementor"),
468
+ onChange: (e) => onChange(e.target.value),
469
+ InputProps: {
470
+ startAdornment: /* @__PURE__ */ React2.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React2.createElement(SearchIcon, { fontSize: "tiny" }))
471
+ }
472
+ }
473
+ ))));
474
+
452
475
  // src/components/class-manager/delete-class.ts
453
476
  import { getCurrentDocument, getV1DocumentsManager } from "@elementor/editor-documents";
454
477
  import { __privateRunCommand as runCommand } from "@elementor/editor-v1-adapters";
@@ -475,47 +498,54 @@ var reloadDocument = () => {
475
498
  };
476
499
 
477
500
  // src/components/class-manager/flipped-color-swatch-icon.tsx
478
- import * as React2 from "react";
501
+ import * as React3 from "react";
479
502
  import { ColorSwatchIcon } from "@elementor/icons";
480
- var FlippedColorSwatchIcon = ({ sx, ...props }) => /* @__PURE__ */ React2.createElement(ColorSwatchIcon, { sx: { transform: "rotate(90deg)", ...sx }, ...props });
503
+ var FlippedColorSwatchIcon = ({ sx, ...props }) => /* @__PURE__ */ React3.createElement(ColorSwatchIcon, { sx: { transform: "rotate(90deg)", ...sx }, ...props });
481
504
 
482
505
  // src/components/class-manager/global-classes-list.tsx
483
- import * as React5 from "react";
484
- import { useEffect, useRef } from "react";
506
+ import * as React8 from "react";
507
+ import { useEffect, useMemo } from "react";
508
+ import { __useDispatch as useDispatch } from "@elementor/store";
509
+ import { List, Stack as Stack4, styled as styled3, Typography as Typography5 } from "@elementor/ui";
510
+ import { __ as __7 } from "@wordpress/i18n";
511
+
512
+ // src/hooks/use-classes-order.ts
513
+ import { __useSelector as useSelector2 } from "@elementor/store";
514
+ var useClassesOrder = () => {
515
+ return useSelector2(selectOrder);
516
+ };
517
+
518
+ // src/hooks/use-ordered-classes.ts
519
+ import { __useSelector as useSelector3 } from "@elementor/store";
520
+ var useOrderedClasses = () => {
521
+ return useSelector3(selectOrderedClasses);
522
+ };
523
+
524
+ // src/components/class-manager/class-item.tsx
525
+ import * as React6 from "react";
526
+ import { useRef } from "react";
527
+ import { EXPERIMENTAL_FEATURES } from "@elementor/editor-editing-panel";
485
528
  import { validateStyleLabel } from "@elementor/editor-styles-repository";
486
529
  import { EditableField, EllipsisWithTooltip, MenuListItem, useEditable, WarningInfotip } from "@elementor/editor-ui";
530
+ import { isExperimentActive as isExperimentActive3 } from "@elementor/editor-v1-adapters";
487
531
  import { DotsVerticalIcon } from "@elementor/icons";
488
- import { __useDispatch as useDispatch } from "@elementor/store";
489
532
  import {
490
533
  bindMenu,
491
534
  bindTrigger,
492
- Box as Box3,
535
+ Box as Box4,
493
536
  IconButton,
494
- List,
495
537
  ListItemButton,
496
538
  Menu,
497
- Stack,
539
+ Stack as Stack2,
498
540
  styled as styled2,
499
541
  Tooltip,
500
542
  Typography as Typography3,
501
543
  usePopupState
502
544
  } from "@elementor/ui";
503
- import { __ as __4 } from "@wordpress/i18n";
504
-
505
- // src/hooks/use-classes-order.ts
506
- import { __useSelector as useSelector2 } from "@elementor/store";
507
- var useClassesOrder = () => {
508
- return useSelector2(selectOrder);
509
- };
510
-
511
- // src/hooks/use-ordered-classes.ts
512
- import { __useSelector as useSelector3 } from "@elementor/store";
513
- var useOrderedClasses = () => {
514
- return useSelector3(selectOrderedClasses);
515
- };
545
+ import { __ as __5 } from "@wordpress/i18n";
516
546
 
517
547
  // src/components/class-manager/delete-confirmation-dialog.tsx
518
- import * as React3 from "react";
548
+ import * as React4 from "react";
519
549
  import { createContext, useContext, useState as useState2 } from "react";
520
550
  import { AlertOctagonFilledIcon } from "@elementor/icons";
521
551
  import {
@@ -527,7 +557,7 @@ import {
527
557
  DialogTitle,
528
558
  Typography as Typography2
529
559
  } from "@elementor/ui";
530
- import { __ as __3 } from "@wordpress/i18n";
560
+ import { __ as __4 } from "@wordpress/i18n";
531
561
  var context = createContext(null);
532
562
  var DeleteConfirmationProvider = ({ children }) => {
533
563
  const [dialogProps, setDialogProps] = useState2(null);
@@ -537,7 +567,7 @@ var DeleteConfirmationProvider = ({ children }) => {
537
567
  const closeDialog = () => {
538
568
  setDialogProps(null);
539
569
  };
540
- return /* @__PURE__ */ React3.createElement(context.Provider, { value: { openDialog, closeDialog, dialogProps } }, children, !!dialogProps && /* @__PURE__ */ React3.createElement(DeleteConfirmationDialog, { ...dialogProps }));
570
+ return /* @__PURE__ */ React4.createElement(context.Provider, { value: { openDialog, closeDialog, dialogProps } }, children, !!dialogProps && /* @__PURE__ */ React4.createElement(DeleteConfirmationDialog, { ...dialogProps }));
541
571
  };
542
572
  var TITLE_ID = "delete-class-dialog";
543
573
  var DeleteConfirmationDialog = ({ label, id: id2 }) => {
@@ -546,10 +576,10 @@ var DeleteConfirmationDialog = ({ label, id: id2 }) => {
546
576
  deleteClass(id2);
547
577
  closeDialog();
548
578
  };
549
- return /* @__PURE__ */ React3.createElement(Dialog, { open: true, onClose: closeDialog, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, /* @__PURE__ */ React3.createElement(DialogTitle, { id: TITLE_ID, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React3.createElement(AlertOctagonFilledIcon, { color: "error" }), __3("Delete this class?", "elementor")), /* @__PURE__ */ React3.createElement(DialogContent, null, /* @__PURE__ */ React3.createElement(DialogContentText, { variant: "body2", color: "textPrimary" }, __3("Deleting", "elementor"), /* @__PURE__ */ React3.createElement(Typography2, { variant: "subtitle2", component: "span" }, "\xA0", label, "\xA0"), __3(
579
+ return /* @__PURE__ */ React4.createElement(Dialog, { open: true, onClose: closeDialog, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, /* @__PURE__ */ React4.createElement(DialogTitle, { id: TITLE_ID, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React4.createElement(AlertOctagonFilledIcon, { color: "error" }), __4("Delete this class?", "elementor")), /* @__PURE__ */ React4.createElement(DialogContent, null, /* @__PURE__ */ React4.createElement(DialogContentText, { variant: "body2", color: "textPrimary" }, __4("Deleting", "elementor"), /* @__PURE__ */ React4.createElement(Typography2, { variant: "subtitle2", component: "span" }, "\xA0", label, "\xA0"), __4(
550
580
  "will permanently remove it from your project and may affect the design across all elements using it. This action cannot be undone.",
551
581
  "elementor"
552
- ))), /* @__PURE__ */ React3.createElement(DialogActions, null, /* @__PURE__ */ React3.createElement(Button, { color: "secondary", onClick: closeDialog }, __3("Not now", "elementor")), /* @__PURE__ */ React3.createElement(Button, { variant: "contained", color: "error", onClick: onConfirm }, __3("Delete", "elementor"))));
582
+ ))), /* @__PURE__ */ React4.createElement(DialogActions, null, /* @__PURE__ */ React4.createElement(Button, { color: "secondary", onClick: closeDialog }, __4("Not now", "elementor")), /* @__PURE__ */ React4.createElement(Button, { variant: "contained", color: "error", onClick: onConfirm }, __4("Delete", "elementor"))));
553
583
  };
554
584
  var useDeleteConfirmation = () => {
555
585
  const contextValue = useContext(context);
@@ -560,18 +590,18 @@ var useDeleteConfirmation = () => {
560
590
  };
561
591
 
562
592
  // src/components/class-manager/sortable.tsx
563
- import * as React4 from "react";
593
+ import * as React5 from "react";
564
594
  import { GripVerticalIcon } from "@elementor/icons";
565
595
  import {
566
- Box as Box2,
596
+ Box as Box3,
567
597
  styled,
568
598
  UnstableSortableItem,
569
599
  UnstableSortableProvider
570
600
  } from "@elementor/ui";
571
- var SortableProvider = (props) => /* @__PURE__ */ React4.createElement(UnstableSortableProvider, { restrictAxis: true, variant: "static", dragPlaceholderStyle: { opacity: "1" }, ...props });
572
- var SortableTrigger = (props) => /* @__PURE__ */ React4.createElement(StyledSortableTrigger, { ...props, role: "button", className: "class-item-sortable-trigger" }, /* @__PURE__ */ React4.createElement(GripVerticalIcon, { fontSize: "tiny" }));
601
+ var SortableProvider = (props) => /* @__PURE__ */ React5.createElement(UnstableSortableProvider, { restrictAxis: true, variant: "static", dragPlaceholderStyle: { opacity: "1" }, ...props });
602
+ var SortableTrigger = (props) => /* @__PURE__ */ React5.createElement(StyledSortableTrigger, { ...props, role: "button", className: "class-item-sortable-trigger" }, /* @__PURE__ */ React5.createElement(GripVerticalIcon, { fontSize: "tiny" }));
573
603
  var SortableItem = ({ children, id: id2, ...props }) => {
574
- return /* @__PURE__ */ React4.createElement(
604
+ return /* @__PURE__ */ React5.createElement(
575
605
  UnstableSortableItem,
576
606
  {
577
607
  ...props,
@@ -587,8 +617,8 @@ var SortableItem = ({ children, id: id2, ...props }) => {
587
617
  isDragOverlay,
588
618
  isDragPlaceholder
589
619
  }) => {
590
- return /* @__PURE__ */ React4.createElement(
591
- Box2,
620
+ return /* @__PURE__ */ React5.createElement(
621
+ Box3,
592
622
  {
593
623
  ...itemProps,
594
624
  style: itemStyle,
@@ -606,7 +636,7 @@ var SortableItem = ({ children, id: id2, ...props }) => {
606
636
  triggerStyle,
607
637
  isDragPlaceholder
608
638
  }),
609
- showDropIndication && /* @__PURE__ */ React4.createElement(SortableItemIndicator, { style: dropIndicationStyle })
639
+ showDropIndication && /* @__PURE__ */ React5.createElement(SortableItemIndicator, { style: dropIndicationStyle })
610
640
  );
611
641
  }
612
642
  }
@@ -619,70 +649,23 @@ var StyledSortableTrigger = styled("div")(({ theme }) => ({
619
649
  transform: `translate( -${theme.spacing(1.5)}, -50% )`,
620
650
  color: theme.palette.action.active
621
651
  }));
622
- var SortableItemIndicator = styled(Box2)`
652
+ var SortableItemIndicator = styled(Box3)`
623
653
  width: 100%;
624
654
  height: 1px;
625
655
  background-color: ${({ theme }) => theme.palette.text.primary};
626
656
  `;
627
657
 
628
- // src/components/class-manager/global-classes-list.tsx
629
- var GlobalClassesList = ({ disabled }) => {
630
- const cssClasses = useOrderedClasses();
631
- const dispatch5 = useDispatch();
632
- const [classesOrder, reorderClasses] = useReorder();
633
- useEffect(() => {
634
- const handler = (event) => {
635
- if (event.key === "z" && (event.ctrlKey || event.metaKey)) {
636
- event.stopImmediatePropagation();
637
- event.preventDefault();
638
- if (event.shiftKey) {
639
- dispatch5(slice.actions.redo());
640
- return;
641
- }
642
- dispatch5(slice.actions.undo());
643
- }
644
- };
645
- window.addEventListener("keydown", handler, {
646
- capture: true
647
- });
648
- return () => window.removeEventListener("keydown", handler);
649
- }, [dispatch5]);
650
- if (!cssClasses?.length) {
651
- return /* @__PURE__ */ React5.createElement(EmptyState, null);
652
- }
653
- return /* @__PURE__ */ React5.createElement(DeleteConfirmationProvider, null, /* @__PURE__ */ React5.createElement(List, { sx: { display: "flex", flexDirection: "column", gap: 0.5 } }, /* @__PURE__ */ React5.createElement(SortableProvider, { value: classesOrder, onChange: reorderClasses }, cssClasses?.map(({ id: id2, label }) => {
654
- const renameClass = (newLabel) => {
655
- dispatch5(
656
- slice.actions.update({
657
- style: {
658
- id: id2,
659
- label: newLabel
660
- }
661
- })
662
- );
663
- };
664
- return /* @__PURE__ */ React5.createElement(SortableItem, { key: id2, id: id2 }, ({ isDragged, isDragPlaceholder, triggerProps, triggerStyle }) => /* @__PURE__ */ React5.createElement(
665
- ClassItem,
666
- {
667
- id: id2,
668
- label,
669
- renameClass,
670
- selected: isDragged,
671
- disabled: disabled || isDragPlaceholder,
672
- sortableTriggerProps: { ...triggerProps, style: triggerStyle }
673
- }
674
- ));
675
- }))));
676
- };
677
- var useReorder = () => {
678
- const dispatch5 = useDispatch();
679
- const order = useClassesOrder();
680
- const reorder = (newIds) => {
681
- dispatch5(slice.actions.setOrder(newIds));
682
- };
683
- return [order, reorder];
684
- };
685
- var ClassItem = ({ id: id2, label, renameClass, selected, disabled, sortableTriggerProps }) => {
658
+ // src/components/class-manager/class-item.tsx
659
+ var isVersion311IsActive = isExperimentActive3(EXPERIMENTAL_FEATURES.V_3_31);
660
+ var ClassItem = ({
661
+ id: id2,
662
+ label,
663
+ renameClass,
664
+ selected,
665
+ disabled,
666
+ sortableTriggerProps,
667
+ isSearchActive
668
+ }) => {
686
669
  const itemRef = useRef(null);
687
670
  const {
688
671
  ref: editableRef,
@@ -701,7 +684,7 @@ var ClassItem = ({ id: id2, label, renameClass, selected, disabled, sortableTrig
701
684
  disableAutoFocus: true
702
685
  });
703
686
  const isSelected = (selected || popupState.isOpen) && !disabled;
704
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Stack, { p: 0 }, /* @__PURE__ */ React5.createElement(
687
+ return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(Stack2, { p: 0 }, /* @__PURE__ */ React6.createElement(
705
688
  WarningInfotip,
706
689
  {
707
690
  open: Boolean(error),
@@ -710,12 +693,13 @@ var ClassItem = ({ id: id2, label, renameClass, selected, disabled, sortableTrig
710
693
  width: itemRef.current?.getBoundingClientRect().width,
711
694
  offset: [0, -15]
712
695
  },
713
- /* @__PURE__ */ React5.createElement(
696
+ /* @__PURE__ */ React6.createElement(
714
697
  StyledListItemButton,
715
698
  {
716
699
  ref: itemRef,
717
700
  dense: true,
718
701
  disableGutters: true,
702
+ showSortIndicator: isSearchActive,
719
703
  showActions: isSelected || isEditing,
720
704
  shape: "rounded",
721
705
  onDoubleClick: openEditMode,
@@ -723,8 +707,8 @@ var ClassItem = ({ id: id2, label, renameClass, selected, disabled, sortableTrig
723
707
  disabled,
724
708
  focusVisibleClassName: "visible-class-item"
725
709
  },
726
- /* @__PURE__ */ React5.createElement(SortableTrigger, { ...sortableTriggerProps }),
727
- /* @__PURE__ */ React5.createElement(Indicator, { isActive: isEditing, isError: !!error }, isEditing ? /* @__PURE__ */ React5.createElement(
710
+ /* @__PURE__ */ React6.createElement(SortableTrigger, { ...sortableTriggerProps }),
711
+ /* @__PURE__ */ React6.createElement(Indicator, { isActive: isEditing, isError: !!error }, isEditing ? /* @__PURE__ */ React6.createElement(
728
712
  EditableField,
729
713
  {
730
714
  ref: editableRef,
@@ -732,18 +716,18 @@ var ClassItem = ({ id: id2, label, renameClass, selected, disabled, sortableTrig
732
716
  variant: "caption",
733
717
  ...getEditableProps()
734
718
  }
735
- ) : /* @__PURE__ */ React5.createElement(EllipsisWithTooltip, { title: label, as: Typography3, variant: "caption" })),
736
- /* @__PURE__ */ React5.createElement(
719
+ ) : /* @__PURE__ */ React6.createElement(EllipsisWithTooltip, { title: label, as: Typography3, variant: "caption" })),
720
+ /* @__PURE__ */ React6.createElement(
737
721
  Tooltip,
738
722
  {
739
723
  placement: "top",
740
724
  className: "class-item-more-actions",
741
- title: __4("More actions", "elementor")
725
+ title: __5("More actions", "elementor")
742
726
  },
743
- /* @__PURE__ */ React5.createElement(IconButton, { size: "tiny", ...bindTrigger(popupState), "aria-label": "More actions" }, /* @__PURE__ */ React5.createElement(DotsVerticalIcon, { fontSize: "tiny" }))
727
+ /* @__PURE__ */ React6.createElement(IconButton, { size: "tiny", ...bindTrigger(popupState), "aria-label": "More actions" }, /* @__PURE__ */ React6.createElement(DotsVerticalIcon, { fontSize: "tiny" }))
744
728
  )
745
729
  )
746
- )), /* @__PURE__ */ React5.createElement(
730
+ )), /* @__PURE__ */ React6.createElement(
747
731
  Menu,
748
732
  {
749
733
  ...bindMenu(popupState),
@@ -756,7 +740,7 @@ var ClassItem = ({ id: id2, label, renameClass, selected, disabled, sortableTrig
756
740
  horizontal: "right"
757
741
  }
758
742
  },
759
- /* @__PURE__ */ React5.createElement(
743
+ /* @__PURE__ */ React6.createElement(
760
744
  MenuListItem,
761
745
  {
762
746
  sx: { minWidth: "160px" },
@@ -765,9 +749,9 @@ var ClassItem = ({ id: id2, label, renameClass, selected, disabled, sortableTrig
765
749
  openEditMode();
766
750
  }
767
751
  },
768
- /* @__PURE__ */ React5.createElement(Typography3, { variant: "caption", sx: { color: "text.primary" } }, __4("Rename", "elementor"))
752
+ /* @__PURE__ */ React6.createElement(Typography3, { variant: "caption", sx: { color: "text.primary" } }, __5("Rename", "elementor"))
769
753
  ),
770
- /* @__PURE__ */ React5.createElement(
754
+ /* @__PURE__ */ React6.createElement(
771
755
  MenuListItem,
772
756
  {
773
757
  onClick: () => {
@@ -775,28 +759,43 @@ var ClassItem = ({ id: id2, label, renameClass, selected, disabled, sortableTrig
775
759
  openDialog({ id: id2, label });
776
760
  }
777
761
  },
778
- /* @__PURE__ */ React5.createElement(Typography3, { variant: "caption", sx: { color: "error.light" } }, __4("Delete", "elementor"))
762
+ /* @__PURE__ */ React6.createElement(Typography3, { variant: "caption", sx: { color: "error.light" } }, __5("Delete", "elementor"))
779
763
  )
780
764
  ));
781
765
  };
782
- var StyledListItemButton = styled2(ListItemButton, {
783
- shouldForwardProp: (prop) => !["showActions"].includes(prop)
766
+ var StyledListItemButtonV2 = styled2(ListItemButton, {
767
+ shouldForwardProp: (prop) => !["showActions", "showSortIndicator"].includes(prop)
784
768
  })(
785
- ({ showActions }) => `
769
+ ({ showActions, showSortIndicator }) => `
786
770
  min-height: 36px;
787
771
 
788
772
  &.visible-class-item {
789
773
  box-shadow: none !important;
790
774
  }
791
-
775
+ .class-item-sortable-trigger {
776
+ visibility: ${showSortIndicator && showActions ? "visible" : "hidden"};
777
+ }
778
+ &:hover&:not(:disabled) {
779
+ .class-item-sortable-trigger {
780
+ visibility: ${showSortIndicator ? "visible" : "hidden"};
781
+ }
782
+ }
783
+ `
784
+ );
785
+ var StyledListItemButtonV1 = styled2(ListItemButton, {
786
+ shouldForwardProp: (prop) => !["showActions", "showSortIndicator"].includes(prop)
787
+ })(
788
+ ({ showActions }) => `
789
+ min-height: 36px;
790
+ &.visible-class-item {
791
+ box-shadow: none !important;
792
+ }
792
793
  .class-item-more-actions, .class-item-sortable-trigger {
793
794
  visibility: ${showActions ? "visible" : "hidden"};
794
795
  }
795
-
796
796
  .class-item-sortable-trigger {
797
797
  visibility: ${showActions ? "visible" : "hidden"};
798
798
  }
799
-
800
799
  &:hover&:not(:disabled) {
801
800
  .class-item-more-actions, .class-item-sortable-trigger {
802
801
  visibility: visible;
@@ -804,16 +803,8 @@ var StyledListItemButton = styled2(ListItemButton, {
804
803
  }
805
804
  `
806
805
  );
807
- var EmptyState = () => /* @__PURE__ */ React5.createElement(Stack, { alignItems: "center", gap: 1.5, pt: 10, px: 0.5, maxWidth: "260px", margin: "auto" }, /* @__PURE__ */ React5.createElement(FlippedColorSwatchIcon, { fontSize: "large" }), /* @__PURE__ */ React5.createElement(StyledHeader, { variant: "subtitle2", component: "h2", color: "text.secondary" }, __4("There are no global classes yet.", "elementor")), /* @__PURE__ */ React5.createElement(Typography3, { align: "center", variant: "caption", color: "text.secondary" }, __4(
808
- "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.",
809
- "elementor"
810
- )));
811
- var StyledHeader = styled2(Typography3)(({ theme, variant }) => ({
812
- "&.MuiTypography-root": {
813
- ...theme.typography[variant]
814
- }
815
- }));
816
- var Indicator = styled2(Box3, {
806
+ var StyledListItemButton = isVersion311IsActive ? StyledListItemButtonV2 : StyledListItemButtonV1;
807
+ var Indicator = styled2(Box4, {
817
808
  shouldForwardProp: (prop) => !["isActive", "isError"].includes(prop)
818
809
  })(({ theme, isActive, isError }) => ({
819
810
  display: "flex",
@@ -842,6 +833,129 @@ var validateLabel = (newLabel) => {
842
833
  return result.errorMessage;
843
834
  };
844
835
 
836
+ // src/components/class-manager/class-manager-class-not-found.tsx
837
+ import * as React7 from "react";
838
+ import { Box as Box5, Link, Stack as Stack3, Typography as Typography4 } from "@elementor/ui";
839
+ import { __ as __6 } from "@wordpress/i18n";
840
+ var CssClassNotFound = ({ onClear, searchValue }) => /* @__PURE__ */ React7.createElement(
841
+ Stack3,
842
+ {
843
+ color: "text.secondary",
844
+ pt: 5,
845
+ alignItems: "center",
846
+ gap: 1,
847
+ overflow: "hidden",
848
+ maxWidth: "170px",
849
+ justifySelf: "center"
850
+ },
851
+ /* @__PURE__ */ React7.createElement(FlippedColorSwatchIcon, { color: "inherit", fontSize: "large" }),
852
+ /* @__PURE__ */ React7.createElement(Box5, null, /* @__PURE__ */ React7.createElement(Typography4, { align: "center", variant: "subtitle2", color: "inherit" }, __6("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React7.createElement(
853
+ Typography4,
854
+ {
855
+ variant: "subtitle2",
856
+ color: "inherit",
857
+ sx: {
858
+ display: "flex",
859
+ width: "100%",
860
+ justifyContent: "center"
861
+ }
862
+ },
863
+ /* @__PURE__ */ React7.createElement("span", null, "\u201C"),
864
+ /* @__PURE__ */ React7.createElement(
865
+ "span",
866
+ {
867
+ style: {
868
+ maxWidth: "80%",
869
+ overflow: "hidden",
870
+ textOverflow: "ellipsis"
871
+ }
872
+ },
873
+ searchValue
874
+ ),
875
+ /* @__PURE__ */ React7.createElement("span", null, "\u201D.")
876
+ )),
877
+ /* @__PURE__ */ React7.createElement(Typography4, { align: "center", variant: "caption", color: "inherit" }, __6("Try something else.", "elementor"), /* @__PURE__ */ React7.createElement(Link, { color: "secondary", variant: "caption", component: "button", onClick: onClear }, __6("Clear & try again", "elementor")))
878
+ );
879
+
880
+ // src/components/class-manager/global-classes-list.tsx
881
+ var GlobalClassesList = ({ disabled, searchValue, onSearch }) => {
882
+ const cssClasses = useOrderedClasses();
883
+ const dispatch5 = useDispatch();
884
+ const [classesOrder, reorderClasses] = useReorder();
885
+ const lowercaseLabels = useMemo(
886
+ () => cssClasses.map((cssClass) => ({
887
+ ...cssClass,
888
+ lowerLabel: cssClass.label.toLowerCase()
889
+ })),
890
+ [cssClasses]
891
+ );
892
+ const filteredClasses = useMemo(() => {
893
+ return searchValue.length > 1 ? lowercaseLabels.filter(
894
+ (cssClass) => cssClass.lowerLabel.toLowerCase().includes(searchValue.toLowerCase())
895
+ ) : cssClasses;
896
+ }, [searchValue, cssClasses, lowercaseLabels]);
897
+ useEffect(() => {
898
+ const handler = (event) => {
899
+ if (event.key === "z" && (event.ctrlKey || event.metaKey)) {
900
+ event.stopImmediatePropagation();
901
+ event.preventDefault();
902
+ if (event.shiftKey) {
903
+ dispatch5(slice.actions.redo());
904
+ return;
905
+ }
906
+ dispatch5(slice.actions.undo());
907
+ }
908
+ };
909
+ window.addEventListener("keydown", handler, {
910
+ capture: true
911
+ });
912
+ return () => window.removeEventListener("keydown", handler);
913
+ }, [dispatch5]);
914
+ if (!cssClasses?.length) {
915
+ return /* @__PURE__ */ React8.createElement(EmptyState, null);
916
+ }
917
+ return /* @__PURE__ */ React8.createElement(DeleteConfirmationProvider, null, filteredClasses.length <= 0 && searchValue.length > 1 ? /* @__PURE__ */ React8.createElement(CssClassNotFound, { onClear: () => onSearch(""), searchValue }) : /* @__PURE__ */ React8.createElement(List, { sx: { display: "flex", flexDirection: "column", gap: 0.5 } }, /* @__PURE__ */ React8.createElement(SortableProvider, { value: classesOrder, onChange: reorderClasses }, filteredClasses?.map(({ id: id2, label }) => {
918
+ return /* @__PURE__ */ React8.createElement(SortableItem, { key: id2, id: id2 }, ({ isDragged, isDragPlaceholder, triggerProps, triggerStyle }) => /* @__PURE__ */ React8.createElement(
919
+ ClassItem,
920
+ {
921
+ isSearchActive: searchValue.length < 2,
922
+ id: id2,
923
+ label,
924
+ renameClass: (newLabel) => {
925
+ dispatch5(
926
+ slice.actions.update({
927
+ style: {
928
+ id: id2,
929
+ label: newLabel
930
+ }
931
+ })
932
+ );
933
+ },
934
+ selected: isDragged,
935
+ disabled: disabled || isDragPlaceholder,
936
+ sortableTriggerProps: { ...triggerProps, style: triggerStyle }
937
+ }
938
+ ));
939
+ }))));
940
+ };
941
+ var EmptyState = () => /* @__PURE__ */ React8.createElement(Stack4, { alignItems: "center", gap: 1.5, pt: 10, px: 0.5, maxWidth: "260px", margin: "auto" }, /* @__PURE__ */ React8.createElement(FlippedColorSwatchIcon, { fontSize: "large" }), /* @__PURE__ */ React8.createElement(StyledHeader, { variant: "subtitle2", component: "h2", color: "text.secondary" }, __7("There are no global classes yet.", "elementor")), /* @__PURE__ */ React8.createElement(Typography5, { align: "center", variant: "caption", color: "text.secondary" }, __7(
942
+ "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.",
943
+ "elementor"
944
+ )));
945
+ var StyledHeader = styled3(Typography5)(({ theme, variant }) => ({
946
+ "&.MuiTypography-root": {
947
+ ...theme.typography[variant]
948
+ }
949
+ }));
950
+ var useReorder = () => {
951
+ const dispatch5 = useDispatch();
952
+ const order = useClassesOrder();
953
+ const reorder = (newIds) => {
954
+ dispatch5(slice.actions.setOrder(newIds));
955
+ };
956
+ return [order, reorder];
957
+ };
958
+
845
959
  // src/components/class-manager/panel-interactions.ts
846
960
  function blockPanelInteractions() {
847
961
  const extendedWindow = window;
@@ -853,7 +967,7 @@ function unblockPanelInteractions() {
853
967
  }
854
968
 
855
969
  // src/components/class-manager/save-changes-dialog.tsx
856
- import * as React6 from "react";
970
+ import * as React9 from "react";
857
971
  import { useState as useState3 } from "react";
858
972
  import { AlertTriangleFilledIcon } from "@elementor/icons";
859
973
  import {
@@ -865,10 +979,10 @@ import {
865
979
  DialogTitle as DialogTitle2
866
980
  } from "@elementor/ui";
867
981
  var TITLE_ID2 = "save-changes-dialog";
868
- var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */ React6.createElement(Dialog2, { open: true, onClose, "aria-labelledby": TITLE_ID2, maxWidth: "xs" }, children);
869
- var SaveChangesDialogTitle = ({ children }) => /* @__PURE__ */ React6.createElement(DialogTitle2, { id: TITLE_ID2, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React6.createElement(AlertTriangleFilledIcon, { color: "secondary" }), children);
870
- var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */ React6.createElement(DialogContent2, null, children);
871
- var SaveChangesDialogContentText = (props) => /* @__PURE__ */ React6.createElement(DialogContentText2, { variant: "body2", color: "textPrimary", display: "flex", flexDirection: "column", ...props });
982
+ var SaveChangesDialog = ({ children, onClose }) => /* @__PURE__ */ React9.createElement(Dialog2, { open: true, onClose, "aria-labelledby": TITLE_ID2, maxWidth: "xs" }, children);
983
+ var SaveChangesDialogTitle = ({ children }) => /* @__PURE__ */ React9.createElement(DialogTitle2, { id: TITLE_ID2, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React9.createElement(AlertTriangleFilledIcon, { color: "secondary" }), children);
984
+ var SaveChangesDialogContent = ({ children }) => /* @__PURE__ */ React9.createElement(DialogContent2, null, children);
985
+ var SaveChangesDialogContentText = (props) => /* @__PURE__ */ React9.createElement(DialogContentText2, { variant: "body2", color: "textPrimary", display: "flex", flexDirection: "column", ...props });
872
986
  var SaveChangesDialogActions = ({ actions }) => {
873
987
  const [isConfirming, setIsConfirming] = useState3(false);
874
988
  const { cancel, confirm, discard } = actions;
@@ -877,7 +991,7 @@ var SaveChangesDialogActions = ({ actions }) => {
877
991
  await confirm.action();
878
992
  setIsConfirming(false);
879
993
  };
880
- return /* @__PURE__ */ React6.createElement(DialogActions2, null, cancel && /* @__PURE__ */ React6.createElement(Button2, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React6.createElement(Button2, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React6.createElement(Button2, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
994
+ return /* @__PURE__ */ React9.createElement(DialogActions2, null, cancel && /* @__PURE__ */ React9.createElement(Button2, { variant: "text", color: "secondary", onClick: cancel.action }, cancel.label), discard && /* @__PURE__ */ React9.createElement(Button2, { variant: "text", color: "secondary", onClick: discard.action }, discard.label), /* @__PURE__ */ React9.createElement(Button2, { variant: "contained", color: "secondary", onClick: onConfirm, loading: isConfirming }, confirm.label));
881
995
  };
882
996
  SaveChangesDialog.Title = SaveChangesDialogTitle;
883
997
  SaveChangesDialog.Content = SaveChangesDialogContent;
@@ -891,6 +1005,7 @@ var useDialog = () => {
891
1005
  };
892
1006
 
893
1007
  // src/components/class-manager/class-manager-panel.tsx
1008
+ var isVersion311IsActive2 = isExperimentActive4(EXPERIMENTAL_FEATURES2.V_3_31);
894
1009
  var id = "global-classes-manager";
895
1010
  var { panel, usePanelActions } = createPanel({
896
1011
  id,
@@ -906,6 +1021,10 @@ var { panel, usePanelActions } = createPanel({
906
1021
  }
907
1022
  });
908
1023
  function ClassManagerPanel() {
1024
+ const { debouncedValue, inputValue, handleChange } = useDebounceState({
1025
+ delay: 300,
1026
+ initialValue: ""
1027
+ });
909
1028
  const isDirty2 = useDirtyState();
910
1029
  const { close: closePanel } = usePanelActions();
911
1030
  const { open: openSaveChangesDialog, close: closeSaveChangesDialog, isOpen: isSaveChangesDialogOpen } = useDialog();
@@ -915,7 +1034,7 @@ function ClassManagerPanel() {
915
1034
  closeSaveChangesDialog();
916
1035
  };
917
1036
  usePreventUnload();
918
- return /* @__PURE__ */ React7.createElement(ThemeProvider, null, /* @__PURE__ */ React7.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React7.createElement(ErrorBoundaryFallback, null) }, /* @__PURE__ */ React7.createElement(Panel, null, /* @__PURE__ */ React7.createElement(PanelHeader, null, /* @__PURE__ */ React7.createElement(Stack2, { p: 1, pl: 2, width: "100%", direction: "row", alignItems: "center" }, /* @__PURE__ */ React7.createElement(PanelHeaderTitle, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React7.createElement(FlippedColorSwatchIcon, { fontSize: "inherit" }), __5("Class Manager", "elementor")), /* @__PURE__ */ React7.createElement(
1037
+ return /* @__PURE__ */ React10.createElement(ThemeProvider, null, /* @__PURE__ */ React10.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React10.createElement(ErrorBoundaryFallback, null) }, /* @__PURE__ */ React10.createElement(Panel, null, /* @__PURE__ */ React10.createElement(PanelHeader, null, /* @__PURE__ */ React10.createElement(Stack5, { p: 1, pl: 2, width: "100%", direction: "row", alignItems: "center" }, /* @__PURE__ */ React10.createElement(PanelHeaderTitle, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React10.createElement(FlippedColorSwatchIcon, { fontSize: "inherit" }), __8("Class Manager", "elementor")), /* @__PURE__ */ React10.createElement(
919
1038
  CloseButton,
920
1039
  {
921
1040
  sx: { marginLeft: "auto" },
@@ -928,7 +1047,42 @@ function ClassManagerPanel() {
928
1047
  closePanel();
929
1048
  }
930
1049
  }
931
- ))), /* @__PURE__ */ React7.createElement(PanelBody, { px: 2 }, /* @__PURE__ */ React7.createElement(GlobalClassesList, { disabled: isPublishing })), /* @__PURE__ */ React7.createElement(PanelFooter, null, /* @__PURE__ */ React7.createElement(
1050
+ ))), /* @__PURE__ */ React10.createElement(
1051
+ PanelBody,
1052
+ {
1053
+ sx: {
1054
+ display: "flex",
1055
+ flexDirection: "column",
1056
+ height: "100%"
1057
+ }
1058
+ },
1059
+ isVersion311IsActive2 && /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(ClassManagerSearch, { searchValue: inputValue, onChange: handleChange }), /* @__PURE__ */ React10.createElement(
1060
+ Divider,
1061
+ {
1062
+ sx: {
1063
+ borderWidth: "1px 0 0 0"
1064
+ }
1065
+ }
1066
+ )),
1067
+ /* @__PURE__ */ React10.createElement(
1068
+ Box6,
1069
+ {
1070
+ px: 2,
1071
+ sx: {
1072
+ flexGrow: 1,
1073
+ overflowY: "auto"
1074
+ }
1075
+ },
1076
+ /* @__PURE__ */ React10.createElement(
1077
+ GlobalClassesList,
1078
+ {
1079
+ disabled: isPublishing,
1080
+ searchValue: debouncedValue,
1081
+ onSearch: handleChange
1082
+ }
1083
+ )
1084
+ )
1085
+ ), /* @__PURE__ */ React10.createElement(PanelFooter, null, /* @__PURE__ */ React10.createElement(
932
1086
  Button3,
933
1087
  {
934
1088
  fullWidth: true,
@@ -939,19 +1093,19 @@ function ClassManagerPanel() {
939
1093
  disabled: !isDirty2,
940
1094
  loading: isPublishing
941
1095
  },
942
- __5("Save changes", "elementor")
943
- )))), /* @__PURE__ */ React7.createElement(ClassManagerIntroduction, null), isSaveChangesDialogOpen && /* @__PURE__ */ React7.createElement(SaveChangesDialog, null, /* @__PURE__ */ React7.createElement(DialogHeader, { onClose: closeSaveChangesDialog, logo: false }, /* @__PURE__ */ React7.createElement(SaveChangesDialog.Title, null, __5("You have unsaved changes", "elementor"))), /* @__PURE__ */ React7.createElement(SaveChangesDialog.Content, null, /* @__PURE__ */ React7.createElement(SaveChangesDialog.ContentText, null, __5("You have unsaved changes in the Class Manager.", "elementor")), /* @__PURE__ */ React7.createElement(SaveChangesDialog.ContentText, null, __5("To avoid losing your updates, save your changes before leaving.", "elementor"))), /* @__PURE__ */ React7.createElement(
1096
+ __8("Save changes", "elementor")
1097
+ )))), /* @__PURE__ */ React10.createElement(ClassManagerIntroduction, null), isSaveChangesDialogOpen && /* @__PURE__ */ React10.createElement(SaveChangesDialog, null, /* @__PURE__ */ React10.createElement(DialogHeader, { onClose: closeSaveChangesDialog, logo: false }, /* @__PURE__ */ React10.createElement(SaveChangesDialog.Title, null, __8("You have unsaved changes", "elementor"))), /* @__PURE__ */ React10.createElement(SaveChangesDialog.Content, null, /* @__PURE__ */ React10.createElement(SaveChangesDialog.ContentText, null, __8("You have unsaved changes in the Class Manager.", "elementor")), /* @__PURE__ */ React10.createElement(SaveChangesDialog.ContentText, null, __8("To avoid losing your updates, save your changes before leaving.", "elementor"))), /* @__PURE__ */ React10.createElement(
944
1098
  SaveChangesDialog.Actions,
945
1099
  {
946
1100
  actions: {
947
1101
  discard: {
948
- label: __5("Discard", "elementor"),
1102
+ label: __8("Discard", "elementor"),
949
1103
  action: () => {
950
1104
  resetAndClosePanel();
951
1105
  }
952
1106
  },
953
1107
  confirm: {
954
- label: __5("Save & Continue", "elementor"),
1108
+ label: __8("Save & Continue", "elementor"),
955
1109
  action: async () => {
956
1110
  await publish();
957
1111
  closeSaveChangesDialog();
@@ -962,8 +1116,8 @@ function ClassManagerPanel() {
962
1116
  }
963
1117
  )));
964
1118
  }
965
- var CloseButton = ({ onClose, ...props }) => /* @__PURE__ */ React7.createElement(IconButton2, { size: "small", color: "secondary", onClick: onClose, "aria-label": "Close", ...props }, /* @__PURE__ */ React7.createElement(XIcon, { fontSize: "small" }));
966
- var ErrorBoundaryFallback = () => /* @__PURE__ */ React7.createElement(Box4, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React7.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React7.createElement("strong", null, __5("Something went wrong", "elementor"))));
1119
+ var CloseButton = ({ onClose, ...props }) => /* @__PURE__ */ React10.createElement(IconButton2, { size: "small", color: "secondary", onClick: onClose, "aria-label": "Close", ...props }, /* @__PURE__ */ React10.createElement(XIcon, { fontSize: "small" }));
1120
+ var ErrorBoundaryFallback = () => /* @__PURE__ */ React10.createElement(Box6, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React10.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React10.createElement("strong", null, __8("Something went wrong", "elementor"))));
967
1121
  var usePreventUnload = () => {
968
1122
  const isDirty2 = useDirtyState();
969
1123
  useEffect2(() => {
@@ -1008,19 +1162,19 @@ var ClassManagerButton = () => {
1008
1162
  }
1009
1163
  openPanel();
1010
1164
  };
1011
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Tooltip2, { title: __6("Class Manager", "elementor"), placement: "top" }, /* @__PURE__ */ React8.createElement(IconButton3, { size: "tiny", onClick: handleOpenPanel, sx: { marginInlineEnd: -0.75 } }, /* @__PURE__ */ React8.createElement(FlippedColorSwatchIcon, { fontSize: "tiny" }))), isSaveChangesDialogOpen && /* @__PURE__ */ React8.createElement(SaveChangesDialog, null, /* @__PURE__ */ React8.createElement(SaveChangesDialog.Title, null, __6("You have unsaved changes", "elementor")), /* @__PURE__ */ React8.createElement(SaveChangesDialog.Content, null, /* @__PURE__ */ React8.createElement(SaveChangesDialog.ContentText, { sx: { mb: 2 } }, __6(
1165
+ return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(Tooltip2, { title: __9("Class Manager", "elementor"), placement: "top" }, /* @__PURE__ */ React11.createElement(IconButton3, { size: "tiny", onClick: handleOpenPanel, sx: { marginInlineEnd: -0.75 } }, /* @__PURE__ */ React11.createElement(FlippedColorSwatchIcon, { fontSize: "tiny" }))), isSaveChangesDialogOpen && /* @__PURE__ */ React11.createElement(SaveChangesDialog, null, /* @__PURE__ */ React11.createElement(SaveChangesDialog.Title, null, __9("You have unsaved changes", "elementor")), /* @__PURE__ */ React11.createElement(SaveChangesDialog.Content, null, /* @__PURE__ */ React11.createElement(SaveChangesDialog.ContentText, { sx: { mb: 2 } }, __9(
1012
1166
  "To open the Class Manager, save your page first. You can't continue without saving.",
1013
1167
  "elementor"
1014
- ))), /* @__PURE__ */ React8.createElement(
1168
+ ))), /* @__PURE__ */ React11.createElement(
1015
1169
  SaveChangesDialog.Actions,
1016
1170
  {
1017
1171
  actions: {
1018
1172
  cancel: {
1019
- label: __6("Stay here", "elementor"),
1173
+ label: __9("Stay here", "elementor"),
1020
1174
  action: closeSaveChangesDialog
1021
1175
  },
1022
1176
  confirm: {
1023
- label: __6("Save & Continue", "elementor"),
1177
+ label: __9("Save & Continue", "elementor"),
1024
1178
  action: async () => {
1025
1179
  await saveDocument();
1026
1180
  closeSaveChangesDialog();