@elementor/editor-components 4.0.0-661 → 4.0.0-663
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 +40 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +23 -23
- package/src/create-component-type.ts +27 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-components",
|
|
3
3
|
"description": "Elementor editor components",
|
|
4
|
-
"version": "4.0.0-
|
|
4
|
+
"version": "4.0.0-663",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,31 +40,31 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor": "4.0.0-
|
|
44
|
-
"@elementor/editor-canvas": "4.0.0-
|
|
45
|
-
"@elementor/editor-controls": "4.0.0-
|
|
46
|
-
"@elementor/editor-documents": "4.0.0-
|
|
47
|
-
"@elementor/editor-editing-panel": "4.0.0-
|
|
48
|
-
"@elementor/editor-elements": "4.0.0-
|
|
49
|
-
"@elementor/editor-elements-panel": "4.0.0-
|
|
50
|
-
"@elementor/editor-mcp": "4.0.0-
|
|
51
|
-
"@elementor/editor-templates": "4.0.0-
|
|
52
|
-
"@elementor/editor-panels": "4.0.0-
|
|
53
|
-
"@elementor/editor-props": "4.0.0-
|
|
54
|
-
"@elementor/editor-styles-repository": "4.0.0-
|
|
55
|
-
"@elementor/editor-ui": "4.0.0-
|
|
56
|
-
"@elementor/editor-v1-adapters": "4.0.0-
|
|
57
|
-
"@elementor/http-client": "4.0.0-
|
|
43
|
+
"@elementor/editor": "4.0.0-663",
|
|
44
|
+
"@elementor/editor-canvas": "4.0.0-663",
|
|
45
|
+
"@elementor/editor-controls": "4.0.0-663",
|
|
46
|
+
"@elementor/editor-documents": "4.0.0-663",
|
|
47
|
+
"@elementor/editor-editing-panel": "4.0.0-663",
|
|
48
|
+
"@elementor/editor-elements": "4.0.0-663",
|
|
49
|
+
"@elementor/editor-elements-panel": "4.0.0-663",
|
|
50
|
+
"@elementor/editor-mcp": "4.0.0-663",
|
|
51
|
+
"@elementor/editor-templates": "4.0.0-663",
|
|
52
|
+
"@elementor/editor-panels": "4.0.0-663",
|
|
53
|
+
"@elementor/editor-props": "4.0.0-663",
|
|
54
|
+
"@elementor/editor-styles-repository": "4.0.0-663",
|
|
55
|
+
"@elementor/editor-ui": "4.0.0-663",
|
|
56
|
+
"@elementor/editor-v1-adapters": "4.0.0-663",
|
|
57
|
+
"@elementor/http-client": "4.0.0-663",
|
|
58
58
|
"@elementor/icons": "^1.68.0",
|
|
59
|
-
"@elementor/events": "4.0.0-
|
|
60
|
-
"@elementor/query": "4.0.0-
|
|
61
|
-
"@elementor/schema": "4.0.0-
|
|
62
|
-
"@elementor/store": "4.0.0-
|
|
59
|
+
"@elementor/events": "4.0.0-663",
|
|
60
|
+
"@elementor/query": "4.0.0-663",
|
|
61
|
+
"@elementor/schema": "4.0.0-663",
|
|
62
|
+
"@elementor/store": "4.0.0-663",
|
|
63
63
|
"@elementor/ui": "1.36.17",
|
|
64
|
-
"@elementor/utils": "4.0.0-
|
|
64
|
+
"@elementor/utils": "4.0.0-663",
|
|
65
65
|
"@wordpress/i18n": "^5.13.0",
|
|
66
|
-
"@elementor/editor-notifications": "4.0.0-
|
|
67
|
-
"@elementor/editor-current-user": "4.0.0-
|
|
66
|
+
"@elementor/editor-notifications": "4.0.0-663",
|
|
67
|
+
"@elementor/editor-current-user": "4.0.0-663"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.3.1",
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
} from '@elementor/editor-canvas';
|
|
14
14
|
import { getCurrentDocument } from '@elementor/editor-documents';
|
|
15
15
|
import { type V1ElementData } from '@elementor/editor-elements';
|
|
16
|
+
import { notify } from '@elementor/editor-notifications';
|
|
16
17
|
import { __getState as getState } from '@elementor/store';
|
|
17
18
|
import { hasProInstalled } from '@elementor/utils';
|
|
18
19
|
import { __ } from '@wordpress/i18n';
|
|
@@ -54,6 +55,26 @@ export const COMPONENT_WIDGET_TYPE = 'e-component';
|
|
|
54
55
|
|
|
55
56
|
const EDIT_COMPONENT_UPGRADE_URL = 'https://go.elementor.com/go-pro-components-edit/';
|
|
56
57
|
|
|
58
|
+
const COMPONENT_EDIT_UPGRADE_NOTIFICATION_ID = 'component-edit-upgrade';
|
|
59
|
+
|
|
60
|
+
function notifyComponentEditUpgrade() {
|
|
61
|
+
notify( {
|
|
62
|
+
type: 'promotion',
|
|
63
|
+
id: COMPONENT_EDIT_UPGRADE_NOTIFICATION_ID,
|
|
64
|
+
message: __( 'Your Pro subscription has expired. Renew to edit components.', 'elementor' ),
|
|
65
|
+
additionalActionProps: [
|
|
66
|
+
{
|
|
67
|
+
size: 'small',
|
|
68
|
+
variant: 'contained',
|
|
69
|
+
color: 'promotion',
|
|
70
|
+
href: EDIT_COMPONENT_UPGRADE_URL,
|
|
71
|
+
target: '_blank',
|
|
72
|
+
children: __( 'Upgrade Now', 'elementor' ),
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
} );
|
|
76
|
+
}
|
|
77
|
+
|
|
57
78
|
const updateGroups = ( groups: ContextMenuGroup[], config: ContextMenuGroupConfig ): ContextMenuGroup[] => {
|
|
58
79
|
const disableMap = new Map( Object.entries( config.disable ?? {} ) );
|
|
59
80
|
const addMap = new Map( Object.entries( config.add ?? {} ) );
|
|
@@ -279,7 +300,12 @@ function createComponentView(
|
|
|
279
300
|
handleDblClick( e: MouseEvent ) {
|
|
280
301
|
e.stopPropagation();
|
|
281
302
|
|
|
282
|
-
if ( ! isUserAdministrator()
|
|
303
|
+
if ( ! isUserAdministrator() ) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
if ( ! hasProInstalled() ) {
|
|
308
|
+
notifyComponentEditUpgrade();
|
|
283
309
|
return;
|
|
284
310
|
}
|
|
285
311
|
|