@elementor/editor-app-bar 0.10.9 → 0.12.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 +22 -0
- package/dist/index.js +139 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +91 -46
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/extensions/documents-save/components/__tests__/primary-action.test.tsx +1 -0
- package/src/extensions/documents-save/hooks/__tests__/use-document-save-draft-props.test.ts +1 -0
- package/src/extensions/documents-save/hooks/__tests__/use-document-save-template-props.test.ts +1 -0
- package/src/extensions/documents-save/hooks/__tests__/use-document-view-page-props.test.ts +43 -0
- package/src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts +20 -0
- package/src/extensions/documents-save/hooks/use-document-view-page-props.ts +16 -0
- package/src/extensions/documents-save/index.ts +16 -0
- package/src/extensions/site-settings/components/__tests__/portalled-primary-action.test.tsx +1 -0
- package/src/extensions/site-settings/components/__tests__/primary-action.test.tsx +1 -0
- package/src/extensions/wordpress/index.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.12.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-app-bar@0.11.0...@elementor/editor-app-bar@0.12.0) (2024-05-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* conversions - add logic to top bar for links page ([#181](https://github.com/elementor/elementor-packages/issues/181)) ([19b3d82](https://github.com/elementor/elementor-packages/commit/19b3d82b3795917e8d0aaaf40da36309ec83da97))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [0.11.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-app-bar@0.10.9...@elementor/editor-app-bar@0.11.0) (2024-05-08)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **editor-app-bar:** new view page button [ED-14270] ([#180](https://github.com/elementor/elementor-packages/issues/180)) ([692925c](https://github.com/elementor/elementor-packages/commit/692925ce7110742453655fcdaa27b3b40c10f242))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [0.10.9](https://github.com/elementor/elementor-packages/compare/@elementor/editor-app-bar@0.10.8...@elementor/editor-app-bar@0.10.9) (2024-05-07)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @elementor/editor-app-bar
|
package/dist/index.js
CHANGED
|
@@ -187,9 +187,25 @@ function useDocumentSaveTemplateProps() {
|
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
+
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
191
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
192
|
+
var import_icons5 = require("@elementor/icons");
|
|
193
|
+
var import_editor_documents5 = require("@elementor/editor-documents");
|
|
194
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
195
|
+
function useDocumentViewPageProps() {
|
|
196
|
+
const document2 = (0, import_editor_documents5.__useActiveDocument)();
|
|
197
|
+
return {
|
|
198
|
+
icon: import_icons5.EyeIcon,
|
|
199
|
+
title: (0, import_i18n5.__)("View Page", "elementor"),
|
|
200
|
+
onClick: () => document2?.id && (0, import_editor_v1_adapters4.__privateRunCommand)("editor/documents/view", {
|
|
201
|
+
id: document2.id
|
|
202
|
+
})
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
|
|
190
206
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
191
207
|
var React3 = __toESM(require("react"));
|
|
192
|
-
var
|
|
208
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
193
209
|
|
|
194
210
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
195
211
|
var React2 = __toESM(require("react"));
|
|
@@ -235,13 +251,13 @@ function PrimaryActionMenu(props) {
|
|
|
235
251
|
|
|
236
252
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
237
253
|
var import_ui3 = require("@elementor/ui");
|
|
238
|
-
var
|
|
239
|
-
var
|
|
240
|
-
var
|
|
254
|
+
var import_editor_documents6 = require("@elementor/editor-documents");
|
|
255
|
+
var import_icons6 = require("@elementor/icons");
|
|
256
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
241
257
|
function PrimaryAction() {
|
|
242
|
-
const document2 = (0,
|
|
243
|
-
const { save } = (0,
|
|
244
|
-
const isPreviewMode = (0,
|
|
258
|
+
const document2 = (0, import_editor_documents6.__useActiveDocument)();
|
|
259
|
+
const { save } = (0, import_editor_documents6.__useActiveDocumentActions)();
|
|
260
|
+
const isPreviewMode = (0, import_editor_v1_adapters5.__privateUseIsPreviewMode)();
|
|
245
261
|
const popupState = (0, import_ui3.usePopupState)({
|
|
246
262
|
variant: "popover",
|
|
247
263
|
popupId: "document-save-options"
|
|
@@ -270,7 +286,7 @@ function PrimaryAction() {
|
|
|
270
286
|
), /* @__PURE__ */ React3.createElement(
|
|
271
287
|
import_ui3.Tooltip,
|
|
272
288
|
{
|
|
273
|
-
title: (0,
|
|
289
|
+
title: (0, import_i18n6.__)("Save Options", "elementor"),
|
|
274
290
|
PopperProps: {
|
|
275
291
|
sx: {
|
|
276
292
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -287,14 +303,14 @@ function PrimaryAction() {
|
|
|
287
303
|
...(0, import_ui3.bindTrigger)(popupState),
|
|
288
304
|
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
289
305
|
disabled: isSaveOptionsDisabled,
|
|
290
|
-
"aria-label": (0,
|
|
306
|
+
"aria-label": (0, import_i18n6.__)("Save Options", "elementor")
|
|
291
307
|
},
|
|
292
|
-
/* @__PURE__ */ React3.createElement(
|
|
308
|
+
/* @__PURE__ */ React3.createElement(import_icons6.ChevronDownIcon, null)
|
|
293
309
|
))
|
|
294
310
|
)), /* @__PURE__ */ React3.createElement(PrimaryActionMenu, { ...(0, import_ui3.bindMenu)(popupState), onClick: popupState.close }));
|
|
295
311
|
}
|
|
296
312
|
function getLabel(document2) {
|
|
297
|
-
return document2.userCan.publish ? (0,
|
|
313
|
+
return document2.userCan.publish ? (0, import_i18n6.__)("Publish", "elementor") : (0, import_i18n6.__)("Submit", "elementor");
|
|
298
314
|
}
|
|
299
315
|
function isPublishEnabled(document2) {
|
|
300
316
|
if (document2.type.value === "kit") {
|
|
@@ -303,6 +319,22 @@ function isPublishEnabled(document2) {
|
|
|
303
319
|
return document2.isDirty || document2.status.value === "draft";
|
|
304
320
|
}
|
|
305
321
|
|
|
322
|
+
// src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
|
|
323
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
324
|
+
var import_icons7 = require("@elementor/icons");
|
|
325
|
+
var import_editor_documents7 = require("@elementor/editor-documents");
|
|
326
|
+
function useDocumentCopyAndShareProps() {
|
|
327
|
+
const document2 = (0, import_editor_documents7.__useActiveDocument)();
|
|
328
|
+
const { copyAndShare } = (0, import_editor_documents7.__useActiveDocumentActions)();
|
|
329
|
+
return {
|
|
330
|
+
icon: import_icons7.LinkIcon,
|
|
331
|
+
title: (0, import_i18n7.__)("Copy and Share", "elementor"),
|
|
332
|
+
onClick: copyAndShare,
|
|
333
|
+
disabled: !document2 || document2.isSaving || document2.isSavingDraft || !("publish" === document2.status.value),
|
|
334
|
+
visible: document2?.permissions?.showCopyAndShare
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
|
|
306
338
|
// src/extensions/documents-save/index.ts
|
|
307
339
|
function init3() {
|
|
308
340
|
(0, import_editor_app_bar_ui5.__privateInjectIntoPrimaryAction)({
|
|
@@ -323,25 +355,38 @@ function init3() {
|
|
|
323
355
|
// After save draft.
|
|
324
356
|
useProps: useDocumentSaveTemplateProps
|
|
325
357
|
});
|
|
358
|
+
documentOptionsMenu.registerAction({
|
|
359
|
+
group: "save",
|
|
360
|
+
id: "document-view-page",
|
|
361
|
+
priority: 30,
|
|
362
|
+
// After save draft.
|
|
363
|
+
useProps: useDocumentViewPageProps
|
|
364
|
+
});
|
|
365
|
+
documentOptionsMenu.registerAction({
|
|
366
|
+
group: "save",
|
|
367
|
+
id: "document-copy-and-share",
|
|
368
|
+
priority: 40,
|
|
369
|
+
useProps: useDocumentCopyAndShareProps
|
|
370
|
+
});
|
|
326
371
|
}
|
|
327
372
|
|
|
328
373
|
// src/extensions/elements/sync/sync-panel-title.ts
|
|
329
|
-
var
|
|
330
|
-
var
|
|
374
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
375
|
+
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
331
376
|
function syncPanelTitle() {
|
|
332
|
-
const panelTitle = (0,
|
|
333
|
-
const tabTitle = (0,
|
|
334
|
-
(0,
|
|
335
|
-
(0,
|
|
377
|
+
const panelTitle = (0, import_i18n8.__)("Elements", "elementor");
|
|
378
|
+
const tabTitle = (0, import_i18n8.__)("Widgets", "elementor");
|
|
379
|
+
(0, import_editor_v1_adapters6.__privateListenTo)(
|
|
380
|
+
(0, import_editor_v1_adapters6.routeOpenEvent)("panel/elements"),
|
|
336
381
|
() => {
|
|
337
382
|
setPanelTitle(panelTitle);
|
|
338
383
|
setTabTitle(tabTitle);
|
|
339
384
|
}
|
|
340
385
|
);
|
|
341
|
-
(0,
|
|
342
|
-
(0,
|
|
386
|
+
(0, import_editor_v1_adapters6.__privateListenTo)(
|
|
387
|
+
(0, import_editor_v1_adapters6.v1ReadyEvent)(),
|
|
343
388
|
() => {
|
|
344
|
-
if ((0,
|
|
389
|
+
if ((0, import_editor_v1_adapters6.__privateIsRouteActive)("panel/elements")) {
|
|
345
390
|
setPanelTitle(panelTitle);
|
|
346
391
|
setTabTitle(tabTitle);
|
|
347
392
|
}
|
|
@@ -362,15 +407,15 @@ function setTabTitle(title) {
|
|
|
362
407
|
var import_editor_app_bar_ui6 = require("@elementor/editor-app-bar-ui");
|
|
363
408
|
|
|
364
409
|
// src/extensions/elements/hooks/use-action-props.ts
|
|
365
|
-
var
|
|
366
|
-
var
|
|
367
|
-
var
|
|
410
|
+
var import_icons8 = require("@elementor/icons");
|
|
411
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
412
|
+
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
368
413
|
function useActionProps2() {
|
|
369
|
-
const { isActive, isBlocked } = (0,
|
|
414
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters7.__privateUseRouteStatus)("panel/elements");
|
|
370
415
|
return {
|
|
371
|
-
title: (0,
|
|
372
|
-
icon:
|
|
373
|
-
onClick: () => (0,
|
|
416
|
+
title: (0, import_i18n9.__)("Add Element", "elementor"),
|
|
417
|
+
icon: import_icons8.PlusIcon,
|
|
418
|
+
onClick: () => (0, import_editor_v1_adapters7.__privateOpenRoute)("panel/elements/categories"),
|
|
374
419
|
selected: isActive,
|
|
375
420
|
disabled: isBlocked
|
|
376
421
|
};
|
|
@@ -390,18 +435,18 @@ function init4() {
|
|
|
390
435
|
var import_editor_app_bar_ui7 = require("@elementor/editor-app-bar-ui");
|
|
391
436
|
|
|
392
437
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
393
|
-
var
|
|
394
|
-
var
|
|
395
|
-
var
|
|
438
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
439
|
+
var import_icons9 = require("@elementor/icons");
|
|
440
|
+
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
396
441
|
function useActionProps3() {
|
|
397
|
-
const { isBlocked } = (0,
|
|
442
|
+
const { isBlocked } = (0, import_editor_v1_adapters8.__privateUseRouteStatus)("finder", {
|
|
398
443
|
blockOnKitRoutes: false,
|
|
399
444
|
blockOnPreviewMode: false
|
|
400
445
|
});
|
|
401
446
|
return {
|
|
402
|
-
title: (0,
|
|
403
|
-
icon:
|
|
404
|
-
onClick: () => (0,
|
|
447
|
+
title: (0, import_i18n10.__)("Finder", "elementor"),
|
|
448
|
+
icon: import_icons9.SearchIcon,
|
|
449
|
+
onClick: () => (0, import_editor_v1_adapters8.__privateRunCommand)("finder/toggle"),
|
|
405
450
|
disabled: isBlocked
|
|
406
451
|
};
|
|
407
452
|
}
|
|
@@ -418,8 +463,8 @@ function init5() {
|
|
|
418
463
|
|
|
419
464
|
// src/extensions/help/index.ts
|
|
420
465
|
var import_editor_app_bar_ui8 = require("@elementor/editor-app-bar-ui");
|
|
421
|
-
var
|
|
422
|
-
var
|
|
466
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
467
|
+
var import_icons10 = require("@elementor/icons");
|
|
423
468
|
function init6() {
|
|
424
469
|
import_editor_app_bar_ui8.__privateUtilitiesMenu.registerLink({
|
|
425
470
|
id: "open-help-center",
|
|
@@ -427,9 +472,9 @@ function init6() {
|
|
|
427
472
|
// After Finder.
|
|
428
473
|
useProps: () => {
|
|
429
474
|
return {
|
|
430
|
-
title: (0,
|
|
475
|
+
title: (0, import_i18n11.__)("Help", "elementor"),
|
|
431
476
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
432
|
-
icon:
|
|
477
|
+
icon: import_icons10.HelpIcon,
|
|
433
478
|
target: "_blank"
|
|
434
479
|
};
|
|
435
480
|
}
|
|
@@ -440,15 +485,15 @@ function init6() {
|
|
|
440
485
|
var import_editor_app_bar_ui9 = require("@elementor/editor-app-bar-ui");
|
|
441
486
|
|
|
442
487
|
// src/extensions/history/hooks/use-action-props.ts
|
|
443
|
-
var
|
|
444
|
-
var
|
|
445
|
-
var
|
|
488
|
+
var import_icons11 = require("@elementor/icons");
|
|
489
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
490
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
446
491
|
function useActionProps4() {
|
|
447
|
-
const { isActive, isBlocked } = (0,
|
|
492
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters9.__privateUseRouteStatus)("panel/history");
|
|
448
493
|
return {
|
|
449
|
-
title: (0,
|
|
450
|
-
icon:
|
|
451
|
-
onClick: () => (0,
|
|
494
|
+
title: (0, import_i18n12.__)("History", "elementor"),
|
|
495
|
+
icon: import_icons11.HistoryIcon,
|
|
496
|
+
onClick: () => (0, import_editor_v1_adapters9.__privateOpenRoute)("panel/history/actions"),
|
|
452
497
|
selected: isActive,
|
|
453
498
|
disabled: isBlocked
|
|
454
499
|
};
|
|
@@ -467,14 +512,14 @@ function init7() {
|
|
|
467
512
|
var import_editor_app_bar_ui10 = require("@elementor/editor-app-bar-ui");
|
|
468
513
|
|
|
469
514
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
470
|
-
var
|
|
471
|
-
var
|
|
472
|
-
var
|
|
515
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
516
|
+
var import_icons12 = require("@elementor/icons");
|
|
517
|
+
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
473
518
|
function useActionProps5() {
|
|
474
519
|
return {
|
|
475
|
-
icon:
|
|
476
|
-
title: (0,
|
|
477
|
-
onClick: () => (0,
|
|
520
|
+
icon: import_icons12.KeyboardIcon,
|
|
521
|
+
title: (0, import_i18n13.__)("Keyboard Shortcuts", "elementor"),
|
|
522
|
+
onClick: () => (0, import_editor_v1_adapters10.__privateRunCommand)("shortcuts/open")
|
|
478
523
|
};
|
|
479
524
|
}
|
|
480
525
|
|
|
@@ -498,12 +543,12 @@ var React6 = __toESM(require("react"));
|
|
|
498
543
|
// src/extensions/site-settings/components/portal.tsx
|
|
499
544
|
var React4 = __toESM(require("react"));
|
|
500
545
|
var import_ui4 = require("@elementor/ui");
|
|
501
|
-
var
|
|
546
|
+
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
502
547
|
function Portal(props) {
|
|
503
|
-
const containerRef = (0,
|
|
548
|
+
const containerRef = (0, import_editor_v1_adapters11.__privateUseListenTo)(
|
|
504
549
|
[
|
|
505
|
-
(0,
|
|
506
|
-
(0,
|
|
550
|
+
(0, import_editor_v1_adapters11.routeOpenEvent)("panel/global"),
|
|
551
|
+
(0, import_editor_v1_adapters11.routeCloseEvent)("panel/global")
|
|
507
552
|
],
|
|
508
553
|
getContainerRef
|
|
509
554
|
);
|
|
@@ -513,17 +558,17 @@ function Portal(props) {
|
|
|
513
558
|
return /* @__PURE__ */ React4.createElement(import_ui4.Portal, { container: containerRef.current, ...props });
|
|
514
559
|
}
|
|
515
560
|
function getContainerRef() {
|
|
516
|
-
return (0,
|
|
561
|
+
return (0, import_editor_v1_adapters11.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
|
|
517
562
|
}
|
|
518
563
|
|
|
519
564
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
520
565
|
var React5 = __toESM(require("react"));
|
|
521
|
-
var
|
|
566
|
+
var import_editor_documents8 = require("@elementor/editor-documents");
|
|
522
567
|
var import_ui5 = require("@elementor/ui");
|
|
523
|
-
var
|
|
568
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
524
569
|
function PrimaryAction2() {
|
|
525
|
-
const document2 = (0,
|
|
526
|
-
const { save } = (0,
|
|
570
|
+
const document2 = (0, import_editor_documents8.__useActiveDocument)();
|
|
571
|
+
const { save } = (0, import_editor_documents8.__useActiveDocumentActions)();
|
|
527
572
|
return /* @__PURE__ */ React5.createElement(import_ui5.Paper, { sx: {
|
|
528
573
|
px: 5,
|
|
529
574
|
py: 4,
|
|
@@ -538,7 +583,7 @@ function PrimaryAction2() {
|
|
|
538
583
|
sx: { width: "100%" },
|
|
539
584
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
540
585
|
},
|
|
541
|
-
document2?.isSaving ? /* @__PURE__ */ React5.createElement(import_ui5.CircularProgress, null) : (0,
|
|
586
|
+
document2?.isSaving ? /* @__PURE__ */ React5.createElement(import_ui5.CircularProgress, null) : (0, import_i18n14.__)("Save Changes", "elementor")
|
|
542
587
|
));
|
|
543
588
|
}
|
|
544
589
|
|
|
@@ -551,17 +596,17 @@ function PortalledPrimaryAction() {
|
|
|
551
596
|
var import_editor_app_bar_ui11 = require("@elementor/editor-app-bar-ui");
|
|
552
597
|
|
|
553
598
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
554
|
-
var
|
|
555
|
-
var
|
|
556
|
-
var
|
|
599
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
600
|
+
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
601
|
+
var import_icons13 = require("@elementor/icons");
|
|
557
602
|
function useActionProps6() {
|
|
558
|
-
const { isActive, isBlocked } = (0,
|
|
603
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters12.__privateUseRouteStatus)("panel/global", {
|
|
559
604
|
blockOnKitRoutes: false
|
|
560
605
|
});
|
|
561
606
|
return {
|
|
562
|
-
title: (0,
|
|
563
|
-
icon:
|
|
564
|
-
onClick: () => isActive ? (0,
|
|
607
|
+
title: (0, import_i18n15.__)("Site Settings", "elementor"),
|
|
608
|
+
icon: import_icons13.AdjustmentsHorizontalIcon,
|
|
609
|
+
onClick: () => isActive ? (0, import_editor_v1_adapters12.__privateRunCommand)("panel/global/close") : (0, import_editor_v1_adapters12.__privateRunCommand)("panel/global/open"),
|
|
565
610
|
selected: isActive,
|
|
566
611
|
disabled: isBlocked
|
|
567
612
|
};
|
|
@@ -584,15 +629,15 @@ function init9() {
|
|
|
584
629
|
var import_editor_app_bar_ui12 = require("@elementor/editor-app-bar-ui");
|
|
585
630
|
|
|
586
631
|
// src/extensions/structure/hooks/use-action-props.ts
|
|
587
|
-
var
|
|
588
|
-
var
|
|
589
|
-
var
|
|
632
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
633
|
+
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
634
|
+
var import_icons14 = require("@elementor/icons");
|
|
590
635
|
function useActionProps7() {
|
|
591
|
-
const { isActive, isBlocked } = (0,
|
|
636
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters13.__privateUseRouteStatus)("navigator");
|
|
592
637
|
return {
|
|
593
|
-
title: (0,
|
|
594
|
-
icon:
|
|
595
|
-
onClick: () => (0,
|
|
638
|
+
title: (0, import_i18n16.__)("Structure", "elementor"),
|
|
639
|
+
icon: import_icons14.StructureIcon,
|
|
640
|
+
onClick: () => (0, import_editor_v1_adapters13.__privateRunCommand)("navigator/toggle"),
|
|
596
641
|
selected: isActive,
|
|
597
642
|
disabled: isBlocked
|
|
598
643
|
};
|
|
@@ -611,14 +656,14 @@ function init10() {
|
|
|
611
656
|
var import_editor_app_bar_ui13 = require("@elementor/editor-app-bar-ui");
|
|
612
657
|
|
|
613
658
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
614
|
-
var
|
|
615
|
-
var
|
|
616
|
-
var
|
|
659
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
660
|
+
var import_icons15 = require("@elementor/icons");
|
|
661
|
+
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
617
662
|
function useActionProps8() {
|
|
618
663
|
return {
|
|
619
|
-
icon:
|
|
620
|
-
title: (0,
|
|
621
|
-
onClick: () => (0,
|
|
664
|
+
icon: import_icons15.ThemeBuilderIcon,
|
|
665
|
+
title: (0, import_i18n17.__)("Theme Builder", "elementor"),
|
|
666
|
+
onClick: () => (0, import_editor_v1_adapters14.__privateRunCommand)("app/open")
|
|
622
667
|
};
|
|
623
668
|
}
|
|
624
669
|
|
|
@@ -634,15 +679,15 @@ function init11() {
|
|
|
634
679
|
var import_editor_app_bar_ui14 = require("@elementor/editor-app-bar-ui");
|
|
635
680
|
|
|
636
681
|
// src/extensions/user-preferences/hooks/use-action-props.ts
|
|
637
|
-
var
|
|
638
|
-
var
|
|
639
|
-
var
|
|
682
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
683
|
+
var import_icons16 = require("@elementor/icons");
|
|
684
|
+
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
640
685
|
function useActionProps9() {
|
|
641
|
-
const { isActive, isBlocked } = (0,
|
|
686
|
+
const { isActive, isBlocked } = (0, import_editor_v1_adapters15.__privateUseRouteStatus)("panel/editor-preferences");
|
|
642
687
|
return {
|
|
643
|
-
icon:
|
|
644
|
-
title: (0,
|
|
645
|
-
onClick: () => (0,
|
|
688
|
+
icon: import_icons16.ToggleRightIcon,
|
|
689
|
+
title: (0, import_i18n18.__)("User Preferences", "elementor"),
|
|
690
|
+
onClick: () => (0, import_editor_v1_adapters15.__privateOpenRoute)("panel/editor-preferences"),
|
|
646
691
|
selected: isActive,
|
|
647
692
|
disabled: isBlocked
|
|
648
693
|
};
|
|
@@ -660,19 +705,19 @@ function init12() {
|
|
|
660
705
|
|
|
661
706
|
// src/extensions/wordpress/index.ts
|
|
662
707
|
var import_editor_app_bar_ui15 = require("@elementor/editor-app-bar-ui");
|
|
663
|
-
var
|
|
664
|
-
var
|
|
665
|
-
var
|
|
708
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
709
|
+
var import_icons17 = require("@elementor/icons");
|
|
710
|
+
var import_editor_documents9 = require("@elementor/editor-documents");
|
|
666
711
|
function init13() {
|
|
667
712
|
import_editor_app_bar_ui15.__privateMainMenu.registerLink({
|
|
668
713
|
id: "exit-to-wordpress",
|
|
669
714
|
group: "exits",
|
|
670
715
|
useProps: () => {
|
|
671
|
-
const document2 = (0,
|
|
716
|
+
const document2 = (0, import_editor_documents9.__useActiveDocument)();
|
|
672
717
|
return {
|
|
673
|
-
title: (0,
|
|
718
|
+
title: (0, import_i18n19.__)("Exit to WordPress", "elementor"),
|
|
674
719
|
href: document2?.links?.platformEdit,
|
|
675
|
-
icon:
|
|
720
|
+
icon: import_icons17.WordpressIcon
|
|
676
721
|
};
|
|
677
722
|
}
|
|
678
723
|
});
|