@elementor/editor-controls 3.33.0-256 → 3.33.0-258

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
@@ -5911,9 +5911,11 @@ var Repeater3 = ({
5911
5911
  setValues: setRepeaterValues,
5912
5912
  showDuplicate = true,
5913
5913
  showToggle = true,
5914
- isSortable = true
5914
+ isSortable = true,
5915
+ disableAddItemButton = false,
5916
+ openItem: initialOpenItem = EMPTY_OPEN_ITEM2
5915
5917
  }) => {
5916
- const [openItem, setOpenItem] = useState17(EMPTY_OPEN_ITEM2);
5918
+ const [openItem, setOpenItem] = useState17(initialOpenItem);
5917
5919
  const [items2, setItems] = useSyncExternalState({
5918
5920
  external: repeaterValues,
5919
5921
  // @ts-expect-error - as long as persistWhen => true, value will never be null
@@ -5997,7 +5999,7 @@ var Repeater3 = ({
5997
5999
  {
5998
6000
  size: SIZE9,
5999
6001
  sx: { ml: "auto" },
6000
- disabled,
6002
+ disabled: disabled || disableAddItemButton,
6001
6003
  onClick: addRepeaterItem,
6002
6004
  "aria-label": __50("Add item", "elementor")
6003
6005
  },
@@ -6020,7 +6022,8 @@ var Repeater3 = ({
6020
6022
  openOnMount: openOnAdd && openItem === key,
6021
6023
  onOpen: () => setOpenItem(EMPTY_OPEN_ITEM2),
6022
6024
  showDuplicate,
6023
- showToggle
6025
+ showToggle,
6026
+ actions: itemSettings.actions
6024
6027
  },
6025
6028
  (props) => /* @__PURE__ */ React102.createElement(
6026
6029
  itemSettings.Content,
@@ -6046,7 +6049,8 @@ var RepeaterItem = ({
6046
6049
  onOpen,
6047
6050
  showDuplicate,
6048
6051
  showToggle,
6049
- disabled
6052
+ disabled,
6053
+ actions
6050
6054
  }) => {
6051
6055
  const { popoverState, popoverProps, ref, setRef } = usePopover(openOnMount, onOpen);
6052
6056
  const duplicateLabel = __50("Duplicate", "elementor");
@@ -6061,7 +6065,7 @@ var RepeaterItem = ({
6061
6065
  "aria-label": __50("Open item", "elementor"),
6062
6066
  ...bindTrigger6(popoverState),
6063
6067
  startIcon,
6064
- actions: /* @__PURE__ */ React102.createElement(React102.Fragment, null, showDuplicate && /* @__PURE__ */ React102.createElement(Tooltip10, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(IconButton9, { size: SIZE9, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React102.createElement(CopyIcon2, { fontSize: SIZE9 }))), showToggle && /* @__PURE__ */ React102.createElement(Tooltip10, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(IconButton9, { size: SIZE9, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React102.createElement(EyeOffIcon2, { fontSize: SIZE9 }) : /* @__PURE__ */ React102.createElement(EyeIcon2, { fontSize: SIZE9 }))), /* @__PURE__ */ React102.createElement(Tooltip10, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(IconButton9, { size: SIZE9, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React102.createElement(XIcon4, { fontSize: SIZE9 }))))
6068
+ actions: /* @__PURE__ */ React102.createElement(React102.Fragment, null, showDuplicate && /* @__PURE__ */ React102.createElement(Tooltip10, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(IconButton9, { size: SIZE9, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React102.createElement(CopyIcon2, { fontSize: SIZE9 }))), showToggle && /* @__PURE__ */ React102.createElement(Tooltip10, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(IconButton9, { size: SIZE9, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React102.createElement(EyeOffIcon2, { fontSize: SIZE9 }) : /* @__PURE__ */ React102.createElement(EyeIcon2, { fontSize: SIZE9 }))), actions, /* @__PURE__ */ React102.createElement(Tooltip10, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React102.createElement(IconButton9, { size: SIZE9, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React102.createElement(XIcon4, { fontSize: SIZE9 }))))
6065
6069
  }
6066
6070
  ), /* @__PURE__ */ React102.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React102.createElement(Box22, null, children({ anchorEl: ref }))));
6067
6071
  };