@elementor/editor-app-bar 3.35.0-390 → 3.35.0-392
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 +134 -121
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +72 -59
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
- package/src/components/locations/send-feedback-popup-location.tsx +7 -1
- package/src/extensions/feedback/feedback-consts.ts +2 -0
- package/src/extensions/feedback/index.ts +6 -2
package/dist/index.js
CHANGED
|
@@ -426,32 +426,16 @@ function IntegrationsMenuLocation() {
|
|
|
426
426
|
var React17 = __toESM(require("react"));
|
|
427
427
|
var import_react3 = require("react");
|
|
428
428
|
var import_editor_ui = require("@elementor/editor-ui");
|
|
429
|
+
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
429
430
|
var import_http_client = require("@elementor/http-client");
|
|
430
|
-
var
|
|
431
|
+
var import_icons4 = require("@elementor/icons");
|
|
431
432
|
var import_mixpanel = require("@elementor/mixpanel");
|
|
432
433
|
var import_ui10 = require("@elementor/ui");
|
|
433
|
-
var import_i18n5 = require("@wordpress/i18n");
|
|
434
|
-
|
|
435
|
-
// src/extensions/feedback/index.ts
|
|
436
|
-
var import_icons4 = require("@elementor/icons");
|
|
437
434
|
var import_i18n4 = require("@wordpress/i18n");
|
|
435
|
+
|
|
436
|
+
// src/extensions/feedback/feedback-consts.ts
|
|
437
|
+
var EXPERIMENT_NAME = "in_editor_feedback";
|
|
438
438
|
var FEEDBACK_TOGGLE_EVENT = "elementor/open-feedback";
|
|
439
|
-
function init() {
|
|
440
|
-
mainMenu.registerAction({
|
|
441
|
-
id: "open-send-feedback",
|
|
442
|
-
group: "help",
|
|
443
|
-
priority: 20,
|
|
444
|
-
useProps: () => {
|
|
445
|
-
return {
|
|
446
|
-
icon: import_icons4.MessageLinesIcon,
|
|
447
|
-
title: (0, import_i18n4.__)("Send Feedback", "elementor"),
|
|
448
|
-
onClick: () => {
|
|
449
|
-
dispatchEvent(new CustomEvent(FEEDBACK_TOGGLE_EVENT));
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
439
|
|
|
456
440
|
// src/components/locations/send-feedback-popup-location.tsx
|
|
457
441
|
var checkIfUserIsConnected = () => {
|
|
@@ -459,6 +443,7 @@ var checkIfUserIsConnected = () => {
|
|
|
459
443
|
return extendedWindow2?.elementorCommon?.config.library_connect.is_connected || extendedWindow2?.elementorPro?.config.isActive;
|
|
460
444
|
};
|
|
461
445
|
function SendFeedbackPopupLocation() {
|
|
446
|
+
const isActive = (0, import_editor_v1_adapters.isExperimentActive)(EXPERIMENT_NAME);
|
|
462
447
|
const extendedWindow2 = window;
|
|
463
448
|
const [isUserConnected, setIsUserConnected] = (0, import_react3.useState)(checkIfUserIsConnected());
|
|
464
449
|
const connectUrl = extendedWindow2?.elementor?.config.user.top_bar.connect_url;
|
|
@@ -518,6 +503,9 @@ function SendFeedbackPopupLocation() {
|
|
|
518
503
|
});
|
|
519
504
|
}).finally(() => setIsFetching(false));
|
|
520
505
|
};
|
|
506
|
+
if (!isActive) {
|
|
507
|
+
return null;
|
|
508
|
+
}
|
|
521
509
|
return /* @__PURE__ */ React17.createElement(import_editor_ui.ThemeProvider, null, /* @__PURE__ */ React17.createElement(import_ui10.Popover, { ...(0, import_ui10.bindDialog)(popupState), onClose: () => handleClose() }, /* @__PURE__ */ React17.createElement(import_ui10.Dialog, { open: popupState.isOpen }, /* @__PURE__ */ React17.createElement(import_ui10.DialogHeader, { style: { width: "100%", minWidth: "35rem" } }, /* @__PURE__ */ React17.createElement(import_ui10.DialogTitle, { style: { width: "100%" } }, /* @__PURE__ */ React17.createElement(
|
|
522
510
|
import_ui10.Stack,
|
|
523
511
|
{
|
|
@@ -527,18 +515,18 @@ function SendFeedbackPopupLocation() {
|
|
|
527
515
|
justifyContent: "space-between",
|
|
528
516
|
width: "100%"
|
|
529
517
|
},
|
|
530
|
-
(0,
|
|
518
|
+
(0, import_i18n4.__)("Submit Feedback", "elementor"),
|
|
531
519
|
/* @__PURE__ */ React17.createElement(import_ui10.CloseButton, { onClick: popupState.close })
|
|
532
520
|
))), /* @__PURE__ */ React17.createElement(import_ui10.DialogContent, null, /* @__PURE__ */ React17.createElement(import_ui10.Stack, { direction: "column", gap: 2 }, isUserConnected ? /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
|
|
533
521
|
import_ui10.TextField,
|
|
534
522
|
{
|
|
535
523
|
autofocus: true,
|
|
536
|
-
placeholder: (0,
|
|
524
|
+
placeholder: (0, import_i18n4.__)(
|
|
537
525
|
"E.g. Can you add ABC features? I want to do ABC and it\u2019s important because \u2026",
|
|
538
526
|
"elementor"
|
|
539
527
|
),
|
|
540
528
|
fullwith: true,
|
|
541
|
-
label: (0,
|
|
529
|
+
label: (0, import_i18n4.__)("Your Feedback", "elementor"),
|
|
542
530
|
multiline: true,
|
|
543
531
|
id: "elementor-feedback-usercontent",
|
|
544
532
|
rows: 6,
|
|
@@ -547,7 +535,7 @@ function SendFeedbackPopupLocation() {
|
|
|
547
535
|
onChange: (event) => setFeedbackContent(event.target.value),
|
|
548
536
|
value: feedbackContent
|
|
549
537
|
}
|
|
550
|
-
), /* @__PURE__ */ React17.createElement(import_ui10.Stack, { direction: "row", justifyContent: "flex-end", alignItems: "center", gap: 2 }, feedbackResult && /* @__PURE__ */ React17.createElement(React17.Fragment, null, feedbackResult.success ? /* @__PURE__ */ React17.createElement(
|
|
538
|
+
), /* @__PURE__ */ React17.createElement(import_ui10.Stack, { direction: "row", justifyContent: "flex-end", alignItems: "center", gap: 2 }, feedbackResult && /* @__PURE__ */ React17.createElement(React17.Fragment, null, feedbackResult.success ? /* @__PURE__ */ React17.createElement(import_icons4.CheckIcon, { color: "success" }) : /* @__PURE__ */ React17.createElement(import_icons4.AlertCircleIcon, { color: "error" }), feedbackResult.message), feedbackResult?.success ? /* @__PURE__ */ React17.createElement(import_ui10.Button, { variant: "text", onClick: () => handleStartAntoher() }, (0, import_i18n4.__)("Submit Another Feedback", "elementor")) : /* @__PURE__ */ React17.createElement(
|
|
551
539
|
import_ui10.Button,
|
|
552
540
|
{
|
|
553
541
|
disabled: submitDisabled,
|
|
@@ -556,7 +544,7 @@ function SendFeedbackPopupLocation() {
|
|
|
556
544
|
color: "primary",
|
|
557
545
|
size: "small"
|
|
558
546
|
},
|
|
559
|
-
(0,
|
|
547
|
+
(0, import_i18n4.__)("Submit", "elementor")
|
|
560
548
|
))) : /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
|
|
561
549
|
import_ui10.Button,
|
|
562
550
|
{
|
|
@@ -568,7 +556,7 @@ function SendFeedbackPopupLocation() {
|
|
|
568
556
|
rel: "noopener",
|
|
569
557
|
onClick: popupState.close
|
|
570
558
|
},
|
|
571
|
-
(0,
|
|
559
|
+
(0, import_i18n4.__)("Connect to Elementor", "elementor")
|
|
572
560
|
)))))));
|
|
573
561
|
}
|
|
574
562
|
|
|
@@ -603,8 +591,8 @@ function AppBar() {
|
|
|
603
591
|
|
|
604
592
|
// src/extensions/connect/hooks/use-connect-link-config.tsx
|
|
605
593
|
var import_react5 = require("react");
|
|
606
|
-
var
|
|
607
|
-
var
|
|
594
|
+
var import_icons5 = require("@elementor/icons");
|
|
595
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
608
596
|
var dispatchConnectClickEvent = (eventName) => {
|
|
609
597
|
try {
|
|
610
598
|
const extendedWindow2 = window;
|
|
@@ -657,21 +645,21 @@ function useConnectLinkConfig() {
|
|
|
657
645
|
[extendedWindow2]
|
|
658
646
|
);
|
|
659
647
|
return isUserConnected ? {
|
|
660
|
-
title: (0,
|
|
648
|
+
title: (0, import_i18n5.__)("My Elementor", "elementor"),
|
|
661
649
|
href: extendedWindow2?.elementor?.config.user.top_bar.my_elementor_url,
|
|
662
|
-
icon:
|
|
650
|
+
icon: import_icons5.UserIcon,
|
|
663
651
|
target: "_blank"
|
|
664
652
|
} : {
|
|
665
|
-
title: (0,
|
|
653
|
+
title: (0, import_i18n5.__)("Connect my account", "elementor"),
|
|
666
654
|
href: extendedWindow2?.elementor?.config.user.top_bar.connect_url,
|
|
667
|
-
icon:
|
|
655
|
+
icon: import_icons5.UserIcon,
|
|
668
656
|
target,
|
|
669
657
|
onClick: handleConnectClick
|
|
670
658
|
};
|
|
671
659
|
}
|
|
672
660
|
|
|
673
661
|
// src/extensions/connect/index.ts
|
|
674
|
-
function
|
|
662
|
+
function init() {
|
|
675
663
|
mainMenu.registerLink({
|
|
676
664
|
id: "app-bar-connect",
|
|
677
665
|
group: "exits",
|
|
@@ -682,14 +670,14 @@ function init2() {
|
|
|
682
670
|
|
|
683
671
|
// src/extensions/documents-preview/hooks/use-action-props.ts
|
|
684
672
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
685
|
-
var
|
|
686
|
-
var
|
|
687
|
-
var
|
|
673
|
+
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
674
|
+
var import_icons6 = require("@elementor/icons");
|
|
675
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
688
676
|
function useActionProps() {
|
|
689
677
|
const document2 = (0, import_editor_documents2.__useActiveDocument)();
|
|
690
678
|
return {
|
|
691
|
-
icon:
|
|
692
|
-
title: (0,
|
|
679
|
+
icon: import_icons6.EyeIcon,
|
|
680
|
+
title: (0, import_i18n6.__)("Preview Changes", "elementor"),
|
|
693
681
|
onClick: () => {
|
|
694
682
|
const extendedWindow2 = window;
|
|
695
683
|
const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
|
|
@@ -702,7 +690,7 @@ function useActionProps() {
|
|
|
702
690
|
});
|
|
703
691
|
}
|
|
704
692
|
if (document2) {
|
|
705
|
-
(0,
|
|
693
|
+
(0, import_editor_v1_adapters2.__privateRunCommand)("editor/documents/preview", {
|
|
706
694
|
id: document2.id,
|
|
707
695
|
force: true
|
|
708
696
|
});
|
|
@@ -712,7 +700,7 @@ function useActionProps() {
|
|
|
712
700
|
}
|
|
713
701
|
|
|
714
702
|
// src/extensions/documents-preview/index.ts
|
|
715
|
-
function
|
|
703
|
+
function init2() {
|
|
716
704
|
utilitiesMenu.registerAction({
|
|
717
705
|
id: "document-preview-button",
|
|
718
706
|
priority: 30,
|
|
@@ -723,10 +711,10 @@ function init3() {
|
|
|
723
711
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
724
712
|
var React22 = __toESM(require("react"));
|
|
725
713
|
var import_editor_documents3 = require("@elementor/editor-documents");
|
|
726
|
-
var
|
|
727
|
-
var
|
|
714
|
+
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
715
|
+
var import_icons7 = require("@elementor/icons");
|
|
728
716
|
var import_ui13 = require("@elementor/ui");
|
|
729
|
-
var
|
|
717
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
730
718
|
|
|
731
719
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
732
720
|
var React21 = __toESM(require("react"));
|
|
@@ -778,7 +766,7 @@ function PrimaryActionMenu(props) {
|
|
|
778
766
|
function PrimaryAction() {
|
|
779
767
|
const document2 = (0, import_editor_documents3.__useActiveDocument)();
|
|
780
768
|
const { save } = (0, import_editor_documents3.__useActiveDocumentActions)();
|
|
781
|
-
const editMode = (0,
|
|
769
|
+
const editMode = (0, import_editor_v1_adapters3.useEditMode)();
|
|
782
770
|
const isEditMode = editMode === "edit";
|
|
783
771
|
const popupState = (0, import_ui13.usePopupState)({
|
|
784
772
|
variant: "popover",
|
|
@@ -825,7 +813,7 @@ function PrimaryAction() {
|
|
|
825
813
|
), /* @__PURE__ */ React22.createElement(
|
|
826
814
|
import_ui13.Tooltip,
|
|
827
815
|
{
|
|
828
|
-
title: (0,
|
|
816
|
+
title: (0, import_i18n7.__)("Save Options", "elementor"),
|
|
829
817
|
PopperProps: {
|
|
830
818
|
sx: {
|
|
831
819
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -842,14 +830,14 @@ function PrimaryAction() {
|
|
|
842
830
|
...(0, import_ui13.bindTrigger)(popupState),
|
|
843
831
|
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
844
832
|
disabled: isSaveOptionsDisabled,
|
|
845
|
-
"aria-label": (0,
|
|
833
|
+
"aria-label": (0, import_i18n7.__)("Save Options", "elementor")
|
|
846
834
|
},
|
|
847
|
-
/* @__PURE__ */ React22.createElement(
|
|
835
|
+
/* @__PURE__ */ React22.createElement(import_icons7.ChevronDownIcon, null)
|
|
848
836
|
))
|
|
849
837
|
)), /* @__PURE__ */ React22.createElement(PrimaryActionMenu, { ...(0, import_ui13.bindMenu)(popupState), onClick: popupState.close }));
|
|
850
838
|
}
|
|
851
839
|
function getLabel(document2) {
|
|
852
|
-
return document2.userCan.publish ? (0,
|
|
840
|
+
return document2.userCan.publish ? (0, import_i18n7.__)("Publish", "elementor") : (0, import_i18n7.__)("Submit", "elementor");
|
|
853
841
|
}
|
|
854
842
|
function isPublishEnabled(document2) {
|
|
855
843
|
if (document2.type.value === "kit") {
|
|
@@ -860,14 +848,14 @@ function isPublishEnabled(document2) {
|
|
|
860
848
|
|
|
861
849
|
// src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
|
|
862
850
|
var import_editor_documents4 = require("@elementor/editor-documents");
|
|
863
|
-
var
|
|
864
|
-
var
|
|
851
|
+
var import_icons8 = require("@elementor/icons");
|
|
852
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
865
853
|
function useDocumentCopyAndShareProps() {
|
|
866
854
|
const document2 = (0, import_editor_documents4.__useActiveDocument)();
|
|
867
855
|
const { copyAndShare } = (0, import_editor_documents4.__useActiveDocumentActions)();
|
|
868
856
|
return {
|
|
869
|
-
icon:
|
|
870
|
-
title: (0,
|
|
857
|
+
icon: import_icons8.LinkIcon,
|
|
858
|
+
title: (0, import_i18n8.__)("Copy and Share", "elementor"),
|
|
871
859
|
onClick: copyAndShare,
|
|
872
860
|
disabled: !document2 || document2.isSaving || document2.isSavingDraft || !("publish" === document2.status.value),
|
|
873
861
|
visible: document2?.permissions?.showCopyAndShare
|
|
@@ -876,14 +864,14 @@ function useDocumentCopyAndShareProps() {
|
|
|
876
864
|
|
|
877
865
|
// src/extensions/documents-save/hooks/use-document-save-draft-props.ts
|
|
878
866
|
var import_editor_documents5 = require("@elementor/editor-documents");
|
|
879
|
-
var
|
|
880
|
-
var
|
|
867
|
+
var import_icons9 = require("@elementor/icons");
|
|
868
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
881
869
|
function useDocumentSaveDraftProps() {
|
|
882
870
|
const document2 = (0, import_editor_documents5.__useActiveDocument)();
|
|
883
871
|
const { saveDraft } = (0, import_editor_documents5.__useActiveDocumentActions)();
|
|
884
872
|
return {
|
|
885
|
-
icon:
|
|
886
|
-
title: (0,
|
|
873
|
+
icon: import_icons9.FileReportIcon,
|
|
874
|
+
title: (0, import_i18n9.__)("Save Draft", "elementor"),
|
|
887
875
|
onClick: saveDraft,
|
|
888
876
|
disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
|
|
889
877
|
};
|
|
@@ -891,35 +879,35 @@ function useDocumentSaveDraftProps() {
|
|
|
891
879
|
|
|
892
880
|
// src/extensions/documents-save/hooks/use-document-save-template-props.ts
|
|
893
881
|
var import_editor_documents6 = require("@elementor/editor-documents");
|
|
894
|
-
var
|
|
895
|
-
var
|
|
882
|
+
var import_icons10 = require("@elementor/icons");
|
|
883
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
896
884
|
function useDocumentSaveTemplateProps() {
|
|
897
885
|
const { saveTemplate } = (0, import_editor_documents6.__useActiveDocumentActions)();
|
|
898
886
|
return {
|
|
899
|
-
icon:
|
|
900
|
-
title: (0,
|
|
887
|
+
icon: import_icons10.FolderIcon,
|
|
888
|
+
title: (0, import_i18n10.__)("Save as Template", "elementor"),
|
|
901
889
|
onClick: saveTemplate
|
|
902
890
|
};
|
|
903
891
|
}
|
|
904
892
|
|
|
905
893
|
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
906
894
|
var import_editor_documents7 = require("@elementor/editor-documents");
|
|
907
|
-
var
|
|
908
|
-
var
|
|
909
|
-
var
|
|
895
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
896
|
+
var import_icons11 = require("@elementor/icons");
|
|
897
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
910
898
|
function useDocumentViewPageProps() {
|
|
911
899
|
const document2 = (0, import_editor_documents7.__useActiveDocument)();
|
|
912
900
|
return {
|
|
913
|
-
icon:
|
|
914
|
-
title: (0,
|
|
915
|
-
onClick: () => document2?.id && (0,
|
|
901
|
+
icon: import_icons11.EyeIcon,
|
|
902
|
+
title: (0, import_i18n11.__)("View Page", "elementor"),
|
|
903
|
+
onClick: () => document2?.id && (0, import_editor_v1_adapters4.__privateRunCommand)("editor/documents/view", {
|
|
916
904
|
id: document2.id
|
|
917
905
|
})
|
|
918
906
|
};
|
|
919
907
|
}
|
|
920
908
|
|
|
921
909
|
// src/extensions/documents-save/index.ts
|
|
922
|
-
function
|
|
910
|
+
function init3() {
|
|
923
911
|
injectIntoPrimaryAction({
|
|
924
912
|
id: "document-primary-action",
|
|
925
913
|
component: PrimaryAction
|
|
@@ -950,21 +938,21 @@ function init4() {
|
|
|
950
938
|
|
|
951
939
|
// src/extensions/documents-settings/hooks/use-action-props.ts
|
|
952
940
|
var import_editor_documents8 = require("@elementor/editor-documents");
|
|
953
|
-
var
|
|
954
|
-
var
|
|
955
|
-
var
|
|
941
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
942
|
+
var import_icons12 = require("@elementor/icons");
|
|
943
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
956
944
|
function useActionProps2() {
|
|
957
945
|
const activeDocument = (0, import_editor_documents8.__useActiveDocument)();
|
|
958
946
|
const hostDocument = (0, import_editor_documents8.__useHostDocument)();
|
|
959
|
-
const { isActive, isBlocked } = (0,
|
|
947
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters5.__privateUseRouteStatus)("panel/page-settings");
|
|
960
948
|
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
961
949
|
const ButtonTitle = document2 ? (
|
|
962
950
|
/* translators: %s: Post type label. */
|
|
963
|
-
(0,
|
|
964
|
-
) : (0,
|
|
951
|
+
(0, import_i18n12.__)("%s Settings", "elementor").replace("%s", document2.type.label)
|
|
952
|
+
) : (0, import_i18n12.__)("Document Settings", "elementor");
|
|
965
953
|
return {
|
|
966
954
|
title: ButtonTitle,
|
|
967
|
-
icon:
|
|
955
|
+
icon: import_icons12.FileSettingsIcon,
|
|
968
956
|
onClick: () => {
|
|
969
957
|
if (!document2) {
|
|
970
958
|
return;
|
|
@@ -979,7 +967,7 @@ function useActionProps2() {
|
|
|
979
967
|
element: config.elements.buttonIcon
|
|
980
968
|
});
|
|
981
969
|
}
|
|
982
|
-
(0,
|
|
970
|
+
(0, import_editor_v1_adapters5.__privateOpenRoute)("panel/page-settings/settings");
|
|
983
971
|
},
|
|
984
972
|
selected: isActive,
|
|
985
973
|
disabled: isBlocked || !document2
|
|
@@ -987,7 +975,7 @@ function useActionProps2() {
|
|
|
987
975
|
}
|
|
988
976
|
|
|
989
977
|
// src/extensions/documents-settings/index.ts
|
|
990
|
-
function
|
|
978
|
+
function init4() {
|
|
991
979
|
toolsMenu.registerToggleAction({
|
|
992
980
|
id: "document-settings-button",
|
|
993
981
|
priority: 2,
|
|
@@ -996,14 +984,14 @@ function init5() {
|
|
|
996
984
|
}
|
|
997
985
|
|
|
998
986
|
// src/extensions/elements/hooks/use-action-props.ts
|
|
999
|
-
var
|
|
1000
|
-
var
|
|
1001
|
-
var
|
|
987
|
+
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
988
|
+
var import_icons13 = require("@elementor/icons");
|
|
989
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
1002
990
|
function useActionProps3() {
|
|
1003
|
-
const { isActive, isBlocked } = (0,
|
|
991
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters6.__privateUseRouteStatus)("panel/elements");
|
|
1004
992
|
return {
|
|
1005
|
-
title: (0,
|
|
1006
|
-
icon:
|
|
993
|
+
title: (0, import_i18n13.__)("Add Element", "elementor"),
|
|
994
|
+
icon: import_icons13.PlusIcon,
|
|
1007
995
|
onClick: () => {
|
|
1008
996
|
const extendedWindow2 = window;
|
|
1009
997
|
const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
|
|
@@ -1015,7 +1003,7 @@ function useActionProps3() {
|
|
|
1015
1003
|
element: config.elements.buttonIcon
|
|
1016
1004
|
});
|
|
1017
1005
|
}
|
|
1018
|
-
(0,
|
|
1006
|
+
(0, import_editor_v1_adapters6.__privateOpenRoute)("panel/elements/categories");
|
|
1019
1007
|
},
|
|
1020
1008
|
selected: isActive,
|
|
1021
1009
|
disabled: isBlocked
|
|
@@ -1023,17 +1011,17 @@ function useActionProps3() {
|
|
|
1023
1011
|
}
|
|
1024
1012
|
|
|
1025
1013
|
// src/extensions/elements/sync/sync-panel-title.ts
|
|
1026
|
-
var
|
|
1027
|
-
var
|
|
1014
|
+
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
1015
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
1028
1016
|
function syncPanelTitle() {
|
|
1029
|
-
const panelTitle = (0,
|
|
1030
|
-
const tabTitle = (0,
|
|
1031
|
-
(0,
|
|
1017
|
+
const panelTitle = (0, import_i18n14.__)("Elements", "elementor");
|
|
1018
|
+
const tabTitle = (0, import_i18n14.__)("Widgets", "elementor");
|
|
1019
|
+
(0, import_editor_v1_adapters7.__privateListenTo)((0, import_editor_v1_adapters7.routeOpenEvent)("panel/elements"), () => {
|
|
1032
1020
|
setPanelTitle(panelTitle);
|
|
1033
1021
|
setTabTitle(tabTitle);
|
|
1034
1022
|
});
|
|
1035
|
-
(0,
|
|
1036
|
-
if ((0,
|
|
1023
|
+
(0, import_editor_v1_adapters7.__privateListenTo)((0, import_editor_v1_adapters7.v1ReadyEvent)(), () => {
|
|
1024
|
+
if ((0, import_editor_v1_adapters7.__privateIsRouteActive)("panel/elements")) {
|
|
1037
1025
|
setPanelTitle(panelTitle);
|
|
1038
1026
|
setTabTitle(tabTitle);
|
|
1039
1027
|
}
|
|
@@ -1050,7 +1038,7 @@ function setTabTitle(title) {
|
|
|
1050
1038
|
}
|
|
1051
1039
|
|
|
1052
1040
|
// src/extensions/elements/index.ts
|
|
1053
|
-
function
|
|
1041
|
+
function init5() {
|
|
1054
1042
|
syncPanelTitle();
|
|
1055
1043
|
toolsMenu.registerToggleAction({
|
|
1056
1044
|
id: "open-elements-panel",
|
|
@@ -1059,8 +1047,33 @@ function init6() {
|
|
|
1059
1047
|
});
|
|
1060
1048
|
}
|
|
1061
1049
|
|
|
1050
|
+
// src/extensions/feedback/index.ts
|
|
1051
|
+
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
1052
|
+
var import_icons14 = require("@elementor/icons");
|
|
1053
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
1054
|
+
function init6() {
|
|
1055
|
+
const isActive = (0, import_editor_v1_adapters8.isExperimentActive)(EXPERIMENT_NAME);
|
|
1056
|
+
if (!isActive) {
|
|
1057
|
+
return;
|
|
1058
|
+
}
|
|
1059
|
+
mainMenu.registerAction({
|
|
1060
|
+
id: "open-send-feedback",
|
|
1061
|
+
group: "help",
|
|
1062
|
+
priority: 20,
|
|
1063
|
+
useProps: () => {
|
|
1064
|
+
return {
|
|
1065
|
+
icon: import_icons14.MessageLinesIcon,
|
|
1066
|
+
title: (0, import_i18n15.__)("Send Feedback", "elementor"),
|
|
1067
|
+
onClick: () => {
|
|
1068
|
+
dispatchEvent(new CustomEvent(FEEDBACK_TOGGLE_EVENT));
|
|
1069
|
+
}
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1062
1075
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
1063
|
-
var
|
|
1076
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
1064
1077
|
var import_icons15 = require("@elementor/icons");
|
|
1065
1078
|
var import_i18n16 = require("@wordpress/i18n");
|
|
1066
1079
|
function useActionProps4() {
|
|
@@ -1078,7 +1091,7 @@ function useActionProps4() {
|
|
|
1078
1091
|
element: config.elements.buttonIcon
|
|
1079
1092
|
});
|
|
1080
1093
|
}
|
|
1081
|
-
(0,
|
|
1094
|
+
(0, import_editor_v1_adapters9.__privateRunCommand)("finder/toggle");
|
|
1082
1095
|
}
|
|
1083
1096
|
};
|
|
1084
1097
|
}
|
|
@@ -1127,11 +1140,11 @@ function init8() {
|
|
|
1127
1140
|
}
|
|
1128
1141
|
|
|
1129
1142
|
// src/extensions/history/hooks/use-action-props.ts
|
|
1130
|
-
var
|
|
1143
|
+
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
1131
1144
|
var import_icons17 = require("@elementor/icons");
|
|
1132
1145
|
var import_i18n18 = require("@wordpress/i18n");
|
|
1133
1146
|
function useActionProps6() {
|
|
1134
|
-
const { isActive, isBlocked } = (0,
|
|
1147
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters10.__privateUseRouteStatus)("panel/history");
|
|
1135
1148
|
return {
|
|
1136
1149
|
title: (0, import_i18n18.__)("History", "elementor"),
|
|
1137
1150
|
icon: import_icons17.HistoryIcon,
|
|
@@ -1146,7 +1159,7 @@ function useActionProps6() {
|
|
|
1146
1159
|
element: config.elements.link
|
|
1147
1160
|
});
|
|
1148
1161
|
}
|
|
1149
|
-
(0,
|
|
1162
|
+
(0, import_editor_v1_adapters10.__privateOpenRoute)("panel/history/actions");
|
|
1150
1163
|
},
|
|
1151
1164
|
selected: isActive,
|
|
1152
1165
|
disabled: isBlocked
|
|
@@ -1163,7 +1176,7 @@ function init9() {
|
|
|
1163
1176
|
}
|
|
1164
1177
|
|
|
1165
1178
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
1166
|
-
var
|
|
1179
|
+
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
1167
1180
|
var import_icons18 = require("@elementor/icons");
|
|
1168
1181
|
var import_i18n19 = require("@wordpress/i18n");
|
|
1169
1182
|
function useActionProps7() {
|
|
@@ -1181,7 +1194,7 @@ function useActionProps7() {
|
|
|
1181
1194
|
element: config.elements.link
|
|
1182
1195
|
});
|
|
1183
1196
|
}
|
|
1184
|
-
(0,
|
|
1197
|
+
(0, import_editor_v1_adapters11.__privateRunCommand)("shortcuts/open");
|
|
1185
1198
|
}
|
|
1186
1199
|
};
|
|
1187
1200
|
}
|
|
@@ -1306,11 +1319,11 @@ var React26 = __toESM(require("react"));
|
|
|
1306
1319
|
|
|
1307
1320
|
// src/extensions/site-settings/components/portal.tsx
|
|
1308
1321
|
var React24 = __toESM(require("react"));
|
|
1309
|
-
var
|
|
1322
|
+
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
1310
1323
|
var import_ui15 = require("@elementor/ui");
|
|
1311
1324
|
function Portal(props) {
|
|
1312
|
-
const containerRef = (0,
|
|
1313
|
-
[(0,
|
|
1325
|
+
const containerRef = (0, import_editor_v1_adapters12.__privateUseListenTo)(
|
|
1326
|
+
[(0, import_editor_v1_adapters12.routeOpenEvent)("panel/global"), (0, import_editor_v1_adapters12.routeCloseEvent)("panel/global")],
|
|
1314
1327
|
getContainerRef
|
|
1315
1328
|
);
|
|
1316
1329
|
if (!containerRef.current) {
|
|
@@ -1319,7 +1332,7 @@ function Portal(props) {
|
|
|
1319
1332
|
return /* @__PURE__ */ React24.createElement(import_ui15.Portal, { container: containerRef.current, ...props });
|
|
1320
1333
|
}
|
|
1321
1334
|
function getContainerRef() {
|
|
1322
|
-
return (0,
|
|
1335
|
+
return (0, import_editor_v1_adapters12.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
|
|
1323
1336
|
}
|
|
1324
1337
|
|
|
1325
1338
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
@@ -1360,11 +1373,11 @@ function PortalledPrimaryAction() {
|
|
|
1360
1373
|
}
|
|
1361
1374
|
|
|
1362
1375
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
1363
|
-
var
|
|
1376
|
+
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
1364
1377
|
var import_icons20 = require("@elementor/icons");
|
|
1365
1378
|
var import_i18n22 = require("@wordpress/i18n");
|
|
1366
1379
|
function useActionProps8() {
|
|
1367
|
-
const { isActive, isBlocked } = (0,
|
|
1380
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters13.__privateUseRouteStatus)("panel/global", {
|
|
1368
1381
|
blockOnKitRoutes: false
|
|
1369
1382
|
});
|
|
1370
1383
|
return {
|
|
@@ -1382,9 +1395,9 @@ function useActionProps8() {
|
|
|
1382
1395
|
});
|
|
1383
1396
|
}
|
|
1384
1397
|
if (isActive) {
|
|
1385
|
-
(0,
|
|
1398
|
+
(0, import_editor_v1_adapters13.__privateRunCommand)("panel/global/close");
|
|
1386
1399
|
} else {
|
|
1387
|
-
(0,
|
|
1400
|
+
(0, import_editor_v1_adapters13.__privateRunCommand)("panel/global/open");
|
|
1388
1401
|
}
|
|
1389
1402
|
},
|
|
1390
1403
|
selected: isActive,
|
|
@@ -1407,7 +1420,7 @@ function init12() {
|
|
|
1407
1420
|
}
|
|
1408
1421
|
|
|
1409
1422
|
// src/extensions/structure/hooks/use-action-props.ts
|
|
1410
|
-
var
|
|
1423
|
+
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
1411
1424
|
var import_i18n24 = require("@wordpress/i18n");
|
|
1412
1425
|
|
|
1413
1426
|
// src/extensions/structure/hooks/structure-icon-with-popup.tsx
|
|
@@ -1472,7 +1485,7 @@ var StructureIconWithPopup = () => {
|
|
|
1472
1485
|
|
|
1473
1486
|
// src/extensions/structure/hooks/use-action-props.ts
|
|
1474
1487
|
function useActionProps9() {
|
|
1475
|
-
const { isActive, isBlocked } = (0,
|
|
1488
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters14.__privateUseRouteStatus)("navigator");
|
|
1476
1489
|
return {
|
|
1477
1490
|
title: (0, import_i18n24.__)("Structure", "elementor"),
|
|
1478
1491
|
icon: StructureIconWithPopup,
|
|
@@ -1487,7 +1500,7 @@ function useActionProps9() {
|
|
|
1487
1500
|
element: config.elements.buttonIcon
|
|
1488
1501
|
});
|
|
1489
1502
|
}
|
|
1490
|
-
(0,
|
|
1503
|
+
(0, import_editor_v1_adapters14.__privateRunCommand)("navigator/toggle");
|
|
1491
1504
|
},
|
|
1492
1505
|
selected: isActive,
|
|
1493
1506
|
disabled: isBlocked
|
|
@@ -1504,7 +1517,7 @@ function init13() {
|
|
|
1504
1517
|
}
|
|
1505
1518
|
|
|
1506
1519
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1507
|
-
var
|
|
1520
|
+
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
1508
1521
|
var import_icons22 = require("@elementor/icons");
|
|
1509
1522
|
var import_i18n25 = require("@wordpress/i18n");
|
|
1510
1523
|
function useActionProps10() {
|
|
@@ -1522,7 +1535,7 @@ function useActionProps10() {
|
|
|
1522
1535
|
element: config.elements.link
|
|
1523
1536
|
});
|
|
1524
1537
|
}
|
|
1525
|
-
(0,
|
|
1538
|
+
(0, import_editor_v1_adapters15.__privateRunCommand)("app/open");
|
|
1526
1539
|
}
|
|
1527
1540
|
};
|
|
1528
1541
|
}
|
|
@@ -1538,11 +1551,11 @@ function init14() {
|
|
|
1538
1551
|
}
|
|
1539
1552
|
|
|
1540
1553
|
// src/extensions/user-preferences/hooks/use-action-props.ts
|
|
1541
|
-
var
|
|
1554
|
+
var import_editor_v1_adapters16 = require("@elementor/editor-v1-adapters");
|
|
1542
1555
|
var import_icons23 = require("@elementor/icons");
|
|
1543
1556
|
var import_i18n26 = require("@wordpress/i18n");
|
|
1544
1557
|
function useActionProps11() {
|
|
1545
|
-
const { isActive, isBlocked } = (0,
|
|
1558
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters16.__privateUseRouteStatus)("panel/editor-preferences");
|
|
1546
1559
|
return {
|
|
1547
1560
|
icon: import_icons23.ToggleRightIcon,
|
|
1548
1561
|
title: (0, import_i18n26.__)("User Preferences", "elementor"),
|
|
@@ -1557,7 +1570,7 @@ function useActionProps11() {
|
|
|
1557
1570
|
element: config.elements.link
|
|
1558
1571
|
});
|
|
1559
1572
|
}
|
|
1560
|
-
(0,
|
|
1573
|
+
(0, import_editor_v1_adapters16.__privateOpenRoute)("panel/editor-preferences");
|
|
1561
1574
|
},
|
|
1562
1575
|
selected: isActive,
|
|
1563
1576
|
disabled: isBlocked
|
|
@@ -1611,29 +1624,29 @@ function init16() {
|
|
|
1611
1624
|
|
|
1612
1625
|
// src/extensions/index.ts
|
|
1613
1626
|
function init17() {
|
|
1627
|
+
init2();
|
|
1614
1628
|
init3();
|
|
1615
1629
|
init4();
|
|
1616
1630
|
init5();
|
|
1617
|
-
init6();
|
|
1618
1631
|
init7();
|
|
1619
1632
|
init8();
|
|
1620
1633
|
init9();
|
|
1621
1634
|
init10();
|
|
1622
1635
|
init11();
|
|
1623
1636
|
init12();
|
|
1624
|
-
|
|
1637
|
+
init6();
|
|
1625
1638
|
init13();
|
|
1626
1639
|
init14();
|
|
1627
1640
|
init15();
|
|
1628
1641
|
init16();
|
|
1629
|
-
|
|
1642
|
+
init();
|
|
1630
1643
|
}
|
|
1631
1644
|
|
|
1632
1645
|
// src/sync/redirect-old-menus.ts
|
|
1633
|
-
var
|
|
1646
|
+
var import_editor_v1_adapters17 = require("@elementor/editor-v1-adapters");
|
|
1634
1647
|
function redirectOldMenus() {
|
|
1635
|
-
(0,
|
|
1636
|
-
(0,
|
|
1648
|
+
(0, import_editor_v1_adapters17.__privateListenTo)((0, import_editor_v1_adapters17.routeOpenEvent)("panel/menu"), () => {
|
|
1649
|
+
(0, import_editor_v1_adapters17.__privateOpenRoute)("panel/elements/categories");
|
|
1637
1650
|
});
|
|
1638
1651
|
}
|
|
1639
1652
|
|