@elementor/editor-controls 4.1.0-731 → 4.1.0-733
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.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +29 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/repeater/repeater.tsx +29 -3
package/dist/index.mjs
CHANGED
|
@@ -7662,6 +7662,8 @@ var Repeater3 = ({
|
|
|
7662
7662
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
7663
7663
|
openOnMount: openOnAdd && openItem === index,
|
|
7664
7664
|
onOpen: () => setOpenItem(EMPTY_OPEN_ITEM2),
|
|
7665
|
+
onPopoverOpen: itemSettings.onPopoverOpen,
|
|
7666
|
+
onPopoverClose: itemSettings.onPopoverClose,
|
|
7665
7667
|
showDuplicate,
|
|
7666
7668
|
showToggle,
|
|
7667
7669
|
showRemove,
|
|
@@ -7690,6 +7692,8 @@ var RepeaterItem = ({
|
|
|
7690
7692
|
toggleDisableItem,
|
|
7691
7693
|
openOnMount,
|
|
7692
7694
|
onOpen,
|
|
7695
|
+
onPopoverOpen,
|
|
7696
|
+
onPopoverClose,
|
|
7693
7697
|
showDuplicate,
|
|
7694
7698
|
showToggle,
|
|
7695
7699
|
showRemove,
|
|
@@ -7697,7 +7701,11 @@ var RepeaterItem = ({
|
|
|
7697
7701
|
actions,
|
|
7698
7702
|
value
|
|
7699
7703
|
}) => {
|
|
7700
|
-
const { popoverState, popoverProps, ref, setRef } = usePopover(openOnMount,
|
|
7704
|
+
const { popoverState, popoverProps, ref, setRef } = usePopover(openOnMount, () => {
|
|
7705
|
+
onOpen();
|
|
7706
|
+
onPopoverOpen?.(value);
|
|
7707
|
+
});
|
|
7708
|
+
const triggerProps = bindTrigger7(popoverState);
|
|
7701
7709
|
const duplicateLabel = __55("Duplicate", "elementor");
|
|
7702
7710
|
const toggleLabel = propDisabled ? __55("Show", "elementor") : __55("Hide", "elementor");
|
|
7703
7711
|
const removeLabel = __55("Remove", "elementor");
|
|
@@ -7708,11 +7716,29 @@ var RepeaterItem = ({
|
|
|
7708
7716
|
label,
|
|
7709
7717
|
ref: setRef,
|
|
7710
7718
|
"aria-label": __55("Open item", "elementor"),
|
|
7711
|
-
...
|
|
7719
|
+
...triggerProps,
|
|
7720
|
+
onClick: (e) => {
|
|
7721
|
+
triggerProps.onClick(e);
|
|
7722
|
+
if (!popoverState.isOpen) {
|
|
7723
|
+
onPopoverOpen?.(value);
|
|
7724
|
+
}
|
|
7725
|
+
},
|
|
7712
7726
|
startIcon,
|
|
7713
7727
|
actions: /* @__PURE__ */ React113.createElement(React113.Fragment, null, showDuplicate && /* @__PURE__ */ React113.createElement(Tooltip12, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React113.createElement(IconButton10, { size: SIZE11, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React113.createElement(CopyIcon2, { fontSize: SIZE11 }))), showToggle && /* @__PURE__ */ React113.createElement(Tooltip12, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React113.createElement(IconButton10, { size: SIZE11, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React113.createElement(EyeOffIcon2, { fontSize: SIZE11 }) : /* @__PURE__ */ React113.createElement(EyeIcon2, { fontSize: SIZE11 }))), actions?.(value), showRemove && /* @__PURE__ */ React113.createElement(Tooltip12, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React113.createElement(IconButton10, { size: SIZE11, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React113.createElement(XIcon4, { fontSize: SIZE11 }))))
|
|
7714
7728
|
}
|
|
7715
|
-
), /* @__PURE__ */ React113.createElement(
|
|
7729
|
+
), /* @__PURE__ */ React113.createElement(
|
|
7730
|
+
RepeaterPopover,
|
|
7731
|
+
{
|
|
7732
|
+
width: ref?.getBoundingClientRect().width,
|
|
7733
|
+
...popoverProps,
|
|
7734
|
+
onClose: () => {
|
|
7735
|
+
popoverProps.onClose?.();
|
|
7736
|
+
onPopoverClose?.();
|
|
7737
|
+
},
|
|
7738
|
+
anchorEl: ref
|
|
7739
|
+
},
|
|
7740
|
+
/* @__PURE__ */ React113.createElement(Box27, null, children({ anchorEl: ref }))
|
|
7741
|
+
));
|
|
7716
7742
|
};
|
|
7717
7743
|
var usePopover = (openOnMount, onOpen) => {
|
|
7718
7744
|
const [ref, setRef] = useState18(null);
|