@elementor/editor-global-classes 4.1.0-696 → 4.1.0-698
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 +11 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/components/class-manager/class-item.tsx +1 -2
package/dist/index.js
CHANGED
|
@@ -602,7 +602,7 @@ var import_editor_current_user2 = require("@elementor/editor-current-user");
|
|
|
602
602
|
var import_editor_documents3 = require("@elementor/editor-documents");
|
|
603
603
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
604
604
|
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
605
|
-
var
|
|
605
|
+
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
606
606
|
var import_icons11 = require("@elementor/icons");
|
|
607
607
|
var import_query3 = require("@elementor/query");
|
|
608
608
|
var import_store20 = require("@elementor/store");
|
|
@@ -1252,7 +1252,6 @@ var React15 = __toESM(require("react"));
|
|
|
1252
1252
|
var import_react6 = require("react");
|
|
1253
1253
|
var import_editor_styles_repository2 = require("@elementor/editor-styles-repository");
|
|
1254
1254
|
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
1255
|
-
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
1256
1255
|
var import_icons9 = require("@elementor/icons");
|
|
1257
1256
|
var import_ui12 = require("@elementor/ui");
|
|
1258
1257
|
var import_i18n11 = require("@wordpress/i18n");
|
|
@@ -1708,7 +1707,7 @@ var ClassItem = ({
|
|
|
1708
1707
|
},
|
|
1709
1708
|
/* @__PURE__ */ React15.createElement(import_ui12.Typography, { variant: "caption", sx: { color: "text.primary" } }, (0, import_i18n11.__)("Rename", "elementor"))
|
|
1710
1709
|
),
|
|
1711
|
-
|
|
1710
|
+
onToggleSync && /* @__PURE__ */ React15.createElement(
|
|
1712
1711
|
import_editor_ui8.MenuListItem,
|
|
1713
1712
|
{
|
|
1714
1713
|
onClick: () => {
|
|
@@ -2099,7 +2098,7 @@ var reloadDocument = () => {
|
|
|
2099
2098
|
const currentDocument = (0, import_editor_documents3.getCurrentDocument)();
|
|
2100
2099
|
const documentsManager = (0, import_editor_documents3.getV1DocumentsManager)();
|
|
2101
2100
|
documentsManager.invalidateCache();
|
|
2102
|
-
return (0,
|
|
2101
|
+
return (0, import_editor_v1_adapters2.__privateRunCommand)("editor/documents/switch", {
|
|
2103
2102
|
id: currentDocument?.id,
|
|
2104
2103
|
shouldScroll: false,
|
|
2105
2104
|
shouldNavigateToDefaultRoute: false
|
|
@@ -2110,11 +2109,11 @@ var { panel, usePanelActions } = (0, import_editor_panels.__createPanel)({
|
|
|
2110
2109
|
component: ClassManagerPanel,
|
|
2111
2110
|
allowedEditModes: ["edit", id],
|
|
2112
2111
|
onOpen: () => {
|
|
2113
|
-
(0,
|
|
2112
|
+
(0, import_editor_v1_adapters2.changeEditMode)(id);
|
|
2114
2113
|
blockPanelInteractions();
|
|
2115
2114
|
},
|
|
2116
2115
|
onClose: async () => {
|
|
2117
|
-
(0,
|
|
2116
|
+
(0, import_editor_v1_adapters2.changeEditMode)("edit");
|
|
2118
2117
|
await reloadDocument();
|
|
2119
2118
|
unblockPanelInteractions();
|
|
2120
2119
|
},
|
|
@@ -2472,7 +2471,7 @@ function GlobalStylesImportListener() {
|
|
|
2472
2471
|
|
|
2473
2472
|
// src/components/open-panel-from-url.tsx
|
|
2474
2473
|
var import_react11 = require("react");
|
|
2475
|
-
var
|
|
2474
|
+
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
2476
2475
|
var ACTIVE_PANEL_PARAM = "active-panel";
|
|
2477
2476
|
var PANEL_ID = "global-classes-manager";
|
|
2478
2477
|
var DEFAULT_PANEL_ROUTE = "panel/elements";
|
|
@@ -2485,7 +2484,7 @@ function OpenPanelFromUrl() {
|
|
|
2485
2484
|
if (activePanel !== PANEL_ID) {
|
|
2486
2485
|
return;
|
|
2487
2486
|
}
|
|
2488
|
-
const cleanup = (0,
|
|
2487
|
+
const cleanup = (0, import_editor_v1_adapters3.__privateListenTo)((0, import_editor_v1_adapters3.routeOpenEvent)(DEFAULT_PANEL_ROUTE), () => {
|
|
2489
2488
|
if (hasOpened.current) {
|
|
2490
2489
|
return;
|
|
2491
2490
|
}
|
|
@@ -2970,12 +2969,12 @@ var initMcpIntegration = () => {
|
|
|
2970
2969
|
|
|
2971
2970
|
// src/sync-with-document.tsx
|
|
2972
2971
|
var import_react13 = require("react");
|
|
2973
|
-
var
|
|
2972
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
2974
2973
|
|
|
2975
2974
|
// src/sync-with-document-save.ts
|
|
2976
2975
|
var import_editor_current_user3 = require("@elementor/editor-current-user");
|
|
2977
2976
|
var import_editor_documents5 = require("@elementor/editor-documents");
|
|
2978
|
-
var
|
|
2977
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
2979
2978
|
var import_store26 = require("@elementor/store");
|
|
2980
2979
|
var pendingSave = null;
|
|
2981
2980
|
function syncWithDocumentSave(panelActions) {
|
|
@@ -3012,7 +3011,7 @@ function triggerSave(panelActions, context2 = "preview") {
|
|
|
3012
3011
|
return promise;
|
|
3013
3012
|
}
|
|
3014
3013
|
function bindSaveAction(panelActions) {
|
|
3015
|
-
(0,
|
|
3014
|
+
(0, import_editor_v1_adapters4.registerDataHook)("dependency", "document/save/save", (args) => {
|
|
3016
3015
|
triggerSave(panelActions, args.status === "publish" ? "frontend" : "preview");
|
|
3017
3016
|
return true;
|
|
3018
3017
|
});
|
|
@@ -3035,7 +3034,7 @@ function isDirty() {
|
|
|
3035
3034
|
function SyncWithDocumentSave() {
|
|
3036
3035
|
const panelActions = usePanelActions();
|
|
3037
3036
|
(0, import_react13.useEffect)(() => {
|
|
3038
|
-
(0,
|
|
3037
|
+
(0, import_editor_v1_adapters5.__privateListenTo)((0, import_editor_v1_adapters5.v1ReadyEvent)(), () => {
|
|
3039
3038
|
syncWithDocumentSave(panelActions);
|
|
3040
3039
|
});
|
|
3041
3040
|
}, []);
|