@elementor/editor-app-bar 0.9.7 → 0.10.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 +9 -218
- package/dist/index.d.ts +9 -218
- package/dist/index.js +169 -641
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +142 -619
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -7
- package/src/extensions/documents-indicator/index.ts +1 -1
- package/src/extensions/documents-preview/index.ts +1 -1
- package/src/extensions/documents-save/components/__tests__/primary-action-menu.test.tsx +1 -1
- package/src/extensions/documents-save/components/primary-action-menu.tsx +2 -2
- package/src/extensions/documents-save/hooks/use-document-save-draft-props.ts +1 -1
- package/src/extensions/documents-save/hooks/use-document-save-template-props.ts +1 -1
- package/src/extensions/documents-save/index.ts +2 -1
- package/src/extensions/documents-save/locations.ts +3 -0
- package/src/extensions/elements/index.ts +1 -1
- package/src/extensions/finder/index.ts +1 -1
- package/src/extensions/help/index.ts +1 -1
- package/src/extensions/history/index.ts +1 -1
- package/src/extensions/keyboard-shortcuts/hooks/use-action-props.ts +1 -1
- package/src/extensions/keyboard-shortcuts/index.ts +1 -1
- package/src/extensions/site-settings/hooks/use-action-props.ts +1 -1
- package/src/extensions/site-settings/index.ts +1 -1
- package/src/extensions/structure/hooks/use-action-props.ts +1 -1
- package/src/extensions/structure/index.ts +1 -1
- package/src/extensions/theme-builder/hooks/use-action-props.ts +1 -1
- package/src/extensions/theme-builder/index.ts +1 -1
- package/src/extensions/user-preferences/hooks/use-action-props.ts +1 -1
- package/src/extensions/user-preferences/index.ts +1 -1
- package/src/extensions/wordpress/index.ts +1 -1
- package/src/index.ts +12 -9
- package/src/init.ts +1 -1
- package/src/components/__tests__/top-bar.test.tsx +0 -15
- package/src/components/actions/action.tsx +0 -33
- package/src/components/actions/link.tsx +0 -33
- package/src/components/actions/toggle-action.tsx +0 -35
- package/src/components/app-bar.tsx +0 -37
- package/src/components/locations/__tests__/locations-components.test.tsx +0 -37
- package/src/components/locations/__tests__/menus.test.tsx +0 -120
- package/src/components/locations/integrations-menu-location.tsx +0 -59
- package/src/components/locations/main-menu-location.tsx +0 -38
- package/src/components/locations/page-indication-location.tsx +0 -8
- package/src/components/locations/primary-action-location.tsx +0 -8
- package/src/components/locations/responsive-location.tsx +0 -8
- package/src/components/locations/tools-menu-location.tsx +0 -26
- package/src/components/locations/utilities-menu-location.tsx +0 -35
- package/src/components/ui/popover-menu-item.tsx +0 -44
- package/src/components/ui/popover-menu.tsx +0 -24
- package/src/components/ui/popover-sub-menu.tsx +0 -29
- package/src/components/ui/toolbar-logo.tsx +0 -84
- package/src/components/ui/toolbar-menu-item.tsx +0 -45
- package/src/components/ui/toolbar-menu-more.tsx +0 -29
- package/src/components/ui/toolbar-menu-toggle-item.tsx +0 -34
- package/src/components/ui/toolbar-menu.tsx +0 -15
- package/src/contexts/menu-context.tsx +0 -20
- package/src/locations/__tests__/menus.test.tsx +0 -212
- package/src/locations/index.ts +0 -29
- package/src/locations/menus.tsx +0 -129
- package/src/types.ts +0 -3
package/dist/index.js
CHANGED
|
@@ -31,531 +31,23 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
33
|
documentOptionsMenu: () => documentOptionsMenu,
|
|
34
|
-
injectIntoPageIndication: () =>
|
|
35
|
-
injectIntoPrimaryAction: () =>
|
|
36
|
-
injectIntoResponsive: () =>
|
|
37
|
-
integrationsMenu: () =>
|
|
38
|
-
mainMenu: () =>
|
|
39
|
-
toolsMenu: () =>
|
|
40
|
-
utilitiesMenu: () =>
|
|
34
|
+
injectIntoPageIndication: () => import_editor_app_bar_ui17.__privateInjectIntoPageIndication,
|
|
35
|
+
injectIntoPrimaryAction: () => import_editor_app_bar_ui17.__privateInjectIntoPrimaryAction,
|
|
36
|
+
injectIntoResponsive: () => import_editor_app_bar_ui17.__privateInjectIntoResponsive,
|
|
37
|
+
integrationsMenu: () => import_editor_app_bar_ui17.__privateIntegrationsMenu,
|
|
38
|
+
mainMenu: () => import_editor_app_bar_ui17.__privateMainMenu,
|
|
39
|
+
toolsMenu: () => import_editor_app_bar_ui17.__privateToolsMenu,
|
|
40
|
+
utilitiesMenu: () => import_editor_app_bar_ui17.__privateUtilitiesMenu
|
|
41
41
|
});
|
|
42
42
|
module.exports = __toCommonJS(src_exports);
|
|
43
|
+
var import_editor_app_bar_ui17 = require("@elementor/editor-app-bar-ui");
|
|
43
44
|
|
|
44
|
-
// src/locations
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var import_locations = require("@elementor/locations");
|
|
48
|
-
|
|
49
|
-
// src/components/actions/action.tsx
|
|
50
|
-
var React4 = __toESM(require("react"));
|
|
51
|
-
|
|
52
|
-
// src/contexts/menu-context.tsx
|
|
53
|
-
var React = __toESM(require("react"));
|
|
54
|
-
var import_react = require("react");
|
|
55
|
-
var MenuContext = (0, import_react.createContext)({ type: "toolbar" });
|
|
56
|
-
function MenuContextProvider({ type, children }) {
|
|
57
|
-
return /* @__PURE__ */ React.createElement(MenuContext.Provider, { value: { type } }, children);
|
|
58
|
-
}
|
|
59
|
-
function useMenuContext() {
|
|
60
|
-
return (0, import_react.useContext)(MenuContext);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// src/components/ui/toolbar-menu-item.tsx
|
|
64
|
-
var React2 = __toESM(require("react"));
|
|
65
|
-
var import_ui = require("@elementor/ui");
|
|
66
|
-
function ToolbarMenuItem({ title, ...props }) {
|
|
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
|
-
"& svg": {
|
|
75
|
-
fontSize: "1.25rem",
|
|
76
|
-
height: "1em",
|
|
77
|
-
width: "1em"
|
|
78
|
-
},
|
|
79
|
-
"&:hover": {
|
|
80
|
-
color: "text.primary"
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
)));
|
|
85
|
-
}
|
|
86
|
-
function Tooltip(props) {
|
|
87
|
-
return /* @__PURE__ */ React2.createElement(
|
|
88
|
-
import_ui.Tooltip,
|
|
89
|
-
{
|
|
90
|
-
PopperProps: {
|
|
91
|
-
sx: {
|
|
92
|
-
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
93
|
-
mt: 2
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
...props
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// src/components/ui/popover-menu-item.tsx
|
|
103
|
-
var React3 = __toESM(require("react"));
|
|
104
|
-
var import_ui2 = require("@elementor/ui");
|
|
105
|
-
var import_icons = require("@elementor/icons");
|
|
106
|
-
var DirectionalArrowIcon = (0, import_ui2.withDirection)(import_icons.ArrowUpRightIcon);
|
|
107
|
-
function PopoverMenuItem({ text, icon, onClick, href, target, disabled, ...props }) {
|
|
108
|
-
const isExternalLink = href && target === "_blank";
|
|
109
|
-
return /* @__PURE__ */ React3.createElement(
|
|
110
|
-
import_ui2.MenuItem,
|
|
111
|
-
{
|
|
112
|
-
...props,
|
|
113
|
-
disabled,
|
|
114
|
-
onClick,
|
|
115
|
-
component: href ? "a" : "div",
|
|
116
|
-
href,
|
|
117
|
-
target,
|
|
118
|
-
sx: {
|
|
119
|
-
"&:hover": {
|
|
120
|
-
color: "text.primary"
|
|
121
|
-
// Overriding global CSS from the editor.
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
/* @__PURE__ */ React3.createElement(import_ui2.ListItemIcon, null, icon),
|
|
126
|
-
/* @__PURE__ */ React3.createElement(import_ui2.ListItemText, { primary: text }),
|
|
127
|
-
isExternalLink && /* @__PURE__ */ React3.createElement(DirectionalArrowIcon, null)
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// src/components/actions/action.tsx
|
|
132
|
-
function Action({ icon: Icon, title, visible = true, ...props }) {
|
|
133
|
-
const { type } = useMenuContext();
|
|
134
|
-
if (!visible) {
|
|
135
|
-
return null;
|
|
136
|
-
}
|
|
137
|
-
return type === "toolbar" ? /* @__PURE__ */ React4.createElement(ToolbarMenuItem, { title, ...props }, /* @__PURE__ */ React4.createElement(Icon, null)) : /* @__PURE__ */ React4.createElement(
|
|
138
|
-
PopoverMenuItem,
|
|
139
|
-
{
|
|
140
|
-
...props,
|
|
141
|
-
text: title,
|
|
142
|
-
icon: /* @__PURE__ */ React4.createElement(Icon, null)
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// src/components/actions/toggle-action.tsx
|
|
148
|
-
var React6 = __toESM(require("react"));
|
|
149
|
-
|
|
150
|
-
// src/components/ui/toolbar-menu-toggle-item.tsx
|
|
151
|
-
var React5 = __toESM(require("react"));
|
|
152
|
-
var import_ui3 = require("@elementor/ui");
|
|
153
|
-
function ToolbarMenuToggleItem({ title, onClick, ...props }) {
|
|
154
|
-
return /* @__PURE__ */ React5.createElement(import_ui3.Tooltip, { title }, /* @__PURE__ */ React5.createElement(import_ui3.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React5.createElement(
|
|
155
|
-
import_ui3.ToggleButton,
|
|
156
|
-
{
|
|
157
|
-
...props,
|
|
158
|
-
onChange: onClick,
|
|
159
|
-
"aria-label": title,
|
|
160
|
-
size: "small",
|
|
161
|
-
sx: {
|
|
162
|
-
border: 0,
|
|
163
|
-
// Temp fix until the style of the ToggleButton component will be decided.
|
|
164
|
-
"&.Mui-disabled": {
|
|
165
|
-
border: 0
|
|
166
|
-
// Temp fix until the style of the ToggleButton component will be decided.
|
|
167
|
-
},
|
|
168
|
-
"& svg": {
|
|
169
|
-
fontSize: "1.25rem",
|
|
170
|
-
height: "1em",
|
|
171
|
-
width: "1em"
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
)));
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// src/components/actions/toggle-action.tsx
|
|
179
|
-
function ToggleAction({ icon: Icon, title, value, visible = true, ...props }) {
|
|
180
|
-
const { type } = useMenuContext();
|
|
181
|
-
if (!visible) {
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
return type === "toolbar" ? /* @__PURE__ */ React6.createElement(ToolbarMenuToggleItem, { value: value || title, title, ...props }, /* @__PURE__ */ React6.createElement(Icon, null)) : /* @__PURE__ */ React6.createElement(
|
|
185
|
-
PopoverMenuItem,
|
|
186
|
-
{
|
|
187
|
-
...props,
|
|
188
|
-
text: title,
|
|
189
|
-
icon: /* @__PURE__ */ React6.createElement(Icon, null)
|
|
190
|
-
}
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// src/components/actions/link.tsx
|
|
195
|
-
var React7 = __toESM(require("react"));
|
|
196
|
-
function Link({ icon: Icon, title, visible = true, ...props }) {
|
|
197
|
-
const { type } = useMenuContext();
|
|
198
|
-
if (!visible) {
|
|
199
|
-
return null;
|
|
200
|
-
}
|
|
201
|
-
return type === "toolbar" ? /* @__PURE__ */ React7.createElement(ToolbarMenuItem, { title, ...props }, /* @__PURE__ */ React7.createElement(Icon, null)) : /* @__PURE__ */ React7.createElement(
|
|
202
|
-
PopoverMenuItem,
|
|
203
|
-
{
|
|
204
|
-
...props,
|
|
205
|
-
text: title,
|
|
206
|
-
icon: /* @__PURE__ */ React7.createElement(Icon, null)
|
|
207
|
-
}
|
|
208
|
-
);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// src/locations/menus.tsx
|
|
212
|
-
function createMenu(groups = []) {
|
|
213
|
-
const menuGroups = [
|
|
214
|
-
...groups,
|
|
215
|
-
"default"
|
|
216
|
-
];
|
|
217
|
-
const locations = menuGroups.reduce(
|
|
218
|
-
(carry, group) => ({
|
|
219
|
-
...carry,
|
|
220
|
-
[group]: (0, import_locations.createLocation)()
|
|
221
|
-
}),
|
|
222
|
-
{}
|
|
223
|
-
);
|
|
224
|
-
const [
|
|
225
|
-
registerAction,
|
|
226
|
-
registerToggleAction,
|
|
227
|
-
registerLink
|
|
228
|
-
] = [Action, ToggleAction, Link].map(
|
|
229
|
-
(Component) => createRegisterMenuItem({
|
|
230
|
-
locations,
|
|
231
|
-
menuGroups,
|
|
232
|
-
component: Component
|
|
233
|
-
})
|
|
234
|
-
);
|
|
235
|
-
const useMenuItems6 = createUseMenuItems(locations);
|
|
236
|
-
return {
|
|
237
|
-
registerAction,
|
|
238
|
-
registerToggleAction,
|
|
239
|
-
registerLink,
|
|
240
|
-
useMenuItems: useMenuItems6
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
function createRegisterMenuItem({ locations, menuGroups, component }) {
|
|
244
|
-
return ({ group = "default", id, overwrite, priority, ...args }) => {
|
|
245
|
-
if (!menuGroups.includes(group)) {
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
const useProps = "props" in args ? () => args.props : args.useProps;
|
|
249
|
-
const Component = component;
|
|
250
|
-
const InjectedComponent = (props) => {
|
|
251
|
-
const componentProps = useProps();
|
|
252
|
-
return /* @__PURE__ */ React8.createElement(Component, { ...props, ...componentProps });
|
|
253
|
-
};
|
|
254
|
-
locations[group].inject({
|
|
255
|
-
id,
|
|
256
|
-
component: InjectedComponent,
|
|
257
|
-
options: {
|
|
258
|
-
priority,
|
|
259
|
-
overwrite
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
function createUseMenuItems(locations) {
|
|
265
|
-
return () => {
|
|
266
|
-
return (0, import_react2.useMemo)(() => {
|
|
267
|
-
return Object.entries(locations).reduce(
|
|
268
|
-
(carry, [groupName, location]) => {
|
|
269
|
-
const items = location.getInjections().map((injection) => ({
|
|
270
|
-
id: injection.id,
|
|
271
|
-
MenuItem: injection.component
|
|
272
|
-
}));
|
|
273
|
-
return {
|
|
274
|
-
...carry,
|
|
275
|
-
[groupName]: items
|
|
276
|
-
};
|
|
277
|
-
},
|
|
278
|
-
{}
|
|
279
|
-
);
|
|
280
|
-
}, []);
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// src/locations/index.ts
|
|
285
|
-
var import_locations2 = require("@elementor/locations");
|
|
286
|
-
var {
|
|
287
|
-
inject: injectIntoPageIndication,
|
|
288
|
-
Slot: PageIndicationSlot
|
|
289
|
-
} = (0, import_locations2.createLocation)();
|
|
290
|
-
var {
|
|
291
|
-
inject: injectIntoResponsive,
|
|
292
|
-
Slot: ResponsiveSlot
|
|
293
|
-
} = (0, import_locations2.createLocation)();
|
|
294
|
-
var {
|
|
295
|
-
inject: injectIntoPrimaryAction,
|
|
296
|
-
Slot: PrimaryActionSlot
|
|
297
|
-
} = (0, import_locations2.createLocation)();
|
|
298
|
-
var mainMenu = createMenu(["exits"]);
|
|
299
|
-
var toolsMenu = createMenu();
|
|
300
|
-
var utilitiesMenu = createMenu();
|
|
301
|
-
var integrationsMenu = createMenu();
|
|
302
|
-
var documentOptionsMenu = createMenu(["save"]);
|
|
303
|
-
|
|
304
|
-
// src/components/app-bar.tsx
|
|
305
|
-
var React21 = __toESM(require("react"));
|
|
306
|
-
var import_ui12 = require("@elementor/ui");
|
|
307
|
-
|
|
308
|
-
// src/components/locations/main-menu-location.tsx
|
|
309
|
-
var React13 = __toESM(require("react"));
|
|
310
|
-
var import_ui8 = require("@elementor/ui");
|
|
311
|
-
|
|
312
|
-
// src/components/ui/popover-menu.tsx
|
|
313
|
-
var React9 = __toESM(require("react"));
|
|
314
|
-
var import_ui4 = require("@elementor/ui");
|
|
315
|
-
function PopoverMenu({ children, ...props }) {
|
|
316
|
-
return /* @__PURE__ */ React9.createElement(MenuContextProvider, { type: "popover" }, /* @__PURE__ */ React9.createElement(
|
|
317
|
-
import_ui4.Menu,
|
|
318
|
-
{
|
|
319
|
-
PaperProps: {
|
|
320
|
-
sx: { mt: 1.5 }
|
|
321
|
-
},
|
|
322
|
-
...props,
|
|
323
|
-
MenuListProps: {
|
|
324
|
-
component: "div",
|
|
325
|
-
dense: true
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
children
|
|
329
|
-
));
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
// src/components/ui/toolbar-logo.tsx
|
|
333
|
-
var React10 = __toESM(require("react"));
|
|
334
|
-
var import_react3 = require("react");
|
|
335
|
-
var import_i18n = require("@wordpress/i18n");
|
|
336
|
-
var import_ui5 = require("@elementor/ui");
|
|
337
|
-
var ElementorLogo = (props) => {
|
|
338
|
-
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" })));
|
|
339
|
-
};
|
|
340
|
-
var StyledToggleButton = (0, import_ui5.styled)(import_ui5.ToggleButton)(({ theme }) => ({
|
|
341
|
-
padding: 0,
|
|
342
|
-
border: 0,
|
|
343
|
-
color: theme.palette.text.primary,
|
|
344
|
-
"&.MuiToggleButton-root:hover": {
|
|
345
|
-
backgroundColor: "initial"
|
|
346
|
-
},
|
|
347
|
-
"&.MuiToggleButton-root.Mui-selected": {
|
|
348
|
-
backgroundColor: "initial"
|
|
349
|
-
}
|
|
350
|
-
}));
|
|
351
|
-
var StyledElementorLogo = (0, import_ui5.styled)(ElementorLogo, {
|
|
352
|
-
shouldForwardProp: (prop) => prop !== "showMenuIcon"
|
|
353
|
-
})(({ theme, showMenuIcon }) => ({
|
|
354
|
-
"& path": {
|
|
355
|
-
fill: theme.palette.background.default,
|
|
356
|
-
transition: "all 0.2s linear",
|
|
357
|
-
transformOrigin: "bottom left",
|
|
358
|
-
"&:first-of-type": {
|
|
359
|
-
transitionDelay: !showMenuIcon && "0.2s",
|
|
360
|
-
transform: showMenuIcon && "translateY(-9px) scaleY(0)"
|
|
361
|
-
},
|
|
362
|
-
"&:not(:first-of-type)": {
|
|
363
|
-
// Emotion automatically change 4 to -4 in RTL moode.
|
|
364
|
-
transform: !showMenuIcon && `translateX(${theme.direction === "rtl" ? "4" : "9"}px) scaleX(0.6)`
|
|
365
|
-
},
|
|
366
|
-
"&:nth-of-type(2)": {
|
|
367
|
-
transitionDelay: showMenuIcon ? "0" : "0.2s"
|
|
368
|
-
},
|
|
369
|
-
"&:nth-of-type(3)": {
|
|
370
|
-
transitionDelay: "0.1s"
|
|
371
|
-
},
|
|
372
|
-
"&:nth-of-type(4)": {
|
|
373
|
-
transitionDelay: showMenuIcon ? "0.2s" : "0"
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}));
|
|
377
|
-
function ToolbarLogo(props) {
|
|
378
|
-
const [isHoverState, setIsHoverState] = (0, import_react3.useState)(false);
|
|
379
|
-
const showMenuIcon = props.selected || isHoverState;
|
|
380
|
-
return /* @__PURE__ */ React10.createElement(
|
|
381
|
-
StyledToggleButton,
|
|
382
|
-
{
|
|
383
|
-
...props,
|
|
384
|
-
value: "selected",
|
|
385
|
-
size: "large",
|
|
386
|
-
onMouseEnter: () => setIsHoverState(true),
|
|
387
|
-
onMouseLeave: () => setIsHoverState(false)
|
|
388
|
-
},
|
|
389
|
-
/* @__PURE__ */ React10.createElement(
|
|
390
|
-
StyledElementorLogo,
|
|
391
|
-
{
|
|
392
|
-
fontSize: "large",
|
|
393
|
-
showMenuIcon,
|
|
394
|
-
titleAccess: (0, import_i18n.__)("Elementor Logo", "elementor")
|
|
395
|
-
}
|
|
396
|
-
)
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
// src/components/locations/integrations-menu-location.tsx
|
|
401
|
-
var React12 = __toESM(require("react"));
|
|
402
|
-
var import_ui7 = require("@elementor/ui");
|
|
403
|
-
var import_i18n2 = require("@wordpress/i18n");
|
|
404
|
-
var import_icons2 = require("@elementor/icons");
|
|
405
|
-
|
|
406
|
-
// src/components/ui/popover-sub-menu.tsx
|
|
407
|
-
var React11 = __toESM(require("react"));
|
|
408
|
-
var import_ui6 = require("@elementor/ui");
|
|
409
|
-
function PopoverSubMenu({ children, ...props }) {
|
|
410
|
-
const theme = (0, import_ui6.useTheme)();
|
|
411
|
-
const isRTL = theme.direction === "rtl";
|
|
412
|
-
return /* @__PURE__ */ React11.createElement(
|
|
413
|
-
PopoverMenu,
|
|
414
|
-
{
|
|
415
|
-
sx: { pointerEvents: "none" },
|
|
416
|
-
PaperProps: {
|
|
417
|
-
sx: {
|
|
418
|
-
// This is a workaround to support RTL in PopoverMenu, since it doesn't support it yet.
|
|
419
|
-
...isRTL ? { marginInlineEnd: -1 } : { marginInlineStart: 1 },
|
|
420
|
-
pointerEvents: "auto"
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
anchorOrigin: { vertical: "center", horizontal: isRTL ? "left" : "right" },
|
|
424
|
-
transformOrigin: { vertical: "center", horizontal: isRTL ? "right" : "left" },
|
|
425
|
-
...props
|
|
426
|
-
},
|
|
427
|
-
children
|
|
428
|
-
);
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
// src/components/locations/integrations-menu-location.tsx
|
|
432
|
-
var { useMenuItems } = integrationsMenu;
|
|
433
|
-
var DirectionalChevronIcon = (0, import_ui7.withDirection)(import_icons2.ChevronRightIcon);
|
|
434
|
-
function IntegrationsMenuLocation({ parentPopupState }) {
|
|
435
|
-
const menuItems = useMenuItems();
|
|
436
|
-
const popupState = (0, import_ui7.usePopupState)({
|
|
437
|
-
parentPopupState,
|
|
438
|
-
variant: "popover",
|
|
439
|
-
popupId: "elementor-v2-app-bar-integrations"
|
|
440
|
-
});
|
|
441
|
-
if (menuItems.default.length === 0) {
|
|
442
|
-
return null;
|
|
443
|
-
}
|
|
444
|
-
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(import_ui7.Divider, null), /* @__PURE__ */ React12.createElement(
|
|
445
|
-
import_ui7.MenuItem,
|
|
446
|
-
{
|
|
447
|
-
...(0, import_ui7.bindHover)(popupState),
|
|
448
|
-
...(0, import_ui7.bindFocus)(popupState)
|
|
449
|
-
},
|
|
450
|
-
/* @__PURE__ */ React12.createElement(import_ui7.ListItemIcon, null, /* @__PURE__ */ React12.createElement(import_icons2.PlugIcon, null)),
|
|
451
|
-
/* @__PURE__ */ React12.createElement(import_ui7.ListItemText, { primary: (0, import_i18n2.__)("Integrations", "elementor") }),
|
|
452
|
-
/* @__PURE__ */ React12.createElement(DirectionalChevronIcon, null),
|
|
453
|
-
/* @__PURE__ */ React12.createElement(PopoverSubMenu, { ...(0, import_ui7.bindMenu)(popupState), onClick: popupState.close }, menuItems.default.map(
|
|
454
|
-
({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React12.createElement(IntegrationsMenuItem, { key: id })
|
|
455
|
-
))
|
|
456
|
-
));
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
// src/components/locations/main-menu-location.tsx
|
|
460
|
-
var { useMenuItems: useMenuItems2 } = mainMenu;
|
|
461
|
-
function MainMenuLocation() {
|
|
462
|
-
const menuItems = useMenuItems2();
|
|
463
|
-
const popupState = (0, import_ui8.usePopupState)({
|
|
464
|
-
variant: "popover",
|
|
465
|
-
popupId: "elementor-v2-app-bar-main-menu"
|
|
466
|
-
});
|
|
467
|
-
return /* @__PURE__ */ React13.createElement(import_ui8.Stack, { sx: { paddingInlineStart: 3 }, direction: "row", alignItems: "center" }, /* @__PURE__ */ React13.createElement(
|
|
468
|
-
ToolbarLogo,
|
|
469
|
-
{
|
|
470
|
-
...(0, import_ui8.bindTrigger)(popupState),
|
|
471
|
-
selected: popupState.isOpen
|
|
472
|
-
}
|
|
473
|
-
), /* @__PURE__ */ React13.createElement(
|
|
474
|
-
PopoverMenu,
|
|
475
|
-
{
|
|
476
|
-
onClick: popupState.close,
|
|
477
|
-
...(0, import_ui8.bindMenu)(popupState),
|
|
478
|
-
marginThreshold: 8
|
|
479
|
-
},
|
|
480
|
-
menuItems.default.map(({ MenuItem: MenuItem3, id }) => /* @__PURE__ */ React13.createElement(MenuItem3, { key: id })),
|
|
481
|
-
/* @__PURE__ */ React13.createElement(IntegrationsMenuLocation, { key: "integrations-location", parentPopupState: popupState }),
|
|
482
|
-
menuItems.exits.length > 0 && /* @__PURE__ */ React13.createElement(import_ui8.Divider, null),
|
|
483
|
-
menuItems.exits.map(({ MenuItem: MenuItem3, id }) => /* @__PURE__ */ React13.createElement(MenuItem3, { key: id }))
|
|
484
|
-
));
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
// src/components/locations/tools-menu-location.tsx
|
|
488
|
-
var React16 = __toESM(require("react"));
|
|
489
|
-
|
|
490
|
-
// src/components/ui/toolbar-menu.tsx
|
|
491
|
-
var React14 = __toESM(require("react"));
|
|
492
|
-
var import_ui9 = require("@elementor/ui");
|
|
493
|
-
function ToolbarMenu({ children, ...props }) {
|
|
494
|
-
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));
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
// src/components/ui/toolbar-menu-more.tsx
|
|
498
|
-
var React15 = __toESM(require("react"));
|
|
499
|
-
var import_ui10 = require("@elementor/ui");
|
|
500
|
-
var import_i18n3 = require("@wordpress/i18n");
|
|
501
|
-
var import_icons3 = require("@elementor/icons");
|
|
502
|
-
function ToolbarMenuMore({ children, id }) {
|
|
503
|
-
const popupState = (0, import_ui10.usePopupState)({
|
|
504
|
-
variant: "popover",
|
|
505
|
-
popupId: id
|
|
506
|
-
});
|
|
507
|
-
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));
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
// src/components/locations/tools-menu-location.tsx
|
|
511
|
-
var MAX_TOOLBAR_ACTIONS = 5;
|
|
512
|
-
var { useMenuItems: useMenuItems3 } = toolsMenu;
|
|
513
|
-
function ToolsMenuLocation() {
|
|
514
|
-
const menuItems = useMenuItems3();
|
|
515
|
-
const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS);
|
|
516
|
-
const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS);
|
|
517
|
-
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 }))));
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
// src/components/locations/utilities-menu-location.tsx
|
|
521
|
-
var React17 = __toESM(require("react"));
|
|
522
|
-
var import_react4 = require("react");
|
|
523
|
-
var import_ui11 = require("@elementor/ui");
|
|
524
|
-
var MAX_TOOLBAR_ACTIONS2 = 3;
|
|
525
|
-
var { useMenuItems: useMenuItems4 } = utilitiesMenu;
|
|
526
|
-
function UtilitiesMenuLocation() {
|
|
527
|
-
const menuItems = useMenuItems4();
|
|
528
|
-
const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS2);
|
|
529
|
-
const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS2);
|
|
530
|
-
return /* @__PURE__ */ React17.createElement(ToolbarMenu, null, toolbarMenuItems.map(
|
|
531
|
-
({ 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))
|
|
532
|
-
), 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 }))));
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
// src/components/locations/primary-action-location.tsx
|
|
536
|
-
var React18 = __toESM(require("react"));
|
|
537
|
-
function PrimaryActionLocation() {
|
|
538
|
-
return /* @__PURE__ */ React18.createElement(PrimaryActionSlot, null);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
// src/components/locations/page-indication-location.tsx
|
|
542
|
-
var React19 = __toESM(require("react"));
|
|
543
|
-
function PageIndicationLocation() {
|
|
544
|
-
return /* @__PURE__ */ React19.createElement(PageIndicationSlot, null);
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
// src/components/locations/responsive-location.tsx
|
|
548
|
-
var React20 = __toESM(require("react"));
|
|
549
|
-
function ResponsiveLocation() {
|
|
550
|
-
return /* @__PURE__ */ React20.createElement(ResponsiveSlot, null);
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
// src/components/app-bar.tsx
|
|
554
|
-
function AppBar() {
|
|
555
|
-
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)))));
|
|
556
|
-
}
|
|
45
|
+
// src/extensions/documents-save/locations.ts
|
|
46
|
+
var import_editor_app_bar_ui = require("@elementor/editor-app-bar-ui");
|
|
47
|
+
var documentOptionsMenu = (0, import_editor_app_bar_ui.__privateCreateMenu)(["save"]);
|
|
557
48
|
|
|
558
49
|
// src/init.ts
|
|
50
|
+
var import_editor_app_bar_ui16 = require("@elementor/editor-app-bar-ui");
|
|
559
51
|
var import_editor2 = require("@elementor/editor");
|
|
560
52
|
|
|
561
53
|
// src/sync/redirect-old-menus.ts
|
|
@@ -566,12 +58,15 @@ function redirectOldMenus() {
|
|
|
566
58
|
});
|
|
567
59
|
}
|
|
568
60
|
|
|
61
|
+
// src/extensions/documents-indicator/index.ts
|
|
62
|
+
var import_editor_app_bar_ui2 = require("@elementor/editor-app-bar-ui");
|
|
63
|
+
|
|
569
64
|
// src/extensions/documents-indicator/components/settings-button.tsx
|
|
570
|
-
var
|
|
571
|
-
var
|
|
572
|
-
var
|
|
65
|
+
var React = __toESM(require("react"));
|
|
66
|
+
var import_ui = require("@elementor/ui");
|
|
67
|
+
var import_i18n = require("@wordpress/i18n");
|
|
573
68
|
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
574
|
-
var
|
|
69
|
+
var import_icons = require("@elementor/icons");
|
|
575
70
|
var import_editor_documents = require("@elementor/editor-documents");
|
|
576
71
|
function SettingsButton() {
|
|
577
72
|
const activeDocument = (0, import_editor_documents.__useActiveDocument)();
|
|
@@ -581,9 +76,9 @@ function SettingsButton() {
|
|
|
581
76
|
if (!document2) {
|
|
582
77
|
return null;
|
|
583
78
|
}
|
|
584
|
-
const title = (0,
|
|
585
|
-
return /* @__PURE__ */
|
|
586
|
-
|
|
79
|
+
const title = (0, import_i18n.__)("%s Settings", "elementor").replace("%s", document2.type.label);
|
|
80
|
+
return /* @__PURE__ */ React.createElement(Tooltip, { title }, /* @__PURE__ */ React.createElement(import_ui.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React.createElement(
|
|
81
|
+
import_ui.ToggleButton,
|
|
587
82
|
{
|
|
588
83
|
value: "document-settings",
|
|
589
84
|
selected: isActive,
|
|
@@ -600,12 +95,12 @@ function SettingsButton() {
|
|
|
600
95
|
}
|
|
601
96
|
}
|
|
602
97
|
},
|
|
603
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ React.createElement(import_icons.SettingsIcon, { fontSize: "small" })
|
|
604
99
|
)));
|
|
605
100
|
}
|
|
606
|
-
function
|
|
607
|
-
return /* @__PURE__ */
|
|
608
|
-
|
|
101
|
+
function Tooltip(props) {
|
|
102
|
+
return /* @__PURE__ */ React.createElement(
|
|
103
|
+
import_ui.Tooltip,
|
|
609
104
|
{
|
|
610
105
|
PopperProps: {
|
|
611
106
|
sx: {
|
|
@@ -621,7 +116,7 @@ function Tooltip3(props) {
|
|
|
621
116
|
|
|
622
117
|
// src/extensions/documents-indicator/index.ts
|
|
623
118
|
function init() {
|
|
624
|
-
|
|
119
|
+
(0, import_editor_app_bar_ui2.__privateInjectIntoPageIndication)({
|
|
625
120
|
id: "document-settings-button",
|
|
626
121
|
component: SettingsButton,
|
|
627
122
|
options: {
|
|
@@ -631,16 +126,19 @@ function init() {
|
|
|
631
126
|
});
|
|
632
127
|
}
|
|
633
128
|
|
|
129
|
+
// src/extensions/documents-preview/index.ts
|
|
130
|
+
var import_editor_app_bar_ui3 = require("@elementor/editor-app-bar-ui");
|
|
131
|
+
|
|
634
132
|
// src/extensions/documents-preview/hooks/use-action-props.ts
|
|
635
|
-
var
|
|
636
|
-
var
|
|
133
|
+
var import_i18n2 = require("@wordpress/i18n");
|
|
134
|
+
var import_icons2 = require("@elementor/icons");
|
|
637
135
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
638
136
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
639
137
|
function useActionProps() {
|
|
640
138
|
const document2 = (0, import_editor_documents2.__useActiveDocument)();
|
|
641
139
|
return {
|
|
642
|
-
icon:
|
|
643
|
-
title: (0,
|
|
140
|
+
icon: import_icons2.EyeIcon,
|
|
141
|
+
title: (0, import_i18n2.__)("Preview Changes", "elementor"),
|
|
644
142
|
onClick: () => document2 && (0, import_editor_v1_adapters3.__privateRunCommand)("editor/documents/preview", {
|
|
645
143
|
id: document2.id,
|
|
646
144
|
force: true
|
|
@@ -650,7 +148,7 @@ function useActionProps() {
|
|
|
650
148
|
|
|
651
149
|
// src/extensions/documents-preview/index.ts
|
|
652
150
|
function init2() {
|
|
653
|
-
|
|
151
|
+
import_editor_app_bar_ui3.__privateUtilitiesMenu.registerAction({
|
|
654
152
|
id: "document-preview-button",
|
|
655
153
|
priority: 30,
|
|
656
154
|
// After help.
|
|
@@ -658,43 +156,47 @@ function init2() {
|
|
|
658
156
|
});
|
|
659
157
|
}
|
|
660
158
|
|
|
159
|
+
// src/extensions/documents-save/index.ts
|
|
160
|
+
var import_editor_app_bar_ui5 = require("@elementor/editor-app-bar-ui");
|
|
161
|
+
|
|
661
162
|
// src/extensions/documents-save/hooks/use-document-save-draft-props.ts
|
|
662
|
-
var
|
|
663
|
-
var
|
|
163
|
+
var import_i18n3 = require("@wordpress/i18n");
|
|
164
|
+
var import_icons3 = require("@elementor/icons");
|
|
664
165
|
var import_editor_documents3 = require("@elementor/editor-documents");
|
|
665
166
|
function useDocumentSaveDraftProps() {
|
|
666
167
|
const document2 = (0, import_editor_documents3.__useActiveDocument)();
|
|
667
168
|
const { saveDraft } = (0, import_editor_documents3.__useActiveDocumentActions)();
|
|
668
169
|
return {
|
|
669
|
-
icon:
|
|
670
|
-
title: (0,
|
|
170
|
+
icon: import_icons3.FileReportIcon,
|
|
171
|
+
title: (0, import_i18n3.__)("Save Draft", "elementor"),
|
|
671
172
|
onClick: saveDraft,
|
|
672
173
|
disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
|
|
673
174
|
};
|
|
674
175
|
}
|
|
675
176
|
|
|
676
177
|
// src/extensions/documents-save/hooks/use-document-save-template-props.ts
|
|
677
|
-
var
|
|
678
|
-
var
|
|
178
|
+
var import_i18n4 = require("@wordpress/i18n");
|
|
179
|
+
var import_icons4 = require("@elementor/icons");
|
|
679
180
|
var import_editor_documents4 = require("@elementor/editor-documents");
|
|
680
181
|
function useDocumentSaveTemplateProps() {
|
|
681
182
|
const { saveTemplate } = (0, import_editor_documents4.__useActiveDocumentActions)();
|
|
682
183
|
return {
|
|
683
|
-
icon:
|
|
684
|
-
title: (0,
|
|
184
|
+
icon: import_icons4.FolderIcon,
|
|
185
|
+
title: (0, import_i18n4.__)("Save as Template", "elementor"),
|
|
685
186
|
onClick: saveTemplate
|
|
686
187
|
};
|
|
687
188
|
}
|
|
688
189
|
|
|
689
190
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
690
|
-
var
|
|
691
|
-
var
|
|
191
|
+
var React3 = __toESM(require("react"));
|
|
192
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
692
193
|
|
|
693
194
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
694
|
-
var
|
|
695
|
-
var
|
|
696
|
-
var
|
|
697
|
-
var
|
|
195
|
+
var React2 = __toESM(require("react"));
|
|
196
|
+
var import_ui2 = require("@elementor/ui");
|
|
197
|
+
var import_editor_app_bar_ui4 = require("@elementor/editor-app-bar-ui");
|
|
198
|
+
var { useMenuItems } = documentOptionsMenu;
|
|
199
|
+
var StyledPopoverMenu = (0, import_ui2.styled)(import_editor_app_bar_ui4.__privatePopoverMenu)`
|
|
698
200
|
& > .MuiPopover-paper > .MuiList-root > .MuiDivider-root {
|
|
699
201
|
&:only-child, /* A divider is being rendered lonely */
|
|
700
202
|
&:last-child, /* The last group renders empty but renders a divider */
|
|
@@ -704,8 +206,8 @@ var StyledPopoverMenu = (0, import_ui14.styled)(PopoverMenu)`
|
|
|
704
206
|
}
|
|
705
207
|
`;
|
|
706
208
|
function PrimaryActionMenu(props) {
|
|
707
|
-
const { save: saveActions, default: defaultActions } =
|
|
708
|
-
return /* @__PURE__ */
|
|
209
|
+
const { save: saveActions, default: defaultActions } = useMenuItems();
|
|
210
|
+
return /* @__PURE__ */ React2.createElement(
|
|
709
211
|
StyledPopoverMenu,
|
|
710
212
|
{
|
|
711
213
|
...props,
|
|
@@ -722,25 +224,25 @@ function PrimaryActionMenu(props) {
|
|
|
722
224
|
sx: { mt: 0.5 }
|
|
723
225
|
}
|
|
724
226
|
},
|
|
725
|
-
saveActions.map(({ MenuItem
|
|
726
|
-
index > 0 && /* @__PURE__ */
|
|
727
|
-
/* @__PURE__ */
|
|
227
|
+
saveActions.map(({ MenuItem, id }, index) => [
|
|
228
|
+
index > 0 && /* @__PURE__ */ React2.createElement(import_ui2.Divider, { key: `${id}-divider` }),
|
|
229
|
+
/* @__PURE__ */ React2.createElement(MenuItem, { key: id })
|
|
728
230
|
]),
|
|
729
|
-
defaultActions.length > 0 && /* @__PURE__ */
|
|
730
|
-
defaultActions.map(({ MenuItem
|
|
231
|
+
defaultActions.length > 0 && /* @__PURE__ */ React2.createElement(import_ui2.Divider, null),
|
|
232
|
+
defaultActions.map(({ MenuItem, id }) => /* @__PURE__ */ React2.createElement(MenuItem, { key: id }))
|
|
731
233
|
);
|
|
732
234
|
}
|
|
733
235
|
|
|
734
236
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
735
|
-
var
|
|
237
|
+
var import_ui3 = require("@elementor/ui");
|
|
736
238
|
var import_editor_documents5 = require("@elementor/editor-documents");
|
|
737
|
-
var
|
|
239
|
+
var import_icons5 = require("@elementor/icons");
|
|
738
240
|
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
739
241
|
function PrimaryAction() {
|
|
740
242
|
const document2 = (0, import_editor_documents5.__useActiveDocument)();
|
|
741
243
|
const { save } = (0, import_editor_documents5.__useActiveDocumentActions)();
|
|
742
244
|
const isPreviewMode = (0, import_editor_v1_adapters4.__privateUseIsPreviewMode)();
|
|
743
|
-
const popupState = (0,
|
|
245
|
+
const popupState = (0, import_ui3.usePopupState)({
|
|
744
246
|
variant: "popover",
|
|
745
247
|
popupId: "document-save-options"
|
|
746
248
|
});
|
|
@@ -750,8 +252,8 @@ function PrimaryAction() {
|
|
|
750
252
|
const isPublishDisabled = isPreviewMode || !isPublishEnabled(document2);
|
|
751
253
|
const isSaveOptionsDisabled = isPreviewMode || document2.type.value === "kit";
|
|
752
254
|
const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
|
|
753
|
-
return /* @__PURE__ */
|
|
754
|
-
|
|
255
|
+
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(import_ui3.ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React3.createElement(
|
|
256
|
+
import_ui3.Button,
|
|
755
257
|
{
|
|
756
258
|
onClick: () => !document2.isSaving && save(),
|
|
757
259
|
sx: {
|
|
@@ -764,11 +266,11 @@ function PrimaryAction() {
|
|
|
764
266
|
},
|
|
765
267
|
disabled: isPublishDisabled
|
|
766
268
|
},
|
|
767
|
-
shouldShowSpinner ? /* @__PURE__ */
|
|
768
|
-
), /* @__PURE__ */
|
|
769
|
-
|
|
269
|
+
shouldShowSpinner ? /* @__PURE__ */ React3.createElement(import_ui3.CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
|
|
270
|
+
), /* @__PURE__ */ React3.createElement(
|
|
271
|
+
import_ui3.Tooltip,
|
|
770
272
|
{
|
|
771
|
-
title: (0,
|
|
273
|
+
title: (0, import_i18n5.__)("Save Options", "elementor"),
|
|
772
274
|
PopperProps: {
|
|
773
275
|
sx: {
|
|
774
276
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -778,21 +280,21 @@ function PrimaryAction() {
|
|
|
778
280
|
}
|
|
779
281
|
}
|
|
780
282
|
},
|
|
781
|
-
/* @__PURE__ */
|
|
782
|
-
|
|
283
|
+
/* @__PURE__ */ React3.createElement(import_ui3.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React3.createElement(
|
|
284
|
+
import_ui3.Button,
|
|
783
285
|
{
|
|
784
286
|
size: "small",
|
|
785
|
-
...(0,
|
|
287
|
+
...(0, import_ui3.bindTrigger)(popupState),
|
|
786
288
|
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
787
289
|
disabled: isSaveOptionsDisabled,
|
|
788
|
-
"aria-label": (0,
|
|
290
|
+
"aria-label": (0, import_i18n5.__)("Save Options", "elementor")
|
|
789
291
|
},
|
|
790
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ React3.createElement(import_icons5.ChevronDownIcon, null)
|
|
791
293
|
))
|
|
792
|
-
)), /* @__PURE__ */
|
|
294
|
+
)), /* @__PURE__ */ React3.createElement(PrimaryActionMenu, { ...(0, import_ui3.bindMenu)(popupState), onClick: popupState.close }));
|
|
793
295
|
}
|
|
794
296
|
function getLabel(document2) {
|
|
795
|
-
return document2.userCan.publish ? (0,
|
|
297
|
+
return document2.userCan.publish ? (0, import_i18n5.__)("Publish", "elementor") : (0, import_i18n5.__)("Submit", "elementor");
|
|
796
298
|
}
|
|
797
299
|
function isPublishEnabled(document2) {
|
|
798
300
|
if (document2.type.value === "kit") {
|
|
@@ -803,7 +305,7 @@ function isPublishEnabled(document2) {
|
|
|
803
305
|
|
|
804
306
|
// src/extensions/documents-save/index.ts
|
|
805
307
|
function init3() {
|
|
806
|
-
|
|
308
|
+
(0, import_editor_app_bar_ui5.__privateInjectIntoPrimaryAction)({
|
|
807
309
|
id: "document-primary-action",
|
|
808
310
|
component: PrimaryAction
|
|
809
311
|
});
|
|
@@ -824,11 +326,11 @@ function init3() {
|
|
|
824
326
|
}
|
|
825
327
|
|
|
826
328
|
// src/extensions/elements/sync/sync-panel-title.ts
|
|
827
|
-
var
|
|
329
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
828
330
|
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
829
331
|
function syncPanelTitle() {
|
|
830
|
-
const panelTitle = (0,
|
|
831
|
-
const tabTitle = (0,
|
|
332
|
+
const panelTitle = (0, import_i18n6.__)("Elements", "elementor");
|
|
333
|
+
const tabTitle = (0, import_i18n6.__)("Widgets", "elementor");
|
|
832
334
|
(0, import_editor_v1_adapters5.__privateListenTo)(
|
|
833
335
|
(0, import_editor_v1_adapters5.routeOpenEvent)("panel/elements"),
|
|
834
336
|
() => {
|
|
@@ -856,15 +358,18 @@ function setTabTitle(title) {
|
|
|
856
358
|
}
|
|
857
359
|
}
|
|
858
360
|
|
|
361
|
+
// src/extensions/elements/index.ts
|
|
362
|
+
var import_editor_app_bar_ui6 = require("@elementor/editor-app-bar-ui");
|
|
363
|
+
|
|
859
364
|
// src/extensions/elements/hooks/use-action-props.ts
|
|
860
|
-
var
|
|
861
|
-
var
|
|
365
|
+
var import_icons6 = require("@elementor/icons");
|
|
366
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
862
367
|
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
863
368
|
function useActionProps2() {
|
|
864
369
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters6.__privateUseRouteStatus)("panel/elements");
|
|
865
370
|
return {
|
|
866
|
-
title: (0,
|
|
867
|
-
icon:
|
|
371
|
+
title: (0, import_i18n7.__)("Add Element", "elementor"),
|
|
372
|
+
icon: import_icons6.PlusIcon,
|
|
868
373
|
onClick: () => (0, import_editor_v1_adapters6.__privateOpenRoute)("panel/elements/categories"),
|
|
869
374
|
selected: isActive,
|
|
870
375
|
disabled: isBlocked
|
|
@@ -874,16 +379,19 @@ function useActionProps2() {
|
|
|
874
379
|
// src/extensions/elements/index.ts
|
|
875
380
|
function init4() {
|
|
876
381
|
syncPanelTitle();
|
|
877
|
-
|
|
382
|
+
import_editor_app_bar_ui6.__privateToolsMenu.registerToggleAction({
|
|
878
383
|
id: "open-elements-panel",
|
|
879
384
|
priority: 1,
|
|
880
385
|
useProps: useActionProps2
|
|
881
386
|
});
|
|
882
387
|
}
|
|
883
388
|
|
|
389
|
+
// src/extensions/finder/index.ts
|
|
390
|
+
var import_editor_app_bar_ui7 = require("@elementor/editor-app-bar-ui");
|
|
391
|
+
|
|
884
392
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
885
|
-
var
|
|
886
|
-
var
|
|
393
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
394
|
+
var import_icons7 = require("@elementor/icons");
|
|
887
395
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
888
396
|
function useActionProps3() {
|
|
889
397
|
const { isBlocked } = (0, import_editor_v1_adapters7.__privateUseRouteStatus)("finder", {
|
|
@@ -891,8 +399,8 @@ function useActionProps3() {
|
|
|
891
399
|
blockOnPreviewMode: false
|
|
892
400
|
});
|
|
893
401
|
return {
|
|
894
|
-
title: (0,
|
|
895
|
-
icon:
|
|
402
|
+
title: (0, import_i18n8.__)("Finder", "elementor"),
|
|
403
|
+
icon: import_icons7.SearchIcon,
|
|
896
404
|
onClick: () => (0, import_editor_v1_adapters7.__privateRunCommand)("finder/toggle"),
|
|
897
405
|
disabled: isBlocked
|
|
898
406
|
};
|
|
@@ -900,7 +408,7 @@ function useActionProps3() {
|
|
|
900
408
|
|
|
901
409
|
// src/extensions/finder/index.ts
|
|
902
410
|
function init5() {
|
|
903
|
-
|
|
411
|
+
import_editor_app_bar_ui7.__privateUtilitiesMenu.registerAction({
|
|
904
412
|
id: "toggle-finder",
|
|
905
413
|
priority: 10,
|
|
906
414
|
// Before help.
|
|
@@ -909,33 +417,37 @@ function init5() {
|
|
|
909
417
|
}
|
|
910
418
|
|
|
911
419
|
// src/extensions/help/index.ts
|
|
912
|
-
var
|
|
913
|
-
var
|
|
420
|
+
var import_editor_app_bar_ui8 = require("@elementor/editor-app-bar-ui");
|
|
421
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
422
|
+
var import_icons8 = require("@elementor/icons");
|
|
914
423
|
function init6() {
|
|
915
|
-
|
|
424
|
+
import_editor_app_bar_ui8.__privateUtilitiesMenu.registerLink({
|
|
916
425
|
id: "open-help-center",
|
|
917
426
|
priority: 20,
|
|
918
427
|
// After Finder.
|
|
919
428
|
useProps: () => {
|
|
920
429
|
return {
|
|
921
|
-
title: (0,
|
|
430
|
+
title: (0, import_i18n9.__)("Help", "elementor"),
|
|
922
431
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
923
|
-
icon:
|
|
432
|
+
icon: import_icons8.HelpIcon,
|
|
924
433
|
target: "_blank"
|
|
925
434
|
};
|
|
926
435
|
}
|
|
927
436
|
});
|
|
928
437
|
}
|
|
929
438
|
|
|
439
|
+
// src/extensions/history/index.ts
|
|
440
|
+
var import_editor_app_bar_ui9 = require("@elementor/editor-app-bar-ui");
|
|
441
|
+
|
|
930
442
|
// src/extensions/history/hooks/use-action-props.ts
|
|
931
|
-
var
|
|
932
|
-
var
|
|
443
|
+
var import_icons9 = require("@elementor/icons");
|
|
444
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
933
445
|
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
934
446
|
function useActionProps4() {
|
|
935
447
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters8.__privateUseRouteStatus)("panel/history");
|
|
936
448
|
return {
|
|
937
|
-
title: (0,
|
|
938
|
-
icon:
|
|
449
|
+
title: (0, import_i18n10.__)("History", "elementor"),
|
|
450
|
+
icon: import_icons9.HistoryIcon,
|
|
939
451
|
onClick: () => (0, import_editor_v1_adapters8.__privateOpenRoute)("panel/history/actions"),
|
|
940
452
|
selected: isActive,
|
|
941
453
|
disabled: isBlocked
|
|
@@ -944,28 +456,31 @@ function useActionProps4() {
|
|
|
944
456
|
|
|
945
457
|
// src/extensions/history/index.ts
|
|
946
458
|
function init7() {
|
|
947
|
-
|
|
459
|
+
import_editor_app_bar_ui9.__privateMainMenu.registerToggleAction({
|
|
948
460
|
id: "open-history",
|
|
949
461
|
priority: 20,
|
|
950
462
|
useProps: useActionProps4
|
|
951
463
|
});
|
|
952
464
|
}
|
|
953
465
|
|
|
466
|
+
// src/extensions/keyboard-shortcuts/index.ts
|
|
467
|
+
var import_editor_app_bar_ui10 = require("@elementor/editor-app-bar-ui");
|
|
468
|
+
|
|
954
469
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
955
|
-
var
|
|
956
|
-
var
|
|
470
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
471
|
+
var import_icons10 = require("@elementor/icons");
|
|
957
472
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
958
473
|
function useActionProps5() {
|
|
959
474
|
return {
|
|
960
|
-
icon:
|
|
961
|
-
title: (0,
|
|
475
|
+
icon: import_icons10.KeyboardIcon,
|
|
476
|
+
title: (0, import_i18n11.__)("Keyboard Shortcuts", "elementor"),
|
|
962
477
|
onClick: () => (0, import_editor_v1_adapters9.__privateRunCommand)("shortcuts/open")
|
|
963
478
|
};
|
|
964
479
|
}
|
|
965
480
|
|
|
966
481
|
// src/extensions/keyboard-shortcuts/index.ts
|
|
967
482
|
function init8() {
|
|
968
|
-
|
|
483
|
+
import_editor_app_bar_ui10.__privateMainMenu.registerAction({
|
|
969
484
|
id: "open-keyboard-shortcuts",
|
|
970
485
|
group: "default",
|
|
971
486
|
priority: 40,
|
|
@@ -978,11 +493,11 @@ function init8() {
|
|
|
978
493
|
var import_editor = require("@elementor/editor");
|
|
979
494
|
|
|
980
495
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
981
|
-
var
|
|
496
|
+
var React6 = __toESM(require("react"));
|
|
982
497
|
|
|
983
498
|
// src/extensions/site-settings/components/portal.tsx
|
|
984
|
-
var
|
|
985
|
-
var
|
|
499
|
+
var React4 = __toESM(require("react"));
|
|
500
|
+
var import_ui4 = require("@elementor/ui");
|
|
986
501
|
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
987
502
|
function Portal(props) {
|
|
988
503
|
const containerRef = (0, import_editor_v1_adapters10.__privateUseListenTo)(
|
|
@@ -995,27 +510,27 @@ function Portal(props) {
|
|
|
995
510
|
if (!containerRef.current) {
|
|
996
511
|
return null;
|
|
997
512
|
}
|
|
998
|
-
return /* @__PURE__ */
|
|
513
|
+
return /* @__PURE__ */ React4.createElement(import_ui4.Portal, { container: containerRef.current, ...props });
|
|
999
514
|
}
|
|
1000
515
|
function getContainerRef() {
|
|
1001
516
|
return (0, import_editor_v1_adapters10.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
|
|
1002
517
|
}
|
|
1003
518
|
|
|
1004
519
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
1005
|
-
var
|
|
520
|
+
var React5 = __toESM(require("react"));
|
|
1006
521
|
var import_editor_documents6 = require("@elementor/editor-documents");
|
|
1007
|
-
var
|
|
1008
|
-
var
|
|
522
|
+
var import_ui5 = require("@elementor/ui");
|
|
523
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
1009
524
|
function PrimaryAction2() {
|
|
1010
525
|
const document2 = (0, import_editor_documents6.__useActiveDocument)();
|
|
1011
526
|
const { save } = (0, import_editor_documents6.__useActiveDocumentActions)();
|
|
1012
|
-
return /* @__PURE__ */
|
|
527
|
+
return /* @__PURE__ */ React5.createElement(import_ui5.Paper, { sx: {
|
|
1013
528
|
px: 5,
|
|
1014
529
|
py: 4,
|
|
1015
530
|
borderTop: 1,
|
|
1016
531
|
borderColor: "divider"
|
|
1017
|
-
} }, /* @__PURE__ */
|
|
1018
|
-
|
|
532
|
+
} }, /* @__PURE__ */ React5.createElement(
|
|
533
|
+
import_ui5.Button,
|
|
1019
534
|
{
|
|
1020
535
|
variant: "contained",
|
|
1021
536
|
disabled: !document2 || !document2.isDirty,
|
|
@@ -1023,26 +538,29 @@ function PrimaryAction2() {
|
|
|
1023
538
|
sx: { width: "100%" },
|
|
1024
539
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
1025
540
|
},
|
|
1026
|
-
document2?.isSaving ? /* @__PURE__ */
|
|
541
|
+
document2?.isSaving ? /* @__PURE__ */ React5.createElement(import_ui5.CircularProgress, null) : (0, import_i18n12.__)("Save Changes", "elementor")
|
|
1027
542
|
));
|
|
1028
543
|
}
|
|
1029
544
|
|
|
1030
545
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
1031
546
|
function PortalledPrimaryAction() {
|
|
1032
|
-
return /* @__PURE__ */
|
|
547
|
+
return /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(PrimaryAction2, null));
|
|
1033
548
|
}
|
|
1034
549
|
|
|
550
|
+
// src/extensions/site-settings/index.ts
|
|
551
|
+
var import_editor_app_bar_ui11 = require("@elementor/editor-app-bar-ui");
|
|
552
|
+
|
|
1035
553
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
1036
|
-
var
|
|
554
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
1037
555
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
1038
|
-
var
|
|
556
|
+
var import_icons11 = require("@elementor/icons");
|
|
1039
557
|
function useActionProps6() {
|
|
1040
558
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters11.__privateUseRouteStatus)("panel/global", {
|
|
1041
559
|
blockOnKitRoutes: false
|
|
1042
560
|
});
|
|
1043
561
|
return {
|
|
1044
|
-
title: (0,
|
|
1045
|
-
icon:
|
|
562
|
+
title: (0, import_i18n13.__)("Site Settings", "elementor"),
|
|
563
|
+
icon: import_icons11.AdjustmentsHorizontalIcon,
|
|
1046
564
|
onClick: () => isActive ? (0, import_editor_v1_adapters11.__privateRunCommand)("panel/global/close") : (0, import_editor_v1_adapters11.__privateRunCommand)("panel/global/open"),
|
|
1047
565
|
selected: isActive,
|
|
1048
566
|
disabled: isBlocked
|
|
@@ -1055,22 +573,25 @@ function init9() {
|
|
|
1055
573
|
id: "site-settings-primary-action-portal",
|
|
1056
574
|
component: PortalledPrimaryAction
|
|
1057
575
|
});
|
|
1058
|
-
|
|
576
|
+
import_editor_app_bar_ui11.__privateToolsMenu.registerToggleAction({
|
|
1059
577
|
id: "toggle-site-settings",
|
|
1060
578
|
priority: 2,
|
|
1061
579
|
useProps: useActionProps6
|
|
1062
580
|
});
|
|
1063
581
|
}
|
|
1064
582
|
|
|
583
|
+
// src/extensions/structure/index.ts
|
|
584
|
+
var import_editor_app_bar_ui12 = require("@elementor/editor-app-bar-ui");
|
|
585
|
+
|
|
1065
586
|
// src/extensions/structure/hooks/use-action-props.ts
|
|
1066
|
-
var
|
|
587
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
1067
588
|
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
1068
|
-
var
|
|
589
|
+
var import_icons12 = require("@elementor/icons");
|
|
1069
590
|
function useActionProps7() {
|
|
1070
591
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters12.__privateUseRouteStatus)("navigator");
|
|
1071
592
|
return {
|
|
1072
|
-
title: (0,
|
|
1073
|
-
icon:
|
|
593
|
+
title: (0, import_i18n14.__)("Structure", "elementor"),
|
|
594
|
+
icon: import_icons12.StructureIcon,
|
|
1074
595
|
onClick: () => (0, import_editor_v1_adapters12.__privateRunCommand)("navigator/toggle"),
|
|
1075
596
|
selected: isActive,
|
|
1076
597
|
disabled: isBlocked
|
|
@@ -1079,42 +600,48 @@ function useActionProps7() {
|
|
|
1079
600
|
|
|
1080
601
|
// src/extensions/structure/index.ts
|
|
1081
602
|
function init10() {
|
|
1082
|
-
|
|
603
|
+
import_editor_app_bar_ui12.__privateToolsMenu.registerToggleAction({
|
|
1083
604
|
id: "toggle-structure-view",
|
|
1084
605
|
priority: 3,
|
|
1085
606
|
useProps: useActionProps7
|
|
1086
607
|
});
|
|
1087
608
|
}
|
|
1088
609
|
|
|
610
|
+
// src/extensions/theme-builder/index.ts
|
|
611
|
+
var import_editor_app_bar_ui13 = require("@elementor/editor-app-bar-ui");
|
|
612
|
+
|
|
1089
613
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1090
|
-
var
|
|
1091
|
-
var
|
|
614
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
615
|
+
var import_icons13 = require("@elementor/icons");
|
|
1092
616
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
1093
617
|
function useActionProps8() {
|
|
1094
618
|
return {
|
|
1095
|
-
icon:
|
|
1096
|
-
title: (0,
|
|
619
|
+
icon: import_icons13.ThemeBuilderIcon,
|
|
620
|
+
title: (0, import_i18n15.__)("Theme Builder", "elementor"),
|
|
1097
621
|
onClick: () => (0, import_editor_v1_adapters13.__privateRunCommand)("app/open")
|
|
1098
622
|
};
|
|
1099
623
|
}
|
|
1100
624
|
|
|
1101
625
|
// src/extensions/theme-builder/index.ts
|
|
1102
626
|
function init11() {
|
|
1103
|
-
|
|
627
|
+
import_editor_app_bar_ui13.__privateMainMenu.registerAction({
|
|
1104
628
|
id: "open-theme-builder",
|
|
1105
629
|
useProps: useActionProps8
|
|
1106
630
|
});
|
|
1107
631
|
}
|
|
1108
632
|
|
|
633
|
+
// src/extensions/user-preferences/index.ts
|
|
634
|
+
var import_editor_app_bar_ui14 = require("@elementor/editor-app-bar-ui");
|
|
635
|
+
|
|
1109
636
|
// src/extensions/user-preferences/hooks/use-action-props.ts
|
|
1110
|
-
var
|
|
1111
|
-
var
|
|
637
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
638
|
+
var import_icons14 = require("@elementor/icons");
|
|
1112
639
|
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
1113
640
|
function useActionProps9() {
|
|
1114
641
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters14.__privateUseRouteStatus)("panel/editor-preferences");
|
|
1115
642
|
return {
|
|
1116
|
-
icon:
|
|
1117
|
-
title: (0,
|
|
643
|
+
icon: import_icons14.ToggleRightIcon,
|
|
644
|
+
title: (0, import_i18n16.__)("User Preferences", "elementor"),
|
|
1118
645
|
onClick: () => (0, import_editor_v1_adapters14.__privateOpenRoute)("panel/editor-preferences"),
|
|
1119
646
|
selected: isActive,
|
|
1120
647
|
disabled: isBlocked
|
|
@@ -1123,7 +650,7 @@ function useActionProps9() {
|
|
|
1123
650
|
|
|
1124
651
|
// src/extensions/user-preferences/index.ts
|
|
1125
652
|
function init12() {
|
|
1126
|
-
|
|
653
|
+
import_editor_app_bar_ui14.__privateMainMenu.registerToggleAction({
|
|
1127
654
|
id: "open-user-preferences",
|
|
1128
655
|
priority: 30,
|
|
1129
656
|
// After history.
|
|
@@ -1132,19 +659,20 @@ function init12() {
|
|
|
1132
659
|
}
|
|
1133
660
|
|
|
1134
661
|
// src/extensions/wordpress/index.ts
|
|
1135
|
-
var
|
|
1136
|
-
var
|
|
662
|
+
var import_editor_app_bar_ui15 = require("@elementor/editor-app-bar-ui");
|
|
663
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
664
|
+
var import_icons15 = require("@elementor/icons");
|
|
1137
665
|
var import_editor_documents7 = require("@elementor/editor-documents");
|
|
1138
666
|
function init13() {
|
|
1139
|
-
|
|
667
|
+
import_editor_app_bar_ui15.__privateMainMenu.registerLink({
|
|
1140
668
|
id: "exit-to-wordpress",
|
|
1141
669
|
group: "exits",
|
|
1142
670
|
useProps: () => {
|
|
1143
671
|
const document2 = (0, import_editor_documents7.__useActiveDocument)();
|
|
1144
672
|
return {
|
|
1145
|
-
title: (0,
|
|
673
|
+
title: (0, import_i18n17.__)("Exit to WordPress", "elementor"),
|
|
1146
674
|
href: document2?.links?.platformEdit,
|
|
1147
|
-
icon:
|
|
675
|
+
icon: import_icons15.WordpressIcon
|
|
1148
676
|
};
|
|
1149
677
|
}
|
|
1150
678
|
});
|
|
@@ -1173,7 +701,7 @@ function init15() {
|
|
|
1173
701
|
init14();
|
|
1174
702
|
(0, import_editor2.injectIntoTop)({
|
|
1175
703
|
id: "app-bar",
|
|
1176
|
-
component:
|
|
704
|
+
component: import_editor_app_bar_ui16.__privateAppBar
|
|
1177
705
|
});
|
|
1178
706
|
}
|
|
1179
707
|
|