@elementor/editor-components 3.35.0-438 → 3.35.0-440

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
@@ -3421,6 +3421,7 @@ var import_editor_controls4 = require("@elementor/editor-controls");
3421
3421
  var import_editor_editing_panel5 = require("@elementor/editor-editing-panel");
3422
3422
  var import_editor_elements15 = require("@elementor/editor-elements");
3423
3423
  var import_editor_panels3 = require("@elementor/editor-panels");
3424
+ var import_editor_ui12 = require("@elementor/editor-ui");
3424
3425
  var import_icons14 = require("@elementor/icons");
3425
3426
  var import_ui22 = require("@elementor/ui");
3426
3427
  var import_i18n26 = require("@wordpress/i18n");
@@ -3888,7 +3889,7 @@ function InstanceEditingPanel() {
3888
3889
  const isNonEmptyGroup = (group) => group !== null && group.props.length > 0;
3889
3890
  const groups = overridableProps.groups.order.map((groupId) => overridableProps.groups.items[groupId] ?? null).filter(isNonEmptyGroup);
3890
3891
  const isEmpty = groups.length === 0 || Object.keys(overridableProps.props).length === 0;
3891
- return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(import_editor_panels3.PanelHeader, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React28.createElement(import_ui22.Stack, { direction: "row", alignContent: "space-between", flexGrow: 1 }, /* @__PURE__ */ React28.createElement(import_ui22.Stack, { direction: "row", alignItems: "center", justifyContent: "start", gap: 1, flexGrow: 1 }, /* @__PURE__ */ React28.createElement(import_icons14.ComponentsIcon, { fontSize: "small", sx: { color: "text.tertiary" } }), /* @__PURE__ */ React28.createElement(import_editor_panels3.PanelHeaderTitle, null, component.name)), /* @__PURE__ */ React28.createElement(import_ui22.Tooltip, { title: panelTitle }, /* @__PURE__ */ React28.createElement(import_ui22.IconButton, { size: "tiny", onClick: handleEditComponent, "aria-label": panelTitle }, /* @__PURE__ */ React28.createElement(import_icons14.PencilIcon, { fontSize: "tiny" }))))), /* @__PURE__ */ React28.createElement(import_editor_panels3.PanelBody, null, /* @__PURE__ */ React28.createElement(import_editor_controls4.ControlAdornmentsProvider, { items: (0, import_editor_editing_panel5.getFieldIndicators)("settings") }, isEmpty ? /* @__PURE__ */ React28.createElement(EmptyState2, { onEditComponent: handleEditComponent }) : /* @__PURE__ */ React28.createElement(import_ui22.Stack, { direction: "column", alignItems: "stretch" }, groups.map((group) => /* @__PURE__ */ React28.createElement(React28.Fragment, { key: group.id }, /* @__PURE__ */ React28.createElement(
3892
+ return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(import_editor_panels3.PanelHeader, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React28.createElement(import_ui22.Stack, { direction: "row", alignItems: "center", flexGrow: 1, gap: 1, maxWidth: "100%" }, /* @__PURE__ */ React28.createElement(import_icons14.ComponentsIcon, { fontSize: "small", sx: { color: "text.tertiary" } }), /* @__PURE__ */ React28.createElement(import_editor_ui12.EllipsisWithTooltip, { title: component.name, as: import_editor_panels3.PanelHeaderTitle }), /* @__PURE__ */ React28.createElement(import_ui22.Tooltip, { title: panelTitle, sx: { marginLeft: "auto" } }, /* @__PURE__ */ React28.createElement(import_ui22.IconButton, { size: "tiny", onClick: handleEditComponent, "aria-label": panelTitle }, /* @__PURE__ */ React28.createElement(import_icons14.PencilIcon, { fontSize: "tiny" }))))), /* @__PURE__ */ React28.createElement(import_editor_panels3.PanelBody, null, /* @__PURE__ */ React28.createElement(import_editor_controls4.ControlAdornmentsProvider, { items: (0, import_editor_editing_panel5.getFieldIndicators)("settings") }, isEmpty ? /* @__PURE__ */ React28.createElement(EmptyState2, { onEditComponent: handleEditComponent }) : /* @__PURE__ */ React28.createElement(import_ui22.Stack, { direction: "column", alignItems: "stretch" }, groups.map((group) => /* @__PURE__ */ React28.createElement(React28.Fragment, { key: group.id }, /* @__PURE__ */ React28.createElement(
3892
3893
  OverridePropsGroup,
3893
3894
  {
3894
3895
  group,
@@ -4208,30 +4209,30 @@ var import_editor_elements17 = require("@elementor/editor-elements");
4208
4209
  var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
4209
4210
  var import_store63 = require("@elementor/store");
4210
4211
  function initCleanupOverridablePropsOnDelete() {
4211
- (0, import_editor_v1_adapters8.registerDataHook)("after", "document/elements/delete", (args) => {
4212
+ (0, import_editor_v1_adapters8.registerDataHook)("dependency", "document/elements/delete", (args) => {
4212
4213
  const state = (0, import_store63.__getState)();
4213
4214
  if (!state) {
4214
- return;
4215
+ return true;
4215
4216
  }
4216
4217
  const currentComponentId = selectCurrentComponentId(state);
4217
4218
  if (!currentComponentId) {
4218
- return;
4219
+ return true;
4219
4220
  }
4220
4221
  const overridableProps = selectOverridableProps(state, currentComponentId);
4221
4222
  if (!overridableProps || Object.keys(overridableProps.props).length === 0) {
4222
- return;
4223
+ return true;
4223
4224
  }
4224
4225
  const containers = args.containers ?? (args.container ? [args.container] : []);
4225
4226
  if (containers.length === 0) {
4226
- return;
4227
+ return true;
4227
4228
  }
4228
4229
  const deletedElementIds = collectDeletedElementIds(containers);
4229
4230
  if (deletedElementIds.length === 0) {
4230
- return;
4231
+ return true;
4231
4232
  }
4232
4233
  const propKeysToDelete = Object.entries(overridableProps.props).filter(([, prop]) => deletedElementIds.includes(prop.elementId)).map(([propKey]) => propKey);
4233
4234
  if (propKeysToDelete.length === 0) {
4234
- return;
4235
+ return true;
4235
4236
  }
4236
4237
  const remainingProps = Object.fromEntries(
4237
4238
  Object.entries(overridableProps.props).filter(([propKey]) => !propKeysToDelete.includes(propKey))
@@ -4250,6 +4251,7 @@ function initCleanupOverridablePropsOnDelete() {
4250
4251
  }
4251
4252
  })
4252
4253
  );
4254
+ return true;
4253
4255
  });
4254
4256
  }
4255
4257
  function collectDeletedElementIds(containers) {