@elementor/editor-elements 3.33.0-274 → 3.33.0-276
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/sync/move-elements.ts +5 -8
- package/src/sync/update-element-interactions.ts +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-elements",
|
|
3
3
|
"description": "This package contains the elements model for the Elementor editor",
|
|
4
|
-
"version": "3.33.0-
|
|
4
|
+
"version": "3.33.0-276",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor-mcp": "3.33.0-
|
|
44
|
-
"@elementor/editor-props": "3.33.0-
|
|
45
|
-
"@elementor/editor-styles": "3.33.0-
|
|
46
|
-
"@elementor/editor-v1-adapters": "3.33.0-
|
|
47
|
-
"@elementor/schema": "3.33.0-
|
|
48
|
-
"@elementor/utils": "3.33.0-
|
|
43
|
+
"@elementor/editor-mcp": "3.33.0-276",
|
|
44
|
+
"@elementor/editor-props": "3.33.0-276",
|
|
45
|
+
"@elementor/editor-styles": "3.33.0-276",
|
|
46
|
+
"@elementor/editor-v1-adapters": "3.33.0-276",
|
|
47
|
+
"@elementor/schema": "3.33.0-276",
|
|
48
|
+
"@elementor/utils": "3.33.0-276",
|
|
49
49
|
"@wordpress/i18n": "^3.1.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
@@ -43,7 +43,8 @@ export const moveElements = ( {
|
|
|
43
43
|
{
|
|
44
44
|
do: ( { moves }: { moves: MoveElementParams[] } ): MovedElementsResult => {
|
|
45
45
|
const movedElements: MovedElement[] = [];
|
|
46
|
-
|
|
46
|
+
// Call onMoveElements before moving element to avoid conflicts between commands
|
|
47
|
+
onMoveElements?.();
|
|
47
48
|
moves.forEach( ( move ) => {
|
|
48
49
|
const { elementId } = move;
|
|
49
50
|
const sourceContainer = getContainer( elementId );
|
|
@@ -66,9 +67,6 @@ export const moveElements = ( {
|
|
|
66
67
|
options: { ...move.options, useHistory: false },
|
|
67
68
|
} );
|
|
68
69
|
|
|
69
|
-
// Call onMoveElements before moving element to avoid conflicts between commands
|
|
70
|
-
onMoveElements?.();
|
|
71
|
-
|
|
72
70
|
movedElements.push( {
|
|
73
71
|
elementId,
|
|
74
72
|
originalPosition,
|
|
@@ -80,11 +78,11 @@ export const moveElements = ( {
|
|
|
80
78
|
return { movedElements };
|
|
81
79
|
},
|
|
82
80
|
undo: ( _: { moves: MoveElementParams[] }, { movedElements }: MovedElementsResult ) => {
|
|
81
|
+
onRestoreElements?.();
|
|
82
|
+
|
|
83
83
|
[ ...movedElements ].reverse().forEach( ( { originalPosition } ) => {
|
|
84
84
|
const { elementId, originalContainerId, originalIndex } = originalPosition;
|
|
85
85
|
|
|
86
|
-
onRestoreElements?.();
|
|
87
|
-
|
|
88
86
|
moveElement( {
|
|
89
87
|
elementId,
|
|
90
88
|
targetContainerId: originalContainerId,
|
|
@@ -100,6 +98,7 @@ export const moveElements = ( {
|
|
|
100
98
|
{ movedElements }: MovedElementsResult
|
|
101
99
|
): MovedElementsResult => {
|
|
102
100
|
const newMovedElements: MovedElement[] = [];
|
|
101
|
+
onMoveElements?.();
|
|
103
102
|
|
|
104
103
|
movedElements.forEach( ( { move, originalPosition } ) => {
|
|
105
104
|
const element = moveElement( {
|
|
@@ -107,8 +106,6 @@ export const moveElements = ( {
|
|
|
107
106
|
options: { ...move.options, useHistory: false },
|
|
108
107
|
} );
|
|
109
108
|
|
|
110
|
-
onMoveElements?.();
|
|
111
|
-
|
|
112
109
|
newMovedElements.push( {
|
|
113
110
|
elementId: move.elementId,
|
|
114
111
|
originalPosition,
|
|
@@ -23,8 +23,8 @@ export const updateElementInteractions = ( {
|
|
|
23
23
|
setDocumentModifiedStatus( true );
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
export const playElementInteractions = ( elementId: string ) => {
|
|
27
|
-
window.top?.dispatchEvent( new CustomEvent( 'atomic/play_interactions', { detail: { elementId } } ) );
|
|
26
|
+
export const playElementInteractions = ( elementId: string, animationId: string ) => {
|
|
27
|
+
window.top?.dispatchEvent( new CustomEvent( 'atomic/play_interactions', { detail: { elementId, animationId } } ) );
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
function setDocumentModifiedStatus( status: boolean ) {
|