@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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.8.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-app-bar@0.7.3...@elementor/editor-app-bar@0.8.0) (2023-09-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* ui adaptations [ED-11933] ([#107](https://github.com/elementor/elementor-packages/issues/107)) ([18ef329](https://github.com/elementor/elementor-packages/commit/18ef32928cbe921d7f5340c37c3c965b117d8d63))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **editor-documents:** mark experimental functions [ED-12066] ([#112](https://github.com/elementor/elementor-packages/issues/112)) ([f4b7a9a](https://github.com/elementor/elementor-packages/commit/f4b7a9ac7953a2b48062349495acff05b5640de3))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.7.3](https://github.com/elementor/elementor-packages/compare/@elementor/editor-app-bar@0.7.2...@elementor/editor-app-bar@0.7.3) (2023-08-22)
|
|
7
23
|
|
|
8
24
|
|
package/dist/index.js
CHANGED
|
@@ -64,7 +64,37 @@ function useMenuContext() {
|
|
|
64
64
|
var React2 = __toESM(require("react"));
|
|
65
65
|
var import_ui = require("@elementor/ui");
|
|
66
66
|
function ToolbarMenuItem({ title, ...props }) {
|
|
67
|
-
return /* @__PURE__ */ React2.createElement(
|
|
67
|
+
return /* @__PURE__ */ React2.createElement(Tooltip, { title }, /* @__PURE__ */ React2.createElement(import_ui.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React2.createElement(
|
|
68
|
+
import_ui.IconButton,
|
|
69
|
+
{
|
|
70
|
+
...props,
|
|
71
|
+
"aria-label": title,
|
|
72
|
+
size: "medium",
|
|
73
|
+
sx: {
|
|
74
|
+
"& .MuiSvgIcon-root": {
|
|
75
|
+
fontSize: "1.25rem"
|
|
76
|
+
},
|
|
77
|
+
"&:hover": {
|
|
78
|
+
color: "text.primary"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
)));
|
|
83
|
+
}
|
|
84
|
+
function Tooltip(props) {
|
|
85
|
+
return /* @__PURE__ */ React2.createElement(
|
|
86
|
+
import_ui.Tooltip,
|
|
87
|
+
{
|
|
88
|
+
PopperProps: {
|
|
89
|
+
sx: {
|
|
90
|
+
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
91
|
+
mt: 2
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
...props
|
|
96
|
+
}
|
|
97
|
+
);
|
|
68
98
|
}
|
|
69
99
|
|
|
70
100
|
// src/components/ui/popover-menu-item.tsx
|
|
@@ -82,7 +112,13 @@ function PopoverMenuItem({ text, icon, onClick, href, target, disabled, ...props
|
|
|
82
112
|
onClick,
|
|
83
113
|
component: href ? "a" : "div",
|
|
84
114
|
href,
|
|
85
|
-
target
|
|
115
|
+
target,
|
|
116
|
+
sx: {
|
|
117
|
+
"&:hover": {
|
|
118
|
+
color: "text.primary"
|
|
119
|
+
// Overriding global CSS from the editor.
|
|
120
|
+
}
|
|
121
|
+
}
|
|
86
122
|
},
|
|
87
123
|
/* @__PURE__ */ React3.createElement(import_ui2.ListItemIcon, null, icon),
|
|
88
124
|
/* @__PURE__ */ React3.createElement(import_ui2.ListItemText, { primary: text }),
|
|
@@ -113,7 +149,26 @@ var React6 = __toESM(require("react"));
|
|
|
113
149
|
var React5 = __toESM(require("react"));
|
|
114
150
|
var import_ui3 = require("@elementor/ui");
|
|
115
151
|
function ToolbarMenuToggleItem({ title, onClick, ...props }) {
|
|
116
|
-
return /* @__PURE__ */ React5.createElement(import_ui3.Tooltip, { title }, /* @__PURE__ */ React5.createElement(import_ui3.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React5.createElement(
|
|
152
|
+
return /* @__PURE__ */ React5.createElement(import_ui3.Tooltip, { title }, /* @__PURE__ */ React5.createElement(import_ui3.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React5.createElement(
|
|
153
|
+
import_ui3.ToggleButton,
|
|
154
|
+
{
|
|
155
|
+
...props,
|
|
156
|
+
onChange: onClick,
|
|
157
|
+
"aria-label": title,
|
|
158
|
+
size: "small",
|
|
159
|
+
sx: {
|
|
160
|
+
border: 0,
|
|
161
|
+
// Temp fix until the style of the ToggleButton component will be decided.
|
|
162
|
+
"&.Mui-disabled": {
|
|
163
|
+
border: 0
|
|
164
|
+
// Temp fix until the style of the ToggleButton component will be decided.
|
|
165
|
+
},
|
|
166
|
+
"& .MuiSvgIcon-root": {
|
|
167
|
+
fontSize: "1.25rem"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
)));
|
|
117
172
|
}
|
|
118
173
|
|
|
119
174
|
// src/components/actions/toggle-action.tsx
|
|
@@ -258,7 +313,7 @@ function PopoverMenu({ children, ...props }) {
|
|
|
258
313
|
import_ui4.Menu,
|
|
259
314
|
{
|
|
260
315
|
PaperProps: {
|
|
261
|
-
sx: { mt:
|
|
316
|
+
sx: { mt: 1.5 }
|
|
262
317
|
},
|
|
263
318
|
...props,
|
|
264
319
|
MenuListProps: {
|
|
@@ -279,7 +334,9 @@ var ElementorLogo = (props) => {
|
|
|
279
334
|
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" })));
|
|
280
335
|
};
|
|
281
336
|
var StyledToggleButton = (0, import_ui5.styled)(import_ui5.ToggleButton)(({ theme }) => ({
|
|
282
|
-
|
|
337
|
+
padding: 0,
|
|
338
|
+
border: 0,
|
|
339
|
+
color: theme.palette.text.primary,
|
|
283
340
|
"&.MuiToggleButton-root:hover": {
|
|
284
341
|
backgroundColor: "initial"
|
|
285
342
|
},
|
|
@@ -290,10 +347,8 @@ var StyledToggleButton = (0, import_ui5.styled)(import_ui5.ToggleButton)(({ them
|
|
|
290
347
|
var StyledElementorLogo = (0, import_ui5.styled)(ElementorLogo, {
|
|
291
348
|
shouldForwardProp: (prop) => prop !== "showMenuIcon"
|
|
292
349
|
})(({ theme, showMenuIcon }) => ({
|
|
293
|
-
width: "auto",
|
|
294
|
-
height: "100%",
|
|
295
350
|
"& path": {
|
|
296
|
-
fill:
|
|
351
|
+
fill: theme.palette.background.default,
|
|
297
352
|
transition: "all 0.2s linear",
|
|
298
353
|
transformOrigin: "bottom left",
|
|
299
354
|
"&:first-of-type": {
|
|
@@ -323,11 +378,18 @@ function ToolbarLogo(props) {
|
|
|
323
378
|
{
|
|
324
379
|
...props,
|
|
325
380
|
value: "selected",
|
|
326
|
-
size: "
|
|
381
|
+
size: "large",
|
|
327
382
|
onMouseEnter: () => setIsHoverState(true),
|
|
328
383
|
onMouseLeave: () => setIsHoverState(false)
|
|
329
384
|
},
|
|
330
|
-
/* @__PURE__ */ React10.createElement(
|
|
385
|
+
/* @__PURE__ */ React10.createElement(
|
|
386
|
+
StyledElementorLogo,
|
|
387
|
+
{
|
|
388
|
+
fontSize: "large",
|
|
389
|
+
showMenuIcon,
|
|
390
|
+
titleAccess: (0, import_i18n.__)("Elementor Logo", "elementor")
|
|
391
|
+
}
|
|
392
|
+
)
|
|
331
393
|
);
|
|
332
394
|
}
|
|
333
395
|
|
|
@@ -425,7 +487,7 @@ var React16 = __toESM(require("react"));
|
|
|
425
487
|
var React14 = __toESM(require("react"));
|
|
426
488
|
var import_ui9 = require("@elementor/ui");
|
|
427
489
|
function ToolbarMenu({ children, ...props }) {
|
|
428
|
-
return /* @__PURE__ */ React14.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React14.createElement(import_ui9.Stack, { sx: { px:
|
|
490
|
+
return /* @__PURE__ */ React14.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React14.createElement(import_ui9.Stack, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
|
|
429
491
|
}
|
|
430
492
|
|
|
431
493
|
// src/components/ui/toolbar-menu-more.tsx
|
|
@@ -486,7 +548,7 @@ function ResponsiveLocation() {
|
|
|
486
548
|
|
|
487
549
|
// src/components/app-bar.tsx
|
|
488
550
|
function AppBar() {
|
|
489
|
-
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:
|
|
551
|
+
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: 1.5 }, /* @__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)))));
|
|
490
552
|
}
|
|
491
553
|
|
|
492
554
|
// src/init.ts
|
|
@@ -508,15 +570,15 @@ var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
|
508
570
|
var import_icons4 = require("@elementor/icons");
|
|
509
571
|
var import_editor_documents = require("@elementor/editor-documents");
|
|
510
572
|
function SettingsButton() {
|
|
511
|
-
const activeDocument = (0, import_editor_documents.
|
|
512
|
-
const hostDocument = (0, import_editor_documents.
|
|
573
|
+
const activeDocument = (0, import_editor_documents.__useActiveDocument)();
|
|
574
|
+
const hostDocument = (0, import_editor_documents.__useHostDocument)();
|
|
513
575
|
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
514
576
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters2.useRouteStatus)("panel/page-settings");
|
|
515
577
|
if (!document2) {
|
|
516
578
|
return null;
|
|
517
579
|
}
|
|
518
580
|
const title = (0, import_i18n4.__)("%s Settings", "elementor").replace("%s", document2.type.label);
|
|
519
|
-
return /* @__PURE__ */ React22.createElement(
|
|
581
|
+
return /* @__PURE__ */ React22.createElement(Tooltip3, { title }, /* @__PURE__ */ React22.createElement(import_ui13.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React22.createElement(
|
|
520
582
|
import_ui13.ToggleButton,
|
|
521
583
|
{
|
|
522
584
|
value: "document-settings",
|
|
@@ -524,11 +586,34 @@ function SettingsButton() {
|
|
|
524
586
|
disabled: isBlocked,
|
|
525
587
|
onChange: () => (0, import_editor_v1_adapters2.openRoute)("panel/page-settings/settings"),
|
|
526
588
|
"aria-label": title,
|
|
527
|
-
size: "small"
|
|
589
|
+
size: "small",
|
|
590
|
+
sx: {
|
|
591
|
+
border: 0,
|
|
592
|
+
// Temp fix until the style of the ToggleButton component will be decided.
|
|
593
|
+
"&.Mui-disabled": {
|
|
594
|
+
border: 0
|
|
595
|
+
// Temp fix until the style of the ToggleButton component will be decided.
|
|
596
|
+
}
|
|
597
|
+
}
|
|
528
598
|
},
|
|
529
|
-
/* @__PURE__ */ React22.createElement(import_icons4.SettingsIcon,
|
|
599
|
+
/* @__PURE__ */ React22.createElement(import_icons4.SettingsIcon, { fontSize: "small" })
|
|
530
600
|
)));
|
|
531
601
|
}
|
|
602
|
+
function Tooltip3(props) {
|
|
603
|
+
return /* @__PURE__ */ React22.createElement(
|
|
604
|
+
import_ui13.Tooltip,
|
|
605
|
+
{
|
|
606
|
+
PopperProps: {
|
|
607
|
+
sx: {
|
|
608
|
+
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
609
|
+
mt: 1.7
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
...props
|
|
614
|
+
}
|
|
615
|
+
);
|
|
616
|
+
}
|
|
532
617
|
|
|
533
618
|
// src/extensions/documents-indicator/index.ts
|
|
534
619
|
function init() {
|
|
@@ -548,7 +633,7 @@ var import_icons5 = require("@elementor/icons");
|
|
|
548
633
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
549
634
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
550
635
|
function useActionProps() {
|
|
551
|
-
const document2 = (0, import_editor_documents2.
|
|
636
|
+
const document2 = (0, import_editor_documents2.__useActiveDocument)();
|
|
552
637
|
return {
|
|
553
638
|
icon: import_icons5.EyeIcon,
|
|
554
639
|
title: (0, import_i18n5.__)("Preview Changes", "elementor"),
|
|
@@ -574,8 +659,8 @@ var import_i18n6 = require("@wordpress/i18n");
|
|
|
574
659
|
var import_icons6 = require("@elementor/icons");
|
|
575
660
|
var import_editor_documents3 = require("@elementor/editor-documents");
|
|
576
661
|
function useDocumentSaveDraftProps() {
|
|
577
|
-
const document2 = (0, import_editor_documents3.
|
|
578
|
-
const { saveDraft } = (0, import_editor_documents3.
|
|
662
|
+
const document2 = (0, import_editor_documents3.__useActiveDocument)();
|
|
663
|
+
const { saveDraft } = (0, import_editor_documents3.__useActiveDocumentActions)();
|
|
579
664
|
return {
|
|
580
665
|
icon: import_icons6.FileReportIcon,
|
|
581
666
|
title: (0, import_i18n6.__)("Save Draft", "elementor"),
|
|
@@ -589,7 +674,7 @@ var import_i18n7 = require("@wordpress/i18n");
|
|
|
589
674
|
var import_icons7 = require("@elementor/icons");
|
|
590
675
|
var import_editor_documents4 = require("@elementor/editor-documents");
|
|
591
676
|
function useDocumentSaveTemplateProps() {
|
|
592
|
-
const { saveTemplate } = (0, import_editor_documents4.
|
|
677
|
+
const { saveTemplate } = (0, import_editor_documents4.__useActiveDocumentActions)();
|
|
593
678
|
return {
|
|
594
679
|
icon: import_icons7.FolderIcon,
|
|
595
680
|
title: (0, import_i18n7.__)("Save as Template", "elementor"),
|
|
@@ -628,9 +713,9 @@ function PrimaryActionMenu(props) {
|
|
|
628
713
|
vertical: "top",
|
|
629
714
|
horizontal: "right"
|
|
630
715
|
},
|
|
631
|
-
marginThreshold:
|
|
716
|
+
marginThreshold: 4,
|
|
632
717
|
PaperProps: {
|
|
633
|
-
sx: { mt:
|
|
718
|
+
sx: { mt: 0.5 }
|
|
634
719
|
}
|
|
635
720
|
},
|
|
636
721
|
saveActions.map(({ MenuItem: MenuItem3, id }, index) => [
|
|
@@ -648,8 +733,8 @@ var import_editor_documents5 = require("@elementor/editor-documents");
|
|
|
648
733
|
var import_icons8 = require("@elementor/icons");
|
|
649
734
|
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
650
735
|
function PrimaryAction() {
|
|
651
|
-
const document2 = (0, import_editor_documents5.
|
|
652
|
-
const { save } = (0, import_editor_documents5.
|
|
736
|
+
const document2 = (0, import_editor_documents5.__useActiveDocument)();
|
|
737
|
+
const { save } = (0, import_editor_documents5.__useActiveDocumentActions)();
|
|
653
738
|
const isPreviewMode = (0, import_editor_v1_adapters4.useIsPreviewMode)();
|
|
654
739
|
const popupState = (0, import_ui15.usePopupState)({
|
|
655
740
|
variant: "popover",
|
|
@@ -661,13 +746,13 @@ function PrimaryAction() {
|
|
|
661
746
|
const isPublishDisabled = isPreviewMode || !isPublishEnabled(document2);
|
|
662
747
|
const isSaveOptionsDisabled = isPreviewMode || document2.type.value === "kit";
|
|
663
748
|
const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
|
|
664
|
-
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(import_ui15.ButtonGroup, { size: "
|
|
749
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(import_ui15.ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React24.createElement(
|
|
665
750
|
import_ui15.Button,
|
|
666
751
|
{
|
|
667
752
|
onClick: () => !document2.isSaving && save(),
|
|
668
753
|
sx: {
|
|
669
|
-
px: 7,
|
|
670
754
|
height: "100%",
|
|
755
|
+
borderRadius: 0,
|
|
671
756
|
maxWidth: "158px",
|
|
672
757
|
"&.MuiButtonBase-root.MuiButtonGroup-grouped": {
|
|
673
758
|
minWidth: "110px"
|
|
@@ -675,7 +760,7 @@ function PrimaryAction() {
|
|
|
675
760
|
},
|
|
676
761
|
disabled: isPublishDisabled
|
|
677
762
|
},
|
|
678
|
-
shouldShowSpinner ? /* @__PURE__ */ React24.createElement(import_ui15.CircularProgress,
|
|
763
|
+
shouldShowSpinner ? /* @__PURE__ */ React24.createElement(import_ui15.CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
|
|
679
764
|
), /* @__PURE__ */ React24.createElement(
|
|
680
765
|
import_ui15.Tooltip,
|
|
681
766
|
{
|
|
@@ -683,8 +768,8 @@ function PrimaryAction() {
|
|
|
683
768
|
PopperProps: {
|
|
684
769
|
sx: {
|
|
685
770
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
686
|
-
mt:
|
|
687
|
-
mr:
|
|
771
|
+
mt: 1,
|
|
772
|
+
mr: 0.25
|
|
688
773
|
}
|
|
689
774
|
}
|
|
690
775
|
}
|
|
@@ -692,8 +777,9 @@ function PrimaryAction() {
|
|
|
692
777
|
/* @__PURE__ */ React24.createElement(import_ui15.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React24.createElement(
|
|
693
778
|
import_ui15.Button,
|
|
694
779
|
{
|
|
780
|
+
size: "small",
|
|
695
781
|
...(0, import_ui15.bindTrigger)(popupState),
|
|
696
|
-
sx: { px: 0, height: "100%" },
|
|
782
|
+
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
697
783
|
disabled: isSaveOptionsDisabled,
|
|
698
784
|
"aria-label": (0, import_i18n8.__)("Save Options", "elementor")
|
|
699
785
|
},
|
|
@@ -796,7 +882,7 @@ var import_i18n11 = require("@wordpress/i18n");
|
|
|
796
882
|
var import_icons10 = require("@elementor/icons");
|
|
797
883
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
798
884
|
function useActionProps3() {
|
|
799
|
-
const {
|
|
885
|
+
const { isBlocked } = (0, import_editor_v1_adapters7.useRouteStatus)("finder", {
|
|
800
886
|
blockOnKitRoutes: false,
|
|
801
887
|
blockOnPreviewMode: false
|
|
802
888
|
});
|
|
@@ -804,14 +890,13 @@ function useActionProps3() {
|
|
|
804
890
|
title: (0, import_i18n11.__)("Finder", "elementor"),
|
|
805
891
|
icon: import_icons10.SearchIcon,
|
|
806
892
|
onClick: () => (0, import_editor_v1_adapters7.runCommand)("finder/toggle"),
|
|
807
|
-
selected: isActive,
|
|
808
893
|
disabled: isBlocked
|
|
809
894
|
};
|
|
810
895
|
}
|
|
811
896
|
|
|
812
897
|
// src/extensions/finder/index.ts
|
|
813
898
|
function init5() {
|
|
814
|
-
utilitiesMenu.
|
|
899
|
+
utilitiesMenu.registerAction({
|
|
815
900
|
id: "toggle-finder",
|
|
816
901
|
priority: 10,
|
|
817
902
|
// Before help.
|
|
@@ -918,8 +1003,8 @@ var import_editor_documents6 = require("@elementor/editor-documents");
|
|
|
918
1003
|
var import_ui17 = require("@elementor/ui");
|
|
919
1004
|
var import_i18n15 = require("@wordpress/i18n");
|
|
920
1005
|
function PrimaryAction2() {
|
|
921
|
-
const document2 = (0, import_editor_documents6.
|
|
922
|
-
const { save } = (0, import_editor_documents6.
|
|
1006
|
+
const document2 = (0, import_editor_documents6.__useActiveDocument)();
|
|
1007
|
+
const { save } = (0, import_editor_documents6.__useActiveDocumentActions)();
|
|
923
1008
|
return /* @__PURE__ */ React26.createElement(import_ui17.Paper, { sx: {
|
|
924
1009
|
px: 5,
|
|
925
1010
|
py: 4,
|
|
@@ -1051,7 +1136,7 @@ function init13() {
|
|
|
1051
1136
|
id: "exit-to-wordpress",
|
|
1052
1137
|
group: "exits",
|
|
1053
1138
|
useProps: () => {
|
|
1054
|
-
const document2 = (0, import_editor_documents7.
|
|
1139
|
+
const document2 = (0, import_editor_documents7.__useActiveDocument)();
|
|
1055
1140
|
return {
|
|
1056
1141
|
title: (0, import_i18n20.__)("Exit to WordPress", "elementor"),
|
|
1057
1142
|
href: document2?.links?.platformEdit,
|