@elementor/editor-controls 3.32.0-46 → 3.32.0-47
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.js +20 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/components/unstable-repeater/header/header.tsx +1 -1
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +2 -0
- package/src/controls/repeatable-control.tsx +29 -27
- package/src/controls/transition-control/transition-selector.tsx +1 -1
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.32.0-
|
|
4
|
+
"version": "3.32.0-47",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,21 +40,21 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor-current-user": "3.32.0-
|
|
44
|
-
"@elementor/editor-elements": "3.32.0-
|
|
45
|
-
"@elementor/editor-props": "3.32.0-
|
|
46
|
-
"@elementor/editor-responsive": "3.32.0-
|
|
47
|
-
"@elementor/editor-ui": "3.32.0-
|
|
48
|
-
"@elementor/editor-v1-adapters": "3.32.0-
|
|
49
|
-
"@elementor/env": "3.32.0-
|
|
50
|
-
"@elementor/http-client": "3.32.0-
|
|
43
|
+
"@elementor/editor-current-user": "3.32.0-47",
|
|
44
|
+
"@elementor/editor-elements": "3.32.0-47",
|
|
45
|
+
"@elementor/editor-props": "3.32.0-47",
|
|
46
|
+
"@elementor/editor-responsive": "3.32.0-47",
|
|
47
|
+
"@elementor/editor-ui": "3.32.0-47",
|
|
48
|
+
"@elementor/editor-v1-adapters": "3.32.0-47",
|
|
49
|
+
"@elementor/env": "3.32.0-47",
|
|
50
|
+
"@elementor/http-client": "3.32.0-47",
|
|
51
51
|
"@elementor/icons": "^1.51.1",
|
|
52
|
-
"@elementor/locations": "3.32.0-
|
|
53
|
-
"@elementor/query": "3.32.0-
|
|
54
|
-
"@elementor/session": "3.32.0-
|
|
52
|
+
"@elementor/locations": "3.32.0-47",
|
|
53
|
+
"@elementor/query": "3.32.0-47",
|
|
54
|
+
"@elementor/session": "3.32.0-47",
|
|
55
55
|
"@elementor/ui": "1.36.8",
|
|
56
|
-
"@elementor/utils": "3.32.0-
|
|
57
|
-
"@elementor/wp-media": "3.32.0-
|
|
56
|
+
"@elementor/utils": "3.32.0-47",
|
|
57
|
+
"@elementor/wp-media": "3.32.0-47",
|
|
58
58
|
"@wordpress/i18n": "^5.13.0",
|
|
59
59
|
"@monaco-editor/react": "^4.7.0"
|
|
60
60
|
},
|
|
@@ -22,11 +22,11 @@ export const Header = ( { label, children }: React.PropsWithChildren< { label: s
|
|
|
22
22
|
<Typography component="label" variant="caption" color="text.secondary" sx={ { lineHeight: 1 } }>
|
|
23
23
|
{ label }
|
|
24
24
|
</Typography>
|
|
25
|
+
<ControlAdornments />
|
|
25
26
|
<RepeaterHeaderActionsSlot value={ value } />
|
|
26
27
|
<SlotChildren whitelist={ [ TransformBaseControl, TooltipAddItemAction ] as React.FC[] } sorted>
|
|
27
28
|
{ children }
|
|
28
29
|
</SlotChildren>
|
|
29
|
-
<ControlAdornments />
|
|
30
30
|
</Stack>
|
|
31
31
|
);
|
|
32
32
|
};
|
package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
CHANGED
|
@@ -257,6 +257,8 @@ const ImageOverlayContent = () => {
|
|
|
257
257
|
};
|
|
258
258
|
|
|
259
259
|
const StyledUnstableColorIndicator = styled( UnstableColorIndicator )( ( { theme } ) => ( {
|
|
260
|
+
height: '1rem',
|
|
261
|
+
width: '1rem',
|
|
260
262
|
borderRadius: `${ theme.shape.borderRadius / 2 }px`,
|
|
261
263
|
} ) );
|
|
262
264
|
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
-
import { createArrayPropUtils
|
|
3
|
+
import { createArrayPropUtils } from '@elementor/editor-props';
|
|
4
4
|
import { Box } from '@elementor/ui';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { PropProvider, useBoundProp } from '../bound-prop-context';
|
|
7
7
|
import { PopoverContent } from '../components/popover-content';
|
|
8
8
|
import { PopoverGridContainer } from '../components/popover-grid-container';
|
|
9
|
-
import {
|
|
9
|
+
import { type CollectionPropUtil } from '../components/repeater';
|
|
10
|
+
import { Header, Item, TooltipAddItemAction, UnstableRepeater } from '../components/unstable-repeater';
|
|
11
|
+
import { DisableItemAction } from '../components/unstable-repeater/actions/disable-item-action';
|
|
12
|
+
import { DuplicateItemAction } from '../components/unstable-repeater/actions/duplicate-item-action';
|
|
13
|
+
import { RemoveItemAction } from '../components/unstable-repeater/actions/remove-item-action';
|
|
14
|
+
import { EditItemPopover } from '../components/unstable-repeater/items/edit-item-popover';
|
|
15
|
+
import { ItemsContainer } from '../components/unstable-repeater/items/items-container';
|
|
16
|
+
import { type RepeatablePropValue } from '../components/unstable-repeater/types';
|
|
10
17
|
import { createControl } from '../create-control';
|
|
11
18
|
import {
|
|
12
19
|
type ChildControlConfig,
|
|
@@ -64,41 +71,36 @@ export const RepeatableControl = createControl(
|
|
|
64
71
|
return (
|
|
65
72
|
<PropProvider propType={ propType } value={ value } setValue={ setValue }>
|
|
66
73
|
<RepeatableControlContext.Provider value={ contextValue }>
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
label={ repeaterLabel }
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
<UnstableRepeater
|
|
75
|
+
initial={ childPropTypeUtil.create( initialValues || null ) }
|
|
76
|
+
propTypeUtil={ childArrayPropTypeUtil as CollectionPropUtil< RepeatablePropValue > }
|
|
77
|
+
>
|
|
78
|
+
<Header label={ repeaterLabel }>
|
|
79
|
+
<TooltipAddItemAction newItemIndex={ 0 } />
|
|
80
|
+
</Header>
|
|
81
|
+
<ItemsContainer
|
|
82
|
+
isSortable={ false }
|
|
83
|
+
itemTemplate={ <Item Icon={ ItemIcon } Label={ ItemLabel } /> }
|
|
84
|
+
>
|
|
85
|
+
{ showDuplicate && <DuplicateItemAction /> }
|
|
86
|
+
{ showToggle && <DisableItemAction /> }
|
|
87
|
+
<RemoveItemAction />
|
|
88
|
+
</ItemsContainer>
|
|
89
|
+
<EditItemPopover>
|
|
90
|
+
<Content />
|
|
91
|
+
</EditItemPopover>
|
|
92
|
+
</UnstableRepeater>
|
|
82
93
|
</RepeatableControlContext.Provider>
|
|
83
94
|
</PropProvider>
|
|
84
95
|
);
|
|
85
96
|
}
|
|
86
97
|
);
|
|
87
98
|
|
|
88
|
-
const ItemContent = ( { bind }: { bind: PropKey } ) => {
|
|
89
|
-
return (
|
|
90
|
-
<PropKeyProvider bind={ bind }>
|
|
91
|
-
<Content />
|
|
92
|
-
</PropKeyProvider>
|
|
93
|
-
);
|
|
94
|
-
};
|
|
95
|
-
|
|
96
99
|
// TODO: Configurable icon probably can be somehow part of the injected control and bubbled up to the repeater
|
|
97
100
|
const ItemIcon = () => <></>;
|
|
98
101
|
|
|
99
102
|
const Content = () => {
|
|
100
103
|
const { component: ChildControl, props = {} } = useRepeatableControlContext();
|
|
101
|
-
|
|
102
104
|
return (
|
|
103
105
|
<PopoverContent p={ 1.5 }>
|
|
104
106
|
<PopoverGridContainer>
|