@elementor/editor-app-bar 3.33.0-186 → 3.33.0-187
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 +194 -226
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +172 -204
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/components/locations/main-menu-location.tsx +1 -2
- package/src/components/locations/utilities-menu-location.tsx +1 -3
- package/src/extensions/documents-preview/index.ts +1 -1
- package/src/extensions/documents-settings/hooks/use-action-props.ts +51 -0
- package/src/extensions/documents-settings/index.ts +10 -0
- package/src/extensions/finder/index.ts +1 -1
- package/src/extensions/help/hooks/use-action-props.ts +26 -0
- package/src/extensions/help/index.ts +6 -29
- package/src/extensions/history/index.ts +3 -3
- package/src/extensions/index.ts +2 -2
- package/src/extensions/keyboard-shortcuts/index.ts +1 -1
- package/src/extensions/site-settings/hooks/use-action-props.ts +2 -2
- package/src/extensions/site-settings/index.ts +4 -3
- package/src/extensions/structure/index.ts +3 -3
- package/src/extensions/theme-builder/index.ts +2 -0
- package/src/extensions/user-preferences/index.ts +2 -1
- package/src/extensions/documents-indicator/components/settings-button.tsx +0 -86
- package/src/extensions/documents-indicator/index.ts +0 -12
package/dist/index.js
CHANGED
|
@@ -235,7 +235,7 @@ var import_editor2 = require("@elementor/editor");
|
|
|
235
235
|
// src/components/app-bar.tsx
|
|
236
236
|
var React19 = __toESM(require("react"));
|
|
237
237
|
var import_editor_documents = require("@elementor/editor-documents");
|
|
238
|
-
var
|
|
238
|
+
var import_ui10 = require("@elementor/ui");
|
|
239
239
|
|
|
240
240
|
// src/components/locations/main-menu-location.tsx
|
|
241
241
|
var React10 = __toESM(require("react"));
|
|
@@ -351,7 +351,7 @@ function MainMenuLocation() {
|
|
|
351
351
|
}
|
|
352
352
|
toolbarLogoProps.onClick(e);
|
|
353
353
|
};
|
|
354
|
-
return /* @__PURE__ */ React10.createElement(import_ui6.Stack, { sx: { paddingInlineStart: 3 }, direction: "row", alignItems: "center" }, /* @__PURE__ */ React10.createElement(ToolbarLogo, { ...toolbarLogoProps, onClick: onToolbarClick, selected: popupState.isOpen }), /* @__PURE__ */ React10.createElement(PopoverMenu, { onClick: popupState.close, ...(0, import_ui6.bindMenu)(popupState), marginThreshold: 8 }, menuItems.default.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id })),
|
|
354
|
+
return /* @__PURE__ */ React10.createElement(import_ui6.Stack, { sx: { paddingInlineStart: 3 }, direction: "row", alignItems: "center" }, /* @__PURE__ */ React10.createElement(ToolbarLogo, { ...toolbarLogoProps, onClick: onToolbarClick, selected: popupState.isOpen }), /* @__PURE__ */ React10.createElement(PopoverMenu, { onClick: popupState.close, ...(0, import_ui6.bindMenu)(popupState), marginThreshold: 8 }, menuItems.default.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id })), /* @__PURE__ */ React10.createElement(import_ui6.Divider, null), menuItems.help.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id })), menuItems.exits.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id }))));
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
// src/components/locations/page-indication-location.tsx
|
|
@@ -435,7 +435,6 @@ function ToolsMenuLocation() {
|
|
|
435
435
|
// src/components/locations/utilities-menu-location.tsx
|
|
436
436
|
var React18 = __toESM(require("react"));
|
|
437
437
|
var import_react3 = require("react");
|
|
438
|
-
var import_ui10 = require("@elementor/ui");
|
|
439
438
|
var MAX_TOOLBAR_ACTIONS2 = 4;
|
|
440
439
|
var { useMenuItems: useMenuItems4 } = utilitiesMenu;
|
|
441
440
|
function UtilitiesMenuLocation() {
|
|
@@ -443,13 +442,13 @@ function UtilitiesMenuLocation() {
|
|
|
443
442
|
const shouldUsePopover = menuItems.default.length > MAX_TOOLBAR_ACTIONS2 + 1;
|
|
444
443
|
const toolbarMenuItems = shouldUsePopover ? menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS2) : menuItems.default;
|
|
445
444
|
const popoverMenuItems = shouldUsePopover ? menuItems.default.slice(MAX_TOOLBAR_ACTIONS2) : [];
|
|
446
|
-
return /* @__PURE__ */ React18.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }
|
|
445
|
+
return /* @__PURE__ */ React18.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React18.createElement(import_react3.Fragment, { key: id }, /* @__PURE__ */ React18.createElement(MenuItem2, null))), popoverMenuItems.length > 0 && /* @__PURE__ */ React18.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-utilities-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React18.createElement(MenuItem2, { key: id }))));
|
|
447
446
|
}
|
|
448
447
|
|
|
449
448
|
// src/components/app-bar.tsx
|
|
450
449
|
function AppBar() {
|
|
451
450
|
const document2 = (0, import_editor_documents.__useActiveDocument)();
|
|
452
|
-
return /* @__PURE__ */ React19.createElement(
|
|
451
|
+
return /* @__PURE__ */ React19.createElement(import_ui10.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React19.createElement(import_ui10.AppBar, { position: "sticky" }, /* @__PURE__ */ React19.createElement(import_ui10.Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React19.createElement(import_ui10.Box, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React19.createElement(import_ui10.Grid, { container: true, flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React19.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React19.createElement(import_ui10.Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React19.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React19.createElement(import_ui10.Divider, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(PageIndicationLocation, null), /* @__PURE__ */ React19.createElement(import_ui10.Divider, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(ResponsiveLocation, null), /* @__PURE__ */ React19.createElement(import_ui10.Divider, { orientation: "vertical" }))), /* @__PURE__ */ React19.createElement(import_ui10.Grid, { container: true, justifyContent: "flex-end", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React19.createElement(PrimaryActionLocation, null))))));
|
|
453
452
|
}
|
|
454
453
|
|
|
455
454
|
// src/extensions/connect/hooks/use-connect-link-config.tsx
|
|
@@ -531,96 +530,16 @@ function init() {
|
|
|
531
530
|
});
|
|
532
531
|
}
|
|
533
532
|
|
|
534
|
-
// src/extensions/documents-
|
|
535
|
-
var React20 = __toESM(require("react"));
|
|
533
|
+
// src/extensions/documents-preview/hooks/use-action-props.ts
|
|
536
534
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
537
535
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
538
536
|
var import_icons5 = require("@elementor/icons");
|
|
539
|
-
var import_ui12 = require("@elementor/ui");
|
|
540
537
|
var import_i18n5 = require("@wordpress/i18n");
|
|
541
|
-
function SettingsButton() {
|
|
542
|
-
const activeDocument = (0, import_editor_documents2.__useActiveDocument)();
|
|
543
|
-
const hostDocument = (0, import_editor_documents2.__useHostDocument)();
|
|
544
|
-
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
545
|
-
const { isActive, isBlocked } = (0, import_editor_v1_adapters.__privateUseRouteStatus)("panel/page-settings");
|
|
546
|
-
if (!document2) {
|
|
547
|
-
return null;
|
|
548
|
-
}
|
|
549
|
-
const title = (0, import_i18n5.__)("%s Settings", "elementor").replace("%s", document2.type.label);
|
|
550
|
-
return /* @__PURE__ */ React20.createElement(Tooltip3, { title }, /* @__PURE__ */ React20.createElement(import_ui12.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React20.createElement(
|
|
551
|
-
import_ui12.ToggleButton,
|
|
552
|
-
{
|
|
553
|
-
value: "document-settings",
|
|
554
|
-
selected: isActive,
|
|
555
|
-
disabled: isBlocked,
|
|
556
|
-
onChange: () => {
|
|
557
|
-
const extendedWindow = window;
|
|
558
|
-
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
559
|
-
if (config) {
|
|
560
|
-
extendedWindow.elementorCommon.eventsManager.dispatchEvent(
|
|
561
|
-
config.names.topBar.documentSettings,
|
|
562
|
-
{
|
|
563
|
-
location: config.locations.topBar,
|
|
564
|
-
secondaryLocation: config.secondaryLocations["document-settings"],
|
|
565
|
-
trigger: config.triggers.click,
|
|
566
|
-
element: config.elements.buttonIcon
|
|
567
|
-
}
|
|
568
|
-
);
|
|
569
|
-
}
|
|
570
|
-
(0, import_editor_v1_adapters.__privateOpenRoute)("panel/page-settings/settings");
|
|
571
|
-
},
|
|
572
|
-
"aria-label": title,
|
|
573
|
-
size: "small",
|
|
574
|
-
sx: {
|
|
575
|
-
border: 0,
|
|
576
|
-
// Temp fix until the style of the ToggleButton component will be decided.
|
|
577
|
-
"&.Mui-disabled": {
|
|
578
|
-
border: 0
|
|
579
|
-
// Temp fix until the style of the ToggleButton component will be decided.
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
},
|
|
583
|
-
/* @__PURE__ */ React20.createElement(import_icons5.SettingsIcon, { fontSize: "small" })
|
|
584
|
-
)));
|
|
585
|
-
}
|
|
586
|
-
function Tooltip3(props) {
|
|
587
|
-
return /* @__PURE__ */ React20.createElement(
|
|
588
|
-
import_ui12.Tooltip,
|
|
589
|
-
{
|
|
590
|
-
PopperProps: {
|
|
591
|
-
sx: {
|
|
592
|
-
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
593
|
-
mt: 1.7
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
},
|
|
597
|
-
...props
|
|
598
|
-
}
|
|
599
|
-
);
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
// src/extensions/documents-indicator/index.ts
|
|
603
|
-
function init2() {
|
|
604
|
-
injectIntoPageIndication({
|
|
605
|
-
id: "document-settings-button",
|
|
606
|
-
component: SettingsButton,
|
|
607
|
-
options: {
|
|
608
|
-
priority: 20
|
|
609
|
-
// After document indicator.
|
|
610
|
-
}
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
// src/extensions/documents-preview/hooks/use-action-props.ts
|
|
615
|
-
var import_editor_documents3 = require("@elementor/editor-documents");
|
|
616
|
-
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
617
|
-
var import_icons6 = require("@elementor/icons");
|
|
618
|
-
var import_i18n6 = require("@wordpress/i18n");
|
|
619
538
|
function useActionProps() {
|
|
620
|
-
const document2 = (0,
|
|
539
|
+
const document2 = (0, import_editor_documents2.__useActiveDocument)();
|
|
621
540
|
return {
|
|
622
|
-
icon:
|
|
623
|
-
title: (0,
|
|
541
|
+
icon: import_icons5.EyeIcon,
|
|
542
|
+
title: (0, import_i18n5.__)("Preview Changes", "elementor"),
|
|
624
543
|
onClick: () => {
|
|
625
544
|
const extendedWindow = window;
|
|
626
545
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -633,7 +552,7 @@ function useActionProps() {
|
|
|
633
552
|
});
|
|
634
553
|
}
|
|
635
554
|
if (document2) {
|
|
636
|
-
(0,
|
|
555
|
+
(0, import_editor_v1_adapters.__privateRunCommand)("editor/documents/preview", {
|
|
637
556
|
id: document2.id,
|
|
638
557
|
force: true
|
|
639
558
|
});
|
|
@@ -643,28 +562,27 @@ function useActionProps() {
|
|
|
643
562
|
}
|
|
644
563
|
|
|
645
564
|
// src/extensions/documents-preview/index.ts
|
|
646
|
-
function
|
|
565
|
+
function init2() {
|
|
647
566
|
utilitiesMenu.registerAction({
|
|
648
567
|
id: "document-preview-button",
|
|
649
568
|
priority: 30,
|
|
650
|
-
// After help.
|
|
651
569
|
useProps: useActionProps
|
|
652
570
|
});
|
|
653
571
|
}
|
|
654
572
|
|
|
655
573
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
656
|
-
var
|
|
657
|
-
var
|
|
658
|
-
var
|
|
659
|
-
var
|
|
660
|
-
var
|
|
661
|
-
var
|
|
574
|
+
var React21 = __toESM(require("react"));
|
|
575
|
+
var import_editor_documents3 = require("@elementor/editor-documents");
|
|
576
|
+
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
577
|
+
var import_icons6 = require("@elementor/icons");
|
|
578
|
+
var import_ui12 = require("@elementor/ui");
|
|
579
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
662
580
|
|
|
663
581
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
664
|
-
var
|
|
665
|
-
var
|
|
582
|
+
var React20 = __toESM(require("react"));
|
|
583
|
+
var import_ui11 = require("@elementor/ui");
|
|
666
584
|
var { useMenuItems: useMenuItems5 } = documentOptionsMenu;
|
|
667
|
-
var StyledPopoverMenu = (0,
|
|
585
|
+
var StyledPopoverMenu = (0, import_ui11.styled)(PopoverMenu)`
|
|
668
586
|
& > .MuiPopover-paper > .MuiList-root {
|
|
669
587
|
& > .MuiDivider-root {
|
|
670
588
|
display: none;
|
|
@@ -677,7 +595,7 @@ var StyledPopoverMenu = (0, import_ui13.styled)(PopoverMenu)`
|
|
|
677
595
|
`;
|
|
678
596
|
function PrimaryActionMenu(props) {
|
|
679
597
|
const { save: saveActions, default: defaultActions } = useMenuItems5();
|
|
680
|
-
return /* @__PURE__ */
|
|
598
|
+
return /* @__PURE__ */ React20.createElement(
|
|
681
599
|
StyledPopoverMenu,
|
|
682
600
|
{
|
|
683
601
|
...props,
|
|
@@ -695,24 +613,24 @@ function PrimaryActionMenu(props) {
|
|
|
695
613
|
}
|
|
696
614
|
},
|
|
697
615
|
saveActions.map(({ MenuItem: MenuItem2, id }, index) => [
|
|
698
|
-
index > 0 && /* @__PURE__ */
|
|
699
|
-
/* @__PURE__ */
|
|
616
|
+
index > 0 && /* @__PURE__ */ React20.createElement(import_ui11.Divider, { key: `${id}-divider` }),
|
|
617
|
+
/* @__PURE__ */ React20.createElement(MenuItem2, { key: id })
|
|
700
618
|
]),
|
|
701
|
-
saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */
|
|
619
|
+
saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */ React20.createElement(import_ui11.Divider, null),
|
|
702
620
|
defaultActions.map(({ MenuItem: MenuItem2, id }, index) => [
|
|
703
|
-
index > 0 && /* @__PURE__ */
|
|
704
|
-
/* @__PURE__ */
|
|
621
|
+
index > 0 && /* @__PURE__ */ React20.createElement(import_ui11.Divider, { key: `${id}-divider` }),
|
|
622
|
+
/* @__PURE__ */ React20.createElement(MenuItem2, { key: id })
|
|
705
623
|
])
|
|
706
624
|
);
|
|
707
625
|
}
|
|
708
626
|
|
|
709
627
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
710
628
|
function PrimaryAction() {
|
|
711
|
-
const document2 = (0,
|
|
712
|
-
const { save } = (0,
|
|
713
|
-
const editMode = (0,
|
|
629
|
+
const document2 = (0, import_editor_documents3.__useActiveDocument)();
|
|
630
|
+
const { save } = (0, import_editor_documents3.__useActiveDocumentActions)();
|
|
631
|
+
const editMode = (0, import_editor_v1_adapters2.useEditMode)();
|
|
714
632
|
const isEditMode = editMode === "edit";
|
|
715
|
-
const popupState = (0,
|
|
633
|
+
const popupState = (0, import_ui12.usePopupState)({
|
|
716
634
|
variant: "popover",
|
|
717
635
|
popupId: "document-save-options"
|
|
718
636
|
});
|
|
@@ -722,8 +640,8 @@ function PrimaryAction() {
|
|
|
722
640
|
const isPublishDisabled = !isEditMode || !isPublishEnabled(document2);
|
|
723
641
|
const isSaveOptionsDisabled = !isEditMode || document2.type.value === "kit";
|
|
724
642
|
const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
|
|
725
|
-
return /* @__PURE__ */
|
|
726
|
-
|
|
643
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(import_ui12.ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React21.createElement(
|
|
644
|
+
import_ui12.Button,
|
|
727
645
|
{
|
|
728
646
|
onClick: () => {
|
|
729
647
|
const extendedWindow = window;
|
|
@@ -753,11 +671,11 @@ function PrimaryAction() {
|
|
|
753
671
|
},
|
|
754
672
|
disabled: isPublishDisabled
|
|
755
673
|
},
|
|
756
|
-
shouldShowSpinner ? /* @__PURE__ */
|
|
757
|
-
), /* @__PURE__ */
|
|
758
|
-
|
|
674
|
+
shouldShowSpinner ? /* @__PURE__ */ React21.createElement(import_ui12.CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
|
|
675
|
+
), /* @__PURE__ */ React21.createElement(
|
|
676
|
+
import_ui12.Tooltip,
|
|
759
677
|
{
|
|
760
|
-
title: (0,
|
|
678
|
+
title: (0, import_i18n6.__)("Save Options", "elementor"),
|
|
761
679
|
PopperProps: {
|
|
762
680
|
sx: {
|
|
763
681
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -767,21 +685,21 @@ function PrimaryAction() {
|
|
|
767
685
|
}
|
|
768
686
|
}
|
|
769
687
|
},
|
|
770
|
-
/* @__PURE__ */
|
|
771
|
-
|
|
688
|
+
/* @__PURE__ */ React21.createElement(import_ui12.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React21.createElement(
|
|
689
|
+
import_ui12.Button,
|
|
772
690
|
{
|
|
773
691
|
size: "small",
|
|
774
|
-
...(0,
|
|
692
|
+
...(0, import_ui12.bindTrigger)(popupState),
|
|
775
693
|
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
776
694
|
disabled: isSaveOptionsDisabled,
|
|
777
|
-
"aria-label": (0,
|
|
695
|
+
"aria-label": (0, import_i18n6.__)("Save Options", "elementor")
|
|
778
696
|
},
|
|
779
|
-
/* @__PURE__ */
|
|
697
|
+
/* @__PURE__ */ React21.createElement(import_icons6.ChevronDownIcon, null)
|
|
780
698
|
))
|
|
781
|
-
)), /* @__PURE__ */
|
|
699
|
+
)), /* @__PURE__ */ React21.createElement(PrimaryActionMenu, { ...(0, import_ui12.bindMenu)(popupState), onClick: popupState.close }));
|
|
782
700
|
}
|
|
783
701
|
function getLabel(document2) {
|
|
784
|
-
return document2.userCan.publish ? (0,
|
|
702
|
+
return document2.userCan.publish ? (0, import_i18n6.__)("Publish", "elementor") : (0, import_i18n6.__)("Submit", "elementor");
|
|
785
703
|
}
|
|
786
704
|
function isPublishEnabled(document2) {
|
|
787
705
|
if (document2.type.value === "kit") {
|
|
@@ -791,15 +709,15 @@ function isPublishEnabled(document2) {
|
|
|
791
709
|
}
|
|
792
710
|
|
|
793
711
|
// src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
|
|
794
|
-
var
|
|
795
|
-
var
|
|
796
|
-
var
|
|
712
|
+
var import_editor_documents4 = require("@elementor/editor-documents");
|
|
713
|
+
var import_icons7 = require("@elementor/icons");
|
|
714
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
797
715
|
function useDocumentCopyAndShareProps() {
|
|
798
|
-
const document2 = (0,
|
|
799
|
-
const { copyAndShare } = (0,
|
|
716
|
+
const document2 = (0, import_editor_documents4.__useActiveDocument)();
|
|
717
|
+
const { copyAndShare } = (0, import_editor_documents4.__useActiveDocumentActions)();
|
|
800
718
|
return {
|
|
801
|
-
icon:
|
|
802
|
-
title: (0,
|
|
719
|
+
icon: import_icons7.LinkIcon,
|
|
720
|
+
title: (0, import_i18n7.__)("Copy and Share", "elementor"),
|
|
803
721
|
onClick: copyAndShare,
|
|
804
722
|
disabled: !document2 || document2.isSaving || document2.isSavingDraft || !("publish" === document2.status.value),
|
|
805
723
|
visible: document2?.permissions?.showCopyAndShare
|
|
@@ -807,51 +725,51 @@ function useDocumentCopyAndShareProps() {
|
|
|
807
725
|
}
|
|
808
726
|
|
|
809
727
|
// src/extensions/documents-save/hooks/use-document-save-draft-props.ts
|
|
810
|
-
var
|
|
811
|
-
var
|
|
812
|
-
var
|
|
728
|
+
var import_editor_documents5 = require("@elementor/editor-documents");
|
|
729
|
+
var import_icons8 = require("@elementor/icons");
|
|
730
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
813
731
|
function useDocumentSaveDraftProps() {
|
|
814
|
-
const document2 = (0,
|
|
815
|
-
const { saveDraft } = (0,
|
|
732
|
+
const document2 = (0, import_editor_documents5.__useActiveDocument)();
|
|
733
|
+
const { saveDraft } = (0, import_editor_documents5.__useActiveDocumentActions)();
|
|
816
734
|
return {
|
|
817
|
-
icon:
|
|
818
|
-
title: (0,
|
|
735
|
+
icon: import_icons8.FileReportIcon,
|
|
736
|
+
title: (0, import_i18n8.__)("Save Draft", "elementor"),
|
|
819
737
|
onClick: saveDraft,
|
|
820
738
|
disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
|
|
821
739
|
};
|
|
822
740
|
}
|
|
823
741
|
|
|
824
742
|
// src/extensions/documents-save/hooks/use-document-save-template-props.ts
|
|
825
|
-
var
|
|
826
|
-
var
|
|
827
|
-
var
|
|
743
|
+
var import_editor_documents6 = require("@elementor/editor-documents");
|
|
744
|
+
var import_icons9 = require("@elementor/icons");
|
|
745
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
828
746
|
function useDocumentSaveTemplateProps() {
|
|
829
|
-
const { saveTemplate } = (0,
|
|
747
|
+
const { saveTemplate } = (0, import_editor_documents6.__useActiveDocumentActions)();
|
|
830
748
|
return {
|
|
831
|
-
icon:
|
|
832
|
-
title: (0,
|
|
749
|
+
icon: import_icons9.FolderIcon,
|
|
750
|
+
title: (0, import_i18n9.__)("Save as Template", "elementor"),
|
|
833
751
|
onClick: saveTemplate
|
|
834
752
|
};
|
|
835
753
|
}
|
|
836
754
|
|
|
837
755
|
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
838
|
-
var
|
|
839
|
-
var
|
|
840
|
-
var
|
|
841
|
-
var
|
|
756
|
+
var import_editor_documents7 = require("@elementor/editor-documents");
|
|
757
|
+
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
758
|
+
var import_icons10 = require("@elementor/icons");
|
|
759
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
842
760
|
function useDocumentViewPageProps() {
|
|
843
|
-
const document2 = (0,
|
|
761
|
+
const document2 = (0, import_editor_documents7.__useActiveDocument)();
|
|
844
762
|
return {
|
|
845
|
-
icon:
|
|
846
|
-
title: (0,
|
|
847
|
-
onClick: () => document2?.id && (0,
|
|
763
|
+
icon: import_icons10.EyeIcon,
|
|
764
|
+
title: (0, import_i18n10.__)("View Page", "elementor"),
|
|
765
|
+
onClick: () => document2?.id && (0, import_editor_v1_adapters3.__privateRunCommand)("editor/documents/view", {
|
|
848
766
|
id: document2.id
|
|
849
767
|
})
|
|
850
768
|
};
|
|
851
769
|
}
|
|
852
770
|
|
|
853
771
|
// src/extensions/documents-save/index.ts
|
|
854
|
-
function
|
|
772
|
+
function init3() {
|
|
855
773
|
injectIntoPrimaryAction({
|
|
856
774
|
id: "document-primary-action",
|
|
857
775
|
component: PrimaryAction
|
|
@@ -880,11 +798,58 @@ function init4() {
|
|
|
880
798
|
});
|
|
881
799
|
}
|
|
882
800
|
|
|
801
|
+
// src/extensions/documents-settings/hooks/use-action-props.ts
|
|
802
|
+
var import_editor_documents8 = require("@elementor/editor-documents");
|
|
803
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
804
|
+
var import_icons11 = require("@elementor/icons");
|
|
805
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
806
|
+
function useActionProps2() {
|
|
807
|
+
const activeDocument = (0, import_editor_documents8.__useActiveDocument)();
|
|
808
|
+
const hostDocument = (0, import_editor_documents8.__useHostDocument)();
|
|
809
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters4.__privateUseRouteStatus)("panel/page-settings");
|
|
810
|
+
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
811
|
+
const ButtonTitle = document2 ? (
|
|
812
|
+
/* translators: %s: Post type label. */
|
|
813
|
+
(0, import_i18n11.__)("%s Settings", "elementor").replace("%s", document2.type.label)
|
|
814
|
+
) : (0, import_i18n11.__)("Document Settings", "elementor");
|
|
815
|
+
return {
|
|
816
|
+
title: ButtonTitle,
|
|
817
|
+
icon: import_icons11.FileSettingsIcon,
|
|
818
|
+
onClick: () => {
|
|
819
|
+
if (!document2) {
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
const extendedWindow = window;
|
|
823
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
824
|
+
if (config) {
|
|
825
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.documentSettings, {
|
|
826
|
+
location: config.locations.topBar,
|
|
827
|
+
secondaryLocation: config.secondaryLocations["document-settings"],
|
|
828
|
+
trigger: config.triggers.click,
|
|
829
|
+
element: config.elements.buttonIcon
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
(0, import_editor_v1_adapters4.__privateOpenRoute)("panel/page-settings/settings");
|
|
833
|
+
},
|
|
834
|
+
selected: isActive,
|
|
835
|
+
disabled: isBlocked || !document2
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
// src/extensions/documents-settings/index.ts
|
|
840
|
+
function init4() {
|
|
841
|
+
toolsMenu.registerToggleAction({
|
|
842
|
+
id: "document-settings-button",
|
|
843
|
+
priority: 2,
|
|
844
|
+
useProps: useActionProps2
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
|
|
883
848
|
// src/extensions/elements/hooks/use-action-props.ts
|
|
884
849
|
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
885
850
|
var import_icons12 = require("@elementor/icons");
|
|
886
851
|
var import_i18n12 = require("@wordpress/i18n");
|
|
887
|
-
function
|
|
852
|
+
function useActionProps3() {
|
|
888
853
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters5.__privateUseRouteStatus)("panel/elements");
|
|
889
854
|
return {
|
|
890
855
|
title: (0, import_i18n12.__)("Add Element", "elementor"),
|
|
@@ -940,7 +905,7 @@ function init5() {
|
|
|
940
905
|
toolsMenu.registerToggleAction({
|
|
941
906
|
id: "open-elements-panel",
|
|
942
907
|
priority: 1,
|
|
943
|
-
useProps:
|
|
908
|
+
useProps: useActionProps3
|
|
944
909
|
});
|
|
945
910
|
}
|
|
946
911
|
|
|
@@ -948,7 +913,7 @@ function init5() {
|
|
|
948
913
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
949
914
|
var import_icons13 = require("@elementor/icons");
|
|
950
915
|
var import_i18n14 = require("@wordpress/i18n");
|
|
951
|
-
function
|
|
916
|
+
function useActionProps4() {
|
|
952
917
|
return {
|
|
953
918
|
title: (0, import_i18n14.__)("Finder", "elementor"),
|
|
954
919
|
icon: import_icons13.SearchIcon,
|
|
@@ -973,40 +938,41 @@ function init6() {
|
|
|
973
938
|
utilitiesMenu.registerAction({
|
|
974
939
|
id: "toggle-finder",
|
|
975
940
|
priority: 15,
|
|
976
|
-
|
|
977
|
-
useProps: useActionProps3
|
|
941
|
+
useProps: useActionProps4
|
|
978
942
|
});
|
|
979
943
|
}
|
|
980
944
|
|
|
981
|
-
// src/extensions/help/
|
|
945
|
+
// src/extensions/help/hooks/use-action-props.ts
|
|
982
946
|
var import_icons14 = require("@elementor/icons");
|
|
983
947
|
var import_i18n15 = require("@wordpress/i18n");
|
|
948
|
+
function useActionProps5() {
|
|
949
|
+
return {
|
|
950
|
+
title: (0, import_i18n15.__)("Help Center", "elementor"),
|
|
951
|
+
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
952
|
+
icon: import_icons14.HelpIcon,
|
|
953
|
+
target: "_blank",
|
|
954
|
+
onClick: () => {
|
|
955
|
+
const extendedWindow = window;
|
|
956
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
957
|
+
if (config) {
|
|
958
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.help, {
|
|
959
|
+
location: config.locations.topBar,
|
|
960
|
+
secondaryLocation: config.secondaryLocations.help,
|
|
961
|
+
trigger: config.triggers.click,
|
|
962
|
+
element: config.elements.buttonIcon
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
// src/extensions/help/index.ts
|
|
984
970
|
function init7() {
|
|
985
|
-
|
|
971
|
+
mainMenu.registerLink({
|
|
986
972
|
id: "open-help-center",
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
useProps:
|
|
990
|
-
return {
|
|
991
|
-
title: (0, import_i18n15.__)("Help", "elementor"),
|
|
992
|
-
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
993
|
-
icon: import_icons14.HelpIcon,
|
|
994
|
-
target: "_blank",
|
|
995
|
-
showExternalLinkIcon: true,
|
|
996
|
-
onClick: () => {
|
|
997
|
-
const extendedWindow = window;
|
|
998
|
-
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
999
|
-
if (config) {
|
|
1000
|
-
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.help, {
|
|
1001
|
-
location: config.locations.topBar,
|
|
1002
|
-
secondaryLocation: config.secondaryLocations.help,
|
|
1003
|
-
trigger: config.triggers.click,
|
|
1004
|
-
element: config.elements.buttonIcon
|
|
1005
|
-
});
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
};
|
|
1009
|
-
}
|
|
973
|
+
group: "help",
|
|
974
|
+
priority: 10,
|
|
975
|
+
useProps: useActionProps5
|
|
1010
976
|
});
|
|
1011
977
|
}
|
|
1012
978
|
|
|
@@ -1014,7 +980,7 @@ function init7() {
|
|
|
1014
980
|
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
1015
981
|
var import_icons15 = require("@elementor/icons");
|
|
1016
982
|
var import_i18n16 = require("@wordpress/i18n");
|
|
1017
|
-
function
|
|
983
|
+
function useActionProps6() {
|
|
1018
984
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters8.__privateUseRouteStatus)("panel/history");
|
|
1019
985
|
return {
|
|
1020
986
|
title: (0, import_i18n16.__)("History", "elementor"),
|
|
@@ -1039,10 +1005,10 @@ function useActionProps4() {
|
|
|
1039
1005
|
|
|
1040
1006
|
// src/extensions/history/index.ts
|
|
1041
1007
|
function init8() {
|
|
1042
|
-
|
|
1008
|
+
toolsMenu.registerToggleAction({
|
|
1043
1009
|
id: "open-history",
|
|
1044
|
-
priority:
|
|
1045
|
-
useProps:
|
|
1010
|
+
priority: 15,
|
|
1011
|
+
useProps: useActionProps6
|
|
1046
1012
|
});
|
|
1047
1013
|
}
|
|
1048
1014
|
|
|
@@ -1050,7 +1016,7 @@ function init8() {
|
|
|
1050
1016
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
1051
1017
|
var import_icons16 = require("@elementor/icons");
|
|
1052
1018
|
var import_i18n17 = require("@wordpress/i18n");
|
|
1053
|
-
function
|
|
1019
|
+
function useActionProps7() {
|
|
1054
1020
|
return {
|
|
1055
1021
|
icon: import_icons16.KeyboardIcon,
|
|
1056
1022
|
title: (0, import_i18n17.__)("Keyboard Shortcuts", "elementor"),
|
|
@@ -1076,16 +1042,15 @@ function init9() {
|
|
|
1076
1042
|
id: "open-keyboard-shortcuts",
|
|
1077
1043
|
group: "default",
|
|
1078
1044
|
priority: 40,
|
|
1079
|
-
|
|
1080
|
-
useProps: useActionProps5
|
|
1045
|
+
useProps: useActionProps7
|
|
1081
1046
|
});
|
|
1082
1047
|
}
|
|
1083
1048
|
|
|
1084
1049
|
// src/extensions/responsive/components/breakpoints-switcher.tsx
|
|
1085
|
-
var
|
|
1050
|
+
var React22 = __toESM(require("react"));
|
|
1086
1051
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
1087
1052
|
var import_icons17 = require("@elementor/icons");
|
|
1088
|
-
var
|
|
1053
|
+
var import_ui13 = require("@elementor/ui");
|
|
1089
1054
|
var import_i18n18 = require("@wordpress/i18n");
|
|
1090
1055
|
function BreakpointsSwitcher() {
|
|
1091
1056
|
const breakpoints = (0, import_editor_responsive.useBreakpoints)();
|
|
@@ -1108,8 +1073,8 @@ function BreakpointsSwitcher() {
|
|
|
1108
1073
|
}
|
|
1109
1074
|
activateBreakpoint(value);
|
|
1110
1075
|
};
|
|
1111
|
-
return /* @__PURE__ */
|
|
1112
|
-
|
|
1076
|
+
return /* @__PURE__ */ React22.createElement(
|
|
1077
|
+
import_ui13.Tabs,
|
|
1113
1078
|
{
|
|
1114
1079
|
textColor: "inherit",
|
|
1115
1080
|
indicatorColor: "secondary",
|
|
@@ -1125,13 +1090,13 @@ function BreakpointsSwitcher() {
|
|
|
1125
1090
|
breakpoints.map(({ id, label, type, width }) => {
|
|
1126
1091
|
const Icon = iconsMap[id];
|
|
1127
1092
|
const title = labelsMap[type || "default"].replace("%s", label).replace("%d", width?.toString() || "");
|
|
1128
|
-
return /* @__PURE__ */
|
|
1129
|
-
|
|
1093
|
+
return /* @__PURE__ */ React22.createElement(
|
|
1094
|
+
import_ui13.Tab,
|
|
1130
1095
|
{
|
|
1131
1096
|
value: id,
|
|
1132
1097
|
key: id,
|
|
1133
1098
|
"aria-label": title,
|
|
1134
|
-
icon: /* @__PURE__ */
|
|
1099
|
+
icon: /* @__PURE__ */ React22.createElement(Tooltip4, { title }, /* @__PURE__ */ React22.createElement(Icon, null)),
|
|
1135
1100
|
sx: { minWidth: "auto" },
|
|
1136
1101
|
"data-testid": `switch-device-to-${id}`
|
|
1137
1102
|
}
|
|
@@ -1139,9 +1104,9 @@ function BreakpointsSwitcher() {
|
|
|
1139
1104
|
})
|
|
1140
1105
|
);
|
|
1141
1106
|
}
|
|
1142
|
-
function
|
|
1143
|
-
return /* @__PURE__ */
|
|
1144
|
-
|
|
1107
|
+
function Tooltip4(props) {
|
|
1108
|
+
return /* @__PURE__ */ React22.createElement(
|
|
1109
|
+
import_ui13.Tooltip,
|
|
1145
1110
|
{
|
|
1146
1111
|
PopperProps: {
|
|
1147
1112
|
sx: {
|
|
@@ -1187,12 +1152,12 @@ function init10() {
|
|
|
1187
1152
|
var import_editor = require("@elementor/editor");
|
|
1188
1153
|
|
|
1189
1154
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
1190
|
-
var
|
|
1155
|
+
var React25 = __toESM(require("react"));
|
|
1191
1156
|
|
|
1192
1157
|
// src/extensions/site-settings/components/portal.tsx
|
|
1193
|
-
var
|
|
1158
|
+
var React23 = __toESM(require("react"));
|
|
1194
1159
|
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
1195
|
-
var
|
|
1160
|
+
var import_ui14 = require("@elementor/ui");
|
|
1196
1161
|
function Portal(props) {
|
|
1197
1162
|
const containerRef = (0, import_editor_v1_adapters10.__privateUseListenTo)(
|
|
1198
1163
|
[(0, import_editor_v1_adapters10.routeOpenEvent)("panel/global"), (0, import_editor_v1_adapters10.routeCloseEvent)("panel/global")],
|
|
@@ -1201,22 +1166,22 @@ function Portal(props) {
|
|
|
1201
1166
|
if (!containerRef.current) {
|
|
1202
1167
|
return null;
|
|
1203
1168
|
}
|
|
1204
|
-
return /* @__PURE__ */
|
|
1169
|
+
return /* @__PURE__ */ React23.createElement(import_ui14.Portal, { container: containerRef.current, ...props });
|
|
1205
1170
|
}
|
|
1206
1171
|
function getContainerRef() {
|
|
1207
1172
|
return (0, import_editor_v1_adapters10.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
|
|
1208
1173
|
}
|
|
1209
1174
|
|
|
1210
1175
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
1211
|
-
var
|
|
1176
|
+
var React24 = __toESM(require("react"));
|
|
1212
1177
|
var import_editor_documents9 = require("@elementor/editor-documents");
|
|
1213
|
-
var
|
|
1178
|
+
var import_ui15 = require("@elementor/ui");
|
|
1214
1179
|
var import_i18n19 = require("@wordpress/i18n");
|
|
1215
1180
|
function PrimaryAction2() {
|
|
1216
1181
|
const document2 = (0, import_editor_documents9.__useActiveDocument)();
|
|
1217
1182
|
const { save } = (0, import_editor_documents9.__useActiveDocumentActions)();
|
|
1218
|
-
return /* @__PURE__ */
|
|
1219
|
-
|
|
1183
|
+
return /* @__PURE__ */ React24.createElement(
|
|
1184
|
+
import_ui15.Paper,
|
|
1220
1185
|
{
|
|
1221
1186
|
sx: {
|
|
1222
1187
|
px: 5,
|
|
@@ -1225,8 +1190,8 @@ function PrimaryAction2() {
|
|
|
1225
1190
|
borderColor: "divider"
|
|
1226
1191
|
}
|
|
1227
1192
|
},
|
|
1228
|
-
/* @__PURE__ */
|
|
1229
|
-
|
|
1193
|
+
/* @__PURE__ */ React24.createElement(
|
|
1194
|
+
import_ui15.Button,
|
|
1230
1195
|
{
|
|
1231
1196
|
variant: "contained",
|
|
1232
1197
|
disabled: !document2 || !document2.isDirty,
|
|
@@ -1234,27 +1199,27 @@ function PrimaryAction2() {
|
|
|
1234
1199
|
sx: { width: "100%" },
|
|
1235
1200
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
1236
1201
|
},
|
|
1237
|
-
document2?.isSaving ? /* @__PURE__ */
|
|
1202
|
+
document2?.isSaving ? /* @__PURE__ */ React24.createElement(import_ui15.CircularProgress, null) : (0, import_i18n19.__)("Save Changes", "elementor")
|
|
1238
1203
|
)
|
|
1239
1204
|
);
|
|
1240
1205
|
}
|
|
1241
1206
|
|
|
1242
1207
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
1243
1208
|
function PortalledPrimaryAction() {
|
|
1244
|
-
return /* @__PURE__ */
|
|
1209
|
+
return /* @__PURE__ */ React25.createElement(Portal, null, /* @__PURE__ */ React25.createElement(PrimaryAction2, null));
|
|
1245
1210
|
}
|
|
1246
1211
|
|
|
1247
1212
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
1248
1213
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
1249
1214
|
var import_icons18 = require("@elementor/icons");
|
|
1250
1215
|
var import_i18n20 = require("@wordpress/i18n");
|
|
1251
|
-
function
|
|
1216
|
+
function useActionProps8() {
|
|
1252
1217
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters11.__privateUseRouteStatus)("panel/global", {
|
|
1253
1218
|
blockOnKitRoutes: false
|
|
1254
1219
|
});
|
|
1255
1220
|
return {
|
|
1256
1221
|
title: (0, import_i18n20.__)("Site Settings", "elementor"),
|
|
1257
|
-
icon: import_icons18.
|
|
1222
|
+
icon: import_icons18.SettingsIcon,
|
|
1258
1223
|
onClick: () => {
|
|
1259
1224
|
const extendedWindow = window;
|
|
1260
1225
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1283,10 +1248,11 @@ function init11() {
|
|
|
1283
1248
|
id: "site-settings-primary-action-portal",
|
|
1284
1249
|
component: PortalledPrimaryAction
|
|
1285
1250
|
});
|
|
1286
|
-
|
|
1251
|
+
mainMenu.registerToggleAction({
|
|
1287
1252
|
id: "toggle-site-settings",
|
|
1288
|
-
|
|
1289
|
-
|
|
1253
|
+
group: "default",
|
|
1254
|
+
priority: 1,
|
|
1255
|
+
useProps: useActionProps8
|
|
1290
1256
|
});
|
|
1291
1257
|
}
|
|
1292
1258
|
|
|
@@ -1294,7 +1260,7 @@ function init11() {
|
|
|
1294
1260
|
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
1295
1261
|
var import_icons19 = require("@elementor/icons");
|
|
1296
1262
|
var import_i18n21 = require("@wordpress/i18n");
|
|
1297
|
-
function
|
|
1263
|
+
function useActionProps9() {
|
|
1298
1264
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters12.__privateUseRouteStatus)("navigator");
|
|
1299
1265
|
return {
|
|
1300
1266
|
title: (0, import_i18n21.__)("Structure", "elementor"),
|
|
@@ -1319,10 +1285,10 @@ function useActionProps7() {
|
|
|
1319
1285
|
|
|
1320
1286
|
// src/extensions/structure/index.ts
|
|
1321
1287
|
function init12() {
|
|
1322
|
-
|
|
1288
|
+
utilitiesMenu.registerToggleAction({
|
|
1323
1289
|
id: "toggle-structure-view",
|
|
1324
|
-
priority:
|
|
1325
|
-
useProps:
|
|
1290
|
+
priority: 25,
|
|
1291
|
+
useProps: useActionProps9
|
|
1326
1292
|
});
|
|
1327
1293
|
}
|
|
1328
1294
|
|
|
@@ -1330,7 +1296,7 @@ function init12() {
|
|
|
1330
1296
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
1331
1297
|
var import_icons20 = require("@elementor/icons");
|
|
1332
1298
|
var import_i18n22 = require("@wordpress/i18n");
|
|
1333
|
-
function
|
|
1299
|
+
function useActionProps10() {
|
|
1334
1300
|
return {
|
|
1335
1301
|
icon: import_icons20.ThemeBuilderIcon,
|
|
1336
1302
|
title: (0, import_i18n22.__)("Theme Builder", "elementor"),
|
|
@@ -1354,7 +1320,9 @@ function useActionProps8() {
|
|
|
1354
1320
|
function init13() {
|
|
1355
1321
|
mainMenu.registerAction({
|
|
1356
1322
|
id: "open-theme-builder",
|
|
1357
|
-
|
|
1323
|
+
group: "default",
|
|
1324
|
+
priority: 10,
|
|
1325
|
+
useProps: useActionProps10
|
|
1358
1326
|
});
|
|
1359
1327
|
}
|
|
1360
1328
|
|
|
@@ -1362,7 +1330,7 @@ function init13() {
|
|
|
1362
1330
|
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
1363
1331
|
var import_icons21 = require("@elementor/icons");
|
|
1364
1332
|
var import_i18n23 = require("@wordpress/i18n");
|
|
1365
|
-
function
|
|
1333
|
+
function useActionProps11() {
|
|
1366
1334
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters14.__privateUseRouteStatus)("panel/editor-preferences");
|
|
1367
1335
|
return {
|
|
1368
1336
|
icon: import_icons21.ToggleRightIcon,
|
|
@@ -1389,9 +1357,9 @@ function useActionProps9() {
|
|
|
1389
1357
|
function init14() {
|
|
1390
1358
|
mainMenu.registerToggleAction({
|
|
1391
1359
|
id: "open-user-preferences",
|
|
1360
|
+
group: "default",
|
|
1392
1361
|
priority: 30,
|
|
1393
|
-
|
|
1394
|
-
useProps: useActionProps9
|
|
1362
|
+
useProps: useActionProps11
|
|
1395
1363
|
});
|
|
1396
1364
|
}
|
|
1397
1365
|
|