@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.
Files changed (29) hide show
  1. package/CHANGELOG.md +0 -7
  2. package/dist/index.d.mts +2 -1
  3. package/dist/index.d.ts +2 -1
  4. package/dist/index.js +196 -154
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +154 -112
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +10 -10
  9. package/src/components/actions/link.tsx +3 -2
  10. package/src/components/locations/main-menu-location.tsx +2 -2
  11. package/src/components/ui/popover-menu-item.tsx +3 -1
  12. package/src/extensions/connect/hooks/use-connect-link-config.tsx +23 -0
  13. package/src/extensions/connect/index.ts +11 -0
  14. package/src/extensions/documents-indicator/components/settings-button.tsx +10 -7
  15. package/src/extensions/documents-preview/hooks/use-action-props.ts +2 -2
  16. package/src/extensions/documents-save/components/primary-action.tsx +10 -7
  17. package/src/extensions/elements/hooks/use-action-props.ts +2 -2
  18. package/src/extensions/finder/hooks/use-action-props.ts +2 -2
  19. package/src/extensions/help/index.ts +3 -2
  20. package/src/extensions/history/hooks/use-action-props.ts +2 -2
  21. package/src/extensions/index.ts +2 -0
  22. package/src/extensions/keyboard-shortcuts/hooks/use-action-props.ts +2 -2
  23. package/src/extensions/responsive/components/breakpoints-switcher.tsx +2 -2
  24. package/src/extensions/site-settings/hooks/use-action-props.ts +2 -2
  25. package/src/extensions/structure/hooks/use-action-props.ts +2 -2
  26. package/src/extensions/theme-builder/hooks/use-action-props.ts +2 -2
  27. package/src/extensions/user-preferences/hooks/use-action-props.ts +2 -2
  28. package/src/extensions/wordpress/index.ts +11 -7
  29. package/src/types.ts +13 -2
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: () => init16,
34
+ init: () => init17,
35
35
  injectIntoPageIndication: () => injectIntoPageIndication,
36
36
  injectIntoPrimaryAction: () => injectIntoPrimaryAction,
37
37
  injectIntoResponsive: () => injectIntoResponsive,
@@ -76,9 +76,10 @@ function PopoverMenuItem({
76
76
  target,
77
77
  disabled,
78
78
  isGroupParent,
79
+ showExternalLinkIcon,
79
80
  ...props
80
81
  }) {
81
- const isExternalLink = href && target === "_blank";
82
+ const isExternalLink = href && target === "_blank" && showExternalLinkIcon;
82
83
  return /* @__PURE__ */ React2.createElement(
83
84
  import_ui.MenuItem,
84
85
  {
@@ -152,12 +153,12 @@ function Action({ icon: Icon, title, visible = true, ...props }) {
152
153
 
153
154
  // src/components/actions/link.tsx
154
155
  var React5 = __toESM(require("react"));
155
- function Link({ icon: Icon, title, visible = true, ...props }) {
156
+ function Link({ icon: Icon, title, visible = true, showExternalLinkIcon = false, ...props }) {
156
157
  const { type } = useMenuContext();
157
158
  if (!visible) {
158
159
  return null;
159
160
  }
160
- 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) });
161
+ 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 });
161
162
  }
162
163
 
163
164
  // src/components/actions/toggle-action.tsx
@@ -339,9 +340,9 @@ function MainMenuLocation() {
339
340
  const toolbarLogoProps = (0, import_ui6.bindTrigger)(popupState);
340
341
  const onToolbarClick = (e) => {
341
342
  const extendedWindow = window;
342
- const config = extendedWindow?.elementor?.editorEvents?.config;
343
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
343
344
  if (config) {
344
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.elementorLogoDropdown, {
345
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.elementorLogoDropdown, {
345
346
  location: config.locations.topBar,
346
347
  secondaryLocation: config.secondaryLocations.elementorLogo,
347
348
  trigger: config.triggers.dropdownClick,
@@ -451,13 +452,42 @@ function AppBar() {
451
452
  return /* @__PURE__ */ React19.createElement(import_ui11.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React19.createElement(import_ui11.AppBar, { position: "sticky" }, /* @__PURE__ */ React19.createElement(import_ui11.Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React19.createElement(import_ui11.Box, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React19.createElement(import_ui11.Grid, { container: true, flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React19.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React19.createElement(import_ui11.Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React19.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React19.createElement(import_ui11.Divider, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(PageIndicationLocation, null), /* @__PURE__ */ React19.createElement(import_ui11.Divider, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(ResponsiveLocation, null), /* @__PURE__ */ React19.createElement(import_ui11.Divider, { orientation: "vertical" }))), /* @__PURE__ */ React19.createElement(import_ui11.Grid, { container: true, justifyContent: "flex-end", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React19.createElement(PrimaryActionLocation, null))))));
452
453
  }
453
454
 
455
+ // src/extensions/connect/hooks/use-connect-link-config.tsx
456
+ var import_icons4 = require("@elementor/icons");
457
+ var import_i18n4 = require("@wordpress/i18n");
458
+ function useConnectLinkConfig() {
459
+ const extendedWindow = window;
460
+ const isUserConnected = extendedWindow?.elementorCommon?.config.library_connect.is_connected ?? false;
461
+ return isUserConnected ? {
462
+ title: (0, import_i18n4.__)("My Elementor", "elementor"),
463
+ href: extendedWindow?.elementorCommon?.config.user.top_bar.my_elementor_url,
464
+ icon: import_icons4.UserIcon,
465
+ target: "_blank"
466
+ } : {
467
+ title: (0, import_i18n4.__)("Connect my account", "elementor"),
468
+ href: extendedWindow?.elementorCommon?.config.user.top_bar.connect_url,
469
+ icon: import_icons4.UserIcon,
470
+ target: "_blank"
471
+ };
472
+ }
473
+
474
+ // src/extensions/connect/index.ts
475
+ function init() {
476
+ mainMenu.registerLink({
477
+ id: "app-bar-connect",
478
+ group: "exits",
479
+ priority: 10,
480
+ useProps: useConnectLinkConfig
481
+ });
482
+ }
483
+
454
484
  // src/extensions/documents-indicator/components/settings-button.tsx
455
485
  var React20 = __toESM(require("react"));
456
486
  var import_editor_documents2 = require("@elementor/editor-documents");
457
487
  var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
458
- var import_icons4 = require("@elementor/icons");
488
+ var import_icons5 = require("@elementor/icons");
459
489
  var import_ui12 = require("@elementor/ui");
460
- var import_i18n4 = require("@wordpress/i18n");
490
+ var import_i18n5 = require("@wordpress/i18n");
461
491
  function SettingsButton() {
462
492
  const activeDocument = (0, import_editor_documents2.__useActiveDocument)();
463
493
  const hostDocument = (0, import_editor_documents2.__useHostDocument)();
@@ -466,7 +496,7 @@ function SettingsButton() {
466
496
  if (!document2) {
467
497
  return null;
468
498
  }
469
- const title = (0, import_i18n4.__)("%s Settings", "elementor").replace("%s", document2.type.label);
499
+ const title = (0, import_i18n5.__)("%s Settings", "elementor").replace("%s", document2.type.label);
470
500
  return /* @__PURE__ */ React20.createElement(Tooltip3, { title }, /* @__PURE__ */ React20.createElement(import_ui12.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React20.createElement(
471
501
  import_ui12.ToggleButton,
472
502
  {
@@ -475,14 +505,17 @@ function SettingsButton() {
475
505
  disabled: isBlocked,
476
506
  onChange: () => {
477
507
  const extendedWindow = window;
478
- const config = extendedWindow?.elementor?.editorEvents?.config;
508
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
479
509
  if (config) {
480
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.documentSettings, {
481
- location: config.locations.topBar,
482
- secondaryLocation: config.secondaryLocations["document-settings"],
483
- trigger: config.triggers.click,
484
- element: config.elements.buttonIcon
485
- });
510
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(
511
+ config.names.topBar.documentSettings,
512
+ {
513
+ location: config.locations.topBar,
514
+ secondaryLocation: config.secondaryLocations["document-settings"],
515
+ trigger: config.triggers.click,
516
+ element: config.elements.buttonIcon
517
+ }
518
+ );
486
519
  }
487
520
  (0, import_editor_v1_adapters.__privateOpenRoute)("panel/page-settings/settings");
488
521
  },
@@ -497,7 +530,7 @@ function SettingsButton() {
497
530
  }
498
531
  }
499
532
  },
500
- /* @__PURE__ */ React20.createElement(import_icons4.SettingsIcon, { fontSize: "small" })
533
+ /* @__PURE__ */ React20.createElement(import_icons5.SettingsIcon, { fontSize: "small" })
501
534
  )));
502
535
  }
503
536
  function Tooltip3(props) {
@@ -517,7 +550,7 @@ function Tooltip3(props) {
517
550
  }
518
551
 
519
552
  // src/extensions/documents-indicator/index.ts
520
- function init() {
553
+ function init2() {
521
554
  injectIntoPageIndication({
522
555
  id: "document-settings-button",
523
556
  component: SettingsButton,
@@ -531,18 +564,18 @@ function init() {
531
564
  // src/extensions/documents-preview/hooks/use-action-props.ts
532
565
  var import_editor_documents3 = require("@elementor/editor-documents");
533
566
  var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
534
- var import_icons5 = require("@elementor/icons");
535
- var import_i18n5 = require("@wordpress/i18n");
567
+ var import_icons6 = require("@elementor/icons");
568
+ var import_i18n6 = require("@wordpress/i18n");
536
569
  function useActionProps() {
537
570
  const document2 = (0, import_editor_documents3.__useActiveDocument)();
538
571
  return {
539
- icon: import_icons5.EyeIcon,
540
- title: (0, import_i18n5.__)("Preview Changes", "elementor"),
572
+ icon: import_icons6.EyeIcon,
573
+ title: (0, import_i18n6.__)("Preview Changes", "elementor"),
541
574
  onClick: () => {
542
575
  const extendedWindow = window;
543
- const config = extendedWindow?.elementor?.editorEvents?.config;
576
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
544
577
  if (config) {
545
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.previewPage, {
578
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.previewPage, {
546
579
  location: config.locations.topBar,
547
580
  secondaryLocation: config.secondaryLocations["preview-page"],
548
581
  trigger: config.triggers.click,
@@ -560,7 +593,7 @@ function useActionProps() {
560
593
  }
561
594
 
562
595
  // src/extensions/documents-preview/index.ts
563
- function init2() {
596
+ function init3() {
564
597
  utilitiesMenu.registerAction({
565
598
  id: "document-preview-button",
566
599
  priority: 30,
@@ -573,9 +606,9 @@ function init2() {
573
606
  var React22 = __toESM(require("react"));
574
607
  var import_editor_documents4 = require("@elementor/editor-documents");
575
608
  var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
576
- var import_icons6 = require("@elementor/icons");
609
+ var import_icons7 = require("@elementor/icons");
577
610
  var import_ui14 = require("@elementor/ui");
578
- var import_i18n6 = require("@wordpress/i18n");
611
+ var import_i18n7 = require("@wordpress/i18n");
579
612
 
580
613
  // src/extensions/documents-save/components/primary-action-menu.tsx
581
614
  var React21 = __toESM(require("react"));
@@ -644,14 +677,17 @@ function PrimaryAction() {
644
677
  {
645
678
  onClick: () => {
646
679
  const extendedWindow = window;
647
- const config = extendedWindow?.elementor?.editorEvents?.config;
680
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
648
681
  if (config) {
649
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.publishButton, {
650
- location: config.locations.topBar,
651
- secondaryLocation: config.secondaryLocations["publish-button"],
652
- trigger: config.triggers.click,
653
- element: config.elements.mainCta
654
- });
682
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(
683
+ config.names.topBar.publishButton,
684
+ {
685
+ location: config.locations.topBar,
686
+ secondaryLocation: config.secondaryLocations["publish-button"],
687
+ trigger: config.triggers.click,
688
+ element: config.elements.mainCta
689
+ }
690
+ );
655
691
  }
656
692
  if (!document2.isSaving) {
657
693
  save();
@@ -671,7 +707,7 @@ function PrimaryAction() {
671
707
  ), /* @__PURE__ */ React22.createElement(
672
708
  import_ui14.Tooltip,
673
709
  {
674
- title: (0, import_i18n6.__)("Save Options", "elementor"),
710
+ title: (0, import_i18n7.__)("Save Options", "elementor"),
675
711
  PopperProps: {
676
712
  sx: {
677
713
  "&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
@@ -688,14 +724,14 @@ function PrimaryAction() {
688
724
  ...(0, import_ui14.bindTrigger)(popupState),
689
725
  sx: { px: 0, height: "100%", borderRadius: 0 },
690
726
  disabled: isSaveOptionsDisabled,
691
- "aria-label": (0, import_i18n6.__)("Save Options", "elementor")
727
+ "aria-label": (0, import_i18n7.__)("Save Options", "elementor")
692
728
  },
693
- /* @__PURE__ */ React22.createElement(import_icons6.ChevronDownIcon, null)
729
+ /* @__PURE__ */ React22.createElement(import_icons7.ChevronDownIcon, null)
694
730
  ))
695
731
  )), /* @__PURE__ */ React22.createElement(PrimaryActionMenu, { ...(0, import_ui14.bindMenu)(popupState), onClick: popupState.close }));
696
732
  }
697
733
  function getLabel(document2) {
698
- return document2.userCan.publish ? (0, import_i18n6.__)("Publish", "elementor") : (0, import_i18n6.__)("Submit", "elementor");
734
+ return document2.userCan.publish ? (0, import_i18n7.__)("Publish", "elementor") : (0, import_i18n7.__)("Submit", "elementor");
699
735
  }
700
736
  function isPublishEnabled(document2) {
701
737
  if (document2.type.value === "kit") {
@@ -706,14 +742,14 @@ function isPublishEnabled(document2) {
706
742
 
707
743
  // src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
708
744
  var import_editor_documents5 = require("@elementor/editor-documents");
709
- var import_icons7 = require("@elementor/icons");
710
- var import_i18n7 = require("@wordpress/i18n");
745
+ var import_icons8 = require("@elementor/icons");
746
+ var import_i18n8 = require("@wordpress/i18n");
711
747
  function useDocumentCopyAndShareProps() {
712
748
  const document2 = (0, import_editor_documents5.__useActiveDocument)();
713
749
  const { copyAndShare } = (0, import_editor_documents5.__useActiveDocumentActions)();
714
750
  return {
715
- icon: import_icons7.LinkIcon,
716
- title: (0, import_i18n7.__)("Copy and Share", "elementor"),
751
+ icon: import_icons8.LinkIcon,
752
+ title: (0, import_i18n8.__)("Copy and Share", "elementor"),
717
753
  onClick: copyAndShare,
718
754
  disabled: !document2 || document2.isSaving || document2.isSavingDraft || !("publish" === document2.status.value),
719
755
  visible: document2?.permissions?.showCopyAndShare
@@ -722,14 +758,14 @@ function useDocumentCopyAndShareProps() {
722
758
 
723
759
  // src/extensions/documents-save/hooks/use-document-save-draft-props.ts
724
760
  var import_editor_documents6 = require("@elementor/editor-documents");
725
- var import_icons8 = require("@elementor/icons");
726
- var import_i18n8 = require("@wordpress/i18n");
761
+ var import_icons9 = require("@elementor/icons");
762
+ var import_i18n9 = require("@wordpress/i18n");
727
763
  function useDocumentSaveDraftProps() {
728
764
  const document2 = (0, import_editor_documents6.__useActiveDocument)();
729
765
  const { saveDraft } = (0, import_editor_documents6.__useActiveDocumentActions)();
730
766
  return {
731
- icon: import_icons8.FileReportIcon,
732
- title: (0, import_i18n8.__)("Save Draft", "elementor"),
767
+ icon: import_icons9.FileReportIcon,
768
+ title: (0, import_i18n9.__)("Save Draft", "elementor"),
733
769
  onClick: saveDraft,
734
770
  disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
735
771
  };
@@ -737,13 +773,13 @@ function useDocumentSaveDraftProps() {
737
773
 
738
774
  // src/extensions/documents-save/hooks/use-document-save-template-props.ts
739
775
  var import_editor_documents7 = require("@elementor/editor-documents");
740
- var import_icons9 = require("@elementor/icons");
741
- var import_i18n9 = require("@wordpress/i18n");
776
+ var import_icons10 = require("@elementor/icons");
777
+ var import_i18n10 = require("@wordpress/i18n");
742
778
  function useDocumentSaveTemplateProps() {
743
779
  const { saveTemplate } = (0, import_editor_documents7.__useActiveDocumentActions)();
744
780
  return {
745
- icon: import_icons9.FolderIcon,
746
- title: (0, import_i18n9.__)("Save as Template", "elementor"),
781
+ icon: import_icons10.FolderIcon,
782
+ title: (0, import_i18n10.__)("Save as Template", "elementor"),
747
783
  onClick: saveTemplate
748
784
  };
749
785
  }
@@ -751,13 +787,13 @@ function useDocumentSaveTemplateProps() {
751
787
  // src/extensions/documents-save/hooks/use-document-view-page-props.ts
752
788
  var import_editor_documents8 = require("@elementor/editor-documents");
753
789
  var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
754
- var import_icons10 = require("@elementor/icons");
755
- var import_i18n10 = require("@wordpress/i18n");
790
+ var import_icons11 = require("@elementor/icons");
791
+ var import_i18n11 = require("@wordpress/i18n");
756
792
  function useDocumentViewPageProps() {
757
793
  const document2 = (0, import_editor_documents8.__useActiveDocument)();
758
794
  return {
759
- icon: import_icons10.EyeIcon,
760
- title: (0, import_i18n10.__)("View Page", "elementor"),
795
+ icon: import_icons11.EyeIcon,
796
+ title: (0, import_i18n11.__)("View Page", "elementor"),
761
797
  onClick: () => document2?.id && (0, import_editor_v1_adapters4.__privateRunCommand)("editor/documents/view", {
762
798
  id: document2.id
763
799
  })
@@ -765,7 +801,7 @@ function useDocumentViewPageProps() {
765
801
  }
766
802
 
767
803
  // src/extensions/documents-save/index.ts
768
- function init3() {
804
+ function init4() {
769
805
  injectIntoPrimaryAction({
770
806
  id: "document-primary-action",
771
807
  component: PrimaryAction
@@ -796,18 +832,18 @@ function init3() {
796
832
 
797
833
  // src/extensions/elements/hooks/use-action-props.ts
798
834
  var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
799
- var import_icons11 = require("@elementor/icons");
800
- var import_i18n11 = require("@wordpress/i18n");
835
+ var import_icons12 = require("@elementor/icons");
836
+ var import_i18n12 = require("@wordpress/i18n");
801
837
  function useActionProps2() {
802
838
  const { isActive, isBlocked } = (0, import_editor_v1_adapters5.__privateUseRouteStatus)("panel/elements");
803
839
  return {
804
- title: (0, import_i18n11.__)("Add Element", "elementor"),
805
- icon: import_icons11.PlusIcon,
840
+ title: (0, import_i18n12.__)("Add Element", "elementor"),
841
+ icon: import_icons12.PlusIcon,
806
842
  onClick: () => {
807
843
  const extendedWindow = window;
808
- const config = extendedWindow?.elementor?.editorEvents?.config;
844
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
809
845
  if (config) {
810
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.widgetPanel, {
846
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.widgetPanel, {
811
847
  location: config.locations.topBar,
812
848
  secondaryLocation: config.secondaryLocations["widget-panel"],
813
849
  trigger: config.triggers.toggleClick,
@@ -823,10 +859,10 @@ function useActionProps2() {
823
859
 
824
860
  // src/extensions/elements/sync/sync-panel-title.ts
825
861
  var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
826
- var import_i18n12 = require("@wordpress/i18n");
862
+ var import_i18n13 = require("@wordpress/i18n");
827
863
  function syncPanelTitle() {
828
- const panelTitle = (0, import_i18n12.__)("Elements", "elementor");
829
- const tabTitle = (0, import_i18n12.__)("Widgets", "elementor");
864
+ const panelTitle = (0, import_i18n13.__)("Elements", "elementor");
865
+ const tabTitle = (0, import_i18n13.__)("Widgets", "elementor");
830
866
  (0, import_editor_v1_adapters6.__privateListenTo)((0, import_editor_v1_adapters6.routeOpenEvent)("panel/elements"), () => {
831
867
  setPanelTitle(panelTitle);
832
868
  setTabTitle(tabTitle);
@@ -849,7 +885,7 @@ function setTabTitle(title) {
849
885
  }
850
886
 
851
887
  // src/extensions/elements/index.ts
852
- function init4() {
888
+ function init5() {
853
889
  syncPanelTitle();
854
890
  toolsMenu.registerToggleAction({
855
891
  id: "open-elements-panel",
@@ -860,17 +896,17 @@ function init4() {
860
896
 
861
897
  // src/extensions/finder/hooks/use-action-props.ts
862
898
  var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
863
- var import_icons12 = require("@elementor/icons");
864
- var import_i18n13 = require("@wordpress/i18n");
899
+ var import_icons13 = require("@elementor/icons");
900
+ var import_i18n14 = require("@wordpress/i18n");
865
901
  function useActionProps3() {
866
902
  return {
867
- title: (0, import_i18n13.__)("Finder", "elementor"),
868
- icon: import_icons12.SearchIcon,
903
+ title: (0, import_i18n14.__)("Finder", "elementor"),
904
+ icon: import_icons13.SearchIcon,
869
905
  onClick: () => {
870
906
  const extendedWindow = window;
871
- const config = extendedWindow?.elementor?.editorEvents?.config;
907
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
872
908
  if (config) {
873
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.finder, {
909
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.finder, {
874
910
  location: config.locations.topBar,
875
911
  secondaryLocation: config.secondaryLocations.finder,
876
912
  trigger: config.triggers.toggleClick,
@@ -883,7 +919,7 @@ function useActionProps3() {
883
919
  }
884
920
 
885
921
  // src/extensions/finder/index.ts
886
- function init5() {
922
+ function init6() {
887
923
  utilitiesMenu.registerAction({
888
924
  id: "toggle-finder",
889
925
  priority: 15,
@@ -893,24 +929,25 @@ function init5() {
893
929
  }
894
930
 
895
931
  // src/extensions/help/index.ts
896
- var import_icons13 = require("@elementor/icons");
897
- var import_i18n14 = require("@wordpress/i18n");
898
- function init6() {
932
+ var import_icons14 = require("@elementor/icons");
933
+ var import_i18n15 = require("@wordpress/i18n");
934
+ function init7() {
899
935
  utilitiesMenu.registerLink({
900
936
  id: "open-help-center",
901
937
  priority: 25,
902
938
  // After Finder.
903
939
  useProps: () => {
904
940
  return {
905
- title: (0, import_i18n14.__)("Help", "elementor"),
941
+ title: (0, import_i18n15.__)("Help", "elementor"),
906
942
  href: "https://go.elementor.com/editor-top-bar-learn/",
907
- icon: import_icons13.HelpIcon,
943
+ icon: import_icons14.HelpIcon,
908
944
  target: "_blank",
945
+ showExternalLinkIcon: true,
909
946
  onClick: () => {
910
947
  const extendedWindow = window;
911
- const config = extendedWindow?.elementor?.editorEvents?.config;
948
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
912
949
  if (config) {
913
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.help, {
950
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.help, {
914
951
  location: config.locations.topBar,
915
952
  secondaryLocation: config.secondaryLocations.help,
916
953
  trigger: config.triggers.click,
@@ -925,18 +962,18 @@ function init6() {
925
962
 
926
963
  // src/extensions/history/hooks/use-action-props.ts
927
964
  var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
928
- var import_icons14 = require("@elementor/icons");
929
- var import_i18n15 = require("@wordpress/i18n");
965
+ var import_icons15 = require("@elementor/icons");
966
+ var import_i18n16 = require("@wordpress/i18n");
930
967
  function useActionProps4() {
931
968
  const { isActive, isBlocked } = (0, import_editor_v1_adapters8.__privateUseRouteStatus)("panel/history");
932
969
  return {
933
- title: (0, import_i18n15.__)("History", "elementor"),
934
- icon: import_icons14.HistoryIcon,
970
+ title: (0, import_i18n16.__)("History", "elementor"),
971
+ icon: import_icons15.HistoryIcon,
935
972
  onClick: () => {
936
973
  const extendedWindow = window;
937
- const config = extendedWindow?.elementor?.editorEvents?.config;
974
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
938
975
  if (config) {
939
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.history, {
976
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.history, {
940
977
  location: config.locations.topBar,
941
978
  secondaryLocation: config.secondaryLocations.elementorLogo,
942
979
  trigger: config.triggers.click,
@@ -951,7 +988,7 @@ function useActionProps4() {
951
988
  }
952
989
 
953
990
  // src/extensions/history/index.ts
954
- function init7() {
991
+ function init8() {
955
992
  mainMenu.registerToggleAction({
956
993
  id: "open-history",
957
994
  priority: 20,
@@ -961,17 +998,17 @@ function init7() {
961
998
 
962
999
  // src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
963
1000
  var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
964
- var import_icons15 = require("@elementor/icons");
965
- var import_i18n16 = require("@wordpress/i18n");
1001
+ var import_icons16 = require("@elementor/icons");
1002
+ var import_i18n17 = require("@wordpress/i18n");
966
1003
  function useActionProps5() {
967
1004
  return {
968
- icon: import_icons15.KeyboardIcon,
969
- title: (0, import_i18n16.__)("Keyboard Shortcuts", "elementor"),
1005
+ icon: import_icons16.KeyboardIcon,
1006
+ title: (0, import_i18n17.__)("Keyboard Shortcuts", "elementor"),
970
1007
  onClick: () => {
971
1008
  const extendedWindow = window;
972
- const config = extendedWindow?.elementor?.editorEvents?.config;
1009
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
973
1010
  if (config) {
974
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.keyboardShortcuts, {
1011
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.keyboardShortcuts, {
975
1012
  location: config.locations.topBar,
976
1013
  secondaryLocation: config.secondaryLocations.elementorLogo,
977
1014
  trigger: config.triggers.click,
@@ -984,7 +1021,7 @@ function useActionProps5() {
984
1021
  }
985
1022
 
986
1023
  // src/extensions/keyboard-shortcuts/index.ts
987
- function init8() {
1024
+ function init9() {
988
1025
  mainMenu.registerAction({
989
1026
  id: "open-keyboard-shortcuts",
990
1027
  group: "default",
@@ -997,9 +1034,9 @@ function init8() {
997
1034
  // src/extensions/responsive/components/breakpoints-switcher.tsx
998
1035
  var React23 = __toESM(require("react"));
999
1036
  var import_editor_responsive = require("@elementor/editor-responsive");
1000
- var import_icons16 = require("@elementor/icons");
1037
+ var import_icons17 = require("@elementor/icons");
1001
1038
  var import_ui15 = require("@elementor/ui");
1002
- var import_i18n17 = require("@wordpress/i18n");
1039
+ var import_i18n18 = require("@wordpress/i18n");
1003
1040
  function BreakpointsSwitcher() {
1004
1041
  const breakpoints = (0, import_editor_responsive.useBreakpoints)();
1005
1042
  const activeBreakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
@@ -1009,9 +1046,9 @@ function BreakpointsSwitcher() {
1009
1046
  }
1010
1047
  const onChange = (_, value) => {
1011
1048
  const extendedWindow = window;
1012
- const config = extendedWindow?.elementor?.editorEvents?.config;
1049
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1013
1050
  if (config) {
1014
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.responsiveControls, {
1051
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.responsiveControls, {
1015
1052
  location: config.locations.topBar,
1016
1053
  secondaryLocation: config.secondaryLocations.responsiveControls,
1017
1054
  trigger: config.triggers.click,
@@ -1028,7 +1065,7 @@ function BreakpointsSwitcher() {
1028
1065
  indicatorColor: "secondary",
1029
1066
  value: activeBreakpoint,
1030
1067
  onChange,
1031
- "aria-label": (0, import_i18n17.__)("Switch Device", "elementor"),
1068
+ "aria-label": (0, import_i18n18.__)("Switch Device", "elementor"),
1032
1069
  sx: {
1033
1070
  "& .MuiTabs-indicator": {
1034
1071
  backgroundColor: "text.primary"
@@ -1068,24 +1105,24 @@ function Tooltip5(props) {
1068
1105
  );
1069
1106
  }
1070
1107
  var iconsMap = {
1071
- widescreen: import_icons16.WidescreenIcon,
1072
- desktop: import_icons16.DesktopIcon,
1073
- laptop: import_icons16.LaptopIcon,
1074
- tablet_extra: import_icons16.TabletLandscapeIcon,
1075
- tablet: import_icons16.TabletPortraitIcon,
1076
- mobile_extra: import_icons16.MobileLandscapeIcon,
1077
- mobile: import_icons16.MobilePortraitIcon
1108
+ widescreen: import_icons17.WidescreenIcon,
1109
+ desktop: import_icons17.DesktopIcon,
1110
+ laptop: import_icons17.LaptopIcon,
1111
+ tablet_extra: import_icons17.TabletLandscapeIcon,
1112
+ tablet: import_icons17.TabletPortraitIcon,
1113
+ mobile_extra: import_icons17.MobileLandscapeIcon,
1114
+ mobile: import_icons17.MobilePortraitIcon
1078
1115
  };
1079
1116
  var labelsMap = {
1080
1117
  default: "%s",
1081
1118
  // translators: %s: Breakpoint label, %d: Breakpoint size.
1082
- "min-width": (0, import_i18n17.__)("%s (%dpx and up)", "elementor"),
1119
+ "min-width": (0, import_i18n18.__)("%s (%dpx and up)", "elementor"),
1083
1120
  // translators: %s: Breakpoint label, %d: Breakpoint size.
1084
- "max-width": (0, import_i18n17.__)("%s (up to %dpx)", "elementor")
1121
+ "max-width": (0, import_i18n18.__)("%s (up to %dpx)", "elementor")
1085
1122
  };
1086
1123
 
1087
1124
  // src/extensions/responsive/index.ts
1088
- function init9() {
1125
+ function init10() {
1089
1126
  injectIntoResponsive({
1090
1127
  id: "responsive-breakpoints-switcher",
1091
1128
  component: BreakpointsSwitcher,
@@ -1124,7 +1161,7 @@ function getContainerRef() {
1124
1161
  var React25 = __toESM(require("react"));
1125
1162
  var import_editor_documents9 = require("@elementor/editor-documents");
1126
1163
  var import_ui17 = require("@elementor/ui");
1127
- var import_i18n18 = require("@wordpress/i18n");
1164
+ var import_i18n19 = require("@wordpress/i18n");
1128
1165
  function PrimaryAction2() {
1129
1166
  const document2 = (0, import_editor_documents9.__useActiveDocument)();
1130
1167
  const { save } = (0, import_editor_documents9.__useActiveDocumentActions)();
@@ -1147,7 +1184,7 @@ function PrimaryAction2() {
1147
1184
  sx: { width: "100%" },
1148
1185
  onClick: () => document2 && !document2.isSaving ? save() : null
1149
1186
  },
1150
- document2?.isSaving ? /* @__PURE__ */ React25.createElement(import_ui17.CircularProgress, null) : (0, import_i18n18.__)("Save Changes", "elementor")
1187
+ document2?.isSaving ? /* @__PURE__ */ React25.createElement(import_ui17.CircularProgress, null) : (0, import_i18n19.__)("Save Changes", "elementor")
1151
1188
  )
1152
1189
  );
1153
1190
  }
@@ -1159,20 +1196,20 @@ function PortalledPrimaryAction() {
1159
1196
 
1160
1197
  // src/extensions/site-settings/hooks/use-action-props.ts
1161
1198
  var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
1162
- var import_icons17 = require("@elementor/icons");
1163
- var import_i18n19 = require("@wordpress/i18n");
1199
+ var import_icons18 = require("@elementor/icons");
1200
+ var import_i18n20 = require("@wordpress/i18n");
1164
1201
  function useActionProps6() {
1165
1202
  const { isActive, isBlocked } = (0, import_editor_v1_adapters11.__privateUseRouteStatus)("panel/global", {
1166
1203
  blockOnKitRoutes: false
1167
1204
  });
1168
1205
  return {
1169
- title: (0, import_i18n19.__)("Site Settings", "elementor"),
1170
- icon: import_icons17.AdjustmentsHorizontalIcon,
1206
+ title: (0, import_i18n20.__)("Site Settings", "elementor"),
1207
+ icon: import_icons18.AdjustmentsHorizontalIcon,
1171
1208
  onClick: () => {
1172
1209
  const extendedWindow = window;
1173
- const config = extendedWindow?.elementor?.editorEvents?.config;
1210
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1174
1211
  if (config) {
1175
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.siteSettings, {
1212
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.siteSettings, {
1176
1213
  location: config.locations.topBar,
1177
1214
  secondaryLocation: config.secondaryLocations.siteSettings,
1178
1215
  trigger: config.triggers.toggleClick,
@@ -1191,7 +1228,7 @@ function useActionProps6() {
1191
1228
  }
1192
1229
 
1193
1230
  // src/extensions/site-settings/index.ts
1194
- function init10() {
1231
+ function init11() {
1195
1232
  (0, import_editor.injectIntoTop)({
1196
1233
  id: "site-settings-primary-action-portal",
1197
1234
  component: PortalledPrimaryAction
@@ -1205,18 +1242,18 @@ function init10() {
1205
1242
 
1206
1243
  // src/extensions/structure/hooks/use-action-props.ts
1207
1244
  var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
1208
- var import_icons18 = require("@elementor/icons");
1209
- var import_i18n20 = require("@wordpress/i18n");
1245
+ var import_icons19 = require("@elementor/icons");
1246
+ var import_i18n21 = require("@wordpress/i18n");
1210
1247
  function useActionProps7() {
1211
1248
  const { isActive, isBlocked } = (0, import_editor_v1_adapters12.__privateUseRouteStatus)("navigator");
1212
1249
  return {
1213
- title: (0, import_i18n20.__)("Structure", "elementor"),
1214
- icon: import_icons18.StructureIcon,
1250
+ title: (0, import_i18n21.__)("Structure", "elementor"),
1251
+ icon: import_icons19.StructureIcon,
1215
1252
  onClick: () => {
1216
1253
  const extendedWindow = window;
1217
- const config = extendedWindow?.elementor?.editorEvents?.config;
1254
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1218
1255
  if (config) {
1219
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.structure, {
1256
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.structure, {
1220
1257
  location: config.locations.topBar,
1221
1258
  secondaryLocation: config.secondaryLocations.structure,
1222
1259
  trigger: config.triggers.toggleClick,
@@ -1231,7 +1268,7 @@ function useActionProps7() {
1231
1268
  }
1232
1269
 
1233
1270
  // src/extensions/structure/index.ts
1234
- function init11() {
1271
+ function init12() {
1235
1272
  toolsMenu.registerToggleAction({
1236
1273
  id: "toggle-structure-view",
1237
1274
  priority: 3,
@@ -1241,17 +1278,17 @@ function init11() {
1241
1278
 
1242
1279
  // src/extensions/theme-builder/hooks/use-action-props.ts
1243
1280
  var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
1244
- var import_icons19 = require("@elementor/icons");
1245
- var import_i18n21 = require("@wordpress/i18n");
1281
+ var import_icons20 = require("@elementor/icons");
1282
+ var import_i18n22 = require("@wordpress/i18n");
1246
1283
  function useActionProps8() {
1247
1284
  return {
1248
- icon: import_icons19.ThemeBuilderIcon,
1249
- title: (0, import_i18n21.__)("Theme Builder", "elementor"),
1285
+ icon: import_icons20.ThemeBuilderIcon,
1286
+ title: (0, import_i18n22.__)("Theme Builder", "elementor"),
1250
1287
  onClick: () => {
1251
1288
  const extendedWindow = window;
1252
- const config = extendedWindow?.elementor?.editorEvents?.config;
1289
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1253
1290
  if (config) {
1254
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.themeBuilder, {
1291
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.themeBuilder, {
1255
1292
  location: config.locations.topBar,
1256
1293
  secondaryLocation: config.secondaryLocations.elementorLogo,
1257
1294
  trigger: config.triggers.click,
@@ -1264,7 +1301,7 @@ function useActionProps8() {
1264
1301
  }
1265
1302
 
1266
1303
  // src/extensions/theme-builder/index.ts
1267
- function init12() {
1304
+ function init13() {
1268
1305
  mainMenu.registerAction({
1269
1306
  id: "open-theme-builder",
1270
1307
  useProps: useActionProps8
@@ -1273,18 +1310,18 @@ function init12() {
1273
1310
 
1274
1311
  // src/extensions/user-preferences/hooks/use-action-props.ts
1275
1312
  var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
1276
- var import_icons20 = require("@elementor/icons");
1277
- var import_i18n22 = require("@wordpress/i18n");
1313
+ var import_icons21 = require("@elementor/icons");
1314
+ var import_i18n23 = require("@wordpress/i18n");
1278
1315
  function useActionProps9() {
1279
1316
  const { isActive, isBlocked } = (0, import_editor_v1_adapters14.__privateUseRouteStatus)("panel/editor-preferences");
1280
1317
  return {
1281
- icon: import_icons20.ToggleRightIcon,
1282
- title: (0, import_i18n22.__)("User Preferences", "elementor"),
1318
+ icon: import_icons21.ToggleRightIcon,
1319
+ title: (0, import_i18n23.__)("User Preferences", "elementor"),
1283
1320
  onClick: () => {
1284
1321
  const extendedWindow = window;
1285
- const config = extendedWindow?.elementor?.editorEvents?.config;
1322
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1286
1323
  if (config) {
1287
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.userPreferences, {
1324
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.userPreferences, {
1288
1325
  location: config.locations.topBar,
1289
1326
  secondaryLocation: config.secondaryLocations.elementorLogo,
1290
1327
  trigger: config.triggers.click,
@@ -1299,7 +1336,7 @@ function useActionProps9() {
1299
1336
  }
1300
1337
 
1301
1338
  // src/extensions/user-preferences/index.ts
1302
- function init13() {
1339
+ function init14() {
1303
1340
  mainMenu.registerToggleAction({
1304
1341
  id: "open-user-preferences",
1305
1342
  priority: 30,
@@ -1310,28 +1347,32 @@ function init13() {
1310
1347
 
1311
1348
  // src/extensions/wordpress/index.ts
1312
1349
  var import_editor_documents10 = require("@elementor/editor-documents");
1313
- var import_icons21 = require("@elementor/icons");
1314
- var import_i18n23 = require("@wordpress/i18n");
1315
- function init14() {
1350
+ var import_icons22 = require("@elementor/icons");
1351
+ var import_i18n24 = require("@wordpress/i18n");
1352
+ function init15() {
1316
1353
  mainMenu.registerLink({
1317
1354
  id: "exit-to-wordpress",
1318
1355
  group: "exits",
1356
+ priority: 20,
1319
1357
  useProps: () => {
1320
1358
  const document2 = (0, import_editor_documents10.__useActiveDocument)();
1321
1359
  return {
1322
- title: (0, import_i18n23.__)("Exit to WordPress", "elementor"),
1360
+ title: (0, import_i18n24.__)("Exit to WordPress", "elementor"),
1323
1361
  href: document2?.links?.platformEdit,
1324
- icon: import_icons21.WordpressIcon,
1362
+ icon: import_icons22.WordpressIcon,
1325
1363
  onClick: () => {
1326
1364
  const extendedWindow = window;
1327
- const config = extendedWindow?.elementor?.editorEvents?.config;
1365
+ const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1328
1366
  if (config) {
1329
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.exitToWordpress, {
1330
- location: config.locations.topBar,
1331
- secondaryLocation: config.secondaryLocations.elementorLogo,
1332
- trigger: config.triggers.click,
1333
- element: config.elements.link
1334
- });
1367
+ extendedWindow.elementorCommon.eventsManager.dispatchEvent(
1368
+ config.names.topBar.exitToWordpress,
1369
+ {
1370
+ location: config.locations.topBar,
1371
+ secondaryLocation: config.secondaryLocations.elementorLogo,
1372
+ trigger: config.triggers.click,
1373
+ element: config.elements.link
1374
+ }
1375
+ );
1335
1376
  }
1336
1377
  }
1337
1378
  };
@@ -1340,8 +1381,7 @@ function init14() {
1340
1381
  }
1341
1382
 
1342
1383
  // src/extensions/index.ts
1343
- function init15() {
1344
- init();
1384
+ function init16() {
1345
1385
  init2();
1346
1386
  init3();
1347
1387
  init4();
@@ -1355,6 +1395,8 @@ function init15() {
1355
1395
  init12();
1356
1396
  init13();
1357
1397
  init14();
1398
+ init15();
1399
+ init();
1358
1400
  }
1359
1401
 
1360
1402
  // src/sync/redirect-old-menus.ts
@@ -1366,9 +1408,9 @@ function redirectOldMenus() {
1366
1408
  }
1367
1409
 
1368
1410
  // src/init.ts
1369
- function init16() {
1411
+ function init17() {
1370
1412
  redirectOldMenus();
1371
- init15();
1413
+ init16();
1372
1414
  (0, import_editor2.injectIntoTop)({
1373
1415
  id: "app-bar",
1374
1416
  component: AppBar