@elementor/editor-components 3.35.0-424 → 3.35.0-426

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.js CHANGED
@@ -44,7 +44,7 @@ var import_editor_panels4 = require("@elementor/editor-panels");
44
44
  var import_editor_styles_repository2 = require("@elementor/editor-styles-repository");
45
45
  var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
46
46
  var import_store78 = require("@elementor/store");
47
- var import_i18n27 = require("@wordpress/i18n");
47
+ var import_i18n28 = require("@wordpress/i18n");
48
48
 
49
49
  // src/component-instance-transformer.ts
50
50
  var import_editor_canvas = require("@elementor/editor-canvas");
@@ -133,7 +133,7 @@ var slice = (0, import_store2.__createSlice)({
133
133
  reducers: {
134
134
  add: (state, { payload }) => {
135
135
  if (Array.isArray(payload)) {
136
- state.data = [...state.data, ...payload];
136
+ state.data = [...payload, ...state.data];
137
137
  } else {
138
138
  state.data.unshift(payload);
139
139
  }
@@ -1700,7 +1700,7 @@ var import_react9 = require("react");
1700
1700
  var import_editor_mcp = require("@elementor/editor-mcp");
1701
1701
  var import_icons10 = require("@elementor/icons");
1702
1702
  var import_ui15 = require("@elementor/ui");
1703
- var import_i18n17 = require("@wordpress/i18n");
1703
+ var import_i18n18 = require("@wordpress/i18n");
1704
1704
 
1705
1705
  // src/store/actions/rename-component.ts
1706
1706
  var import_editor_documents7 = require("@elementor/editor-documents");
@@ -2053,19 +2053,23 @@ var import_editor_elements8 = require("@elementor/editor-elements");
2053
2053
  var import_editor_ui6 = require("@elementor/editor-ui");
2054
2054
  var import_icons9 = require("@elementor/icons");
2055
2055
  var import_ui13 = require("@elementor/ui");
2056
- var import_i18n16 = require("@wordpress/i18n");
2056
+ var import_i18n17 = require("@wordpress/i18n");
2057
2057
 
2058
2058
  // src/store/actions/archive-component.ts
2059
2059
  var import_editor_documents8 = require("@elementor/editor-documents");
2060
+ var import_editor_notifications = require("@elementor/editor-notifications");
2060
2061
  var import_store35 = require("@elementor/store");
2061
- var archiveComponent = (componentId) => {
2062
- const store = (0, import_store35.__getStore)();
2063
- const dispatch18 = store?.dispatch;
2064
- if (!dispatch18) {
2065
- return;
2066
- }
2067
- dispatch18(slice.actions.archive(componentId));
2062
+ var import_i18n15 = require("@wordpress/i18n");
2063
+ var successNotification = (componentId, componentName) => ({
2064
+ type: "success",
2065
+ /* translators: %s: component name */
2066
+ message: (0, import_i18n15.__)("Successfully deleted component %s", "elementor").replace("%s", componentName),
2067
+ id: `success-archived-components-notification-${componentId}`
2068
+ });
2069
+ var archiveComponent = (componentId, componentName) => {
2070
+ (0, import_store35.__dispatch)(slice.actions.archive(componentId));
2068
2071
  (0, import_editor_documents8.setDocumentModifiedStatus)(true);
2072
+ (0, import_editor_notifications.notify)(successNotification(componentId, componentName));
2069
2073
  };
2070
2074
 
2071
2075
  // src/store/actions/load-components-assets.ts
@@ -2181,14 +2185,14 @@ var import_store41 = require("@elementor/store");
2181
2185
 
2182
2186
  // src/components/create-component-form/utils/component-form-schema.ts
2183
2187
  var import_schema = require("@elementor/schema");
2184
- var import_i18n15 = require("@wordpress/i18n");
2188
+ var import_i18n16 = require("@wordpress/i18n");
2185
2189
  var MIN_NAME_LENGTH = 2;
2186
2190
  var MAX_NAME_LENGTH = 50;
2187
- var baseComponentSchema = import_schema.z.string().trim().max(MAX_NAME_LENGTH, (0, import_i18n15.__)("Component name is too long. Please keep it under 50 characters.", "elementor"));
2191
+ var baseComponentSchema = import_schema.z.string().trim().max(MAX_NAME_LENGTH, (0, import_i18n16.__)("Component name is too long. Please keep it under 50 characters.", "elementor"));
2188
2192
  var createBaseComponentSchema = (existingNames) => {
2189
2193
  return import_schema.z.object({
2190
2194
  componentName: baseComponentSchema.refine((value) => !existingNames.includes(value), {
2191
- message: (0, import_i18n15.__)("Component name already exists", "elementor")
2195
+ message: (0, import_i18n16.__)("Component name already exists", "elementor")
2192
2196
  })
2193
2197
  });
2194
2198
  };
@@ -2196,9 +2200,9 @@ var createSubmitComponentSchema = (existingNames) => {
2196
2200
  const baseSchema = createBaseComponentSchema(existingNames);
2197
2201
  return baseSchema.extend({
2198
2202
  componentName: baseSchema.shape.componentName.refine((value) => value.length > 0, {
2199
- message: (0, import_i18n15.__)("Component name is required.", "elementor")
2203
+ message: (0, import_i18n16.__)("Component name is required.", "elementor")
2200
2204
  }).refine((value) => value.length >= MIN_NAME_LENGTH, {
2201
- message: (0, import_i18n15.__)("Component name is too short. Please enter at least 2 characters.", "elementor")
2205
+ message: (0, import_i18n16.__)("Component name is too short. Please enter at least 2 characters.", "elementor")
2202
2206
  })
2203
2207
  });
2204
2208
  };
@@ -2320,7 +2324,7 @@ var ComponentItem = ({ component, renameComponent: renameComponent2 }) => {
2320
2324
  if (!component.id) {
2321
2325
  throw new Error("Component ID is required");
2322
2326
  }
2323
- archiveComponent(component.id);
2327
+ archiveComponent(component.id, component.name);
2324
2328
  };
2325
2329
  return /* @__PURE__ */ React14.createElement(import_ui13.Stack, null, /* @__PURE__ */ React14.createElement(
2326
2330
  import_editor_ui6.WarningInfotip,
@@ -2403,9 +2407,9 @@ var ComponentItem = ({ component, renameComponent: renameComponent2 }) => {
2403
2407
  openEditMode();
2404
2408
  }
2405
2409
  },
2406
- (0, import_i18n16.__)("Rename", "elementor")
2410
+ (0, import_i18n17.__)("Rename", "elementor")
2407
2411
  ),
2408
- /* @__PURE__ */ React14.createElement(import_editor_ui6.MenuListItem, { sx: { minWidth: "160px" }, onClick: handleArchiveClick }, /* @__PURE__ */ React14.createElement(import_ui13.Typography, { variant: "caption", sx: { color: "error.light" } }, (0, import_i18n16.__)("Archive", "elementor")))
2412
+ /* @__PURE__ */ React14.createElement(import_editor_ui6.MenuListItem, { sx: { minWidth: "160px" }, onClick: handleArchiveClick }, /* @__PURE__ */ React14.createElement(import_ui13.Typography, { variant: "caption", sx: { color: "error.light" } }, (0, import_i18n17.__)("Delete", "elementor")))
2409
2413
  ));
2410
2414
  };
2411
2415
  var addComponentToPage = (model) => {
@@ -2524,7 +2528,7 @@ var EmptyState = () => {
2524
2528
  const sdk = (0, import_editor_mcp.getAngieSdk)();
2525
2529
  if (sdk.isAngieReady()) {
2526
2530
  sdk.triggerAngie({
2527
- prompt: (0, import_i18n17.__)(
2531
+ prompt: (0, import_i18n18.__)(
2528
2532
  "Create a [hero/testimonial/product card/CTA/feature] component for my [business type]. Include [describe what you want]",
2529
2533
  "elementor"
2530
2534
  ),
@@ -2544,7 +2548,7 @@ var EmptyState = () => {
2544
2548
  gap: 2,
2545
2549
  overflow: "hidden"
2546
2550
  },
2547
- /* @__PURE__ */ React16.createElement(import_ui15.Stack, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React16.createElement(import_icons10.ComponentsIcon, { fontSize: "large", sx: { color: "text.secondary" } }), /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX }, (0, import_i18n17.__)("No components yet", "elementor")), /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "caption", color: "secondary", sx: { maxWidth: 200 } }, (0, import_i18n17.__)("Components are reusable blocks that sync across your site.", "elementor"), /* @__PURE__ */ React16.createElement("br", null), (0, import_i18n17.__)("Create once, use everywhere.", "elementor")), /* @__PURE__ */ React16.createElement(
2551
+ /* @__PURE__ */ React16.createElement(import_ui15.Stack, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React16.createElement(import_icons10.ComponentsIcon, { fontSize: "large", sx: { color: "text.secondary" } }), /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX }, (0, import_i18n18.__)("No components yet", "elementor")), /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "caption", color: "secondary", sx: { maxWidth: 200 } }, (0, import_i18n18.__)("Components are reusable blocks that sync across your site.", "elementor"), /* @__PURE__ */ React16.createElement("br", null), (0, import_i18n18.__)("Create once, use everywhere.", "elementor")), /* @__PURE__ */ React16.createElement(
2548
2552
  import_ui15.Link,
2549
2553
  {
2550
2554
  href: LEARN_MORE_URL,
@@ -2553,13 +2557,13 @@ var EmptyState = () => {
2553
2557
  variant: "caption",
2554
2558
  color: "info.main"
2555
2559
  },
2556
- (0, import_i18n17.__)("Learn more about components", "elementor")
2560
+ (0, import_i18n18.__)("Learn more about components", "elementor")
2557
2561
  )),
2558
2562
  /* @__PURE__ */ React16.createElement(import_ui15.Divider, { sx: { width: "100%" } }),
2559
- /* @__PURE__ */ React16.createElement(import_ui15.Stack, { alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX }, (0, import_i18n17.__)("Create your first one:", "elementor")), /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "caption", color: "secondary", sx: { maxWidth: 228 } }, (0, import_i18n17.__)(
2563
+ /* @__PURE__ */ React16.createElement(import_ui15.Stack, { alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX }, (0, import_i18n18.__)("Create your first one:", "elementor")), /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "caption", color: "secondary", sx: { maxWidth: 228 } }, (0, import_i18n18.__)(
2560
2564
  'Right-click any div-block or flexbox on your canvas or structure and select "Create component"',
2561
2565
  "elementor"
2562
- )), /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "caption", color: "secondary" }, (0, import_i18n17.__)("Or", "elementor")), /* @__PURE__ */ React16.createElement(AngiePromotionModal, { open: isAngieModalOpen, onClose: () => setIsAngieModalOpen(false) }, /* @__PURE__ */ React16.createElement(
2566
+ )), /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "caption", color: "secondary" }, (0, import_i18n18.__)("Or", "elementor")), /* @__PURE__ */ React16.createElement(AngiePromotionModal, { open: isAngieModalOpen, onClose: () => setIsAngieModalOpen(false) }, /* @__PURE__ */ React16.createElement(
2563
2567
  import_ui15.Button,
2564
2568
  {
2565
2569
  color: "secondary",
@@ -2568,7 +2572,7 @@ var EmptyState = () => {
2568
2572
  onClick: handleCreateWithAI,
2569
2573
  endIcon: /* @__PURE__ */ React16.createElement(import_icons10.AIIcon, null)
2570
2574
  },
2571
- (0, import_i18n17.__)("Create component with AI", "elementor")
2575
+ (0, import_i18n18.__)("Create component with AI", "elementor")
2572
2576
  )))
2573
2577
  );
2574
2578
  };
@@ -2592,7 +2596,7 @@ var EmptySearchResult = () => {
2592
2596
  width: "100%"
2593
2597
  }
2594
2598
  },
2595
- /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "subtitle2", color: "inherit", sx: SUBTITLE_OVERRIDE_SX }, (0, import_i18n17.__)("Sorry, nothing matched", "elementor")),
2599
+ /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "subtitle2", color: "inherit", sx: SUBTITLE_OVERRIDE_SX }, (0, import_i18n18.__)("Sorry, nothing matched", "elementor")),
2596
2600
  searchValue && /* @__PURE__ */ React16.createElement(
2597
2601
  import_ui15.Typography,
2598
2602
  {
@@ -2620,8 +2624,8 @@ var EmptySearchResult = () => {
2620
2624
  /* @__PURE__ */ React16.createElement("span", null, "\u201D.")
2621
2625
  )
2622
2626
  ),
2623
- /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "caption", color: "inherit" }, (0, import_i18n17.__)("Try something else.", "elementor")),
2624
- /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "caption", color: "inherit" }, /* @__PURE__ */ React16.createElement(import_ui15.Link, { color: "secondary", variant: "caption", component: "button", onClick: clearSearch }, (0, import_i18n17.__)("Clear & try again", "elementor")))
2627
+ /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "caption", color: "inherit" }, (0, import_i18n18.__)("Try something else.", "elementor")),
2628
+ /* @__PURE__ */ React16.createElement(import_ui15.Typography, { align: "center", variant: "caption", color: "inherit" }, /* @__PURE__ */ React16.createElement(import_ui15.Link, { color: "secondary", variant: "caption", component: "button", onClick: clearSearch }, (0, import_i18n18.__)("Clear & try again", "elementor")))
2625
2629
  );
2626
2630
  };
2627
2631
  var useFilteredComponents = () => {
@@ -2653,23 +2657,23 @@ var COMPONENT_DOCUMENT_TYPE = "elementor_component";
2653
2657
  var React18 = __toESM(require("react"));
2654
2658
  var import_react11 = require("react");
2655
2659
  var import_editor_elements10 = require("@elementor/editor-elements");
2656
- var import_editor_notifications2 = require("@elementor/editor-notifications");
2660
+ var import_editor_notifications3 = require("@elementor/editor-notifications");
2657
2661
  var import_editor_ui8 = require("@elementor/editor-ui");
2658
2662
  var import_icons11 = require("@elementor/icons");
2659
2663
  var import_store47 = require("@elementor/store");
2660
2664
  var import_ui16 = require("@elementor/ui");
2661
- var import_i18n19 = require("@wordpress/i18n");
2665
+ var import_i18n20 = require("@wordpress/i18n");
2662
2666
 
2663
2667
  // src/prevent-non-atomic-nesting.ts
2664
2668
  var import_editor_canvas6 = require("@elementor/editor-canvas");
2665
2669
  var import_editor_elements9 = require("@elementor/editor-elements");
2666
- var import_editor_notifications = require("@elementor/editor-notifications");
2670
+ var import_editor_notifications2 = require("@elementor/editor-notifications");
2667
2671
  var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
2668
2672
  var import_store43 = require("@elementor/store");
2669
- var import_i18n18 = require("@wordpress/i18n");
2673
+ var import_i18n19 = require("@wordpress/i18n");
2670
2674
  var NON_ATOMIC_ELEMENT_ALERT = {
2671
2675
  type: "default",
2672
- message: (0, import_i18n18.__)("This widget isn't compatible with components. Use atomic elements instead.", "elementor"),
2676
+ message: (0, import_i18n19.__)("This widget isn't compatible with components. Use atomic elements instead.", "elementor"),
2673
2677
  id: "non-atomic-element-blocked"
2674
2678
  };
2675
2679
  function initNonAtomicNestingPrevention() {
@@ -2708,7 +2712,7 @@ function blockNonAtomicCreate(args) {
2708
2712
  if (isElementAtomic(elementType)) {
2709
2713
  return false;
2710
2714
  }
2711
- (0, import_editor_notifications.notify)(NON_ATOMIC_ELEMENT_ALERT);
2715
+ (0, import_editor_notifications2.notify)(NON_ATOMIC_ELEMENT_ALERT);
2712
2716
  return true;
2713
2717
  }
2714
2718
  function blockNonAtomicMove(args) {
@@ -2724,7 +2728,7 @@ function blockNonAtomicMove(args) {
2724
2728
  return allElements.some((element) => !(0, import_editor_canvas6.isAtomicWidget)(element));
2725
2729
  });
2726
2730
  if (hasNonAtomicElement) {
2727
- (0, import_editor_notifications.notify)(NON_ATOMIC_ELEMENT_ALERT);
2731
+ (0, import_editor_notifications2.notify)(NON_ATOMIC_ELEMENT_ALERT);
2728
2732
  }
2729
2733
  return hasNonAtomicElement;
2730
2734
  }
@@ -2742,7 +2746,7 @@ function blockNonAtomicPaste(args) {
2742
2746
  }
2743
2747
  const hasNonAtomicElement = hasNonAtomicElementsInTree(data.clipboard.elements);
2744
2748
  if (hasNonAtomicElement) {
2745
- (0, import_editor_notifications.notify)(NON_ATOMIC_ELEMENT_ALERT);
2749
+ (0, import_editor_notifications2.notify)(NON_ATOMIC_ELEMENT_ALERT);
2746
2750
  }
2747
2751
  return hasNonAtomicElement;
2748
2752
  }
@@ -2881,16 +2885,15 @@ function countNestedElements(container) {
2881
2885
  function CreateComponentForm() {
2882
2886
  const [element, setElement] = (0, import_react11.useState)(null);
2883
2887
  const [anchorPosition, setAnchorPosition] = (0, import_react11.useState)();
2884
- const [resultNotification, setResultNotification] = (0, import_react11.useState)(null);
2885
2888
  const eventData = (0, import_react11.useRef)(null);
2886
2889
  (0, import_react11.useEffect)(() => {
2887
2890
  const OPEN_SAVE_AS_COMPONENT_FORM_EVENT = "elementor/editor/open-save-as-component-form";
2888
2891
  const openPopup = (event) => {
2889
2892
  const nonAtomicElements = findNonAtomicElementsInElement(event.detail.element);
2890
2893
  if (nonAtomicElements.length > 0) {
2891
- (0, import_editor_notifications2.notify)({
2894
+ (0, import_editor_notifications3.notify)({
2892
2895
  type: "default",
2893
- message: (0, import_i18n19.__)(
2896
+ message: (0, import_i18n20.__)(
2894
2897
  "Components require atomic elements only. Remove widgets to create this component.",
2895
2898
  "elementor"
2896
2899
  ),
@@ -2927,19 +2930,18 @@ function CreateComponentForm() {
2927
2930
  } else {
2928
2931
  throw new Error("Failed to find published component");
2929
2932
  }
2930
- setResultNotification({
2931
- show: true,
2932
- // Translators: %1$s: Component name, %2$s: Component UID
2933
- message: (0, import_i18n19.__)("Component saved successfully as: %1$s (UID: %2$s)", "elementor").replace("%1$s", values.componentName).replace("%2$s", uid),
2934
- type: "success"
2933
+ (0, import_editor_notifications3.notify)({
2934
+ type: "success",
2935
+ message: (0, import_i18n20.__)("Component created successfully.", "elementor"),
2936
+ id: `component-saved-successfully-${uid}`
2935
2937
  });
2936
2938
  resetAndClosePopup();
2937
2939
  } catch {
2938
- const errorMessage = (0, import_i18n19.__)("Failed to save component. Please try again.", "elementor");
2939
- setResultNotification({
2940
- show: true,
2940
+ const errorMessage = (0, import_i18n20.__)("Failed to create component. Please try again.", "elementor");
2941
+ (0, import_editor_notifications3.notify)({
2942
+ type: "error",
2941
2943
  message: errorMessage,
2942
- type: "error"
2944
+ id: "component-save-failed"
2943
2945
  });
2944
2946
  }
2945
2947
  };
@@ -2970,15 +2972,7 @@ function CreateComponentForm() {
2970
2972
  closePopup: cancelSave
2971
2973
  }
2972
2974
  )
2973
- ), /* @__PURE__ */ React18.createElement(import_ui16.Snackbar, { open: resultNotification?.show, onClose: () => setResultNotification(null) }, /* @__PURE__ */ React18.createElement(
2974
- import_ui16.Alert,
2975
- {
2976
- onClose: () => setResultNotification(null),
2977
- severity: resultNotification?.type,
2978
- sx: { width: "100%" }
2979
- },
2980
- resultNotification?.message
2981
- )));
2975
+ ));
2982
2976
  }
2983
2977
  var FONT_SIZE = "tiny";
2984
2978
  var Form2 = ({
@@ -3006,10 +3000,10 @@ var Form2 = ({
3006
3000
  }
3007
3001
  };
3008
3002
  const texts = {
3009
- heading: (0, import_i18n19.__)("Save as a component", "elementor"),
3010
- name: (0, import_i18n19.__)("Name", "elementor"),
3011
- cancel: (0, import_i18n19.__)("Cancel", "elementor"),
3012
- create: (0, import_i18n19.__)("Create", "elementor")
3003
+ heading: (0, import_i18n20.__)("Create component", "elementor"),
3004
+ name: (0, import_i18n20.__)("Name", "elementor"),
3005
+ cancel: (0, import_i18n20.__)("Cancel", "elementor"),
3006
+ create: (0, import_i18n20.__)("Create", "elementor")
3013
3007
  };
3014
3008
  const nameInputId = "component-name";
3015
3009
  return /* @__PURE__ */ React18.createElement(import_editor_ui8.Form, { onSubmit: handleSubmit }, /* @__PURE__ */ React18.createElement(import_ui16.Stack, { alignItems: "start", width: "268px" }, /* @__PURE__ */ React18.createElement(
@@ -3021,7 +3015,7 @@ var Form2 = ({
3021
3015
  px: 1.5,
3022
3016
  sx: { columnGap: 0.5, borderBottom: "1px solid", borderColor: "divider", width: "100%" }
3023
3017
  },
3024
- /* @__PURE__ */ React18.createElement(import_icons11.StarIcon, { fontSize: FONT_SIZE }),
3018
+ /* @__PURE__ */ React18.createElement(import_icons11.ComponentsIcon, { fontSize: FONT_SIZE }),
3025
3019
  /* @__PURE__ */ React18.createElement(import_ui16.Typography, { variant: "caption", sx: { color: "text.primary", fontWeight: "500", lineHeight: 1 } }, texts.heading)
3026
3020
  ), /* @__PURE__ */ React18.createElement(import_ui16.Grid, { container: true, gap: 0.75, alignItems: "start", p: 1.5 }, /* @__PURE__ */ React18.createElement(import_ui16.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React18.createElement(import_ui16.FormLabel, { htmlFor: nameInputId, size: "tiny" }, texts.name)), /* @__PURE__ */ React18.createElement(import_ui16.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React18.createElement(
3027
3021
  import_ui16.TextField,
@@ -3053,19 +3047,19 @@ function updateCurrentComponent({
3053
3047
  path,
3054
3048
  currentComponentId
3055
3049
  }) {
3056
- const dispatch18 = (0, import_store49.__getStore)()?.dispatch;
3057
- if (!dispatch18) {
3050
+ const dispatch19 = (0, import_store49.__getStore)()?.dispatch;
3051
+ if (!dispatch19) {
3058
3052
  return;
3059
3053
  }
3060
- dispatch18(slice.actions.setPath(path));
3061
- dispatch18(slice.actions.setCurrentComponentId(currentComponentId));
3054
+ dispatch19(slice.actions.setPath(path));
3055
+ dispatch19(slice.actions.setCurrentComponentId(currentComponentId));
3062
3056
  }
3063
3057
 
3064
3058
  // src/components/edit-component/component-modal.tsx
3065
3059
  var React19 = __toESM(require("react"));
3066
3060
  var import_react13 = require("react");
3067
3061
  var import_react_dom = require("react-dom");
3068
- var import_i18n20 = require("@wordpress/i18n");
3062
+ var import_i18n21 = require("@wordpress/i18n");
3069
3063
 
3070
3064
  // src/hooks/use-canvas-document.ts
3071
3065
  var import_editor_canvas7 = require("@elementor/editor-canvas");
@@ -3187,7 +3181,7 @@ function Backdrop({ canvas, element, onClose }) {
3187
3181
  onKeyDown: handleKeyDown,
3188
3182
  role: "button",
3189
3183
  tabIndex: 0,
3190
- "aria-label": (0, import_i18n20.__)("Exit component editing mode", "elementor")
3184
+ "aria-label": (0, import_i18n21.__)("Exit component editing mode", "elementor")
3191
3185
  }
3192
3186
  );
3193
3187
  }
@@ -3324,18 +3318,18 @@ var React21 = __toESM(require("react"));
3324
3318
  var import_editor_ui9 = require("@elementor/editor-ui");
3325
3319
  var import_icons12 = require("@elementor/icons");
3326
3320
  var import_ui17 = require("@elementor/ui");
3327
- var import_i18n21 = require("@wordpress/i18n");
3321
+ var import_i18n22 = require("@wordpress/i18n");
3328
3322
  var openEditModeDialog = (lockedBy) => {
3329
3323
  (0, import_editor_ui9.openDialog)({
3330
3324
  component: /* @__PURE__ */ React21.createElement(EditModeDialog, { lockedBy })
3331
3325
  });
3332
3326
  };
3333
3327
  var EditModeDialog = ({ lockedBy }) => {
3334
- const content = (0, import_i18n21.__)("%s is currently editing this document", "elementor").replace("%s", lockedBy);
3335
- return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(import_ui17.DialogHeader, { logo: false }, /* @__PURE__ */ React21.createElement(import_ui17.Box, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React21.createElement(import_ui17.Icon, { color: "secondary" }, /* @__PURE__ */ React21.createElement(import_icons12.InfoCircleFilledIcon, { fontSize: "medium" })), /* @__PURE__ */ React21.createElement(import_ui17.Typography, { variant: "subtitle1" }, content))), /* @__PURE__ */ React21.createElement(import_ui17.DialogContent, null, /* @__PURE__ */ React21.createElement(import_ui17.Stack, { spacing: 2, direction: "column" }, /* @__PURE__ */ React21.createElement(import_ui17.Typography, { variant: "body2" }, (0, import_i18n21.__)(
3328
+ const content = (0, import_i18n22.__)("%s is currently editing this document", "elementor").replace("%s", lockedBy);
3329
+ return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(import_ui17.DialogHeader, { logo: false }, /* @__PURE__ */ React21.createElement(import_ui17.Box, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React21.createElement(import_ui17.Icon, { color: "secondary" }, /* @__PURE__ */ React21.createElement(import_icons12.InfoCircleFilledIcon, { fontSize: "medium" })), /* @__PURE__ */ React21.createElement(import_ui17.Typography, { variant: "subtitle1" }, content))), /* @__PURE__ */ React21.createElement(import_ui17.DialogContent, null, /* @__PURE__ */ React21.createElement(import_ui17.Stack, { spacing: 2, direction: "column" }, /* @__PURE__ */ React21.createElement(import_ui17.Typography, { variant: "body2" }, (0, import_i18n22.__)(
3336
3330
  "You can wait for them to finish or reach out to coordinate your changes together.",
3337
3331
  "elementor"
3338
- )), /* @__PURE__ */ React21.createElement(import_ui17.DialogActions, null, /* @__PURE__ */ React21.createElement(import_ui17.Button, { color: "secondary", variant: "contained", onClick: import_editor_ui9.closeDialog }, (0, import_i18n21.__)("Close", "elementor"))))));
3332
+ )), /* @__PURE__ */ React21.createElement(import_ui17.DialogActions, null, /* @__PURE__ */ React21.createElement(import_ui17.Button, { color: "secondary", variant: "contained", onClick: import_editor_ui9.closeDialog }, (0, import_i18n22.__)("Close", "elementor"))))));
3339
3333
  };
3340
3334
 
3341
3335
  // src/components/instance-editing-panel/instance-editing-panel.tsx
@@ -3346,7 +3340,7 @@ var import_editor_elements14 = require("@elementor/editor-elements");
3346
3340
  var import_editor_panels3 = require("@elementor/editor-panels");
3347
3341
  var import_icons14 = require("@elementor/icons");
3348
3342
  var import_ui22 = require("@elementor/ui");
3349
- var import_i18n23 = require("@wordpress/i18n");
3343
+ var import_i18n24 = require("@wordpress/i18n");
3350
3344
 
3351
3345
  // src/hooks/use-component-instance-settings.ts
3352
3346
  var import_editor_editing_panel2 = require("@elementor/editor-editing-panel");
@@ -3415,7 +3409,7 @@ function useComponentInstanceSettings() {
3415
3409
  var React22 = __toESM(require("react"));
3416
3410
  var import_icons13 = require("@elementor/icons");
3417
3411
  var import_ui18 = require("@elementor/ui");
3418
- var import_i18n22 = require("@wordpress/i18n");
3412
+ var import_i18n23 = require("@wordpress/i18n");
3419
3413
  var EmptyState2 = ({ onEditComponent }) => {
3420
3414
  return /* @__PURE__ */ React22.createElement(
3421
3415
  import_ui18.Stack,
@@ -3428,12 +3422,12 @@ var EmptyState2 = ({ onEditComponent }) => {
3428
3422
  gap: 1.5
3429
3423
  },
3430
3424
  /* @__PURE__ */ React22.createElement(import_icons13.ComponentPropListIcon, { fontSize: "large" }),
3431
- /* @__PURE__ */ React22.createElement(import_ui18.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n22.__)("No properties yet", "elementor")),
3432
- /* @__PURE__ */ React22.createElement(import_ui18.Typography, { align: "center", variant: "caption", maxWidth: "170px" }, (0, import_i18n22.__)(
3425
+ /* @__PURE__ */ React22.createElement(import_ui18.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n23.__)("No properties yet", "elementor")),
3426
+ /* @__PURE__ */ React22.createElement(import_ui18.Typography, { align: "center", variant: "caption", maxWidth: "170px" }, (0, import_i18n23.__)(
3433
3427
  "Edit the component to add properties, manage them or update the design across all instances.",
3434
3428
  "elementor"
3435
3429
  )),
3436
- /* @__PURE__ */ React22.createElement(import_ui18.Button, { variant: "outlined", color: "secondary", size: "small", sx: { mt: 1 }, onClick: onEditComponent }, /* @__PURE__ */ React22.createElement(import_icons13.PencilIcon, { fontSize: "small" }), (0, import_i18n22.__)("Edit component", "elementor"))
3430
+ /* @__PURE__ */ React22.createElement(import_ui18.Button, { variant: "outlined", color: "secondary", size: "small", sx: { mt: 1 }, onClick: onEditComponent }, /* @__PURE__ */ React22.createElement(import_icons13.PencilIcon, { fontSize: "small" }), (0, import_i18n23.__)("Edit component", "elementor"))
3437
3431
  );
3438
3432
  };
3439
3433
 
@@ -3707,7 +3701,7 @@ function InstanceEditingPanel() {
3707
3701
  if (!componentId || !overridableProps || !component) {
3708
3702
  return null;
3709
3703
  }
3710
- const panelTitle = (0, import_i18n23.__)("Edit %s", "elementor").replace("%s", component.name);
3704
+ const panelTitle = (0, import_i18n24.__)("Edit %s", "elementor").replace("%s", component.name);
3711
3705
  const handleEditComponent = () => switchToComponent(componentId, componentInstanceId);
3712
3706
  const isNonEmptyGroup = (group) => group !== null && group.props.length > 0;
3713
3707
  const groups = overridableProps.groups.order.map((groupId) => overridableProps.groups.items[groupId] ?? null).filter(isNonEmptyGroup);
@@ -3793,7 +3787,7 @@ var import_editor_controls6 = require("@elementor/editor-controls");
3793
3787
  var import_editor_editing_panel7 = require("@elementor/editor-editing-panel");
3794
3788
  var import_editor_elements15 = require("@elementor/editor-elements");
3795
3789
  var import_ui24 = require("@elementor/ui");
3796
- var import_i18n25 = require("@wordpress/i18n");
3790
+ var import_i18n26 = require("@wordpress/i18n");
3797
3791
 
3798
3792
  // src/store/actions/set-overridable-prop.ts
3799
3793
  var import_store58 = require("@elementor/store");
@@ -3864,7 +3858,7 @@ var React29 = __toESM(require("react"));
3864
3858
  var import_react17 = require("react");
3865
3859
  var import_icons15 = require("@elementor/icons");
3866
3860
  var import_ui23 = require("@elementor/ui");
3867
- var import_i18n24 = require("@wordpress/i18n");
3861
+ var import_i18n25 = require("@wordpress/i18n");
3868
3862
  var SIZE2 = "tiny";
3869
3863
  var IconContainer = (0, import_ui23.styled)(import_ui23.Box)`
3870
3864
  pointer-events: none;
@@ -3924,7 +3918,7 @@ var Indicator2 = (0, import_react17.forwardRef)(({ isOpen, isOverridable, ...pro
3924
3918
  IconContainer,
3925
3919
  {
3926
3920
  className: "icon",
3927
- "aria-label": isOverridable ? (0, import_i18n24.__)("Overridable property", "elementor") : (0, import_i18n24.__)("Make prop overridable", "elementor")
3921
+ "aria-label": isOverridable ? (0, import_i18n25.__)("Overridable property", "elementor") : (0, import_i18n25.__)("Make prop overridable", "elementor")
3928
3922
  },
3929
3923
  isOverridable ? /* @__PURE__ */ React29.createElement(import_icons15.CheckIcon, { fontSize: SIZE2 }) : /* @__PURE__ */ React29.createElement(import_icons15.PlusIcon, { fontSize: SIZE2 })
3930
3924
  )));
@@ -3995,7 +3989,7 @@ function Content2({ componentId, overridableProps }) {
3995
3989
  popupState.close();
3996
3990
  };
3997
3991
  const overridableConfig = overridableValue ? getOverridableProp({ componentId, overrideKey: overridableValue.override_key }) : void 0;
3998
- return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(import_ui24.Tooltip, { placement: "top", title: (0, import_i18n25.__)("Override Property", "elementor") }, /* @__PURE__ */ React30.createElement(Indicator2, { ...triggerProps, isOpen: !!popoverProps.open, isOverridable: !!overridableValue })), /* @__PURE__ */ React30.createElement(
3992
+ return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(import_ui24.Tooltip, { placement: "top", title: (0, import_i18n26.__)("Override Property", "elementor") }, /* @__PURE__ */ React30.createElement(Indicator2, { ...triggerProps, isOpen: !!popoverProps.open, isOverridable: !!overridableValue })), /* @__PURE__ */ React30.createElement(
3999
3993
  import_ui24.Popover,
4000
3994
  {
4001
3995
  disableScrollLock: true,
@@ -4455,14 +4449,14 @@ function PopulateStore() {
4455
4449
 
4456
4450
  // src/prevent-circular-nesting.ts
4457
4451
  var import_editor_elements18 = require("@elementor/editor-elements");
4458
- var import_editor_notifications3 = require("@elementor/editor-notifications");
4452
+ var import_editor_notifications4 = require("@elementor/editor-notifications");
4459
4453
  var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
4460
4454
  var import_store64 = require("@elementor/store");
4461
- var import_i18n26 = require("@wordpress/i18n");
4455
+ var import_i18n27 = require("@wordpress/i18n");
4462
4456
  var COMPONENT_TYPE = "e-component";
4463
4457
  var COMPONENT_CIRCULAR_NESTING_ALERT = {
4464
4458
  type: "default",
4465
- message: (0, import_i18n26.__)("Can't add this component - components that contain each other can't be nested.", "elementor"),
4459
+ message: (0, import_i18n27.__)("Can't add this component - components that contain each other can't be nested.", "elementor"),
4466
4460
  id: "circular-component-nesting-blocked"
4467
4461
  };
4468
4462
  function initCircularNestingPrevention() {
@@ -4539,7 +4533,7 @@ function blockCircularCreate(args) {
4539
4533
  }
4540
4534
  const isBlocked = wouldCreateCircularNesting(componentId);
4541
4535
  if (isBlocked) {
4542
- (0, import_editor_notifications3.notify)(COMPONENT_CIRCULAR_NESTING_ALERT);
4536
+ (0, import_editor_notifications4.notify)(COMPONENT_CIRCULAR_NESTING_ALERT);
4543
4537
  }
4544
4538
  return isBlocked;
4545
4539
  }
@@ -4559,7 +4553,7 @@ function blockCircularMove(args) {
4559
4553
  });
4560
4554
  });
4561
4555
  if (hasCircularComponent) {
4562
- (0, import_editor_notifications3.notify)(COMPONENT_CIRCULAR_NESTING_ALERT);
4556
+ (0, import_editor_notifications4.notify)(COMPONENT_CIRCULAR_NESTING_ALERT);
4563
4557
  }
4564
4558
  return hasCircularComponent;
4565
4559
  }
@@ -4575,7 +4569,7 @@ function blockCircularPaste(args) {
4575
4569
  const allComponentIds = extractComponentIdsFromElements(data.clipboard.elements);
4576
4570
  const hasCircularComponent = allComponentIds.some(wouldCreateCircularNesting);
4577
4571
  if (hasCircularComponent) {
4578
- (0, import_editor_notifications3.notify)(COMPONENT_CIRCULAR_NESTING_ALERT);
4572
+ (0, import_editor_notifications4.notify)(COMPONENT_CIRCULAR_NESTING_ALERT);
4579
4573
  }
4580
4574
  return hasCircularComponent;
4581
4575
  }
@@ -4708,18 +4702,13 @@ var setComponentOverridablePropsSettingsBeforeSave = ({
4708
4702
  };
4709
4703
 
4710
4704
  // src/sync/update-archived-component-before-save.ts
4711
- var import_editor_notifications4 = require("@elementor/editor-notifications");
4705
+ var import_editor_notifications5 = require("@elementor/editor-notifications");
4712
4706
  var import_store74 = require("@elementor/store");
4713
4707
  var failedNotification = (message) => ({
4714
4708
  type: "error",
4715
4709
  message: `Failed to archive components: ${message}`,
4716
4710
  id: "failed-archived-components-notification"
4717
4711
  });
4718
- var successNotification = (message) => ({
4719
- type: "success",
4720
- message: `Successfully archived components: ${message}`,
4721
- id: "success-archived-components-notification"
4722
- });
4723
4712
  var updateArchivedComponentBeforeSave = async () => {
4724
4713
  try {
4725
4714
  const archivedComponents = selectArchivedComponents((0, import_store74.__getState)());
@@ -4730,12 +4719,8 @@ var updateArchivedComponentBeforeSave = async () => {
4730
4719
  archivedComponents.map((component) => component.id)
4731
4720
  );
4732
4721
  const failedIds = result.failedIds.join(", ");
4733
- const successIds = result.successIds.join(", ");
4734
4722
  if (failedIds) {
4735
- (0, import_editor_notifications4.notify)(failedNotification(failedIds));
4736
- }
4737
- if (successIds) {
4738
- (0, import_editor_notifications4.notify)(successNotification(successIds));
4723
+ (0, import_editor_notifications5.notify)(failedNotification(failedIds));
4739
4724
  }
4740
4725
  } catch (error) {
4741
4726
  throw new Error(`Failed to update archived components: ${error}`);
@@ -4803,8 +4788,9 @@ function init() {
4803
4788
  window.elementorCommon.__beforeSave = beforeSave;
4804
4789
  (0, import_editor_elements_panel.injectTab)({
4805
4790
  id: "components",
4806
- label: (0, import_i18n27.__)("Components", "elementor"),
4807
- component: Components
4791
+ label: (0, import_i18n28.__)("Components", "elementor"),
4792
+ component: Components,
4793
+ position: 1
4808
4794
  });
4809
4795
  (0, import_editor.injectIntoTop)({
4810
4796
  id: "create-component-popup",