@elementor/editor-app-bar 4.1.0 → 4.2.0-839
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 +264 -196
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +190 -122
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -11
- package/src/components/locations/send-feedback-popup-location.tsx +2 -2
- package/src/extensions/angie/hooks/use-action-props.ts +29 -0
- package/src/extensions/angie/index.ts +10 -0
- package/src/extensions/documents-save/hooks/use-document-view-as-markdown-props.ts +29 -0
- package/src/extensions/documents-save/index.ts +7 -0
- package/src/extensions/documents-settings/index.ts +1 -1
- package/src/extensions/index.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
documentOptionsMenu: () => documentOptionsMenu,
|
|
34
|
-
init: () =>
|
|
34
|
+
init: () => init19,
|
|
35
35
|
injectIntoPageIndication: () => injectIntoPageIndication,
|
|
36
36
|
injectIntoPrimaryAction: () => injectIntoPrimaryAction,
|
|
37
37
|
injectIntoResponsive: () => injectIntoResponsive,
|
|
@@ -480,7 +480,7 @@ function SendFeedbackPopupLocation() {
|
|
|
480
480
|
feedback_text: feedbackContent
|
|
481
481
|
});
|
|
482
482
|
};
|
|
483
|
-
const
|
|
483
|
+
const handleStartAnother = () => {
|
|
484
484
|
setFeedbackContent("");
|
|
485
485
|
setFeedbackResult(null);
|
|
486
486
|
};
|
|
@@ -535,7 +535,7 @@ function SendFeedbackPopupLocation() {
|
|
|
535
535
|
onChange: (event) => setFeedbackContent(event.target.value),
|
|
536
536
|
value: feedbackContent
|
|
537
537
|
}
|
|
538
|
-
), /* @__PURE__ */ React17.createElement(import_ui10.Stack, { direction: "row", justifyContent: "flex-end", alignItems: "center", gap: 2 }, feedbackResult && /* @__PURE__ */ React17.createElement(React17.Fragment, null, feedbackResult.success ? /* @__PURE__ */ React17.createElement(import_icons4.CheckIcon, { color: "success" }) : /* @__PURE__ */ React17.createElement(import_icons4.AlertCircleIcon, { color: "error" }), feedbackResult.message), feedbackResult?.success ? /* @__PURE__ */ React17.createElement(import_ui10.Button, { variant: "text", onClick: () =>
|
|
538
|
+
), /* @__PURE__ */ React17.createElement(import_ui10.Stack, { direction: "row", justifyContent: "flex-end", alignItems: "center", gap: 2 }, feedbackResult && /* @__PURE__ */ React17.createElement(React17.Fragment, null, feedbackResult.success ? /* @__PURE__ */ React17.createElement(import_icons4.CheckIcon, { color: "success" }) : /* @__PURE__ */ React17.createElement(import_icons4.AlertCircleIcon, { color: "error" }), feedbackResult.message), feedbackResult?.success ? /* @__PURE__ */ React17.createElement(import_ui10.Button, { variant: "text", onClick: () => handleStartAnother() }, (0, import_i18n4.__)("Submit Another Feedback", "elementor")) : /* @__PURE__ */ React17.createElement(
|
|
539
539
|
import_ui10.Button,
|
|
540
540
|
{
|
|
541
541
|
disabled: submitDisabled,
|
|
@@ -589,10 +589,47 @@ function AppBar() {
|
|
|
589
589
|
return /* @__PURE__ */ React20.createElement(import_ui11.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React20.createElement(import_ui11.AppBar, { position: "sticky" }, /* @__PURE__ */ React20.createElement(import_ui11.Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React20.createElement(import_ui11.Box, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React20.createElement(import_ui11.Grid, { container: true, flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React20.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React20.createElement(import_ui11.Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React20.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React20.createElement(import_ui11.Divider, { orientation: "vertical" }), /* @__PURE__ */ React20.createElement(PageIndicationLocation, null), /* @__PURE__ */ React20.createElement(import_ui11.Divider, { orientation: "vertical" }), /* @__PURE__ */ React20.createElement(ResponsiveLocation, null), /* @__PURE__ */ React20.createElement(import_ui11.Divider, { orientation: "vertical" }))), /* @__PURE__ */ React20.createElement(import_ui11.Grid, { container: true, justifyContent: "flex-end", flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React20.createElement(PrimaryActionLocation, null))))));
|
|
590
590
|
}
|
|
591
591
|
|
|
592
|
-
// src/extensions/
|
|
593
|
-
var
|
|
592
|
+
// src/extensions/angie/hooks/use-action-props.ts
|
|
593
|
+
var import_editor_mcp = require("@elementor/editor-mcp");
|
|
594
594
|
var import_icons5 = require("@elementor/icons");
|
|
595
595
|
var import_i18n5 = require("@wordpress/i18n");
|
|
596
|
+
var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
|
|
597
|
+
var CREATE_WIDGET_PROMPT = `Create a widget for me.
|
|
598
|
+
Goal: [What should this widget help me accomplish?]
|
|
599
|
+
Placement: [Where will I see it in the editor/UI?]
|
|
600
|
+
How it should work: `;
|
|
601
|
+
function useActionProps() {
|
|
602
|
+
return {
|
|
603
|
+
title: (0, import_i18n5.__)("Angie", "elementor"),
|
|
604
|
+
icon: import_icons5.AngieIcon,
|
|
605
|
+
onClick: () => {
|
|
606
|
+
window.dispatchEvent(
|
|
607
|
+
new CustomEvent(CREATE_WIDGET_EVENT, {
|
|
608
|
+
detail: {
|
|
609
|
+
prompt: CREATE_WIDGET_PROMPT,
|
|
610
|
+
entry_point: "top_bar"
|
|
611
|
+
}
|
|
612
|
+
})
|
|
613
|
+
);
|
|
614
|
+
},
|
|
615
|
+
selected: false,
|
|
616
|
+
visible: !(0, import_editor_mcp.isAngieAvailable)()
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// src/extensions/angie/index.ts
|
|
621
|
+
function init() {
|
|
622
|
+
toolsMenu.registerToggleAction({
|
|
623
|
+
id: "toggle-angie",
|
|
624
|
+
priority: 2,
|
|
625
|
+
useProps: useActionProps
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
// src/extensions/connect/hooks/use-connect-link-config.tsx
|
|
630
|
+
var import_react5 = require("react");
|
|
631
|
+
var import_icons6 = require("@elementor/icons");
|
|
632
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
596
633
|
var dispatchConnectClickEvent = (eventName) => {
|
|
597
634
|
try {
|
|
598
635
|
const extendedWindow = window;
|
|
@@ -645,21 +682,21 @@ function useConnectLinkConfig() {
|
|
|
645
682
|
[extendedWindow]
|
|
646
683
|
);
|
|
647
684
|
return isUserConnected ? {
|
|
648
|
-
title: (0,
|
|
685
|
+
title: (0, import_i18n6.__)("My Elementor", "elementor"),
|
|
649
686
|
href: extendedWindow?.elementor?.config.user.top_bar.my_elementor_url,
|
|
650
|
-
icon:
|
|
687
|
+
icon: import_icons6.UserIcon,
|
|
651
688
|
target: "_blank"
|
|
652
689
|
} : {
|
|
653
|
-
title: (0,
|
|
690
|
+
title: (0, import_i18n6.__)("Connect my account", "elementor"),
|
|
654
691
|
href: extendedWindow?.elementor?.config.user.top_bar.connect_url,
|
|
655
|
-
icon:
|
|
692
|
+
icon: import_icons6.UserIcon,
|
|
656
693
|
target,
|
|
657
694
|
onClick: handleConnectClick
|
|
658
695
|
};
|
|
659
696
|
}
|
|
660
697
|
|
|
661
698
|
// src/extensions/connect/index.ts
|
|
662
|
-
function
|
|
699
|
+
function init2() {
|
|
663
700
|
mainMenu.registerLink({
|
|
664
701
|
id: "app-bar-connect",
|
|
665
702
|
group: "exits",
|
|
@@ -671,13 +708,13 @@ function init() {
|
|
|
671
708
|
// src/extensions/documents-preview/hooks/use-action-props.ts
|
|
672
709
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
673
710
|
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
674
|
-
var
|
|
675
|
-
var
|
|
676
|
-
function
|
|
711
|
+
var import_icons7 = require("@elementor/icons");
|
|
712
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
713
|
+
function useActionProps2() {
|
|
677
714
|
const document2 = (0, import_editor_documents2.__useActiveDocument)();
|
|
678
715
|
return {
|
|
679
|
-
icon:
|
|
680
|
-
title: (0,
|
|
716
|
+
icon: import_icons7.EyeIcon,
|
|
717
|
+
title: (0, import_i18n7.__)("Preview Changes", "elementor"),
|
|
681
718
|
onClick: () => {
|
|
682
719
|
const extendedWindow = window;
|
|
683
720
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -700,11 +737,11 @@ function useActionProps() {
|
|
|
700
737
|
}
|
|
701
738
|
|
|
702
739
|
// src/extensions/documents-preview/index.ts
|
|
703
|
-
function
|
|
740
|
+
function init3() {
|
|
704
741
|
utilitiesMenu.registerAction({
|
|
705
742
|
id: "document-preview-button",
|
|
706
743
|
priority: 30,
|
|
707
|
-
useProps:
|
|
744
|
+
useProps: useActionProps2
|
|
708
745
|
});
|
|
709
746
|
}
|
|
710
747
|
|
|
@@ -712,9 +749,9 @@ function init2() {
|
|
|
712
749
|
var React22 = __toESM(require("react"));
|
|
713
750
|
var import_editor_documents3 = require("@elementor/editor-documents");
|
|
714
751
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
715
|
-
var
|
|
752
|
+
var import_icons8 = require("@elementor/icons");
|
|
716
753
|
var import_ui13 = require("@elementor/ui");
|
|
717
|
-
var
|
|
754
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
718
755
|
|
|
719
756
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
720
757
|
var React21 = __toESM(require("react"));
|
|
@@ -813,7 +850,7 @@ function PrimaryAction() {
|
|
|
813
850
|
), /* @__PURE__ */ React22.createElement(
|
|
814
851
|
import_ui13.Tooltip,
|
|
815
852
|
{
|
|
816
|
-
title: (0,
|
|
853
|
+
title: (0, import_i18n8.__)("Save Options", "elementor"),
|
|
817
854
|
PopperProps: {
|
|
818
855
|
sx: {
|
|
819
856
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -830,14 +867,14 @@ function PrimaryAction() {
|
|
|
830
867
|
...(0, import_ui13.bindTrigger)(popupState),
|
|
831
868
|
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
832
869
|
disabled: isSaveOptionsDisabled,
|
|
833
|
-
"aria-label": (0,
|
|
870
|
+
"aria-label": (0, import_i18n8.__)("Save Options", "elementor")
|
|
834
871
|
},
|
|
835
|
-
/* @__PURE__ */ React22.createElement(
|
|
872
|
+
/* @__PURE__ */ React22.createElement(import_icons8.ChevronDownIcon, null)
|
|
836
873
|
))
|
|
837
874
|
)), /* @__PURE__ */ React22.createElement(PrimaryActionMenu, { ...(0, import_ui13.bindMenu)(popupState), onClick: popupState.close }));
|
|
838
875
|
}
|
|
839
876
|
function getLabel(document2) {
|
|
840
|
-
return document2.userCan.publish ? (0,
|
|
877
|
+
return document2.userCan.publish ? (0, import_i18n8.__)("Publish", "elementor") : (0, import_i18n8.__)("Submit", "elementor");
|
|
841
878
|
}
|
|
842
879
|
function isPublishEnabled(document2) {
|
|
843
880
|
if (document2.type.value === "kit") {
|
|
@@ -849,15 +886,15 @@ function isPublishEnabled(document2) {
|
|
|
849
886
|
// src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
|
|
850
887
|
var import_editor_documents4 = require("@elementor/editor-documents");
|
|
851
888
|
var import_events2 = require("@elementor/events");
|
|
852
|
-
var
|
|
853
|
-
var
|
|
889
|
+
var import_icons9 = require("@elementor/icons");
|
|
890
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
854
891
|
function useDocumentCopyAndShareProps() {
|
|
855
892
|
const document2 = (0, import_editor_documents4.__useActiveDocument)();
|
|
856
893
|
const { copyAndShare } = (0, import_editor_documents4.__useActiveDocumentActions)();
|
|
857
894
|
const { dispatchEvent: dispatchEvent2, config } = (0, import_events2.useMixpanel)();
|
|
858
895
|
return {
|
|
859
|
-
icon:
|
|
860
|
-
title: (0,
|
|
896
|
+
icon: import_icons9.LinkIcon,
|
|
897
|
+
title: (0, import_i18n9.__)("Copy and Share", "elementor"),
|
|
861
898
|
onClick: () => {
|
|
862
899
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
863
900
|
if (eventName) {
|
|
@@ -883,15 +920,15 @@ function useDocumentCopyAndShareProps() {
|
|
|
883
920
|
// src/extensions/documents-save/hooks/use-document-save-draft-props.ts
|
|
884
921
|
var import_editor_documents5 = require("@elementor/editor-documents");
|
|
885
922
|
var import_events3 = require("@elementor/events");
|
|
886
|
-
var
|
|
887
|
-
var
|
|
923
|
+
var import_icons10 = require("@elementor/icons");
|
|
924
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
888
925
|
function useDocumentSaveDraftProps() {
|
|
889
926
|
const document2 = (0, import_editor_documents5.__useActiveDocument)();
|
|
890
927
|
const { saveDraft } = (0, import_editor_documents5.__useActiveDocumentActions)();
|
|
891
928
|
const { dispatchEvent: dispatchEvent2, config } = (0, import_events3.useMixpanel)();
|
|
892
929
|
return {
|
|
893
|
-
icon:
|
|
894
|
-
title: (0,
|
|
930
|
+
icon: import_icons10.FileReportIcon,
|
|
931
|
+
title: (0, import_i18n10.__)("Save Draft", "elementor"),
|
|
895
932
|
onClick: () => {
|
|
896
933
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
897
934
|
if (eventName) {
|
|
@@ -916,14 +953,14 @@ function useDocumentSaveDraftProps() {
|
|
|
916
953
|
// src/extensions/documents-save/hooks/use-document-save-template-props.ts
|
|
917
954
|
var import_editor_documents6 = require("@elementor/editor-documents");
|
|
918
955
|
var import_events4 = require("@elementor/events");
|
|
919
|
-
var
|
|
920
|
-
var
|
|
956
|
+
var import_icons11 = require("@elementor/icons");
|
|
957
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
921
958
|
function useDocumentSaveTemplateProps() {
|
|
922
959
|
const { saveTemplate } = (0, import_editor_documents6.__useActiveDocumentActions)();
|
|
923
960
|
const { dispatchEvent: dispatchEvent2, config } = (0, import_events4.useMixpanel)();
|
|
924
961
|
return {
|
|
925
|
-
icon:
|
|
926
|
-
title: (0,
|
|
962
|
+
icon: import_icons11.FolderIcon,
|
|
963
|
+
title: (0, import_i18n11.__)("Save as Template", "elementor"),
|
|
927
964
|
onClick: () => {
|
|
928
965
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
929
966
|
if (eventName) {
|
|
@@ -944,18 +981,43 @@ function useDocumentSaveTemplateProps() {
|
|
|
944
981
|
};
|
|
945
982
|
}
|
|
946
983
|
|
|
947
|
-
// src/extensions/documents-save/hooks/use-document-view-
|
|
984
|
+
// src/extensions/documents-save/hooks/use-document-view-as-markdown-props.ts
|
|
948
985
|
var import_editor_documents7 = require("@elementor/editor-documents");
|
|
949
986
|
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
987
|
+
var import_icons12 = require("@elementor/icons");
|
|
988
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
989
|
+
function useDocumentViewAsMarkdownProps() {
|
|
990
|
+
const document2 = (0, import_editor_documents7.__useActiveDocument)();
|
|
991
|
+
return {
|
|
992
|
+
icon: import_icons12.EyeIcon,
|
|
993
|
+
title: (0, import_i18n12.__)("View as Markdown", "elementor"),
|
|
994
|
+
onClick: async () => {
|
|
995
|
+
const baseUrl = document2?.links?.wpPreview || document2?.links?.permalink;
|
|
996
|
+
if (!baseUrl) {
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
999
|
+
if (document2?.isDirty) {
|
|
1000
|
+
await (0, import_editor_v1_adapters4.__privateRunCommand)("document/save/auto", { force: true });
|
|
1001
|
+
}
|
|
1002
|
+
const separator = baseUrl.includes("?") ? "&" : "?";
|
|
1003
|
+
const url = baseUrl + separator + "format=markdown";
|
|
1004
|
+
window.open(url, "_blank");
|
|
1005
|
+
}
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
1010
|
+
var import_editor_documents8 = require("@elementor/editor-documents");
|
|
1011
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
950
1012
|
var import_events5 = require("@elementor/events");
|
|
951
|
-
var
|
|
952
|
-
var
|
|
1013
|
+
var import_icons13 = require("@elementor/icons");
|
|
1014
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
953
1015
|
function useDocumentViewPageProps() {
|
|
954
|
-
const document2 = (0,
|
|
1016
|
+
const document2 = (0, import_editor_documents8.__useActiveDocument)();
|
|
955
1017
|
const { dispatchEvent: dispatchEvent2, config } = (0, import_events5.useMixpanel)();
|
|
956
1018
|
return {
|
|
957
|
-
icon:
|
|
958
|
-
title: (0,
|
|
1019
|
+
icon: import_icons13.EyeIcon,
|
|
1020
|
+
title: (0, import_i18n13.__)("View Page", "elementor"),
|
|
959
1021
|
onClick: () => {
|
|
960
1022
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
961
1023
|
if (eventName) {
|
|
@@ -972,7 +1034,7 @@ function useDocumentViewPageProps() {
|
|
|
972
1034
|
});
|
|
973
1035
|
}
|
|
974
1036
|
if (document2?.id) {
|
|
975
|
-
(0,
|
|
1037
|
+
(0, import_editor_v1_adapters5.__privateRunCommand)("editor/documents/view", {
|
|
976
1038
|
id: document2.id
|
|
977
1039
|
});
|
|
978
1040
|
}
|
|
@@ -981,7 +1043,7 @@ function useDocumentViewPageProps() {
|
|
|
981
1043
|
}
|
|
982
1044
|
|
|
983
1045
|
// src/extensions/documents-save/index.ts
|
|
984
|
-
function
|
|
1046
|
+
function init4() {
|
|
985
1047
|
injectIntoPrimaryAction({
|
|
986
1048
|
id: "document-primary-action",
|
|
987
1049
|
component: PrimaryAction
|
|
@@ -1008,25 +1070,30 @@ function init3() {
|
|
|
1008
1070
|
priority: 50,
|
|
1009
1071
|
useProps: useDocumentViewPageProps
|
|
1010
1072
|
});
|
|
1073
|
+
documentOptionsMenu.registerAction({
|
|
1074
|
+
id: "document-view-as-markdown",
|
|
1075
|
+
priority: 60,
|
|
1076
|
+
useProps: useDocumentViewAsMarkdownProps
|
|
1077
|
+
});
|
|
1011
1078
|
}
|
|
1012
1079
|
|
|
1013
1080
|
// src/extensions/documents-settings/hooks/use-action-props.ts
|
|
1014
|
-
var
|
|
1015
|
-
var
|
|
1016
|
-
var
|
|
1017
|
-
var
|
|
1018
|
-
function
|
|
1019
|
-
const activeDocument = (0,
|
|
1020
|
-
const hostDocument = (0,
|
|
1021
|
-
const { isActive, isBlocked } = (0,
|
|
1081
|
+
var import_editor_documents9 = require("@elementor/editor-documents");
|
|
1082
|
+
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
1083
|
+
var import_icons14 = require("@elementor/icons");
|
|
1084
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
1085
|
+
function useActionProps3() {
|
|
1086
|
+
const activeDocument = (0, import_editor_documents9.__useActiveDocument)();
|
|
1087
|
+
const hostDocument = (0, import_editor_documents9.__useHostDocument)();
|
|
1088
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters6.__privateUseRouteStatus)("panel/page-settings");
|
|
1022
1089
|
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
1023
1090
|
const ButtonTitle = document2 ? (
|
|
1024
1091
|
/* translators: %s: Post type label. */
|
|
1025
|
-
(0,
|
|
1026
|
-
) : (0,
|
|
1092
|
+
(0, import_i18n14.__)("%s Settings", "elementor").replace("%s", document2.type.label)
|
|
1093
|
+
) : (0, import_i18n14.__)("Document Settings", "elementor");
|
|
1027
1094
|
return {
|
|
1028
1095
|
title: ButtonTitle,
|
|
1029
|
-
icon:
|
|
1096
|
+
icon: import_icons14.FileSettingsIcon,
|
|
1030
1097
|
onClick: () => {
|
|
1031
1098
|
if (!document2) {
|
|
1032
1099
|
return;
|
|
@@ -1041,7 +1108,7 @@ function useActionProps2() {
|
|
|
1041
1108
|
element: config.elements.buttonIcon
|
|
1042
1109
|
});
|
|
1043
1110
|
}
|
|
1044
|
-
(0,
|
|
1111
|
+
(0, import_editor_v1_adapters6.__privateOpenRoute)("panel/page-settings/settings");
|
|
1045
1112
|
},
|
|
1046
1113
|
selected: isActive,
|
|
1047
1114
|
disabled: isBlocked || !document2
|
|
@@ -1049,23 +1116,23 @@ function useActionProps2() {
|
|
|
1049
1116
|
}
|
|
1050
1117
|
|
|
1051
1118
|
// src/extensions/documents-settings/index.ts
|
|
1052
|
-
function
|
|
1119
|
+
function init5() {
|
|
1053
1120
|
toolsMenu.registerToggleAction({
|
|
1054
1121
|
id: "document-settings-button",
|
|
1055
|
-
priority:
|
|
1056
|
-
useProps:
|
|
1122
|
+
priority: 3,
|
|
1123
|
+
useProps: useActionProps3
|
|
1057
1124
|
});
|
|
1058
1125
|
}
|
|
1059
1126
|
|
|
1060
1127
|
// src/extensions/elements/hooks/use-action-props.ts
|
|
1061
|
-
var
|
|
1062
|
-
var
|
|
1063
|
-
var
|
|
1064
|
-
function
|
|
1065
|
-
const { isActive, isBlocked } = (0,
|
|
1128
|
+
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
1129
|
+
var import_icons15 = require("@elementor/icons");
|
|
1130
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
1131
|
+
function useActionProps4() {
|
|
1132
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters7.__privateUseRouteStatus)("panel/elements");
|
|
1066
1133
|
return {
|
|
1067
|
-
title: (0,
|
|
1068
|
-
icon:
|
|
1134
|
+
title: (0, import_i18n15.__)("Add Element", "elementor"),
|
|
1135
|
+
icon: import_icons15.PlusIcon,
|
|
1069
1136
|
onClick: () => {
|
|
1070
1137
|
const extendedWindow = window;
|
|
1071
1138
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1077,7 +1144,7 @@ function useActionProps3() {
|
|
|
1077
1144
|
element: config.elements.buttonIcon
|
|
1078
1145
|
});
|
|
1079
1146
|
}
|
|
1080
|
-
(0,
|
|
1147
|
+
(0, import_editor_v1_adapters7.__privateOpenRoute)("panel/elements/categories");
|
|
1081
1148
|
},
|
|
1082
1149
|
selected: isActive,
|
|
1083
1150
|
disabled: isBlocked
|
|
@@ -1085,17 +1152,17 @@ function useActionProps3() {
|
|
|
1085
1152
|
}
|
|
1086
1153
|
|
|
1087
1154
|
// src/extensions/elements/sync/sync-panel-title.ts
|
|
1088
|
-
var
|
|
1089
|
-
var
|
|
1155
|
+
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
1156
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
1090
1157
|
function syncPanelTitle() {
|
|
1091
|
-
const panelTitle = (0,
|
|
1092
|
-
const tabTitle = (0,
|
|
1093
|
-
(0,
|
|
1158
|
+
const panelTitle = (0, import_i18n16.__)("Elements", "elementor");
|
|
1159
|
+
const tabTitle = (0, import_i18n16.__)("Widgets", "elementor");
|
|
1160
|
+
(0, import_editor_v1_adapters8.__privateListenTo)((0, import_editor_v1_adapters8.routeOpenEvent)("panel/elements"), () => {
|
|
1094
1161
|
setPanelTitle(panelTitle);
|
|
1095
1162
|
setTabTitle(tabTitle);
|
|
1096
1163
|
});
|
|
1097
|
-
(0,
|
|
1098
|
-
if ((0,
|
|
1164
|
+
(0, import_editor_v1_adapters8.__privateListenTo)((0, import_editor_v1_adapters8.v1ReadyEvent)(), () => {
|
|
1165
|
+
if ((0, import_editor_v1_adapters8.__privateIsRouteActive)("panel/elements")) {
|
|
1099
1166
|
setPanelTitle(panelTitle);
|
|
1100
1167
|
setTabTitle(tabTitle);
|
|
1101
1168
|
}
|
|
@@ -1112,21 +1179,21 @@ function setTabTitle(title) {
|
|
|
1112
1179
|
}
|
|
1113
1180
|
|
|
1114
1181
|
// src/extensions/elements/index.ts
|
|
1115
|
-
function
|
|
1182
|
+
function init6() {
|
|
1116
1183
|
syncPanelTitle();
|
|
1117
1184
|
toolsMenu.registerToggleAction({
|
|
1118
1185
|
id: "open-elements-panel",
|
|
1119
1186
|
priority: 1,
|
|
1120
|
-
useProps:
|
|
1187
|
+
useProps: useActionProps4
|
|
1121
1188
|
});
|
|
1122
1189
|
}
|
|
1123
1190
|
|
|
1124
1191
|
// src/extensions/feedback/index.ts
|
|
1125
|
-
var
|
|
1126
|
-
var
|
|
1127
|
-
var
|
|
1128
|
-
function
|
|
1129
|
-
const isActive = (0,
|
|
1192
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
1193
|
+
var import_icons16 = require("@elementor/icons");
|
|
1194
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
1195
|
+
function init7() {
|
|
1196
|
+
const isActive = (0, import_editor_v1_adapters9.isExperimentActive)(EXPERIMENT_NAME);
|
|
1130
1197
|
if (!isActive) {
|
|
1131
1198
|
return;
|
|
1132
1199
|
}
|
|
@@ -1136,8 +1203,8 @@ function init6() {
|
|
|
1136
1203
|
priority: 20,
|
|
1137
1204
|
useProps: () => {
|
|
1138
1205
|
return {
|
|
1139
|
-
icon:
|
|
1140
|
-
title: (0,
|
|
1206
|
+
icon: import_icons16.MessageLinesIcon,
|
|
1207
|
+
title: (0, import_i18n17.__)("Send Feedback", "elementor"),
|
|
1141
1208
|
onClick: () => {
|
|
1142
1209
|
dispatchEvent(new CustomEvent(FEEDBACK_TOGGLE_EVENT));
|
|
1143
1210
|
}
|
|
@@ -1147,13 +1214,13 @@ function init6() {
|
|
|
1147
1214
|
}
|
|
1148
1215
|
|
|
1149
1216
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
1150
|
-
var
|
|
1151
|
-
var
|
|
1152
|
-
var
|
|
1153
|
-
function
|
|
1217
|
+
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
1218
|
+
var import_icons17 = require("@elementor/icons");
|
|
1219
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
1220
|
+
function useActionProps5() {
|
|
1154
1221
|
return {
|
|
1155
|
-
title: (0,
|
|
1156
|
-
icon:
|
|
1222
|
+
title: (0, import_i18n18.__)("Finder", "elementor"),
|
|
1223
|
+
icon: import_icons17.SearchIcon,
|
|
1157
1224
|
onClick: () => {
|
|
1158
1225
|
const extendedWindow = window;
|
|
1159
1226
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1165,28 +1232,28 @@ function useActionProps4() {
|
|
|
1165
1232
|
element: config.elements.buttonIcon
|
|
1166
1233
|
});
|
|
1167
1234
|
}
|
|
1168
|
-
(0,
|
|
1235
|
+
(0, import_editor_v1_adapters10.__privateRunCommand)("finder/toggle");
|
|
1169
1236
|
}
|
|
1170
1237
|
};
|
|
1171
1238
|
}
|
|
1172
1239
|
|
|
1173
1240
|
// src/extensions/finder/index.ts
|
|
1174
|
-
function
|
|
1241
|
+
function init8() {
|
|
1175
1242
|
utilitiesMenu.registerAction({
|
|
1176
1243
|
id: "toggle-finder",
|
|
1177
1244
|
priority: 15,
|
|
1178
|
-
useProps:
|
|
1245
|
+
useProps: useActionProps5
|
|
1179
1246
|
});
|
|
1180
1247
|
}
|
|
1181
1248
|
|
|
1182
1249
|
// src/extensions/help/hooks/use-action-props.ts
|
|
1183
|
-
var
|
|
1184
|
-
var
|
|
1185
|
-
function
|
|
1250
|
+
var import_icons18 = require("@elementor/icons");
|
|
1251
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
1252
|
+
function useActionProps6() {
|
|
1186
1253
|
return {
|
|
1187
|
-
title: (0,
|
|
1254
|
+
title: (0, import_i18n19.__)("Help Center", "elementor"),
|
|
1188
1255
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
1189
|
-
icon:
|
|
1256
|
+
icon: import_icons18.HelpIcon,
|
|
1190
1257
|
target: "_blank",
|
|
1191
1258
|
onClick: () => {
|
|
1192
1259
|
const extendedWindow = window;
|
|
@@ -1204,24 +1271,24 @@ function useActionProps5() {
|
|
|
1204
1271
|
}
|
|
1205
1272
|
|
|
1206
1273
|
// src/extensions/help/index.ts
|
|
1207
|
-
function
|
|
1274
|
+
function init9() {
|
|
1208
1275
|
mainMenu.registerLink({
|
|
1209
1276
|
id: "open-help-center",
|
|
1210
1277
|
group: "help",
|
|
1211
1278
|
priority: 10,
|
|
1212
|
-
useProps:
|
|
1279
|
+
useProps: useActionProps6
|
|
1213
1280
|
});
|
|
1214
1281
|
}
|
|
1215
1282
|
|
|
1216
1283
|
// src/extensions/history/hooks/use-action-props.ts
|
|
1217
|
-
var
|
|
1218
|
-
var
|
|
1219
|
-
var
|
|
1220
|
-
function
|
|
1221
|
-
const { isActive, isBlocked } = (0,
|
|
1284
|
+
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
1285
|
+
var import_icons19 = require("@elementor/icons");
|
|
1286
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
1287
|
+
function useActionProps7() {
|
|
1288
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters11.__privateUseRouteStatus)("panel/history");
|
|
1222
1289
|
return {
|
|
1223
|
-
title: (0,
|
|
1224
|
-
icon:
|
|
1290
|
+
title: (0, import_i18n20.__)("History", "elementor"),
|
|
1291
|
+
icon: import_icons19.HistoryIcon,
|
|
1225
1292
|
onClick: () => {
|
|
1226
1293
|
const extendedWindow = window;
|
|
1227
1294
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1233,7 +1300,7 @@ function useActionProps6() {
|
|
|
1233
1300
|
element: config.elements.link
|
|
1234
1301
|
});
|
|
1235
1302
|
}
|
|
1236
|
-
(0,
|
|
1303
|
+
(0, import_editor_v1_adapters11.__privateOpenRoute)("panel/history/actions");
|
|
1237
1304
|
},
|
|
1238
1305
|
selected: isActive,
|
|
1239
1306
|
disabled: isBlocked
|
|
@@ -1241,22 +1308,22 @@ function useActionProps6() {
|
|
|
1241
1308
|
}
|
|
1242
1309
|
|
|
1243
1310
|
// src/extensions/history/index.ts
|
|
1244
|
-
function
|
|
1311
|
+
function init10() {
|
|
1245
1312
|
toolsMenu.registerToggleAction({
|
|
1246
1313
|
id: "open-history",
|
|
1247
1314
|
priority: 15,
|
|
1248
|
-
useProps:
|
|
1315
|
+
useProps: useActionProps7
|
|
1249
1316
|
});
|
|
1250
1317
|
}
|
|
1251
1318
|
|
|
1252
1319
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
1253
|
-
var
|
|
1254
|
-
var
|
|
1255
|
-
var
|
|
1256
|
-
function
|
|
1320
|
+
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
1321
|
+
var import_icons20 = require("@elementor/icons");
|
|
1322
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
1323
|
+
function useActionProps8() {
|
|
1257
1324
|
return {
|
|
1258
|
-
icon:
|
|
1259
|
-
title: (0,
|
|
1325
|
+
icon: import_icons20.KeyboardIcon,
|
|
1326
|
+
title: (0, import_i18n21.__)("Keyboard Shortcuts", "elementor"),
|
|
1260
1327
|
onClick: () => {
|
|
1261
1328
|
const extendedWindow = window;
|
|
1262
1329
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1268,27 +1335,27 @@ function useActionProps7() {
|
|
|
1268
1335
|
element: config.elements.link
|
|
1269
1336
|
});
|
|
1270
1337
|
}
|
|
1271
|
-
(0,
|
|
1338
|
+
(0, import_editor_v1_adapters12.__privateRunCommand)("shortcuts/open");
|
|
1272
1339
|
}
|
|
1273
1340
|
};
|
|
1274
1341
|
}
|
|
1275
1342
|
|
|
1276
1343
|
// src/extensions/keyboard-shortcuts/index.ts
|
|
1277
|
-
function
|
|
1344
|
+
function init11() {
|
|
1278
1345
|
mainMenu.registerAction({
|
|
1279
1346
|
id: "open-keyboard-shortcuts",
|
|
1280
1347
|
group: "default",
|
|
1281
1348
|
priority: 40,
|
|
1282
|
-
useProps:
|
|
1349
|
+
useProps: useActionProps8
|
|
1283
1350
|
});
|
|
1284
1351
|
}
|
|
1285
1352
|
|
|
1286
1353
|
// src/extensions/responsive/components/breakpoints-switcher.tsx
|
|
1287
1354
|
var React23 = __toESM(require("react"));
|
|
1288
1355
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
1289
|
-
var
|
|
1356
|
+
var import_icons21 = require("@elementor/icons");
|
|
1290
1357
|
var import_ui14 = require("@elementor/ui");
|
|
1291
|
-
var
|
|
1358
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
1292
1359
|
function BreakpointsSwitcher() {
|
|
1293
1360
|
const breakpoints = (0, import_editor_responsive.useBreakpoints)();
|
|
1294
1361
|
const activeBreakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
|
|
@@ -1317,7 +1384,7 @@ function BreakpointsSwitcher() {
|
|
|
1317
1384
|
indicatorColor: "secondary",
|
|
1318
1385
|
value: activeBreakpoint,
|
|
1319
1386
|
onChange,
|
|
1320
|
-
"aria-label": (0,
|
|
1387
|
+
"aria-label": (0, import_i18n22.__)("Switch Device", "elementor"),
|
|
1321
1388
|
sx: {
|
|
1322
1389
|
"& .MuiTabs-indicator": {
|
|
1323
1390
|
backgroundColor: "text.primary"
|
|
@@ -1357,24 +1424,24 @@ function Tooltip4(props) {
|
|
|
1357
1424
|
);
|
|
1358
1425
|
}
|
|
1359
1426
|
var iconsMap = {
|
|
1360
|
-
widescreen:
|
|
1361
|
-
desktop:
|
|
1362
|
-
laptop:
|
|
1363
|
-
tablet_extra:
|
|
1364
|
-
tablet:
|
|
1365
|
-
mobile_extra:
|
|
1366
|
-
mobile:
|
|
1427
|
+
widescreen: import_icons21.WidescreenIcon,
|
|
1428
|
+
desktop: import_icons21.DesktopIcon,
|
|
1429
|
+
laptop: import_icons21.LaptopIcon,
|
|
1430
|
+
tablet_extra: import_icons21.TabletLandscapeIcon,
|
|
1431
|
+
tablet: import_icons21.TabletPortraitIcon,
|
|
1432
|
+
mobile_extra: import_icons21.MobileLandscapeIcon,
|
|
1433
|
+
mobile: import_icons21.MobilePortraitIcon
|
|
1367
1434
|
};
|
|
1368
1435
|
var labelsMap = {
|
|
1369
1436
|
default: "%s",
|
|
1370
1437
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1371
|
-
"min-width": (0,
|
|
1438
|
+
"min-width": (0, import_i18n22.__)("%s (%dpx and up)", "elementor"),
|
|
1372
1439
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1373
|
-
"max-width": (0,
|
|
1440
|
+
"max-width": (0, import_i18n22.__)("%s (up to %dpx)", "elementor")
|
|
1374
1441
|
};
|
|
1375
1442
|
|
|
1376
1443
|
// src/extensions/responsive/index.ts
|
|
1377
|
-
function
|
|
1444
|
+
function init12() {
|
|
1378
1445
|
injectIntoResponsive({
|
|
1379
1446
|
id: "responsive-breakpoints-switcher",
|
|
1380
1447
|
component: BreakpointsSwitcher,
|
|
@@ -1393,11 +1460,11 @@ var React26 = __toESM(require("react"));
|
|
|
1393
1460
|
|
|
1394
1461
|
// src/extensions/site-settings/components/portal.tsx
|
|
1395
1462
|
var React24 = __toESM(require("react"));
|
|
1396
|
-
var
|
|
1463
|
+
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
1397
1464
|
var import_ui15 = require("@elementor/ui");
|
|
1398
1465
|
function Portal(props) {
|
|
1399
|
-
const containerRef = (0,
|
|
1400
|
-
[(0,
|
|
1466
|
+
const containerRef = (0, import_editor_v1_adapters13.__privateUseListenTo)(
|
|
1467
|
+
[(0, import_editor_v1_adapters13.routeOpenEvent)("panel/global"), (0, import_editor_v1_adapters13.routeCloseEvent)("panel/global")],
|
|
1401
1468
|
getContainerRef
|
|
1402
1469
|
);
|
|
1403
1470
|
if (!containerRef.current) {
|
|
@@ -1406,17 +1473,17 @@ function Portal(props) {
|
|
|
1406
1473
|
return /* @__PURE__ */ React24.createElement(import_ui15.Portal, { container: containerRef.current, ...props });
|
|
1407
1474
|
}
|
|
1408
1475
|
function getContainerRef() {
|
|
1409
|
-
return (0,
|
|
1476
|
+
return (0, import_editor_v1_adapters13.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
|
|
1410
1477
|
}
|
|
1411
1478
|
|
|
1412
1479
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
1413
1480
|
var React25 = __toESM(require("react"));
|
|
1414
|
-
var
|
|
1481
|
+
var import_editor_documents10 = require("@elementor/editor-documents");
|
|
1415
1482
|
var import_ui16 = require("@elementor/ui");
|
|
1416
|
-
var
|
|
1483
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
1417
1484
|
function PrimaryAction2() {
|
|
1418
|
-
const document2 = (0,
|
|
1419
|
-
const { save } = (0,
|
|
1485
|
+
const document2 = (0, import_editor_documents10.__useActiveDocument)();
|
|
1486
|
+
const { save } = (0, import_editor_documents10.__useActiveDocumentActions)();
|
|
1420
1487
|
return /* @__PURE__ */ React25.createElement(
|
|
1421
1488
|
import_ui16.Paper,
|
|
1422
1489
|
{
|
|
@@ -1436,7 +1503,7 @@ function PrimaryAction2() {
|
|
|
1436
1503
|
sx: { width: "100%" },
|
|
1437
1504
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
1438
1505
|
},
|
|
1439
|
-
document2?.isSaving ? /* @__PURE__ */ React25.createElement(import_ui16.CircularProgress, null) : (0,
|
|
1506
|
+
document2?.isSaving ? /* @__PURE__ */ React25.createElement(import_ui16.CircularProgress, null) : (0, import_i18n23.__)("Save Changes", "elementor")
|
|
1440
1507
|
)
|
|
1441
1508
|
);
|
|
1442
1509
|
}
|
|
@@ -1447,16 +1514,16 @@ function PortalledPrimaryAction() {
|
|
|
1447
1514
|
}
|
|
1448
1515
|
|
|
1449
1516
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
1450
|
-
var
|
|
1451
|
-
var
|
|
1452
|
-
var
|
|
1453
|
-
function
|
|
1454
|
-
const { isActive, isBlocked } = (0,
|
|
1517
|
+
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
1518
|
+
var import_icons22 = require("@elementor/icons");
|
|
1519
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
1520
|
+
function useActionProps9() {
|
|
1521
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters14.__privateUseRouteStatus)("panel/global", {
|
|
1455
1522
|
blockOnKitRoutes: false
|
|
1456
1523
|
});
|
|
1457
1524
|
return {
|
|
1458
|
-
title: (0,
|
|
1459
|
-
icon:
|
|
1525
|
+
title: (0, import_i18n24.__)("Site Settings", "elementor"),
|
|
1526
|
+
icon: import_icons22.SettingsIcon,
|
|
1460
1527
|
onClick: () => {
|
|
1461
1528
|
const extendedWindow = window;
|
|
1462
1529
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1469,9 +1536,9 @@ function useActionProps8() {
|
|
|
1469
1536
|
});
|
|
1470
1537
|
}
|
|
1471
1538
|
if (isActive) {
|
|
1472
|
-
(0,
|
|
1539
|
+
(0, import_editor_v1_adapters14.__privateRunCommand)("panel/global/close");
|
|
1473
1540
|
} else {
|
|
1474
|
-
(0,
|
|
1541
|
+
(0, import_editor_v1_adapters14.__privateRunCommand)("panel/global/open");
|
|
1475
1542
|
}
|
|
1476
1543
|
},
|
|
1477
1544
|
selected: isActive,
|
|
@@ -1480,7 +1547,7 @@ function useActionProps8() {
|
|
|
1480
1547
|
}
|
|
1481
1548
|
|
|
1482
1549
|
// src/extensions/site-settings/index.ts
|
|
1483
|
-
function
|
|
1550
|
+
function init13() {
|
|
1484
1551
|
(0, import_editor.injectIntoTop)({
|
|
1485
1552
|
id: "site-settings-primary-action-portal",
|
|
1486
1553
|
component: PortalledPrimaryAction
|
|
@@ -1489,19 +1556,19 @@ function init12() {
|
|
|
1489
1556
|
id: "toggle-site-settings",
|
|
1490
1557
|
group: "default",
|
|
1491
1558
|
priority: 1,
|
|
1492
|
-
useProps:
|
|
1559
|
+
useProps: useActionProps9
|
|
1493
1560
|
});
|
|
1494
1561
|
}
|
|
1495
1562
|
|
|
1496
1563
|
// src/extensions/structure/hooks/use-action-props.ts
|
|
1497
|
-
var
|
|
1498
|
-
var
|
|
1499
|
-
var
|
|
1500
|
-
function
|
|
1501
|
-
const { isActive, isBlocked } = (0,
|
|
1564
|
+
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
1565
|
+
var import_icons23 = require("@elementor/icons");
|
|
1566
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
1567
|
+
function useActionProps10() {
|
|
1568
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters15.__privateUseRouteStatus)("navigator");
|
|
1502
1569
|
return {
|
|
1503
|
-
title: (0,
|
|
1504
|
-
icon:
|
|
1570
|
+
title: (0, import_i18n25.__)("Structure", "elementor"),
|
|
1571
|
+
icon: import_icons23.StructureIcon,
|
|
1505
1572
|
onClick: () => {
|
|
1506
1573
|
const extendedWindow = window;
|
|
1507
1574
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1513,7 +1580,7 @@ function useActionProps9() {
|
|
|
1513
1580
|
element: config.elements.buttonIcon
|
|
1514
1581
|
});
|
|
1515
1582
|
}
|
|
1516
|
-
(0,
|
|
1583
|
+
(0, import_editor_v1_adapters15.__privateRunCommand)("navigator/toggle");
|
|
1517
1584
|
},
|
|
1518
1585
|
selected: isActive,
|
|
1519
1586
|
disabled: isBlocked
|
|
@@ -1521,22 +1588,22 @@ function useActionProps9() {
|
|
|
1521
1588
|
}
|
|
1522
1589
|
|
|
1523
1590
|
// src/extensions/structure/index.ts
|
|
1524
|
-
function
|
|
1591
|
+
function init14() {
|
|
1525
1592
|
utilitiesMenu.registerToggleAction({
|
|
1526
1593
|
id: "toggle-structure-view",
|
|
1527
1594
|
priority: 25,
|
|
1528
|
-
useProps:
|
|
1595
|
+
useProps: useActionProps10
|
|
1529
1596
|
});
|
|
1530
1597
|
}
|
|
1531
1598
|
|
|
1532
1599
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1533
|
-
var
|
|
1534
|
-
var
|
|
1535
|
-
var
|
|
1536
|
-
function
|
|
1600
|
+
var import_editor_v1_adapters16 = require("@elementor/editor-v1-adapters");
|
|
1601
|
+
var import_icons24 = require("@elementor/icons");
|
|
1602
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
1603
|
+
function useActionProps11() {
|
|
1537
1604
|
return {
|
|
1538
|
-
icon:
|
|
1539
|
-
title: (0,
|
|
1605
|
+
icon: import_icons24.ThemeBuilderIcon,
|
|
1606
|
+
title: (0, import_i18n26.__)("Theme Builder", "elementor"),
|
|
1540
1607
|
onClick: () => {
|
|
1541
1608
|
const extendedWindow = window;
|
|
1542
1609
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1548,30 +1615,30 @@ function useActionProps10() {
|
|
|
1548
1615
|
element: config.elements.link
|
|
1549
1616
|
});
|
|
1550
1617
|
}
|
|
1551
|
-
(0,
|
|
1618
|
+
(0, import_editor_v1_adapters16.__privateRunCommand)("app/open");
|
|
1552
1619
|
}
|
|
1553
1620
|
};
|
|
1554
1621
|
}
|
|
1555
1622
|
|
|
1556
1623
|
// src/extensions/theme-builder/index.ts
|
|
1557
|
-
function
|
|
1624
|
+
function init15() {
|
|
1558
1625
|
mainMenu.registerAction({
|
|
1559
1626
|
id: "open-theme-builder",
|
|
1560
1627
|
group: "default",
|
|
1561
1628
|
priority: 10,
|
|
1562
|
-
useProps:
|
|
1629
|
+
useProps: useActionProps11
|
|
1563
1630
|
});
|
|
1564
1631
|
}
|
|
1565
1632
|
|
|
1566
1633
|
// src/extensions/user-preferences/hooks/use-action-props.ts
|
|
1567
|
-
var
|
|
1568
|
-
var
|
|
1569
|
-
var
|
|
1570
|
-
function
|
|
1571
|
-
const { isActive, isBlocked } = (0,
|
|
1634
|
+
var import_editor_v1_adapters17 = require("@elementor/editor-v1-adapters");
|
|
1635
|
+
var import_icons25 = require("@elementor/icons");
|
|
1636
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
1637
|
+
function useActionProps12() {
|
|
1638
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters17.__privateUseRouteStatus)("panel/editor-preferences");
|
|
1572
1639
|
return {
|
|
1573
|
-
icon:
|
|
1574
|
-
title: (0,
|
|
1640
|
+
icon: import_icons25.ToggleRightIcon,
|
|
1641
|
+
title: (0, import_i18n27.__)("User Preferences", "elementor"),
|
|
1575
1642
|
onClick: () => {
|
|
1576
1643
|
const extendedWindow = window;
|
|
1577
1644
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1583,7 +1650,7 @@ function useActionProps11() {
|
|
|
1583
1650
|
element: config.elements.link
|
|
1584
1651
|
});
|
|
1585
1652
|
}
|
|
1586
|
-
(0,
|
|
1653
|
+
(0, import_editor_v1_adapters17.__privateOpenRoute)("panel/editor-preferences");
|
|
1587
1654
|
},
|
|
1588
1655
|
selected: isActive,
|
|
1589
1656
|
disabled: isBlocked
|
|
@@ -1591,30 +1658,30 @@ function useActionProps11() {
|
|
|
1591
1658
|
}
|
|
1592
1659
|
|
|
1593
1660
|
// src/extensions/user-preferences/index.ts
|
|
1594
|
-
function
|
|
1661
|
+
function init16() {
|
|
1595
1662
|
mainMenu.registerToggleAction({
|
|
1596
1663
|
id: "open-user-preferences",
|
|
1597
1664
|
group: "default",
|
|
1598
1665
|
priority: 30,
|
|
1599
|
-
useProps:
|
|
1666
|
+
useProps: useActionProps12
|
|
1600
1667
|
});
|
|
1601
1668
|
}
|
|
1602
1669
|
|
|
1603
1670
|
// src/extensions/wordpress/index.ts
|
|
1604
|
-
var
|
|
1605
|
-
var
|
|
1606
|
-
var
|
|
1607
|
-
function
|
|
1671
|
+
var import_editor_documents11 = require("@elementor/editor-documents");
|
|
1672
|
+
var import_icons26 = require("@elementor/icons");
|
|
1673
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
1674
|
+
function init17() {
|
|
1608
1675
|
mainMenu.registerLink({
|
|
1609
1676
|
id: "exit-to-wordpress",
|
|
1610
1677
|
group: "exits",
|
|
1611
1678
|
priority: 20,
|
|
1612
1679
|
useProps: () => {
|
|
1613
|
-
const document2 = (0,
|
|
1680
|
+
const document2 = (0, import_editor_documents11.__useActiveDocument)();
|
|
1614
1681
|
return {
|
|
1615
|
-
title: (0,
|
|
1682
|
+
title: (0, import_i18n28.__)("Exit to WordPress", "elementor"),
|
|
1616
1683
|
href: document2?.links?.platformEdit,
|
|
1617
|
-
icon:
|
|
1684
|
+
icon: import_icons26.WordpressIcon,
|
|
1618
1685
|
onClick: () => {
|
|
1619
1686
|
const extendedWindow = window;
|
|
1620
1687
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1636,37 +1703,38 @@ function init16() {
|
|
|
1636
1703
|
}
|
|
1637
1704
|
|
|
1638
1705
|
// src/extensions/index.ts
|
|
1639
|
-
function
|
|
1640
|
-
|
|
1706
|
+
function init18() {
|
|
1707
|
+
init();
|
|
1641
1708
|
init3();
|
|
1642
1709
|
init4();
|
|
1643
1710
|
init5();
|
|
1644
|
-
|
|
1711
|
+
init6();
|
|
1645
1712
|
init8();
|
|
1646
1713
|
init9();
|
|
1647
1714
|
init10();
|
|
1648
1715
|
init11();
|
|
1649
1716
|
init12();
|
|
1650
|
-
init6();
|
|
1651
1717
|
init13();
|
|
1718
|
+
init7();
|
|
1652
1719
|
init14();
|
|
1653
1720
|
init15();
|
|
1654
1721
|
init16();
|
|
1655
|
-
|
|
1722
|
+
init17();
|
|
1723
|
+
init2();
|
|
1656
1724
|
}
|
|
1657
1725
|
|
|
1658
1726
|
// src/sync/redirect-old-menus.ts
|
|
1659
|
-
var
|
|
1727
|
+
var import_editor_v1_adapters18 = require("@elementor/editor-v1-adapters");
|
|
1660
1728
|
function redirectOldMenus() {
|
|
1661
|
-
(0,
|
|
1662
|
-
(0,
|
|
1729
|
+
(0, import_editor_v1_adapters18.__privateListenTo)((0, import_editor_v1_adapters18.routeOpenEvent)("panel/menu"), () => {
|
|
1730
|
+
(0, import_editor_v1_adapters18.__privateOpenRoute)("panel/elements/categories");
|
|
1663
1731
|
});
|
|
1664
1732
|
}
|
|
1665
1733
|
|
|
1666
1734
|
// src/init.ts
|
|
1667
|
-
function
|
|
1735
|
+
function init19() {
|
|
1668
1736
|
redirectOldMenus();
|
|
1669
|
-
|
|
1737
|
+
init18();
|
|
1670
1738
|
(0, import_editor2.injectIntoTop)({
|
|
1671
1739
|
id: "app-bar",
|
|
1672
1740
|
component: AppBar
|