@elementor/editor-app-bar 4.0.7 → 4.0.9
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/dist/index.js +420 -251
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +356 -187
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -12
- package/src/components/locations/tools-menu-location.tsx +2 -0
- package/src/extensions/angie/angie-consts.ts +20 -0
- package/src/extensions/angie/components/angie-guide-card.tsx +54 -0
- package/src/extensions/angie/components/angie-guide-location.tsx +91 -0
- package/src/extensions/angie/hooks/use-action-props.ts +34 -0
- package/src/extensions/angie/hooks/use-auto-show.ts +17 -0
- package/src/extensions/angie/index.ts +10 -0
- package/src/extensions/documents-settings/index.ts +1 -1
- package/src/extensions/index.ts +2 -0
package/dist/index.mjs
CHANGED
|
@@ -189,9 +189,9 @@ var documentOptionsMenu = createMenu2({
|
|
|
189
189
|
import { injectIntoTop as injectIntoTop2 } from "@elementor/editor";
|
|
190
190
|
|
|
191
191
|
// src/components/app-bar.tsx
|
|
192
|
-
import * as
|
|
192
|
+
import * as React22 from "react";
|
|
193
193
|
import { __useActiveDocument as useActiveDocument } from "@elementor/editor-documents";
|
|
194
|
-
import { AppBar as BaseAppBar, Box as Box3, Divider as Divider2, Grid, ThemeProvider as
|
|
194
|
+
import { AppBar as BaseAppBar, Box as Box3, Divider as Divider2, Grid, ThemeProvider as ThemeProvider3, Toolbar } from "@elementor/ui";
|
|
195
195
|
|
|
196
196
|
// src/components/locations/main-menu-location.tsx
|
|
197
197
|
import * as React10 from "react";
|
|
@@ -329,33 +329,162 @@ function ResponsiveLocation() {
|
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
// src/components/locations/tools-menu-location.tsx
|
|
332
|
-
import * as
|
|
332
|
+
import * as React20 from "react";
|
|
333
333
|
|
|
334
|
-
// src/components/
|
|
334
|
+
// src/extensions/angie/components/angie-guide-location.tsx
|
|
335
|
+
import * as React15 from "react";
|
|
336
|
+
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
337
|
+
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
338
|
+
import { ThemeProvider } from "@elementor/editor-ui";
|
|
339
|
+
import { useMixpanel } from "@elementor/events";
|
|
340
|
+
import { Infotip } from "@elementor/ui";
|
|
341
|
+
|
|
342
|
+
// src/extensions/angie/angie-consts.ts
|
|
343
|
+
import { __ as __2 } from "@wordpress/i18n";
|
|
344
|
+
var ANGIE_GUIDE_TOGGLE_EVENT = "elementor/editor/toggle-angie-guide";
|
|
345
|
+
var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
|
|
346
|
+
var ANGIE_BUTTON_ARIA_LABEL = __2("Angie", "elementor");
|
|
347
|
+
var ANGIE_LEARN_MORE_URL = "https://go.elementor.com/angie-learn-more";
|
|
348
|
+
var ANGIE_DESCRIPTION = __2(
|
|
349
|
+
"Angie lets you generate custom widgets, sections, and code using simple instructions.",
|
|
350
|
+
"elementor"
|
|
351
|
+
);
|
|
352
|
+
var AI_WIDGET_CTA_VIEWED_EVENT = "ai_widget_cta_viewed";
|
|
353
|
+
var ANGIE_TOP_BAR_PROMOTION_IMAGE_URL = "https://assets.elementor.com/packages/v1/images/angie-top-bar-promotion.svg";
|
|
354
|
+
var ANGIE_TOP_BAR_DESCRIPTION = __2("Build custom widgets using simple instructions.", "elementor");
|
|
355
|
+
|
|
356
|
+
// src/extensions/angie/components/angie-guide-card.tsx
|
|
335
357
|
import * as React14 from "react";
|
|
336
|
-
import { Stack as Stack2 } from "@elementor/ui";
|
|
358
|
+
import { Button, Chip, ClickAwayListener, CloseButton, Image, Stack as Stack2, Typography } from "@elementor/ui";
|
|
359
|
+
import { __ as __3 } from "@wordpress/i18n";
|
|
360
|
+
function AngieGuideCard({ imageUrl, description, learnMoreUrl, onInstall, onClose }) {
|
|
361
|
+
return /* @__PURE__ */ React14.createElement(ClickAwayListener, { onClickAway: onClose }, /* @__PURE__ */ React14.createElement(Stack2, { sx: { width: 296 }, "data-testid": "e-angie-guide-card" }, /* @__PURE__ */ React14.createElement(Stack2, { direction: "row", alignItems: "center", gap: 1, py: 1, px: 2 }, /* @__PURE__ */ React14.createElement(Typography, { variant: "subtitle2" }, __3("Meet Angie", "elementor")), /* @__PURE__ */ React14.createElement(Chip, { label: __3("New", "elementor"), size: "small", color: "info", variant: "standard" }), /* @__PURE__ */ React14.createElement(
|
|
362
|
+
CloseButton,
|
|
363
|
+
{
|
|
364
|
+
edge: "end",
|
|
365
|
+
sx: { ml: "auto" },
|
|
366
|
+
slotProps: { icon: { fontSize: "small" } },
|
|
367
|
+
onClick: onClose
|
|
368
|
+
}
|
|
369
|
+
)), /* @__PURE__ */ React14.createElement(Image, { src: imageUrl, alt: __3("Angie", "elementor"), sx: { height: 150, width: "100%" } }), /* @__PURE__ */ React14.createElement(Stack2, { px: 2, pt: 1.5, pb: 1 }, /* @__PURE__ */ React14.createElement(Typography, { variant: "body2", color: "secondary" }, description)), /* @__PURE__ */ React14.createElement(Stack2, { direction: "row", justifyContent: "flex-end", gap: 1, pt: 1, pb: 1.5, px: 2 }, /* @__PURE__ */ React14.createElement(
|
|
370
|
+
Button,
|
|
371
|
+
{
|
|
372
|
+
variant: "text",
|
|
373
|
+
size: "small",
|
|
374
|
+
color: "secondary",
|
|
375
|
+
onClick: () => {
|
|
376
|
+
window.open(learnMoreUrl, "_blank", "noopener,noreferrer");
|
|
377
|
+
onClose();
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
__3("Learn More", "elementor")
|
|
381
|
+
), onInstall && /* @__PURE__ */ React14.createElement(Button, { variant: "contained", size: "small", color: "accent", onClick: onInstall }, __3("Try for free", "elementor")))));
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// src/extensions/angie/hooks/use-auto-show.ts
|
|
385
|
+
import { useEffect } from "react";
|
|
386
|
+
function useAutoShow() {
|
|
387
|
+
useEffect(() => {
|
|
388
|
+
if (!window.elementor?.config?.angie?.autoShow) {
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
const id = setTimeout(() => {
|
|
392
|
+
window.dispatchEvent(new CustomEvent(ANGIE_GUIDE_TOGGLE_EVENT));
|
|
393
|
+
}, 0);
|
|
394
|
+
return () => clearTimeout(id);
|
|
395
|
+
}, []);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// src/extensions/angie/components/angie-guide-location.tsx
|
|
399
|
+
function AngieGuideLocation() {
|
|
400
|
+
useAutoShow();
|
|
401
|
+
const [anchorEl, setAnchorEl] = useState2(null);
|
|
402
|
+
const { dispatchEvent: dispatchEvent2 } = useMixpanel();
|
|
403
|
+
const { isAdmin } = useCurrentUserCapabilities();
|
|
404
|
+
const isOpen = Boolean(anchorEl);
|
|
405
|
+
useEffect2(() => {
|
|
406
|
+
const handleToggle = () => {
|
|
407
|
+
setAnchorEl((prev) => {
|
|
408
|
+
if (prev) {
|
|
409
|
+
return null;
|
|
410
|
+
}
|
|
411
|
+
return document.querySelector(`[aria-label="${ANGIE_BUTTON_ARIA_LABEL}"]`);
|
|
412
|
+
});
|
|
413
|
+
};
|
|
414
|
+
window.addEventListener(ANGIE_GUIDE_TOGGLE_EVENT, handleToggle);
|
|
415
|
+
return () => {
|
|
416
|
+
window.removeEventListener(ANGIE_GUIDE_TOGGLE_EVENT, handleToggle);
|
|
417
|
+
};
|
|
418
|
+
}, []);
|
|
419
|
+
const handleClose = () => setAnchorEl(null);
|
|
420
|
+
const handleInstall = async () => {
|
|
421
|
+
dispatchEvent2?.(AI_WIDGET_CTA_VIEWED_EVENT, {
|
|
422
|
+
entry_point: "top_bar_icon"
|
|
423
|
+
});
|
|
424
|
+
window.dispatchEvent(
|
|
425
|
+
new CustomEvent(CREATE_WIDGET_EVENT, {
|
|
426
|
+
detail: {
|
|
427
|
+
entry_point: "top_bar_icon"
|
|
428
|
+
}
|
|
429
|
+
})
|
|
430
|
+
);
|
|
431
|
+
handleClose();
|
|
432
|
+
};
|
|
433
|
+
return /* @__PURE__ */ React15.createElement(ThemeProvider, null, /* @__PURE__ */ React15.createElement(
|
|
434
|
+
Infotip,
|
|
435
|
+
{
|
|
436
|
+
content: /* @__PURE__ */ React15.createElement(
|
|
437
|
+
AngieGuideCard,
|
|
438
|
+
{
|
|
439
|
+
imageUrl: ANGIE_TOP_BAR_PROMOTION_IMAGE_URL,
|
|
440
|
+
description: ANGIE_TOP_BAR_DESCRIPTION,
|
|
441
|
+
learnMoreUrl: ANGIE_LEARN_MORE_URL,
|
|
442
|
+
onInstall: isAdmin ? handleInstall : void 0,
|
|
443
|
+
onClose: handleClose
|
|
444
|
+
}
|
|
445
|
+
),
|
|
446
|
+
placement: "bottom-start",
|
|
447
|
+
open: isOpen,
|
|
448
|
+
disableHoverListener: true,
|
|
449
|
+
PopperProps: {
|
|
450
|
+
anchorEl,
|
|
451
|
+
modifiers: [
|
|
452
|
+
{
|
|
453
|
+
name: "offset",
|
|
454
|
+
options: { offset: [-4, -4] }
|
|
455
|
+
}
|
|
456
|
+
]
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
/* @__PURE__ */ React15.createElement("span", null)
|
|
460
|
+
));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
// src/components/ui/toolbar-menu.tsx
|
|
464
|
+
import * as React16 from "react";
|
|
465
|
+
import { Stack as Stack3 } from "@elementor/ui";
|
|
337
466
|
function ToolbarMenu({ children, ...props }) {
|
|
338
|
-
return /* @__PURE__ */
|
|
467
|
+
return /* @__PURE__ */ React16.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React16.createElement(Stack3, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
|
|
339
468
|
}
|
|
340
469
|
|
|
341
470
|
// src/components/ui/toolbar-menu-more.tsx
|
|
342
|
-
import * as
|
|
471
|
+
import * as React17 from "react";
|
|
343
472
|
import { DotsVerticalIcon } from "@elementor/icons";
|
|
344
473
|
import { bindMenu as bindMenu2, bindTrigger as bindTrigger2, usePopupState as usePopupState2 } from "@elementor/ui";
|
|
345
|
-
import { __ as
|
|
474
|
+
import { __ as __4 } from "@wordpress/i18n";
|
|
346
475
|
function ToolbarMenuMore({ children, id }) {
|
|
347
476
|
const popupState = usePopupState2({
|
|
348
477
|
variant: "popover",
|
|
349
478
|
popupId: id
|
|
350
479
|
});
|
|
351
|
-
return /* @__PURE__ */
|
|
480
|
+
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(ToolbarMenuItem, { ...bindTrigger2(popupState), title: __4("More", "elementor") }, /* @__PURE__ */ React17.createElement(DotsVerticalIcon, null)), /* @__PURE__ */ React17.createElement(PopoverMenu, { onClick: popupState.close, ...bindMenu2(popupState) }, children));
|
|
352
481
|
}
|
|
353
482
|
|
|
354
483
|
// src/components/locations/integrations-menu-location.tsx
|
|
355
|
-
import * as
|
|
484
|
+
import * as React18 from "react";
|
|
356
485
|
import { PlugIcon } from "@elementor/icons";
|
|
357
486
|
import { bindMenu as bindMenu3, bindTrigger as bindTrigger3, usePopupState as usePopupState3 } from "@elementor/ui";
|
|
358
|
-
import { __ as
|
|
487
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
359
488
|
var { useMenuItems: useMenuItems2 } = integrationsMenu;
|
|
360
489
|
function IntegrationsMenuLocation() {
|
|
361
490
|
const menuItems = useMenuItems2();
|
|
@@ -366,7 +495,7 @@ function IntegrationsMenuLocation() {
|
|
|
366
495
|
if (menuItems.default.length === 0) {
|
|
367
496
|
return null;
|
|
368
497
|
}
|
|
369
|
-
return /* @__PURE__ */
|
|
498
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(ToolbarMenuItem, { ...bindTrigger3(popupState), title: __5("Integrations", "elementor") }, /* @__PURE__ */ React18.createElement(PlugIcon, null)), /* @__PURE__ */ React18.createElement(
|
|
370
499
|
PopoverMenu,
|
|
371
500
|
{
|
|
372
501
|
onClick: popupState.close,
|
|
@@ -374,32 +503,32 @@ function IntegrationsMenuLocation() {
|
|
|
374
503
|
marginThreshold: 8,
|
|
375
504
|
open: popupState.isOpen
|
|
376
505
|
},
|
|
377
|
-
menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */
|
|
506
|
+
menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React18.createElement(IntegrationsMenuItem, { key: id }))
|
|
378
507
|
));
|
|
379
508
|
}
|
|
380
509
|
|
|
381
510
|
// src/components/locations/send-feedback-popup-location.tsx
|
|
382
|
-
import * as
|
|
383
|
-
import { useEffect, useState as
|
|
384
|
-
import { ThemeProvider } from "@elementor/editor-ui";
|
|
511
|
+
import * as React19 from "react";
|
|
512
|
+
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
513
|
+
import { ThemeProvider as ThemeProvider2 } from "@elementor/editor-ui";
|
|
385
514
|
import { isExperimentActive } from "@elementor/editor-v1-adapters";
|
|
386
|
-
import { useMixpanel } from "@elementor/events";
|
|
515
|
+
import { useMixpanel as useMixpanel2 } from "@elementor/events";
|
|
387
516
|
import { httpService } from "@elementor/http-client";
|
|
388
517
|
import { AlertCircleIcon, CheckIcon } from "@elementor/icons";
|
|
389
518
|
import {
|
|
390
519
|
bindDialog,
|
|
391
|
-
Button,
|
|
392
|
-
CloseButton,
|
|
520
|
+
Button as Button2,
|
|
521
|
+
CloseButton as CloseButton2,
|
|
393
522
|
Dialog,
|
|
394
523
|
DialogContent,
|
|
395
524
|
DialogHeader,
|
|
396
525
|
DialogTitle,
|
|
397
526
|
Popover,
|
|
398
|
-
Stack as
|
|
527
|
+
Stack as Stack4,
|
|
399
528
|
TextField,
|
|
400
529
|
usePopupState as usePopupState4
|
|
401
530
|
} from "@elementor/ui";
|
|
402
|
-
import { __ as
|
|
531
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
403
532
|
|
|
404
533
|
// src/extensions/feedback/feedback-consts.ts
|
|
405
534
|
var EXPERIMENT_NAME = "in_editor_feedback";
|
|
@@ -413,23 +542,23 @@ var checkIfUserIsConnected = () => {
|
|
|
413
542
|
function SendFeedbackPopupLocation() {
|
|
414
543
|
const isActive = isExperimentActive(EXPERIMENT_NAME);
|
|
415
544
|
const extendedWindow = window;
|
|
416
|
-
const [isUserConnected, setIsUserConnected] =
|
|
545
|
+
const [isUserConnected, setIsUserConnected] = useState3(checkIfUserIsConnected());
|
|
417
546
|
const connectUrl = extendedWindow?.elementor?.config.user.top_bar.connect_url;
|
|
418
|
-
const [feedbackContent, setFeedbackContent] =
|
|
419
|
-
const [feedbackResult, setFeedbackResult] =
|
|
420
|
-
const [submitDisabled, setSubmitDisabled] =
|
|
421
|
-
const { dispatchEvent:
|
|
547
|
+
const [feedbackContent, setFeedbackContent] = useState3("");
|
|
548
|
+
const [feedbackResult, setFeedbackResult] = useState3(null);
|
|
549
|
+
const [submitDisabled, setSubmitDisabled] = useState3(true);
|
|
550
|
+
const { dispatchEvent: trackEvent2 = (...args) => void args } = useMixpanel2();
|
|
422
551
|
const popupState = usePopupState4({
|
|
423
552
|
variant: "dialog",
|
|
424
553
|
popupId: FEEDBACK_TOGGLE_EVENT
|
|
425
554
|
});
|
|
426
|
-
const [isFetching, setIsFetching] =
|
|
427
|
-
|
|
555
|
+
const [isFetching, setIsFetching] = useState3(false);
|
|
556
|
+
useEffect3(() => {
|
|
428
557
|
const handler = () => {
|
|
429
558
|
popupState.toggle();
|
|
430
559
|
setIsUserConnected(checkIfUserIsConnected());
|
|
431
560
|
setFeedbackResult(null);
|
|
432
|
-
|
|
561
|
+
trackEvent2("feedback_modal_opened", {
|
|
433
562
|
source: "top_bar",
|
|
434
563
|
context: "v4_beta"
|
|
435
564
|
});
|
|
@@ -438,13 +567,13 @@ function SendFeedbackPopupLocation() {
|
|
|
438
567
|
return () => {
|
|
439
568
|
window.removeEventListener(FEEDBACK_TOGGLE_EVENT, handler);
|
|
440
569
|
};
|
|
441
|
-
}, [popupState,
|
|
442
|
-
|
|
570
|
+
}, [popupState, trackEvent2]);
|
|
571
|
+
useEffect3(() => {
|
|
443
572
|
setSubmitDisabled(feedbackContent.trim().length < 10 || !isUserConnected || isFetching);
|
|
444
573
|
}, [feedbackContent, feedbackResult, isUserConnected, isFetching]);
|
|
445
574
|
const handleClose = () => {
|
|
446
575
|
popupState.close();
|
|
447
|
-
|
|
576
|
+
trackEvent2("feedback_modal_closed", {
|
|
448
577
|
feedback_text: feedbackContent
|
|
449
578
|
});
|
|
450
579
|
};
|
|
@@ -464,7 +593,7 @@ function SendFeedbackPopupLocation() {
|
|
|
464
593
|
if (!response.data.success && response.data.code.toString() === "401" || response.data.code.toString() === "403") {
|
|
465
594
|
setIsUserConnected(false);
|
|
466
595
|
}
|
|
467
|
-
|
|
596
|
+
trackEvent2(response.data.success ? "feedback_submitted" : "feedback_error", {
|
|
468
597
|
feedback_length: feedbackContent.length,
|
|
469
598
|
error_type: response.data.success ? void 0 : "server",
|
|
470
599
|
error_message: response.data.success ? void 0 : response.data.message
|
|
@@ -474,8 +603,8 @@ function SendFeedbackPopupLocation() {
|
|
|
474
603
|
if (!isActive) {
|
|
475
604
|
return null;
|
|
476
605
|
}
|
|
477
|
-
return /* @__PURE__ */
|
|
478
|
-
|
|
606
|
+
return /* @__PURE__ */ React19.createElement(ThemeProvider2, null, /* @__PURE__ */ React19.createElement(Popover, { ...bindDialog(popupState), onClose: () => handleClose() }, /* @__PURE__ */ React19.createElement(Dialog, { open: popupState.isOpen }, /* @__PURE__ */ React19.createElement(DialogHeader, { style: { width: "100%", minWidth: "35rem" } }, /* @__PURE__ */ React19.createElement(DialogTitle, { style: { width: "100%" } }, /* @__PURE__ */ React19.createElement(
|
|
607
|
+
Stack4,
|
|
479
608
|
{
|
|
480
609
|
display: "flex",
|
|
481
610
|
direction: "row",
|
|
@@ -483,18 +612,18 @@ function SendFeedbackPopupLocation() {
|
|
|
483
612
|
justifyContent: "space-between",
|
|
484
613
|
width: "100%"
|
|
485
614
|
},
|
|
486
|
-
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
))), /* @__PURE__ */
|
|
615
|
+
__6("Submit Feedback", "elementor"),
|
|
616
|
+
/* @__PURE__ */ React19.createElement(CloseButton2, { onClick: popupState.close })
|
|
617
|
+
))), /* @__PURE__ */ React19.createElement(DialogContent, null, /* @__PURE__ */ React19.createElement(Stack4, { direction: "column", gap: 2 }, isUserConnected ? /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
489
618
|
TextField,
|
|
490
619
|
{
|
|
491
620
|
autofocus: true,
|
|
492
|
-
placeholder:
|
|
621
|
+
placeholder: __6(
|
|
493
622
|
"E.g. Can you add ABC features? I want to do ABC and it\u2019s important because \u2026",
|
|
494
623
|
"elementor"
|
|
495
624
|
),
|
|
496
625
|
fullwith: true,
|
|
497
|
-
label:
|
|
626
|
+
label: __6("Your Feedback", "elementor"),
|
|
498
627
|
multiline: true,
|
|
499
628
|
id: "elementor-feedback-usercontent",
|
|
500
629
|
rows: 6,
|
|
@@ -503,8 +632,8 @@ function SendFeedbackPopupLocation() {
|
|
|
503
632
|
onChange: (event) => setFeedbackContent(event.target.value),
|
|
504
633
|
value: feedbackContent
|
|
505
634
|
}
|
|
506
|
-
), /* @__PURE__ */
|
|
507
|
-
|
|
635
|
+
), /* @__PURE__ */ React19.createElement(Stack4, { direction: "row", justifyContent: "flex-end", alignItems: "center", gap: 2 }, feedbackResult && /* @__PURE__ */ React19.createElement(React19.Fragment, null, feedbackResult.success ? /* @__PURE__ */ React19.createElement(CheckIcon, { color: "success" }) : /* @__PURE__ */ React19.createElement(AlertCircleIcon, { color: "error" }), feedbackResult.message), feedbackResult?.success ? /* @__PURE__ */ React19.createElement(Button2, { variant: "text", onClick: () => handleStartAntoher() }, __6("Submit Another Feedback", "elementor")) : /* @__PURE__ */ React19.createElement(
|
|
636
|
+
Button2,
|
|
508
637
|
{
|
|
509
638
|
disabled: submitDisabled,
|
|
510
639
|
onClick: submitFeedback,
|
|
@@ -512,9 +641,9 @@ function SendFeedbackPopupLocation() {
|
|
|
512
641
|
color: "primary",
|
|
513
642
|
size: "small"
|
|
514
643
|
},
|
|
515
|
-
|
|
516
|
-
))) : /* @__PURE__ */
|
|
517
|
-
|
|
644
|
+
__6("Submit", "elementor")
|
|
645
|
+
))) : /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
646
|
+
Button2,
|
|
518
647
|
{
|
|
519
648
|
variant: "contained",
|
|
520
649
|
color: "primary",
|
|
@@ -524,7 +653,7 @@ function SendFeedbackPopupLocation() {
|
|
|
524
653
|
rel: "noopener",
|
|
525
654
|
onClick: popupState.close
|
|
526
655
|
},
|
|
527
|
-
|
|
656
|
+
__6("Connect to Elementor", "elementor")
|
|
528
657
|
)))))));
|
|
529
658
|
}
|
|
530
659
|
|
|
@@ -535,11 +664,11 @@ function ToolsMenuLocation() {
|
|
|
535
664
|
const menuItems = useMenuItems3();
|
|
536
665
|
const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS);
|
|
537
666
|
const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS);
|
|
538
|
-
return /* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ React20.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React20.createElement(MenuItem2, { key: id })), /* @__PURE__ */ React20.createElement(AngieGuideLocation, null), /* @__PURE__ */ React20.createElement(SendFeedbackPopupLocation, null), /* @__PURE__ */ React20.createElement(IntegrationsMenuLocation, null), popoverMenuItems.length > 0 && /* @__PURE__ */ React20.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-tools-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React20.createElement(MenuItem2, { key: id }))));
|
|
539
668
|
}
|
|
540
669
|
|
|
541
670
|
// src/components/locations/utilities-menu-location.tsx
|
|
542
|
-
import * as
|
|
671
|
+
import * as React21 from "react";
|
|
543
672
|
import { Fragment as Fragment4 } from "react";
|
|
544
673
|
var MAX_TOOLBAR_ACTIONS2 = 4;
|
|
545
674
|
var { useMenuItems: useMenuItems4 } = utilitiesMenu;
|
|
@@ -548,19 +677,58 @@ function UtilitiesMenuLocation() {
|
|
|
548
677
|
const shouldUsePopover = menuItems.default.length > MAX_TOOLBAR_ACTIONS2 + 1;
|
|
549
678
|
const toolbarMenuItems = shouldUsePopover ? menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS2) : menuItems.default;
|
|
550
679
|
const popoverMenuItems = shouldUsePopover ? menuItems.default.slice(MAX_TOOLBAR_ACTIONS2) : [];
|
|
551
|
-
return /* @__PURE__ */
|
|
680
|
+
return /* @__PURE__ */ React21.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React21.createElement(Fragment4, { key: id }, /* @__PURE__ */ React21.createElement(MenuItem2, null))), popoverMenuItems.length > 0 && /* @__PURE__ */ React21.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-utilities-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React21.createElement(MenuItem2, { key: id }))));
|
|
552
681
|
}
|
|
553
682
|
|
|
554
683
|
// src/components/app-bar.tsx
|
|
555
684
|
function AppBar() {
|
|
556
685
|
const document2 = useActiveDocument();
|
|
557
|
-
return /* @__PURE__ */
|
|
686
|
+
return /* @__PURE__ */ React22.createElement(ThemeProvider3, { colorScheme: "dark" }, /* @__PURE__ */ React22.createElement(BaseAppBar, { position: "sticky" }, /* @__PURE__ */ React22.createElement(Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React22.createElement(Box3, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React22.createElement(Grid, { container: true, flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React22.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React22.createElement(Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React22.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React22.createElement(Divider2, { orientation: "vertical" }), /* @__PURE__ */ React22.createElement(PageIndicationLocation, null), /* @__PURE__ */ React22.createElement(Divider2, { orientation: "vertical" }), /* @__PURE__ */ React22.createElement(ResponsiveLocation, null), /* @__PURE__ */ React22.createElement(Divider2, { orientation: "vertical" }))), /* @__PURE__ */ React22.createElement(Grid, { container: true, justifyContent: "flex-end", flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React22.createElement(PrimaryActionLocation, null))))));
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
// src/extensions/angie/hooks/use-action-props.ts
|
|
690
|
+
import { useEffect as useEffect4 } from "react";
|
|
691
|
+
import { isAngieAvailable } from "@elementor/editor-mcp";
|
|
692
|
+
import { trackEvent } from "@elementor/events";
|
|
693
|
+
import { AngieIcon } from "@elementor/icons";
|
|
694
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
695
|
+
function useActionProps() {
|
|
696
|
+
const hasAngieInstalled = isAngieAvailable();
|
|
697
|
+
const visible = !hasAngieInstalled;
|
|
698
|
+
useEffect4(() => {
|
|
699
|
+
if (!visible) {
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
702
|
+
trackEvent({
|
|
703
|
+
eventName: AI_WIDGET_CTA_VIEWED_EVENT,
|
|
704
|
+
entry_point: "top_bar_icon",
|
|
705
|
+
has_angie_installed: false
|
|
706
|
+
});
|
|
707
|
+
}, [visible]);
|
|
708
|
+
return {
|
|
709
|
+
title: __7("Angie", "elementor"),
|
|
710
|
+
icon: AngieIcon,
|
|
711
|
+
onClick: () => {
|
|
712
|
+
window.dispatchEvent(new CustomEvent(ANGIE_GUIDE_TOGGLE_EVENT));
|
|
713
|
+
},
|
|
714
|
+
selected: false,
|
|
715
|
+
visible
|
|
716
|
+
};
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
// src/extensions/angie/index.ts
|
|
720
|
+
function init() {
|
|
721
|
+
toolsMenu.registerToggleAction({
|
|
722
|
+
id: "toggle-angie",
|
|
723
|
+
priority: 2,
|
|
724
|
+
useProps: useActionProps
|
|
725
|
+
});
|
|
558
726
|
}
|
|
559
727
|
|
|
560
728
|
// src/extensions/connect/hooks/use-connect-link-config.tsx
|
|
561
729
|
import { useCallback } from "react";
|
|
562
730
|
import { UserIcon } from "@elementor/icons";
|
|
563
|
-
import { __ as
|
|
731
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
564
732
|
var dispatchConnectClickEvent = (eventName) => {
|
|
565
733
|
try {
|
|
566
734
|
const extendedWindow = window;
|
|
@@ -613,12 +781,12 @@ function useConnectLinkConfig() {
|
|
|
613
781
|
[extendedWindow]
|
|
614
782
|
);
|
|
615
783
|
return isUserConnected ? {
|
|
616
|
-
title:
|
|
784
|
+
title: __8("My Elementor", "elementor"),
|
|
617
785
|
href: extendedWindow?.elementor?.config.user.top_bar.my_elementor_url,
|
|
618
786
|
icon: UserIcon,
|
|
619
787
|
target: "_blank"
|
|
620
788
|
} : {
|
|
621
|
-
title:
|
|
789
|
+
title: __8("Connect my account", "elementor"),
|
|
622
790
|
href: extendedWindow?.elementor?.config.user.top_bar.connect_url,
|
|
623
791
|
icon: UserIcon,
|
|
624
792
|
target,
|
|
@@ -627,7 +795,7 @@ function useConnectLinkConfig() {
|
|
|
627
795
|
}
|
|
628
796
|
|
|
629
797
|
// src/extensions/connect/index.ts
|
|
630
|
-
function
|
|
798
|
+
function init2() {
|
|
631
799
|
mainMenu.registerLink({
|
|
632
800
|
id: "app-bar-connect",
|
|
633
801
|
group: "exits",
|
|
@@ -640,12 +808,12 @@ function init() {
|
|
|
640
808
|
import { __useActiveDocument as useActiveDocument2 } from "@elementor/editor-documents";
|
|
641
809
|
import { __privateRunCommand as runCommand } from "@elementor/editor-v1-adapters";
|
|
642
810
|
import { EyeIcon } from "@elementor/icons";
|
|
643
|
-
import { __ as
|
|
644
|
-
function
|
|
811
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
812
|
+
function useActionProps2() {
|
|
645
813
|
const document2 = useActiveDocument2();
|
|
646
814
|
return {
|
|
647
815
|
icon: EyeIcon,
|
|
648
|
-
title:
|
|
816
|
+
title: __9("Preview Changes", "elementor"),
|
|
649
817
|
onClick: () => {
|
|
650
818
|
const extendedWindow = window;
|
|
651
819
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -668,16 +836,16 @@ function useActionProps() {
|
|
|
668
836
|
}
|
|
669
837
|
|
|
670
838
|
// src/extensions/documents-preview/index.ts
|
|
671
|
-
function
|
|
839
|
+
function init3() {
|
|
672
840
|
utilitiesMenu.registerAction({
|
|
673
841
|
id: "document-preview-button",
|
|
674
842
|
priority: 30,
|
|
675
|
-
useProps:
|
|
843
|
+
useProps: useActionProps2
|
|
676
844
|
});
|
|
677
845
|
}
|
|
678
846
|
|
|
679
847
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
680
|
-
import * as
|
|
848
|
+
import * as React24 from "react";
|
|
681
849
|
import {
|
|
682
850
|
__useActiveDocument as useActiveDocument3,
|
|
683
851
|
__useActiveDocumentActions as useActiveDocumentActions
|
|
@@ -688,16 +856,16 @@ import {
|
|
|
688
856
|
bindMenu as bindMenu4,
|
|
689
857
|
bindTrigger as bindTrigger4,
|
|
690
858
|
Box as Box4,
|
|
691
|
-
Button as
|
|
859
|
+
Button as Button3,
|
|
692
860
|
ButtonGroup,
|
|
693
861
|
CircularProgress,
|
|
694
862
|
Tooltip as Tooltip3,
|
|
695
863
|
usePopupState as usePopupState5
|
|
696
864
|
} from "@elementor/ui";
|
|
697
|
-
import { __ as
|
|
865
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
698
866
|
|
|
699
867
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
700
|
-
import * as
|
|
868
|
+
import * as React23 from "react";
|
|
701
869
|
import { Divider as Divider3, styled as styled2 } from "@elementor/ui";
|
|
702
870
|
var { useMenuItems: useMenuItems5 } = documentOptionsMenu;
|
|
703
871
|
var StyledPopoverMenu = styled2(PopoverMenu)`
|
|
@@ -713,7 +881,7 @@ var StyledPopoverMenu = styled2(PopoverMenu)`
|
|
|
713
881
|
`;
|
|
714
882
|
function PrimaryActionMenu(props) {
|
|
715
883
|
const { save: saveActions, default: defaultActions } = useMenuItems5();
|
|
716
|
-
return /* @__PURE__ */
|
|
884
|
+
return /* @__PURE__ */ React23.createElement(
|
|
717
885
|
StyledPopoverMenu,
|
|
718
886
|
{
|
|
719
887
|
...props,
|
|
@@ -731,13 +899,13 @@ function PrimaryActionMenu(props) {
|
|
|
731
899
|
}
|
|
732
900
|
},
|
|
733
901
|
saveActions.map(({ MenuItem: MenuItem2, id }, index) => [
|
|
734
|
-
index > 0 && /* @__PURE__ */
|
|
735
|
-
/* @__PURE__ */
|
|
902
|
+
index > 0 && /* @__PURE__ */ React23.createElement(Divider3, { key: `${id}-divider` }),
|
|
903
|
+
/* @__PURE__ */ React23.createElement(MenuItem2, { key: id })
|
|
736
904
|
]),
|
|
737
|
-
saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */
|
|
905
|
+
saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */ React23.createElement(Divider3, null),
|
|
738
906
|
defaultActions.map(({ MenuItem: MenuItem2, id }, index) => [
|
|
739
|
-
index > 0 && /* @__PURE__ */
|
|
740
|
-
/* @__PURE__ */
|
|
907
|
+
index > 0 && /* @__PURE__ */ React23.createElement(Divider3, { key: `${id}-divider` }),
|
|
908
|
+
/* @__PURE__ */ React23.createElement(MenuItem2, { key: id })
|
|
741
909
|
])
|
|
742
910
|
);
|
|
743
911
|
}
|
|
@@ -758,8 +926,8 @@ function PrimaryAction() {
|
|
|
758
926
|
const isPublishDisabled = !isEditMode || !isPublishEnabled(document2);
|
|
759
927
|
const isSaveOptionsDisabled = !isEditMode || document2.type.value === "kit";
|
|
760
928
|
const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
|
|
761
|
-
return /* @__PURE__ */
|
|
762
|
-
|
|
929
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React24.createElement(
|
|
930
|
+
Button3,
|
|
763
931
|
{
|
|
764
932
|
onClick: () => {
|
|
765
933
|
const extendedWindow = window;
|
|
@@ -789,11 +957,11 @@ function PrimaryAction() {
|
|
|
789
957
|
},
|
|
790
958
|
disabled: isPublishDisabled
|
|
791
959
|
},
|
|
792
|
-
shouldShowSpinner ? /* @__PURE__ */
|
|
793
|
-
), /* @__PURE__ */
|
|
960
|
+
shouldShowSpinner ? /* @__PURE__ */ React24.createElement(CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
|
|
961
|
+
), /* @__PURE__ */ React24.createElement(
|
|
794
962
|
Tooltip3,
|
|
795
963
|
{
|
|
796
|
-
title:
|
|
964
|
+
title: __10("Save Options", "elementor"),
|
|
797
965
|
PopperProps: {
|
|
798
966
|
sx: {
|
|
799
967
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -803,21 +971,21 @@ function PrimaryAction() {
|
|
|
803
971
|
}
|
|
804
972
|
}
|
|
805
973
|
},
|
|
806
|
-
/* @__PURE__ */
|
|
807
|
-
|
|
974
|
+
/* @__PURE__ */ React24.createElement(Box4, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React24.createElement(
|
|
975
|
+
Button3,
|
|
808
976
|
{
|
|
809
977
|
size: "small",
|
|
810
978
|
...bindTrigger4(popupState),
|
|
811
979
|
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
812
980
|
disabled: isSaveOptionsDisabled,
|
|
813
|
-
"aria-label":
|
|
981
|
+
"aria-label": __10("Save Options", "elementor")
|
|
814
982
|
},
|
|
815
|
-
/* @__PURE__ */
|
|
983
|
+
/* @__PURE__ */ React24.createElement(ChevronDownIcon, null)
|
|
816
984
|
))
|
|
817
|
-
)), /* @__PURE__ */
|
|
985
|
+
)), /* @__PURE__ */ React24.createElement(PrimaryActionMenu, { ...bindMenu4(popupState), onClick: popupState.close }));
|
|
818
986
|
}
|
|
819
987
|
function getLabel(document2) {
|
|
820
|
-
return document2.userCan.publish ?
|
|
988
|
+
return document2.userCan.publish ? __10("Publish", "elementor") : __10("Submit", "elementor");
|
|
821
989
|
}
|
|
822
990
|
function isPublishEnabled(document2) {
|
|
823
991
|
if (document2.type.value === "kit") {
|
|
@@ -831,16 +999,16 @@ import {
|
|
|
831
999
|
__useActiveDocument as useActiveDocument4,
|
|
832
1000
|
__useActiveDocumentActions as useActiveDocumentActions2
|
|
833
1001
|
} from "@elementor/editor-documents";
|
|
834
|
-
import { useMixpanel as
|
|
1002
|
+
import { useMixpanel as useMixpanel3 } from "@elementor/events";
|
|
835
1003
|
import { LinkIcon } from "@elementor/icons";
|
|
836
|
-
import { __ as
|
|
1004
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
837
1005
|
function useDocumentCopyAndShareProps() {
|
|
838
1006
|
const document2 = useActiveDocument4();
|
|
839
1007
|
const { copyAndShare } = useActiveDocumentActions2();
|
|
840
|
-
const { dispatchEvent: dispatchEvent2, config } =
|
|
1008
|
+
const { dispatchEvent: dispatchEvent2, config } = useMixpanel3();
|
|
841
1009
|
return {
|
|
842
1010
|
icon: LinkIcon,
|
|
843
|
-
title:
|
|
1011
|
+
title: __11("Copy and Share", "elementor"),
|
|
844
1012
|
onClick: () => {
|
|
845
1013
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
846
1014
|
if (eventName) {
|
|
@@ -868,16 +1036,16 @@ import {
|
|
|
868
1036
|
__useActiveDocument as useActiveDocument5,
|
|
869
1037
|
__useActiveDocumentActions as useActiveDocumentActions3
|
|
870
1038
|
} from "@elementor/editor-documents";
|
|
871
|
-
import { useMixpanel as
|
|
1039
|
+
import { useMixpanel as useMixpanel4 } from "@elementor/events";
|
|
872
1040
|
import { FileReportIcon } from "@elementor/icons";
|
|
873
|
-
import { __ as
|
|
1041
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
874
1042
|
function useDocumentSaveDraftProps() {
|
|
875
1043
|
const document2 = useActiveDocument5();
|
|
876
1044
|
const { saveDraft } = useActiveDocumentActions3();
|
|
877
|
-
const { dispatchEvent: dispatchEvent2, config } =
|
|
1045
|
+
const { dispatchEvent: dispatchEvent2, config } = useMixpanel4();
|
|
878
1046
|
return {
|
|
879
1047
|
icon: FileReportIcon,
|
|
880
|
-
title:
|
|
1048
|
+
title: __12("Save Draft", "elementor"),
|
|
881
1049
|
onClick: () => {
|
|
882
1050
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
883
1051
|
if (eventName) {
|
|
@@ -901,15 +1069,15 @@ function useDocumentSaveDraftProps() {
|
|
|
901
1069
|
|
|
902
1070
|
// src/extensions/documents-save/hooks/use-document-save-template-props.ts
|
|
903
1071
|
import { __useActiveDocumentActions as useActiveDocumentActions4 } from "@elementor/editor-documents";
|
|
904
|
-
import { useMixpanel as
|
|
1072
|
+
import { useMixpanel as useMixpanel5 } from "@elementor/events";
|
|
905
1073
|
import { FolderIcon } from "@elementor/icons";
|
|
906
|
-
import { __ as
|
|
1074
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
907
1075
|
function useDocumentSaveTemplateProps() {
|
|
908
1076
|
const { saveTemplate } = useActiveDocumentActions4();
|
|
909
|
-
const { dispatchEvent: dispatchEvent2, config } =
|
|
1077
|
+
const { dispatchEvent: dispatchEvent2, config } = useMixpanel5();
|
|
910
1078
|
return {
|
|
911
1079
|
icon: FolderIcon,
|
|
912
|
-
title:
|
|
1080
|
+
title: __13("Save as Template", "elementor"),
|
|
913
1081
|
onClick: () => {
|
|
914
1082
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
915
1083
|
if (eventName) {
|
|
@@ -933,15 +1101,15 @@ function useDocumentSaveTemplateProps() {
|
|
|
933
1101
|
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
934
1102
|
import { __useActiveDocument as useActiveDocument6 } from "@elementor/editor-documents";
|
|
935
1103
|
import { __privateRunCommand as runCommand2 } from "@elementor/editor-v1-adapters";
|
|
936
|
-
import { useMixpanel as
|
|
1104
|
+
import { useMixpanel as useMixpanel6 } from "@elementor/events";
|
|
937
1105
|
import { EyeIcon as EyeIcon2 } from "@elementor/icons";
|
|
938
|
-
import { __ as
|
|
1106
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
939
1107
|
function useDocumentViewPageProps() {
|
|
940
1108
|
const document2 = useActiveDocument6();
|
|
941
|
-
const { dispatchEvent: dispatchEvent2, config } =
|
|
1109
|
+
const { dispatchEvent: dispatchEvent2, config } = useMixpanel6();
|
|
942
1110
|
return {
|
|
943
1111
|
icon: EyeIcon2,
|
|
944
|
-
title:
|
|
1112
|
+
title: __14("View Page", "elementor"),
|
|
945
1113
|
onClick: () => {
|
|
946
1114
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
947
1115
|
if (eventName) {
|
|
@@ -967,7 +1135,7 @@ function useDocumentViewPageProps() {
|
|
|
967
1135
|
}
|
|
968
1136
|
|
|
969
1137
|
// src/extensions/documents-save/index.ts
|
|
970
|
-
function
|
|
1138
|
+
function init4() {
|
|
971
1139
|
injectIntoPrimaryAction({
|
|
972
1140
|
id: "document-primary-action",
|
|
973
1141
|
component: PrimaryAction
|
|
@@ -1006,16 +1174,16 @@ import {
|
|
|
1006
1174
|
__privateUseRouteStatus as useRouteStatus
|
|
1007
1175
|
} from "@elementor/editor-v1-adapters";
|
|
1008
1176
|
import { FileSettingsIcon } from "@elementor/icons";
|
|
1009
|
-
import { __ as
|
|
1010
|
-
function
|
|
1177
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
1178
|
+
function useActionProps3() {
|
|
1011
1179
|
const activeDocument = useActiveDocument7();
|
|
1012
1180
|
const hostDocument = useHostDocument();
|
|
1013
1181
|
const { isActive, isBlocked } = useRouteStatus("panel/page-settings");
|
|
1014
1182
|
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
1015
1183
|
const ButtonTitle = document2 ? (
|
|
1016
1184
|
/* translators: %s: Post type label. */
|
|
1017
|
-
|
|
1018
|
-
) :
|
|
1185
|
+
__15("%s Settings", "elementor").replace("%s", document2.type.label)
|
|
1186
|
+
) : __15("Document Settings", "elementor");
|
|
1019
1187
|
return {
|
|
1020
1188
|
title: ButtonTitle,
|
|
1021
1189
|
icon: FileSettingsIcon,
|
|
@@ -1041,11 +1209,11 @@ function useActionProps2() {
|
|
|
1041
1209
|
}
|
|
1042
1210
|
|
|
1043
1211
|
// src/extensions/documents-settings/index.ts
|
|
1044
|
-
function
|
|
1212
|
+
function init5() {
|
|
1045
1213
|
toolsMenu.registerToggleAction({
|
|
1046
1214
|
id: "document-settings-button",
|
|
1047
|
-
priority:
|
|
1048
|
-
useProps:
|
|
1215
|
+
priority: 3,
|
|
1216
|
+
useProps: useActionProps3
|
|
1049
1217
|
});
|
|
1050
1218
|
}
|
|
1051
1219
|
|
|
@@ -1055,11 +1223,11 @@ import {
|
|
|
1055
1223
|
__privateUseRouteStatus as useRouteStatus2
|
|
1056
1224
|
} from "@elementor/editor-v1-adapters";
|
|
1057
1225
|
import { PlusIcon } from "@elementor/icons";
|
|
1058
|
-
import { __ as
|
|
1059
|
-
function
|
|
1226
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
1227
|
+
function useActionProps4() {
|
|
1060
1228
|
const { isActive, isBlocked } = useRouteStatus2("panel/elements");
|
|
1061
1229
|
return {
|
|
1062
|
-
title:
|
|
1230
|
+
title: __16("Add Element", "elementor"),
|
|
1063
1231
|
icon: PlusIcon,
|
|
1064
1232
|
onClick: () => {
|
|
1065
1233
|
const extendedWindow = window;
|
|
@@ -1086,10 +1254,10 @@ import {
|
|
|
1086
1254
|
routeOpenEvent,
|
|
1087
1255
|
v1ReadyEvent
|
|
1088
1256
|
} from "@elementor/editor-v1-adapters";
|
|
1089
|
-
import { __ as
|
|
1257
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
1090
1258
|
function syncPanelTitle() {
|
|
1091
|
-
const panelTitle =
|
|
1092
|
-
const tabTitle =
|
|
1259
|
+
const panelTitle = __17("Elements", "elementor");
|
|
1260
|
+
const tabTitle = __17("Widgets", "elementor");
|
|
1093
1261
|
listenTo(routeOpenEvent("panel/elements"), () => {
|
|
1094
1262
|
setPanelTitle(panelTitle);
|
|
1095
1263
|
setTabTitle(tabTitle);
|
|
@@ -1112,20 +1280,20 @@ function setTabTitle(title) {
|
|
|
1112
1280
|
}
|
|
1113
1281
|
|
|
1114
1282
|
// src/extensions/elements/index.ts
|
|
1115
|
-
function
|
|
1283
|
+
function init6() {
|
|
1116
1284
|
syncPanelTitle();
|
|
1117
1285
|
toolsMenu.registerToggleAction({
|
|
1118
1286
|
id: "open-elements-panel",
|
|
1119
1287
|
priority: 1,
|
|
1120
|
-
useProps:
|
|
1288
|
+
useProps: useActionProps4
|
|
1121
1289
|
});
|
|
1122
1290
|
}
|
|
1123
1291
|
|
|
1124
1292
|
// src/extensions/feedback/index.ts
|
|
1125
1293
|
import { isExperimentActive as isExperimentActive2 } from "@elementor/editor-v1-adapters";
|
|
1126
1294
|
import { MessageLinesIcon } from "@elementor/icons";
|
|
1127
|
-
import { __ as
|
|
1128
|
-
function
|
|
1295
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1296
|
+
function init7() {
|
|
1129
1297
|
const isActive = isExperimentActive2(EXPERIMENT_NAME);
|
|
1130
1298
|
if (!isActive) {
|
|
1131
1299
|
return;
|
|
@@ -1137,7 +1305,7 @@ function init6() {
|
|
|
1137
1305
|
useProps: () => {
|
|
1138
1306
|
return {
|
|
1139
1307
|
icon: MessageLinesIcon,
|
|
1140
|
-
title:
|
|
1308
|
+
title: __18("Send Feedback", "elementor"),
|
|
1141
1309
|
onClick: () => {
|
|
1142
1310
|
dispatchEvent(new CustomEvent(FEEDBACK_TOGGLE_EVENT));
|
|
1143
1311
|
}
|
|
@@ -1149,10 +1317,10 @@ function init6() {
|
|
|
1149
1317
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
1150
1318
|
import { __privateRunCommand as runCommand3 } from "@elementor/editor-v1-adapters";
|
|
1151
1319
|
import { SearchIcon } from "@elementor/icons";
|
|
1152
|
-
import { __ as
|
|
1153
|
-
function
|
|
1320
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
1321
|
+
function useActionProps5() {
|
|
1154
1322
|
return {
|
|
1155
|
-
title:
|
|
1323
|
+
title: __19("Finder", "elementor"),
|
|
1156
1324
|
icon: SearchIcon,
|
|
1157
1325
|
onClick: () => {
|
|
1158
1326
|
const extendedWindow = window;
|
|
@@ -1171,20 +1339,20 @@ function useActionProps4() {
|
|
|
1171
1339
|
}
|
|
1172
1340
|
|
|
1173
1341
|
// src/extensions/finder/index.ts
|
|
1174
|
-
function
|
|
1342
|
+
function init8() {
|
|
1175
1343
|
utilitiesMenu.registerAction({
|
|
1176
1344
|
id: "toggle-finder",
|
|
1177
1345
|
priority: 15,
|
|
1178
|
-
useProps:
|
|
1346
|
+
useProps: useActionProps5
|
|
1179
1347
|
});
|
|
1180
1348
|
}
|
|
1181
1349
|
|
|
1182
1350
|
// src/extensions/help/hooks/use-action-props.ts
|
|
1183
1351
|
import { HelpIcon } from "@elementor/icons";
|
|
1184
|
-
import { __ as
|
|
1185
|
-
function
|
|
1352
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1353
|
+
function useActionProps6() {
|
|
1186
1354
|
return {
|
|
1187
|
-
title:
|
|
1355
|
+
title: __20("Help Center", "elementor"),
|
|
1188
1356
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
1189
1357
|
icon: HelpIcon,
|
|
1190
1358
|
target: "_blank",
|
|
@@ -1204,12 +1372,12 @@ function useActionProps5() {
|
|
|
1204
1372
|
}
|
|
1205
1373
|
|
|
1206
1374
|
// src/extensions/help/index.ts
|
|
1207
|
-
function
|
|
1375
|
+
function init9() {
|
|
1208
1376
|
mainMenu.registerLink({
|
|
1209
1377
|
id: "open-help-center",
|
|
1210
1378
|
group: "help",
|
|
1211
1379
|
priority: 10,
|
|
1212
|
-
useProps:
|
|
1380
|
+
useProps: useActionProps6
|
|
1213
1381
|
});
|
|
1214
1382
|
}
|
|
1215
1383
|
|
|
@@ -1219,11 +1387,11 @@ import {
|
|
|
1219
1387
|
__privateUseRouteStatus as useRouteStatus3
|
|
1220
1388
|
} from "@elementor/editor-v1-adapters";
|
|
1221
1389
|
import { HistoryIcon } from "@elementor/icons";
|
|
1222
|
-
import { __ as
|
|
1223
|
-
function
|
|
1390
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1391
|
+
function useActionProps7() {
|
|
1224
1392
|
const { isActive, isBlocked } = useRouteStatus3("panel/history");
|
|
1225
1393
|
return {
|
|
1226
|
-
title:
|
|
1394
|
+
title: __21("History", "elementor"),
|
|
1227
1395
|
icon: HistoryIcon,
|
|
1228
1396
|
onClick: () => {
|
|
1229
1397
|
const extendedWindow = window;
|
|
@@ -1244,22 +1412,22 @@ function useActionProps6() {
|
|
|
1244
1412
|
}
|
|
1245
1413
|
|
|
1246
1414
|
// src/extensions/history/index.ts
|
|
1247
|
-
function
|
|
1415
|
+
function init10() {
|
|
1248
1416
|
toolsMenu.registerToggleAction({
|
|
1249
1417
|
id: "open-history",
|
|
1250
1418
|
priority: 15,
|
|
1251
|
-
useProps:
|
|
1419
|
+
useProps: useActionProps7
|
|
1252
1420
|
});
|
|
1253
1421
|
}
|
|
1254
1422
|
|
|
1255
1423
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
1256
1424
|
import { __privateRunCommand as runCommand4 } from "@elementor/editor-v1-adapters";
|
|
1257
1425
|
import { KeyboardIcon } from "@elementor/icons";
|
|
1258
|
-
import { __ as
|
|
1259
|
-
function
|
|
1426
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
1427
|
+
function useActionProps8() {
|
|
1260
1428
|
return {
|
|
1261
1429
|
icon: KeyboardIcon,
|
|
1262
|
-
title:
|
|
1430
|
+
title: __22("Keyboard Shortcuts", "elementor"),
|
|
1263
1431
|
onClick: () => {
|
|
1264
1432
|
const extendedWindow = window;
|
|
1265
1433
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1277,17 +1445,17 @@ function useActionProps7() {
|
|
|
1277
1445
|
}
|
|
1278
1446
|
|
|
1279
1447
|
// src/extensions/keyboard-shortcuts/index.ts
|
|
1280
|
-
function
|
|
1448
|
+
function init11() {
|
|
1281
1449
|
mainMenu.registerAction({
|
|
1282
1450
|
id: "open-keyboard-shortcuts",
|
|
1283
1451
|
group: "default",
|
|
1284
1452
|
priority: 40,
|
|
1285
|
-
useProps:
|
|
1453
|
+
useProps: useActionProps8
|
|
1286
1454
|
});
|
|
1287
1455
|
}
|
|
1288
1456
|
|
|
1289
1457
|
// src/extensions/responsive/components/breakpoints-switcher.tsx
|
|
1290
|
-
import * as
|
|
1458
|
+
import * as React25 from "react";
|
|
1291
1459
|
import {
|
|
1292
1460
|
useActivateBreakpoint,
|
|
1293
1461
|
useActiveBreakpoint,
|
|
@@ -1303,7 +1471,7 @@ import {
|
|
|
1303
1471
|
WidescreenIcon
|
|
1304
1472
|
} from "@elementor/icons";
|
|
1305
1473
|
import { Tab, Tabs, Tooltip as BaseTooltip2 } from "@elementor/ui";
|
|
1306
|
-
import { __ as
|
|
1474
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
1307
1475
|
function BreakpointsSwitcher() {
|
|
1308
1476
|
const breakpoints = useBreakpoints();
|
|
1309
1477
|
const activeBreakpoint = useActiveBreakpoint();
|
|
@@ -1325,14 +1493,14 @@ function BreakpointsSwitcher() {
|
|
|
1325
1493
|
}
|
|
1326
1494
|
activateBreakpoint(value);
|
|
1327
1495
|
};
|
|
1328
|
-
return /* @__PURE__ */
|
|
1496
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1329
1497
|
Tabs,
|
|
1330
1498
|
{
|
|
1331
1499
|
textColor: "inherit",
|
|
1332
1500
|
indicatorColor: "secondary",
|
|
1333
1501
|
value: activeBreakpoint,
|
|
1334
1502
|
onChange,
|
|
1335
|
-
"aria-label":
|
|
1503
|
+
"aria-label": __23("Switch Device", "elementor"),
|
|
1336
1504
|
sx: {
|
|
1337
1505
|
"& .MuiTabs-indicator": {
|
|
1338
1506
|
backgroundColor: "text.primary"
|
|
@@ -1342,13 +1510,13 @@ function BreakpointsSwitcher() {
|
|
|
1342
1510
|
breakpoints.map(({ id, label, type, width }) => {
|
|
1343
1511
|
const Icon = iconsMap[id];
|
|
1344
1512
|
const title = labelsMap[type || "default"].replace("%s", label).replace("%d", width?.toString() || "");
|
|
1345
|
-
return /* @__PURE__ */
|
|
1513
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1346
1514
|
Tab,
|
|
1347
1515
|
{
|
|
1348
1516
|
value: id,
|
|
1349
1517
|
key: id,
|
|
1350
1518
|
"aria-label": title,
|
|
1351
|
-
icon: /* @__PURE__ */
|
|
1519
|
+
icon: /* @__PURE__ */ React25.createElement(Tooltip4, { title }, /* @__PURE__ */ React25.createElement(Icon, null)),
|
|
1352
1520
|
sx: { minWidth: "auto" },
|
|
1353
1521
|
"data-testid": `switch-device-to-${id}`
|
|
1354
1522
|
}
|
|
@@ -1357,7 +1525,7 @@ function BreakpointsSwitcher() {
|
|
|
1357
1525
|
);
|
|
1358
1526
|
}
|
|
1359
1527
|
function Tooltip4(props) {
|
|
1360
|
-
return /* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1361
1529
|
BaseTooltip2,
|
|
1362
1530
|
{
|
|
1363
1531
|
PopperProps: {
|
|
@@ -1383,13 +1551,13 @@ var iconsMap = {
|
|
|
1383
1551
|
var labelsMap = {
|
|
1384
1552
|
default: "%s",
|
|
1385
1553
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1386
|
-
"min-width":
|
|
1554
|
+
"min-width": __23("%s (%dpx and up)", "elementor"),
|
|
1387
1555
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1388
|
-
"max-width":
|
|
1556
|
+
"max-width": __23("%s (up to %dpx)", "elementor")
|
|
1389
1557
|
};
|
|
1390
1558
|
|
|
1391
1559
|
// src/extensions/responsive/index.ts
|
|
1392
|
-
function
|
|
1560
|
+
function init12() {
|
|
1393
1561
|
injectIntoResponsive({
|
|
1394
1562
|
id: "responsive-breakpoints-switcher",
|
|
1395
1563
|
component: BreakpointsSwitcher,
|
|
@@ -1404,10 +1572,10 @@ function init11() {
|
|
|
1404
1572
|
import { injectIntoTop } from "@elementor/editor";
|
|
1405
1573
|
|
|
1406
1574
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
1407
|
-
import * as
|
|
1575
|
+
import * as React28 from "react";
|
|
1408
1576
|
|
|
1409
1577
|
// src/extensions/site-settings/components/portal.tsx
|
|
1410
|
-
import * as
|
|
1578
|
+
import * as React26 from "react";
|
|
1411
1579
|
import {
|
|
1412
1580
|
__privateIsRouteActive as isRouteActive2,
|
|
1413
1581
|
__privateUseListenTo as useListenTo,
|
|
@@ -1423,24 +1591,24 @@ function Portal(props) {
|
|
|
1423
1591
|
if (!containerRef.current) {
|
|
1424
1592
|
return null;
|
|
1425
1593
|
}
|
|
1426
|
-
return /* @__PURE__ */
|
|
1594
|
+
return /* @__PURE__ */ React26.createElement(BasePortal, { container: containerRef.current, ...props });
|
|
1427
1595
|
}
|
|
1428
1596
|
function getContainerRef() {
|
|
1429
1597
|
return isRouteActive2("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
|
|
1430
1598
|
}
|
|
1431
1599
|
|
|
1432
1600
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
1433
|
-
import * as
|
|
1601
|
+
import * as React27 from "react";
|
|
1434
1602
|
import {
|
|
1435
1603
|
__useActiveDocument as useActiveDocument8,
|
|
1436
1604
|
__useActiveDocumentActions as useActiveDocumentActions5
|
|
1437
1605
|
} from "@elementor/editor-documents";
|
|
1438
|
-
import { Button as
|
|
1439
|
-
import { __ as
|
|
1606
|
+
import { Button as Button4, CircularProgress as CircularProgress2, Paper } from "@elementor/ui";
|
|
1607
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1440
1608
|
function PrimaryAction2() {
|
|
1441
1609
|
const document2 = useActiveDocument8();
|
|
1442
1610
|
const { save } = useActiveDocumentActions5();
|
|
1443
|
-
return /* @__PURE__ */
|
|
1611
|
+
return /* @__PURE__ */ React27.createElement(
|
|
1444
1612
|
Paper,
|
|
1445
1613
|
{
|
|
1446
1614
|
sx: {
|
|
@@ -1450,8 +1618,8 @@ function PrimaryAction2() {
|
|
|
1450
1618
|
borderColor: "divider"
|
|
1451
1619
|
}
|
|
1452
1620
|
},
|
|
1453
|
-
/* @__PURE__ */
|
|
1454
|
-
|
|
1621
|
+
/* @__PURE__ */ React27.createElement(
|
|
1622
|
+
Button4,
|
|
1455
1623
|
{
|
|
1456
1624
|
variant: "contained",
|
|
1457
1625
|
disabled: !document2 || !document2.isDirty,
|
|
@@ -1459,14 +1627,14 @@ function PrimaryAction2() {
|
|
|
1459
1627
|
sx: { width: "100%" },
|
|
1460
1628
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
1461
1629
|
},
|
|
1462
|
-
document2?.isSaving ? /* @__PURE__ */
|
|
1630
|
+
document2?.isSaving ? /* @__PURE__ */ React27.createElement(CircularProgress2, null) : __24("Save Changes", "elementor")
|
|
1463
1631
|
)
|
|
1464
1632
|
);
|
|
1465
1633
|
}
|
|
1466
1634
|
|
|
1467
1635
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
1468
1636
|
function PortalledPrimaryAction() {
|
|
1469
|
-
return /* @__PURE__ */
|
|
1637
|
+
return /* @__PURE__ */ React28.createElement(Portal, null, /* @__PURE__ */ React28.createElement(PrimaryAction2, null));
|
|
1470
1638
|
}
|
|
1471
1639
|
|
|
1472
1640
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
@@ -1475,13 +1643,13 @@ import {
|
|
|
1475
1643
|
__privateUseRouteStatus as useRouteStatus4
|
|
1476
1644
|
} from "@elementor/editor-v1-adapters";
|
|
1477
1645
|
import { SettingsIcon } from "@elementor/icons";
|
|
1478
|
-
import { __ as
|
|
1479
|
-
function
|
|
1646
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1647
|
+
function useActionProps9() {
|
|
1480
1648
|
const { isActive, isBlocked } = useRouteStatus4("panel/global", {
|
|
1481
1649
|
blockOnKitRoutes: false
|
|
1482
1650
|
});
|
|
1483
1651
|
return {
|
|
1484
|
-
title:
|
|
1652
|
+
title: __25("Site Settings", "elementor"),
|
|
1485
1653
|
icon: SettingsIcon,
|
|
1486
1654
|
onClick: () => {
|
|
1487
1655
|
const extendedWindow = window;
|
|
@@ -1506,7 +1674,7 @@ function useActionProps8() {
|
|
|
1506
1674
|
}
|
|
1507
1675
|
|
|
1508
1676
|
// src/extensions/site-settings/index.ts
|
|
1509
|
-
function
|
|
1677
|
+
function init13() {
|
|
1510
1678
|
injectIntoTop({
|
|
1511
1679
|
id: "site-settings-primary-action-portal",
|
|
1512
1680
|
component: PortalledPrimaryAction
|
|
@@ -1515,7 +1683,7 @@ function init12() {
|
|
|
1515
1683
|
id: "toggle-site-settings",
|
|
1516
1684
|
group: "default",
|
|
1517
1685
|
priority: 1,
|
|
1518
|
-
useProps:
|
|
1686
|
+
useProps: useActionProps9
|
|
1519
1687
|
});
|
|
1520
1688
|
}
|
|
1521
1689
|
|
|
@@ -1525,11 +1693,11 @@ import {
|
|
|
1525
1693
|
__privateUseRouteStatus as useRouteStatus5
|
|
1526
1694
|
} from "@elementor/editor-v1-adapters";
|
|
1527
1695
|
import { StructureIcon } from "@elementor/icons";
|
|
1528
|
-
import { __ as
|
|
1529
|
-
function
|
|
1696
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1697
|
+
function useActionProps10() {
|
|
1530
1698
|
const { isActive, isBlocked } = useRouteStatus5("navigator");
|
|
1531
1699
|
return {
|
|
1532
|
-
title:
|
|
1700
|
+
title: __26("Structure", "elementor"),
|
|
1533
1701
|
icon: StructureIcon,
|
|
1534
1702
|
onClick: () => {
|
|
1535
1703
|
const extendedWindow = window;
|
|
@@ -1550,22 +1718,22 @@ function useActionProps9() {
|
|
|
1550
1718
|
}
|
|
1551
1719
|
|
|
1552
1720
|
// src/extensions/structure/index.ts
|
|
1553
|
-
function
|
|
1721
|
+
function init14() {
|
|
1554
1722
|
utilitiesMenu.registerToggleAction({
|
|
1555
1723
|
id: "toggle-structure-view",
|
|
1556
1724
|
priority: 25,
|
|
1557
|
-
useProps:
|
|
1725
|
+
useProps: useActionProps10
|
|
1558
1726
|
});
|
|
1559
1727
|
}
|
|
1560
1728
|
|
|
1561
1729
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1562
1730
|
import { __privateRunCommand as runCommand7 } from "@elementor/editor-v1-adapters";
|
|
1563
1731
|
import { ThemeBuilderIcon } from "@elementor/icons";
|
|
1564
|
-
import { __ as
|
|
1565
|
-
function
|
|
1732
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
1733
|
+
function useActionProps11() {
|
|
1566
1734
|
return {
|
|
1567
1735
|
icon: ThemeBuilderIcon,
|
|
1568
|
-
title:
|
|
1736
|
+
title: __27("Theme Builder", "elementor"),
|
|
1569
1737
|
onClick: () => {
|
|
1570
1738
|
const extendedWindow = window;
|
|
1571
1739
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1583,12 +1751,12 @@ function useActionProps10() {
|
|
|
1583
1751
|
}
|
|
1584
1752
|
|
|
1585
1753
|
// src/extensions/theme-builder/index.ts
|
|
1586
|
-
function
|
|
1754
|
+
function init15() {
|
|
1587
1755
|
mainMenu.registerAction({
|
|
1588
1756
|
id: "open-theme-builder",
|
|
1589
1757
|
group: "default",
|
|
1590
1758
|
priority: 10,
|
|
1591
|
-
useProps:
|
|
1759
|
+
useProps: useActionProps11
|
|
1592
1760
|
});
|
|
1593
1761
|
}
|
|
1594
1762
|
|
|
@@ -1598,12 +1766,12 @@ import {
|
|
|
1598
1766
|
__privateUseRouteStatus as useRouteStatus6
|
|
1599
1767
|
} from "@elementor/editor-v1-adapters";
|
|
1600
1768
|
import { ToggleRightIcon } from "@elementor/icons";
|
|
1601
|
-
import { __ as
|
|
1602
|
-
function
|
|
1769
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
1770
|
+
function useActionProps12() {
|
|
1603
1771
|
const { isActive, isBlocked } = useRouteStatus6("panel/editor-preferences");
|
|
1604
1772
|
return {
|
|
1605
1773
|
icon: ToggleRightIcon,
|
|
1606
|
-
title:
|
|
1774
|
+
title: __28("User Preferences", "elementor"),
|
|
1607
1775
|
onClick: () => {
|
|
1608
1776
|
const extendedWindow = window;
|
|
1609
1777
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1623,20 +1791,20 @@ function useActionProps11() {
|
|
|
1623
1791
|
}
|
|
1624
1792
|
|
|
1625
1793
|
// src/extensions/user-preferences/index.ts
|
|
1626
|
-
function
|
|
1794
|
+
function init16() {
|
|
1627
1795
|
mainMenu.registerToggleAction({
|
|
1628
1796
|
id: "open-user-preferences",
|
|
1629
1797
|
group: "default",
|
|
1630
1798
|
priority: 30,
|
|
1631
|
-
useProps:
|
|
1799
|
+
useProps: useActionProps12
|
|
1632
1800
|
});
|
|
1633
1801
|
}
|
|
1634
1802
|
|
|
1635
1803
|
// src/extensions/wordpress/index.ts
|
|
1636
1804
|
import { __useActiveDocument as useActiveDocument9 } from "@elementor/editor-documents";
|
|
1637
1805
|
import { WordpressIcon } from "@elementor/icons";
|
|
1638
|
-
import { __ as
|
|
1639
|
-
function
|
|
1806
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
1807
|
+
function init17() {
|
|
1640
1808
|
mainMenu.registerLink({
|
|
1641
1809
|
id: "exit-to-wordpress",
|
|
1642
1810
|
group: "exits",
|
|
@@ -1644,7 +1812,7 @@ function init16() {
|
|
|
1644
1812
|
useProps: () => {
|
|
1645
1813
|
const document2 = useActiveDocument9();
|
|
1646
1814
|
return {
|
|
1647
|
-
title:
|
|
1815
|
+
title: __29("Exit to WordPress", "elementor"),
|
|
1648
1816
|
href: document2?.links?.platformEdit,
|
|
1649
1817
|
icon: WordpressIcon,
|
|
1650
1818
|
onClick: () => {
|
|
@@ -1668,23 +1836,24 @@ function init16() {
|
|
|
1668
1836
|
}
|
|
1669
1837
|
|
|
1670
1838
|
// src/extensions/index.ts
|
|
1671
|
-
function
|
|
1672
|
-
|
|
1839
|
+
function init18() {
|
|
1840
|
+
init();
|
|
1673
1841
|
init3();
|
|
1674
1842
|
init4();
|
|
1675
1843
|
init5();
|
|
1676
|
-
|
|
1844
|
+
init6();
|
|
1677
1845
|
init8();
|
|
1678
1846
|
init9();
|
|
1679
1847
|
init10();
|
|
1680
1848
|
init11();
|
|
1681
1849
|
init12();
|
|
1682
|
-
init6();
|
|
1683
1850
|
init13();
|
|
1851
|
+
init7();
|
|
1684
1852
|
init14();
|
|
1685
1853
|
init15();
|
|
1686
1854
|
init16();
|
|
1687
|
-
|
|
1855
|
+
init17();
|
|
1856
|
+
init2();
|
|
1688
1857
|
}
|
|
1689
1858
|
|
|
1690
1859
|
// src/sync/redirect-old-menus.ts
|
|
@@ -1700,9 +1869,9 @@ function redirectOldMenus() {
|
|
|
1700
1869
|
}
|
|
1701
1870
|
|
|
1702
1871
|
// src/init.ts
|
|
1703
|
-
function
|
|
1872
|
+
function init19() {
|
|
1704
1873
|
redirectOldMenus();
|
|
1705
|
-
|
|
1874
|
+
init18();
|
|
1706
1875
|
injectIntoTop2({
|
|
1707
1876
|
id: "app-bar",
|
|
1708
1877
|
component: AppBar
|
|
@@ -1710,7 +1879,7 @@ function init18() {
|
|
|
1710
1879
|
}
|
|
1711
1880
|
export {
|
|
1712
1881
|
documentOptionsMenu,
|
|
1713
|
-
|
|
1882
|
+
init19 as init,
|
|
1714
1883
|
injectIntoPageIndication,
|
|
1715
1884
|
injectIntoPrimaryAction,
|
|
1716
1885
|
injectIntoResponsive,
|