@elementor/editor-controls 3.33.0-236 → 3.33.0-238
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 +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/repeater.tsx +10 -4
package/dist/index.d.mts
CHANGED
|
@@ -450,6 +450,7 @@ type RepeaterItemContentProps<T> = {
|
|
|
450
450
|
bind: PropKey;
|
|
451
451
|
value: T;
|
|
452
452
|
collectionPropUtil?: CollectionPropUtil<T>;
|
|
453
|
+
index: number;
|
|
453
454
|
};
|
|
454
455
|
type RepeaterItemContent<T> = React$1.ComponentType<RepeaterItemContentProps<T>>;
|
|
455
456
|
type ItemActionPayload<T> = Array<{
|
|
@@ -487,6 +488,7 @@ type RepeaterProps<T> = {
|
|
|
487
488
|
initialValues: T;
|
|
488
489
|
Label: React$1.ComponentType<{
|
|
489
490
|
value: T;
|
|
491
|
+
index: number;
|
|
490
492
|
}>;
|
|
491
493
|
Icon: React$1.ComponentType<{
|
|
492
494
|
value: T;
|
package/dist/index.d.ts
CHANGED
|
@@ -450,6 +450,7 @@ type RepeaterItemContentProps<T> = {
|
|
|
450
450
|
bind: PropKey;
|
|
451
451
|
value: T;
|
|
452
452
|
collectionPropUtil?: CollectionPropUtil<T>;
|
|
453
|
+
index: number;
|
|
453
454
|
};
|
|
454
455
|
type RepeaterItemContent<T> = React$1.ComponentType<RepeaterItemContentProps<T>>;
|
|
455
456
|
type ItemActionPayload<T> = Array<{
|
|
@@ -487,6 +488,7 @@ type RepeaterProps<T> = {
|
|
|
487
488
|
initialValues: T;
|
|
488
489
|
Label: React$1.ComponentType<{
|
|
489
490
|
value: T;
|
|
491
|
+
index: number;
|
|
490
492
|
}>;
|
|
491
493
|
Icon: React$1.ComponentType<{
|
|
492
494
|
value: T;
|
package/dist/index.js
CHANGED
|
@@ -5917,7 +5917,7 @@ var Repeater3 = ({
|
|
|
5917
5917
|
const newKey = generateNextKey(uniqueKeys);
|
|
5918
5918
|
const atPosition = 1 + index;
|
|
5919
5919
|
setItems([...items2.slice(0, atPosition), newItem, ...items2.slice(atPosition)], void 0, {
|
|
5920
|
-
action: { type: "duplicate", payload: [{ index
|
|
5920
|
+
action: { type: "duplicate", payload: [{ index, item: newItem }] }
|
|
5921
5921
|
});
|
|
5922
5922
|
setUniqueKeys([...uniqueKeys.slice(0, atPosition), newKey, ...uniqueKeys.slice(atPosition)]);
|
|
5923
5923
|
};
|
|
@@ -5994,7 +5994,7 @@ var Repeater3 = ({
|
|
|
5994
5994
|
{
|
|
5995
5995
|
disabled,
|
|
5996
5996
|
propDisabled: value?.disabled,
|
|
5997
|
-
label: /* @__PURE__ */ React100.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React100.createElement(itemSettings.Label, { value })),
|
|
5997
|
+
label: /* @__PURE__ */ React100.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React100.createElement(itemSettings.Label, { value, index })),
|
|
5998
5998
|
startIcon: /* @__PURE__ */ React100.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React100.createElement(itemSettings.Icon, { value })),
|
|
5999
5999
|
removeItem: () => removeRepeaterItem(index),
|
|
6000
6000
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
@@ -6005,7 +6005,15 @@ var Repeater3 = ({
|
|
|
6005
6005
|
showToggle,
|
|
6006
6006
|
collectionPropUtil
|
|
6007
6007
|
},
|
|
6008
|
-
(props) => /* @__PURE__ */ React100.createElement(
|
|
6008
|
+
(props) => /* @__PURE__ */ React100.createElement(
|
|
6009
|
+
itemSettings.Content,
|
|
6010
|
+
{
|
|
6011
|
+
...props,
|
|
6012
|
+
value,
|
|
6013
|
+
bind: String(index),
|
|
6014
|
+
index
|
|
6015
|
+
}
|
|
6016
|
+
)
|
|
6009
6017
|
));
|
|
6010
6018
|
})));
|
|
6011
6019
|
};
|