@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.mjs
CHANGED
|
@@ -448,7 +448,7 @@ function SendFeedbackPopupLocation() {
|
|
|
448
448
|
feedback_text: feedbackContent
|
|
449
449
|
});
|
|
450
450
|
};
|
|
451
|
-
const
|
|
451
|
+
const handleStartAnother = () => {
|
|
452
452
|
setFeedbackContent("");
|
|
453
453
|
setFeedbackResult(null);
|
|
454
454
|
};
|
|
@@ -503,7 +503,7 @@ function SendFeedbackPopupLocation() {
|
|
|
503
503
|
onChange: (event) => setFeedbackContent(event.target.value),
|
|
504
504
|
value: feedbackContent
|
|
505
505
|
}
|
|
506
|
-
), /* @__PURE__ */ React17.createElement(Stack3, { direction: "row", justifyContent: "flex-end", alignItems: "center", gap: 2 }, feedbackResult && /* @__PURE__ */ React17.createElement(React17.Fragment, null, feedbackResult.success ? /* @__PURE__ */ React17.createElement(CheckIcon, { color: "success" }) : /* @__PURE__ */ React17.createElement(AlertCircleIcon, { color: "error" }), feedbackResult.message), feedbackResult?.success ? /* @__PURE__ */ React17.createElement(Button, { variant: "text", onClick: () =>
|
|
506
|
+
), /* @__PURE__ */ React17.createElement(Stack3, { direction: "row", justifyContent: "flex-end", alignItems: "center", gap: 2 }, feedbackResult && /* @__PURE__ */ React17.createElement(React17.Fragment, null, feedbackResult.success ? /* @__PURE__ */ React17.createElement(CheckIcon, { color: "success" }) : /* @__PURE__ */ React17.createElement(AlertCircleIcon, { color: "error" }), feedbackResult.message), feedbackResult?.success ? /* @__PURE__ */ React17.createElement(Button, { variant: "text", onClick: () => handleStartAnother() }, __4("Submit Another Feedback", "elementor")) : /* @__PURE__ */ React17.createElement(
|
|
507
507
|
Button,
|
|
508
508
|
{
|
|
509
509
|
disabled: submitDisabled,
|
|
@@ -557,10 +557,47 @@ function AppBar() {
|
|
|
557
557
|
return /* @__PURE__ */ React20.createElement(ThemeProvider2, { colorScheme: "dark" }, /* @__PURE__ */ React20.createElement(BaseAppBar, { position: "sticky" }, /* @__PURE__ */ React20.createElement(Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React20.createElement(Box3, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React20.createElement(Grid, { container: true, flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React20.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React20.createElement(Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React20.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React20.createElement(Divider2, { orientation: "vertical" }), /* @__PURE__ */ React20.createElement(PageIndicationLocation, null), /* @__PURE__ */ React20.createElement(Divider2, { orientation: "vertical" }), /* @__PURE__ */ React20.createElement(ResponsiveLocation, null), /* @__PURE__ */ React20.createElement(Divider2, { orientation: "vertical" }))), /* @__PURE__ */ React20.createElement(Grid, { container: true, justifyContent: "flex-end", flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React20.createElement(PrimaryActionLocation, null))))));
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
+
// src/extensions/angie/hooks/use-action-props.ts
|
|
561
|
+
import { isAngieAvailable } from "@elementor/editor-mcp";
|
|
562
|
+
import { AngieIcon } from "@elementor/icons";
|
|
563
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
564
|
+
var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
|
|
565
|
+
var CREATE_WIDGET_PROMPT = `Create a widget for me.
|
|
566
|
+
Goal: [What should this widget help me accomplish?]
|
|
567
|
+
Placement: [Where will I see it in the editor/UI?]
|
|
568
|
+
How it should work: `;
|
|
569
|
+
function useActionProps() {
|
|
570
|
+
return {
|
|
571
|
+
title: __5("Angie", "elementor"),
|
|
572
|
+
icon: AngieIcon,
|
|
573
|
+
onClick: () => {
|
|
574
|
+
window.dispatchEvent(
|
|
575
|
+
new CustomEvent(CREATE_WIDGET_EVENT, {
|
|
576
|
+
detail: {
|
|
577
|
+
prompt: CREATE_WIDGET_PROMPT,
|
|
578
|
+
entry_point: "top_bar"
|
|
579
|
+
}
|
|
580
|
+
})
|
|
581
|
+
);
|
|
582
|
+
},
|
|
583
|
+
selected: false,
|
|
584
|
+
visible: !isAngieAvailable()
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
// src/extensions/angie/index.ts
|
|
589
|
+
function init() {
|
|
590
|
+
toolsMenu.registerToggleAction({
|
|
591
|
+
id: "toggle-angie",
|
|
592
|
+
priority: 2,
|
|
593
|
+
useProps: useActionProps
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
|
|
560
597
|
// src/extensions/connect/hooks/use-connect-link-config.tsx
|
|
561
598
|
import { useCallback } from "react";
|
|
562
599
|
import { UserIcon } from "@elementor/icons";
|
|
563
|
-
import { __ as
|
|
600
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
564
601
|
var dispatchConnectClickEvent = (eventName) => {
|
|
565
602
|
try {
|
|
566
603
|
const extendedWindow = window;
|
|
@@ -613,12 +650,12 @@ function useConnectLinkConfig() {
|
|
|
613
650
|
[extendedWindow]
|
|
614
651
|
);
|
|
615
652
|
return isUserConnected ? {
|
|
616
|
-
title:
|
|
653
|
+
title: __6("My Elementor", "elementor"),
|
|
617
654
|
href: extendedWindow?.elementor?.config.user.top_bar.my_elementor_url,
|
|
618
655
|
icon: UserIcon,
|
|
619
656
|
target: "_blank"
|
|
620
657
|
} : {
|
|
621
|
-
title:
|
|
658
|
+
title: __6("Connect my account", "elementor"),
|
|
622
659
|
href: extendedWindow?.elementor?.config.user.top_bar.connect_url,
|
|
623
660
|
icon: UserIcon,
|
|
624
661
|
target,
|
|
@@ -627,7 +664,7 @@ function useConnectLinkConfig() {
|
|
|
627
664
|
}
|
|
628
665
|
|
|
629
666
|
// src/extensions/connect/index.ts
|
|
630
|
-
function
|
|
667
|
+
function init2() {
|
|
631
668
|
mainMenu.registerLink({
|
|
632
669
|
id: "app-bar-connect",
|
|
633
670
|
group: "exits",
|
|
@@ -640,12 +677,12 @@ function init() {
|
|
|
640
677
|
import { __useActiveDocument as useActiveDocument2 } from "@elementor/editor-documents";
|
|
641
678
|
import { __privateRunCommand as runCommand } from "@elementor/editor-v1-adapters";
|
|
642
679
|
import { EyeIcon } from "@elementor/icons";
|
|
643
|
-
import { __ as
|
|
644
|
-
function
|
|
680
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
681
|
+
function useActionProps2() {
|
|
645
682
|
const document2 = useActiveDocument2();
|
|
646
683
|
return {
|
|
647
684
|
icon: EyeIcon,
|
|
648
|
-
title:
|
|
685
|
+
title: __7("Preview Changes", "elementor"),
|
|
649
686
|
onClick: () => {
|
|
650
687
|
const extendedWindow = window;
|
|
651
688
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -668,11 +705,11 @@ function useActionProps() {
|
|
|
668
705
|
}
|
|
669
706
|
|
|
670
707
|
// src/extensions/documents-preview/index.ts
|
|
671
|
-
function
|
|
708
|
+
function init3() {
|
|
672
709
|
utilitiesMenu.registerAction({
|
|
673
710
|
id: "document-preview-button",
|
|
674
711
|
priority: 30,
|
|
675
|
-
useProps:
|
|
712
|
+
useProps: useActionProps2
|
|
676
713
|
});
|
|
677
714
|
}
|
|
678
715
|
|
|
@@ -694,7 +731,7 @@ import {
|
|
|
694
731
|
Tooltip as Tooltip3,
|
|
695
732
|
usePopupState as usePopupState5
|
|
696
733
|
} from "@elementor/ui";
|
|
697
|
-
import { __ as
|
|
734
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
698
735
|
|
|
699
736
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
700
737
|
import * as React21 from "react";
|
|
@@ -793,7 +830,7 @@ function PrimaryAction() {
|
|
|
793
830
|
), /* @__PURE__ */ React22.createElement(
|
|
794
831
|
Tooltip3,
|
|
795
832
|
{
|
|
796
|
-
title:
|
|
833
|
+
title: __8("Save Options", "elementor"),
|
|
797
834
|
PopperProps: {
|
|
798
835
|
sx: {
|
|
799
836
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -810,14 +847,14 @@ function PrimaryAction() {
|
|
|
810
847
|
...bindTrigger4(popupState),
|
|
811
848
|
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
812
849
|
disabled: isSaveOptionsDisabled,
|
|
813
|
-
"aria-label":
|
|
850
|
+
"aria-label": __8("Save Options", "elementor")
|
|
814
851
|
},
|
|
815
852
|
/* @__PURE__ */ React22.createElement(ChevronDownIcon, null)
|
|
816
853
|
))
|
|
817
854
|
)), /* @__PURE__ */ React22.createElement(PrimaryActionMenu, { ...bindMenu4(popupState), onClick: popupState.close }));
|
|
818
855
|
}
|
|
819
856
|
function getLabel(document2) {
|
|
820
|
-
return document2.userCan.publish ?
|
|
857
|
+
return document2.userCan.publish ? __8("Publish", "elementor") : __8("Submit", "elementor");
|
|
821
858
|
}
|
|
822
859
|
function isPublishEnabled(document2) {
|
|
823
860
|
if (document2.type.value === "kit") {
|
|
@@ -833,14 +870,14 @@ import {
|
|
|
833
870
|
} from "@elementor/editor-documents";
|
|
834
871
|
import { useMixpanel as useMixpanel2 } from "@elementor/events";
|
|
835
872
|
import { LinkIcon } from "@elementor/icons";
|
|
836
|
-
import { __ as
|
|
873
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
837
874
|
function useDocumentCopyAndShareProps() {
|
|
838
875
|
const document2 = useActiveDocument4();
|
|
839
876
|
const { copyAndShare } = useActiveDocumentActions2();
|
|
840
877
|
const { dispatchEvent: dispatchEvent2, config } = useMixpanel2();
|
|
841
878
|
return {
|
|
842
879
|
icon: LinkIcon,
|
|
843
|
-
title:
|
|
880
|
+
title: __9("Copy and Share", "elementor"),
|
|
844
881
|
onClick: () => {
|
|
845
882
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
846
883
|
if (eventName) {
|
|
@@ -870,14 +907,14 @@ import {
|
|
|
870
907
|
} from "@elementor/editor-documents";
|
|
871
908
|
import { useMixpanel as useMixpanel3 } from "@elementor/events";
|
|
872
909
|
import { FileReportIcon } from "@elementor/icons";
|
|
873
|
-
import { __ as
|
|
910
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
874
911
|
function useDocumentSaveDraftProps() {
|
|
875
912
|
const document2 = useActiveDocument5();
|
|
876
913
|
const { saveDraft } = useActiveDocumentActions3();
|
|
877
914
|
const { dispatchEvent: dispatchEvent2, config } = useMixpanel3();
|
|
878
915
|
return {
|
|
879
916
|
icon: FileReportIcon,
|
|
880
|
-
title:
|
|
917
|
+
title: __10("Save Draft", "elementor"),
|
|
881
918
|
onClick: () => {
|
|
882
919
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
883
920
|
if (eventName) {
|
|
@@ -903,13 +940,13 @@ function useDocumentSaveDraftProps() {
|
|
|
903
940
|
import { __useActiveDocumentActions as useActiveDocumentActions4 } from "@elementor/editor-documents";
|
|
904
941
|
import { useMixpanel as useMixpanel4 } from "@elementor/events";
|
|
905
942
|
import { FolderIcon } from "@elementor/icons";
|
|
906
|
-
import { __ as
|
|
943
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
907
944
|
function useDocumentSaveTemplateProps() {
|
|
908
945
|
const { saveTemplate } = useActiveDocumentActions4();
|
|
909
946
|
const { dispatchEvent: dispatchEvent2, config } = useMixpanel4();
|
|
910
947
|
return {
|
|
911
948
|
icon: FolderIcon,
|
|
912
|
-
title:
|
|
949
|
+
title: __11("Save as Template", "elementor"),
|
|
913
950
|
onClick: () => {
|
|
914
951
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
915
952
|
if (eventName) {
|
|
@@ -930,18 +967,43 @@ function useDocumentSaveTemplateProps() {
|
|
|
930
967
|
};
|
|
931
968
|
}
|
|
932
969
|
|
|
933
|
-
// src/extensions/documents-save/hooks/use-document-view-
|
|
970
|
+
// src/extensions/documents-save/hooks/use-document-view-as-markdown-props.ts
|
|
934
971
|
import { __useActiveDocument as useActiveDocument6 } from "@elementor/editor-documents";
|
|
935
972
|
import { __privateRunCommand as runCommand2 } from "@elementor/editor-v1-adapters";
|
|
936
|
-
import { useMixpanel as useMixpanel5 } from "@elementor/events";
|
|
937
973
|
import { EyeIcon as EyeIcon2 } from "@elementor/icons";
|
|
938
|
-
import { __ as
|
|
939
|
-
function
|
|
974
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
975
|
+
function useDocumentViewAsMarkdownProps() {
|
|
940
976
|
const document2 = useActiveDocument6();
|
|
941
|
-
const { dispatchEvent: dispatchEvent2, config } = useMixpanel5();
|
|
942
977
|
return {
|
|
943
978
|
icon: EyeIcon2,
|
|
944
|
-
title:
|
|
979
|
+
title: __12("View as Markdown", "elementor"),
|
|
980
|
+
onClick: async () => {
|
|
981
|
+
const baseUrl = document2?.links?.wpPreview || document2?.links?.permalink;
|
|
982
|
+
if (!baseUrl) {
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
if (document2?.isDirty) {
|
|
986
|
+
await runCommand2("document/save/auto", { force: true });
|
|
987
|
+
}
|
|
988
|
+
const separator = baseUrl.includes("?") ? "&" : "?";
|
|
989
|
+
const url = baseUrl + separator + "format=markdown";
|
|
990
|
+
window.open(url, "_blank");
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
996
|
+
import { __useActiveDocument as useActiveDocument7 } from "@elementor/editor-documents";
|
|
997
|
+
import { __privateRunCommand as runCommand3 } from "@elementor/editor-v1-adapters";
|
|
998
|
+
import { useMixpanel as useMixpanel5 } from "@elementor/events";
|
|
999
|
+
import { EyeIcon as EyeIcon3 } from "@elementor/icons";
|
|
1000
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
1001
|
+
function useDocumentViewPageProps() {
|
|
1002
|
+
const document2 = useActiveDocument7();
|
|
1003
|
+
const { dispatchEvent: dispatchEvent2, config } = useMixpanel5();
|
|
1004
|
+
return {
|
|
1005
|
+
icon: EyeIcon3,
|
|
1006
|
+
title: __13("View Page", "elementor"),
|
|
945
1007
|
onClick: () => {
|
|
946
1008
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
947
1009
|
if (eventName) {
|
|
@@ -958,7 +1020,7 @@ function useDocumentViewPageProps() {
|
|
|
958
1020
|
});
|
|
959
1021
|
}
|
|
960
1022
|
if (document2?.id) {
|
|
961
|
-
|
|
1023
|
+
runCommand3("editor/documents/view", {
|
|
962
1024
|
id: document2.id
|
|
963
1025
|
});
|
|
964
1026
|
}
|
|
@@ -967,7 +1029,7 @@ function useDocumentViewPageProps() {
|
|
|
967
1029
|
}
|
|
968
1030
|
|
|
969
1031
|
// src/extensions/documents-save/index.ts
|
|
970
|
-
function
|
|
1032
|
+
function init4() {
|
|
971
1033
|
injectIntoPrimaryAction({
|
|
972
1034
|
id: "document-primary-action",
|
|
973
1035
|
component: PrimaryAction
|
|
@@ -994,11 +1056,16 @@ function init3() {
|
|
|
994
1056
|
priority: 50,
|
|
995
1057
|
useProps: useDocumentViewPageProps
|
|
996
1058
|
});
|
|
1059
|
+
documentOptionsMenu.registerAction({
|
|
1060
|
+
id: "document-view-as-markdown",
|
|
1061
|
+
priority: 60,
|
|
1062
|
+
useProps: useDocumentViewAsMarkdownProps
|
|
1063
|
+
});
|
|
997
1064
|
}
|
|
998
1065
|
|
|
999
1066
|
// src/extensions/documents-settings/hooks/use-action-props.ts
|
|
1000
1067
|
import {
|
|
1001
|
-
__useActiveDocument as
|
|
1068
|
+
__useActiveDocument as useActiveDocument8,
|
|
1002
1069
|
__useHostDocument as useHostDocument
|
|
1003
1070
|
} from "@elementor/editor-documents";
|
|
1004
1071
|
import {
|
|
@@ -1006,16 +1073,16 @@ import {
|
|
|
1006
1073
|
__privateUseRouteStatus as useRouteStatus
|
|
1007
1074
|
} from "@elementor/editor-v1-adapters";
|
|
1008
1075
|
import { FileSettingsIcon } from "@elementor/icons";
|
|
1009
|
-
import { __ as
|
|
1010
|
-
function
|
|
1011
|
-
const activeDocument =
|
|
1076
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
1077
|
+
function useActionProps3() {
|
|
1078
|
+
const activeDocument = useActiveDocument8();
|
|
1012
1079
|
const hostDocument = useHostDocument();
|
|
1013
1080
|
const { isActive, isBlocked } = useRouteStatus("panel/page-settings");
|
|
1014
1081
|
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
1015
1082
|
const ButtonTitle = document2 ? (
|
|
1016
1083
|
/* translators: %s: Post type label. */
|
|
1017
|
-
|
|
1018
|
-
) :
|
|
1084
|
+
__14("%s Settings", "elementor").replace("%s", document2.type.label)
|
|
1085
|
+
) : __14("Document Settings", "elementor");
|
|
1019
1086
|
return {
|
|
1020
1087
|
title: ButtonTitle,
|
|
1021
1088
|
icon: FileSettingsIcon,
|
|
@@ -1041,11 +1108,11 @@ function useActionProps2() {
|
|
|
1041
1108
|
}
|
|
1042
1109
|
|
|
1043
1110
|
// src/extensions/documents-settings/index.ts
|
|
1044
|
-
function
|
|
1111
|
+
function init5() {
|
|
1045
1112
|
toolsMenu.registerToggleAction({
|
|
1046
1113
|
id: "document-settings-button",
|
|
1047
|
-
priority:
|
|
1048
|
-
useProps:
|
|
1114
|
+
priority: 3,
|
|
1115
|
+
useProps: useActionProps3
|
|
1049
1116
|
});
|
|
1050
1117
|
}
|
|
1051
1118
|
|
|
@@ -1055,11 +1122,11 @@ import {
|
|
|
1055
1122
|
__privateUseRouteStatus as useRouteStatus2
|
|
1056
1123
|
} from "@elementor/editor-v1-adapters";
|
|
1057
1124
|
import { PlusIcon } from "@elementor/icons";
|
|
1058
|
-
import { __ as
|
|
1059
|
-
function
|
|
1125
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
1126
|
+
function useActionProps4() {
|
|
1060
1127
|
const { isActive, isBlocked } = useRouteStatus2("panel/elements");
|
|
1061
1128
|
return {
|
|
1062
|
-
title:
|
|
1129
|
+
title: __15("Add Element", "elementor"),
|
|
1063
1130
|
icon: PlusIcon,
|
|
1064
1131
|
onClick: () => {
|
|
1065
1132
|
const extendedWindow = window;
|
|
@@ -1086,10 +1153,10 @@ import {
|
|
|
1086
1153
|
routeOpenEvent,
|
|
1087
1154
|
v1ReadyEvent
|
|
1088
1155
|
} from "@elementor/editor-v1-adapters";
|
|
1089
|
-
import { __ as
|
|
1156
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
1090
1157
|
function syncPanelTitle() {
|
|
1091
|
-
const panelTitle =
|
|
1092
|
-
const tabTitle =
|
|
1158
|
+
const panelTitle = __16("Elements", "elementor");
|
|
1159
|
+
const tabTitle = __16("Widgets", "elementor");
|
|
1093
1160
|
listenTo(routeOpenEvent("panel/elements"), () => {
|
|
1094
1161
|
setPanelTitle(panelTitle);
|
|
1095
1162
|
setTabTitle(tabTitle);
|
|
@@ -1112,20 +1179,20 @@ 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
1192
|
import { isExperimentActive as isExperimentActive2 } from "@elementor/editor-v1-adapters";
|
|
1126
1193
|
import { MessageLinesIcon } from "@elementor/icons";
|
|
1127
|
-
import { __ as
|
|
1128
|
-
function
|
|
1194
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
1195
|
+
function init7() {
|
|
1129
1196
|
const isActive = isExperimentActive2(EXPERIMENT_NAME);
|
|
1130
1197
|
if (!isActive) {
|
|
1131
1198
|
return;
|
|
@@ -1137,7 +1204,7 @@ function init6() {
|
|
|
1137
1204
|
useProps: () => {
|
|
1138
1205
|
return {
|
|
1139
1206
|
icon: MessageLinesIcon,
|
|
1140
|
-
title:
|
|
1207
|
+
title: __17("Send Feedback", "elementor"),
|
|
1141
1208
|
onClick: () => {
|
|
1142
1209
|
dispatchEvent(new CustomEvent(FEEDBACK_TOGGLE_EVENT));
|
|
1143
1210
|
}
|
|
@@ -1147,12 +1214,12 @@ function init6() {
|
|
|
1147
1214
|
}
|
|
1148
1215
|
|
|
1149
1216
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
1150
|
-
import { __privateRunCommand as
|
|
1217
|
+
import { __privateRunCommand as runCommand4 } from "@elementor/editor-v1-adapters";
|
|
1151
1218
|
import { SearchIcon } from "@elementor/icons";
|
|
1152
|
-
import { __ as
|
|
1153
|
-
function
|
|
1219
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1220
|
+
function useActionProps5() {
|
|
1154
1221
|
return {
|
|
1155
|
-
title:
|
|
1222
|
+
title: __18("Finder", "elementor"),
|
|
1156
1223
|
icon: SearchIcon,
|
|
1157
1224
|
onClick: () => {
|
|
1158
1225
|
const extendedWindow = window;
|
|
@@ -1165,26 +1232,26 @@ function useActionProps4() {
|
|
|
1165
1232
|
element: config.elements.buttonIcon
|
|
1166
1233
|
});
|
|
1167
1234
|
}
|
|
1168
|
-
|
|
1235
|
+
runCommand4("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
1250
|
import { HelpIcon } from "@elementor/icons";
|
|
1184
|
-
import { __ as
|
|
1185
|
-
function
|
|
1251
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
1252
|
+
function useActionProps6() {
|
|
1186
1253
|
return {
|
|
1187
|
-
title:
|
|
1254
|
+
title: __19("Help Center", "elementor"),
|
|
1188
1255
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
1189
1256
|
icon: HelpIcon,
|
|
1190
1257
|
target: "_blank",
|
|
@@ -1204,12 +1271,12 @@ 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
|
|
|
@@ -1219,11 +1286,11 @@ import {
|
|
|
1219
1286
|
__privateUseRouteStatus as useRouteStatus3
|
|
1220
1287
|
} from "@elementor/editor-v1-adapters";
|
|
1221
1288
|
import { HistoryIcon } from "@elementor/icons";
|
|
1222
|
-
import { __ as
|
|
1223
|
-
function
|
|
1289
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1290
|
+
function useActionProps7() {
|
|
1224
1291
|
const { isActive, isBlocked } = useRouteStatus3("panel/history");
|
|
1225
1292
|
return {
|
|
1226
|
-
title:
|
|
1293
|
+
title: __20("History", "elementor"),
|
|
1227
1294
|
icon: HistoryIcon,
|
|
1228
1295
|
onClick: () => {
|
|
1229
1296
|
const extendedWindow = window;
|
|
@@ -1244,22 +1311,22 @@ function useActionProps6() {
|
|
|
1244
1311
|
}
|
|
1245
1312
|
|
|
1246
1313
|
// src/extensions/history/index.ts
|
|
1247
|
-
function
|
|
1314
|
+
function init10() {
|
|
1248
1315
|
toolsMenu.registerToggleAction({
|
|
1249
1316
|
id: "open-history",
|
|
1250
1317
|
priority: 15,
|
|
1251
|
-
useProps:
|
|
1318
|
+
useProps: useActionProps7
|
|
1252
1319
|
});
|
|
1253
1320
|
}
|
|
1254
1321
|
|
|
1255
1322
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
1256
|
-
import { __privateRunCommand as
|
|
1323
|
+
import { __privateRunCommand as runCommand5 } from "@elementor/editor-v1-adapters";
|
|
1257
1324
|
import { KeyboardIcon } from "@elementor/icons";
|
|
1258
|
-
import { __ as
|
|
1259
|
-
function
|
|
1325
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1326
|
+
function useActionProps8() {
|
|
1260
1327
|
return {
|
|
1261
1328
|
icon: KeyboardIcon,
|
|
1262
|
-
title:
|
|
1329
|
+
title: __21("Keyboard Shortcuts", "elementor"),
|
|
1263
1330
|
onClick: () => {
|
|
1264
1331
|
const extendedWindow = window;
|
|
1265
1332
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1271,18 +1338,18 @@ function useActionProps7() {
|
|
|
1271
1338
|
element: config.elements.link
|
|
1272
1339
|
});
|
|
1273
1340
|
}
|
|
1274
|
-
|
|
1341
|
+
runCommand5("shortcuts/open");
|
|
1275
1342
|
}
|
|
1276
1343
|
};
|
|
1277
1344
|
}
|
|
1278
1345
|
|
|
1279
1346
|
// src/extensions/keyboard-shortcuts/index.ts
|
|
1280
|
-
function
|
|
1347
|
+
function init11() {
|
|
1281
1348
|
mainMenu.registerAction({
|
|
1282
1349
|
id: "open-keyboard-shortcuts",
|
|
1283
1350
|
group: "default",
|
|
1284
1351
|
priority: 40,
|
|
1285
|
-
useProps:
|
|
1352
|
+
useProps: useActionProps8
|
|
1286
1353
|
});
|
|
1287
1354
|
}
|
|
1288
1355
|
|
|
@@ -1303,7 +1370,7 @@ import {
|
|
|
1303
1370
|
WidescreenIcon
|
|
1304
1371
|
} from "@elementor/icons";
|
|
1305
1372
|
import { Tab, Tabs, Tooltip as BaseTooltip2 } from "@elementor/ui";
|
|
1306
|
-
import { __ as
|
|
1373
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
1307
1374
|
function BreakpointsSwitcher() {
|
|
1308
1375
|
const breakpoints = useBreakpoints();
|
|
1309
1376
|
const activeBreakpoint = useActiveBreakpoint();
|
|
@@ -1332,7 +1399,7 @@ function BreakpointsSwitcher() {
|
|
|
1332
1399
|
indicatorColor: "secondary",
|
|
1333
1400
|
value: activeBreakpoint,
|
|
1334
1401
|
onChange,
|
|
1335
|
-
"aria-label":
|
|
1402
|
+
"aria-label": __22("Switch Device", "elementor"),
|
|
1336
1403
|
sx: {
|
|
1337
1404
|
"& .MuiTabs-indicator": {
|
|
1338
1405
|
backgroundColor: "text.primary"
|
|
@@ -1383,13 +1450,13 @@ var iconsMap = {
|
|
|
1383
1450
|
var labelsMap = {
|
|
1384
1451
|
default: "%s",
|
|
1385
1452
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1386
|
-
"min-width":
|
|
1453
|
+
"min-width": __22("%s (%dpx and up)", "elementor"),
|
|
1387
1454
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1388
|
-
"max-width":
|
|
1455
|
+
"max-width": __22("%s (up to %dpx)", "elementor")
|
|
1389
1456
|
};
|
|
1390
1457
|
|
|
1391
1458
|
// src/extensions/responsive/index.ts
|
|
1392
|
-
function
|
|
1459
|
+
function init12() {
|
|
1393
1460
|
injectIntoResponsive({
|
|
1394
1461
|
id: "responsive-breakpoints-switcher",
|
|
1395
1462
|
component: BreakpointsSwitcher,
|
|
@@ -1432,13 +1499,13 @@ function getContainerRef() {
|
|
|
1432
1499
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
1433
1500
|
import * as React25 from "react";
|
|
1434
1501
|
import {
|
|
1435
|
-
__useActiveDocument as
|
|
1502
|
+
__useActiveDocument as useActiveDocument9,
|
|
1436
1503
|
__useActiveDocumentActions as useActiveDocumentActions5
|
|
1437
1504
|
} from "@elementor/editor-documents";
|
|
1438
1505
|
import { Button as Button3, CircularProgress as CircularProgress2, Paper } from "@elementor/ui";
|
|
1439
|
-
import { __ as
|
|
1506
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
1440
1507
|
function PrimaryAction2() {
|
|
1441
|
-
const document2 =
|
|
1508
|
+
const document2 = useActiveDocument9();
|
|
1442
1509
|
const { save } = useActiveDocumentActions5();
|
|
1443
1510
|
return /* @__PURE__ */ React25.createElement(
|
|
1444
1511
|
Paper,
|
|
@@ -1459,7 +1526,7 @@ function PrimaryAction2() {
|
|
|
1459
1526
|
sx: { width: "100%" },
|
|
1460
1527
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
1461
1528
|
},
|
|
1462
|
-
document2?.isSaving ? /* @__PURE__ */ React25.createElement(CircularProgress2, null) :
|
|
1529
|
+
document2?.isSaving ? /* @__PURE__ */ React25.createElement(CircularProgress2, null) : __23("Save Changes", "elementor")
|
|
1463
1530
|
)
|
|
1464
1531
|
);
|
|
1465
1532
|
}
|
|
@@ -1471,17 +1538,17 @@ function PortalledPrimaryAction() {
|
|
|
1471
1538
|
|
|
1472
1539
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
1473
1540
|
import {
|
|
1474
|
-
__privateRunCommand as
|
|
1541
|
+
__privateRunCommand as runCommand6,
|
|
1475
1542
|
__privateUseRouteStatus as useRouteStatus4
|
|
1476
1543
|
} from "@elementor/editor-v1-adapters";
|
|
1477
1544
|
import { SettingsIcon } from "@elementor/icons";
|
|
1478
|
-
import { __ as
|
|
1479
|
-
function
|
|
1545
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1546
|
+
function useActionProps9() {
|
|
1480
1547
|
const { isActive, isBlocked } = useRouteStatus4("panel/global", {
|
|
1481
1548
|
blockOnKitRoutes: false
|
|
1482
1549
|
});
|
|
1483
1550
|
return {
|
|
1484
|
-
title:
|
|
1551
|
+
title: __24("Site Settings", "elementor"),
|
|
1485
1552
|
icon: SettingsIcon,
|
|
1486
1553
|
onClick: () => {
|
|
1487
1554
|
const extendedWindow = window;
|
|
@@ -1495,9 +1562,9 @@ function useActionProps8() {
|
|
|
1495
1562
|
});
|
|
1496
1563
|
}
|
|
1497
1564
|
if (isActive) {
|
|
1498
|
-
|
|
1565
|
+
runCommand6("panel/global/close");
|
|
1499
1566
|
} else {
|
|
1500
|
-
|
|
1567
|
+
runCommand6("panel/global/open");
|
|
1501
1568
|
}
|
|
1502
1569
|
},
|
|
1503
1570
|
selected: isActive,
|
|
@@ -1506,7 +1573,7 @@ function useActionProps8() {
|
|
|
1506
1573
|
}
|
|
1507
1574
|
|
|
1508
1575
|
// src/extensions/site-settings/index.ts
|
|
1509
|
-
function
|
|
1576
|
+
function init13() {
|
|
1510
1577
|
injectIntoTop({
|
|
1511
1578
|
id: "site-settings-primary-action-portal",
|
|
1512
1579
|
component: PortalledPrimaryAction
|
|
@@ -1515,21 +1582,21 @@ function init12() {
|
|
|
1515
1582
|
id: "toggle-site-settings",
|
|
1516
1583
|
group: "default",
|
|
1517
1584
|
priority: 1,
|
|
1518
|
-
useProps:
|
|
1585
|
+
useProps: useActionProps9
|
|
1519
1586
|
});
|
|
1520
1587
|
}
|
|
1521
1588
|
|
|
1522
1589
|
// src/extensions/structure/hooks/use-action-props.ts
|
|
1523
1590
|
import {
|
|
1524
|
-
__privateRunCommand as
|
|
1591
|
+
__privateRunCommand as runCommand7,
|
|
1525
1592
|
__privateUseRouteStatus as useRouteStatus5
|
|
1526
1593
|
} from "@elementor/editor-v1-adapters";
|
|
1527
1594
|
import { StructureIcon } from "@elementor/icons";
|
|
1528
|
-
import { __ as
|
|
1529
|
-
function
|
|
1595
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1596
|
+
function useActionProps10() {
|
|
1530
1597
|
const { isActive, isBlocked } = useRouteStatus5("navigator");
|
|
1531
1598
|
return {
|
|
1532
|
-
title:
|
|
1599
|
+
title: __25("Structure", "elementor"),
|
|
1533
1600
|
icon: StructureIcon,
|
|
1534
1601
|
onClick: () => {
|
|
1535
1602
|
const extendedWindow = window;
|
|
@@ -1542,7 +1609,7 @@ function useActionProps9() {
|
|
|
1542
1609
|
element: config.elements.buttonIcon
|
|
1543
1610
|
});
|
|
1544
1611
|
}
|
|
1545
|
-
|
|
1612
|
+
runCommand7("navigator/toggle");
|
|
1546
1613
|
},
|
|
1547
1614
|
selected: isActive,
|
|
1548
1615
|
disabled: isBlocked
|
|
@@ -1550,22 +1617,22 @@ function useActionProps9() {
|
|
|
1550
1617
|
}
|
|
1551
1618
|
|
|
1552
1619
|
// src/extensions/structure/index.ts
|
|
1553
|
-
function
|
|
1620
|
+
function init14() {
|
|
1554
1621
|
utilitiesMenu.registerToggleAction({
|
|
1555
1622
|
id: "toggle-structure-view",
|
|
1556
1623
|
priority: 25,
|
|
1557
|
-
useProps:
|
|
1624
|
+
useProps: useActionProps10
|
|
1558
1625
|
});
|
|
1559
1626
|
}
|
|
1560
1627
|
|
|
1561
1628
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1562
|
-
import { __privateRunCommand as
|
|
1629
|
+
import { __privateRunCommand as runCommand8 } from "@elementor/editor-v1-adapters";
|
|
1563
1630
|
import { ThemeBuilderIcon } from "@elementor/icons";
|
|
1564
|
-
import { __ as
|
|
1565
|
-
function
|
|
1631
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1632
|
+
function useActionProps11() {
|
|
1566
1633
|
return {
|
|
1567
1634
|
icon: ThemeBuilderIcon,
|
|
1568
|
-
title:
|
|
1635
|
+
title: __26("Theme Builder", "elementor"),
|
|
1569
1636
|
onClick: () => {
|
|
1570
1637
|
const extendedWindow = window;
|
|
1571
1638
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1577,18 +1644,18 @@ function useActionProps10() {
|
|
|
1577
1644
|
element: config.elements.link
|
|
1578
1645
|
});
|
|
1579
1646
|
}
|
|
1580
|
-
|
|
1647
|
+
runCommand8("app/open");
|
|
1581
1648
|
}
|
|
1582
1649
|
};
|
|
1583
1650
|
}
|
|
1584
1651
|
|
|
1585
1652
|
// src/extensions/theme-builder/index.ts
|
|
1586
|
-
function
|
|
1653
|
+
function init15() {
|
|
1587
1654
|
mainMenu.registerAction({
|
|
1588
1655
|
id: "open-theme-builder",
|
|
1589
1656
|
group: "default",
|
|
1590
1657
|
priority: 10,
|
|
1591
|
-
useProps:
|
|
1658
|
+
useProps: useActionProps11
|
|
1592
1659
|
});
|
|
1593
1660
|
}
|
|
1594
1661
|
|
|
@@ -1598,12 +1665,12 @@ import {
|
|
|
1598
1665
|
__privateUseRouteStatus as useRouteStatus6
|
|
1599
1666
|
} from "@elementor/editor-v1-adapters";
|
|
1600
1667
|
import { ToggleRightIcon } from "@elementor/icons";
|
|
1601
|
-
import { __ as
|
|
1602
|
-
function
|
|
1668
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
1669
|
+
function useActionProps12() {
|
|
1603
1670
|
const { isActive, isBlocked } = useRouteStatus6("panel/editor-preferences");
|
|
1604
1671
|
return {
|
|
1605
1672
|
icon: ToggleRightIcon,
|
|
1606
|
-
title:
|
|
1673
|
+
title: __27("User Preferences", "elementor"),
|
|
1607
1674
|
onClick: () => {
|
|
1608
1675
|
const extendedWindow = window;
|
|
1609
1676
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1623,28 +1690,28 @@ function useActionProps11() {
|
|
|
1623
1690
|
}
|
|
1624
1691
|
|
|
1625
1692
|
// src/extensions/user-preferences/index.ts
|
|
1626
|
-
function
|
|
1693
|
+
function init16() {
|
|
1627
1694
|
mainMenu.registerToggleAction({
|
|
1628
1695
|
id: "open-user-preferences",
|
|
1629
1696
|
group: "default",
|
|
1630
1697
|
priority: 30,
|
|
1631
|
-
useProps:
|
|
1698
|
+
useProps: useActionProps12
|
|
1632
1699
|
});
|
|
1633
1700
|
}
|
|
1634
1701
|
|
|
1635
1702
|
// src/extensions/wordpress/index.ts
|
|
1636
|
-
import { __useActiveDocument as
|
|
1703
|
+
import { __useActiveDocument as useActiveDocument10 } from "@elementor/editor-documents";
|
|
1637
1704
|
import { WordpressIcon } from "@elementor/icons";
|
|
1638
|
-
import { __ as
|
|
1639
|
-
function
|
|
1705
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
1706
|
+
function init17() {
|
|
1640
1707
|
mainMenu.registerLink({
|
|
1641
1708
|
id: "exit-to-wordpress",
|
|
1642
1709
|
group: "exits",
|
|
1643
1710
|
priority: 20,
|
|
1644
1711
|
useProps: () => {
|
|
1645
|
-
const document2 =
|
|
1712
|
+
const document2 = useActiveDocument10();
|
|
1646
1713
|
return {
|
|
1647
|
-
title:
|
|
1714
|
+
title: __28("Exit to WordPress", "elementor"),
|
|
1648
1715
|
href: document2?.links?.platformEdit,
|
|
1649
1716
|
icon: WordpressIcon,
|
|
1650
1717
|
onClick: () => {
|
|
@@ -1668,23 +1735,24 @@ function init16() {
|
|
|
1668
1735
|
}
|
|
1669
1736
|
|
|
1670
1737
|
// src/extensions/index.ts
|
|
1671
|
-
function
|
|
1672
|
-
|
|
1738
|
+
function init18() {
|
|
1739
|
+
init();
|
|
1673
1740
|
init3();
|
|
1674
1741
|
init4();
|
|
1675
1742
|
init5();
|
|
1676
|
-
|
|
1743
|
+
init6();
|
|
1677
1744
|
init8();
|
|
1678
1745
|
init9();
|
|
1679
1746
|
init10();
|
|
1680
1747
|
init11();
|
|
1681
1748
|
init12();
|
|
1682
|
-
init6();
|
|
1683
1749
|
init13();
|
|
1750
|
+
init7();
|
|
1684
1751
|
init14();
|
|
1685
1752
|
init15();
|
|
1686
1753
|
init16();
|
|
1687
|
-
|
|
1754
|
+
init17();
|
|
1755
|
+
init2();
|
|
1688
1756
|
}
|
|
1689
1757
|
|
|
1690
1758
|
// src/sync/redirect-old-menus.ts
|
|
@@ -1700,9 +1768,9 @@ function redirectOldMenus() {
|
|
|
1700
1768
|
}
|
|
1701
1769
|
|
|
1702
1770
|
// src/init.ts
|
|
1703
|
-
function
|
|
1771
|
+
function init19() {
|
|
1704
1772
|
redirectOldMenus();
|
|
1705
|
-
|
|
1773
|
+
init18();
|
|
1706
1774
|
injectIntoTop2({
|
|
1707
1775
|
id: "app-bar",
|
|
1708
1776
|
component: AppBar
|
|
@@ -1710,7 +1778,7 @@ function init18() {
|
|
|
1710
1778
|
}
|
|
1711
1779
|
export {
|
|
1712
1780
|
documentOptionsMenu,
|
|
1713
|
-
|
|
1781
|
+
init19 as init,
|
|
1714
1782
|
injectIntoPageIndication,
|
|
1715
1783
|
injectIntoPrimaryAction,
|
|
1716
1784
|
injectIntoResponsive,
|