@elementor/editor-controls 3.33.0-237 → 3.33.0-239
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-controls",
|
|
3
3
|
"description": "This package contains the controls model and utils for the Elementor editor",
|
|
4
|
-
"version": "3.33.0-
|
|
4
|
+
"version": "3.33.0-239",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,22 +40,22 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor-current-user": "3.33.0-
|
|
44
|
-
"@elementor/editor-elements": "3.33.0-
|
|
45
|
-
"@elementor/editor-props": "3.33.0-
|
|
46
|
-
"@elementor/editor-responsive": "3.33.0-
|
|
47
|
-
"@elementor/editor-ui": "3.33.0-
|
|
48
|
-
"@elementor/editor-v1-adapters": "3.33.0-
|
|
49
|
-
"@elementor/env": "3.33.0-
|
|
50
|
-
"@elementor/http-client": "3.33.0-
|
|
43
|
+
"@elementor/editor-current-user": "3.33.0-239",
|
|
44
|
+
"@elementor/editor-elements": "3.33.0-239",
|
|
45
|
+
"@elementor/editor-props": "3.33.0-239",
|
|
46
|
+
"@elementor/editor-responsive": "3.33.0-239",
|
|
47
|
+
"@elementor/editor-ui": "3.33.0-239",
|
|
48
|
+
"@elementor/editor-v1-adapters": "3.33.0-239",
|
|
49
|
+
"@elementor/env": "3.33.0-239",
|
|
50
|
+
"@elementor/http-client": "3.33.0-239",
|
|
51
51
|
"@elementor/icons": "1.55.0",
|
|
52
|
-
"@elementor/locations": "3.33.0-
|
|
53
|
-
"@elementor/mixpanel": "3.33.0-
|
|
54
|
-
"@elementor/query": "3.33.0-
|
|
55
|
-
"@elementor/session": "3.33.0-
|
|
52
|
+
"@elementor/locations": "3.33.0-239",
|
|
53
|
+
"@elementor/mixpanel": "3.33.0-239",
|
|
54
|
+
"@elementor/query": "3.33.0-239",
|
|
55
|
+
"@elementor/session": "3.33.0-239",
|
|
56
56
|
"@elementor/ui": "1.36.17",
|
|
57
|
-
"@elementor/utils": "3.33.0-
|
|
58
|
-
"@elementor/wp-media": "3.33.0-
|
|
57
|
+
"@elementor/utils": "3.33.0-239",
|
|
58
|
+
"@elementor/wp-media": "3.33.0-239",
|
|
59
59
|
"@wordpress/i18n": "^5.13.0",
|
|
60
60
|
"@monaco-editor/react": "^4.7.0",
|
|
61
61
|
"dayjs": "^1.11.18",
|
|
@@ -39,6 +39,7 @@ type RepeaterItemContentProps< T > = {
|
|
|
39
39
|
bind: PropKey;
|
|
40
40
|
value: T;
|
|
41
41
|
collectionPropUtil?: CollectionPropUtil< T >;
|
|
42
|
+
index: number;
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
type RepeaterItemContent< T > = React.ComponentType< RepeaterItemContentProps< T > >;
|
|
@@ -80,7 +81,7 @@ type RepeaterProps< T > = {
|
|
|
80
81
|
disabled?: boolean;
|
|
81
82
|
itemSettings: {
|
|
82
83
|
initialValues: T;
|
|
83
|
-
Label: React.ComponentType< { value: T } >;
|
|
84
|
+
Label: React.ComponentType< { value: T; index: number } >;
|
|
84
85
|
Icon: React.ComponentType< { value: T } >;
|
|
85
86
|
Content: RepeaterItemContent< T >;
|
|
86
87
|
};
|
|
@@ -149,7 +150,7 @@ export const Repeater = < T, >( {
|
|
|
149
150
|
const atPosition = 1 + index;
|
|
150
151
|
|
|
151
152
|
setItems( [ ...items.slice( 0, atPosition ), newItem, ...items.slice( atPosition ) ], undefined, {
|
|
152
|
-
action: { type: 'duplicate', payload: [ { index
|
|
153
|
+
action: { type: 'duplicate', payload: [ { index, item: newItem } ] },
|
|
153
154
|
} );
|
|
154
155
|
setUniqueKeys( [ ...uniqueKeys.slice( 0, atPosition ), newKey, ...uniqueKeys.slice( atPosition ) ] );
|
|
155
156
|
};
|
|
@@ -242,7 +243,7 @@ export const Repeater = < T, >( {
|
|
|
242
243
|
propDisabled={ value?.disabled }
|
|
243
244
|
label={
|
|
244
245
|
<RepeaterItemLabelSlot value={ value }>
|
|
245
|
-
<itemSettings.Label value={ value } />
|
|
246
|
+
<itemSettings.Label value={ value } index={ index } />
|
|
246
247
|
</RepeaterItemLabelSlot>
|
|
247
248
|
}
|
|
248
249
|
startIcon={
|
|
@@ -260,7 +261,12 @@ export const Repeater = < T, >( {
|
|
|
260
261
|
collectionPropUtil={ collectionPropUtil }
|
|
261
262
|
>
|
|
262
263
|
{ ( props ) => (
|
|
263
|
-
<itemSettings.Content
|
|
264
|
+
<itemSettings.Content
|
|
265
|
+
{ ...props }
|
|
266
|
+
value={ value }
|
|
267
|
+
bind={ String( index ) }
|
|
268
|
+
index={ index }
|
|
269
|
+
/>
|
|
264
270
|
) }
|
|
265
271
|
</RepeaterItem>
|
|
266
272
|
</SortableItem>
|