@elementor/editor-app-bar 4.1.0-826 → 4.1.0-827
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.mjs
CHANGED
|
@@ -930,18 +930,43 @@ function useDocumentSaveTemplateProps() {
|
|
|
930
930
|
};
|
|
931
931
|
}
|
|
932
932
|
|
|
933
|
-
// src/extensions/documents-save/hooks/use-document-view-
|
|
933
|
+
// src/extensions/documents-save/hooks/use-document-view-as-markdown-props.ts
|
|
934
934
|
import { __useActiveDocument as useActiveDocument6 } from "@elementor/editor-documents";
|
|
935
935
|
import { __privateRunCommand as runCommand2 } from "@elementor/editor-v1-adapters";
|
|
936
|
-
import { useMixpanel as useMixpanel5 } from "@elementor/events";
|
|
937
936
|
import { EyeIcon as EyeIcon2 } from "@elementor/icons";
|
|
938
937
|
import { __ as __11 } from "@wordpress/i18n";
|
|
939
|
-
function
|
|
938
|
+
function useDocumentViewAsMarkdownProps() {
|
|
940
939
|
const document2 = useActiveDocument6();
|
|
941
|
-
const { dispatchEvent: dispatchEvent2, config } = useMixpanel5();
|
|
942
940
|
return {
|
|
943
941
|
icon: EyeIcon2,
|
|
944
|
-
title: __11("View
|
|
942
|
+
title: __11("View as Markdown", "elementor"),
|
|
943
|
+
onClick: async () => {
|
|
944
|
+
const baseUrl = document2?.links?.wpPreview || document2?.links?.permalink;
|
|
945
|
+
if (!baseUrl) {
|
|
946
|
+
return;
|
|
947
|
+
}
|
|
948
|
+
if (document2?.isDirty) {
|
|
949
|
+
await runCommand2("document/save/auto", { force: true });
|
|
950
|
+
}
|
|
951
|
+
const separator = baseUrl.includes("?") ? "&" : "?";
|
|
952
|
+
const url = baseUrl + separator + "format=markdown";
|
|
953
|
+
window.open(url, "_blank");
|
|
954
|
+
}
|
|
955
|
+
};
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
959
|
+
import { __useActiveDocument as useActiveDocument7 } from "@elementor/editor-documents";
|
|
960
|
+
import { __privateRunCommand as runCommand3 } from "@elementor/editor-v1-adapters";
|
|
961
|
+
import { useMixpanel as useMixpanel5 } from "@elementor/events";
|
|
962
|
+
import { EyeIcon as EyeIcon3 } from "@elementor/icons";
|
|
963
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
964
|
+
function useDocumentViewPageProps() {
|
|
965
|
+
const document2 = useActiveDocument7();
|
|
966
|
+
const { dispatchEvent: dispatchEvent2, config } = useMixpanel5();
|
|
967
|
+
return {
|
|
968
|
+
icon: EyeIcon3,
|
|
969
|
+
title: __12("View Page", "elementor"),
|
|
945
970
|
onClick: () => {
|
|
946
971
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
947
972
|
if (eventName) {
|
|
@@ -958,7 +983,7 @@ function useDocumentViewPageProps() {
|
|
|
958
983
|
});
|
|
959
984
|
}
|
|
960
985
|
if (document2?.id) {
|
|
961
|
-
|
|
986
|
+
runCommand3("editor/documents/view", {
|
|
962
987
|
id: document2.id
|
|
963
988
|
});
|
|
964
989
|
}
|
|
@@ -994,11 +1019,16 @@ function init3() {
|
|
|
994
1019
|
priority: 50,
|
|
995
1020
|
useProps: useDocumentViewPageProps
|
|
996
1021
|
});
|
|
1022
|
+
documentOptionsMenu.registerAction({
|
|
1023
|
+
id: "document-view-as-markdown",
|
|
1024
|
+
priority: 60,
|
|
1025
|
+
useProps: useDocumentViewAsMarkdownProps
|
|
1026
|
+
});
|
|
997
1027
|
}
|
|
998
1028
|
|
|
999
1029
|
// src/extensions/documents-settings/hooks/use-action-props.ts
|
|
1000
1030
|
import {
|
|
1001
|
-
__useActiveDocument as
|
|
1031
|
+
__useActiveDocument as useActiveDocument8,
|
|
1002
1032
|
__useHostDocument as useHostDocument
|
|
1003
1033
|
} from "@elementor/editor-documents";
|
|
1004
1034
|
import {
|
|
@@ -1006,16 +1036,16 @@ import {
|
|
|
1006
1036
|
__privateUseRouteStatus as useRouteStatus
|
|
1007
1037
|
} from "@elementor/editor-v1-adapters";
|
|
1008
1038
|
import { FileSettingsIcon } from "@elementor/icons";
|
|
1009
|
-
import { __ as
|
|
1039
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
1010
1040
|
function useActionProps2() {
|
|
1011
|
-
const activeDocument =
|
|
1041
|
+
const activeDocument = useActiveDocument8();
|
|
1012
1042
|
const hostDocument = useHostDocument();
|
|
1013
1043
|
const { isActive, isBlocked } = useRouteStatus("panel/page-settings");
|
|
1014
1044
|
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
1015
1045
|
const ButtonTitle = document2 ? (
|
|
1016
1046
|
/* translators: %s: Post type label. */
|
|
1017
|
-
|
|
1018
|
-
) :
|
|
1047
|
+
__13("%s Settings", "elementor").replace("%s", document2.type.label)
|
|
1048
|
+
) : __13("Document Settings", "elementor");
|
|
1019
1049
|
return {
|
|
1020
1050
|
title: ButtonTitle,
|
|
1021
1051
|
icon: FileSettingsIcon,
|
|
@@ -1055,11 +1085,11 @@ import {
|
|
|
1055
1085
|
__privateUseRouteStatus as useRouteStatus2
|
|
1056
1086
|
} from "@elementor/editor-v1-adapters";
|
|
1057
1087
|
import { PlusIcon } from "@elementor/icons";
|
|
1058
|
-
import { __ as
|
|
1088
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
1059
1089
|
function useActionProps3() {
|
|
1060
1090
|
const { isActive, isBlocked } = useRouteStatus2("panel/elements");
|
|
1061
1091
|
return {
|
|
1062
|
-
title:
|
|
1092
|
+
title: __14("Add Element", "elementor"),
|
|
1063
1093
|
icon: PlusIcon,
|
|
1064
1094
|
onClick: () => {
|
|
1065
1095
|
const extendedWindow = window;
|
|
@@ -1086,10 +1116,10 @@ import {
|
|
|
1086
1116
|
routeOpenEvent,
|
|
1087
1117
|
v1ReadyEvent
|
|
1088
1118
|
} from "@elementor/editor-v1-adapters";
|
|
1089
|
-
import { __ as
|
|
1119
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
1090
1120
|
function syncPanelTitle() {
|
|
1091
|
-
const panelTitle =
|
|
1092
|
-
const tabTitle =
|
|
1121
|
+
const panelTitle = __15("Elements", "elementor");
|
|
1122
|
+
const tabTitle = __15("Widgets", "elementor");
|
|
1093
1123
|
listenTo(routeOpenEvent("panel/elements"), () => {
|
|
1094
1124
|
setPanelTitle(panelTitle);
|
|
1095
1125
|
setTabTitle(tabTitle);
|
|
@@ -1124,7 +1154,7 @@ function init5() {
|
|
|
1124
1154
|
// src/extensions/feedback/index.ts
|
|
1125
1155
|
import { isExperimentActive as isExperimentActive2 } from "@elementor/editor-v1-adapters";
|
|
1126
1156
|
import { MessageLinesIcon } from "@elementor/icons";
|
|
1127
|
-
import { __ as
|
|
1157
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
1128
1158
|
function init6() {
|
|
1129
1159
|
const isActive = isExperimentActive2(EXPERIMENT_NAME);
|
|
1130
1160
|
if (!isActive) {
|
|
@@ -1137,7 +1167,7 @@ function init6() {
|
|
|
1137
1167
|
useProps: () => {
|
|
1138
1168
|
return {
|
|
1139
1169
|
icon: MessageLinesIcon,
|
|
1140
|
-
title:
|
|
1170
|
+
title: __16("Send Feedback", "elementor"),
|
|
1141
1171
|
onClick: () => {
|
|
1142
1172
|
dispatchEvent(new CustomEvent(FEEDBACK_TOGGLE_EVENT));
|
|
1143
1173
|
}
|
|
@@ -1147,12 +1177,12 @@ function init6() {
|
|
|
1147
1177
|
}
|
|
1148
1178
|
|
|
1149
1179
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
1150
|
-
import { __privateRunCommand as
|
|
1180
|
+
import { __privateRunCommand as runCommand4 } from "@elementor/editor-v1-adapters";
|
|
1151
1181
|
import { SearchIcon } from "@elementor/icons";
|
|
1152
|
-
import { __ as
|
|
1182
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
1153
1183
|
function useActionProps4() {
|
|
1154
1184
|
return {
|
|
1155
|
-
title:
|
|
1185
|
+
title: __17("Finder", "elementor"),
|
|
1156
1186
|
icon: SearchIcon,
|
|
1157
1187
|
onClick: () => {
|
|
1158
1188
|
const extendedWindow = window;
|
|
@@ -1165,7 +1195,7 @@ function useActionProps4() {
|
|
|
1165
1195
|
element: config.elements.buttonIcon
|
|
1166
1196
|
});
|
|
1167
1197
|
}
|
|
1168
|
-
|
|
1198
|
+
runCommand4("finder/toggle");
|
|
1169
1199
|
}
|
|
1170
1200
|
};
|
|
1171
1201
|
}
|
|
@@ -1181,10 +1211,10 @@ function init7() {
|
|
|
1181
1211
|
|
|
1182
1212
|
// src/extensions/help/hooks/use-action-props.ts
|
|
1183
1213
|
import { HelpIcon } from "@elementor/icons";
|
|
1184
|
-
import { __ as
|
|
1214
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1185
1215
|
function useActionProps5() {
|
|
1186
1216
|
return {
|
|
1187
|
-
title:
|
|
1217
|
+
title: __18("Help Center", "elementor"),
|
|
1188
1218
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
1189
1219
|
icon: HelpIcon,
|
|
1190
1220
|
target: "_blank",
|
|
@@ -1219,11 +1249,11 @@ import {
|
|
|
1219
1249
|
__privateUseRouteStatus as useRouteStatus3
|
|
1220
1250
|
} from "@elementor/editor-v1-adapters";
|
|
1221
1251
|
import { HistoryIcon } from "@elementor/icons";
|
|
1222
|
-
import { __ as
|
|
1252
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
1223
1253
|
function useActionProps6() {
|
|
1224
1254
|
const { isActive, isBlocked } = useRouteStatus3("panel/history");
|
|
1225
1255
|
return {
|
|
1226
|
-
title:
|
|
1256
|
+
title: __19("History", "elementor"),
|
|
1227
1257
|
icon: HistoryIcon,
|
|
1228
1258
|
onClick: () => {
|
|
1229
1259
|
const extendedWindow = window;
|
|
@@ -1253,13 +1283,13 @@ function init9() {
|
|
|
1253
1283
|
}
|
|
1254
1284
|
|
|
1255
1285
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
1256
|
-
import { __privateRunCommand as
|
|
1286
|
+
import { __privateRunCommand as runCommand5 } from "@elementor/editor-v1-adapters";
|
|
1257
1287
|
import { KeyboardIcon } from "@elementor/icons";
|
|
1258
|
-
import { __ as
|
|
1288
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1259
1289
|
function useActionProps7() {
|
|
1260
1290
|
return {
|
|
1261
1291
|
icon: KeyboardIcon,
|
|
1262
|
-
title:
|
|
1292
|
+
title: __20("Keyboard Shortcuts", "elementor"),
|
|
1263
1293
|
onClick: () => {
|
|
1264
1294
|
const extendedWindow = window;
|
|
1265
1295
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1271,7 +1301,7 @@ function useActionProps7() {
|
|
|
1271
1301
|
element: config.elements.link
|
|
1272
1302
|
});
|
|
1273
1303
|
}
|
|
1274
|
-
|
|
1304
|
+
runCommand5("shortcuts/open");
|
|
1275
1305
|
}
|
|
1276
1306
|
};
|
|
1277
1307
|
}
|
|
@@ -1303,7 +1333,7 @@ import {
|
|
|
1303
1333
|
WidescreenIcon
|
|
1304
1334
|
} from "@elementor/icons";
|
|
1305
1335
|
import { Tab, Tabs, Tooltip as BaseTooltip2 } from "@elementor/ui";
|
|
1306
|
-
import { __ as
|
|
1336
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1307
1337
|
function BreakpointsSwitcher() {
|
|
1308
1338
|
const breakpoints = useBreakpoints();
|
|
1309
1339
|
const activeBreakpoint = useActiveBreakpoint();
|
|
@@ -1332,7 +1362,7 @@ function BreakpointsSwitcher() {
|
|
|
1332
1362
|
indicatorColor: "secondary",
|
|
1333
1363
|
value: activeBreakpoint,
|
|
1334
1364
|
onChange,
|
|
1335
|
-
"aria-label":
|
|
1365
|
+
"aria-label": __21("Switch Device", "elementor"),
|
|
1336
1366
|
sx: {
|
|
1337
1367
|
"& .MuiTabs-indicator": {
|
|
1338
1368
|
backgroundColor: "text.primary"
|
|
@@ -1383,9 +1413,9 @@ var iconsMap = {
|
|
|
1383
1413
|
var labelsMap = {
|
|
1384
1414
|
default: "%s",
|
|
1385
1415
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1386
|
-
"min-width":
|
|
1416
|
+
"min-width": __21("%s (%dpx and up)", "elementor"),
|
|
1387
1417
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1388
|
-
"max-width":
|
|
1418
|
+
"max-width": __21("%s (up to %dpx)", "elementor")
|
|
1389
1419
|
};
|
|
1390
1420
|
|
|
1391
1421
|
// src/extensions/responsive/index.ts
|
|
@@ -1432,13 +1462,13 @@ function getContainerRef() {
|
|
|
1432
1462
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
1433
1463
|
import * as React25 from "react";
|
|
1434
1464
|
import {
|
|
1435
|
-
__useActiveDocument as
|
|
1465
|
+
__useActiveDocument as useActiveDocument9,
|
|
1436
1466
|
__useActiveDocumentActions as useActiveDocumentActions5
|
|
1437
1467
|
} from "@elementor/editor-documents";
|
|
1438
1468
|
import { Button as Button3, CircularProgress as CircularProgress2, Paper } from "@elementor/ui";
|
|
1439
|
-
import { __ as
|
|
1469
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
1440
1470
|
function PrimaryAction2() {
|
|
1441
|
-
const document2 =
|
|
1471
|
+
const document2 = useActiveDocument9();
|
|
1442
1472
|
const { save } = useActiveDocumentActions5();
|
|
1443
1473
|
return /* @__PURE__ */ React25.createElement(
|
|
1444
1474
|
Paper,
|
|
@@ -1459,7 +1489,7 @@ function PrimaryAction2() {
|
|
|
1459
1489
|
sx: { width: "100%" },
|
|
1460
1490
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
1461
1491
|
},
|
|
1462
|
-
document2?.isSaving ? /* @__PURE__ */ React25.createElement(CircularProgress2, null) :
|
|
1492
|
+
document2?.isSaving ? /* @__PURE__ */ React25.createElement(CircularProgress2, null) : __22("Save Changes", "elementor")
|
|
1463
1493
|
)
|
|
1464
1494
|
);
|
|
1465
1495
|
}
|
|
@@ -1471,17 +1501,17 @@ function PortalledPrimaryAction() {
|
|
|
1471
1501
|
|
|
1472
1502
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
1473
1503
|
import {
|
|
1474
|
-
__privateRunCommand as
|
|
1504
|
+
__privateRunCommand as runCommand6,
|
|
1475
1505
|
__privateUseRouteStatus as useRouteStatus4
|
|
1476
1506
|
} from "@elementor/editor-v1-adapters";
|
|
1477
1507
|
import { SettingsIcon } from "@elementor/icons";
|
|
1478
|
-
import { __ as
|
|
1508
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
1479
1509
|
function useActionProps8() {
|
|
1480
1510
|
const { isActive, isBlocked } = useRouteStatus4("panel/global", {
|
|
1481
1511
|
blockOnKitRoutes: false
|
|
1482
1512
|
});
|
|
1483
1513
|
return {
|
|
1484
|
-
title:
|
|
1514
|
+
title: __23("Site Settings", "elementor"),
|
|
1485
1515
|
icon: SettingsIcon,
|
|
1486
1516
|
onClick: () => {
|
|
1487
1517
|
const extendedWindow = window;
|
|
@@ -1495,9 +1525,9 @@ function useActionProps8() {
|
|
|
1495
1525
|
});
|
|
1496
1526
|
}
|
|
1497
1527
|
if (isActive) {
|
|
1498
|
-
|
|
1528
|
+
runCommand6("panel/global/close");
|
|
1499
1529
|
} else {
|
|
1500
|
-
|
|
1530
|
+
runCommand6("panel/global/open");
|
|
1501
1531
|
}
|
|
1502
1532
|
},
|
|
1503
1533
|
selected: isActive,
|
|
@@ -1521,15 +1551,15 @@ function init12() {
|
|
|
1521
1551
|
|
|
1522
1552
|
// src/extensions/structure/hooks/use-action-props.ts
|
|
1523
1553
|
import {
|
|
1524
|
-
__privateRunCommand as
|
|
1554
|
+
__privateRunCommand as runCommand7,
|
|
1525
1555
|
__privateUseRouteStatus as useRouteStatus5
|
|
1526
1556
|
} from "@elementor/editor-v1-adapters";
|
|
1527
1557
|
import { StructureIcon } from "@elementor/icons";
|
|
1528
|
-
import { __ as
|
|
1558
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1529
1559
|
function useActionProps9() {
|
|
1530
1560
|
const { isActive, isBlocked } = useRouteStatus5("navigator");
|
|
1531
1561
|
return {
|
|
1532
|
-
title:
|
|
1562
|
+
title: __24("Structure", "elementor"),
|
|
1533
1563
|
icon: StructureIcon,
|
|
1534
1564
|
onClick: () => {
|
|
1535
1565
|
const extendedWindow = window;
|
|
@@ -1542,7 +1572,7 @@ function useActionProps9() {
|
|
|
1542
1572
|
element: config.elements.buttonIcon
|
|
1543
1573
|
});
|
|
1544
1574
|
}
|
|
1545
|
-
|
|
1575
|
+
runCommand7("navigator/toggle");
|
|
1546
1576
|
},
|
|
1547
1577
|
selected: isActive,
|
|
1548
1578
|
disabled: isBlocked
|
|
@@ -1559,13 +1589,13 @@ function init13() {
|
|
|
1559
1589
|
}
|
|
1560
1590
|
|
|
1561
1591
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1562
|
-
import { __privateRunCommand as
|
|
1592
|
+
import { __privateRunCommand as runCommand8 } from "@elementor/editor-v1-adapters";
|
|
1563
1593
|
import { ThemeBuilderIcon } from "@elementor/icons";
|
|
1564
|
-
import { __ as
|
|
1594
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1565
1595
|
function useActionProps10() {
|
|
1566
1596
|
return {
|
|
1567
1597
|
icon: ThemeBuilderIcon,
|
|
1568
|
-
title:
|
|
1598
|
+
title: __25("Theme Builder", "elementor"),
|
|
1569
1599
|
onClick: () => {
|
|
1570
1600
|
const extendedWindow = window;
|
|
1571
1601
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1577,7 +1607,7 @@ function useActionProps10() {
|
|
|
1577
1607
|
element: config.elements.link
|
|
1578
1608
|
});
|
|
1579
1609
|
}
|
|
1580
|
-
|
|
1610
|
+
runCommand8("app/open");
|
|
1581
1611
|
}
|
|
1582
1612
|
};
|
|
1583
1613
|
}
|
|
@@ -1598,12 +1628,12 @@ import {
|
|
|
1598
1628
|
__privateUseRouteStatus as useRouteStatus6
|
|
1599
1629
|
} from "@elementor/editor-v1-adapters";
|
|
1600
1630
|
import { ToggleRightIcon } from "@elementor/icons";
|
|
1601
|
-
import { __ as
|
|
1631
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1602
1632
|
function useActionProps11() {
|
|
1603
1633
|
const { isActive, isBlocked } = useRouteStatus6("panel/editor-preferences");
|
|
1604
1634
|
return {
|
|
1605
1635
|
icon: ToggleRightIcon,
|
|
1606
|
-
title:
|
|
1636
|
+
title: __26("User Preferences", "elementor"),
|
|
1607
1637
|
onClick: () => {
|
|
1608
1638
|
const extendedWindow = window;
|
|
1609
1639
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1633,18 +1663,18 @@ function init15() {
|
|
|
1633
1663
|
}
|
|
1634
1664
|
|
|
1635
1665
|
// src/extensions/wordpress/index.ts
|
|
1636
|
-
import { __useActiveDocument as
|
|
1666
|
+
import { __useActiveDocument as useActiveDocument10 } from "@elementor/editor-documents";
|
|
1637
1667
|
import { WordpressIcon } from "@elementor/icons";
|
|
1638
|
-
import { __ as
|
|
1668
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
1639
1669
|
function init16() {
|
|
1640
1670
|
mainMenu.registerLink({
|
|
1641
1671
|
id: "exit-to-wordpress",
|
|
1642
1672
|
group: "exits",
|
|
1643
1673
|
priority: 20,
|
|
1644
1674
|
useProps: () => {
|
|
1645
|
-
const document2 =
|
|
1675
|
+
const document2 = useActiveDocument10();
|
|
1646
1676
|
return {
|
|
1647
|
-
title:
|
|
1677
|
+
title: __27("Exit to WordPress", "elementor"),
|
|
1648
1678
|
href: document2?.links?.platformEdit,
|
|
1649
1679
|
icon: WordpressIcon,
|
|
1650
1680
|
onClick: () => {
|