@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/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-236",
4
+ "version": "3.33.0-238",
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-236",
44
- "@elementor/editor-elements": "3.33.0-236",
45
- "@elementor/editor-props": "3.33.0-236",
46
- "@elementor/editor-responsive": "3.33.0-236",
47
- "@elementor/editor-ui": "3.33.0-236",
48
- "@elementor/editor-v1-adapters": "3.33.0-236",
49
- "@elementor/env": "3.33.0-236",
50
- "@elementor/http-client": "3.33.0-236",
43
+ "@elementor/editor-current-user": "3.33.0-238",
44
+ "@elementor/editor-elements": "3.33.0-238",
45
+ "@elementor/editor-props": "3.33.0-238",
46
+ "@elementor/editor-responsive": "3.33.0-238",
47
+ "@elementor/editor-ui": "3.33.0-238",
48
+ "@elementor/editor-v1-adapters": "3.33.0-238",
49
+ "@elementor/env": "3.33.0-238",
50
+ "@elementor/http-client": "3.33.0-238",
51
51
  "@elementor/icons": "1.55.0",
52
- "@elementor/locations": "3.33.0-236",
53
- "@elementor/mixpanel": "3.33.0-236",
54
- "@elementor/query": "3.33.0-236",
55
- "@elementor/session": "3.33.0-236",
52
+ "@elementor/locations": "3.33.0-238",
53
+ "@elementor/mixpanel": "3.33.0-238",
54
+ "@elementor/query": "3.33.0-238",
55
+ "@elementor/session": "3.33.0-238",
56
56
  "@elementor/ui": "1.36.17",
57
- "@elementor/utils": "3.33.0-236",
58
- "@elementor/wp-media": "3.33.0-236",
57
+ "@elementor/utils": "3.33.0-238",
58
+ "@elementor/wp-media": "3.33.0-238",
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: atPosition, item: newItem } ] },
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 { ...props } value={ value } bind={ String( index ) } />
264
+ <itemSettings.Content
265
+ { ...props }
266
+ value={ value }
267
+ bind={ String( index ) }
268
+ index={ index }
269
+ />
264
270
  ) }
265
271
  </RepeaterItem>
266
272
  </SortableItem>