@elementor/editor-components 4.0.0-505 → 4.0.0-508
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 +104 -114
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -59
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -22
- package/src/store/store.ts +0 -7
- package/src/sync/publish-draft-components-in-page-before-save.ts +2 -2
- package/src/utils/component-document-data.ts +1 -6
- package/src/utils/switch-to-component.ts +1 -4
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-508",
|
|
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": "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-panels": "4.0.0-
|
|
52
|
-
"@elementor/editor-props": "4.0.0-
|
|
53
|
-
"@elementor/editor-styles-repository": "4.0.0-
|
|
54
|
-
"@elementor/editor-ui": "4.0.0-
|
|
55
|
-
"@elementor/editor-v1-adapters": "4.0.0-
|
|
56
|
-
"@elementor/http-client": "4.0.0-
|
|
43
|
+
"@elementor/editor": "4.0.0-508",
|
|
44
|
+
"@elementor/editor-canvas": "4.0.0-508",
|
|
45
|
+
"@elementor/editor-controls": "4.0.0-508",
|
|
46
|
+
"@elementor/editor-documents": "4.0.0-508",
|
|
47
|
+
"@elementor/editor-editing-panel": "4.0.0-508",
|
|
48
|
+
"@elementor/editor-elements": "4.0.0-508",
|
|
49
|
+
"@elementor/editor-elements-panel": "4.0.0-508",
|
|
50
|
+
"@elementor/editor-mcp": "4.0.0-508",
|
|
51
|
+
"@elementor/editor-panels": "4.0.0-508",
|
|
52
|
+
"@elementor/editor-props": "4.0.0-508",
|
|
53
|
+
"@elementor/editor-styles-repository": "4.0.0-508",
|
|
54
|
+
"@elementor/editor-ui": "4.0.0-508",
|
|
55
|
+
"@elementor/editor-v1-adapters": "4.0.0-508",
|
|
56
|
+
"@elementor/http-client": "4.0.0-508",
|
|
57
57
|
"@elementor/icons": "^1.63.0",
|
|
58
|
-
"@elementor/mixpanel": "4.0.0-
|
|
59
|
-
"@elementor/query": "4.0.0-
|
|
60
|
-
"@elementor/schema": "4.0.0-
|
|
61
|
-
"@elementor/store": "4.0.0-
|
|
58
|
+
"@elementor/mixpanel": "4.0.0-508",
|
|
59
|
+
"@elementor/query": "4.0.0-508",
|
|
60
|
+
"@elementor/schema": "4.0.0-508",
|
|
61
|
+
"@elementor/store": "4.0.0-508",
|
|
62
62
|
"@elementor/ui": "1.36.17",
|
|
63
|
-
"@elementor/utils": "4.0.0-
|
|
63
|
+
"@elementor/utils": "4.0.0-508",
|
|
64
64
|
"@wordpress/i18n": "^5.13.0",
|
|
65
|
-
"@elementor/editor-notifications": "4.0.0-
|
|
66
|
-
"@elementor/editor-current-user": "4.0.0-
|
|
65
|
+
"@elementor/editor-notifications": "4.0.0-508",
|
|
66
|
+
"@elementor/editor-current-user": "4.0.0-508"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"react": "^18.3.1",
|
package/src/store/store.ts
CHANGED
|
@@ -121,13 +121,6 @@ export const slice = createSlice( {
|
|
|
121
121
|
|
|
122
122
|
component.overridableProps = payload.overridableProps;
|
|
123
123
|
},
|
|
124
|
-
clearOverridableProps: ( state, { payload }: PayloadAction< { componentId: ComponentId } > ) => {
|
|
125
|
-
const component = state.data.find( ( comp ) => comp.id === payload.componentId );
|
|
126
|
-
|
|
127
|
-
if ( component ) {
|
|
128
|
-
component.overridableProps = undefined;
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
124
|
rename: ( state, { payload }: PayloadAction< { componentUid: string; name: string } > ) => {
|
|
132
125
|
const component = state.data.find( ( comp ) => comp.uid === payload.componentUid );
|
|
133
126
|
|
|
@@ -3,7 +3,7 @@ import { type V1ElementData } from '@elementor/editor-elements';
|
|
|
3
3
|
|
|
4
4
|
import { apiClient } from '../api';
|
|
5
5
|
import { type DocumentSaveStatus } from '../types';
|
|
6
|
-
import {
|
|
6
|
+
import { invalidateComponentDocumentData } from '../utils/component-document-data';
|
|
7
7
|
import { getComponentDocuments } from '../utils/get-component-documents';
|
|
8
8
|
|
|
9
9
|
type Options = {
|
|
@@ -26,5 +26,5 @@ export async function publishDraftComponentsInPageBeforeSave( { status, elements
|
|
|
26
26
|
|
|
27
27
|
await apiClient.updateStatuses( draftIds, 'publish' );
|
|
28
28
|
|
|
29
|
-
draftIds.forEach( ( id ) =>
|
|
29
|
+
draftIds.forEach( ( id ) => invalidateComponentDocumentData( id ) );
|
|
30
30
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { type Document, getV1DocumentsManager } from '@elementor/editor-documents';
|
|
2
|
-
import { __dispatch as dispatch } from '@elementor/store';
|
|
3
|
-
|
|
4
|
-
import { slice } from '../store/store';
|
|
5
2
|
|
|
6
3
|
type ComponentDocumentData = Document;
|
|
7
4
|
|
|
@@ -15,10 +12,8 @@ export const getComponentDocumentData = async ( id: number ) => {
|
|
|
15
12
|
}
|
|
16
13
|
};
|
|
17
14
|
|
|
18
|
-
export const
|
|
15
|
+
export const invalidateComponentDocumentData = ( id: number ) => {
|
|
19
16
|
const documentManager = getV1DocumentsManager();
|
|
20
17
|
|
|
21
18
|
documentManager.invalidateCache( id );
|
|
22
|
-
dispatch( slice.actions.removeStyles( { id } ) );
|
|
23
|
-
dispatch( slice.actions.clearOverridableProps( { componentId: id } ) );
|
|
24
19
|
};
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { getCurrentDocumentContainer, selectElement } from '@elementor/editor-elements';
|
|
2
2
|
import { __privateRunCommand as runCommand } from '@elementor/editor-v1-adapters';
|
|
3
3
|
|
|
4
|
-
import { invalidateComponentCache } from './component-document-data';
|
|
5
4
|
import { expandNavigator } from './expand-navigator';
|
|
6
5
|
|
|
7
6
|
export async function switchToComponent(
|
|
8
|
-
componentId: number,
|
|
7
|
+
componentId: number | string,
|
|
9
8
|
componentInstanceId?: string | null,
|
|
10
9
|
element?: HTMLElement | null
|
|
11
10
|
) {
|
|
12
11
|
const selector = getSelector( element, componentInstanceId );
|
|
13
12
|
|
|
14
|
-
invalidateComponentCache( componentId );
|
|
15
|
-
|
|
16
13
|
await runCommand( 'editor/documents/switch', {
|
|
17
14
|
id: componentId,
|
|
18
15
|
selector,
|