@elementor/editor-interactions 4.5.0-1180 → 4.5.0-1182
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 +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -12
- package/src/components/empty-state.tsx +13 -3
- package/src/components/interactions-header-location.tsx +12 -0
- package/src/components/interactions-list.tsx +2 -0
- package/src/components/interactions-tab.tsx +1 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-interactions",
|
|
3
|
-
"version": "4.5.0-
|
|
3
|
+
"version": "4.5.0-1182",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,19 +39,20 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor-controls": "4.5.0-
|
|
43
|
-
"@elementor/editor-elements": "4.5.0-
|
|
44
|
-
"@elementor/editor-mcp": "4.5.0-
|
|
45
|
-
"@elementor/editor-props": "4.5.0-
|
|
46
|
-
"@elementor/editor-responsive": "4.5.0-
|
|
47
|
-
"@elementor/editor-ui": "4.5.0-
|
|
48
|
-
"@elementor/editor-v1-adapters": "4.5.0-
|
|
42
|
+
"@elementor/editor-controls": "4.5.0-1182",
|
|
43
|
+
"@elementor/editor-elements": "4.5.0-1182",
|
|
44
|
+
"@elementor/editor-mcp": "4.5.0-1182",
|
|
45
|
+
"@elementor/editor-props": "4.5.0-1182",
|
|
46
|
+
"@elementor/editor-responsive": "4.5.0-1182",
|
|
47
|
+
"@elementor/editor-ui": "4.5.0-1182",
|
|
48
|
+
"@elementor/editor-v1-adapters": "4.5.0-1182",
|
|
49
|
+
"@elementor/locations": "4.5.0-1182",
|
|
49
50
|
"@elementor/icons": "~1.78.1",
|
|
50
|
-
"@elementor/schema": "4.5.0-
|
|
51
|
-
"@elementor/session": "4.5.0-
|
|
51
|
+
"@elementor/schema": "4.5.0-1182",
|
|
52
|
+
"@elementor/session": "4.5.0-1182",
|
|
52
53
|
"@elementor/ui": "1.41.4",
|
|
53
|
-
"@elementor/utils": "4.5.0-
|
|
54
|
-
"@elementor/events": "4.5.0-
|
|
54
|
+
"@elementor/utils": "4.5.0-1182",
|
|
55
|
+
"@elementor/events": "4.5.0-1182",
|
|
55
56
|
"@wordpress/i18n": "^5.13.0"
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SwipeIcon } from '@elementor/icons';
|
|
3
|
-
import { Button, Stack, Typography } from '@elementor/ui';
|
|
3
|
+
import { Box, Button, Stack, Typography } from '@elementor/ui';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { InteractionsHeaderSlot } from './interactions-header-location';
|
|
7
|
+
|
|
8
|
+
type EmptyStateProps = {
|
|
9
|
+
elementId: string;
|
|
10
|
+
onCreateInteraction: () => void;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const EmptyState = ( { elementId, onCreateInteraction }: EmptyStateProps ) => {
|
|
7
14
|
return (
|
|
8
15
|
<Stack
|
|
9
16
|
alignItems="center"
|
|
10
17
|
justifyContent="center"
|
|
11
18
|
height="100%"
|
|
12
19
|
color="text.secondary"
|
|
13
|
-
sx={ { p: 2.5, pt: 8, pb: 5.5 } }
|
|
20
|
+
sx={ { position: 'relative', p: 2.5, pt: 8, pb: 5.5 } }
|
|
14
21
|
gap={ 1.5 }
|
|
15
22
|
>
|
|
23
|
+
<Box sx={ { position: 'absolute', top: 8, insetInlineEnd: 8 } }>
|
|
24
|
+
<InteractionsHeaderSlot elementId={ elementId } />
|
|
25
|
+
</Box>
|
|
16
26
|
<SwipeIcon fontSize="large" />
|
|
17
27
|
|
|
18
28
|
<Typography align="center" variant="subtitle2">
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ElementID } from '@elementor/editor-elements';
|
|
2
|
+
import { createLocation } from '@elementor/locations';
|
|
3
|
+
|
|
4
|
+
export type InteractionsHeaderProps = {
|
|
5
|
+
elementId: ElementID;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const {
|
|
9
|
+
Slot: InteractionsHeaderSlot,
|
|
10
|
+
inject: injectIntoInteractionsHeader,
|
|
11
|
+
useInjections: useInteractionsHeaderInjections,
|
|
12
|
+
} = createLocation< InteractionsHeaderProps >();
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
} from '../utils/scroll-interaction-event';
|
|
17
17
|
import { trackInteractionCreated } from '../utils/tracking';
|
|
18
18
|
import { DEFAULT_VALUES } from './interaction-details';
|
|
19
|
+
import { InteractionsHeaderSlot } from './interactions-header-location';
|
|
19
20
|
import { InteractionsListItem } from './interactions-list-item';
|
|
20
21
|
export const MAX_NUMBER_OF_INTERACTIONS = 5;
|
|
21
22
|
|
|
@@ -122,6 +123,7 @@ export function InteractionsList( props: InteractionListProps ) {
|
|
|
122
123
|
openOnAdd
|
|
123
124
|
openItem={ triggerCreateOnShowEmpty ? 0 : undefined }
|
|
124
125
|
label={ __( 'Interactions', 'elementor' ) }
|
|
126
|
+
headerActions={ <InteractionsHeaderSlot elementId={ elementId } /> }
|
|
125
127
|
values={ interactions.items }
|
|
126
128
|
setValues={ handleRepeaterChange }
|
|
127
129
|
showDuplicate={ false }
|
package/src/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ export {
|
|
|
10
10
|
|
|
11
11
|
export { ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX } from './providers/document-elements-interactions-provider';
|
|
12
12
|
export { init } from './init';
|
|
13
|
+
export { injectIntoInteractionsHeader, type InteractionsHeaderProps } from './components/interactions-header-location';
|
|
13
14
|
export { registerInteractionsControl } from './interactions-controls-registry';
|
|
14
15
|
export type { InteractionItemPropValue, FieldProps, ReplayFieldProps } from './types';
|
|
15
16
|
export { TRIGGER_OPTIONS, BASE_TRIGGERS } from './components/controls/trigger';
|