@elementor/editor-global-classes 4.1.0-823 → 4.1.0-825
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.mjs
CHANGED
|
@@ -620,7 +620,7 @@ var PrefetchCssClassUsage = () => {
|
|
|
620
620
|
import * as React19 from "react";
|
|
621
621
|
import { useCallback, useEffect as useEffect4, useState as useState7 } from "react";
|
|
622
622
|
import { useSuppressedMessage as useSuppressedMessage2 } from "@elementor/editor-current-user";
|
|
623
|
-
import {
|
|
623
|
+
import { reloadCurrentDocument, setDocumentModifiedStatus } from "@elementor/editor-documents";
|
|
624
624
|
import {
|
|
625
625
|
__createPanel as createPanel,
|
|
626
626
|
Panel,
|
|
@@ -630,7 +630,7 @@ import {
|
|
|
630
630
|
PanelHeaderTitle
|
|
631
631
|
} from "@elementor/editor-panels";
|
|
632
632
|
import { ConfirmationDialog as ConfirmationDialog2, SaveChangesDialog, ThemeProvider, useDialog } from "@elementor/editor-ui";
|
|
633
|
-
import {
|
|
633
|
+
import { changeEditMode } from "@elementor/editor-v1-adapters";
|
|
634
634
|
import { XIcon } from "@elementor/icons";
|
|
635
635
|
import { useMutation } from "@elementor/query";
|
|
636
636
|
import { __dispatch as dispatch4 } from "@elementor/store";
|
|
@@ -2275,16 +2275,6 @@ var StartSyncToV3Modal = ({
|
|
|
2275
2275
|
// src/components/class-manager/class-manager-panel.tsx
|
|
2276
2276
|
var STOP_SYNC_MESSAGE_KEY = "stop-sync-class";
|
|
2277
2277
|
var id = "global-classes-manager";
|
|
2278
|
-
var reloadDocument = () => {
|
|
2279
|
-
const currentDocument = getCurrentDocument();
|
|
2280
|
-
const documentsManager = getV1DocumentsManager();
|
|
2281
|
-
documentsManager.invalidateCache();
|
|
2282
|
-
return runCommand("editor/documents/switch", {
|
|
2283
|
-
id: currentDocument?.id,
|
|
2284
|
-
shouldScroll: false,
|
|
2285
|
-
shouldNavigateToDefaultRoute: false
|
|
2286
|
-
});
|
|
2287
|
-
};
|
|
2288
2278
|
var { panel, usePanelActions } = createPanel({
|
|
2289
2279
|
id,
|
|
2290
2280
|
component: ClassManagerPanel,
|
|
@@ -2295,7 +2285,7 @@ var { panel, usePanelActions } = createPanel({
|
|
|
2295
2285
|
},
|
|
2296
2286
|
onClose: async () => {
|
|
2297
2287
|
changeEditMode("edit");
|
|
2298
|
-
await
|
|
2288
|
+
await reloadCurrentDocument();
|
|
2299
2289
|
unblockPanelInteractions();
|
|
2300
2290
|
},
|
|
2301
2291
|
isOpenPreviousElement: true
|
|
@@ -2607,6 +2597,7 @@ function createClassName(prefix) {
|
|
|
2607
2597
|
|
|
2608
2598
|
// src/components/global-styles-import-listener.tsx
|
|
2609
2599
|
import { useEffect as useEffect5 } from "react";
|
|
2600
|
+
import { GLOBAL_STYLES_IMPORTED_EVENT } from "@elementor/editor-canvas";
|
|
2610
2601
|
import { __useDispatch as useDispatch2 } from "@elementor/store";
|
|
2611
2602
|
function GlobalStylesImportListener() {
|
|
2612
2603
|
const dispatch5 = useDispatch2();
|
|
@@ -2645,12 +2636,9 @@ function GlobalStylesImportListener() {
|
|
|
2645
2636
|
}).catch(() => {
|
|
2646
2637
|
});
|
|
2647
2638
|
};
|
|
2648
|
-
window.addEventListener(
|
|
2639
|
+
window.addEventListener(GLOBAL_STYLES_IMPORTED_EVENT, handleGlobalStylesImported);
|
|
2649
2640
|
return () => {
|
|
2650
|
-
window.removeEventListener(
|
|
2651
|
-
"elementor/global-styles/imported",
|
|
2652
|
-
handleGlobalStylesImported
|
|
2653
|
-
);
|
|
2641
|
+
window.removeEventListener(GLOBAL_STYLES_IMPORTED_EVENT, handleGlobalStylesImported);
|
|
2654
2642
|
};
|
|
2655
2643
|
}, [dispatch5]);
|
|
2656
2644
|
return null;
|