@elementor/editor-app-bar 0.7.3 → 0.8.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 +16 -0
- package/dist/index.js +122 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +130 -45
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/components/__tests__/top-bar.test.tsx +2 -0
- package/src/components/app-bar.tsx +1 -1
- package/src/components/ui/popover-menu-item.tsx +5 -0
- package/src/components/ui/popover-menu.tsx +1 -1
- package/src/components/ui/toolbar-logo.tsx +10 -6
- package/src/components/ui/toolbar-menu-item.tsx +27 -2
- package/src/components/ui/toolbar-menu-toggle-item.tsx +15 -1
- package/src/components/ui/toolbar-menu.tsx +1 -1
- package/src/extensions/documents-indicator/components/__tests__/settings-button.test.tsx +10 -4
- package/src/extensions/documents-indicator/components/settings-button.tsx +24 -5
- package/src/extensions/documents-preview/hooks/__tests__/use-document-preview-props.test.ts +4 -4
- package/src/extensions/documents-preview/hooks/use-action-props.ts +2 -2
- package/src/extensions/documents-save/components/__tests__/primary-action-menu.test.tsx +1 -3
- package/src/extensions/documents-save/components/__tests__/primary-action.test.tsx +14 -15
- package/src/extensions/documents-save/components/primary-action-menu.tsx +2 -2
- package/src/extensions/documents-save/components/primary-action.tsx +10 -9
- package/src/extensions/documents-save/hooks/__tests__/use-document-save-draft-props.test.ts +6 -6
- package/src/extensions/documents-save/hooks/__tests__/use-document-save-template-props.test.ts +3 -3
- package/src/extensions/documents-save/hooks/use-document-save-draft-props.ts +3 -3
- package/src/extensions/documents-save/hooks/use-document-save-template-props.ts +2 -2
- package/src/extensions/finder/hooks/__tests__/use-action-props.test.ts +0 -1
- package/src/extensions/finder/hooks/use-action-props.ts +1 -2
- package/src/extensions/finder/index.ts +1 -1
- package/src/extensions/site-settings/components/__tests__/portalled-primary-action.test.tsx +10 -6
- package/src/extensions/site-settings/components/__tests__/primary-action.test.tsx +10 -10
- package/src/extensions/site-settings/components/primary-action.tsx +3 -3
- package/src/extensions/wordpress/index.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -19,9 +19,39 @@ function useMenuContext() {
|
|
|
19
19
|
|
|
20
20
|
// src/components/ui/toolbar-menu-item.tsx
|
|
21
21
|
import * as React2 from "react";
|
|
22
|
-
import { Box, IconButton, Tooltip } from "@elementor/ui";
|
|
22
|
+
import { Box, IconButton, Tooltip as BaseTooltip } from "@elementor/ui";
|
|
23
23
|
function ToolbarMenuItem({ title, ...props }) {
|
|
24
|
-
return /* @__PURE__ */ React2.createElement(Tooltip, { title }, /* @__PURE__ */ React2.createElement(Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React2.createElement(
|
|
24
|
+
return /* @__PURE__ */ React2.createElement(Tooltip, { title }, /* @__PURE__ */ React2.createElement(Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React2.createElement(
|
|
25
|
+
IconButton,
|
|
26
|
+
{
|
|
27
|
+
...props,
|
|
28
|
+
"aria-label": title,
|
|
29
|
+
size: "medium",
|
|
30
|
+
sx: {
|
|
31
|
+
"& .MuiSvgIcon-root": {
|
|
32
|
+
fontSize: "1.25rem"
|
|
33
|
+
},
|
|
34
|
+
"&:hover": {
|
|
35
|
+
color: "text.primary"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
)));
|
|
40
|
+
}
|
|
41
|
+
function Tooltip(props) {
|
|
42
|
+
return /* @__PURE__ */ React2.createElement(
|
|
43
|
+
BaseTooltip,
|
|
44
|
+
{
|
|
45
|
+
PopperProps: {
|
|
46
|
+
sx: {
|
|
47
|
+
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
48
|
+
mt: 2
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
...props
|
|
53
|
+
}
|
|
54
|
+
);
|
|
25
55
|
}
|
|
26
56
|
|
|
27
57
|
// src/components/ui/popover-menu-item.tsx
|
|
@@ -44,7 +74,13 @@ function PopoverMenuItem({ text, icon, onClick, href, target, disabled, ...props
|
|
|
44
74
|
onClick,
|
|
45
75
|
component: href ? "a" : "div",
|
|
46
76
|
href,
|
|
47
|
-
target
|
|
77
|
+
target,
|
|
78
|
+
sx: {
|
|
79
|
+
"&:hover": {
|
|
80
|
+
color: "text.primary"
|
|
81
|
+
// Overriding global CSS from the editor.
|
|
82
|
+
}
|
|
83
|
+
}
|
|
48
84
|
},
|
|
49
85
|
/* @__PURE__ */ React3.createElement(ListItemIcon, null, icon),
|
|
50
86
|
/* @__PURE__ */ React3.createElement(ListItemText, { primary: text }),
|
|
@@ -75,7 +111,26 @@ import * as React6 from "react";
|
|
|
75
111
|
import * as React5 from "react";
|
|
76
112
|
import { Box as Box2, ToggleButton, Tooltip as Tooltip2 } from "@elementor/ui";
|
|
77
113
|
function ToolbarMenuToggleItem({ title, onClick, ...props }) {
|
|
78
|
-
return /* @__PURE__ */ React5.createElement(Tooltip2, { title }, /* @__PURE__ */ React5.createElement(Box2, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React5.createElement(
|
|
114
|
+
return /* @__PURE__ */ React5.createElement(Tooltip2, { title }, /* @__PURE__ */ React5.createElement(Box2, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React5.createElement(
|
|
115
|
+
ToggleButton,
|
|
116
|
+
{
|
|
117
|
+
...props,
|
|
118
|
+
onChange: onClick,
|
|
119
|
+
"aria-label": title,
|
|
120
|
+
size: "small",
|
|
121
|
+
sx: {
|
|
122
|
+
border: 0,
|
|
123
|
+
// Temp fix until the style of the ToggleButton component will be decided.
|
|
124
|
+
"&.Mui-disabled": {
|
|
125
|
+
border: 0
|
|
126
|
+
// Temp fix until the style of the ToggleButton component will be decided.
|
|
127
|
+
},
|
|
128
|
+
"& .MuiSvgIcon-root": {
|
|
129
|
+
fontSize: "1.25rem"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
)));
|
|
79
134
|
}
|
|
80
135
|
|
|
81
136
|
// src/components/actions/toggle-action.tsx
|
|
@@ -220,7 +275,7 @@ function PopoverMenu({ children, ...props }) {
|
|
|
220
275
|
Menu,
|
|
221
276
|
{
|
|
222
277
|
PaperProps: {
|
|
223
|
-
sx: { mt:
|
|
278
|
+
sx: { mt: 1.5 }
|
|
224
279
|
},
|
|
225
280
|
...props,
|
|
226
281
|
MenuListProps: {
|
|
@@ -241,7 +296,9 @@ var ElementorLogo = (props) => {
|
|
|
241
296
|
return /* @__PURE__ */ React10.createElement(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" })));
|
|
242
297
|
};
|
|
243
298
|
var StyledToggleButton = styled(ToggleButton2)(({ theme }) => ({
|
|
244
|
-
|
|
299
|
+
padding: 0,
|
|
300
|
+
border: 0,
|
|
301
|
+
color: theme.palette.text.primary,
|
|
245
302
|
"&.MuiToggleButton-root:hover": {
|
|
246
303
|
backgroundColor: "initial"
|
|
247
304
|
},
|
|
@@ -252,10 +309,8 @@ var StyledToggleButton = styled(ToggleButton2)(({ theme }) => ({
|
|
|
252
309
|
var StyledElementorLogo = styled(ElementorLogo, {
|
|
253
310
|
shouldForwardProp: (prop) => prop !== "showMenuIcon"
|
|
254
311
|
})(({ theme, showMenuIcon }) => ({
|
|
255
|
-
width: "auto",
|
|
256
|
-
height: "100%",
|
|
257
312
|
"& path": {
|
|
258
|
-
fill:
|
|
313
|
+
fill: theme.palette.background.default,
|
|
259
314
|
transition: "all 0.2s linear",
|
|
260
315
|
transformOrigin: "bottom left",
|
|
261
316
|
"&:first-of-type": {
|
|
@@ -285,11 +340,18 @@ function ToolbarLogo(props) {
|
|
|
285
340
|
{
|
|
286
341
|
...props,
|
|
287
342
|
value: "selected",
|
|
288
|
-
size: "
|
|
343
|
+
size: "large",
|
|
289
344
|
onMouseEnter: () => setIsHoverState(true),
|
|
290
345
|
onMouseLeave: () => setIsHoverState(false)
|
|
291
346
|
},
|
|
292
|
-
/* @__PURE__ */ React10.createElement(
|
|
347
|
+
/* @__PURE__ */ React10.createElement(
|
|
348
|
+
StyledElementorLogo,
|
|
349
|
+
{
|
|
350
|
+
fontSize: "large",
|
|
351
|
+
showMenuIcon,
|
|
352
|
+
titleAccess: __("Elementor Logo", "elementor")
|
|
353
|
+
}
|
|
354
|
+
)
|
|
293
355
|
);
|
|
294
356
|
}
|
|
295
357
|
|
|
@@ -397,7 +459,7 @@ import * as React16 from "react";
|
|
|
397
459
|
import * as React14 from "react";
|
|
398
460
|
import { Stack as Stack2 } from "@elementor/ui";
|
|
399
461
|
function ToolbarMenu({ children, ...props }) {
|
|
400
|
-
return /* @__PURE__ */ React14.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React14.createElement(Stack2, { sx: { px:
|
|
462
|
+
return /* @__PURE__ */ React14.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React14.createElement(Stack2, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
|
|
401
463
|
}
|
|
402
464
|
|
|
403
465
|
// src/components/ui/toolbar-menu-more.tsx
|
|
@@ -458,7 +520,7 @@ function ResponsiveLocation() {
|
|
|
458
520
|
|
|
459
521
|
// src/components/app-bar.tsx
|
|
460
522
|
function AppBar() {
|
|
461
|
-
return /* @__PURE__ */ React21.createElement(ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React21.createElement(BaseAppBar, { position: "sticky" }, /* @__PURE__ */ React21.createElement(Box3, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)" }, /* @__PURE__ */ React21.createElement(Grid, { container: true }, /* @__PURE__ */ React21.createElement(MainMenuLocation, null), /* @__PURE__ */ React21.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React21.createElement(Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React21.createElement(ToolbarMenu, { spacing:
|
|
523
|
+
return /* @__PURE__ */ React21.createElement(ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React21.createElement(BaseAppBar, { position: "sticky" }, /* @__PURE__ */ React21.createElement(Box3, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)" }, /* @__PURE__ */ React21.createElement(Grid, { container: true }, /* @__PURE__ */ React21.createElement(MainMenuLocation, null), /* @__PURE__ */ React21.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React21.createElement(Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React21.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React21.createElement(Divider4, { orientation: "vertical" }), /* @__PURE__ */ React21.createElement(PageIndicationLocation, null), /* @__PURE__ */ React21.createElement(Divider4, { orientation: "vertical" }), /* @__PURE__ */ React21.createElement(ResponsiveLocation, null), /* @__PURE__ */ React21.createElement(Divider4, { orientation: "vertical" }))), /* @__PURE__ */ React21.createElement(Grid, { container: true, justifyContent: "flex-end" }, /* @__PURE__ */ React21.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React21.createElement(PrimaryActionLocation, null)))));
|
|
462
524
|
}
|
|
463
525
|
|
|
464
526
|
// src/init.ts
|
|
@@ -474,14 +536,14 @@ function redirectOldMenus() {
|
|
|
474
536
|
|
|
475
537
|
// src/extensions/documents-indicator/components/settings-button.tsx
|
|
476
538
|
import * as React22 from "react";
|
|
477
|
-
import { Box as Box4, ToggleButton as ToggleButton3, Tooltip as
|
|
539
|
+
import { Box as Box4, ToggleButton as ToggleButton3, Tooltip as BaseTooltip2 } from "@elementor/ui";
|
|
478
540
|
import { __ as __4 } from "@wordpress/i18n";
|
|
479
541
|
import { openRoute as openRoute2, useRouteStatus } from "@elementor/editor-v1-adapters";
|
|
480
542
|
import { SettingsIcon } from "@elementor/icons";
|
|
481
|
-
import {
|
|
543
|
+
import { __useActiveDocument, __useHostDocument } from "@elementor/editor-documents";
|
|
482
544
|
function SettingsButton() {
|
|
483
|
-
const activeDocument =
|
|
484
|
-
const hostDocument =
|
|
545
|
+
const activeDocument = __useActiveDocument();
|
|
546
|
+
const hostDocument = __useHostDocument();
|
|
485
547
|
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
486
548
|
const { isActive, isBlocked } = useRouteStatus("panel/page-settings");
|
|
487
549
|
if (!document2) {
|
|
@@ -496,11 +558,34 @@ function SettingsButton() {
|
|
|
496
558
|
disabled: isBlocked,
|
|
497
559
|
onChange: () => openRoute2("panel/page-settings/settings"),
|
|
498
560
|
"aria-label": title,
|
|
499
|
-
size: "small"
|
|
561
|
+
size: "small",
|
|
562
|
+
sx: {
|
|
563
|
+
border: 0,
|
|
564
|
+
// Temp fix until the style of the ToggleButton component will be decided.
|
|
565
|
+
"&.Mui-disabled": {
|
|
566
|
+
border: 0
|
|
567
|
+
// Temp fix until the style of the ToggleButton component will be decided.
|
|
568
|
+
}
|
|
569
|
+
}
|
|
500
570
|
},
|
|
501
|
-
/* @__PURE__ */ React22.createElement(SettingsIcon,
|
|
571
|
+
/* @__PURE__ */ React22.createElement(SettingsIcon, { fontSize: "small" })
|
|
502
572
|
)));
|
|
503
573
|
}
|
|
574
|
+
function Tooltip3(props) {
|
|
575
|
+
return /* @__PURE__ */ React22.createElement(
|
|
576
|
+
BaseTooltip2,
|
|
577
|
+
{
|
|
578
|
+
PopperProps: {
|
|
579
|
+
sx: {
|
|
580
|
+
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
581
|
+
mt: 1.7
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
...props
|
|
586
|
+
}
|
|
587
|
+
);
|
|
588
|
+
}
|
|
504
589
|
|
|
505
590
|
// src/extensions/documents-indicator/index.ts
|
|
506
591
|
function init() {
|
|
@@ -518,9 +603,9 @@ function init() {
|
|
|
518
603
|
import { __ as __5 } from "@wordpress/i18n";
|
|
519
604
|
import { EyeIcon } from "@elementor/icons";
|
|
520
605
|
import { runCommand } from "@elementor/editor-v1-adapters";
|
|
521
|
-
import {
|
|
606
|
+
import { __useActiveDocument as __useActiveDocument2 } from "@elementor/editor-documents";
|
|
522
607
|
function useActionProps() {
|
|
523
|
-
const document2 =
|
|
608
|
+
const document2 = __useActiveDocument2();
|
|
524
609
|
return {
|
|
525
610
|
icon: EyeIcon,
|
|
526
611
|
title: __5("Preview Changes", "elementor"),
|
|
@@ -544,10 +629,10 @@ function init2() {
|
|
|
544
629
|
// src/extensions/documents-save/hooks/use-document-save-draft-props.ts
|
|
545
630
|
import { __ as __6 } from "@wordpress/i18n";
|
|
546
631
|
import { FileReportIcon } from "@elementor/icons";
|
|
547
|
-
import {
|
|
632
|
+
import { __useActiveDocument as __useActiveDocument3, __useActiveDocumentActions } from "@elementor/editor-documents";
|
|
548
633
|
function useDocumentSaveDraftProps() {
|
|
549
|
-
const document2 =
|
|
550
|
-
const { saveDraft } =
|
|
634
|
+
const document2 = __useActiveDocument3();
|
|
635
|
+
const { saveDraft } = __useActiveDocumentActions();
|
|
551
636
|
return {
|
|
552
637
|
icon: FileReportIcon,
|
|
553
638
|
title: __6("Save Draft", "elementor"),
|
|
@@ -559,9 +644,9 @@ function useDocumentSaveDraftProps() {
|
|
|
559
644
|
// src/extensions/documents-save/hooks/use-document-save-template-props.ts
|
|
560
645
|
import { __ as __7 } from "@wordpress/i18n";
|
|
561
646
|
import { FolderIcon } from "@elementor/icons";
|
|
562
|
-
import {
|
|
647
|
+
import { __useActiveDocumentActions as __useActiveDocumentActions2 } from "@elementor/editor-documents";
|
|
563
648
|
function useDocumentSaveTemplateProps() {
|
|
564
|
-
const { saveTemplate } =
|
|
649
|
+
const { saveTemplate } = __useActiveDocumentActions2();
|
|
565
650
|
return {
|
|
566
651
|
icon: FolderIcon,
|
|
567
652
|
title: __7("Save as Template", "elementor"),
|
|
@@ -600,9 +685,9 @@ function PrimaryActionMenu(props) {
|
|
|
600
685
|
vertical: "top",
|
|
601
686
|
horizontal: "right"
|
|
602
687
|
},
|
|
603
|
-
marginThreshold:
|
|
688
|
+
marginThreshold: 4,
|
|
604
689
|
PaperProps: {
|
|
605
|
-
sx: { mt:
|
|
690
|
+
sx: { mt: 0.5 }
|
|
606
691
|
}
|
|
607
692
|
},
|
|
608
693
|
saveActions.map(({ MenuItem: MenuItem3, id }, index) => [
|
|
@@ -625,12 +710,12 @@ import {
|
|
|
625
710
|
Tooltip as Tooltip4,
|
|
626
711
|
usePopupState as usePopupState4
|
|
627
712
|
} from "@elementor/ui";
|
|
628
|
-
import {
|
|
713
|
+
import { __useActiveDocument as __useActiveDocument4, __useActiveDocumentActions as __useActiveDocumentActions3 } from "@elementor/editor-documents";
|
|
629
714
|
import { ChevronDownIcon } from "@elementor/icons";
|
|
630
715
|
import { useIsPreviewMode } from "@elementor/editor-v1-adapters";
|
|
631
716
|
function PrimaryAction() {
|
|
632
|
-
const document2 =
|
|
633
|
-
const { save } =
|
|
717
|
+
const document2 = __useActiveDocument4();
|
|
718
|
+
const { save } = __useActiveDocumentActions3();
|
|
634
719
|
const isPreviewMode = useIsPreviewMode();
|
|
635
720
|
const popupState = usePopupState4({
|
|
636
721
|
variant: "popover",
|
|
@@ -642,13 +727,13 @@ function PrimaryAction() {
|
|
|
642
727
|
const isPublishDisabled = isPreviewMode || !isPublishEnabled(document2);
|
|
643
728
|
const isSaveOptionsDisabled = isPreviewMode || document2.type.value === "kit";
|
|
644
729
|
const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
|
|
645
|
-
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(ButtonGroup, { size: "
|
|
730
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React24.createElement(
|
|
646
731
|
Button,
|
|
647
732
|
{
|
|
648
733
|
onClick: () => !document2.isSaving && save(),
|
|
649
734
|
sx: {
|
|
650
|
-
px: 7,
|
|
651
735
|
height: "100%",
|
|
736
|
+
borderRadius: 0,
|
|
652
737
|
maxWidth: "158px",
|
|
653
738
|
"&.MuiButtonBase-root.MuiButtonGroup-grouped": {
|
|
654
739
|
minWidth: "110px"
|
|
@@ -656,7 +741,7 @@ function PrimaryAction() {
|
|
|
656
741
|
},
|
|
657
742
|
disabled: isPublishDisabled
|
|
658
743
|
},
|
|
659
|
-
shouldShowSpinner ? /* @__PURE__ */ React24.createElement(CircularProgress,
|
|
744
|
+
shouldShowSpinner ? /* @__PURE__ */ React24.createElement(CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
|
|
660
745
|
), /* @__PURE__ */ React24.createElement(
|
|
661
746
|
Tooltip4,
|
|
662
747
|
{
|
|
@@ -664,8 +749,8 @@ function PrimaryAction() {
|
|
|
664
749
|
PopperProps: {
|
|
665
750
|
sx: {
|
|
666
751
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
667
|
-
mt:
|
|
668
|
-
mr:
|
|
752
|
+
mt: 1,
|
|
753
|
+
mr: 0.25
|
|
669
754
|
}
|
|
670
755
|
}
|
|
671
756
|
}
|
|
@@ -673,8 +758,9 @@ function PrimaryAction() {
|
|
|
673
758
|
/* @__PURE__ */ React24.createElement(Box5, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React24.createElement(
|
|
674
759
|
Button,
|
|
675
760
|
{
|
|
761
|
+
size: "small",
|
|
676
762
|
...bindTrigger3(popupState),
|
|
677
|
-
sx: { px: 0, height: "100%" },
|
|
763
|
+
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
678
764
|
disabled: isSaveOptionsDisabled,
|
|
679
765
|
"aria-label": __8("Save Options", "elementor")
|
|
680
766
|
},
|
|
@@ -777,7 +863,7 @@ import { __ as __11 } from "@wordpress/i18n";
|
|
|
777
863
|
import { SearchIcon } from "@elementor/icons";
|
|
778
864
|
import { runCommand as runCommand2, useRouteStatus as useRouteStatus3 } from "@elementor/editor-v1-adapters";
|
|
779
865
|
function useActionProps3() {
|
|
780
|
-
const {
|
|
866
|
+
const { isBlocked } = useRouteStatus3("finder", {
|
|
781
867
|
blockOnKitRoutes: false,
|
|
782
868
|
blockOnPreviewMode: false
|
|
783
869
|
});
|
|
@@ -785,14 +871,13 @@ function useActionProps3() {
|
|
|
785
871
|
title: __11("Finder", "elementor"),
|
|
786
872
|
icon: SearchIcon,
|
|
787
873
|
onClick: () => runCommand2("finder/toggle"),
|
|
788
|
-
selected: isActive,
|
|
789
874
|
disabled: isBlocked
|
|
790
875
|
};
|
|
791
876
|
}
|
|
792
877
|
|
|
793
878
|
// src/extensions/finder/index.ts
|
|
794
879
|
function init5() {
|
|
795
|
-
utilitiesMenu.
|
|
880
|
+
utilitiesMenu.registerAction({
|
|
796
881
|
id: "toggle-finder",
|
|
797
882
|
priority: 10,
|
|
798
883
|
// Before help.
|
|
@@ -895,12 +980,12 @@ function getContainerRef() {
|
|
|
895
980
|
|
|
896
981
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
897
982
|
import * as React26 from "react";
|
|
898
|
-
import {
|
|
983
|
+
import { __useActiveDocument as __useActiveDocument5, __useActiveDocumentActions as __useActiveDocumentActions4 } from "@elementor/editor-documents";
|
|
899
984
|
import { Button as Button2, CircularProgress as CircularProgress2, Paper } from "@elementor/ui";
|
|
900
985
|
import { __ as __15 } from "@wordpress/i18n";
|
|
901
986
|
function PrimaryAction2() {
|
|
902
|
-
const document2 =
|
|
903
|
-
const { save } =
|
|
987
|
+
const document2 = __useActiveDocument5();
|
|
988
|
+
const { save } = __useActiveDocumentActions4();
|
|
904
989
|
return /* @__PURE__ */ React26.createElement(Paper, { sx: {
|
|
905
990
|
px: 5,
|
|
906
991
|
py: 4,
|
|
@@ -1026,13 +1111,13 @@ function init12() {
|
|
|
1026
1111
|
// src/extensions/wordpress/index.ts
|
|
1027
1112
|
import { __ as __20 } from "@wordpress/i18n";
|
|
1028
1113
|
import { WordpressIcon } from "@elementor/icons";
|
|
1029
|
-
import {
|
|
1114
|
+
import { __useActiveDocument as __useActiveDocument6 } from "@elementor/editor-documents";
|
|
1030
1115
|
function init13() {
|
|
1031
1116
|
mainMenu.registerLink({
|
|
1032
1117
|
id: "exit-to-wordpress",
|
|
1033
1118
|
group: "exits",
|
|
1034
1119
|
useProps: () => {
|
|
1035
|
-
const document2 =
|
|
1120
|
+
const document2 = __useActiveDocument6();
|
|
1036
1121
|
return {
|
|
1037
1122
|
title: __20("Exit to WordPress", "elementor"),
|
|
1038
1123
|
href: document2?.links?.platformEdit,
|