@elementor/editor-app-bar 0.32.1 → 3.32.0-21
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/CHANGELOG.md +0 -7
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +196 -154
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +154 -112
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
- package/src/components/actions/link.tsx +3 -2
- package/src/components/locations/main-menu-location.tsx +2 -2
- package/src/components/ui/popover-menu-item.tsx +3 -1
- package/src/extensions/connect/hooks/use-connect-link-config.tsx +23 -0
- package/src/extensions/connect/index.ts +11 -0
- package/src/extensions/documents-indicator/components/settings-button.tsx +10 -7
- package/src/extensions/documents-preview/hooks/use-action-props.ts +2 -2
- package/src/extensions/documents-save/components/primary-action.tsx +10 -7
- package/src/extensions/elements/hooks/use-action-props.ts +2 -2
- package/src/extensions/finder/hooks/use-action-props.ts +2 -2
- package/src/extensions/help/index.ts +3 -2
- package/src/extensions/history/hooks/use-action-props.ts +2 -2
- package/src/extensions/index.ts +2 -0
- package/src/extensions/keyboard-shortcuts/hooks/use-action-props.ts +2 -2
- package/src/extensions/responsive/components/breakpoints-switcher.tsx +2 -2
- package/src/extensions/site-settings/hooks/use-action-props.ts +2 -2
- package/src/extensions/structure/hooks/use-action-props.ts +2 -2
- package/src/extensions/theme-builder/hooks/use-action-props.ts +2 -2
- package/src/extensions/user-preferences/hooks/use-action-props.ts +2 -2
- package/src/extensions/wordpress/index.ts +11 -7
- package/src/types.ts +13 -2
package/dist/index.mjs
CHANGED
|
@@ -32,9 +32,10 @@ function PopoverMenuItem({
|
|
|
32
32
|
target,
|
|
33
33
|
disabled,
|
|
34
34
|
isGroupParent,
|
|
35
|
+
showExternalLinkIcon,
|
|
35
36
|
...props
|
|
36
37
|
}) {
|
|
37
|
-
const isExternalLink = href && target === "_blank";
|
|
38
|
+
const isExternalLink = href && target === "_blank" && showExternalLinkIcon;
|
|
38
39
|
return /* @__PURE__ */ React2.createElement(
|
|
39
40
|
MenuItem,
|
|
40
41
|
{
|
|
@@ -108,12 +109,12 @@ function Action({ icon: Icon, title, visible = true, ...props }) {
|
|
|
108
109
|
|
|
109
110
|
// src/components/actions/link.tsx
|
|
110
111
|
import * as React5 from "react";
|
|
111
|
-
function Link({ icon: Icon, title, visible = true, ...props }) {
|
|
112
|
+
function Link({ icon: Icon, title, visible = true, showExternalLinkIcon = false, ...props }) {
|
|
112
113
|
const { type } = useMenuContext();
|
|
113
114
|
if (!visible) {
|
|
114
115
|
return null;
|
|
115
116
|
}
|
|
116
|
-
return type === "toolbar" ? /* @__PURE__ */ React5.createElement(ToolbarMenuItem, { title, ...props }, /* @__PURE__ */ React5.createElement(Icon, null)) : /* @__PURE__ */ React5.createElement(PopoverMenuItem, { ...props, text: title, icon: /* @__PURE__ */ React5.createElement(Icon, null) });
|
|
117
|
+
return type === "toolbar" ? /* @__PURE__ */ React5.createElement(ToolbarMenuItem, { title, ...props }, /* @__PURE__ */ React5.createElement(Icon, null)) : /* @__PURE__ */ React5.createElement(PopoverMenuItem, { ...props, text: title, icon: /* @__PURE__ */ React5.createElement(Icon, null), showExternalLinkIcon });
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
// src/components/actions/toggle-action.tsx
|
|
@@ -295,9 +296,9 @@ function MainMenuLocation() {
|
|
|
295
296
|
const toolbarLogoProps = bindTrigger(popupState);
|
|
296
297
|
const onToolbarClick = (e) => {
|
|
297
298
|
const extendedWindow = window;
|
|
298
|
-
const config = extendedWindow?.
|
|
299
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
299
300
|
if (config) {
|
|
300
|
-
extendedWindow.
|
|
301
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.elementorLogoDropdown, {
|
|
301
302
|
location: config.locations.topBar,
|
|
302
303
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
303
304
|
trigger: config.triggers.dropdownClick,
|
|
@@ -407,6 +408,35 @@ function AppBar() {
|
|
|
407
408
|
return /* @__PURE__ */ React19.createElement(ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React19.createElement(BaseAppBar, { position: "sticky" }, /* @__PURE__ */ React19.createElement(Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React19.createElement(Box3, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React19.createElement(Grid, { container: true, flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React19.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React19.createElement(Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React19.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React19.createElement(Divider3, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(PageIndicationLocation, null), /* @__PURE__ */ React19.createElement(Divider3, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(ResponsiveLocation, null), /* @__PURE__ */ React19.createElement(Divider3, { orientation: "vertical" }))), /* @__PURE__ */ React19.createElement(Grid, { container: true, justifyContent: "flex-end", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React19.createElement(PrimaryActionLocation, null))))));
|
|
408
409
|
}
|
|
409
410
|
|
|
411
|
+
// src/extensions/connect/hooks/use-connect-link-config.tsx
|
|
412
|
+
import { UserIcon } from "@elementor/icons";
|
|
413
|
+
import { __ as __4 } from "@wordpress/i18n";
|
|
414
|
+
function useConnectLinkConfig() {
|
|
415
|
+
const extendedWindow = window;
|
|
416
|
+
const isUserConnected = extendedWindow?.elementorCommon?.config.library_connect.is_connected ?? false;
|
|
417
|
+
return isUserConnected ? {
|
|
418
|
+
title: __4("My Elementor", "elementor"),
|
|
419
|
+
href: extendedWindow?.elementorCommon?.config.user.top_bar.my_elementor_url,
|
|
420
|
+
icon: UserIcon,
|
|
421
|
+
target: "_blank"
|
|
422
|
+
} : {
|
|
423
|
+
title: __4("Connect my account", "elementor"),
|
|
424
|
+
href: extendedWindow?.elementorCommon?.config.user.top_bar.connect_url,
|
|
425
|
+
icon: UserIcon,
|
|
426
|
+
target: "_blank"
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// src/extensions/connect/index.ts
|
|
431
|
+
function init() {
|
|
432
|
+
mainMenu.registerLink({
|
|
433
|
+
id: "app-bar-connect",
|
|
434
|
+
group: "exits",
|
|
435
|
+
priority: 10,
|
|
436
|
+
useProps: useConnectLinkConfig
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
|
|
410
440
|
// src/extensions/documents-indicator/components/settings-button.tsx
|
|
411
441
|
import * as React20 from "react";
|
|
412
442
|
import {
|
|
@@ -419,7 +449,7 @@ import {
|
|
|
419
449
|
} from "@elementor/editor-v1-adapters";
|
|
420
450
|
import { SettingsIcon } from "@elementor/icons";
|
|
421
451
|
import { Box as Box4, ToggleButton as ToggleButton3, Tooltip as BaseTooltip2 } from "@elementor/ui";
|
|
422
|
-
import { __ as
|
|
452
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
423
453
|
function SettingsButton() {
|
|
424
454
|
const activeDocument = useActiveDocument2();
|
|
425
455
|
const hostDocument = useHostDocument();
|
|
@@ -428,7 +458,7 @@ function SettingsButton() {
|
|
|
428
458
|
if (!document2) {
|
|
429
459
|
return null;
|
|
430
460
|
}
|
|
431
|
-
const title =
|
|
461
|
+
const title = __5("%s Settings", "elementor").replace("%s", document2.type.label);
|
|
432
462
|
return /* @__PURE__ */ React20.createElement(Tooltip3, { title }, /* @__PURE__ */ React20.createElement(Box4, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React20.createElement(
|
|
433
463
|
ToggleButton3,
|
|
434
464
|
{
|
|
@@ -437,14 +467,17 @@ function SettingsButton() {
|
|
|
437
467
|
disabled: isBlocked,
|
|
438
468
|
onChange: () => {
|
|
439
469
|
const extendedWindow = window;
|
|
440
|
-
const config = extendedWindow?.
|
|
470
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
441
471
|
if (config) {
|
|
442
|
-
extendedWindow.
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
472
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(
|
|
473
|
+
config.names.topBar.documentSettings,
|
|
474
|
+
{
|
|
475
|
+
location: config.locations.topBar,
|
|
476
|
+
secondaryLocation: config.secondaryLocations["document-settings"],
|
|
477
|
+
trigger: config.triggers.click,
|
|
478
|
+
element: config.elements.buttonIcon
|
|
479
|
+
}
|
|
480
|
+
);
|
|
448
481
|
}
|
|
449
482
|
openRoute("panel/page-settings/settings");
|
|
450
483
|
},
|
|
@@ -479,7 +512,7 @@ function Tooltip3(props) {
|
|
|
479
512
|
}
|
|
480
513
|
|
|
481
514
|
// src/extensions/documents-indicator/index.ts
|
|
482
|
-
function
|
|
515
|
+
function init2() {
|
|
483
516
|
injectIntoPageIndication({
|
|
484
517
|
id: "document-settings-button",
|
|
485
518
|
component: SettingsButton,
|
|
@@ -494,17 +527,17 @@ function init() {
|
|
|
494
527
|
import { __useActiveDocument as useActiveDocument3 } from "@elementor/editor-documents";
|
|
495
528
|
import { __privateRunCommand as runCommand } from "@elementor/editor-v1-adapters";
|
|
496
529
|
import { EyeIcon } from "@elementor/icons";
|
|
497
|
-
import { __ as
|
|
530
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
498
531
|
function useActionProps() {
|
|
499
532
|
const document2 = useActiveDocument3();
|
|
500
533
|
return {
|
|
501
534
|
icon: EyeIcon,
|
|
502
|
-
title:
|
|
535
|
+
title: __6("Preview Changes", "elementor"),
|
|
503
536
|
onClick: () => {
|
|
504
537
|
const extendedWindow = window;
|
|
505
|
-
const config = extendedWindow?.
|
|
538
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
506
539
|
if (config) {
|
|
507
|
-
extendedWindow.
|
|
540
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.previewPage, {
|
|
508
541
|
location: config.locations.topBar,
|
|
509
542
|
secondaryLocation: config.secondaryLocations["preview-page"],
|
|
510
543
|
trigger: config.triggers.click,
|
|
@@ -522,7 +555,7 @@ function useActionProps() {
|
|
|
522
555
|
}
|
|
523
556
|
|
|
524
557
|
// src/extensions/documents-preview/index.ts
|
|
525
|
-
function
|
|
558
|
+
function init3() {
|
|
526
559
|
utilitiesMenu.registerAction({
|
|
527
560
|
id: "document-preview-button",
|
|
528
561
|
priority: 30,
|
|
@@ -549,7 +582,7 @@ import {
|
|
|
549
582
|
Tooltip as Tooltip4,
|
|
550
583
|
usePopupState as usePopupState4
|
|
551
584
|
} from "@elementor/ui";
|
|
552
|
-
import { __ as
|
|
585
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
553
586
|
|
|
554
587
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
555
588
|
import * as React21 from "react";
|
|
@@ -618,14 +651,17 @@ function PrimaryAction() {
|
|
|
618
651
|
{
|
|
619
652
|
onClick: () => {
|
|
620
653
|
const extendedWindow = window;
|
|
621
|
-
const config = extendedWindow?.
|
|
654
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
622
655
|
if (config) {
|
|
623
|
-
extendedWindow.
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
656
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(
|
|
657
|
+
config.names.topBar.publishButton,
|
|
658
|
+
{
|
|
659
|
+
location: config.locations.topBar,
|
|
660
|
+
secondaryLocation: config.secondaryLocations["publish-button"],
|
|
661
|
+
trigger: config.triggers.click,
|
|
662
|
+
element: config.elements.mainCta
|
|
663
|
+
}
|
|
664
|
+
);
|
|
629
665
|
}
|
|
630
666
|
if (!document2.isSaving) {
|
|
631
667
|
save();
|
|
@@ -645,7 +681,7 @@ function PrimaryAction() {
|
|
|
645
681
|
), /* @__PURE__ */ React22.createElement(
|
|
646
682
|
Tooltip4,
|
|
647
683
|
{
|
|
648
|
-
title:
|
|
684
|
+
title: __7("Save Options", "elementor"),
|
|
649
685
|
PopperProps: {
|
|
650
686
|
sx: {
|
|
651
687
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -662,14 +698,14 @@ function PrimaryAction() {
|
|
|
662
698
|
...bindTrigger4(popupState),
|
|
663
699
|
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
664
700
|
disabled: isSaveOptionsDisabled,
|
|
665
|
-
"aria-label":
|
|
701
|
+
"aria-label": __7("Save Options", "elementor")
|
|
666
702
|
},
|
|
667
703
|
/* @__PURE__ */ React22.createElement(ChevronDownIcon, null)
|
|
668
704
|
))
|
|
669
705
|
)), /* @__PURE__ */ React22.createElement(PrimaryActionMenu, { ...bindMenu4(popupState), onClick: popupState.close }));
|
|
670
706
|
}
|
|
671
707
|
function getLabel(document2) {
|
|
672
|
-
return document2.userCan.publish ?
|
|
708
|
+
return document2.userCan.publish ? __7("Publish", "elementor") : __7("Submit", "elementor");
|
|
673
709
|
}
|
|
674
710
|
function isPublishEnabled(document2) {
|
|
675
711
|
if (document2.type.value === "kit") {
|
|
@@ -684,13 +720,13 @@ import {
|
|
|
684
720
|
__useActiveDocumentActions as useActiveDocumentActions2
|
|
685
721
|
} from "@elementor/editor-documents";
|
|
686
722
|
import { LinkIcon } from "@elementor/icons";
|
|
687
|
-
import { __ as
|
|
723
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
688
724
|
function useDocumentCopyAndShareProps() {
|
|
689
725
|
const document2 = useActiveDocument5();
|
|
690
726
|
const { copyAndShare } = useActiveDocumentActions2();
|
|
691
727
|
return {
|
|
692
728
|
icon: LinkIcon,
|
|
693
|
-
title:
|
|
729
|
+
title: __8("Copy and Share", "elementor"),
|
|
694
730
|
onClick: copyAndShare,
|
|
695
731
|
disabled: !document2 || document2.isSaving || document2.isSavingDraft || !("publish" === document2.status.value),
|
|
696
732
|
visible: document2?.permissions?.showCopyAndShare
|
|
@@ -703,13 +739,13 @@ import {
|
|
|
703
739
|
__useActiveDocumentActions as useActiveDocumentActions3
|
|
704
740
|
} from "@elementor/editor-documents";
|
|
705
741
|
import { FileReportIcon } from "@elementor/icons";
|
|
706
|
-
import { __ as
|
|
742
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
707
743
|
function useDocumentSaveDraftProps() {
|
|
708
744
|
const document2 = useActiveDocument6();
|
|
709
745
|
const { saveDraft } = useActiveDocumentActions3();
|
|
710
746
|
return {
|
|
711
747
|
icon: FileReportIcon,
|
|
712
|
-
title:
|
|
748
|
+
title: __9("Save Draft", "elementor"),
|
|
713
749
|
onClick: saveDraft,
|
|
714
750
|
disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
|
|
715
751
|
};
|
|
@@ -718,12 +754,12 @@ function useDocumentSaveDraftProps() {
|
|
|
718
754
|
// src/extensions/documents-save/hooks/use-document-save-template-props.ts
|
|
719
755
|
import { __useActiveDocumentActions as useActiveDocumentActions4 } from "@elementor/editor-documents";
|
|
720
756
|
import { FolderIcon } from "@elementor/icons";
|
|
721
|
-
import { __ as
|
|
757
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
722
758
|
function useDocumentSaveTemplateProps() {
|
|
723
759
|
const { saveTemplate } = useActiveDocumentActions4();
|
|
724
760
|
return {
|
|
725
761
|
icon: FolderIcon,
|
|
726
|
-
title:
|
|
762
|
+
title: __10("Save as Template", "elementor"),
|
|
727
763
|
onClick: saveTemplate
|
|
728
764
|
};
|
|
729
765
|
}
|
|
@@ -732,12 +768,12 @@ function useDocumentSaveTemplateProps() {
|
|
|
732
768
|
import { __useActiveDocument as useActiveDocument7 } from "@elementor/editor-documents";
|
|
733
769
|
import { __privateRunCommand as runCommand2 } from "@elementor/editor-v1-adapters";
|
|
734
770
|
import { EyeIcon as EyeIcon2 } from "@elementor/icons";
|
|
735
|
-
import { __ as
|
|
771
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
736
772
|
function useDocumentViewPageProps() {
|
|
737
773
|
const document2 = useActiveDocument7();
|
|
738
774
|
return {
|
|
739
775
|
icon: EyeIcon2,
|
|
740
|
-
title:
|
|
776
|
+
title: __11("View Page", "elementor"),
|
|
741
777
|
onClick: () => document2?.id && runCommand2("editor/documents/view", {
|
|
742
778
|
id: document2.id
|
|
743
779
|
})
|
|
@@ -745,7 +781,7 @@ function useDocumentViewPageProps() {
|
|
|
745
781
|
}
|
|
746
782
|
|
|
747
783
|
// src/extensions/documents-save/index.ts
|
|
748
|
-
function
|
|
784
|
+
function init4() {
|
|
749
785
|
injectIntoPrimaryAction({
|
|
750
786
|
id: "document-primary-action",
|
|
751
787
|
component: PrimaryAction
|
|
@@ -780,17 +816,17 @@ import {
|
|
|
780
816
|
__privateUseRouteStatus as useRouteStatus2
|
|
781
817
|
} from "@elementor/editor-v1-adapters";
|
|
782
818
|
import { PlusIcon } from "@elementor/icons";
|
|
783
|
-
import { __ as
|
|
819
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
784
820
|
function useActionProps2() {
|
|
785
821
|
const { isActive, isBlocked } = useRouteStatus2("panel/elements");
|
|
786
822
|
return {
|
|
787
|
-
title:
|
|
823
|
+
title: __12("Add Element", "elementor"),
|
|
788
824
|
icon: PlusIcon,
|
|
789
825
|
onClick: () => {
|
|
790
826
|
const extendedWindow = window;
|
|
791
|
-
const config = extendedWindow?.
|
|
827
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
792
828
|
if (config) {
|
|
793
|
-
extendedWindow.
|
|
829
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.widgetPanel, {
|
|
794
830
|
location: config.locations.topBar,
|
|
795
831
|
secondaryLocation: config.secondaryLocations["widget-panel"],
|
|
796
832
|
trigger: config.triggers.toggleClick,
|
|
@@ -811,10 +847,10 @@ import {
|
|
|
811
847
|
routeOpenEvent,
|
|
812
848
|
v1ReadyEvent
|
|
813
849
|
} from "@elementor/editor-v1-adapters";
|
|
814
|
-
import { __ as
|
|
850
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
815
851
|
function syncPanelTitle() {
|
|
816
|
-
const panelTitle =
|
|
817
|
-
const tabTitle =
|
|
852
|
+
const panelTitle = __13("Elements", "elementor");
|
|
853
|
+
const tabTitle = __13("Widgets", "elementor");
|
|
818
854
|
listenTo(routeOpenEvent("panel/elements"), () => {
|
|
819
855
|
setPanelTitle(panelTitle);
|
|
820
856
|
setTabTitle(tabTitle);
|
|
@@ -837,7 +873,7 @@ function setTabTitle(title) {
|
|
|
837
873
|
}
|
|
838
874
|
|
|
839
875
|
// src/extensions/elements/index.ts
|
|
840
|
-
function
|
|
876
|
+
function init5() {
|
|
841
877
|
syncPanelTitle();
|
|
842
878
|
toolsMenu.registerToggleAction({
|
|
843
879
|
id: "open-elements-panel",
|
|
@@ -849,16 +885,16 @@ function init4() {
|
|
|
849
885
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
850
886
|
import { __privateRunCommand as runCommand3 } from "@elementor/editor-v1-adapters";
|
|
851
887
|
import { SearchIcon } from "@elementor/icons";
|
|
852
|
-
import { __ as
|
|
888
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
853
889
|
function useActionProps3() {
|
|
854
890
|
return {
|
|
855
|
-
title:
|
|
891
|
+
title: __14("Finder", "elementor"),
|
|
856
892
|
icon: SearchIcon,
|
|
857
893
|
onClick: () => {
|
|
858
894
|
const extendedWindow = window;
|
|
859
|
-
const config = extendedWindow?.
|
|
895
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
860
896
|
if (config) {
|
|
861
|
-
extendedWindow.
|
|
897
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.finder, {
|
|
862
898
|
location: config.locations.topBar,
|
|
863
899
|
secondaryLocation: config.secondaryLocations.finder,
|
|
864
900
|
trigger: config.triggers.toggleClick,
|
|
@@ -871,7 +907,7 @@ function useActionProps3() {
|
|
|
871
907
|
}
|
|
872
908
|
|
|
873
909
|
// src/extensions/finder/index.ts
|
|
874
|
-
function
|
|
910
|
+
function init6() {
|
|
875
911
|
utilitiesMenu.registerAction({
|
|
876
912
|
id: "toggle-finder",
|
|
877
913
|
priority: 15,
|
|
@@ -882,23 +918,24 @@ function init5() {
|
|
|
882
918
|
|
|
883
919
|
// src/extensions/help/index.ts
|
|
884
920
|
import { HelpIcon } from "@elementor/icons";
|
|
885
|
-
import { __ as
|
|
886
|
-
function
|
|
921
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
922
|
+
function init7() {
|
|
887
923
|
utilitiesMenu.registerLink({
|
|
888
924
|
id: "open-help-center",
|
|
889
925
|
priority: 25,
|
|
890
926
|
// After Finder.
|
|
891
927
|
useProps: () => {
|
|
892
928
|
return {
|
|
893
|
-
title:
|
|
929
|
+
title: __15("Help", "elementor"),
|
|
894
930
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
895
931
|
icon: HelpIcon,
|
|
896
932
|
target: "_blank",
|
|
933
|
+
showExternalLinkIcon: true,
|
|
897
934
|
onClick: () => {
|
|
898
935
|
const extendedWindow = window;
|
|
899
|
-
const config = extendedWindow?.
|
|
936
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
900
937
|
if (config) {
|
|
901
|
-
extendedWindow.
|
|
938
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.help, {
|
|
902
939
|
location: config.locations.topBar,
|
|
903
940
|
secondaryLocation: config.secondaryLocations.help,
|
|
904
941
|
trigger: config.triggers.click,
|
|
@@ -917,17 +954,17 @@ import {
|
|
|
917
954
|
__privateUseRouteStatus as useRouteStatus3
|
|
918
955
|
} from "@elementor/editor-v1-adapters";
|
|
919
956
|
import { HistoryIcon } from "@elementor/icons";
|
|
920
|
-
import { __ as
|
|
957
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
921
958
|
function useActionProps4() {
|
|
922
959
|
const { isActive, isBlocked } = useRouteStatus3("panel/history");
|
|
923
960
|
return {
|
|
924
|
-
title:
|
|
961
|
+
title: __16("History", "elementor"),
|
|
925
962
|
icon: HistoryIcon,
|
|
926
963
|
onClick: () => {
|
|
927
964
|
const extendedWindow = window;
|
|
928
|
-
const config = extendedWindow?.
|
|
965
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
929
966
|
if (config) {
|
|
930
|
-
extendedWindow.
|
|
967
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.history, {
|
|
931
968
|
location: config.locations.topBar,
|
|
932
969
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
933
970
|
trigger: config.triggers.click,
|
|
@@ -942,7 +979,7 @@ function useActionProps4() {
|
|
|
942
979
|
}
|
|
943
980
|
|
|
944
981
|
// src/extensions/history/index.ts
|
|
945
|
-
function
|
|
982
|
+
function init8() {
|
|
946
983
|
mainMenu.registerToggleAction({
|
|
947
984
|
id: "open-history",
|
|
948
985
|
priority: 20,
|
|
@@ -953,16 +990,16 @@ function init7() {
|
|
|
953
990
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
954
991
|
import { __privateRunCommand as runCommand4 } from "@elementor/editor-v1-adapters";
|
|
955
992
|
import { KeyboardIcon } from "@elementor/icons";
|
|
956
|
-
import { __ as
|
|
993
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
957
994
|
function useActionProps5() {
|
|
958
995
|
return {
|
|
959
996
|
icon: KeyboardIcon,
|
|
960
|
-
title:
|
|
997
|
+
title: __17("Keyboard Shortcuts", "elementor"),
|
|
961
998
|
onClick: () => {
|
|
962
999
|
const extendedWindow = window;
|
|
963
|
-
const config = extendedWindow?.
|
|
1000
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
964
1001
|
if (config) {
|
|
965
|
-
extendedWindow.
|
|
1002
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.keyboardShortcuts, {
|
|
966
1003
|
location: config.locations.topBar,
|
|
967
1004
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
968
1005
|
trigger: config.triggers.click,
|
|
@@ -975,7 +1012,7 @@ function useActionProps5() {
|
|
|
975
1012
|
}
|
|
976
1013
|
|
|
977
1014
|
// src/extensions/keyboard-shortcuts/index.ts
|
|
978
|
-
function
|
|
1015
|
+
function init9() {
|
|
979
1016
|
mainMenu.registerAction({
|
|
980
1017
|
id: "open-keyboard-shortcuts",
|
|
981
1018
|
group: "default",
|
|
@@ -1002,7 +1039,7 @@ import {
|
|
|
1002
1039
|
WidescreenIcon
|
|
1003
1040
|
} from "@elementor/icons";
|
|
1004
1041
|
import { Tab, Tabs, Tooltip as BaseTooltip3 } from "@elementor/ui";
|
|
1005
|
-
import { __ as
|
|
1042
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1006
1043
|
function BreakpointsSwitcher() {
|
|
1007
1044
|
const breakpoints = useBreakpoints();
|
|
1008
1045
|
const activeBreakpoint = useActiveBreakpoint();
|
|
@@ -1012,9 +1049,9 @@ function BreakpointsSwitcher() {
|
|
|
1012
1049
|
}
|
|
1013
1050
|
const onChange = (_, value) => {
|
|
1014
1051
|
const extendedWindow = window;
|
|
1015
|
-
const config = extendedWindow?.
|
|
1052
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1016
1053
|
if (config) {
|
|
1017
|
-
extendedWindow.
|
|
1054
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.responsiveControls, {
|
|
1018
1055
|
location: config.locations.topBar,
|
|
1019
1056
|
secondaryLocation: config.secondaryLocations.responsiveControls,
|
|
1020
1057
|
trigger: config.triggers.click,
|
|
@@ -1031,7 +1068,7 @@ function BreakpointsSwitcher() {
|
|
|
1031
1068
|
indicatorColor: "secondary",
|
|
1032
1069
|
value: activeBreakpoint,
|
|
1033
1070
|
onChange,
|
|
1034
|
-
"aria-label":
|
|
1071
|
+
"aria-label": __18("Switch Device", "elementor"),
|
|
1035
1072
|
sx: {
|
|
1036
1073
|
"& .MuiTabs-indicator": {
|
|
1037
1074
|
backgroundColor: "text.primary"
|
|
@@ -1082,13 +1119,13 @@ var iconsMap = {
|
|
|
1082
1119
|
var labelsMap = {
|
|
1083
1120
|
default: "%s",
|
|
1084
1121
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1085
|
-
"min-width":
|
|
1122
|
+
"min-width": __18("%s (%dpx and up)", "elementor"),
|
|
1086
1123
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1087
|
-
"max-width":
|
|
1124
|
+
"max-width": __18("%s (up to %dpx)", "elementor")
|
|
1088
1125
|
};
|
|
1089
1126
|
|
|
1090
1127
|
// src/extensions/responsive/index.ts
|
|
1091
|
-
function
|
|
1128
|
+
function init10() {
|
|
1092
1129
|
injectIntoResponsive({
|
|
1093
1130
|
id: "responsive-breakpoints-switcher",
|
|
1094
1131
|
component: BreakpointsSwitcher,
|
|
@@ -1135,7 +1172,7 @@ import {
|
|
|
1135
1172
|
__useActiveDocumentActions as useActiveDocumentActions5
|
|
1136
1173
|
} from "@elementor/editor-documents";
|
|
1137
1174
|
import { Button as Button2, CircularProgress as CircularProgress2, Paper } from "@elementor/ui";
|
|
1138
|
-
import { __ as
|
|
1175
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
1139
1176
|
function PrimaryAction2() {
|
|
1140
1177
|
const document2 = useActiveDocument8();
|
|
1141
1178
|
const { save } = useActiveDocumentActions5();
|
|
@@ -1158,7 +1195,7 @@ function PrimaryAction2() {
|
|
|
1158
1195
|
sx: { width: "100%" },
|
|
1159
1196
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
1160
1197
|
},
|
|
1161
|
-
document2?.isSaving ? /* @__PURE__ */ React25.createElement(CircularProgress2, null) :
|
|
1198
|
+
document2?.isSaving ? /* @__PURE__ */ React25.createElement(CircularProgress2, null) : __19("Save Changes", "elementor")
|
|
1162
1199
|
)
|
|
1163
1200
|
);
|
|
1164
1201
|
}
|
|
@@ -1174,19 +1211,19 @@ import {
|
|
|
1174
1211
|
__privateUseRouteStatus as useRouteStatus4
|
|
1175
1212
|
} from "@elementor/editor-v1-adapters";
|
|
1176
1213
|
import { AdjustmentsHorizontalIcon } from "@elementor/icons";
|
|
1177
|
-
import { __ as
|
|
1214
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1178
1215
|
function useActionProps6() {
|
|
1179
1216
|
const { isActive, isBlocked } = useRouteStatus4("panel/global", {
|
|
1180
1217
|
blockOnKitRoutes: false
|
|
1181
1218
|
});
|
|
1182
1219
|
return {
|
|
1183
|
-
title:
|
|
1220
|
+
title: __20("Site Settings", "elementor"),
|
|
1184
1221
|
icon: AdjustmentsHorizontalIcon,
|
|
1185
1222
|
onClick: () => {
|
|
1186
1223
|
const extendedWindow = window;
|
|
1187
|
-
const config = extendedWindow?.
|
|
1224
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1188
1225
|
if (config) {
|
|
1189
|
-
extendedWindow.
|
|
1226
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.siteSettings, {
|
|
1190
1227
|
location: config.locations.topBar,
|
|
1191
1228
|
secondaryLocation: config.secondaryLocations.siteSettings,
|
|
1192
1229
|
trigger: config.triggers.toggleClick,
|
|
@@ -1205,7 +1242,7 @@ function useActionProps6() {
|
|
|
1205
1242
|
}
|
|
1206
1243
|
|
|
1207
1244
|
// src/extensions/site-settings/index.ts
|
|
1208
|
-
function
|
|
1245
|
+
function init11() {
|
|
1209
1246
|
injectIntoTop({
|
|
1210
1247
|
id: "site-settings-primary-action-portal",
|
|
1211
1248
|
component: PortalledPrimaryAction
|
|
@@ -1223,17 +1260,17 @@ import {
|
|
|
1223
1260
|
__privateUseRouteStatus as useRouteStatus5
|
|
1224
1261
|
} from "@elementor/editor-v1-adapters";
|
|
1225
1262
|
import { StructureIcon } from "@elementor/icons";
|
|
1226
|
-
import { __ as
|
|
1263
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1227
1264
|
function useActionProps7() {
|
|
1228
1265
|
const { isActive, isBlocked } = useRouteStatus5("navigator");
|
|
1229
1266
|
return {
|
|
1230
|
-
title:
|
|
1267
|
+
title: __21("Structure", "elementor"),
|
|
1231
1268
|
icon: StructureIcon,
|
|
1232
1269
|
onClick: () => {
|
|
1233
1270
|
const extendedWindow = window;
|
|
1234
|
-
const config = extendedWindow?.
|
|
1271
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1235
1272
|
if (config) {
|
|
1236
|
-
extendedWindow.
|
|
1273
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.structure, {
|
|
1237
1274
|
location: config.locations.topBar,
|
|
1238
1275
|
secondaryLocation: config.secondaryLocations.structure,
|
|
1239
1276
|
trigger: config.triggers.toggleClick,
|
|
@@ -1248,7 +1285,7 @@ function useActionProps7() {
|
|
|
1248
1285
|
}
|
|
1249
1286
|
|
|
1250
1287
|
// src/extensions/structure/index.ts
|
|
1251
|
-
function
|
|
1288
|
+
function init12() {
|
|
1252
1289
|
toolsMenu.registerToggleAction({
|
|
1253
1290
|
id: "toggle-structure-view",
|
|
1254
1291
|
priority: 3,
|
|
@@ -1259,16 +1296,16 @@ function init11() {
|
|
|
1259
1296
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1260
1297
|
import { __privateRunCommand as runCommand7 } from "@elementor/editor-v1-adapters";
|
|
1261
1298
|
import { ThemeBuilderIcon } from "@elementor/icons";
|
|
1262
|
-
import { __ as
|
|
1299
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
1263
1300
|
function useActionProps8() {
|
|
1264
1301
|
return {
|
|
1265
1302
|
icon: ThemeBuilderIcon,
|
|
1266
|
-
title:
|
|
1303
|
+
title: __22("Theme Builder", "elementor"),
|
|
1267
1304
|
onClick: () => {
|
|
1268
1305
|
const extendedWindow = window;
|
|
1269
|
-
const config = extendedWindow?.
|
|
1306
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1270
1307
|
if (config) {
|
|
1271
|
-
extendedWindow.
|
|
1308
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.themeBuilder, {
|
|
1272
1309
|
location: config.locations.topBar,
|
|
1273
1310
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
1274
1311
|
trigger: config.triggers.click,
|
|
@@ -1281,7 +1318,7 @@ function useActionProps8() {
|
|
|
1281
1318
|
}
|
|
1282
1319
|
|
|
1283
1320
|
// src/extensions/theme-builder/index.ts
|
|
1284
|
-
function
|
|
1321
|
+
function init13() {
|
|
1285
1322
|
mainMenu.registerAction({
|
|
1286
1323
|
id: "open-theme-builder",
|
|
1287
1324
|
useProps: useActionProps8
|
|
@@ -1294,17 +1331,17 @@ import {
|
|
|
1294
1331
|
__privateUseRouteStatus as useRouteStatus6
|
|
1295
1332
|
} from "@elementor/editor-v1-adapters";
|
|
1296
1333
|
import { ToggleRightIcon } from "@elementor/icons";
|
|
1297
|
-
import { __ as
|
|
1334
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
1298
1335
|
function useActionProps9() {
|
|
1299
1336
|
const { isActive, isBlocked } = useRouteStatus6("panel/editor-preferences");
|
|
1300
1337
|
return {
|
|
1301
1338
|
icon: ToggleRightIcon,
|
|
1302
|
-
title:
|
|
1339
|
+
title: __23("User Preferences", "elementor"),
|
|
1303
1340
|
onClick: () => {
|
|
1304
1341
|
const extendedWindow = window;
|
|
1305
|
-
const config = extendedWindow?.
|
|
1342
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1306
1343
|
if (config) {
|
|
1307
|
-
extendedWindow.
|
|
1344
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.userPreferences, {
|
|
1308
1345
|
location: config.locations.topBar,
|
|
1309
1346
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
1310
1347
|
trigger: config.triggers.click,
|
|
@@ -1319,7 +1356,7 @@ function useActionProps9() {
|
|
|
1319
1356
|
}
|
|
1320
1357
|
|
|
1321
1358
|
// src/extensions/user-preferences/index.ts
|
|
1322
|
-
function
|
|
1359
|
+
function init14() {
|
|
1323
1360
|
mainMenu.registerToggleAction({
|
|
1324
1361
|
id: "open-user-preferences",
|
|
1325
1362
|
priority: 30,
|
|
@@ -1331,27 +1368,31 @@ function init13() {
|
|
|
1331
1368
|
// src/extensions/wordpress/index.ts
|
|
1332
1369
|
import { __useActiveDocument as useActiveDocument9 } from "@elementor/editor-documents";
|
|
1333
1370
|
import { WordpressIcon } from "@elementor/icons";
|
|
1334
|
-
import { __ as
|
|
1335
|
-
function
|
|
1371
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1372
|
+
function init15() {
|
|
1336
1373
|
mainMenu.registerLink({
|
|
1337
1374
|
id: "exit-to-wordpress",
|
|
1338
1375
|
group: "exits",
|
|
1376
|
+
priority: 20,
|
|
1339
1377
|
useProps: () => {
|
|
1340
1378
|
const document2 = useActiveDocument9();
|
|
1341
1379
|
return {
|
|
1342
|
-
title:
|
|
1380
|
+
title: __24("Exit to WordPress", "elementor"),
|
|
1343
1381
|
href: document2?.links?.platformEdit,
|
|
1344
1382
|
icon: WordpressIcon,
|
|
1345
1383
|
onClick: () => {
|
|
1346
1384
|
const extendedWindow = window;
|
|
1347
|
-
const config = extendedWindow?.
|
|
1385
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1348
1386
|
if (config) {
|
|
1349
|
-
extendedWindow.
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1387
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(
|
|
1388
|
+
config.names.topBar.exitToWordpress,
|
|
1389
|
+
{
|
|
1390
|
+
location: config.locations.topBar,
|
|
1391
|
+
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
1392
|
+
trigger: config.triggers.click,
|
|
1393
|
+
element: config.elements.link
|
|
1394
|
+
}
|
|
1395
|
+
);
|
|
1355
1396
|
}
|
|
1356
1397
|
}
|
|
1357
1398
|
};
|
|
@@ -1360,8 +1401,7 @@ function init14() {
|
|
|
1360
1401
|
}
|
|
1361
1402
|
|
|
1362
1403
|
// src/extensions/index.ts
|
|
1363
|
-
function
|
|
1364
|
-
init();
|
|
1404
|
+
function init16() {
|
|
1365
1405
|
init2();
|
|
1366
1406
|
init3();
|
|
1367
1407
|
init4();
|
|
@@ -1375,6 +1415,8 @@ function init15() {
|
|
|
1375
1415
|
init12();
|
|
1376
1416
|
init13();
|
|
1377
1417
|
init14();
|
|
1418
|
+
init15();
|
|
1419
|
+
init();
|
|
1378
1420
|
}
|
|
1379
1421
|
|
|
1380
1422
|
// src/sync/redirect-old-menus.ts
|
|
@@ -1390,9 +1432,9 @@ function redirectOldMenus() {
|
|
|
1390
1432
|
}
|
|
1391
1433
|
|
|
1392
1434
|
// src/init.ts
|
|
1393
|
-
function
|
|
1435
|
+
function init17() {
|
|
1394
1436
|
redirectOldMenus();
|
|
1395
|
-
|
|
1437
|
+
init16();
|
|
1396
1438
|
injectIntoTop2({
|
|
1397
1439
|
id: "app-bar",
|
|
1398
1440
|
component: AppBar
|
|
@@ -1400,7 +1442,7 @@ function init16() {
|
|
|
1400
1442
|
}
|
|
1401
1443
|
export {
|
|
1402
1444
|
documentOptionsMenu,
|
|
1403
|
-
|
|
1445
|
+
init17 as init,
|
|
1404
1446
|
injectIntoPageIndication,
|
|
1405
1447
|
injectIntoPrimaryAction,
|
|
1406
1448
|
injectIntoResponsive,
|