@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/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-505",
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-505",
44
- "@elementor/editor-canvas": "4.0.0-505",
45
- "@elementor/editor-controls": "4.0.0-505",
46
- "@elementor/editor-documents": "4.0.0-505",
47
- "@elementor/editor-editing-panel": "4.0.0-505",
48
- "@elementor/editor-elements": "4.0.0-505",
49
- "@elementor/editor-elements-panel": "4.0.0-505",
50
- "@elementor/editor-mcp": "4.0.0-505",
51
- "@elementor/editor-panels": "4.0.0-505",
52
- "@elementor/editor-props": "4.0.0-505",
53
- "@elementor/editor-styles-repository": "4.0.0-505",
54
- "@elementor/editor-ui": "4.0.0-505",
55
- "@elementor/editor-v1-adapters": "4.0.0-505",
56
- "@elementor/http-client": "4.0.0-505",
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-505",
59
- "@elementor/query": "4.0.0-505",
60
- "@elementor/schema": "4.0.0-505",
61
- "@elementor/store": "4.0.0-505",
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-505",
63
+ "@elementor/utils": "4.0.0-508",
64
64
  "@wordpress/i18n": "^5.13.0",
65
- "@elementor/editor-notifications": "4.0.0-505",
66
- "@elementor/editor-current-user": "4.0.0-505"
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",
@@ -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 { invalidateComponentCache } from '../utils/component-document-data';
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 ) => invalidateComponentCache( 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 invalidateComponentCache = ( id: number ) => {
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,