@elementor/editor-app-bar 0.6.8 → 0.7.0
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/CHANGELOG.md +19 -0
- package/dist/index.d.mts +45 -1
- package/dist/index.d.ts +45 -1
- package/dist/index.js +222 -169
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +192 -130
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/components/__tests__/top-bar.test.tsx +4 -4
- package/src/components/locations/__tests__/locations-components.test.tsx +4 -4
- package/src/components/locations/__tests__/menus.test.tsx +39 -8
- package/src/components/locations/integrations-menu-location.tsx +59 -0
- package/src/components/locations/main-menu-location.tsx +9 -21
- package/src/components/ui/popover-sub-menu.tsx +29 -0
- package/src/components/ui/toolbar-logo.tsx +2 -2
- package/src/extensions/documents-indicator/components/__tests__/settings-button.test.tsx +6 -6
- package/src/extensions/documents-indicator/index.ts +1 -1
- package/src/extensions/documents-save/components/__tests__/primary-action-menu.test.tsx +3 -3
- package/src/extensions/documents-save/components/__tests__/primary-action.test.tsx +24 -24
- package/src/extensions/documents-save/components/primary-action-menu.tsx +2 -1
- package/src/extensions/documents-save/index.ts +1 -1
- package/src/extensions/site-settings/components/__tests__/portalled-primary-action.test.tsx +1 -1
- package/src/extensions/site-settings/components/__tests__/primary-action.test.tsx +2 -2
- package/src/extensions/site-settings/index.ts +1 -1
- package/src/index.ts +1 -0
- package/src/init.ts +1 -1
- package/src/locations/__tests__/menus.test.tsx +28 -30
- package/src/locations/index.ts +2 -0
- package/src/locations/menus.tsx +3 -3
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(src_exports, {
|
|
|
34
34
|
injectIntoPageIndication: () => injectIntoPageIndication,
|
|
35
35
|
injectIntoPrimaryAction: () => injectIntoPrimaryAction,
|
|
36
36
|
injectIntoResponsive: () => injectIntoResponsive,
|
|
37
|
+
integrationsMenu: () => integrationsMenu,
|
|
37
38
|
mainMenu: () => mainMenu,
|
|
38
39
|
toolsMenu: () => toolsMenu,
|
|
39
40
|
utilitiesMenu: () => utilitiesMenu
|
|
@@ -172,12 +173,12 @@ function createMenu(groups = []) {
|
|
|
172
173
|
component: Component
|
|
173
174
|
})
|
|
174
175
|
);
|
|
175
|
-
const
|
|
176
|
+
const useMenuItems6 = createUseMenuItems(locations);
|
|
176
177
|
return {
|
|
177
178
|
registerAction,
|
|
178
179
|
registerToggleAction,
|
|
179
180
|
registerLink,
|
|
180
|
-
useMenuItems:
|
|
181
|
+
useMenuItems: useMenuItems6
|
|
181
182
|
};
|
|
182
183
|
}
|
|
183
184
|
function createRegisterMenuItem({ locations, menuGroups, component }) {
|
|
@@ -187,13 +188,13 @@ function createRegisterMenuItem({ locations, menuGroups, component }) {
|
|
|
187
188
|
}
|
|
188
189
|
const useProps = "props" in args ? () => args.props : args.useProps;
|
|
189
190
|
const Component = component;
|
|
190
|
-
const
|
|
191
|
+
const InjectedComponent = (props) => {
|
|
191
192
|
const componentProps = useProps();
|
|
192
193
|
return /* @__PURE__ */ React8.createElement(Component, { ...props, ...componentProps });
|
|
193
194
|
};
|
|
194
195
|
locations[group].inject({
|
|
195
196
|
id,
|
|
196
|
-
|
|
197
|
+
component: InjectedComponent,
|
|
197
198
|
options: {
|
|
198
199
|
priority,
|
|
199
200
|
overwrite
|
|
@@ -208,7 +209,7 @@ function createUseMenuItems(locations) {
|
|
|
208
209
|
(carry, [groupName, location]) => {
|
|
209
210
|
const items = location.getInjections().map((injection) => ({
|
|
210
211
|
id: injection.id,
|
|
211
|
-
MenuItem: injection.
|
|
212
|
+
MenuItem: injection.component
|
|
212
213
|
}));
|
|
213
214
|
return {
|
|
214
215
|
...carry,
|
|
@@ -238,15 +239,16 @@ var {
|
|
|
238
239
|
var mainMenu = createMenu(["exits"]);
|
|
239
240
|
var toolsMenu = createMenu();
|
|
240
241
|
var utilitiesMenu = createMenu();
|
|
242
|
+
var integrationsMenu = createMenu();
|
|
241
243
|
var documentOptionsMenu = createMenu(["save"]);
|
|
242
244
|
|
|
243
245
|
// src/components/app-bar.tsx
|
|
244
|
-
var
|
|
245
|
-
var
|
|
246
|
+
var React21 = __toESM(require("react"));
|
|
247
|
+
var import_ui12 = require("@elementor/ui");
|
|
246
248
|
|
|
247
249
|
// src/components/locations/main-menu-location.tsx
|
|
248
|
-
var
|
|
249
|
-
var
|
|
250
|
+
var React13 = __toESM(require("react"));
|
|
251
|
+
var import_ui8 = require("@elementor/ui");
|
|
250
252
|
|
|
251
253
|
// src/components/ui/popover-menu.tsx
|
|
252
254
|
var React9 = __toESM(require("react"));
|
|
@@ -275,8 +277,8 @@ var import_ui5 = require("@elementor/ui");
|
|
|
275
277
|
var ElementorLogo = (props) => {
|
|
276
278
|
return /* @__PURE__ */ React10.createElement(import_ui5.SvgIcon, { viewBox: "0 0 32 32", ...props }, /* @__PURE__ */ React10.createElement("g", null, /* @__PURE__ */ React10.createElement("circle", { cx: "16", cy: "16", r: "16" }), /* @__PURE__ */ React10.createElement("path", { d: "M11.7 9H9V22.3H11.7V9Z" }), /* @__PURE__ */ React10.createElement("path", { d: "M22.4 9H9V11.7H22.4V9Z" }), /* @__PURE__ */ React10.createElement("path", { d: "M22.4 14.4004H9V17.1004H22.4V14.4004Z" }), /* @__PURE__ */ React10.createElement("path", { d: "M22.4 19.6992H9V22.3992H22.4V19.6992Z" })));
|
|
277
279
|
};
|
|
278
|
-
var StyledToggleButton = (0, import_ui5.styled)(import_ui5.ToggleButton)(() => ({
|
|
279
|
-
|
|
280
|
+
var StyledToggleButton = (0, import_ui5.styled)(import_ui5.ToggleButton)(({ theme }) => ({
|
|
281
|
+
paddingInline: theme.spacing(1),
|
|
280
282
|
"&.MuiToggleButton-root:hover": {
|
|
281
283
|
backgroundColor: "initial"
|
|
282
284
|
},
|
|
@@ -328,113 +330,162 @@ function ToolbarLogo(props) {
|
|
|
328
330
|
);
|
|
329
331
|
}
|
|
330
332
|
|
|
333
|
+
// src/components/locations/integrations-menu-location.tsx
|
|
334
|
+
var React12 = __toESM(require("react"));
|
|
335
|
+
var import_ui7 = require("@elementor/ui");
|
|
336
|
+
var import_i18n2 = require("@wordpress/i18n");
|
|
337
|
+
var import_icons2 = require("@elementor/icons");
|
|
338
|
+
|
|
339
|
+
// src/components/ui/popover-sub-menu.tsx
|
|
340
|
+
var React11 = __toESM(require("react"));
|
|
341
|
+
var import_ui6 = require("@elementor/ui");
|
|
342
|
+
function PopoverSubMenu({ children, ...props }) {
|
|
343
|
+
const theme = (0, import_ui6.useTheme)();
|
|
344
|
+
const isRTL = theme.direction === "rtl";
|
|
345
|
+
return /* @__PURE__ */ React11.createElement(
|
|
346
|
+
PopoverMenu,
|
|
347
|
+
{
|
|
348
|
+
sx: { pointerEvents: "none" },
|
|
349
|
+
PaperProps: {
|
|
350
|
+
sx: {
|
|
351
|
+
// This is a workaround to support RTL in PopoverMenu, since it doesn't support it yet.
|
|
352
|
+
...isRTL ? { marginInlineEnd: -2 } : { marginInlineStart: 2 },
|
|
353
|
+
pointerEvents: "auto"
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
anchorOrigin: { vertical: "center", horizontal: isRTL ? "left" : "right" },
|
|
357
|
+
transformOrigin: { vertical: "center", horizontal: isRTL ? "right" : "left" },
|
|
358
|
+
...props
|
|
359
|
+
},
|
|
360
|
+
children
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// src/components/locations/integrations-menu-location.tsx
|
|
365
|
+
var { useMenuItems } = integrationsMenu;
|
|
366
|
+
var DirectionalChevronIcon = (0, import_ui7.withDirection)(import_icons2.ChevronRightIcon);
|
|
367
|
+
function IntegrationsMenuLocation({ parentPopupState }) {
|
|
368
|
+
const menuItems = useMenuItems();
|
|
369
|
+
const popupState = (0, import_ui7.usePopupState)({
|
|
370
|
+
parentPopupState,
|
|
371
|
+
variant: "popover",
|
|
372
|
+
popupId: "elementor-v2-app-bar-integrations"
|
|
373
|
+
});
|
|
374
|
+
if (menuItems.default.length === 0) {
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(import_ui7.Divider, null), /* @__PURE__ */ React12.createElement(
|
|
378
|
+
import_ui7.MenuItem,
|
|
379
|
+
{
|
|
380
|
+
...(0, import_ui7.bindHover)(popupState),
|
|
381
|
+
...(0, import_ui7.bindFocus)(popupState)
|
|
382
|
+
},
|
|
383
|
+
/* @__PURE__ */ React12.createElement(import_ui7.ListItemIcon, null, /* @__PURE__ */ React12.createElement(import_icons2.PlugIcon, null)),
|
|
384
|
+
/* @__PURE__ */ React12.createElement(import_ui7.ListItemText, { primary: (0, import_i18n2.__)("Integrations", "elementor") }),
|
|
385
|
+
/* @__PURE__ */ React12.createElement(DirectionalChevronIcon, null),
|
|
386
|
+
/* @__PURE__ */ React12.createElement(PopoverSubMenu, { ...(0, import_ui7.bindMenu)(popupState), onClick: popupState.close }, menuItems.default.map(
|
|
387
|
+
({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React12.createElement(IntegrationsMenuItem, { key: id })
|
|
388
|
+
))
|
|
389
|
+
));
|
|
390
|
+
}
|
|
391
|
+
|
|
331
392
|
// src/components/locations/main-menu-location.tsx
|
|
332
|
-
var { useMenuItems } = mainMenu;
|
|
393
|
+
var { useMenuItems: useMenuItems2 } = mainMenu;
|
|
333
394
|
function MainMenuLocation() {
|
|
334
|
-
const menuItems =
|
|
335
|
-
const
|
|
336
|
-
menuItems.default,
|
|
337
|
-
menuItems.exits
|
|
338
|
-
];
|
|
339
|
-
const popupState = (0, import_ui6.usePopupState)({
|
|
395
|
+
const menuItems = useMenuItems2();
|
|
396
|
+
const popupState = (0, import_ui8.usePopupState)({
|
|
340
397
|
variant: "popover",
|
|
341
398
|
popupId: "elementor-v2-app-bar-main-menu"
|
|
342
399
|
});
|
|
343
|
-
return /* @__PURE__ */
|
|
400
|
+
return /* @__PURE__ */ React13.createElement(import_ui8.Stack, { sx: { paddingInlineStart: 3 }, direction: "row", alignItems: "center" }, /* @__PURE__ */ React13.createElement(
|
|
344
401
|
ToolbarLogo,
|
|
345
402
|
{
|
|
346
|
-
...(0,
|
|
403
|
+
...(0, import_ui8.bindTrigger)(popupState),
|
|
347
404
|
selected: popupState.isOpen
|
|
348
405
|
}
|
|
349
|
-
), /* @__PURE__ */
|
|
406
|
+
), /* @__PURE__ */ React13.createElement(
|
|
350
407
|
PopoverMenu,
|
|
351
408
|
{
|
|
352
409
|
onClick: popupState.close,
|
|
353
|
-
...(0,
|
|
354
|
-
|
|
355
|
-
sx: { mt: 4, marginInlineStart: -2 }
|
|
356
|
-
}
|
|
410
|
+
...(0, import_ui8.bindMenu)(popupState),
|
|
411
|
+
marginThreshold: 8
|
|
357
412
|
},
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React11.createElement(MenuItem2, { key: id })
|
|
363
|
-
)
|
|
364
|
-
];
|
|
365
|
-
})
|
|
413
|
+
menuItems.default.map(({ MenuItem: MenuItem3, id }) => /* @__PURE__ */ React13.createElement(MenuItem3, { key: id })),
|
|
414
|
+
/* @__PURE__ */ React13.createElement(IntegrationsMenuLocation, { key: "integrations-location", parentPopupState: popupState }),
|
|
415
|
+
menuItems.exits.length > 0 && /* @__PURE__ */ React13.createElement(import_ui8.Divider, null),
|
|
416
|
+
menuItems.exits.map(({ MenuItem: MenuItem3, id }) => /* @__PURE__ */ React13.createElement(MenuItem3, { key: id }))
|
|
366
417
|
));
|
|
367
418
|
}
|
|
368
419
|
|
|
369
420
|
// src/components/locations/tools-menu-location.tsx
|
|
370
|
-
var
|
|
421
|
+
var React16 = __toESM(require("react"));
|
|
371
422
|
|
|
372
423
|
// src/components/ui/toolbar-menu.tsx
|
|
373
|
-
var
|
|
374
|
-
var
|
|
424
|
+
var React14 = __toESM(require("react"));
|
|
425
|
+
var import_ui9 = require("@elementor/ui");
|
|
375
426
|
function ToolbarMenu({ children, ...props }) {
|
|
376
|
-
return /* @__PURE__ */
|
|
427
|
+
return /* @__PURE__ */ React14.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React14.createElement(import_ui9.Stack, { sx: { px: 4 }, spacing: 4, direction: "row", alignItems: "center", ...props }, children));
|
|
377
428
|
}
|
|
378
429
|
|
|
379
430
|
// src/components/ui/toolbar-menu-more.tsx
|
|
380
|
-
var
|
|
381
|
-
var
|
|
382
|
-
var
|
|
383
|
-
var
|
|
431
|
+
var React15 = __toESM(require("react"));
|
|
432
|
+
var import_ui10 = require("@elementor/ui");
|
|
433
|
+
var import_i18n3 = require("@wordpress/i18n");
|
|
434
|
+
var import_icons3 = require("@elementor/icons");
|
|
384
435
|
function ToolbarMenuMore({ children, id }) {
|
|
385
|
-
const popupState = (0,
|
|
436
|
+
const popupState = (0, import_ui10.usePopupState)({
|
|
386
437
|
variant: "popover",
|
|
387
438
|
popupId: id
|
|
388
439
|
});
|
|
389
|
-
return /* @__PURE__ */
|
|
440
|
+
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(ToolbarMenuItem, { ...(0, import_ui10.bindTrigger)(popupState), title: (0, import_i18n3.__)("More", "elementor") }, /* @__PURE__ */ React15.createElement(import_icons3.DotsVerticalIcon, null)), /* @__PURE__ */ React15.createElement(PopoverMenu, { onClick: popupState.close, ...(0, import_ui10.bindMenu)(popupState) }, children));
|
|
390
441
|
}
|
|
391
442
|
|
|
392
443
|
// src/components/locations/tools-menu-location.tsx
|
|
393
444
|
var MAX_TOOLBAR_ACTIONS = 5;
|
|
394
|
-
var { useMenuItems:
|
|
445
|
+
var { useMenuItems: useMenuItems3 } = toolsMenu;
|
|
395
446
|
function ToolsMenuLocation() {
|
|
396
|
-
const menuItems =
|
|
447
|
+
const menuItems = useMenuItems3();
|
|
397
448
|
const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS);
|
|
398
449
|
const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS);
|
|
399
|
-
return /* @__PURE__ */
|
|
450
|
+
return /* @__PURE__ */ React16.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem3, id }) => /* @__PURE__ */ React16.createElement(MenuItem3, { key: id })), popoverMenuItems.length > 0 && /* @__PURE__ */ React16.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-tools-more" }, popoverMenuItems.map(({ MenuItem: MenuItem3, id }) => /* @__PURE__ */ React16.createElement(MenuItem3, { key: id }))));
|
|
400
451
|
}
|
|
401
452
|
|
|
402
453
|
// src/components/locations/utilities-menu-location.tsx
|
|
403
|
-
var
|
|
454
|
+
var React17 = __toESM(require("react"));
|
|
404
455
|
var import_react4 = require("react");
|
|
405
|
-
var
|
|
456
|
+
var import_ui11 = require("@elementor/ui");
|
|
406
457
|
var MAX_TOOLBAR_ACTIONS2 = 3;
|
|
407
|
-
var { useMenuItems:
|
|
458
|
+
var { useMenuItems: useMenuItems4 } = utilitiesMenu;
|
|
408
459
|
function UtilitiesMenuLocation() {
|
|
409
|
-
const menuItems =
|
|
460
|
+
const menuItems = useMenuItems4();
|
|
410
461
|
const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS2);
|
|
411
462
|
const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS2);
|
|
412
|
-
return /* @__PURE__ */
|
|
413
|
-
({ MenuItem:
|
|
414
|
-
), popoverMenuItems.length > 0 && /* @__PURE__ */
|
|
463
|
+
return /* @__PURE__ */ React17.createElement(ToolbarMenu, null, toolbarMenuItems.map(
|
|
464
|
+
({ MenuItem: MenuItem3, id }, index) => /* @__PURE__ */ React17.createElement(import_react4.Fragment, { key: id }, index === 0 && /* @__PURE__ */ React17.createElement(import_ui11.Divider, { orientation: "vertical" }), /* @__PURE__ */ React17.createElement(MenuItem3, null))
|
|
465
|
+
), popoverMenuItems.length > 0 && /* @__PURE__ */ React17.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-utilities-more" }, popoverMenuItems.map(({ MenuItem: MenuItem3, id }) => /* @__PURE__ */ React17.createElement(MenuItem3, { key: id }))));
|
|
415
466
|
}
|
|
416
467
|
|
|
417
468
|
// src/components/locations/primary-action-location.tsx
|
|
418
|
-
var
|
|
469
|
+
var React18 = __toESM(require("react"));
|
|
419
470
|
function PrimaryActionLocation() {
|
|
420
|
-
return /* @__PURE__ */
|
|
471
|
+
return /* @__PURE__ */ React18.createElement(PrimaryActionSlot, null);
|
|
421
472
|
}
|
|
422
473
|
|
|
423
474
|
// src/components/locations/page-indication-location.tsx
|
|
424
|
-
var
|
|
475
|
+
var React19 = __toESM(require("react"));
|
|
425
476
|
function PageIndicationLocation() {
|
|
426
|
-
return /* @__PURE__ */
|
|
477
|
+
return /* @__PURE__ */ React19.createElement(PageIndicationSlot, null);
|
|
427
478
|
}
|
|
428
479
|
|
|
429
480
|
// src/components/locations/responsive-location.tsx
|
|
430
|
-
var
|
|
481
|
+
var React20 = __toESM(require("react"));
|
|
431
482
|
function ResponsiveLocation() {
|
|
432
|
-
return /* @__PURE__ */
|
|
483
|
+
return /* @__PURE__ */ React20.createElement(ResponsiveSlot, null);
|
|
433
484
|
}
|
|
434
485
|
|
|
435
486
|
// src/components/app-bar.tsx
|
|
436
487
|
function AppBar() {
|
|
437
|
-
return /* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ React21.createElement(import_ui12.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React21.createElement(import_ui12.AppBar, { position: "sticky" }, /* @__PURE__ */ React21.createElement(import_ui12.Box, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)" }, /* @__PURE__ */ React21.createElement(import_ui12.Grid, { container: true }, /* @__PURE__ */ React21.createElement(MainMenuLocation, null), /* @__PURE__ */ React21.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React21.createElement(import_ui12.Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React21.createElement(ToolbarMenu, { spacing: 3 }, /* @__PURE__ */ React21.createElement(import_ui12.Divider, { orientation: "vertical" }), /* @__PURE__ */ React21.createElement(PageIndicationLocation, null), /* @__PURE__ */ React21.createElement(import_ui12.Divider, { orientation: "vertical" }), /* @__PURE__ */ React21.createElement(ResponsiveLocation, null), /* @__PURE__ */ React21.createElement(import_ui12.Divider, { orientation: "vertical" }))), /* @__PURE__ */ React21.createElement(import_ui12.Grid, { container: true, justifyContent: "flex-end" }, /* @__PURE__ */ React21.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React21.createElement(PrimaryActionLocation, null)))));
|
|
438
489
|
}
|
|
439
490
|
|
|
440
491
|
// src/init.ts
|
|
@@ -449,11 +500,11 @@ function redirectOldMenus() {
|
|
|
449
500
|
}
|
|
450
501
|
|
|
451
502
|
// src/extensions/documents-indicator/components/settings-button.tsx
|
|
452
|
-
var
|
|
453
|
-
var
|
|
454
|
-
var
|
|
503
|
+
var React22 = __toESM(require("react"));
|
|
504
|
+
var import_ui13 = require("@elementor/ui");
|
|
505
|
+
var import_i18n4 = require("@wordpress/i18n");
|
|
455
506
|
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
456
|
-
var
|
|
507
|
+
var import_icons4 = require("@elementor/icons");
|
|
457
508
|
var import_editor_documents = require("@elementor/editor-documents");
|
|
458
509
|
function SettingsButton() {
|
|
459
510
|
const activeDocument = (0, import_editor_documents.useActiveDocument)();
|
|
@@ -463,9 +514,9 @@ function SettingsButton() {
|
|
|
463
514
|
if (!document2) {
|
|
464
515
|
return null;
|
|
465
516
|
}
|
|
466
|
-
const title = (0,
|
|
467
|
-
return /* @__PURE__ */
|
|
468
|
-
|
|
517
|
+
const title = (0, import_i18n4.__)("%s Settings", "elementor").replace("%s", document2.type.label);
|
|
518
|
+
return /* @__PURE__ */ React22.createElement(import_ui13.Tooltip, { title }, /* @__PURE__ */ React22.createElement(import_ui13.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React22.createElement(
|
|
519
|
+
import_ui13.ToggleButton,
|
|
469
520
|
{
|
|
470
521
|
value: "document-settings",
|
|
471
522
|
selected: isActive,
|
|
@@ -474,7 +525,7 @@ function SettingsButton() {
|
|
|
474
525
|
"aria-label": title,
|
|
475
526
|
size: "small"
|
|
476
527
|
},
|
|
477
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ React22.createElement(import_icons4.SettingsIcon, null)
|
|
478
529
|
)));
|
|
479
530
|
}
|
|
480
531
|
|
|
@@ -482,7 +533,7 @@ function SettingsButton() {
|
|
|
482
533
|
function init() {
|
|
483
534
|
injectIntoPageIndication({
|
|
484
535
|
id: "document-settings-button",
|
|
485
|
-
|
|
536
|
+
component: SettingsButton,
|
|
486
537
|
options: {
|
|
487
538
|
priority: 20
|
|
488
539
|
// After document indicator.
|
|
@@ -491,15 +542,15 @@ function init() {
|
|
|
491
542
|
}
|
|
492
543
|
|
|
493
544
|
// src/extensions/documents-preview/hooks/use-action-props.ts
|
|
494
|
-
var
|
|
495
|
-
var
|
|
545
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
546
|
+
var import_icons5 = require("@elementor/icons");
|
|
496
547
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
497
548
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
498
549
|
function useActionProps() {
|
|
499
550
|
const document2 = (0, import_editor_documents2.useActiveDocument)();
|
|
500
551
|
return {
|
|
501
|
-
icon:
|
|
502
|
-
title: (0,
|
|
552
|
+
icon: import_icons5.EyeIcon,
|
|
553
|
+
title: (0, import_i18n5.__)("Preview Changes", "elementor"),
|
|
503
554
|
onClick: () => document2 && (0, import_editor_v1_adapters3.runCommand)("editor/documents/preview", {
|
|
504
555
|
id: document2.id,
|
|
505
556
|
force: true
|
|
@@ -518,42 +569,42 @@ function init2() {
|
|
|
518
569
|
}
|
|
519
570
|
|
|
520
571
|
// src/extensions/documents-save/hooks/use-document-save-draft-props.ts
|
|
521
|
-
var
|
|
522
|
-
var
|
|
572
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
573
|
+
var import_icons6 = require("@elementor/icons");
|
|
523
574
|
var import_editor_documents3 = require("@elementor/editor-documents");
|
|
524
575
|
function useDocumentSaveDraftProps() {
|
|
525
576
|
const document2 = (0, import_editor_documents3.useActiveDocument)();
|
|
526
577
|
const { saveDraft } = (0, import_editor_documents3.useActiveDocumentActions)();
|
|
527
578
|
return {
|
|
528
|
-
icon:
|
|
529
|
-
title: (0,
|
|
579
|
+
icon: import_icons6.FileReportIcon,
|
|
580
|
+
title: (0, import_i18n6.__)("Save Draft", "elementor"),
|
|
530
581
|
onClick: saveDraft,
|
|
531
582
|
disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
|
|
532
583
|
};
|
|
533
584
|
}
|
|
534
585
|
|
|
535
586
|
// src/extensions/documents-save/hooks/use-document-save-template-props.ts
|
|
536
|
-
var
|
|
537
|
-
var
|
|
587
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
588
|
+
var import_icons7 = require("@elementor/icons");
|
|
538
589
|
var import_editor_documents4 = require("@elementor/editor-documents");
|
|
539
590
|
function useDocumentSaveTemplateProps() {
|
|
540
591
|
const { saveTemplate } = (0, import_editor_documents4.useActiveDocumentActions)();
|
|
541
592
|
return {
|
|
542
|
-
icon:
|
|
543
|
-
title: (0,
|
|
593
|
+
icon: import_icons7.FolderIcon,
|
|
594
|
+
title: (0, import_i18n7.__)("Save as Template", "elementor"),
|
|
544
595
|
onClick: saveTemplate
|
|
545
596
|
};
|
|
546
597
|
}
|
|
547
598
|
|
|
548
599
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
549
|
-
var
|
|
550
|
-
var
|
|
600
|
+
var React24 = __toESM(require("react"));
|
|
601
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
551
602
|
|
|
552
603
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
553
|
-
var
|
|
554
|
-
var
|
|
555
|
-
var { useMenuItems:
|
|
556
|
-
var StyledPopoverMenu = (0,
|
|
604
|
+
var React23 = __toESM(require("react"));
|
|
605
|
+
var import_ui14 = require("@elementor/ui");
|
|
606
|
+
var { useMenuItems: useMenuItems5 } = documentOptionsMenu;
|
|
607
|
+
var StyledPopoverMenu = (0, import_ui14.styled)(PopoverMenu)`
|
|
557
608
|
& > .MuiPopover-paper > .MuiList-root > .MuiDivider-root {
|
|
558
609
|
&:only-child, /* A divider is being rendered lonely */
|
|
559
610
|
&:last-child, /* The last group renders empty but renders a divider */
|
|
@@ -563,8 +614,8 @@ var StyledPopoverMenu = (0, import_ui12.styled)(PopoverMenu)`
|
|
|
563
614
|
}
|
|
564
615
|
`;
|
|
565
616
|
function PrimaryActionMenu(props) {
|
|
566
|
-
const { save: saveActions, default: defaultActions } =
|
|
567
|
-
return /* @__PURE__ */
|
|
617
|
+
const { save: saveActions, default: defaultActions } = useMenuItems5();
|
|
618
|
+
return /* @__PURE__ */ React23.createElement(
|
|
568
619
|
StyledPopoverMenu,
|
|
569
620
|
{
|
|
570
621
|
...props,
|
|
@@ -576,27 +627,28 @@ function PrimaryActionMenu(props) {
|
|
|
576
627
|
vertical: "top",
|
|
577
628
|
horizontal: "right"
|
|
578
629
|
},
|
|
630
|
+
marginThreshold: 8,
|
|
579
631
|
PaperProps: {
|
|
580
|
-
sx: { mt: 2
|
|
632
|
+
sx: { mt: 2 }
|
|
581
633
|
}
|
|
582
634
|
},
|
|
583
|
-
saveActions.map(({ MenuItem:
|
|
584
|
-
index > 0 && /* @__PURE__ */
|
|
585
|
-
/* @__PURE__ */
|
|
635
|
+
saveActions.map(({ MenuItem: MenuItem3, id }, index) => [
|
|
636
|
+
index > 0 && /* @__PURE__ */ React23.createElement(import_ui14.Divider, { key: `${id}-divider` }),
|
|
637
|
+
/* @__PURE__ */ React23.createElement(MenuItem3, { key: id })
|
|
586
638
|
]),
|
|
587
|
-
defaultActions.length > 0 && /* @__PURE__ */
|
|
588
|
-
defaultActions.map(({ MenuItem:
|
|
639
|
+
defaultActions.length > 0 && /* @__PURE__ */ React23.createElement(import_ui14.Divider, null),
|
|
640
|
+
defaultActions.map(({ MenuItem: MenuItem3, id }) => /* @__PURE__ */ React23.createElement(MenuItem3, { key: id }))
|
|
589
641
|
);
|
|
590
642
|
}
|
|
591
643
|
|
|
592
644
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
593
|
-
var
|
|
645
|
+
var import_ui15 = require("@elementor/ui");
|
|
594
646
|
var import_editor_documents5 = require("@elementor/editor-documents");
|
|
595
|
-
var
|
|
647
|
+
var import_icons8 = require("@elementor/icons");
|
|
596
648
|
function PrimaryAction() {
|
|
597
649
|
const document2 = (0, import_editor_documents5.useActiveDocument)();
|
|
598
650
|
const { save } = (0, import_editor_documents5.useActiveDocumentActions)();
|
|
599
|
-
const popupState = (0,
|
|
651
|
+
const popupState = (0, import_ui15.usePopupState)({
|
|
600
652
|
variant: "popover",
|
|
601
653
|
popupId: "document-save-options"
|
|
602
654
|
});
|
|
@@ -605,8 +657,8 @@ function PrimaryAction() {
|
|
|
605
657
|
}
|
|
606
658
|
const isDisabled = !isEnabled(document2);
|
|
607
659
|
const shouldShowSpinner = document2.isSaving && !isDisabled;
|
|
608
|
-
return /* @__PURE__ */
|
|
609
|
-
|
|
660
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(import_ui15.ButtonGroup, { size: "medium", variant: "contained" }, /* @__PURE__ */ React24.createElement(
|
|
661
|
+
import_ui15.Button,
|
|
610
662
|
{
|
|
611
663
|
onClick: () => !document2.isSaving && save(),
|
|
612
664
|
sx: {
|
|
@@ -619,11 +671,11 @@ function PrimaryAction() {
|
|
|
619
671
|
},
|
|
620
672
|
disabled: isDisabled
|
|
621
673
|
},
|
|
622
|
-
shouldShowSpinner ? /* @__PURE__ */
|
|
623
|
-
), /* @__PURE__ */
|
|
624
|
-
|
|
674
|
+
shouldShowSpinner ? /* @__PURE__ */ React24.createElement(import_ui15.CircularProgress, null) : getLabel(document2)
|
|
675
|
+
), /* @__PURE__ */ React24.createElement(
|
|
676
|
+
import_ui15.Tooltip,
|
|
625
677
|
{
|
|
626
|
-
title: (0,
|
|
678
|
+
title: (0, import_i18n8.__)("Save Options", "elementor"),
|
|
627
679
|
PopperProps: {
|
|
628
680
|
sx: {
|
|
629
681
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -633,20 +685,20 @@ function PrimaryAction() {
|
|
|
633
685
|
}
|
|
634
686
|
}
|
|
635
687
|
},
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
|
|
688
|
+
/* @__PURE__ */ React24.createElement(import_ui15.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React24.createElement(
|
|
689
|
+
import_ui15.Button,
|
|
638
690
|
{
|
|
639
|
-
...(0,
|
|
691
|
+
...(0, import_ui15.bindTrigger)(popupState),
|
|
640
692
|
sx: { px: 0, height: "100%" },
|
|
641
693
|
disabled: document2.type.value === "kit",
|
|
642
|
-
"aria-label": (0,
|
|
694
|
+
"aria-label": (0, import_i18n8.__)("Save Options", "elementor")
|
|
643
695
|
},
|
|
644
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ React24.createElement(import_icons8.ChevronDownIcon, null)
|
|
645
697
|
))
|
|
646
|
-
)), /* @__PURE__ */
|
|
698
|
+
)), /* @__PURE__ */ React24.createElement(PrimaryActionMenu, { ...(0, import_ui15.bindMenu)(popupState), onClick: popupState.close }));
|
|
647
699
|
}
|
|
648
700
|
function getLabel(document2) {
|
|
649
|
-
return document2.userCan.publish ? (0,
|
|
701
|
+
return document2.userCan.publish ? (0, import_i18n8.__)("Publish", "elementor") : (0, import_i18n8.__)("Submit", "elementor");
|
|
650
702
|
}
|
|
651
703
|
function isEnabled(document2) {
|
|
652
704
|
if (document2.type.value === "kit") {
|
|
@@ -659,7 +711,7 @@ function isEnabled(document2) {
|
|
|
659
711
|
function init3() {
|
|
660
712
|
injectIntoPrimaryAction({
|
|
661
713
|
id: "document-primary-action",
|
|
662
|
-
|
|
714
|
+
component: PrimaryAction
|
|
663
715
|
});
|
|
664
716
|
documentOptionsMenu.registerAction({
|
|
665
717
|
group: "save",
|
|
@@ -678,11 +730,11 @@ function init3() {
|
|
|
678
730
|
}
|
|
679
731
|
|
|
680
732
|
// src/extensions/elements/sync/sync-panel-title.ts
|
|
681
|
-
var
|
|
733
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
682
734
|
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
683
735
|
function syncPanelTitle() {
|
|
684
|
-
const panelTitle = (0,
|
|
685
|
-
const tabTitle = (0,
|
|
736
|
+
const panelTitle = (0, import_i18n9.__)("Elements", "elementor");
|
|
737
|
+
const tabTitle = (0, import_i18n9.__)("Widgets", "elementor");
|
|
686
738
|
(0, import_editor_v1_adapters4.listenTo)(
|
|
687
739
|
(0, import_editor_v1_adapters4.routeOpenEvent)("panel/elements"),
|
|
688
740
|
() => {
|
|
@@ -711,14 +763,14 @@ function setTabTitle(title) {
|
|
|
711
763
|
}
|
|
712
764
|
|
|
713
765
|
// src/extensions/elements/hooks/use-action-props.ts
|
|
714
|
-
var
|
|
715
|
-
var
|
|
766
|
+
var import_icons9 = require("@elementor/icons");
|
|
767
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
716
768
|
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
717
769
|
function useActionProps2() {
|
|
718
770
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters5.useRouteStatus)("panel/elements");
|
|
719
771
|
return {
|
|
720
|
-
title: (0,
|
|
721
|
-
icon:
|
|
772
|
+
title: (0, import_i18n10.__)("Add Element", "elementor"),
|
|
773
|
+
icon: import_icons9.PlusIcon,
|
|
722
774
|
onClick: () => (0, import_editor_v1_adapters5.openRoute)("panel/elements/categories"),
|
|
723
775
|
selected: isActive,
|
|
724
776
|
disabled: isBlocked
|
|
@@ -736,8 +788,8 @@ function init4() {
|
|
|
736
788
|
}
|
|
737
789
|
|
|
738
790
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
739
|
-
var
|
|
740
|
-
var
|
|
791
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
792
|
+
var import_icons10 = require("@elementor/icons");
|
|
741
793
|
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
742
794
|
function useActionProps3() {
|
|
743
795
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters6.useRouteStatus)("finder", {
|
|
@@ -745,8 +797,8 @@ function useActionProps3() {
|
|
|
745
797
|
blockOnPreviewMode: false
|
|
746
798
|
});
|
|
747
799
|
return {
|
|
748
|
-
title: (0,
|
|
749
|
-
icon:
|
|
800
|
+
title: (0, import_i18n11.__)("Finder", "elementor"),
|
|
801
|
+
icon: import_icons10.SearchIcon,
|
|
750
802
|
onClick: () => (0, import_editor_v1_adapters6.runCommand)("finder/toggle"),
|
|
751
803
|
selected: isActive,
|
|
752
804
|
disabled: isBlocked
|
|
@@ -764,8 +816,8 @@ function init5() {
|
|
|
764
816
|
}
|
|
765
817
|
|
|
766
818
|
// src/extensions/help/index.ts
|
|
767
|
-
var
|
|
768
|
-
var
|
|
819
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
820
|
+
var import_icons11 = require("@elementor/icons");
|
|
769
821
|
function init6() {
|
|
770
822
|
utilitiesMenu.registerLink({
|
|
771
823
|
id: "open-help-center",
|
|
@@ -773,9 +825,9 @@ function init6() {
|
|
|
773
825
|
// After Finder.
|
|
774
826
|
useProps: () => {
|
|
775
827
|
return {
|
|
776
|
-
title: (0,
|
|
828
|
+
title: (0, import_i18n12.__)("Help", "elementor"),
|
|
777
829
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
778
|
-
icon:
|
|
830
|
+
icon: import_icons11.HelpIcon,
|
|
779
831
|
target: "_blank"
|
|
780
832
|
};
|
|
781
833
|
}
|
|
@@ -783,14 +835,14 @@ function init6() {
|
|
|
783
835
|
}
|
|
784
836
|
|
|
785
837
|
// src/extensions/history/hooks/use-action-props.ts
|
|
786
|
-
var
|
|
787
|
-
var
|
|
838
|
+
var import_icons12 = require("@elementor/icons");
|
|
839
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
788
840
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
789
841
|
function useActionProps4() {
|
|
790
842
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters7.useRouteStatus)("panel/history");
|
|
791
843
|
return {
|
|
792
|
-
title: (0,
|
|
793
|
-
icon:
|
|
844
|
+
title: (0, import_i18n13.__)("History", "elementor"),
|
|
845
|
+
icon: import_icons12.HistoryIcon,
|
|
794
846
|
onClick: () => (0, import_editor_v1_adapters7.openRoute)("panel/history/actions"),
|
|
795
847
|
selected: isActive,
|
|
796
848
|
disabled: isBlocked
|
|
@@ -807,13 +859,13 @@ function init7() {
|
|
|
807
859
|
}
|
|
808
860
|
|
|
809
861
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
810
|
-
var
|
|
811
|
-
var
|
|
862
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
863
|
+
var import_icons13 = require("@elementor/icons");
|
|
812
864
|
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
813
865
|
function useActionProps5() {
|
|
814
866
|
return {
|
|
815
|
-
icon:
|
|
816
|
-
title: (0,
|
|
867
|
+
icon: import_icons13.KeyboardIcon,
|
|
868
|
+
title: (0, import_i18n14.__)("Keyboard Shortcuts", "elementor"),
|
|
817
869
|
onClick: () => (0, import_editor_v1_adapters8.runCommand)("shortcuts/open")
|
|
818
870
|
};
|
|
819
871
|
}
|
|
@@ -833,11 +885,11 @@ function init8() {
|
|
|
833
885
|
var import_editor = require("@elementor/editor");
|
|
834
886
|
|
|
835
887
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
836
|
-
var
|
|
888
|
+
var React27 = __toESM(require("react"));
|
|
837
889
|
|
|
838
890
|
// src/extensions/site-settings/components/portal.tsx
|
|
839
|
-
var
|
|
840
|
-
var
|
|
891
|
+
var React25 = __toESM(require("react"));
|
|
892
|
+
var import_ui16 = require("@elementor/ui");
|
|
841
893
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
842
894
|
function Portal(props) {
|
|
843
895
|
const containerRef = (0, import_editor_v1_adapters9.useListenTo)(
|
|
@@ -850,27 +902,27 @@ function Portal(props) {
|
|
|
850
902
|
if (!containerRef.current) {
|
|
851
903
|
return null;
|
|
852
904
|
}
|
|
853
|
-
return /* @__PURE__ */
|
|
905
|
+
return /* @__PURE__ */ React25.createElement(import_ui16.Portal, { container: containerRef.current, ...props });
|
|
854
906
|
}
|
|
855
907
|
function getContainerRef() {
|
|
856
908
|
return (0, import_editor_v1_adapters9.isRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
|
|
857
909
|
}
|
|
858
910
|
|
|
859
911
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
860
|
-
var
|
|
912
|
+
var React26 = __toESM(require("react"));
|
|
861
913
|
var import_editor_documents6 = require("@elementor/editor-documents");
|
|
862
|
-
var
|
|
863
|
-
var
|
|
914
|
+
var import_ui17 = require("@elementor/ui");
|
|
915
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
864
916
|
function PrimaryAction2() {
|
|
865
917
|
const document2 = (0, import_editor_documents6.useActiveDocument)();
|
|
866
918
|
const { save } = (0, import_editor_documents6.useActiveDocumentActions)();
|
|
867
|
-
return /* @__PURE__ */
|
|
919
|
+
return /* @__PURE__ */ React26.createElement(import_ui17.Paper, { sx: {
|
|
868
920
|
px: 5,
|
|
869
921
|
py: 4,
|
|
870
922
|
borderTop: 1,
|
|
871
923
|
borderColor: "divider"
|
|
872
|
-
} }, /* @__PURE__ */
|
|
873
|
-
|
|
924
|
+
} }, /* @__PURE__ */ React26.createElement(
|
|
925
|
+
import_ui17.Button,
|
|
874
926
|
{
|
|
875
927
|
variant: "contained",
|
|
876
928
|
disabled: !document2 || !document2.isDirty,
|
|
@@ -878,26 +930,26 @@ function PrimaryAction2() {
|
|
|
878
930
|
sx: { width: "100%" },
|
|
879
931
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
880
932
|
},
|
|
881
|
-
document2?.isSaving ? /* @__PURE__ */
|
|
933
|
+
document2?.isSaving ? /* @__PURE__ */ React26.createElement(import_ui17.CircularProgress, null) : (0, import_i18n15.__)("Save Changes", "elementor")
|
|
882
934
|
));
|
|
883
935
|
}
|
|
884
936
|
|
|
885
937
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
886
938
|
function PortalledPrimaryAction() {
|
|
887
|
-
return /* @__PURE__ */
|
|
939
|
+
return /* @__PURE__ */ React27.createElement(Portal, null, /* @__PURE__ */ React27.createElement(PrimaryAction2, null));
|
|
888
940
|
}
|
|
889
941
|
|
|
890
942
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
891
|
-
var
|
|
943
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
892
944
|
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
893
|
-
var
|
|
945
|
+
var import_icons14 = require("@elementor/icons");
|
|
894
946
|
function useActionProps6() {
|
|
895
947
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters10.useRouteStatus)("panel/global", {
|
|
896
948
|
blockOnKitRoutes: false
|
|
897
949
|
});
|
|
898
950
|
return {
|
|
899
|
-
title: (0,
|
|
900
|
-
icon:
|
|
951
|
+
title: (0, import_i18n16.__)("Site Settings", "elementor"),
|
|
952
|
+
icon: import_icons14.AdjustmentsHorizontalIcon,
|
|
901
953
|
onClick: () => isActive ? (0, import_editor_v1_adapters10.runCommand)("panel/global/close") : (0, import_editor_v1_adapters10.runCommand)("panel/global/open"),
|
|
902
954
|
selected: isActive,
|
|
903
955
|
disabled: isBlocked
|
|
@@ -908,7 +960,7 @@ function useActionProps6() {
|
|
|
908
960
|
function init9() {
|
|
909
961
|
(0, import_editor.injectIntoTop)({
|
|
910
962
|
id: "site-settings-primary-action-portal",
|
|
911
|
-
|
|
963
|
+
component: PortalledPrimaryAction
|
|
912
964
|
});
|
|
913
965
|
toolsMenu.registerToggleAction({
|
|
914
966
|
id: "toggle-site-settings",
|
|
@@ -918,14 +970,14 @@ function init9() {
|
|
|
918
970
|
}
|
|
919
971
|
|
|
920
972
|
// src/extensions/structure/hooks/use-action-props.ts
|
|
921
|
-
var
|
|
973
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
922
974
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
923
|
-
var
|
|
975
|
+
var import_icons15 = require("@elementor/icons");
|
|
924
976
|
function useActionProps7() {
|
|
925
977
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters11.useRouteStatus)("navigator");
|
|
926
978
|
return {
|
|
927
|
-
title: (0,
|
|
928
|
-
icon:
|
|
979
|
+
title: (0, import_i18n17.__)("Structure", "elementor"),
|
|
980
|
+
icon: import_icons15.StructureIcon,
|
|
929
981
|
onClick: () => (0, import_editor_v1_adapters11.runCommand)("navigator/toggle"),
|
|
930
982
|
selected: isActive,
|
|
931
983
|
disabled: isBlocked
|
|
@@ -942,13 +994,13 @@ function init10() {
|
|
|
942
994
|
}
|
|
943
995
|
|
|
944
996
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
945
|
-
var
|
|
946
|
-
var
|
|
997
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
998
|
+
var import_icons16 = require("@elementor/icons");
|
|
947
999
|
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
948
1000
|
function useActionProps8() {
|
|
949
1001
|
return {
|
|
950
|
-
icon:
|
|
951
|
-
title: (0,
|
|
1002
|
+
icon: import_icons16.ThemeBuilderIcon,
|
|
1003
|
+
title: (0, import_i18n18.__)("Theme Builder", "elementor"),
|
|
952
1004
|
onClick: () => (0, import_editor_v1_adapters12.runCommand)("app/open")
|
|
953
1005
|
};
|
|
954
1006
|
}
|
|
@@ -962,14 +1014,14 @@ function init11() {
|
|
|
962
1014
|
}
|
|
963
1015
|
|
|
964
1016
|
// src/extensions/user-preferences/hooks/use-action-props.ts
|
|
965
|
-
var
|
|
966
|
-
var
|
|
1017
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
1018
|
+
var import_icons17 = require("@elementor/icons");
|
|
967
1019
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
968
1020
|
function useActionProps9() {
|
|
969
1021
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters13.useRouteStatus)("panel/editor-preferences");
|
|
970
1022
|
return {
|
|
971
|
-
icon:
|
|
972
|
-
title: (0,
|
|
1023
|
+
icon: import_icons17.ToggleRightIcon,
|
|
1024
|
+
title: (0, import_i18n19.__)("User Preferences", "elementor"),
|
|
973
1025
|
onClick: () => (0, import_editor_v1_adapters13.openRoute)("panel/editor-preferences"),
|
|
974
1026
|
selected: isActive,
|
|
975
1027
|
disabled: isBlocked
|
|
@@ -987,8 +1039,8 @@ function init12() {
|
|
|
987
1039
|
}
|
|
988
1040
|
|
|
989
1041
|
// src/extensions/wordpress/index.ts
|
|
990
|
-
var
|
|
991
|
-
var
|
|
1042
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
1043
|
+
var import_icons18 = require("@elementor/icons");
|
|
992
1044
|
var import_editor_documents7 = require("@elementor/editor-documents");
|
|
993
1045
|
function init13() {
|
|
994
1046
|
mainMenu.registerLink({
|
|
@@ -997,9 +1049,9 @@ function init13() {
|
|
|
997
1049
|
useProps: () => {
|
|
998
1050
|
const document2 = (0, import_editor_documents7.useActiveDocument)();
|
|
999
1051
|
return {
|
|
1000
|
-
title: (0,
|
|
1052
|
+
title: (0, import_i18n20.__)("Exit to WordPress", "elementor"),
|
|
1001
1053
|
href: document2?.links?.platformEdit,
|
|
1002
|
-
icon:
|
|
1054
|
+
icon: import_icons18.WordpressIcon
|
|
1003
1055
|
};
|
|
1004
1056
|
}
|
|
1005
1057
|
});
|
|
@@ -1028,7 +1080,7 @@ function init15() {
|
|
|
1028
1080
|
init14();
|
|
1029
1081
|
(0, import_editor2.injectIntoTop)({
|
|
1030
1082
|
id: "app-bar",
|
|
1031
|
-
|
|
1083
|
+
component: AppBar
|
|
1032
1084
|
});
|
|
1033
1085
|
}
|
|
1034
1086
|
|
|
@@ -1040,6 +1092,7 @@ init15();
|
|
|
1040
1092
|
injectIntoPageIndication,
|
|
1041
1093
|
injectIntoPrimaryAction,
|
|
1042
1094
|
injectIntoResponsive,
|
|
1095
|
+
integrationsMenu,
|
|
1043
1096
|
mainMenu,
|
|
1044
1097
|
toolsMenu,
|
|
1045
1098
|
utilitiesMenu
|