@elementor/editor-app-bar 4.3.0-951 → 4.3.0-953
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
|
@@ -1098,43 +1098,18 @@ function useDocumentSaveTemplateProps() {
|
|
|
1098
1098
|
};
|
|
1099
1099
|
}
|
|
1100
1100
|
|
|
1101
|
-
// src/extensions/documents-save/hooks/use-document-view-
|
|
1101
|
+
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
1102
1102
|
import { __useActiveDocument as useActiveDocument6 } from "@elementor/editor-documents";
|
|
1103
1103
|
import { __privateRunCommand as runCommand2 } from "@elementor/editor-v1-adapters";
|
|
1104
|
+
import { useMixpanel as useMixpanel6 } from "@elementor/events";
|
|
1104
1105
|
import { EyeIcon as EyeIcon2 } from "@elementor/icons";
|
|
1105
1106
|
import { __ as __14 } from "@wordpress/i18n";
|
|
1106
|
-
function useDocumentViewAsMarkdownProps() {
|
|
1107
|
-
const document2 = useActiveDocument6();
|
|
1108
|
-
return {
|
|
1109
|
-
icon: EyeIcon2,
|
|
1110
|
-
title: __14("View as Markdown", "elementor"),
|
|
1111
|
-
onClick: async () => {
|
|
1112
|
-
const baseUrl = document2?.links?.wpPreview || document2?.links?.permalink;
|
|
1113
|
-
if (!baseUrl) {
|
|
1114
|
-
return;
|
|
1115
|
-
}
|
|
1116
|
-
if (document2?.isDirty) {
|
|
1117
|
-
await runCommand2("document/save/auto", { force: true });
|
|
1118
|
-
}
|
|
1119
|
-
const separator = baseUrl.includes("?") ? "&" : "?";
|
|
1120
|
-
const url = baseUrl + separator + "format=markdown";
|
|
1121
|
-
window.open(url, "_blank");
|
|
1122
|
-
}
|
|
1123
|
-
};
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
1127
|
-
import { __useActiveDocument as useActiveDocument7 } from "@elementor/editor-documents";
|
|
1128
|
-
import { __privateRunCommand as runCommand3 } from "@elementor/editor-v1-adapters";
|
|
1129
|
-
import { useMixpanel as useMixpanel6 } from "@elementor/events";
|
|
1130
|
-
import { EyeIcon as EyeIcon3 } from "@elementor/icons";
|
|
1131
|
-
import { __ as __15 } from "@wordpress/i18n";
|
|
1132
1107
|
function useDocumentViewPageProps() {
|
|
1133
|
-
const document2 =
|
|
1108
|
+
const document2 = useActiveDocument6();
|
|
1134
1109
|
const { dispatchEvent: dispatchEvent2, config } = useMixpanel6();
|
|
1135
1110
|
return {
|
|
1136
|
-
icon:
|
|
1137
|
-
title:
|
|
1111
|
+
icon: EyeIcon2,
|
|
1112
|
+
title: __14("View Page", "elementor"),
|
|
1138
1113
|
onClick: () => {
|
|
1139
1114
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
1140
1115
|
if (eventName) {
|
|
@@ -1151,7 +1126,7 @@ function useDocumentViewPageProps() {
|
|
|
1151
1126
|
});
|
|
1152
1127
|
}
|
|
1153
1128
|
if (document2?.id) {
|
|
1154
|
-
|
|
1129
|
+
runCommand2("editor/documents/view", {
|
|
1155
1130
|
id: document2.id
|
|
1156
1131
|
});
|
|
1157
1132
|
}
|
|
@@ -1187,16 +1162,11 @@ function init4() {
|
|
|
1187
1162
|
priority: 50,
|
|
1188
1163
|
useProps: useDocumentViewPageProps
|
|
1189
1164
|
});
|
|
1190
|
-
documentOptionsMenu.registerAction({
|
|
1191
|
-
id: "document-view-as-markdown",
|
|
1192
|
-
priority: 60,
|
|
1193
|
-
useProps: useDocumentViewAsMarkdownProps
|
|
1194
|
-
});
|
|
1195
1165
|
}
|
|
1196
1166
|
|
|
1197
1167
|
// src/extensions/documents-settings/hooks/use-action-props.ts
|
|
1198
1168
|
import {
|
|
1199
|
-
__useActiveDocument as
|
|
1169
|
+
__useActiveDocument as useActiveDocument7,
|
|
1200
1170
|
__useHostDocument as useHostDocument
|
|
1201
1171
|
} from "@elementor/editor-documents";
|
|
1202
1172
|
import {
|
|
@@ -1204,16 +1174,16 @@ import {
|
|
|
1204
1174
|
__privateUseRouteStatus as useRouteStatus
|
|
1205
1175
|
} from "@elementor/editor-v1-adapters";
|
|
1206
1176
|
import { FileSettingsIcon } from "@elementor/icons";
|
|
1207
|
-
import { __ as
|
|
1177
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
1208
1178
|
function useActionProps3() {
|
|
1209
|
-
const activeDocument =
|
|
1179
|
+
const activeDocument = useActiveDocument7();
|
|
1210
1180
|
const hostDocument = useHostDocument();
|
|
1211
1181
|
const { isActive, isBlocked } = useRouteStatus("panel/page-settings");
|
|
1212
1182
|
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
1213
1183
|
const ButtonTitle = document2 ? (
|
|
1214
1184
|
/* translators: %s: Post type label. */
|
|
1215
|
-
|
|
1216
|
-
) :
|
|
1185
|
+
__15("%s Settings", "elementor").replace("%s", document2.type.label)
|
|
1186
|
+
) : __15("Document Settings", "elementor");
|
|
1217
1187
|
return {
|
|
1218
1188
|
title: ButtonTitle,
|
|
1219
1189
|
icon: FileSettingsIcon,
|
|
@@ -1253,11 +1223,11 @@ import {
|
|
|
1253
1223
|
__privateUseRouteStatus as useRouteStatus2
|
|
1254
1224
|
} from "@elementor/editor-v1-adapters";
|
|
1255
1225
|
import { PlusIcon } from "@elementor/icons";
|
|
1256
|
-
import { __ as
|
|
1226
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
1257
1227
|
function useActionProps4() {
|
|
1258
1228
|
const { isActive, isBlocked } = useRouteStatus2("panel/elements");
|
|
1259
1229
|
return {
|
|
1260
|
-
title:
|
|
1230
|
+
title: __16("Add Element", "elementor"),
|
|
1261
1231
|
icon: PlusIcon,
|
|
1262
1232
|
onClick: () => {
|
|
1263
1233
|
const extendedWindow = window;
|
|
@@ -1284,10 +1254,10 @@ import {
|
|
|
1284
1254
|
routeOpenEvent,
|
|
1285
1255
|
v1ReadyEvent
|
|
1286
1256
|
} from "@elementor/editor-v1-adapters";
|
|
1287
|
-
import { __ as
|
|
1257
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
1288
1258
|
function syncPanelTitle() {
|
|
1289
|
-
const panelTitle =
|
|
1290
|
-
const tabTitle =
|
|
1259
|
+
const panelTitle = __17("Elements", "elementor");
|
|
1260
|
+
const tabTitle = __17("Widgets", "elementor");
|
|
1291
1261
|
listenTo(routeOpenEvent("panel/elements"), () => {
|
|
1292
1262
|
setPanelTitle(panelTitle);
|
|
1293
1263
|
setTabTitle(tabTitle);
|
|
@@ -1322,7 +1292,7 @@ function init6() {
|
|
|
1322
1292
|
// src/extensions/feedback/index.ts
|
|
1323
1293
|
import { isExperimentActive as isExperimentActive2 } from "@elementor/editor-v1-adapters";
|
|
1324
1294
|
import { MessageLinesIcon } from "@elementor/icons";
|
|
1325
|
-
import { __ as
|
|
1295
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1326
1296
|
function init7() {
|
|
1327
1297
|
const isActive = isExperimentActive2(EXPERIMENT_NAME);
|
|
1328
1298
|
if (!isActive) {
|
|
@@ -1335,7 +1305,7 @@ function init7() {
|
|
|
1335
1305
|
useProps: () => {
|
|
1336
1306
|
return {
|
|
1337
1307
|
icon: MessageLinesIcon,
|
|
1338
|
-
title:
|
|
1308
|
+
title: __18("Send Feedback", "elementor"),
|
|
1339
1309
|
onClick: () => {
|
|
1340
1310
|
dispatchEvent(new CustomEvent(FEEDBACK_TOGGLE_EVENT));
|
|
1341
1311
|
}
|
|
@@ -1345,12 +1315,12 @@ function init7() {
|
|
|
1345
1315
|
}
|
|
1346
1316
|
|
|
1347
1317
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
1348
|
-
import { __privateRunCommand as
|
|
1318
|
+
import { __privateRunCommand as runCommand3 } from "@elementor/editor-v1-adapters";
|
|
1349
1319
|
import { SearchIcon } from "@elementor/icons";
|
|
1350
|
-
import { __ as
|
|
1320
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
1351
1321
|
function useActionProps5() {
|
|
1352
1322
|
return {
|
|
1353
|
-
title:
|
|
1323
|
+
title: __19("Finder", "elementor"),
|
|
1354
1324
|
icon: SearchIcon,
|
|
1355
1325
|
onClick: () => {
|
|
1356
1326
|
const extendedWindow = window;
|
|
@@ -1363,7 +1333,7 @@ function useActionProps5() {
|
|
|
1363
1333
|
element: config.elements.buttonIcon
|
|
1364
1334
|
});
|
|
1365
1335
|
}
|
|
1366
|
-
|
|
1336
|
+
runCommand3("finder/toggle");
|
|
1367
1337
|
}
|
|
1368
1338
|
};
|
|
1369
1339
|
}
|
|
@@ -1379,10 +1349,10 @@ function init8() {
|
|
|
1379
1349
|
|
|
1380
1350
|
// src/extensions/help/hooks/use-action-props.ts
|
|
1381
1351
|
import { HelpIcon } from "@elementor/icons";
|
|
1382
|
-
import { __ as
|
|
1352
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1383
1353
|
function useActionProps6() {
|
|
1384
1354
|
return {
|
|
1385
|
-
title:
|
|
1355
|
+
title: __20("Help Center", "elementor"),
|
|
1386
1356
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
1387
1357
|
icon: HelpIcon,
|
|
1388
1358
|
target: "_blank",
|
|
@@ -1417,11 +1387,11 @@ import {
|
|
|
1417
1387
|
__privateUseRouteStatus as useRouteStatus3
|
|
1418
1388
|
} from "@elementor/editor-v1-adapters";
|
|
1419
1389
|
import { HistoryIcon } from "@elementor/icons";
|
|
1420
|
-
import { __ as
|
|
1390
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1421
1391
|
function useActionProps7() {
|
|
1422
1392
|
const { isActive, isBlocked } = useRouteStatus3("panel/history");
|
|
1423
1393
|
return {
|
|
1424
|
-
title:
|
|
1394
|
+
title: __21("History", "elementor"),
|
|
1425
1395
|
icon: HistoryIcon,
|
|
1426
1396
|
onClick: () => {
|
|
1427
1397
|
const extendedWindow = window;
|
|
@@ -1451,13 +1421,13 @@ function init10() {
|
|
|
1451
1421
|
}
|
|
1452
1422
|
|
|
1453
1423
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
1454
|
-
import { __privateRunCommand as
|
|
1424
|
+
import { __privateRunCommand as runCommand4 } from "@elementor/editor-v1-adapters";
|
|
1455
1425
|
import { KeyboardIcon } from "@elementor/icons";
|
|
1456
|
-
import { __ as
|
|
1426
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
1457
1427
|
function useActionProps8() {
|
|
1458
1428
|
return {
|
|
1459
1429
|
icon: KeyboardIcon,
|
|
1460
|
-
title:
|
|
1430
|
+
title: __22("Keyboard Shortcuts", "elementor"),
|
|
1461
1431
|
onClick: () => {
|
|
1462
1432
|
const extendedWindow = window;
|
|
1463
1433
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1469,7 +1439,7 @@ function useActionProps8() {
|
|
|
1469
1439
|
element: config.elements.link
|
|
1470
1440
|
});
|
|
1471
1441
|
}
|
|
1472
|
-
|
|
1442
|
+
runCommand4("shortcuts/open");
|
|
1473
1443
|
}
|
|
1474
1444
|
};
|
|
1475
1445
|
}
|
|
@@ -1501,7 +1471,7 @@ import {
|
|
|
1501
1471
|
WidescreenIcon
|
|
1502
1472
|
} from "@elementor/icons";
|
|
1503
1473
|
import { Tab, Tabs, Tooltip as BaseTooltip2 } from "@elementor/ui";
|
|
1504
|
-
import { __ as
|
|
1474
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
1505
1475
|
function BreakpointsSwitcher() {
|
|
1506
1476
|
const breakpoints = useBreakpoints();
|
|
1507
1477
|
const activeBreakpoint = useActiveBreakpoint();
|
|
@@ -1530,7 +1500,7 @@ function BreakpointsSwitcher() {
|
|
|
1530
1500
|
indicatorColor: "secondary",
|
|
1531
1501
|
value: activeBreakpoint,
|
|
1532
1502
|
onChange,
|
|
1533
|
-
"aria-label":
|
|
1503
|
+
"aria-label": __23("Switch Device", "elementor"),
|
|
1534
1504
|
sx: {
|
|
1535
1505
|
"& .MuiTabs-indicator": {
|
|
1536
1506
|
backgroundColor: "text.primary"
|
|
@@ -1581,9 +1551,9 @@ var iconsMap = {
|
|
|
1581
1551
|
var labelsMap = {
|
|
1582
1552
|
default: "%s",
|
|
1583
1553
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1584
|
-
"min-width":
|
|
1554
|
+
"min-width": __23("%s (%dpx and up)", "elementor"),
|
|
1585
1555
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1586
|
-
"max-width":
|
|
1556
|
+
"max-width": __23("%s (up to %dpx)", "elementor")
|
|
1587
1557
|
};
|
|
1588
1558
|
|
|
1589
1559
|
// src/extensions/responsive/index.ts
|
|
@@ -1630,13 +1600,13 @@ function getContainerRef() {
|
|
|
1630
1600
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
1631
1601
|
import * as React27 from "react";
|
|
1632
1602
|
import {
|
|
1633
|
-
__useActiveDocument as
|
|
1603
|
+
__useActiveDocument as useActiveDocument8,
|
|
1634
1604
|
__useActiveDocumentActions as useActiveDocumentActions5
|
|
1635
1605
|
} from "@elementor/editor-documents";
|
|
1636
1606
|
import { Button as Button4, CircularProgress as CircularProgress2, Paper } from "@elementor/ui";
|
|
1637
|
-
import { __ as
|
|
1607
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1638
1608
|
function PrimaryAction2() {
|
|
1639
|
-
const document2 =
|
|
1609
|
+
const document2 = useActiveDocument8();
|
|
1640
1610
|
const { save } = useActiveDocumentActions5();
|
|
1641
1611
|
return /* @__PURE__ */ React27.createElement(
|
|
1642
1612
|
Paper,
|
|
@@ -1657,7 +1627,7 @@ function PrimaryAction2() {
|
|
|
1657
1627
|
sx: { width: "100%" },
|
|
1658
1628
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
1659
1629
|
},
|
|
1660
|
-
document2?.isSaving ? /* @__PURE__ */ React27.createElement(CircularProgress2, null) :
|
|
1630
|
+
document2?.isSaving ? /* @__PURE__ */ React27.createElement(CircularProgress2, null) : __24("Save Changes", "elementor")
|
|
1661
1631
|
)
|
|
1662
1632
|
);
|
|
1663
1633
|
}
|
|
@@ -1669,17 +1639,17 @@ function PortalledPrimaryAction() {
|
|
|
1669
1639
|
|
|
1670
1640
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
1671
1641
|
import {
|
|
1672
|
-
__privateRunCommand as
|
|
1642
|
+
__privateRunCommand as runCommand5,
|
|
1673
1643
|
__privateUseRouteStatus as useRouteStatus4
|
|
1674
1644
|
} from "@elementor/editor-v1-adapters";
|
|
1675
1645
|
import { SettingsIcon } from "@elementor/icons";
|
|
1676
|
-
import { __ as
|
|
1646
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1677
1647
|
function useActionProps9() {
|
|
1678
1648
|
const { isActive, isBlocked } = useRouteStatus4("panel/global", {
|
|
1679
1649
|
blockOnKitRoutes: false
|
|
1680
1650
|
});
|
|
1681
1651
|
return {
|
|
1682
|
-
title:
|
|
1652
|
+
title: __25("Site Settings", "elementor"),
|
|
1683
1653
|
icon: SettingsIcon,
|
|
1684
1654
|
onClick: () => {
|
|
1685
1655
|
const extendedWindow = window;
|
|
@@ -1693,9 +1663,9 @@ function useActionProps9() {
|
|
|
1693
1663
|
});
|
|
1694
1664
|
}
|
|
1695
1665
|
if (isActive) {
|
|
1696
|
-
|
|
1666
|
+
runCommand5("panel/global/close");
|
|
1697
1667
|
} else {
|
|
1698
|
-
|
|
1668
|
+
runCommand5("panel/global/open");
|
|
1699
1669
|
}
|
|
1700
1670
|
},
|
|
1701
1671
|
selected: isActive,
|
|
@@ -1719,15 +1689,15 @@ function init13() {
|
|
|
1719
1689
|
|
|
1720
1690
|
// src/extensions/structure/hooks/use-action-props.ts
|
|
1721
1691
|
import {
|
|
1722
|
-
__privateRunCommand as
|
|
1692
|
+
__privateRunCommand as runCommand6,
|
|
1723
1693
|
__privateUseRouteStatus as useRouteStatus5
|
|
1724
1694
|
} from "@elementor/editor-v1-adapters";
|
|
1725
1695
|
import { StructureIcon } from "@elementor/icons";
|
|
1726
|
-
import { __ as
|
|
1696
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1727
1697
|
function useActionProps10() {
|
|
1728
1698
|
const { isActive, isBlocked } = useRouteStatus5("navigator");
|
|
1729
1699
|
return {
|
|
1730
|
-
title:
|
|
1700
|
+
title: __26("Structure", "elementor"),
|
|
1731
1701
|
icon: StructureIcon,
|
|
1732
1702
|
onClick: () => {
|
|
1733
1703
|
const extendedWindow = window;
|
|
@@ -1740,7 +1710,7 @@ function useActionProps10() {
|
|
|
1740
1710
|
element: config.elements.buttonIcon
|
|
1741
1711
|
});
|
|
1742
1712
|
}
|
|
1743
|
-
|
|
1713
|
+
runCommand6("navigator/toggle");
|
|
1744
1714
|
},
|
|
1745
1715
|
selected: isActive,
|
|
1746
1716
|
disabled: isBlocked
|
|
@@ -1757,13 +1727,13 @@ function init14() {
|
|
|
1757
1727
|
}
|
|
1758
1728
|
|
|
1759
1729
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1760
|
-
import { __privateRunCommand as
|
|
1730
|
+
import { __privateRunCommand as runCommand7 } from "@elementor/editor-v1-adapters";
|
|
1761
1731
|
import { ThemeBuilderIcon } from "@elementor/icons";
|
|
1762
|
-
import { __ as
|
|
1732
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
1763
1733
|
function useActionProps11() {
|
|
1764
1734
|
return {
|
|
1765
1735
|
icon: ThemeBuilderIcon,
|
|
1766
|
-
title:
|
|
1736
|
+
title: __27("Theme Builder", "elementor"),
|
|
1767
1737
|
onClick: () => {
|
|
1768
1738
|
const extendedWindow = window;
|
|
1769
1739
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1775,7 +1745,7 @@ function useActionProps11() {
|
|
|
1775
1745
|
element: config.elements.link
|
|
1776
1746
|
});
|
|
1777
1747
|
}
|
|
1778
|
-
|
|
1748
|
+
runCommand7("app/open");
|
|
1779
1749
|
}
|
|
1780
1750
|
};
|
|
1781
1751
|
}
|
|
@@ -1796,12 +1766,12 @@ import {
|
|
|
1796
1766
|
__privateUseRouteStatus as useRouteStatus6
|
|
1797
1767
|
} from "@elementor/editor-v1-adapters";
|
|
1798
1768
|
import { ToggleRightIcon } from "@elementor/icons";
|
|
1799
|
-
import { __ as
|
|
1769
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
1800
1770
|
function useActionProps12() {
|
|
1801
1771
|
const { isActive, isBlocked } = useRouteStatus6("panel/editor-preferences");
|
|
1802
1772
|
return {
|
|
1803
1773
|
icon: ToggleRightIcon,
|
|
1804
|
-
title:
|
|
1774
|
+
title: __28("User Preferences", "elementor"),
|
|
1805
1775
|
onClick: () => {
|
|
1806
1776
|
const extendedWindow = window;
|
|
1807
1777
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1831,18 +1801,18 @@ function init16() {
|
|
|
1831
1801
|
}
|
|
1832
1802
|
|
|
1833
1803
|
// src/extensions/wordpress/index.ts
|
|
1834
|
-
import { __useActiveDocument as
|
|
1804
|
+
import { __useActiveDocument as useActiveDocument9 } from "@elementor/editor-documents";
|
|
1835
1805
|
import { WordpressIcon } from "@elementor/icons";
|
|
1836
|
-
import { __ as
|
|
1806
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
1837
1807
|
function init17() {
|
|
1838
1808
|
mainMenu.registerLink({
|
|
1839
1809
|
id: "exit-to-wordpress",
|
|
1840
1810
|
group: "exits",
|
|
1841
1811
|
priority: 20,
|
|
1842
1812
|
useProps: () => {
|
|
1843
|
-
const document2 =
|
|
1813
|
+
const document2 = useActiveDocument9();
|
|
1844
1814
|
return {
|
|
1845
|
-
title:
|
|
1815
|
+
title: __29("Exit to WordPress", "elementor"),
|
|
1846
1816
|
href: document2?.links?.platformEdit,
|
|
1847
1817
|
icon: WordpressIcon,
|
|
1848
1818
|
onClick: () => {
|