@elementor/editor-controls 4.3.0-982 → 4.3.0-984
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 +10 -16
- package/dist/index.d.ts +10 -16
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/components/repeater/repeater.tsx +28 -32
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": "4.3.0-
|
|
4
|
+
"version": "4.3.0-984",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,23 +40,23 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor-current-user": "4.3.0-
|
|
44
|
-
"@elementor/editor-elements": "4.3.0-
|
|
45
|
-
"@elementor/editor-props": "4.3.0-
|
|
46
|
-
"@elementor/editor-responsive": "4.3.0-
|
|
47
|
-
"@elementor/editor-ui": "4.3.0-
|
|
48
|
-
"@elementor/editor-v1-adapters": "4.3.0-
|
|
49
|
-
"@elementor/env": "4.3.0-
|
|
50
|
-
"@elementor/events": "4.3.0-
|
|
51
|
-
"@elementor/http-client": "4.3.0-
|
|
43
|
+
"@elementor/editor-current-user": "4.3.0-984",
|
|
44
|
+
"@elementor/editor-elements": "4.3.0-984",
|
|
45
|
+
"@elementor/editor-props": "4.3.0-984",
|
|
46
|
+
"@elementor/editor-responsive": "4.3.0-984",
|
|
47
|
+
"@elementor/editor-ui": "4.3.0-984",
|
|
48
|
+
"@elementor/editor-v1-adapters": "4.3.0-984",
|
|
49
|
+
"@elementor/env": "4.3.0-984",
|
|
50
|
+
"@elementor/events": "4.3.0-984",
|
|
51
|
+
"@elementor/http-client": "4.3.0-984",
|
|
52
52
|
"@elementor/icons": "~1.75.1",
|
|
53
|
-
"@elementor/locations": "4.3.0-
|
|
54
|
-
"@elementor/query": "4.3.0-
|
|
55
|
-
"@elementor/schema": "4.3.0-
|
|
56
|
-
"@elementor/session": "4.3.0-
|
|
53
|
+
"@elementor/locations": "4.3.0-984",
|
|
54
|
+
"@elementor/query": "4.3.0-984",
|
|
55
|
+
"@elementor/schema": "4.3.0-984",
|
|
56
|
+
"@elementor/session": "4.3.0-984",
|
|
57
57
|
"@elementor/ui": "1.37.5",
|
|
58
|
-
"@elementor/utils": "4.3.0-
|
|
59
|
-
"@elementor/wp-media": "4.3.0-
|
|
58
|
+
"@elementor/utils": "4.3.0-984",
|
|
59
|
+
"@elementor/wp-media": "4.3.0-984",
|
|
60
60
|
"@monaco-editor/react": "^4.7.0",
|
|
61
61
|
"@tiptap/extension-bold": "^3.11.1",
|
|
62
62
|
"@tiptap/extension-document": "^3.11.1",
|
|
@@ -88,37 +88,32 @@ type SortableItemSettings< T > = BaseItemSettings< T > & {
|
|
|
88
88
|
getId: ( { item, index }: { item: T; index: number } ) => string;
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
-
type
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
showRemove?: boolean;
|
|
118
|
-
openItem?: number;
|
|
119
|
-
isSortable?: true;
|
|
120
|
-
itemSettings: SortableItemSettings< T >;
|
|
121
|
-
};
|
|
91
|
+
type BaseProps< T > = {
|
|
92
|
+
label: string;
|
|
93
|
+
values?: T[];
|
|
94
|
+
openOnAdd?: boolean;
|
|
95
|
+
setValues: ( newValue: T[], _: CreateOptions, meta?: SetRepeaterValuesMeta< T > ) => void;
|
|
96
|
+
disabled?: boolean;
|
|
97
|
+
disableAddItemButton?: boolean;
|
|
98
|
+
addButtonInfotipContent?: React.ReactNode;
|
|
99
|
+
showDuplicate?: boolean;
|
|
100
|
+
showToggle?: boolean;
|
|
101
|
+
showRemove?: boolean;
|
|
102
|
+
openItem?: number;
|
|
103
|
+
adornment?: React.FC;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
type SortableProps< T > = BaseProps< T > & {
|
|
107
|
+
isSortable?: true;
|
|
108
|
+
itemSettings: SortableItemSettings< T >;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
type NonSortableProps< T > = BaseProps< T > & {
|
|
112
|
+
isSortable?: false;
|
|
113
|
+
itemSettings: BaseItemSettings< T >;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
type RepeaterProps< T > = SortableProps< T > | NonSortableProps< T >;
|
|
122
117
|
|
|
123
118
|
const EMPTY_OPEN_ITEM = -1;
|
|
124
119
|
|
|
@@ -136,6 +131,7 @@ export const Repeater = < T, >( {
|
|
|
136
131
|
addButtonInfotipContent,
|
|
137
132
|
openItem: initialOpenItem = EMPTY_OPEN_ITEM,
|
|
138
133
|
isSortable = true,
|
|
134
|
+
adornment = ControlAdornments,
|
|
139
135
|
}: RepeaterProps< RepeaterItem< T > > ) => {
|
|
140
136
|
const [ openItem, setOpenItem ] = useState( initialOpenItem );
|
|
141
137
|
|
|
@@ -232,7 +228,7 @@ export const Repeater = < T, >( {
|
|
|
232
228
|
|
|
233
229
|
return (
|
|
234
230
|
<SectionContent gap={ 2 }>
|
|
235
|
-
<RepeaterHeader label={ label } adornment={
|
|
231
|
+
<RepeaterHeader label={ label } adornment={ adornment }>
|
|
236
232
|
{ shouldShowInfotip ? (
|
|
237
233
|
<Infotip
|
|
238
234
|
placement="right"
|