@elementor/editor-app-bar 4.1.0-779 → 4.1.0-780
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 +71 -132
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +71 -132
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
- package/src/extensions/structure/hooks/use-action-props.ts +2 -2
- package/src/types.ts +0 -8
- package/src/extensions/structure/hooks/structure-icon-with-popup.tsx +0 -84
package/dist/index.mjs
CHANGED
|
@@ -295,10 +295,10 @@ function MainMenuLocation() {
|
|
|
295
295
|
});
|
|
296
296
|
const toolbarLogoProps = bindTrigger(popupState);
|
|
297
297
|
const onToolbarClick = (e) => {
|
|
298
|
-
const
|
|
299
|
-
const config =
|
|
298
|
+
const extendedWindow = window;
|
|
299
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
300
300
|
if (config) {
|
|
301
|
-
|
|
301
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.elementorLogoDropdown, {
|
|
302
302
|
location: config.locations.topBar,
|
|
303
303
|
secondaryLocation: config.secondaryLocations.eLogoMenu,
|
|
304
304
|
trigger: config.triggers.dropdownClick,
|
|
@@ -407,14 +407,14 @@ var FEEDBACK_TOGGLE_EVENT = "elementor/open-feedback";
|
|
|
407
407
|
|
|
408
408
|
// src/components/locations/send-feedback-popup-location.tsx
|
|
409
409
|
var checkIfUserIsConnected = () => {
|
|
410
|
-
const
|
|
411
|
-
return
|
|
410
|
+
const extendedWindow = window;
|
|
411
|
+
return extendedWindow?.elementorCommon?.config.library_connect.is_connected || extendedWindow?.elementorPro?.config.isActive;
|
|
412
412
|
};
|
|
413
413
|
function SendFeedbackPopupLocation() {
|
|
414
414
|
const isActive = isExperimentActive(EXPERIMENT_NAME);
|
|
415
|
-
const
|
|
415
|
+
const extendedWindow = window;
|
|
416
416
|
const [isUserConnected, setIsUserConnected] = useState2(checkIfUserIsConnected());
|
|
417
|
-
const connectUrl =
|
|
417
|
+
const connectUrl = extendedWindow?.elementor?.config.user.top_bar.connect_url;
|
|
418
418
|
const [feedbackContent, setFeedbackContent] = useState2("");
|
|
419
419
|
const [feedbackResult, setFeedbackResult] = useState2(null);
|
|
420
420
|
const [submitDisabled, setSubmitDisabled] = useState2(true);
|
|
@@ -563,10 +563,10 @@ import { UserIcon } from "@elementor/icons";
|
|
|
563
563
|
import { __ as __5 } from "@wordpress/i18n";
|
|
564
564
|
var dispatchConnectClickEvent = (eventName) => {
|
|
565
565
|
try {
|
|
566
|
-
const
|
|
567
|
-
const config =
|
|
566
|
+
const extendedWindow = window;
|
|
567
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
568
568
|
if (config) {
|
|
569
|
-
|
|
569
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar[eventName], {
|
|
570
570
|
location: config.locations.topBar,
|
|
571
571
|
secondaryLocation: config.secondaryLocations.eLogoMenu,
|
|
572
572
|
trigger: config.triggers.dropdownClick,
|
|
@@ -578,28 +578,28 @@ var dispatchConnectClickEvent = (eventName) => {
|
|
|
578
578
|
}
|
|
579
579
|
};
|
|
580
580
|
function useConnectLinkConfig() {
|
|
581
|
-
const
|
|
581
|
+
const extendedWindow = window;
|
|
582
582
|
let isUserConnected = false;
|
|
583
|
-
const isPro =
|
|
583
|
+
const isPro = extendedWindow?.elementor?.helpers.hasPro();
|
|
584
584
|
let target = "_blank";
|
|
585
585
|
if (isPro) {
|
|
586
|
-
isUserConnected =
|
|
586
|
+
isUserConnected = extendedWindow?.elementorPro?.config.isActive ?? false;
|
|
587
587
|
} else {
|
|
588
|
-
isUserConnected =
|
|
588
|
+
isUserConnected = extendedWindow?.elementorCommon?.config.library_connect.is_connected ?? false;
|
|
589
589
|
target = "_self";
|
|
590
590
|
}
|
|
591
591
|
const handleConnectClick = useCallback(
|
|
592
592
|
(event) => {
|
|
593
593
|
event.preventDefault();
|
|
594
|
-
if (
|
|
595
|
-
const connectUrl =
|
|
596
|
-
const $tempButton =
|
|
594
|
+
if (extendedWindow.jQuery && extendedWindow.jQuery.fn?.elementorConnect) {
|
|
595
|
+
const connectUrl = extendedWindow?.elementor?.config.user.top_bar.connect_url;
|
|
596
|
+
const $tempButton = extendedWindow.jQuery("<a>");
|
|
597
597
|
$tempButton?.attr("href", connectUrl)?.attr("target", "_blank")?.attr("rel", "opener")?.css("display", "none")?.appendTo("body");
|
|
598
598
|
$tempButton.elementorConnect({
|
|
599
599
|
success: () => {
|
|
600
600
|
dispatchConnectClickEvent("accountConnected");
|
|
601
601
|
setTimeout(() => {
|
|
602
|
-
|
|
602
|
+
extendedWindow.location.reload();
|
|
603
603
|
}, 200);
|
|
604
604
|
}
|
|
605
605
|
});
|
|
@@ -610,16 +610,16 @@ function useConnectLinkConfig() {
|
|
|
610
610
|
}, 1e3);
|
|
611
611
|
}
|
|
612
612
|
},
|
|
613
|
-
[
|
|
613
|
+
[extendedWindow]
|
|
614
614
|
);
|
|
615
615
|
return isUserConnected ? {
|
|
616
616
|
title: __5("My Elementor", "elementor"),
|
|
617
|
-
href:
|
|
617
|
+
href: extendedWindow?.elementor?.config.user.top_bar.my_elementor_url,
|
|
618
618
|
icon: UserIcon,
|
|
619
619
|
target: "_blank"
|
|
620
620
|
} : {
|
|
621
621
|
title: __5("Connect my account", "elementor"),
|
|
622
|
-
href:
|
|
622
|
+
href: extendedWindow?.elementor?.config.user.top_bar.connect_url,
|
|
623
623
|
icon: UserIcon,
|
|
624
624
|
target,
|
|
625
625
|
onClick: handleConnectClick
|
|
@@ -647,10 +647,10 @@ function useActionProps() {
|
|
|
647
647
|
icon: EyeIcon,
|
|
648
648
|
title: __6("Preview Changes", "elementor"),
|
|
649
649
|
onClick: () => {
|
|
650
|
-
const
|
|
651
|
-
const config =
|
|
650
|
+
const extendedWindow = window;
|
|
651
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
652
652
|
if (config) {
|
|
653
|
-
|
|
653
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.previewPage, {
|
|
654
654
|
location: config.locations.topBar,
|
|
655
655
|
secondaryLocation: config.secondaryLocations["preview-page"],
|
|
656
656
|
trigger: config.triggers.click,
|
|
@@ -762,10 +762,10 @@ function PrimaryAction() {
|
|
|
762
762
|
Button2,
|
|
763
763
|
{
|
|
764
764
|
onClick: () => {
|
|
765
|
-
const
|
|
766
|
-
const config =
|
|
765
|
+
const extendedWindow = window;
|
|
766
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
767
767
|
if (config) {
|
|
768
|
-
|
|
768
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(
|
|
769
769
|
config.names.topBar.publishButton,
|
|
770
770
|
{
|
|
771
771
|
location: config.locations.topBar,
|
|
@@ -1023,10 +1023,10 @@ function useActionProps2() {
|
|
|
1023
1023
|
if (!document2) {
|
|
1024
1024
|
return;
|
|
1025
1025
|
}
|
|
1026
|
-
const
|
|
1027
|
-
const config =
|
|
1026
|
+
const extendedWindow = window;
|
|
1027
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1028
1028
|
if (config) {
|
|
1029
|
-
|
|
1029
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.documentSettings, {
|
|
1030
1030
|
location: config.locations.topBar,
|
|
1031
1031
|
secondaryLocation: config.secondaryLocations["document-settings"],
|
|
1032
1032
|
trigger: config.triggers.click,
|
|
@@ -1062,10 +1062,10 @@ function useActionProps3() {
|
|
|
1062
1062
|
title: __13("Add Element", "elementor"),
|
|
1063
1063
|
icon: PlusIcon,
|
|
1064
1064
|
onClick: () => {
|
|
1065
|
-
const
|
|
1066
|
-
const config =
|
|
1065
|
+
const extendedWindow = window;
|
|
1066
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1067
1067
|
if (config) {
|
|
1068
|
-
|
|
1068
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.widgetPanel, {
|
|
1069
1069
|
location: config.locations.topBar,
|
|
1070
1070
|
secondaryLocation: config.secondaryLocations["widget-panel"],
|
|
1071
1071
|
trigger: config.triggers.toggleClick,
|
|
@@ -1155,10 +1155,10 @@ function useActionProps4() {
|
|
|
1155
1155
|
title: __16("Finder", "elementor"),
|
|
1156
1156
|
icon: SearchIcon,
|
|
1157
1157
|
onClick: () => {
|
|
1158
|
-
const
|
|
1159
|
-
const config =
|
|
1158
|
+
const extendedWindow = window;
|
|
1159
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1160
1160
|
if (config) {
|
|
1161
|
-
|
|
1161
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.finder, {
|
|
1162
1162
|
location: config.locations.topBar,
|
|
1163
1163
|
secondaryLocation: config.secondaryLocations.finder,
|
|
1164
1164
|
trigger: config.triggers.toggleClick,
|
|
@@ -1189,10 +1189,10 @@ function useActionProps5() {
|
|
|
1189
1189
|
icon: HelpIcon,
|
|
1190
1190
|
target: "_blank",
|
|
1191
1191
|
onClick: () => {
|
|
1192
|
-
const
|
|
1193
|
-
const config =
|
|
1192
|
+
const extendedWindow = window;
|
|
1193
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1194
1194
|
if (config) {
|
|
1195
|
-
|
|
1195
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.help, {
|
|
1196
1196
|
location: config.locations.topBar,
|
|
1197
1197
|
secondaryLocation: config.secondaryLocations.help,
|
|
1198
1198
|
trigger: config.triggers.click,
|
|
@@ -1226,10 +1226,10 @@ function useActionProps6() {
|
|
|
1226
1226
|
title: __18("History", "elementor"),
|
|
1227
1227
|
icon: HistoryIcon,
|
|
1228
1228
|
onClick: () => {
|
|
1229
|
-
const
|
|
1230
|
-
const config =
|
|
1229
|
+
const extendedWindow = window;
|
|
1230
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1231
1231
|
if (config) {
|
|
1232
|
-
|
|
1232
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.history, {
|
|
1233
1233
|
location: config.locations.topBar,
|
|
1234
1234
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
1235
1235
|
trigger: config.triggers.click,
|
|
@@ -1261,10 +1261,10 @@ function useActionProps7() {
|
|
|
1261
1261
|
icon: KeyboardIcon,
|
|
1262
1262
|
title: __19("Keyboard Shortcuts", "elementor"),
|
|
1263
1263
|
onClick: () => {
|
|
1264
|
-
const
|
|
1265
|
-
const config =
|
|
1264
|
+
const extendedWindow = window;
|
|
1265
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1266
1266
|
if (config) {
|
|
1267
|
-
|
|
1267
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.keyboardShortcuts, {
|
|
1268
1268
|
location: config.locations.topBar,
|
|
1269
1269
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
1270
1270
|
trigger: config.triggers.click,
|
|
@@ -1312,10 +1312,10 @@ function BreakpointsSwitcher() {
|
|
|
1312
1312
|
return null;
|
|
1313
1313
|
}
|
|
1314
1314
|
const onChange = (_, value) => {
|
|
1315
|
-
const
|
|
1316
|
-
const config =
|
|
1315
|
+
const extendedWindow = window;
|
|
1316
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1317
1317
|
if (config) {
|
|
1318
|
-
|
|
1318
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.responsiveControls, {
|
|
1319
1319
|
location: config.locations.topBar,
|
|
1320
1320
|
secondaryLocation: config.secondaryLocations.responsiveControls,
|
|
1321
1321
|
trigger: config.triggers.click,
|
|
@@ -1484,10 +1484,10 @@ function useActionProps8() {
|
|
|
1484
1484
|
title: __22("Site Settings", "elementor"),
|
|
1485
1485
|
icon: SettingsIcon,
|
|
1486
1486
|
onClick: () => {
|
|
1487
|
-
const
|
|
1488
|
-
const config =
|
|
1487
|
+
const extendedWindow = window;
|
|
1488
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1489
1489
|
if (config) {
|
|
1490
|
-
|
|
1490
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.siteSettings, {
|
|
1491
1491
|
location: config.locations.topBar,
|
|
1492
1492
|
secondaryLocation: config.secondaryLocations.siteSettings,
|
|
1493
1493
|
trigger: config.triggers.toggleClick,
|
|
@@ -1524,79 +1524,18 @@ import {
|
|
|
1524
1524
|
__privateRunCommand as runCommand6,
|
|
1525
1525
|
__privateUseRouteStatus as useRouteStatus5
|
|
1526
1526
|
} from "@elementor/editor-v1-adapters";
|
|
1527
|
-
import { __ as __24 } from "@wordpress/i18n";
|
|
1528
|
-
|
|
1529
|
-
// src/extensions/structure/hooks/structure-icon-with-popup.tsx
|
|
1530
|
-
import * as React27 from "react";
|
|
1531
|
-
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
1532
1527
|
import { StructureIcon } from "@elementor/icons";
|
|
1533
|
-
import { Button as Button4, Card, CardActions, CardContent, Infotip, Typography } from "@elementor/ui";
|
|
1534
1528
|
import { __ as __23 } from "@wordpress/i18n";
|
|
1535
|
-
var extendedWindow = window;
|
|
1536
|
-
var StructurePopupContent = ({ onClose }) => {
|
|
1537
|
-
const handleDismiss = async () => {
|
|
1538
|
-
onClose();
|
|
1539
|
-
extendedWindow.elementorCommon?.ajax?.addRequest?.("structure_popup_dismiss").catch(() => {
|
|
1540
|
-
});
|
|
1541
|
-
};
|
|
1542
|
-
const stopEventPropagation = (event) => {
|
|
1543
|
-
event.stopPropagation();
|
|
1544
|
-
};
|
|
1545
|
-
return /* @__PURE__ */ React27.createElement(Card, { elevation: 0, sx: { maxWidth: 300 }, onClick: stopEventPropagation }, /* @__PURE__ */ React27.createElement(CardContent, null, /* @__PURE__ */ React27.createElement(Typography, { variant: "subtitle2", sx: { mb: 2 } }, __23("Refreshed Top Bar layout!", "elementor")), /* @__PURE__ */ React27.createElement(Typography, { variant: "body2" }, __23("We\u2019ve fine-tuned the Top Bar to make navigation faster and smoother.", "elementor"))), /* @__PURE__ */ React27.createElement(CardActions, { sx: { pt: 0 } }, /* @__PURE__ */ React27.createElement(
|
|
1546
|
-
Button4,
|
|
1547
|
-
{
|
|
1548
|
-
size: "small",
|
|
1549
|
-
color: "secondary",
|
|
1550
|
-
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
1551
|
-
target: "_blank"
|
|
1552
|
-
},
|
|
1553
|
-
__23("Learn More", "elementor")
|
|
1554
|
-
), /* @__PURE__ */ React27.createElement(Button4, { size: "small", variant: "contained", onClick: handleDismiss }, __23("Got it", "elementor"))));
|
|
1555
|
-
};
|
|
1556
|
-
var StructureIconWithPopup = () => {
|
|
1557
|
-
const [showPopup, setShowPopup] = useState3(false);
|
|
1558
|
-
useEffect2(() => {
|
|
1559
|
-
if (extendedWindow.elementorShowInfotip?.shouldShow === "1") {
|
|
1560
|
-
setShowPopup(true);
|
|
1561
|
-
}
|
|
1562
|
-
}, []);
|
|
1563
|
-
const handleClosePopup = () => {
|
|
1564
|
-
setShowPopup(false);
|
|
1565
|
-
};
|
|
1566
|
-
if (extendedWindow.elementorShowInfotip?.shouldShow !== "1") {
|
|
1567
|
-
return /* @__PURE__ */ React27.createElement(StructureIcon, null);
|
|
1568
|
-
}
|
|
1569
|
-
return /* @__PURE__ */ React27.createElement(
|
|
1570
|
-
Infotip,
|
|
1571
|
-
{
|
|
1572
|
-
placement: "bottom",
|
|
1573
|
-
arrow: false,
|
|
1574
|
-
content: /* @__PURE__ */ React27.createElement(StructurePopupContent, { onClose: handleClosePopup }),
|
|
1575
|
-
open: showPopup,
|
|
1576
|
-
PopperProps: {
|
|
1577
|
-
modifiers: [
|
|
1578
|
-
{
|
|
1579
|
-
name: "offset",
|
|
1580
|
-
options: { offset: [-16, 12] }
|
|
1581
|
-
}
|
|
1582
|
-
]
|
|
1583
|
-
}
|
|
1584
|
-
},
|
|
1585
|
-
/* @__PURE__ */ React27.createElement(StructureIcon, null)
|
|
1586
|
-
);
|
|
1587
|
-
};
|
|
1588
|
-
|
|
1589
|
-
// src/extensions/structure/hooks/use-action-props.ts
|
|
1590
1529
|
function useActionProps9() {
|
|
1591
1530
|
const { isActive, isBlocked } = useRouteStatus5("navigator");
|
|
1592
1531
|
return {
|
|
1593
|
-
title:
|
|
1594
|
-
icon:
|
|
1532
|
+
title: __23("Structure", "elementor"),
|
|
1533
|
+
icon: StructureIcon,
|
|
1595
1534
|
onClick: () => {
|
|
1596
|
-
const
|
|
1597
|
-
const config =
|
|
1535
|
+
const extendedWindow = window;
|
|
1536
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1598
1537
|
if (config) {
|
|
1599
|
-
|
|
1538
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.structure, {
|
|
1600
1539
|
location: config.locations.topBar,
|
|
1601
1540
|
secondaryLocation: config.secondaryLocations.structure,
|
|
1602
1541
|
trigger: config.triggers.toggleClick,
|
|
@@ -1622,16 +1561,16 @@ function init13() {
|
|
|
1622
1561
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1623
1562
|
import { __privateRunCommand as runCommand7 } from "@elementor/editor-v1-adapters";
|
|
1624
1563
|
import { ThemeBuilderIcon } from "@elementor/icons";
|
|
1625
|
-
import { __ as
|
|
1564
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1626
1565
|
function useActionProps10() {
|
|
1627
1566
|
return {
|
|
1628
1567
|
icon: ThemeBuilderIcon,
|
|
1629
|
-
title:
|
|
1568
|
+
title: __24("Theme Builder", "elementor"),
|
|
1630
1569
|
onClick: () => {
|
|
1631
|
-
const
|
|
1632
|
-
const config =
|
|
1570
|
+
const extendedWindow = window;
|
|
1571
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1633
1572
|
if (config) {
|
|
1634
|
-
|
|
1573
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.themeBuilder, {
|
|
1635
1574
|
location: config.locations.topBar,
|
|
1636
1575
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
1637
1576
|
trigger: config.triggers.click,
|
|
@@ -1659,17 +1598,17 @@ import {
|
|
|
1659
1598
|
__privateUseRouteStatus as useRouteStatus6
|
|
1660
1599
|
} from "@elementor/editor-v1-adapters";
|
|
1661
1600
|
import { ToggleRightIcon } from "@elementor/icons";
|
|
1662
|
-
import { __ as
|
|
1601
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1663
1602
|
function useActionProps11() {
|
|
1664
1603
|
const { isActive, isBlocked } = useRouteStatus6("panel/editor-preferences");
|
|
1665
1604
|
return {
|
|
1666
1605
|
icon: ToggleRightIcon,
|
|
1667
|
-
title:
|
|
1606
|
+
title: __25("User Preferences", "elementor"),
|
|
1668
1607
|
onClick: () => {
|
|
1669
|
-
const
|
|
1670
|
-
const config =
|
|
1608
|
+
const extendedWindow = window;
|
|
1609
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1671
1610
|
if (config) {
|
|
1672
|
-
|
|
1611
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.userPreferences, {
|
|
1673
1612
|
location: config.locations.topBar,
|
|
1674
1613
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
1675
1614
|
trigger: config.triggers.click,
|
|
@@ -1696,7 +1635,7 @@ function init15() {
|
|
|
1696
1635
|
// src/extensions/wordpress/index.ts
|
|
1697
1636
|
import { __useActiveDocument as useActiveDocument9 } from "@elementor/editor-documents";
|
|
1698
1637
|
import { WordpressIcon } from "@elementor/icons";
|
|
1699
|
-
import { __ as
|
|
1638
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1700
1639
|
function init16() {
|
|
1701
1640
|
mainMenu.registerLink({
|
|
1702
1641
|
id: "exit-to-wordpress",
|
|
@@ -1705,14 +1644,14 @@ function init16() {
|
|
|
1705
1644
|
useProps: () => {
|
|
1706
1645
|
const document2 = useActiveDocument9();
|
|
1707
1646
|
return {
|
|
1708
|
-
title:
|
|
1647
|
+
title: __26("Exit to WordPress", "elementor"),
|
|
1709
1648
|
href: document2?.links?.platformEdit,
|
|
1710
1649
|
icon: WordpressIcon,
|
|
1711
1650
|
onClick: () => {
|
|
1712
|
-
const
|
|
1713
|
-
const config =
|
|
1651
|
+
const extendedWindow = window;
|
|
1652
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1714
1653
|
if (config) {
|
|
1715
|
-
|
|
1654
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(
|
|
1716
1655
|
config.names.topBar.exitToWordpress,
|
|
1717
1656
|
{
|
|
1718
1657
|
location: config.locations.topBar,
|