@elementor/editor-global-classes 4.1.0-823 → 4.1.0-824

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementor/editor-global-classes",
3
- "version": "4.1.0-823",
3
+ "version": "4.1.0-824",
4
4
  "private": false,
5
5
  "author": "Elementor Team",
6
6
  "homepage": "https://elementor.com/",
@@ -39,29 +39,29 @@
39
39
  "dev": "tsup --config=../../tsup.dev.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@elementor/editor": "4.1.0-823",
43
- "@elementor/editor-current-user": "4.1.0-823",
44
- "@elementor/editor-documents": "4.1.0-823",
45
- "@elementor/editor-editing-panel": "4.1.0-823",
46
- "@elementor/editor-mcp": "4.1.0-823",
47
- "@elementor/editor-panels": "4.1.0-823",
48
- "@elementor/editor-props": "4.1.0-823",
49
- "@elementor/editor-variables": "4.1.0-823",
50
- "@elementor/editor-styles": "4.1.0-823",
51
- "@elementor/editor-canvas": "4.1.0-823",
52
- "@elementor/editor-styles-repository": "4.1.0-823",
53
- "@elementor/editor-ui": "4.1.0-823",
54
- "@elementor/editor-v1-adapters": "4.1.0-823",
55
- "@elementor/http-client": "4.1.0-823",
42
+ "@elementor/editor": "4.1.0-824",
43
+ "@elementor/editor-current-user": "4.1.0-824",
44
+ "@elementor/editor-documents": "4.1.0-824",
45
+ "@elementor/editor-editing-panel": "4.1.0-824",
46
+ "@elementor/editor-mcp": "4.1.0-824",
47
+ "@elementor/editor-panels": "4.1.0-824",
48
+ "@elementor/editor-props": "4.1.0-824",
49
+ "@elementor/editor-variables": "4.1.0-824",
50
+ "@elementor/editor-styles": "4.1.0-824",
51
+ "@elementor/editor-canvas": "4.1.0-824",
52
+ "@elementor/editor-styles-repository": "4.1.0-824",
53
+ "@elementor/editor-ui": "4.1.0-824",
54
+ "@elementor/editor-v1-adapters": "4.1.0-824",
55
+ "@elementor/http-client": "4.1.0-824",
56
56
  "@elementor/icons": "^1.68.0",
57
- "@elementor/query": "4.1.0-823",
58
- "@elementor/schema": "4.1.0-823",
59
- "@elementor/store": "4.1.0-823",
57
+ "@elementor/query": "4.1.0-824",
58
+ "@elementor/schema": "4.1.0-824",
59
+ "@elementor/store": "4.1.0-824",
60
60
  "@elementor/ui": "1.37.5",
61
- "@elementor/utils": "4.1.0-823",
61
+ "@elementor/utils": "4.1.0-824",
62
62
  "@tanstack/react-virtual": "^3.13.24",
63
63
  "@wordpress/i18n": "^5.13.0",
64
- "@elementor/events": "4.1.0-823"
64
+ "@elementor/events": "4.1.0-824"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "react": "^18.3.1",
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useCallback, useEffect, useState } from 'react';
3
3
  import { useSuppressedMessage } from '@elementor/editor-current-user';
4
- import { getCurrentDocument, getV1DocumentsManager, setDocumentModifiedStatus } from '@elementor/editor-documents';
4
+ import { reloadCurrentDocument, setDocumentModifiedStatus } from '@elementor/editor-documents';
5
5
  import {
6
6
  __createPanel as createPanel,
7
7
  Panel,
@@ -11,7 +11,7 @@ import {
11
11
  PanelHeaderTitle,
12
12
  } from '@elementor/editor-panels';
13
13
  import { ConfirmationDialog, SaveChangesDialog, ThemeProvider, useDialog } from '@elementor/editor-ui';
14
- import { __privateRunCommand as runCommand, changeEditMode } from '@elementor/editor-v1-adapters';
14
+ import { changeEditMode } from '@elementor/editor-v1-adapters';
15
15
  import { XIcon } from '@elementor/icons';
16
16
  import { useMutation } from '@elementor/query';
17
17
  import { __dispatch as dispatch } from '@elementor/store';
@@ -56,19 +56,6 @@ type StopSyncConfirmationDialogProps = {
56
56
 
57
57
  const id = 'global-classes-manager';
58
58
 
59
- const reloadDocument = () => {
60
- const currentDocument = getCurrentDocument();
61
- const documentsManager = getV1DocumentsManager();
62
-
63
- documentsManager.invalidateCache();
64
-
65
- return runCommand( 'editor/documents/switch', {
66
- id: currentDocument?.id,
67
- shouldScroll: false,
68
- shouldNavigateToDefaultRoute: false,
69
- } );
70
- };
71
-
72
59
  // We need to disable the app-bar buttons, and the elements overlays when opening the classes manager panel.
73
60
  // The buttons and overlays are enabled only in edit mode, so we're creating a custom new edit mode that
74
61
  // will force them to be disabled. We can't use the `preview` edit mode in this case since it'll force
@@ -84,7 +71,7 @@ export const { panel, usePanelActions } = createPanel( {
84
71
  },
85
72
  onClose: async () => {
86
73
  changeEditMode( 'edit' );
87
- await reloadDocument();
74
+ await reloadCurrentDocument();
88
75
  unblockPanelInteractions();
89
76
  },
90
77
  isOpenPreviousElement: true,
@@ -1,4 +1,5 @@
1
1
  import { useEffect } from 'react';
2
+ import { GLOBAL_STYLES_IMPORTED_EVENT } from '@elementor/editor-canvas';
2
3
  import { __useDispatch as useDispatch } from '@elementor/store';
3
4
 
4
5
  import { apiClient } from '../api';
@@ -47,13 +48,10 @@ export function GlobalStylesImportListener() {
47
48
  .catch( () => {} );
48
49
  };
49
50
 
50
- window.addEventListener( 'elementor/global-styles/imported', handleGlobalStylesImported as EventListener );
51
+ window.addEventListener( GLOBAL_STYLES_IMPORTED_EVENT, handleGlobalStylesImported as EventListener );
51
52
 
52
53
  return () => {
53
- window.removeEventListener(
54
- 'elementor/global-styles/imported',
55
- handleGlobalStylesImported as EventListener
56
- );
54
+ window.removeEventListener( GLOBAL_STYLES_IMPORTED_EVENT, handleGlobalStylesImported as EventListener );
57
55
  };
58
56
  }, [ dispatch ] );
59
57