@elementor/editor-canvas 4.0.0-544 → 4.0.0-545
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
CHANGED
|
@@ -3139,19 +3139,19 @@ var CompositionBuilder = class _CompositionBuilder {
|
|
|
3139
3139
|
const elementTag = node.tagName;
|
|
3140
3140
|
const isContainer = this.containerElements.includes(elementTag);
|
|
3141
3141
|
const parentElType = containerElement.model.get("elType");
|
|
3142
|
-
let
|
|
3143
|
-
if (!
|
|
3144
|
-
|
|
3142
|
+
let targetContainer = parentElType === "e-tabs" ? containerElement.children?.[1].children?.[childIndex] || containerElement.children?.[1] : containerElement;
|
|
3143
|
+
if (!targetContainer) {
|
|
3144
|
+
targetContainer = containerElement;
|
|
3145
3145
|
}
|
|
3146
3146
|
const newElement = isContainer ? this.api.createElement({
|
|
3147
|
-
|
|
3147
|
+
container: targetContainer,
|
|
3148
3148
|
model: {
|
|
3149
3149
|
elType: elementTag,
|
|
3150
3150
|
id: (0, import_editor_elements9.generateElementId)()
|
|
3151
3151
|
},
|
|
3152
3152
|
options: { useHistory: false }
|
|
3153
3153
|
}) : this.api.createElement({
|
|
3154
|
-
|
|
3154
|
+
container: targetContainer,
|
|
3155
3155
|
model: {
|
|
3156
3156
|
elType: "widget",
|
|
3157
3157
|
widgetType: elementTag,
|
|
@@ -3526,7 +3526,7 @@ var initBuildCompositionsTool = (reg) => {
|
|
|
3526
3526
|
if (errors.length) {
|
|
3527
3527
|
rootContainers.forEach((rootContainer) => {
|
|
3528
3528
|
(0, import_editor_elements10.deleteElement)({
|
|
3529
|
-
|
|
3529
|
+
container: rootContainer,
|
|
3530
3530
|
options: { useHistory: false }
|
|
3531
3531
|
});
|
|
3532
3532
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -3121,19 +3121,19 @@ var CompositionBuilder = class _CompositionBuilder {
|
|
|
3121
3121
|
const elementTag = node.tagName;
|
|
3122
3122
|
const isContainer = this.containerElements.includes(elementTag);
|
|
3123
3123
|
const parentElType = containerElement.model.get("elType");
|
|
3124
|
-
let
|
|
3125
|
-
if (!
|
|
3126
|
-
|
|
3124
|
+
let targetContainer = parentElType === "e-tabs" ? containerElement.children?.[1].children?.[childIndex] || containerElement.children?.[1] : containerElement;
|
|
3125
|
+
if (!targetContainer) {
|
|
3126
|
+
targetContainer = containerElement;
|
|
3127
3127
|
}
|
|
3128
3128
|
const newElement = isContainer ? this.api.createElement({
|
|
3129
|
-
|
|
3129
|
+
container: targetContainer,
|
|
3130
3130
|
model: {
|
|
3131
3131
|
elType: elementTag,
|
|
3132
3132
|
id: generateElementId()
|
|
3133
3133
|
},
|
|
3134
3134
|
options: { useHistory: false }
|
|
3135
3135
|
}) : this.api.createElement({
|
|
3136
|
-
|
|
3136
|
+
container: targetContainer,
|
|
3137
3137
|
model: {
|
|
3138
3138
|
elType: "widget",
|
|
3139
3139
|
widgetType: elementTag,
|
|
@@ -3508,7 +3508,7 @@ var initBuildCompositionsTool = (reg) => {
|
|
|
3508
3508
|
if (errors.length) {
|
|
3509
3509
|
rootContainers.forEach((rootContainer) => {
|
|
3510
3510
|
deleteElement({
|
|
3511
|
-
|
|
3511
|
+
container: rootContainer,
|
|
3512
3512
|
options: { useHistory: false }
|
|
3513
3513
|
});
|
|
3514
3514
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-canvas",
|
|
3
3
|
"description": "Elementor Editor Canvas",
|
|
4
|
-
"version": "4.0.0-
|
|
4
|
+
"version": "4.0.0-545",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -37,24 +37,24 @@
|
|
|
37
37
|
"react-dom": "^18.3.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@elementor/editor": "4.0.0-
|
|
41
|
-
"@elementor/editor-controls": "4.0.0-
|
|
42
|
-
"@elementor/editor-documents": "4.0.0-
|
|
43
|
-
"@elementor/editor-elements": "4.0.0-
|
|
44
|
-
"@elementor/editor-interactions": "4.0.0-
|
|
45
|
-
"@elementor/editor-mcp": "4.0.0-
|
|
46
|
-
"@elementor/editor-notifications": "4.0.0-
|
|
47
|
-
"@elementor/editor-props": "4.0.0-
|
|
48
|
-
"@elementor/editor-responsive": "4.0.0-
|
|
49
|
-
"@elementor/editor-styles": "4.0.0-
|
|
50
|
-
"@elementor/editor-styles-repository": "4.0.0-
|
|
51
|
-
"@elementor/editor-ui": "4.0.0-
|
|
52
|
-
"@elementor/editor-v1-adapters": "4.0.0-
|
|
53
|
-
"@elementor/schema": "4.0.0-
|
|
54
|
-
"@elementor/twing": "4.0.0-
|
|
40
|
+
"@elementor/editor": "4.0.0-545",
|
|
41
|
+
"@elementor/editor-controls": "4.0.0-545",
|
|
42
|
+
"@elementor/editor-documents": "4.0.0-545",
|
|
43
|
+
"@elementor/editor-elements": "4.0.0-545",
|
|
44
|
+
"@elementor/editor-interactions": "4.0.0-545",
|
|
45
|
+
"@elementor/editor-mcp": "4.0.0-545",
|
|
46
|
+
"@elementor/editor-notifications": "4.0.0-545",
|
|
47
|
+
"@elementor/editor-props": "4.0.0-545",
|
|
48
|
+
"@elementor/editor-responsive": "4.0.0-545",
|
|
49
|
+
"@elementor/editor-styles": "4.0.0-545",
|
|
50
|
+
"@elementor/editor-styles-repository": "4.0.0-545",
|
|
51
|
+
"@elementor/editor-ui": "4.0.0-545",
|
|
52
|
+
"@elementor/editor-v1-adapters": "4.0.0-545",
|
|
53
|
+
"@elementor/schema": "4.0.0-545",
|
|
54
|
+
"@elementor/twing": "4.0.0-545",
|
|
55
55
|
"@elementor/ui": "1.36.17",
|
|
56
|
-
"@elementor/utils": "4.0.0-
|
|
57
|
-
"@elementor/wp-media": "4.0.0-
|
|
56
|
+
"@elementor/utils": "4.0.0-545",
|
|
57
|
+
"@elementor/wp-media": "4.0.0-545",
|
|
58
58
|
"@floating-ui/react": "^0.27.5",
|
|
59
59
|
"@wordpress/i18n": "^5.13.0"
|
|
60
60
|
},
|
|
@@ -79,16 +79,16 @@ export class CompositionBuilder {
|
|
|
79
79
|
const elementTag = node.tagName;
|
|
80
80
|
const isContainer = this.containerElements.includes( elementTag );
|
|
81
81
|
const parentElType = containerElement.model.get( 'elType' );
|
|
82
|
-
let
|
|
82
|
+
let targetContainer =
|
|
83
83
|
parentElType === 'e-tabs'
|
|
84
|
-
? containerElement.children?.[ 1 ].children?.[ childIndex ]
|
|
85
|
-
: containerElement
|
|
86
|
-
if ( !
|
|
87
|
-
|
|
84
|
+
? containerElement.children?.[ 1 ].children?.[ childIndex ] || containerElement.children?.[ 1 ]
|
|
85
|
+
: containerElement;
|
|
86
|
+
if ( ! targetContainer ) {
|
|
87
|
+
targetContainer = containerElement;
|
|
88
88
|
}
|
|
89
89
|
const newElement = isContainer
|
|
90
90
|
? this.api.createElement( {
|
|
91
|
-
|
|
91
|
+
container: targetContainer,
|
|
92
92
|
model: {
|
|
93
93
|
elType: elementTag,
|
|
94
94
|
id: generateElementId(),
|
|
@@ -96,7 +96,7 @@ export class CompositionBuilder {
|
|
|
96
96
|
options: { useHistory: false },
|
|
97
97
|
} )
|
|
98
98
|
: this.api.createElement( {
|
|
99
|
-
|
|
99
|
+
container: targetContainer,
|
|
100
100
|
model: {
|
|
101
101
|
elType: 'widget',
|
|
102
102
|
widgetType: elementTag,
|
|
@@ -82,7 +82,7 @@ export const initBuildCompositionsTool = ( reg: MCPRegistryEntry ) => {
|
|
|
82
82
|
if ( errors.length ) {
|
|
83
83
|
rootContainers.forEach( ( rootContainer ) => {
|
|
84
84
|
deleteElement( {
|
|
85
|
-
|
|
85
|
+
container: rootContainer,
|
|
86
86
|
options: { useHistory: false },
|
|
87
87
|
} );
|
|
88
88
|
} );
|