@elementor/editor-components 3.35.0-482 → 3.35.0-484
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 +219 -281
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +162 -235
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -22
- package/src/components/components-tab/components-list.tsx +2 -39
- package/src/components/components-tab/angie-promotion-modal.tsx +0 -72
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-components",
|
|
3
3
|
"description": "Elementor editor components",
|
|
4
|
-
"version": "3.35.0-
|
|
4
|
+
"version": "3.35.0-484",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,30 +40,30 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor": "3.35.0-
|
|
44
|
-
"@elementor/editor-canvas": "3.35.0-
|
|
45
|
-
"@elementor/editor-controls": "3.35.0-
|
|
46
|
-
"@elementor/editor-documents": "3.35.0-
|
|
47
|
-
"@elementor/editor-editing-panel": "3.35.0-
|
|
48
|
-
"@elementor/editor-elements": "3.35.0-
|
|
49
|
-
"@elementor/editor-elements-panel": "3.35.0-
|
|
50
|
-
"@elementor/editor-mcp": "3.35.0-
|
|
51
|
-
"@elementor/editor-panels": "3.35.0-
|
|
52
|
-
"@elementor/editor-props": "3.35.0-
|
|
53
|
-
"@elementor/editor-styles-repository": "3.35.0-
|
|
54
|
-
"@elementor/editor-ui": "3.35.0-
|
|
55
|
-
"@elementor/editor-v1-adapters": "3.35.0-
|
|
56
|
-
"@elementor/http-client": "3.35.0-
|
|
43
|
+
"@elementor/editor": "3.35.0-484",
|
|
44
|
+
"@elementor/editor-canvas": "3.35.0-484",
|
|
45
|
+
"@elementor/editor-controls": "3.35.0-484",
|
|
46
|
+
"@elementor/editor-documents": "3.35.0-484",
|
|
47
|
+
"@elementor/editor-editing-panel": "3.35.0-484",
|
|
48
|
+
"@elementor/editor-elements": "3.35.0-484",
|
|
49
|
+
"@elementor/editor-elements-panel": "3.35.0-484",
|
|
50
|
+
"@elementor/editor-mcp": "3.35.0-484",
|
|
51
|
+
"@elementor/editor-panels": "3.35.0-484",
|
|
52
|
+
"@elementor/editor-props": "3.35.0-484",
|
|
53
|
+
"@elementor/editor-styles-repository": "3.35.0-484",
|
|
54
|
+
"@elementor/editor-ui": "3.35.0-484",
|
|
55
|
+
"@elementor/editor-v1-adapters": "3.35.0-484",
|
|
56
|
+
"@elementor/http-client": "3.35.0-484",
|
|
57
57
|
"@elementor/icons": "^1.63.0",
|
|
58
|
-
"@elementor/mixpanel": "3.35.0-
|
|
59
|
-
"@elementor/query": "3.35.0-
|
|
60
|
-
"@elementor/schema": "3.35.0-
|
|
61
|
-
"@elementor/store": "3.35.0-
|
|
58
|
+
"@elementor/mixpanel": "3.35.0-484",
|
|
59
|
+
"@elementor/query": "3.35.0-484",
|
|
60
|
+
"@elementor/schema": "3.35.0-484",
|
|
61
|
+
"@elementor/store": "3.35.0-484",
|
|
62
62
|
"@elementor/ui": "1.36.17",
|
|
63
|
-
"@elementor/utils": "3.35.0-
|
|
63
|
+
"@elementor/utils": "3.35.0-484",
|
|
64
64
|
"@wordpress/i18n": "^5.13.0",
|
|
65
|
-
"@elementor/editor-notifications": "3.35.0-
|
|
66
|
-
"@elementor/editor-current-user": "3.35.0-
|
|
65
|
+
"@elementor/editor-notifications": "3.35.0-484",
|
|
66
|
+
"@elementor/editor-current-user": "3.35.0-484"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"react": "^18.3.1",
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AIIcon, ComponentsIcon } from '@elementor/icons';
|
|
5
|
-
import { Box, Button, Divider, Link, List, Stack, Typography } from '@elementor/ui';
|
|
2
|
+
import { ComponentsIcon } from '@elementor/icons';
|
|
3
|
+
import { Box, Divider, Link, List, Stack, Typography } from '@elementor/ui';
|
|
6
4
|
import { __ } from '@wordpress/i18n';
|
|
7
5
|
|
|
8
6
|
import { useComponents } from '../../hooks/use-components';
|
|
9
7
|
import { useComponentsPermissions } from '../../hooks/use-components-permissions';
|
|
10
8
|
import { renameComponent } from '../../store/actions/rename-component';
|
|
11
|
-
import { AngiePromotionModal } from './angie-promotion-modal';
|
|
12
9
|
import { ComponentItem } from './components-item';
|
|
13
10
|
import { LoadingComponents } from './loading-components';
|
|
14
11
|
import { useSearch } from './search-provider';
|
|
@@ -52,26 +49,8 @@ export function ComponentsList() {
|
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
const EmptyState = () => {
|
|
55
|
-
const [ isAngieModalOpen, setIsAngieModalOpen ] = useState( false );
|
|
56
|
-
|
|
57
52
|
const { canCreate } = useComponentsPermissions();
|
|
58
53
|
|
|
59
|
-
const handleCreateWithAI = () => {
|
|
60
|
-
const sdk = getAngieSdk();
|
|
61
|
-
|
|
62
|
-
if ( sdk.isAngieReady() ) {
|
|
63
|
-
sdk.triggerAngie( {
|
|
64
|
-
prompt: __(
|
|
65
|
-
'Create a [hero/testimonial/product card/CTA/feature] component for my [business type]. Include [describe what you want]',
|
|
66
|
-
'elementor'
|
|
67
|
-
),
|
|
68
|
-
context: { source: 'components-panel-empty-state' },
|
|
69
|
-
} );
|
|
70
|
-
} else {
|
|
71
|
-
setIsAngieModalOpen( true );
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
54
|
return (
|
|
76
55
|
<Stack
|
|
77
56
|
alignItems="center"
|
|
@@ -128,22 +107,6 @@ const EmptyState = () => {
|
|
|
128
107
|
'elementor'
|
|
129
108
|
) }
|
|
130
109
|
</Typography>
|
|
131
|
-
|
|
132
|
-
<Typography align="center" variant="caption" color="secondary">
|
|
133
|
-
{ __( 'Or', 'elementor' ) }
|
|
134
|
-
</Typography>
|
|
135
|
-
|
|
136
|
-
<AngiePromotionModal open={ isAngieModalOpen } onClose={ () => setIsAngieModalOpen( false ) }>
|
|
137
|
-
<Button
|
|
138
|
-
color="secondary"
|
|
139
|
-
variant="outlined"
|
|
140
|
-
size="small"
|
|
141
|
-
onClick={ handleCreateWithAI }
|
|
142
|
-
endIcon={ <AIIcon /> }
|
|
143
|
-
>
|
|
144
|
-
{ __( 'Create component with AI', 'elementor' ) }
|
|
145
|
-
</Button>
|
|
146
|
-
</AngiePromotionModal>
|
|
147
110
|
</Stack>
|
|
148
111
|
</>
|
|
149
112
|
) }
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Button,
|
|
4
|
-
Card,
|
|
5
|
-
CardActions,
|
|
6
|
-
CardContent,
|
|
7
|
-
CardHeader,
|
|
8
|
-
CardMedia,
|
|
9
|
-
ClickAwayListener,
|
|
10
|
-
CloseButton,
|
|
11
|
-
Infotip,
|
|
12
|
-
Typography,
|
|
13
|
-
} from '@elementor/ui';
|
|
14
|
-
import { __ } from '@wordpress/i18n';
|
|
15
|
-
|
|
16
|
-
const ANGIE_INSTALL_URL = '/wp-admin/plugin-install.php?tab=plugin-information&plugin=angie';
|
|
17
|
-
const PLACEHOLDER_IMAGE_URL = 'https://assets.elementor.com/packages/v1/images/components-angie-promo.svg';
|
|
18
|
-
|
|
19
|
-
type AngiePromotionCardProps = {
|
|
20
|
-
onClose: () => void;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
type AngiePromotionModalProps = React.PropsWithChildren< {
|
|
24
|
-
open: boolean;
|
|
25
|
-
onClose: () => void;
|
|
26
|
-
} >;
|
|
27
|
-
|
|
28
|
-
export const AngiePromotionModal = ( { children, open, onClose }: AngiePromotionModalProps ) => {
|
|
29
|
-
return (
|
|
30
|
-
<Infotip placement="right-end" arrow content={ <AngiePromotionCard onClose={ onClose } /> } open={ open }>
|
|
31
|
-
{ children }
|
|
32
|
-
</Infotip>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
function AngiePromotionCard( { onClose }: AngiePromotionCardProps ) {
|
|
37
|
-
const handleCtaClick = () => {
|
|
38
|
-
window.open( ANGIE_INSTALL_URL, '_blank' );
|
|
39
|
-
onClose();
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<ClickAwayListener disableReactTree mouseEvent="onMouseDown" touchEvent="onTouchStart" onClickAway={ onClose }>
|
|
44
|
-
<Card elevation={ 0 } sx={ { maxWidth: 296 } }>
|
|
45
|
-
<CardHeader
|
|
46
|
-
title={ __( 'Add new component with AI', 'elementor' ) }
|
|
47
|
-
titleTypographyProps={ { variant: 'subtitle2' } }
|
|
48
|
-
action={ <CloseButton slotProps={ { icon: { fontSize: 'tiny' } } } onClick={ onClose } /> }
|
|
49
|
-
/>
|
|
50
|
-
<CardMedia
|
|
51
|
-
component="img"
|
|
52
|
-
image={ PLACEHOLDER_IMAGE_URL }
|
|
53
|
-
alt=""
|
|
54
|
-
sx={ { width: '100%', aspectRatio: '16 / 9' } }
|
|
55
|
-
/>
|
|
56
|
-
<CardContent>
|
|
57
|
-
<Typography variant="body2" color="text.secondary">
|
|
58
|
-
{ __(
|
|
59
|
-
'Angie our AI assistant can easily create new components and save you the hassle of doing it yourself',
|
|
60
|
-
'elementor'
|
|
61
|
-
) }
|
|
62
|
-
</Typography>
|
|
63
|
-
</CardContent>
|
|
64
|
-
<CardActions sx={ { justifyContent: 'flex-end' } }>
|
|
65
|
-
<Button size="medium" variant="contained" color="accent" onClick={ handleCtaClick }>
|
|
66
|
-
{ __( 'Get Angie', 'elementor' ) }
|
|
67
|
-
</Button>
|
|
68
|
-
</CardActions>
|
|
69
|
-
</Card>
|
|
70
|
-
</ClickAwayListener>
|
|
71
|
-
);
|
|
72
|
-
}
|