@elementor/editor-components 3.35.0-479 → 3.35.0-481

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
@@ -70,16 +70,18 @@ var apiClient = {
70
70
  componentId: componentId.toString()
71
71
  }
72
72
  }).then((res) => res.data.data),
73
- updateArchivedComponents: async (componentIds) => await httpService().post(
73
+ updateArchivedComponents: async (componentIds, status) => await httpService().post(
74
74
  `${BASE_URL}/archive`,
75
75
  {
76
- componentIds
76
+ componentIds,
77
+ status
77
78
  }
78
79
  ).then((res) => res.data.data),
79
- updateComponentTitle: (updatedComponentNames) => httpService().post(
80
+ updateComponentTitle: (updatedComponentNames, status) => httpService().post(
80
81
  `${BASE_URL}/update-titles`,
81
82
  {
82
- components: updatedComponentNames
83
+ components: updatedComponentNames,
84
+ status
83
85
  }
84
86
  ).then((res) => res.data.data),
85
87
  validate: async (payload) => await httpService().post(`${BASE_URL}/create-validate`, payload).then((res) => res.data)
@@ -355,9 +357,11 @@ var componentOverrideTransformer = createTransformer3((override) => {
355
357
  import * as React10 from "react";
356
358
  import { useSuppressedMessage } from "@elementor/editor-current-user";
357
359
  import { getV1DocumentsManager as getV1DocumentsManager3 } from "@elementor/editor-documents";
360
+ import { PanelHeader as PanelHeader2 } from "@elementor/editor-panels";
361
+ import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
358
362
  import { ArrowLeftIcon, ComponentsFilledIcon } from "@elementor/icons";
359
363
  import { __getState as getState11 } from "@elementor/store";
360
- import { Box as Box7, Divider as Divider2, IconButton as IconButton4, Stack as Stack6, Tooltip as Tooltip4, Typography as Typography6 } from "@elementor/ui";
364
+ import { Box as Box7, Divider as Divider2, IconButton as IconButton4, Tooltip as Tooltip4, Typography as Typography6 } from "@elementor/ui";
361
365
  import { __ as __13 } from "@wordpress/i18n";
362
366
 
363
367
  // src/hooks/use-navigate-back.ts
@@ -1299,7 +1303,7 @@ function PropertiesEmptyState({ introductionRef }) {
1299
1303
 
1300
1304
  // src/components/component-properties-panel/properties-group.tsx
1301
1305
  import * as React6 from "react";
1302
- import { EditableField, MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
1306
+ import { EditableField, EllipsisWithTooltip, MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
1303
1307
  import { DotsVerticalIcon } from "@elementor/icons";
1304
1308
  import {
1305
1309
  bindMenu,
@@ -1664,14 +1668,18 @@ function PropertiesGroup({
1664
1668
  Box4,
1665
1669
  {
1666
1670
  sx: {
1667
- flex: 1,
1668
1671
  height: 28,
1669
1672
  display: "flex",
1670
1673
  alignItems: "center",
1671
1674
  border: 2,
1672
1675
  borderColor: "text.secondary",
1673
1676
  borderRadius: 1,
1674
- pl: 0.5
1677
+ pl: 0.5,
1678
+ flexGrow: 1,
1679
+ overflow: "hidden",
1680
+ textOverflow: "ellipsis",
1681
+ whiteSpace: "nowrap",
1682
+ width: "100%"
1675
1683
  }
1676
1684
  },
1677
1685
  /* @__PURE__ */ React6.createElement(
@@ -1686,12 +1694,13 @@ function PropertiesGroup({
1686
1694
  }
1687
1695
  )
1688
1696
  ) : /* @__PURE__ */ React6.createElement(
1689
- Typography5,
1697
+ EllipsisWithTooltip,
1690
1698
  {
1699
+ title: group.label,
1700
+ as: Typography5,
1691
1701
  variant: "caption",
1692
1702
  sx: { color: "text.primary", fontWeight: 400, lineHeight: 1.66 }
1693
- },
1694
- group.label
1703
+ }
1695
1704
  ), /* @__PURE__ */ React6.createElement(
1696
1705
  IconButton2,
1697
1706
  {
@@ -2068,24 +2077,22 @@ var ComponentPanelHeader = () => {
2068
2077
  properties_count: overridablePropsCount
2069
2078
  });
2070
2079
  };
2071
- return /* @__PURE__ */ React10.createElement(Box7, null, /* @__PURE__ */ React10.createElement(
2072
- Stack6,
2080
+ return /* @__PURE__ */ React10.createElement(Box7, null, /* @__PURE__ */ React10.createElement(PanelHeader2, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React10.createElement(Tooltip4, { title: __13("Back", "elementor") }, /* @__PURE__ */ React10.createElement(IconButton4, { size: "tiny", onClick: onBack, "aria-label": __13("Back", "elementor") }, /* @__PURE__ */ React10.createElement(ArrowLeftIcon, { fontSize: "tiny" }))), /* @__PURE__ */ React10.createElement(ComponentsFilledIcon, { fontSize: "tiny", stroke: "currentColor" }), /* @__PURE__ */ React10.createElement(
2081
+ EllipsisWithTooltip2,
2073
2082
  {
2074
- direction: "row",
2075
- alignItems: "center",
2076
- justifyContent: "space-between",
2077
- sx: { height: 48, pl: 1.5, pr: 2, py: 1 }
2078
- },
2079
- /* @__PURE__ */ React10.createElement(Stack6, { direction: "row", alignItems: "center" }, /* @__PURE__ */ React10.createElement(Tooltip4, { title: __13("Back", "elementor") }, /* @__PURE__ */ React10.createElement(IconButton4, { size: "tiny", onClick: onBack, "aria-label": __13("Back", "elementor") }, /* @__PURE__ */ React10.createElement(ArrowLeftIcon, { fontSize: "tiny" }))), /* @__PURE__ */ React10.createElement(Stack6, { direction: "row", alignItems: "center", gap: 0.5 }, /* @__PURE__ */ React10.createElement(ComponentsFilledIcon, { fontSize: "tiny", stroke: "currentColor" }), /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", sx: { fontWeight: 500 } }, componentName))),
2080
- /* @__PURE__ */ React10.createElement(
2081
- ComponentsBadge,
2082
- {
2083
- overridablePropsCount,
2084
- ref: anchorRef,
2085
- onClick: handleOpenPropertiesPanel
2086
- }
2087
- )
2088
- ), /* @__PURE__ */ React10.createElement(Divider2, null), /* @__PURE__ */ React10.createElement(
2083
+ title: componentName,
2084
+ as: Typography6,
2085
+ variant: "caption",
2086
+ sx: { fontWeight: 500, flexGrow: 1 }
2087
+ }
2088
+ ), /* @__PURE__ */ React10.createElement(
2089
+ ComponentsBadge,
2090
+ {
2091
+ overridablePropsCount,
2092
+ ref: anchorRef,
2093
+ onClick: handleOpenPropertiesPanel
2094
+ }
2095
+ )), /* @__PURE__ */ React10.createElement(Divider2, null), /* @__PURE__ */ React10.createElement(
2089
2096
  ComponentIntroduction,
2090
2097
  {
2091
2098
  anchorRef,
@@ -2132,7 +2139,7 @@ function isProUser() {
2132
2139
  // src/components/components-tab/component-search.tsx
2133
2140
  import * as React12 from "react";
2134
2141
  import { SearchIcon } from "@elementor/icons";
2135
- import { Box as Box8, InputAdornment, Stack as Stack7, TextField as TextField2 } from "@elementor/ui";
2142
+ import { Box as Box8, InputAdornment, Stack as Stack6, TextField as TextField2 } from "@elementor/ui";
2136
2143
  import { __ as __14 } from "@wordpress/i18n";
2137
2144
 
2138
2145
  // src/components/components-tab/search-provider.tsx
@@ -2161,7 +2168,7 @@ var useSearch = () => {
2161
2168
  // src/components/components-tab/component-search.tsx
2162
2169
  var ComponentSearch = () => {
2163
2170
  const { inputValue, handleChange } = useSearch();
2164
- return /* @__PURE__ */ React12.createElement(Stack7, { direction: "row", gap: 0.5, sx: { width: "100%", px: 2, py: 1.5 } }, /* @__PURE__ */ React12.createElement(Box8, { sx: { flexGrow: 1 } }, /* @__PURE__ */ React12.createElement(
2171
+ return /* @__PURE__ */ React12.createElement(Stack6, { direction: "row", gap: 0.5, sx: { width: "100%", px: 2, py: 1.5 } }, /* @__PURE__ */ React12.createElement(Box8, { sx: { flexGrow: 1 } }, /* @__PURE__ */ React12.createElement(
2165
2172
  TextField2,
2166
2173
  {
2167
2174
  role: "search",
@@ -2182,7 +2189,7 @@ import * as React17 from "react";
2182
2189
  import { useState as useState7 } from "react";
2183
2190
  import { getAngieSdk } from "@elementor/editor-mcp";
2184
2191
  import { AIIcon, ComponentsIcon as ComponentsIcon2 } from "@elementor/icons";
2185
- import { Box as Box11, Button as Button4, Divider as Divider3, Link as Link3, List as List3, Stack as Stack10, Typography as Typography9 } from "@elementor/ui";
2192
+ import { Box as Box11, Button as Button4, Divider as Divider3, Link as Link3, List as List3, Stack as Stack9, Typography as Typography9 } from "@elementor/ui";
2186
2193
  import { __ as __20 } from "@wordpress/i18n";
2187
2194
 
2188
2195
  // src/hooks/use-components-permissions.ts
@@ -2282,7 +2289,7 @@ import * as React15 from "react";
2282
2289
  import { useRef as useRef4, useState as useState6 } from "react";
2283
2290
  import { endDragElementFromPanel, startDragElementFromPanel } from "@elementor/editor-canvas";
2284
2291
  import { dropElement } from "@elementor/editor-elements";
2285
- import { EditableField as EditableField2, EllipsisWithTooltip, MenuListItem as MenuListItem3, useEditable as useEditable2, WarningInfotip } from "@elementor/editor-ui";
2292
+ import { EditableField as EditableField2, EllipsisWithTooltip as EllipsisWithTooltip3, MenuListItem as MenuListItem3, useEditable as useEditable2, WarningInfotip } from "@elementor/editor-ui";
2286
2293
  import { ComponentsIcon, DotsVerticalIcon as DotsVerticalIcon2 } from "@elementor/icons";
2287
2294
  import {
2288
2295
  bindMenu as bindMenu2,
@@ -2292,7 +2299,7 @@ import {
2292
2299
  ListItemButton,
2293
2300
  ListItemIcon,
2294
2301
  Menu as Menu2,
2295
- Stack as Stack8,
2302
+ Stack as Stack7,
2296
2303
  styled as styled3,
2297
2304
  Typography as Typography8,
2298
2305
  usePopupState as usePopupState3
@@ -2605,7 +2612,7 @@ var ComponentItem = ({ component, renameComponent: renameComponent2 }) => {
2605
2612
  const handleDeleteDialogClose = () => {
2606
2613
  setIsDeleteDialogOpen(false);
2607
2614
  };
2608
- return /* @__PURE__ */ React15.createElement(Stack8, null, /* @__PURE__ */ React15.createElement(
2615
+ return /* @__PURE__ */ React15.createElement(Stack7, null, /* @__PURE__ */ React15.createElement(
2609
2616
  WarningInfotip,
2610
2617
  {
2611
2618
  open: Boolean(error),
@@ -2653,7 +2660,7 @@ var ComponentItem = ({ component, renameComponent: renameComponent2 }) => {
2653
2660
  ...getEditableProps()
2654
2661
  }
2655
2662
  ) : /* @__PURE__ */ React15.createElement(
2656
- EllipsisWithTooltip,
2663
+ EllipsisWithTooltip3,
2657
2664
  {
2658
2665
  title: component.name,
2659
2666
  as: Typography8,
@@ -2750,12 +2757,12 @@ var getIndicatorBorder = ({ isActive, isError, theme }) => {
2750
2757
 
2751
2758
  // src/components/components-tab/loading-components.tsx
2752
2759
  import * as React16 from "react";
2753
- import { Box as Box10, ListItemButton as ListItemButton2, Skeleton, Stack as Stack9 } from "@elementor/ui";
2760
+ import { Box as Box10, ListItemButton as ListItemButton2, Skeleton, Stack as Stack8 } from "@elementor/ui";
2754
2761
  var ROWS_COUNT = 6;
2755
2762
  var rows = Array.from({ length: ROWS_COUNT }, (_, index) => index);
2756
2763
  var LoadingComponents = () => {
2757
2764
  return /* @__PURE__ */ React16.createElement(
2758
- Stack9,
2765
+ Stack8,
2759
2766
  {
2760
2767
  "aria-label": "Loading components",
2761
2768
  gap: 1,
@@ -2835,7 +2842,7 @@ var EmptyState = () => {
2835
2842
  }
2836
2843
  };
2837
2844
  return /* @__PURE__ */ React17.createElement(
2838
- Stack10,
2845
+ Stack9,
2839
2846
  {
2840
2847
  alignItems: "center",
2841
2848
  justifyContent: "start",
@@ -2844,7 +2851,7 @@ var EmptyState = () => {
2844
2851
  gap: 2,
2845
2852
  overflow: "hidden"
2846
2853
  },
2847
- /* @__PURE__ */ React17.createElement(Stack10, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React17.createElement(ComponentsIcon2, { fontSize: "large", sx: { color: "text.secondary" } }), /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX }, __20("No components yet", "elementor")), /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "caption", color: "secondary", sx: { maxWidth: 200 } }, __20("Components are reusable blocks that sync across your site.", "elementor"), /* @__PURE__ */ React17.createElement("br", null), canCreate ? __20("Create once, use everywhere.", "elementor") : __20(
2854
+ /* @__PURE__ */ React17.createElement(Stack9, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React17.createElement(ComponentsIcon2, { fontSize: "large", sx: { color: "text.secondary" } }), /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX }, __20("No components yet", "elementor")), /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "caption", color: "secondary", sx: { maxWidth: 200 } }, __20("Components are reusable blocks that sync across your site.", "elementor"), /* @__PURE__ */ React17.createElement("br", null), canCreate ? __20("Create once, use everywhere.", "elementor") : __20(
2848
2855
  "With your current role, you cannot create components. Contact an administrator to create one.",
2849
2856
  "elementor"
2850
2857
  )), /* @__PURE__ */ React17.createElement(
@@ -2858,7 +2865,7 @@ var EmptyState = () => {
2858
2865
  },
2859
2866
  __20("Learn more about components", "elementor")
2860
2867
  )),
2861
- canCreate && /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Divider3, { sx: { width: "100%" } }), /* @__PURE__ */ React17.createElement(Stack10, { alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React17.createElement(
2868
+ canCreate && /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Divider3, { sx: { width: "100%" } }), /* @__PURE__ */ React17.createElement(Stack9, { alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React17.createElement(
2862
2869
  Typography9,
2863
2870
  {
2864
2871
  align: "center",
@@ -2886,7 +2893,7 @@ var EmptyState = () => {
2886
2893
  var EmptySearchResult = () => {
2887
2894
  const { searchValue, clearSearch } = useSearch();
2888
2895
  return /* @__PURE__ */ React17.createElement(
2889
- Stack10,
2896
+ Stack9,
2890
2897
  {
2891
2898
  color: "text.secondary",
2892
2899
  pt: 5,
@@ -2981,7 +2988,7 @@ import { notify as notify3 } from "@elementor/editor-notifications";
2981
2988
  import { Form as FormElement, ThemeProvider as ThemeProvider3 } from "@elementor/editor-ui";
2982
2989
  import { ComponentsIcon as ComponentsIcon3 } from "@elementor/icons";
2983
2990
  import { __getState as getState15 } from "@elementor/store";
2984
- import { Button as Button5, FormLabel as FormLabel2, Grid as Grid2, Popover as Popover3, Stack as Stack11, TextField as TextField3, Typography as Typography11 } from "@elementor/ui";
2991
+ import { Button as Button5, FormLabel as FormLabel2, Grid as Grid2, Popover as Popover3, Stack as Stack10, TextField as TextField3, Typography as Typography11 } from "@elementor/ui";
2985
2992
  import { __ as __23 } from "@wordpress/i18n";
2986
2993
 
2987
2994
  // src/prevent-non-atomic-nesting.ts
@@ -3342,8 +3349,8 @@ var Form2 = ({
3342
3349
  create: __23("Create", "elementor")
3343
3350
  };
3344
3351
  const nameInputId = "component-name";
3345
- return /* @__PURE__ */ React20.createElement(FormElement, { onSubmit: handleSubmit }, /* @__PURE__ */ React20.createElement(Stack11, { alignItems: "start", width: "268px" }, /* @__PURE__ */ React20.createElement(
3346
- Stack11,
3352
+ return /* @__PURE__ */ React20.createElement(FormElement, { onSubmit: handleSubmit }, /* @__PURE__ */ React20.createElement(Stack10, { alignItems: "start", width: "268px" }, /* @__PURE__ */ React20.createElement(
3353
+ Stack10,
3347
3354
  {
3348
3355
  direction: "row",
3349
3356
  alignItems: "center",
@@ -3365,7 +3372,7 @@ var Form2 = ({
3365
3372
  error: Boolean(errors.componentName),
3366
3373
  helperText: errors.componentName
3367
3374
  }
3368
- ))), /* @__PURE__ */ React20.createElement(Stack11, { direction: "row", justifyContent: "flex-end", alignSelf: "end", py: 1, px: 1.5 }, /* @__PURE__ */ React20.createElement(Button5, { onClick: closePopup, color: "secondary", variant: "text", size: "small" }, texts.cancel), /* @__PURE__ */ React20.createElement(Button5, { type: "submit", disabled: !isValid, variant: "contained", color: "primary", size: "small" }, texts.create))));
3375
+ ))), /* @__PURE__ */ React20.createElement(Stack10, { direction: "row", justifyContent: "flex-end", alignSelf: "end", py: 1, px: 1.5 }, /* @__PURE__ */ React20.createElement(Button5, { onClick: closePopup, color: "secondary", variant: "text", size: "small" }, texts.cancel), /* @__PURE__ */ React20.createElement(Button5, { type: "submit", disabled: !isValid, variant: "contained", color: "primary", size: "small" }, texts.create))));
3369
3376
  };
3370
3377
 
3371
3378
  // src/components/edit-component/edit-component.tsx
@@ -3672,7 +3679,7 @@ function getComponentDOMElements(id2) {
3672
3679
  import * as React23 from "react";
3673
3680
  import { closeDialog, openDialog } from "@elementor/editor-ui";
3674
3681
  import { InfoCircleFilledIcon } from "@elementor/icons";
3675
- import { Box as Box13, Button as Button6, DialogActions, DialogContent, DialogHeader, Icon, Stack as Stack12, Typography as Typography12 } from "@elementor/ui";
3682
+ import { Box as Box13, Button as Button6, DialogActions, DialogContent, DialogHeader, Icon, Stack as Stack11, Typography as Typography12 } from "@elementor/ui";
3676
3683
  import { __ as __25 } from "@wordpress/i18n";
3677
3684
  var openEditModeDialog = (lockedBy) => {
3678
3685
  openDialog({
@@ -3681,7 +3688,7 @@ var openEditModeDialog = (lockedBy) => {
3681
3688
  };
3682
3689
  var EditModeDialog = ({ lockedBy }) => {
3683
3690
  const content = __25("%s is currently editing this document", "elementor").replace("%s", lockedBy);
3684
- return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React23.createElement(Box13, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React23.createElement(Icon, { color: "secondary" }, /* @__PURE__ */ React23.createElement(InfoCircleFilledIcon, { fontSize: "medium" })), /* @__PURE__ */ React23.createElement(Typography12, { variant: "subtitle1" }, content))), /* @__PURE__ */ React23.createElement(DialogContent, null, /* @__PURE__ */ React23.createElement(Stack12, { spacing: 2, direction: "column" }, /* @__PURE__ */ React23.createElement(Typography12, { variant: "body2" }, __25(
3691
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React23.createElement(Box13, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React23.createElement(Icon, { color: "secondary" }, /* @__PURE__ */ React23.createElement(InfoCircleFilledIcon, { fontSize: "medium" })), /* @__PURE__ */ React23.createElement(Typography12, { variant: "subtitle1" }, content))), /* @__PURE__ */ React23.createElement(DialogContent, null, /* @__PURE__ */ React23.createElement(Stack11, { spacing: 2, direction: "column" }, /* @__PURE__ */ React23.createElement(Typography12, { variant: "body2" }, __25(
3685
3692
  "You can wait for them to finish or reach out to coordinate your changes together.",
3686
3693
  "elementor"
3687
3694
  )), /* @__PURE__ */ React23.createElement(DialogActions, null, /* @__PURE__ */ React23.createElement(Button6, { color: "secondary", variant: "contained", onClick: closeDialog }, __25("Close", "elementor"))))));
@@ -3692,10 +3699,10 @@ import * as React29 from "react";
3692
3699
  import { ControlAdornmentsProvider } from "@elementor/editor-controls";
3693
3700
  import { getFieldIndicators } from "@elementor/editor-editing-panel";
3694
3701
  import { useSelectedElement as useSelectedElement2 } from "@elementor/editor-elements";
3695
- import { PanelBody as PanelBody2, PanelHeader as PanelHeader2, PanelHeaderTitle as PanelHeaderTitle2 } from "@elementor/editor-panels";
3696
- import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
3702
+ import { PanelBody as PanelBody2, PanelHeader as PanelHeader3, PanelHeaderTitle as PanelHeaderTitle2 } from "@elementor/editor-panels";
3703
+ import { EllipsisWithTooltip as EllipsisWithTooltip4 } from "@elementor/editor-ui";
3697
3704
  import { ComponentsIcon as ComponentsIcon4, PencilIcon as PencilIcon2 } from "@elementor/icons";
3698
- import { Divider as Divider4, IconButton as IconButton6, Stack as Stack17, Tooltip as Tooltip5 } from "@elementor/ui";
3705
+ import { Divider as Divider4, IconButton as IconButton6, Stack as Stack16, Tooltip as Tooltip5 } from "@elementor/ui";
3699
3706
  import { __ as __27 } from "@wordpress/i18n";
3700
3707
 
3701
3708
  // src/hooks/use-component-instance-settings.ts
@@ -3710,7 +3717,7 @@ function useComponentInstanceSettings() {
3710
3717
  // src/components/instance-editing-panel/empty-state.tsx
3711
3718
  import * as React24 from "react";
3712
3719
  import { ComponentPropListIcon as ComponentPropListIcon4, PencilIcon } from "@elementor/icons";
3713
- import { Button as Button7, Stack as Stack13, Typography as Typography13 } from "@elementor/ui";
3720
+ import { Button as Button7, Stack as Stack12, Typography as Typography13 } from "@elementor/ui";
3714
3721
  import { __ as __26 } from "@wordpress/i18n";
3715
3722
  var EmptyState2 = ({ onEditComponent }) => {
3716
3723
  const { canEdit } = useComponentsPermissions();
@@ -3722,7 +3729,7 @@ var EmptyState2 = ({ onEditComponent }) => {
3722
3729
  "elementor"
3723
3730
  );
3724
3731
  return /* @__PURE__ */ React24.createElement(
3725
- Stack13,
3732
+ Stack12,
3726
3733
  {
3727
3734
  alignItems: "center",
3728
3735
  justifyContent: "start",
@@ -3743,7 +3750,7 @@ import * as React28 from "react";
3743
3750
  import { useId } from "react";
3744
3751
  import { useStateByElement } from "@elementor/editor-editing-panel";
3745
3752
  import { CollapseIcon } from "@elementor/editor-ui";
3746
- import { Box as Box14, Collapse, ListItemButton as ListItemButton3, ListItemText, Stack as Stack16 } from "@elementor/ui";
3753
+ import { Box as Box14, Collapse, ListItemButton as ListItemButton3, ListItemText, Stack as Stack15 } from "@elementor/ui";
3747
3754
 
3748
3755
  // src/components/instance-editing-panel/override-prop-control.tsx
3749
3756
  import * as React27 from "react";
@@ -3758,7 +3765,7 @@ import {
3758
3765
  useElement as useElement2
3759
3766
  } from "@elementor/editor-editing-panel";
3760
3767
  import { getContainer as getContainer3, getElementType as getElementType3 } from "@elementor/editor-elements";
3761
- import { Stack as Stack15 } from "@elementor/ui";
3768
+ import { Stack as Stack14 } from "@elementor/ui";
3762
3769
 
3763
3770
  // src/hooks/use-controls-by-widget-type.ts
3764
3771
  import { getElementType as getElementType2 } from "@elementor/editor-elements";
@@ -3892,9 +3899,9 @@ function getPropType({ widgetType, propKey }) {
3892
3899
  // src/components/control-label.tsx
3893
3900
  import * as React26 from "react";
3894
3901
  import { ControlAdornments, ControlFormLabel } from "@elementor/editor-controls";
3895
- import { Stack as Stack14 } from "@elementor/ui";
3902
+ import { Stack as Stack13 } from "@elementor/ui";
3896
3903
  var ControlLabel = ({ children, ...props }) => {
3897
- return /* @__PURE__ */ React26.createElement(Stack14, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React26.createElement(ControlFormLabel, { ...props }, children), /* @__PURE__ */ React26.createElement(ControlAdornments, null));
3904
+ return /* @__PURE__ */ React26.createElement(Stack13, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React26.createElement(ControlFormLabel, { ...props }, children), /* @__PURE__ */ React26.createElement(ControlAdornments, null));
3898
3905
  };
3899
3906
 
3900
3907
  // src/components/errors.ts
@@ -3993,7 +4000,7 @@ function OverrideControl({ overridableProp, overrides }) {
3993
4000
  return false;
3994
4001
  }
3995
4002
  },
3996
- /* @__PURE__ */ React27.createElement(PropKeyProvider, { bind: overridableProp.overrideKey }, /* @__PURE__ */ React27.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React27.createElement(Stack15, { direction: "column", gap: 1, mb: 1.5 }, layout !== "custom" && /* @__PURE__ */ React27.createElement(ControlLabel, null, overridableProp.label), /* @__PURE__ */ React27.createElement(OriginalControl, { control, controlProps }))))
4003
+ /* @__PURE__ */ React27.createElement(PropKeyProvider, { bind: overridableProp.overrideKey }, /* @__PURE__ */ React27.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React27.createElement(Stack14, { direction: "column", gap: 1, mb: 1.5 }, layout !== "custom" && /* @__PURE__ */ React27.createElement(ControlLabel, null, overridableProp.label), /* @__PURE__ */ React27.createElement(OriginalControl, { control, controlProps }))))
3997
4004
  )))
3998
4005
  );
3999
4006
  }
@@ -4098,7 +4105,7 @@ function OverridePropsGroup({ group, props, overrides }) {
4098
4105
  p: 0,
4099
4106
  sx: { "&:hover": { backgroundColor: "transparent" } }
4100
4107
  },
4101
- /* @__PURE__ */ React28.createElement(Stack16, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React28.createElement(
4108
+ /* @__PURE__ */ React28.createElement(Stack15, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React28.createElement(
4102
4109
  ListItemText,
4103
4110
  {
4104
4111
  secondary: title,
@@ -4107,7 +4114,7 @@ function OverridePropsGroup({ group, props, overrides }) {
4107
4114
  }
4108
4115
  )),
4109
4116
  /* @__PURE__ */ React28.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
4110
- ), /* @__PURE__ */ React28.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto" }, /* @__PURE__ */ React28.createElement(Stack16, { direction: "column", gap: 1, p: 2 }, group.props.map((overrideKey) => /* @__PURE__ */ React28.createElement(
4117
+ ), /* @__PURE__ */ React28.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto" }, /* @__PURE__ */ React28.createElement(Stack15, { direction: "column", gap: 1, p: 2 }, group.props.map((overrideKey) => /* @__PURE__ */ React28.createElement(
4111
4118
  OverridePropControl,
4112
4119
  {
4113
4120
  key: overrideKey,
@@ -4134,7 +4141,7 @@ function InstanceEditingPanel() {
4134
4141
  const isNonEmptyGroup = (group) => group !== null && group.props.length > 0;
4135
4142
  const groups = overridableProps.groups.order.map((groupId) => overridableProps.groups.items[groupId] ?? null).filter(isNonEmptyGroup);
4136
4143
  const isEmpty = groups.length === 0 || Object.keys(overridableProps.props).length === 0;
4137
- return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(PanelHeader2, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React29.createElement(Stack17, { direction: "row", alignItems: "center", flexGrow: 1, gap: 1, maxWidth: "100%" }, /* @__PURE__ */ React29.createElement(ComponentsIcon4, { fontSize: "small", sx: { color: "text.tertiary" } }), /* @__PURE__ */ React29.createElement(EllipsisWithTooltip2, { title: component.name, as: PanelHeaderTitle2, sx: { flexGrow: 1 } }), canEdit && /* @__PURE__ */ React29.createElement(Tooltip5, { title: panelTitle }, /* @__PURE__ */ React29.createElement(IconButton6, { size: "tiny", onClick: handleEditComponent, "aria-label": panelTitle }, /* @__PURE__ */ React29.createElement(PencilIcon2, { fontSize: "tiny" }))))), /* @__PURE__ */ React29.createElement(PanelBody2, null, /* @__PURE__ */ React29.createElement(ControlAdornmentsProvider, { items: getFieldIndicators("settings") }, isEmpty ? /* @__PURE__ */ React29.createElement(EmptyState2, { onEditComponent: handleEditComponent }) : /* @__PURE__ */ React29.createElement(Stack17, { direction: "column", alignItems: "stretch" }, groups.map((group) => /* @__PURE__ */ React29.createElement(React29.Fragment, { key: group.id }, /* @__PURE__ */ React29.createElement(
4144
+ return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(PanelHeader3, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React29.createElement(Stack16, { direction: "row", alignItems: "center", flexGrow: 1, gap: 1, maxWidth: "100%" }, /* @__PURE__ */ React29.createElement(ComponentsIcon4, { fontSize: "small", sx: { color: "text.tertiary" } }), /* @__PURE__ */ React29.createElement(EllipsisWithTooltip4, { title: component.name, as: PanelHeaderTitle2, sx: { flexGrow: 1 } }), canEdit && /* @__PURE__ */ React29.createElement(Tooltip5, { title: panelTitle }, /* @__PURE__ */ React29.createElement(IconButton6, { size: "tiny", onClick: handleEditComponent, "aria-label": panelTitle }, /* @__PURE__ */ React29.createElement(PencilIcon2, { fontSize: "tiny" }))))), /* @__PURE__ */ React29.createElement(PanelBody2, null, /* @__PURE__ */ React29.createElement(ControlAdornmentsProvider, { items: getFieldIndicators("settings") }, isEmpty ? /* @__PURE__ */ React29.createElement(EmptyState2, { onEditComponent: handleEditComponent }) : /* @__PURE__ */ React29.createElement(Stack16, { direction: "column", alignItems: "stretch" }, groups.map((group) => /* @__PURE__ */ React29.createElement(React29.Fragment, { key: group.id }, /* @__PURE__ */ React29.createElement(
4138
4145
  OverridePropsGroup,
4139
4146
  {
4140
4147
  group,
@@ -5071,6 +5078,21 @@ function updateElementComponentId(elementId, componentId) {
5071
5078
  });
5072
5079
  }
5073
5080
 
5081
+ // src/sync/publish-draft-components-in-page-before-save.ts
5082
+ import { isDocumentDirty as isDocumentDirty2 } from "@elementor/editor-documents";
5083
+ async function publishDraftComponentsInPageBeforeSave({ status, elements }) {
5084
+ if (status !== "publish") {
5085
+ return;
5086
+ }
5087
+ const documents = await getComponentDocuments(elements);
5088
+ const draftIds = [...documents.values()].filter(isDocumentDirty2).map((document) => document.id);
5089
+ if (draftIds.length === 0) {
5090
+ return;
5091
+ }
5092
+ await apiClient.updateStatuses(draftIds, "publish");
5093
+ draftIds.forEach((id2) => invalidateComponentDocumentData(id2));
5094
+ }
5095
+
5074
5096
  // src/sync/set-component-overridable-props-settings-before-save.ts
5075
5097
  import { __getState as getState22 } from "@elementor/store";
5076
5098
  var setComponentOverridablePropsSettingsBeforeSave = ({
@@ -5094,13 +5116,13 @@ var failedNotification = (message) => ({
5094
5116
  message: `Failed to archive components: ${message}`,
5095
5117
  id: "failed-archived-components-notification"
5096
5118
  });
5097
- var updateArchivedComponentBeforeSave = async () => {
5119
+ var updateArchivedComponentBeforeSave = async (status) => {
5098
5120
  try {
5099
5121
  const archivedComponents = selectArchivedThisSession(getState23());
5100
5122
  if (!archivedComponents.length) {
5101
5123
  return;
5102
5124
  }
5103
- const result = await apiClient.updateArchivedComponents(archivedComponents);
5125
+ const result = await apiClient.updateArchivedComponents(archivedComponents, status);
5104
5126
  const failedIds = result.failedIds.join(", ");
5105
5127
  if (failedIds) {
5106
5128
  notify5(failedNotification(failedIds));
@@ -5112,43 +5134,37 @@ var updateArchivedComponentBeforeSave = async () => {
5112
5134
 
5113
5135
  // src/sync/update-component-title-before-save.ts
5114
5136
  import { __dispatch as dispatch18, __getState as getState24 } from "@elementor/store";
5115
- var updateComponentTitleBeforeSave = async () => {
5137
+ var updateComponentTitleBeforeSave = async (status) => {
5116
5138
  const updatedComponentNames = selectUpdatedComponentNames(getState24());
5117
5139
  if (!updatedComponentNames.length) {
5118
5140
  return;
5119
5141
  }
5120
- const result = await apiClient.updateComponentTitle(updatedComponentNames);
5142
+ const result = await apiClient.updateComponentTitle(updatedComponentNames, status);
5121
5143
  if (result.failedIds.length === 0) {
5122
5144
  dispatch18(slice.actions.cleanUpdatedComponentNames());
5123
5145
  }
5124
5146
  };
5125
5147
 
5126
- // src/sync/update-components-before-save.ts
5127
- import { isDocumentDirty as isDocumentDirty2 } from "@elementor/editor-documents";
5128
- async function updateComponentsBeforeSave({ status, elements }) {
5129
- if (status !== "publish") {
5130
- return;
5131
- }
5132
- const documents = await getComponentDocuments(elements);
5133
- const draftIds = [...documents.values()].filter(isDocumentDirty2).map((document) => document.id);
5134
- if (draftIds.length === 0) {
5135
- return;
5136
- }
5137
- await apiClient.updateStatuses(draftIds, "publish");
5138
- draftIds.forEach((id2) => invalidateComponentDocumentData(id2));
5139
- }
5140
-
5141
5148
  // src/sync/before-save.ts
5142
5149
  var beforeSave = ({ container, status }) => {
5143
5150
  const elements = container?.model.get("elements").toJSON?.() ?? [];
5144
5151
  return Promise.all([
5145
- updateArchivedComponentBeforeSave(),
5146
- createComponentsBeforeSave({ elements, status }),
5147
- updateComponentsBeforeSave({ elements, status }),
5148
- setComponentOverridablePropsSettingsBeforeSave({ container }),
5149
- updateComponentTitleBeforeSave()
5152
+ syncComponents({ elements, status }),
5153
+ setComponentOverridablePropsSettingsBeforeSave({ container })
5150
5154
  ]);
5151
5155
  };
5156
+ var syncComponents = async ({ elements, status }) => {
5157
+ await updateExistingComponentsBeforeSave({ elements, status });
5158
+ await createComponentsBeforeSave({ elements, status });
5159
+ };
5160
+ var updateExistingComponentsBeforeSave = async ({
5161
+ elements,
5162
+ status
5163
+ }) => {
5164
+ await updateComponentTitleBeforeSave(status);
5165
+ await updateArchivedComponentBeforeSave(status);
5166
+ await publishDraftComponentsInPageBeforeSave({ elements, status });
5167
+ };
5152
5168
 
5153
5169
  // src/sync/cleanup-overridable-props-on-delete.ts
5154
5170
  import { getAllDescendants as getAllDescendants4 } from "@elementor/editor-elements";