@elementor/editor-app-bar 4.2.0-855 → 4.2.0-857
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 +275 -176
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +255 -156
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
- 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 +52 -0
- package/src/extensions/angie/components/angie-guide-location.tsx +87 -0
- package/src/extensions/angie/hooks/use-action-props.ts +2 -15
package/dist/index.js
CHANGED
|
@@ -233,9 +233,9 @@ var documentOptionsMenu = (0, import_menus2.createMenu)({
|
|
|
233
233
|
var import_editor2 = require("@elementor/editor");
|
|
234
234
|
|
|
235
235
|
// src/components/app-bar.tsx
|
|
236
|
-
var
|
|
236
|
+
var React22 = __toESM(require("react"));
|
|
237
237
|
var import_editor_documents = require("@elementor/editor-documents");
|
|
238
|
-
var
|
|
238
|
+
var import_ui13 = require("@elementor/ui");
|
|
239
239
|
|
|
240
240
|
// src/components/locations/main-menu-location.tsx
|
|
241
241
|
var React10 = __toESM(require("react"));
|
|
@@ -373,65 +373,177 @@ function ResponsiveLocation() {
|
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
// src/components/locations/tools-menu-location.tsx
|
|
376
|
-
var
|
|
376
|
+
var React20 = __toESM(require("react"));
|
|
377
377
|
|
|
378
|
-
// src/components/
|
|
378
|
+
// src/extensions/angie/components/angie-guide-location.tsx
|
|
379
|
+
var React15 = __toESM(require("react"));
|
|
380
|
+
var import_react3 = require("react");
|
|
381
|
+
var import_editor_ui = require("@elementor/editor-ui");
|
|
382
|
+
var import_events = require("@elementor/events");
|
|
383
|
+
var import_ui8 = require("@elementor/ui");
|
|
384
|
+
|
|
385
|
+
// src/extensions/angie/angie-consts.ts
|
|
386
|
+
var import_i18n2 = require("@wordpress/i18n");
|
|
387
|
+
var ANGIE_GUIDE_TOGGLE_EVENT = "elementor/editor/toggle-angie-guide";
|
|
388
|
+
var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
|
|
389
|
+
var ANGIE_BUTTON_ARIA_LABEL = (0, import_i18n2.__)("Angie", "elementor");
|
|
390
|
+
var ANGIE_LEARN_MORE_URL = "https://go.elementor.com/angie-learn-more";
|
|
391
|
+
var ANGIE_DESCRIPTION = (0, import_i18n2.__)(
|
|
392
|
+
"Angie lets you generate custom widgets, sections, and code using simple instructions.",
|
|
393
|
+
"elementor"
|
|
394
|
+
);
|
|
395
|
+
var AI_WIDGET_CTA_VIEWED_EVENT = "ai_widget_cta_viewed";
|
|
396
|
+
var ANGIE_TOP_BAR_PROMOTION_IMAGE_URL = "https://assets.elementor.com/packages/v1/images/angie-top-bar-promotion.svg";
|
|
397
|
+
var ANGIE_TOP_BAR_DESCRIPTION = (0, import_i18n2.__)("Build custom widgets using simple instructions.", "elementor");
|
|
398
|
+
|
|
399
|
+
// src/extensions/angie/components/angie-guide-card.tsx
|
|
379
400
|
var React14 = __toESM(require("react"));
|
|
380
401
|
var import_ui7 = require("@elementor/ui");
|
|
402
|
+
var import_i18n3 = require("@wordpress/i18n");
|
|
403
|
+
function AngieGuideCard({ imageUrl, description, learnMoreUrl, onInstall, onClose }) {
|
|
404
|
+
return /* @__PURE__ */ React14.createElement(import_ui7.ClickAwayListener, { onClickAway: onClose }, /* @__PURE__ */ React14.createElement(import_ui7.Stack, { sx: { width: 296 }, "data-testid": "e-angie-guide-card" }, /* @__PURE__ */ React14.createElement(import_ui7.Stack, { direction: "row", alignItems: "center", gap: 1, py: 1, px: 2 }, /* @__PURE__ */ React14.createElement(import_ui7.Typography, { variant: "subtitle2" }, (0, import_i18n3.__)("Meet Angie", "elementor")), /* @__PURE__ */ React14.createElement(import_ui7.Chip, { label: (0, import_i18n3.__)("New", "elementor"), size: "small", color: "info", variant: "standard" }), /* @__PURE__ */ React14.createElement(
|
|
405
|
+
import_ui7.CloseButton,
|
|
406
|
+
{
|
|
407
|
+
edge: "end",
|
|
408
|
+
sx: { ml: "auto" },
|
|
409
|
+
slotProps: { icon: { fontSize: "small" } },
|
|
410
|
+
onClick: onClose
|
|
411
|
+
}
|
|
412
|
+
)), /* @__PURE__ */ React14.createElement(import_ui7.Image, { src: imageUrl, alt: (0, import_i18n3.__)("Angie", "elementor"), sx: { height: 150, width: "100%" } }), /* @__PURE__ */ React14.createElement(import_ui7.Stack, { px: 2, pt: 1.5, pb: 1 }, /* @__PURE__ */ React14.createElement(import_ui7.Typography, { variant: "body2", color: "secondary" }, description)), /* @__PURE__ */ React14.createElement(import_ui7.Stack, { direction: "row", justifyContent: "flex-end", gap: 1, pt: 1, pb: 1.5, px: 2 }, /* @__PURE__ */ React14.createElement(
|
|
413
|
+
import_ui7.Button,
|
|
414
|
+
{
|
|
415
|
+
variant: "text",
|
|
416
|
+
size: "small",
|
|
417
|
+
color: "secondary",
|
|
418
|
+
onClick: () => {
|
|
419
|
+
window.open(learnMoreUrl, "_blank", "noopener,noreferrer");
|
|
420
|
+
onClose();
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
(0, import_i18n3.__)("Learn More", "elementor")
|
|
424
|
+
), /* @__PURE__ */ React14.createElement(import_ui7.Button, { variant: "contained", size: "small", color: "accent", onClick: onInstall }, (0, import_i18n3.__)("Try for free", "elementor")))));
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// src/extensions/angie/components/angie-guide-location.tsx
|
|
428
|
+
function AngieGuideLocation() {
|
|
429
|
+
const [anchorEl, setAnchorEl] = (0, import_react3.useState)(null);
|
|
430
|
+
const { dispatchEvent: dispatchEvent2 } = (0, import_events.useMixpanel)();
|
|
431
|
+
const isOpen = Boolean(anchorEl);
|
|
432
|
+
(0, import_react3.useEffect)(() => {
|
|
433
|
+
const handleToggle = () => {
|
|
434
|
+
setAnchorEl((prev) => {
|
|
435
|
+
if (prev) {
|
|
436
|
+
return null;
|
|
437
|
+
}
|
|
438
|
+
return document.querySelector(`[aria-label="${ANGIE_BUTTON_ARIA_LABEL}"]`);
|
|
439
|
+
});
|
|
440
|
+
};
|
|
441
|
+
window.addEventListener(ANGIE_GUIDE_TOGGLE_EVENT, handleToggle);
|
|
442
|
+
return () => {
|
|
443
|
+
window.removeEventListener(ANGIE_GUIDE_TOGGLE_EVENT, handleToggle);
|
|
444
|
+
};
|
|
445
|
+
}, []);
|
|
446
|
+
const handleClose = () => setAnchorEl(null);
|
|
447
|
+
const handleInstall = async () => {
|
|
448
|
+
dispatchEvent2?.(AI_WIDGET_CTA_VIEWED_EVENT, {
|
|
449
|
+
entry_point: "top_bar_icon"
|
|
450
|
+
});
|
|
451
|
+
window.dispatchEvent(
|
|
452
|
+
new CustomEvent(CREATE_WIDGET_EVENT, {
|
|
453
|
+
detail: {
|
|
454
|
+
entry_point: "top_bar_icon"
|
|
455
|
+
}
|
|
456
|
+
})
|
|
457
|
+
);
|
|
458
|
+
handleClose();
|
|
459
|
+
};
|
|
460
|
+
return /* @__PURE__ */ React15.createElement(import_editor_ui.ThemeProvider, null, /* @__PURE__ */ React15.createElement(
|
|
461
|
+
import_ui8.Infotip,
|
|
462
|
+
{
|
|
463
|
+
content: /* @__PURE__ */ React15.createElement(
|
|
464
|
+
AngieGuideCard,
|
|
465
|
+
{
|
|
466
|
+
imageUrl: ANGIE_TOP_BAR_PROMOTION_IMAGE_URL,
|
|
467
|
+
description: ANGIE_TOP_BAR_DESCRIPTION,
|
|
468
|
+
learnMoreUrl: ANGIE_LEARN_MORE_URL,
|
|
469
|
+
onInstall: handleInstall,
|
|
470
|
+
onClose: handleClose
|
|
471
|
+
}
|
|
472
|
+
),
|
|
473
|
+
placement: "bottom-start",
|
|
474
|
+
open: isOpen,
|
|
475
|
+
disableHoverListener: true,
|
|
476
|
+
PopperProps: {
|
|
477
|
+
anchorEl,
|
|
478
|
+
modifiers: [
|
|
479
|
+
{
|
|
480
|
+
name: "offset",
|
|
481
|
+
options: { offset: [-4, -4] }
|
|
482
|
+
}
|
|
483
|
+
]
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
/* @__PURE__ */ React15.createElement("span", null)
|
|
487
|
+
));
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// src/components/ui/toolbar-menu.tsx
|
|
491
|
+
var React16 = __toESM(require("react"));
|
|
492
|
+
var import_ui9 = require("@elementor/ui");
|
|
381
493
|
function ToolbarMenu({ children, ...props }) {
|
|
382
|
-
return /* @__PURE__ */
|
|
494
|
+
return /* @__PURE__ */ React16.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React16.createElement(import_ui9.Stack, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
|
|
383
495
|
}
|
|
384
496
|
|
|
385
497
|
// src/components/ui/toolbar-menu-more.tsx
|
|
386
|
-
var
|
|
498
|
+
var React17 = __toESM(require("react"));
|
|
387
499
|
var import_icons2 = require("@elementor/icons");
|
|
388
|
-
var
|
|
389
|
-
var
|
|
500
|
+
var import_ui10 = require("@elementor/ui");
|
|
501
|
+
var import_i18n4 = require("@wordpress/i18n");
|
|
390
502
|
function ToolbarMenuMore({ children, id }) {
|
|
391
|
-
const popupState = (0,
|
|
503
|
+
const popupState = (0, import_ui10.usePopupState)({
|
|
392
504
|
variant: "popover",
|
|
393
505
|
popupId: id
|
|
394
506
|
});
|
|
395
|
-
return /* @__PURE__ */
|
|
507
|
+
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(ToolbarMenuItem, { ...(0, import_ui10.bindTrigger)(popupState), title: (0, import_i18n4.__)("More", "elementor") }, /* @__PURE__ */ React17.createElement(import_icons2.DotsVerticalIcon, null)), /* @__PURE__ */ React17.createElement(PopoverMenu, { onClick: popupState.close, ...(0, import_ui10.bindMenu)(popupState) }, children));
|
|
396
508
|
}
|
|
397
509
|
|
|
398
510
|
// src/components/locations/integrations-menu-location.tsx
|
|
399
|
-
var
|
|
511
|
+
var React18 = __toESM(require("react"));
|
|
400
512
|
var import_icons3 = require("@elementor/icons");
|
|
401
|
-
var
|
|
402
|
-
var
|
|
513
|
+
var import_ui11 = require("@elementor/ui");
|
|
514
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
403
515
|
var { useMenuItems: useMenuItems2 } = integrationsMenu;
|
|
404
516
|
function IntegrationsMenuLocation() {
|
|
405
517
|
const menuItems = useMenuItems2();
|
|
406
|
-
const popupState = (0,
|
|
518
|
+
const popupState = (0, import_ui11.usePopupState)({
|
|
407
519
|
variant: "popover",
|
|
408
520
|
popupId: "elementor-v2-app-bar-integrations"
|
|
409
521
|
});
|
|
410
522
|
if (menuItems.default.length === 0) {
|
|
411
523
|
return null;
|
|
412
524
|
}
|
|
413
|
-
return /* @__PURE__ */
|
|
525
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(ToolbarMenuItem, { ...(0, import_ui11.bindTrigger)(popupState), title: (0, import_i18n5.__)("Integrations", "elementor") }, /* @__PURE__ */ React18.createElement(import_icons3.PlugIcon, null)), /* @__PURE__ */ React18.createElement(
|
|
414
526
|
PopoverMenu,
|
|
415
527
|
{
|
|
416
528
|
onClick: popupState.close,
|
|
417
|
-
...(0,
|
|
529
|
+
...(0, import_ui11.bindMenu)(popupState),
|
|
418
530
|
marginThreshold: 8,
|
|
419
531
|
open: popupState.isOpen
|
|
420
532
|
},
|
|
421
|
-
menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */
|
|
533
|
+
menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React18.createElement(IntegrationsMenuItem, { key: id }))
|
|
422
534
|
));
|
|
423
535
|
}
|
|
424
536
|
|
|
425
537
|
// src/components/locations/send-feedback-popup-location.tsx
|
|
426
|
-
var
|
|
427
|
-
var
|
|
428
|
-
var
|
|
538
|
+
var React19 = __toESM(require("react"));
|
|
539
|
+
var import_react4 = require("react");
|
|
540
|
+
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
429
541
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
430
|
-
var
|
|
542
|
+
var import_events2 = require("@elementor/events");
|
|
431
543
|
var import_http_client = require("@elementor/http-client");
|
|
432
544
|
var import_icons4 = require("@elementor/icons");
|
|
433
|
-
var
|
|
434
|
-
var
|
|
545
|
+
var import_ui12 = require("@elementor/ui");
|
|
546
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
435
547
|
|
|
436
548
|
// src/extensions/feedback/feedback-consts.ts
|
|
437
549
|
var EXPERIMENT_NAME = "in_editor_feedback";
|
|
@@ -445,18 +557,18 @@ var checkIfUserIsConnected = () => {
|
|
|
445
557
|
function SendFeedbackPopupLocation() {
|
|
446
558
|
const isActive = (0, import_editor_v1_adapters.isExperimentActive)(EXPERIMENT_NAME);
|
|
447
559
|
const extendedWindow = window;
|
|
448
|
-
const [isUserConnected, setIsUserConnected] = (0,
|
|
560
|
+
const [isUserConnected, setIsUserConnected] = (0, import_react4.useState)(checkIfUserIsConnected());
|
|
449
561
|
const connectUrl = extendedWindow?.elementor?.config.user.top_bar.connect_url;
|
|
450
|
-
const [feedbackContent, setFeedbackContent] = (0,
|
|
451
|
-
const [feedbackResult, setFeedbackResult] = (0,
|
|
452
|
-
const [submitDisabled, setSubmitDisabled] = (0,
|
|
453
|
-
const { dispatchEvent: trackEvent2 = (...args) => void args } = (0,
|
|
454
|
-
const popupState = (0,
|
|
562
|
+
const [feedbackContent, setFeedbackContent] = (0, import_react4.useState)("");
|
|
563
|
+
const [feedbackResult, setFeedbackResult] = (0, import_react4.useState)(null);
|
|
564
|
+
const [submitDisabled, setSubmitDisabled] = (0, import_react4.useState)(true);
|
|
565
|
+
const { dispatchEvent: trackEvent2 = (...args) => void args } = (0, import_events2.useMixpanel)();
|
|
566
|
+
const popupState = (0, import_ui12.usePopupState)({
|
|
455
567
|
variant: "dialog",
|
|
456
568
|
popupId: FEEDBACK_TOGGLE_EVENT
|
|
457
569
|
});
|
|
458
|
-
const [isFetching, setIsFetching] = (0,
|
|
459
|
-
(0,
|
|
570
|
+
const [isFetching, setIsFetching] = (0, import_react4.useState)(false);
|
|
571
|
+
(0, import_react4.useEffect)(() => {
|
|
460
572
|
const handler = () => {
|
|
461
573
|
popupState.toggle();
|
|
462
574
|
setIsUserConnected(checkIfUserIsConnected());
|
|
@@ -471,7 +583,7 @@ function SendFeedbackPopupLocation() {
|
|
|
471
583
|
window.removeEventListener(FEEDBACK_TOGGLE_EVENT, handler);
|
|
472
584
|
};
|
|
473
585
|
}, [popupState, trackEvent2]);
|
|
474
|
-
(0,
|
|
586
|
+
(0, import_react4.useEffect)(() => {
|
|
475
587
|
setSubmitDisabled(feedbackContent.trim().length < 10 || !isUserConnected || isFetching);
|
|
476
588
|
}, [feedbackContent, feedbackResult, isUserConnected, isFetching]);
|
|
477
589
|
const handleClose = () => {
|
|
@@ -506,8 +618,8 @@ function SendFeedbackPopupLocation() {
|
|
|
506
618
|
if (!isActive) {
|
|
507
619
|
return null;
|
|
508
620
|
}
|
|
509
|
-
return /* @__PURE__ */
|
|
510
|
-
|
|
621
|
+
return /* @__PURE__ */ React19.createElement(import_editor_ui2.ThemeProvider, null, /* @__PURE__ */ React19.createElement(import_ui12.Popover, { ...(0, import_ui12.bindDialog)(popupState), onClose: () => handleClose() }, /* @__PURE__ */ React19.createElement(import_ui12.Dialog, { open: popupState.isOpen }, /* @__PURE__ */ React19.createElement(import_ui12.DialogHeader, { style: { width: "100%", minWidth: "35rem" } }, /* @__PURE__ */ React19.createElement(import_ui12.DialogTitle, { style: { width: "100%" } }, /* @__PURE__ */ React19.createElement(
|
|
622
|
+
import_ui12.Stack,
|
|
511
623
|
{
|
|
512
624
|
display: "flex",
|
|
513
625
|
direction: "row",
|
|
@@ -515,18 +627,18 @@ function SendFeedbackPopupLocation() {
|
|
|
515
627
|
justifyContent: "space-between",
|
|
516
628
|
width: "100%"
|
|
517
629
|
},
|
|
518
|
-
(0,
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
))), /* @__PURE__ */
|
|
521
|
-
|
|
630
|
+
(0, import_i18n6.__)("Submit Feedback", "elementor"),
|
|
631
|
+
/* @__PURE__ */ React19.createElement(import_ui12.CloseButton, { onClick: popupState.close })
|
|
632
|
+
))), /* @__PURE__ */ React19.createElement(import_ui12.DialogContent, null, /* @__PURE__ */ React19.createElement(import_ui12.Stack, { direction: "column", gap: 2 }, isUserConnected ? /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
633
|
+
import_ui12.TextField,
|
|
522
634
|
{
|
|
523
635
|
autofocus: true,
|
|
524
|
-
placeholder: (0,
|
|
636
|
+
placeholder: (0, import_i18n6.__)(
|
|
525
637
|
"E.g. Can you add ABC features? I want to do ABC and it\u2019s important because \u2026",
|
|
526
638
|
"elementor"
|
|
527
639
|
),
|
|
528
640
|
fullwith: true,
|
|
529
|
-
label: (0,
|
|
641
|
+
label: (0, import_i18n6.__)("Your Feedback", "elementor"),
|
|
530
642
|
multiline: true,
|
|
531
643
|
id: "elementor-feedback-usercontent",
|
|
532
644
|
rows: 6,
|
|
@@ -535,8 +647,8 @@ function SendFeedbackPopupLocation() {
|
|
|
535
647
|
onChange: (event) => setFeedbackContent(event.target.value),
|
|
536
648
|
value: feedbackContent
|
|
537
649
|
}
|
|
538
|
-
), /* @__PURE__ */
|
|
539
|
-
|
|
650
|
+
), /* @__PURE__ */ React19.createElement(import_ui12.Stack, { direction: "row", justifyContent: "flex-end", alignItems: "center", gap: 2 }, feedbackResult && /* @__PURE__ */ React19.createElement(React19.Fragment, null, feedbackResult.success ? /* @__PURE__ */ React19.createElement(import_icons4.CheckIcon, { color: "success" }) : /* @__PURE__ */ React19.createElement(import_icons4.AlertCircleIcon, { color: "error" }), feedbackResult.message), feedbackResult?.success ? /* @__PURE__ */ React19.createElement(import_ui12.Button, { variant: "text", onClick: () => handleStartAnother() }, (0, import_i18n6.__)("Submit Another Feedback", "elementor")) : /* @__PURE__ */ React19.createElement(
|
|
651
|
+
import_ui12.Button,
|
|
540
652
|
{
|
|
541
653
|
disabled: submitDisabled,
|
|
542
654
|
onClick: submitFeedback,
|
|
@@ -544,9 +656,9 @@ function SendFeedbackPopupLocation() {
|
|
|
544
656
|
color: "primary",
|
|
545
657
|
size: "small"
|
|
546
658
|
},
|
|
547
|
-
(0,
|
|
548
|
-
))) : /* @__PURE__ */
|
|
549
|
-
|
|
659
|
+
(0, import_i18n6.__)("Submit", "elementor")
|
|
660
|
+
))) : /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
661
|
+
import_ui12.Button,
|
|
550
662
|
{
|
|
551
663
|
variant: "contained",
|
|
552
664
|
color: "primary",
|
|
@@ -556,7 +668,7 @@ function SendFeedbackPopupLocation() {
|
|
|
556
668
|
rel: "noopener",
|
|
557
669
|
onClick: popupState.close
|
|
558
670
|
},
|
|
559
|
-
(0,
|
|
671
|
+
(0, import_i18n6.__)("Connect to Elementor", "elementor")
|
|
560
672
|
)))))));
|
|
561
673
|
}
|
|
562
674
|
|
|
@@ -567,12 +679,12 @@ function ToolsMenuLocation() {
|
|
|
567
679
|
const menuItems = useMenuItems3();
|
|
568
680
|
const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS);
|
|
569
681
|
const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS);
|
|
570
|
-
return /* @__PURE__ */
|
|
682
|
+
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 }))));
|
|
571
683
|
}
|
|
572
684
|
|
|
573
685
|
// src/components/locations/utilities-menu-location.tsx
|
|
574
|
-
var
|
|
575
|
-
var
|
|
686
|
+
var React21 = __toESM(require("react"));
|
|
687
|
+
var import_react5 = require("react");
|
|
576
688
|
var MAX_TOOLBAR_ACTIONS2 = 4;
|
|
577
689
|
var { useMenuItems: useMenuItems4 } = utilitiesMenu;
|
|
578
690
|
function UtilitiesMenuLocation() {
|
|
@@ -580,52 +692,39 @@ function UtilitiesMenuLocation() {
|
|
|
580
692
|
const shouldUsePopover = menuItems.default.length > MAX_TOOLBAR_ACTIONS2 + 1;
|
|
581
693
|
const toolbarMenuItems = shouldUsePopover ? menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS2) : menuItems.default;
|
|
582
694
|
const popoverMenuItems = shouldUsePopover ? menuItems.default.slice(MAX_TOOLBAR_ACTIONS2) : [];
|
|
583
|
-
return /* @__PURE__ */
|
|
695
|
+
return /* @__PURE__ */ React21.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React21.createElement(import_react5.Fragment, { 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 }))));
|
|
584
696
|
}
|
|
585
697
|
|
|
586
698
|
// src/components/app-bar.tsx
|
|
587
699
|
function AppBar() {
|
|
588
700
|
const document2 = (0, import_editor_documents.__useActiveDocument)();
|
|
589
|
-
return /* @__PURE__ */
|
|
701
|
+
return /* @__PURE__ */ React22.createElement(import_ui13.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React22.createElement(import_ui13.AppBar, { position: "sticky" }, /* @__PURE__ */ React22.createElement(import_ui13.Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React22.createElement(import_ui13.Box, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React22.createElement(import_ui13.Grid, { container: true, flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React22.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React22.createElement(import_ui13.Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React22.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React22.createElement(import_ui13.Divider, { orientation: "vertical" }), /* @__PURE__ */ React22.createElement(PageIndicationLocation, null), /* @__PURE__ */ React22.createElement(import_ui13.Divider, { orientation: "vertical" }), /* @__PURE__ */ React22.createElement(ResponsiveLocation, null), /* @__PURE__ */ React22.createElement(import_ui13.Divider, { orientation: "vertical" }))), /* @__PURE__ */ React22.createElement(import_ui13.Grid, { container: true, justifyContent: "flex-end", flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React22.createElement(PrimaryActionLocation, null))))));
|
|
590
702
|
}
|
|
591
703
|
|
|
592
704
|
// src/extensions/angie/hooks/use-action-props.ts
|
|
593
|
-
var
|
|
705
|
+
var import_react6 = require("react");
|
|
594
706
|
var import_editor_mcp = require("@elementor/editor-mcp");
|
|
595
|
-
var
|
|
707
|
+
var import_events3 = require("@elementor/events");
|
|
596
708
|
var import_icons5 = require("@elementor/icons");
|
|
597
|
-
var
|
|
598
|
-
var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
|
|
599
|
-
var AI_WIDGET_CTA_VIEWED_EVENT = "ai_widget_cta_viewed";
|
|
600
|
-
var CREATE_WIDGET_PROMPT = `Create a widget for me.
|
|
601
|
-
Goal: [What should this widget help me accomplish?]
|
|
602
|
-
Placement: [Where will I see it in the editor/UI?]
|
|
603
|
-
How it should work: `;
|
|
709
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
604
710
|
function useActionProps() {
|
|
605
711
|
const hasAngieInstalled = (0, import_editor_mcp.isAngieAvailable)();
|
|
606
712
|
const visible = !hasAngieInstalled;
|
|
607
|
-
(0,
|
|
713
|
+
(0, import_react6.useEffect)(() => {
|
|
608
714
|
if (!visible) {
|
|
609
715
|
return;
|
|
610
716
|
}
|
|
611
|
-
(0,
|
|
717
|
+
(0, import_events3.trackEvent)({
|
|
612
718
|
eventName: AI_WIDGET_CTA_VIEWED_EVENT,
|
|
613
719
|
entry_point: "top_bar_icon",
|
|
614
720
|
has_angie_installed: false
|
|
615
721
|
});
|
|
616
722
|
}, [visible]);
|
|
617
723
|
return {
|
|
618
|
-
title: (0,
|
|
724
|
+
title: (0, import_i18n7.__)("Angie", "elementor"),
|
|
619
725
|
icon: import_icons5.AngieIcon,
|
|
620
726
|
onClick: () => {
|
|
621
|
-
window.dispatchEvent(
|
|
622
|
-
new CustomEvent(CREATE_WIDGET_EVENT, {
|
|
623
|
-
detail: {
|
|
624
|
-
prompt: CREATE_WIDGET_PROMPT,
|
|
625
|
-
entry_point: "top_bar_icon"
|
|
626
|
-
}
|
|
627
|
-
})
|
|
628
|
-
);
|
|
727
|
+
window.dispatchEvent(new CustomEvent(ANGIE_GUIDE_TOGGLE_EVENT));
|
|
629
728
|
},
|
|
630
729
|
selected: false,
|
|
631
730
|
visible
|
|
@@ -642,9 +741,9 @@ function init() {
|
|
|
642
741
|
}
|
|
643
742
|
|
|
644
743
|
// src/extensions/connect/hooks/use-connect-link-config.tsx
|
|
645
|
-
var
|
|
744
|
+
var import_react7 = require("react");
|
|
646
745
|
var import_icons6 = require("@elementor/icons");
|
|
647
|
-
var
|
|
746
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
648
747
|
var dispatchConnectClickEvent = (eventName) => {
|
|
649
748
|
try {
|
|
650
749
|
const extendedWindow = window;
|
|
@@ -672,7 +771,7 @@ function useConnectLinkConfig() {
|
|
|
672
771
|
isUserConnected = extendedWindow?.elementorCommon?.config.library_connect.is_connected ?? false;
|
|
673
772
|
target = "_self";
|
|
674
773
|
}
|
|
675
|
-
const handleConnectClick = (0,
|
|
774
|
+
const handleConnectClick = (0, import_react7.useCallback)(
|
|
676
775
|
(event) => {
|
|
677
776
|
event.preventDefault();
|
|
678
777
|
if (extendedWindow.jQuery && extendedWindow.jQuery.fn?.elementorConnect) {
|
|
@@ -697,12 +796,12 @@ function useConnectLinkConfig() {
|
|
|
697
796
|
[extendedWindow]
|
|
698
797
|
);
|
|
699
798
|
return isUserConnected ? {
|
|
700
|
-
title: (0,
|
|
799
|
+
title: (0, import_i18n8.__)("My Elementor", "elementor"),
|
|
701
800
|
href: extendedWindow?.elementor?.config.user.top_bar.my_elementor_url,
|
|
702
801
|
icon: import_icons6.UserIcon,
|
|
703
802
|
target: "_blank"
|
|
704
803
|
} : {
|
|
705
|
-
title: (0,
|
|
804
|
+
title: (0, import_i18n8.__)("Connect my account", "elementor"),
|
|
706
805
|
href: extendedWindow?.elementor?.config.user.top_bar.connect_url,
|
|
707
806
|
icon: import_icons6.UserIcon,
|
|
708
807
|
target,
|
|
@@ -724,12 +823,12 @@ function init2() {
|
|
|
724
823
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
725
824
|
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
726
825
|
var import_icons7 = require("@elementor/icons");
|
|
727
|
-
var
|
|
826
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
728
827
|
function useActionProps2() {
|
|
729
828
|
const document2 = (0, import_editor_documents2.__useActiveDocument)();
|
|
730
829
|
return {
|
|
731
830
|
icon: import_icons7.EyeIcon,
|
|
732
|
-
title: (0,
|
|
831
|
+
title: (0, import_i18n9.__)("Preview Changes", "elementor"),
|
|
733
832
|
onClick: () => {
|
|
734
833
|
const extendedWindow = window;
|
|
735
834
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -761,18 +860,18 @@ function init3() {
|
|
|
761
860
|
}
|
|
762
861
|
|
|
763
862
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
764
|
-
var
|
|
863
|
+
var React24 = __toESM(require("react"));
|
|
765
864
|
var import_editor_documents3 = require("@elementor/editor-documents");
|
|
766
865
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
767
866
|
var import_icons8 = require("@elementor/icons");
|
|
768
|
-
var
|
|
769
|
-
var
|
|
867
|
+
var import_ui15 = require("@elementor/ui");
|
|
868
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
770
869
|
|
|
771
870
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
772
|
-
var
|
|
773
|
-
var
|
|
871
|
+
var React23 = __toESM(require("react"));
|
|
872
|
+
var import_ui14 = require("@elementor/ui");
|
|
774
873
|
var { useMenuItems: useMenuItems5 } = documentOptionsMenu;
|
|
775
|
-
var StyledPopoverMenu = (0,
|
|
874
|
+
var StyledPopoverMenu = (0, import_ui14.styled)(PopoverMenu)`
|
|
776
875
|
& > .MuiPopover-paper > .MuiList-root {
|
|
777
876
|
& > .MuiDivider-root {
|
|
778
877
|
display: none;
|
|
@@ -785,7 +884,7 @@ var StyledPopoverMenu = (0, import_ui12.styled)(PopoverMenu)`
|
|
|
785
884
|
`;
|
|
786
885
|
function PrimaryActionMenu(props) {
|
|
787
886
|
const { save: saveActions, default: defaultActions } = useMenuItems5();
|
|
788
|
-
return /* @__PURE__ */
|
|
887
|
+
return /* @__PURE__ */ React23.createElement(
|
|
789
888
|
StyledPopoverMenu,
|
|
790
889
|
{
|
|
791
890
|
...props,
|
|
@@ -803,13 +902,13 @@ function PrimaryActionMenu(props) {
|
|
|
803
902
|
}
|
|
804
903
|
},
|
|
805
904
|
saveActions.map(({ MenuItem: MenuItem2, id }, index) => [
|
|
806
|
-
index > 0 && /* @__PURE__ */
|
|
807
|
-
/* @__PURE__ */
|
|
905
|
+
index > 0 && /* @__PURE__ */ React23.createElement(import_ui14.Divider, { key: `${id}-divider` }),
|
|
906
|
+
/* @__PURE__ */ React23.createElement(MenuItem2, { key: id })
|
|
808
907
|
]),
|
|
809
|
-
saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */
|
|
908
|
+
saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */ React23.createElement(import_ui14.Divider, null),
|
|
810
909
|
defaultActions.map(({ MenuItem: MenuItem2, id }, index) => [
|
|
811
|
-
index > 0 && /* @__PURE__ */
|
|
812
|
-
/* @__PURE__ */
|
|
910
|
+
index > 0 && /* @__PURE__ */ React23.createElement(import_ui14.Divider, { key: `${id}-divider` }),
|
|
911
|
+
/* @__PURE__ */ React23.createElement(MenuItem2, { key: id })
|
|
813
912
|
])
|
|
814
913
|
);
|
|
815
914
|
}
|
|
@@ -820,7 +919,7 @@ function PrimaryAction() {
|
|
|
820
919
|
const { save } = (0, import_editor_documents3.__useActiveDocumentActions)();
|
|
821
920
|
const editMode = (0, import_editor_v1_adapters3.useEditMode)();
|
|
822
921
|
const isEditMode = editMode === "edit";
|
|
823
|
-
const popupState = (0,
|
|
922
|
+
const popupState = (0, import_ui15.usePopupState)({
|
|
824
923
|
variant: "popover",
|
|
825
924
|
popupId: "document-save-options"
|
|
826
925
|
});
|
|
@@ -830,8 +929,8 @@ function PrimaryAction() {
|
|
|
830
929
|
const isPublishDisabled = !isEditMode || !isPublishEnabled(document2);
|
|
831
930
|
const isSaveOptionsDisabled = !isEditMode || document2.type.value === "kit";
|
|
832
931
|
const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
|
|
833
|
-
return /* @__PURE__ */
|
|
834
|
-
|
|
932
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(import_ui15.ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React24.createElement(
|
|
933
|
+
import_ui15.Button,
|
|
835
934
|
{
|
|
836
935
|
onClick: () => {
|
|
837
936
|
const extendedWindow = window;
|
|
@@ -861,11 +960,11 @@ function PrimaryAction() {
|
|
|
861
960
|
},
|
|
862
961
|
disabled: isPublishDisabled
|
|
863
962
|
},
|
|
864
|
-
shouldShowSpinner ? /* @__PURE__ */
|
|
865
|
-
), /* @__PURE__ */
|
|
866
|
-
|
|
963
|
+
shouldShowSpinner ? /* @__PURE__ */ React24.createElement(import_ui15.CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
|
|
964
|
+
), /* @__PURE__ */ React24.createElement(
|
|
965
|
+
import_ui15.Tooltip,
|
|
867
966
|
{
|
|
868
|
-
title: (0,
|
|
967
|
+
title: (0, import_i18n10.__)("Save Options", "elementor"),
|
|
869
968
|
PopperProps: {
|
|
870
969
|
sx: {
|
|
871
970
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -875,21 +974,21 @@ function PrimaryAction() {
|
|
|
875
974
|
}
|
|
876
975
|
}
|
|
877
976
|
},
|
|
878
|
-
/* @__PURE__ */
|
|
879
|
-
|
|
977
|
+
/* @__PURE__ */ React24.createElement(import_ui15.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React24.createElement(
|
|
978
|
+
import_ui15.Button,
|
|
880
979
|
{
|
|
881
980
|
size: "small",
|
|
882
|
-
...(0,
|
|
981
|
+
...(0, import_ui15.bindTrigger)(popupState),
|
|
883
982
|
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
884
983
|
disabled: isSaveOptionsDisabled,
|
|
885
|
-
"aria-label": (0,
|
|
984
|
+
"aria-label": (0, import_i18n10.__)("Save Options", "elementor")
|
|
886
985
|
},
|
|
887
|
-
/* @__PURE__ */
|
|
986
|
+
/* @__PURE__ */ React24.createElement(import_icons8.ChevronDownIcon, null)
|
|
888
987
|
))
|
|
889
|
-
)), /* @__PURE__ */
|
|
988
|
+
)), /* @__PURE__ */ React24.createElement(PrimaryActionMenu, { ...(0, import_ui15.bindMenu)(popupState), onClick: popupState.close }));
|
|
890
989
|
}
|
|
891
990
|
function getLabel(document2) {
|
|
892
|
-
return document2.userCan.publish ? (0,
|
|
991
|
+
return document2.userCan.publish ? (0, import_i18n10.__)("Publish", "elementor") : (0, import_i18n10.__)("Submit", "elementor");
|
|
893
992
|
}
|
|
894
993
|
function isPublishEnabled(document2) {
|
|
895
994
|
if (document2.type.value === "kit") {
|
|
@@ -900,16 +999,16 @@ function isPublishEnabled(document2) {
|
|
|
900
999
|
|
|
901
1000
|
// src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
|
|
902
1001
|
var import_editor_documents4 = require("@elementor/editor-documents");
|
|
903
|
-
var
|
|
1002
|
+
var import_events4 = require("@elementor/events");
|
|
904
1003
|
var import_icons9 = require("@elementor/icons");
|
|
905
|
-
var
|
|
1004
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
906
1005
|
function useDocumentCopyAndShareProps() {
|
|
907
1006
|
const document2 = (0, import_editor_documents4.__useActiveDocument)();
|
|
908
1007
|
const { copyAndShare } = (0, import_editor_documents4.__useActiveDocumentActions)();
|
|
909
|
-
const { dispatchEvent: dispatchEvent2, config } = (0,
|
|
1008
|
+
const { dispatchEvent: dispatchEvent2, config } = (0, import_events4.useMixpanel)();
|
|
910
1009
|
return {
|
|
911
1010
|
icon: import_icons9.LinkIcon,
|
|
912
|
-
title: (0,
|
|
1011
|
+
title: (0, import_i18n11.__)("Copy and Share", "elementor"),
|
|
913
1012
|
onClick: () => {
|
|
914
1013
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
915
1014
|
if (eventName) {
|
|
@@ -934,16 +1033,16 @@ function useDocumentCopyAndShareProps() {
|
|
|
934
1033
|
|
|
935
1034
|
// src/extensions/documents-save/hooks/use-document-save-draft-props.ts
|
|
936
1035
|
var import_editor_documents5 = require("@elementor/editor-documents");
|
|
937
|
-
var
|
|
1036
|
+
var import_events5 = require("@elementor/events");
|
|
938
1037
|
var import_icons10 = require("@elementor/icons");
|
|
939
|
-
var
|
|
1038
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
940
1039
|
function useDocumentSaveDraftProps() {
|
|
941
1040
|
const document2 = (0, import_editor_documents5.__useActiveDocument)();
|
|
942
1041
|
const { saveDraft } = (0, import_editor_documents5.__useActiveDocumentActions)();
|
|
943
|
-
const { dispatchEvent: dispatchEvent2, config } = (0,
|
|
1042
|
+
const { dispatchEvent: dispatchEvent2, config } = (0, import_events5.useMixpanel)();
|
|
944
1043
|
return {
|
|
945
1044
|
icon: import_icons10.FileReportIcon,
|
|
946
|
-
title: (0,
|
|
1045
|
+
title: (0, import_i18n12.__)("Save Draft", "elementor"),
|
|
947
1046
|
onClick: () => {
|
|
948
1047
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
949
1048
|
if (eventName) {
|
|
@@ -967,15 +1066,15 @@ function useDocumentSaveDraftProps() {
|
|
|
967
1066
|
|
|
968
1067
|
// src/extensions/documents-save/hooks/use-document-save-template-props.ts
|
|
969
1068
|
var import_editor_documents6 = require("@elementor/editor-documents");
|
|
970
|
-
var
|
|
1069
|
+
var import_events6 = require("@elementor/events");
|
|
971
1070
|
var import_icons11 = require("@elementor/icons");
|
|
972
|
-
var
|
|
1071
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
973
1072
|
function useDocumentSaveTemplateProps() {
|
|
974
1073
|
const { saveTemplate } = (0, import_editor_documents6.__useActiveDocumentActions)();
|
|
975
|
-
const { dispatchEvent: dispatchEvent2, config } = (0,
|
|
1074
|
+
const { dispatchEvent: dispatchEvent2, config } = (0, import_events6.useMixpanel)();
|
|
976
1075
|
return {
|
|
977
1076
|
icon: import_icons11.FolderIcon,
|
|
978
|
-
title: (0,
|
|
1077
|
+
title: (0, import_i18n13.__)("Save as Template", "elementor"),
|
|
979
1078
|
onClick: () => {
|
|
980
1079
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
981
1080
|
if (eventName) {
|
|
@@ -1000,12 +1099,12 @@ function useDocumentSaveTemplateProps() {
|
|
|
1000
1099
|
var import_editor_documents7 = require("@elementor/editor-documents");
|
|
1001
1100
|
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
1002
1101
|
var import_icons12 = require("@elementor/icons");
|
|
1003
|
-
var
|
|
1102
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
1004
1103
|
function useDocumentViewAsMarkdownProps() {
|
|
1005
1104
|
const document2 = (0, import_editor_documents7.__useActiveDocument)();
|
|
1006
1105
|
return {
|
|
1007
1106
|
icon: import_icons12.EyeIcon,
|
|
1008
|
-
title: (0,
|
|
1107
|
+
title: (0, import_i18n14.__)("View as Markdown", "elementor"),
|
|
1009
1108
|
onClick: async () => {
|
|
1010
1109
|
const baseUrl = document2?.links?.wpPreview || document2?.links?.permalink;
|
|
1011
1110
|
if (!baseUrl) {
|
|
@@ -1024,15 +1123,15 @@ function useDocumentViewAsMarkdownProps() {
|
|
|
1024
1123
|
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
1025
1124
|
var import_editor_documents8 = require("@elementor/editor-documents");
|
|
1026
1125
|
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
1027
|
-
var
|
|
1126
|
+
var import_events7 = require("@elementor/events");
|
|
1028
1127
|
var import_icons13 = require("@elementor/icons");
|
|
1029
|
-
var
|
|
1128
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
1030
1129
|
function useDocumentViewPageProps() {
|
|
1031
1130
|
const document2 = (0, import_editor_documents8.__useActiveDocument)();
|
|
1032
|
-
const { dispatchEvent: dispatchEvent2, config } = (0,
|
|
1131
|
+
const { dispatchEvent: dispatchEvent2, config } = (0, import_events7.useMixpanel)();
|
|
1033
1132
|
return {
|
|
1034
1133
|
icon: import_icons13.EyeIcon,
|
|
1035
|
-
title: (0,
|
|
1134
|
+
title: (0, import_i18n15.__)("View Page", "elementor"),
|
|
1036
1135
|
onClick: () => {
|
|
1037
1136
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
1038
1137
|
if (eventName) {
|
|
@@ -1096,7 +1195,7 @@ function init4() {
|
|
|
1096
1195
|
var import_editor_documents9 = require("@elementor/editor-documents");
|
|
1097
1196
|
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
1098
1197
|
var import_icons14 = require("@elementor/icons");
|
|
1099
|
-
var
|
|
1198
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
1100
1199
|
function useActionProps3() {
|
|
1101
1200
|
const activeDocument = (0, import_editor_documents9.__useActiveDocument)();
|
|
1102
1201
|
const hostDocument = (0, import_editor_documents9.__useHostDocument)();
|
|
@@ -1104,8 +1203,8 @@ function useActionProps3() {
|
|
|
1104
1203
|
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
1105
1204
|
const ButtonTitle = document2 ? (
|
|
1106
1205
|
/* translators: %s: Post type label. */
|
|
1107
|
-
(0,
|
|
1108
|
-
) : (0,
|
|
1206
|
+
(0, import_i18n16.__)("%s Settings", "elementor").replace("%s", document2.type.label)
|
|
1207
|
+
) : (0, import_i18n16.__)("Document Settings", "elementor");
|
|
1109
1208
|
return {
|
|
1110
1209
|
title: ButtonTitle,
|
|
1111
1210
|
icon: import_icons14.FileSettingsIcon,
|
|
@@ -1142,11 +1241,11 @@ function init5() {
|
|
|
1142
1241
|
// src/extensions/elements/hooks/use-action-props.ts
|
|
1143
1242
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
1144
1243
|
var import_icons15 = require("@elementor/icons");
|
|
1145
|
-
var
|
|
1244
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
1146
1245
|
function useActionProps4() {
|
|
1147
1246
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters7.__privateUseRouteStatus)("panel/elements");
|
|
1148
1247
|
return {
|
|
1149
|
-
title: (0,
|
|
1248
|
+
title: (0, import_i18n17.__)("Add Element", "elementor"),
|
|
1150
1249
|
icon: import_icons15.PlusIcon,
|
|
1151
1250
|
onClick: () => {
|
|
1152
1251
|
const extendedWindow = window;
|
|
@@ -1168,10 +1267,10 @@ function useActionProps4() {
|
|
|
1168
1267
|
|
|
1169
1268
|
// src/extensions/elements/sync/sync-panel-title.ts
|
|
1170
1269
|
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
1171
|
-
var
|
|
1270
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
1172
1271
|
function syncPanelTitle() {
|
|
1173
|
-
const panelTitle = (0,
|
|
1174
|
-
const tabTitle = (0,
|
|
1272
|
+
const panelTitle = (0, import_i18n18.__)("Elements", "elementor");
|
|
1273
|
+
const tabTitle = (0, import_i18n18.__)("Widgets", "elementor");
|
|
1175
1274
|
(0, import_editor_v1_adapters8.__privateListenTo)((0, import_editor_v1_adapters8.routeOpenEvent)("panel/elements"), () => {
|
|
1176
1275
|
setPanelTitle(panelTitle);
|
|
1177
1276
|
setTabTitle(tabTitle);
|
|
@@ -1206,7 +1305,7 @@ function init6() {
|
|
|
1206
1305
|
// src/extensions/feedback/index.ts
|
|
1207
1306
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
1208
1307
|
var import_icons16 = require("@elementor/icons");
|
|
1209
|
-
var
|
|
1308
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
1210
1309
|
function init7() {
|
|
1211
1310
|
const isActive = (0, import_editor_v1_adapters9.isExperimentActive)(EXPERIMENT_NAME);
|
|
1212
1311
|
if (!isActive) {
|
|
@@ -1219,7 +1318,7 @@ function init7() {
|
|
|
1219
1318
|
useProps: () => {
|
|
1220
1319
|
return {
|
|
1221
1320
|
icon: import_icons16.MessageLinesIcon,
|
|
1222
|
-
title: (0,
|
|
1321
|
+
title: (0, import_i18n19.__)("Send Feedback", "elementor"),
|
|
1223
1322
|
onClick: () => {
|
|
1224
1323
|
dispatchEvent(new CustomEvent(FEEDBACK_TOGGLE_EVENT));
|
|
1225
1324
|
}
|
|
@@ -1231,10 +1330,10 @@ function init7() {
|
|
|
1231
1330
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
1232
1331
|
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
1233
1332
|
var import_icons17 = require("@elementor/icons");
|
|
1234
|
-
var
|
|
1333
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
1235
1334
|
function useActionProps5() {
|
|
1236
1335
|
return {
|
|
1237
|
-
title: (0,
|
|
1336
|
+
title: (0, import_i18n20.__)("Finder", "elementor"),
|
|
1238
1337
|
icon: import_icons17.SearchIcon,
|
|
1239
1338
|
onClick: () => {
|
|
1240
1339
|
const extendedWindow = window;
|
|
@@ -1263,10 +1362,10 @@ function init8() {
|
|
|
1263
1362
|
|
|
1264
1363
|
// src/extensions/help/hooks/use-action-props.ts
|
|
1265
1364
|
var import_icons18 = require("@elementor/icons");
|
|
1266
|
-
var
|
|
1365
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
1267
1366
|
function useActionProps6() {
|
|
1268
1367
|
return {
|
|
1269
|
-
title: (0,
|
|
1368
|
+
title: (0, import_i18n21.__)("Help Center", "elementor"),
|
|
1270
1369
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
1271
1370
|
icon: import_icons18.HelpIcon,
|
|
1272
1371
|
target: "_blank",
|
|
@@ -1298,11 +1397,11 @@ function init9() {
|
|
|
1298
1397
|
// src/extensions/history/hooks/use-action-props.ts
|
|
1299
1398
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
1300
1399
|
var import_icons19 = require("@elementor/icons");
|
|
1301
|
-
var
|
|
1400
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
1302
1401
|
function useActionProps7() {
|
|
1303
1402
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters11.__privateUseRouteStatus)("panel/history");
|
|
1304
1403
|
return {
|
|
1305
|
-
title: (0,
|
|
1404
|
+
title: (0, import_i18n22.__)("History", "elementor"),
|
|
1306
1405
|
icon: import_icons19.HistoryIcon,
|
|
1307
1406
|
onClick: () => {
|
|
1308
1407
|
const extendedWindow = window;
|
|
@@ -1334,11 +1433,11 @@ function init10() {
|
|
|
1334
1433
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
1335
1434
|
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
1336
1435
|
var import_icons20 = require("@elementor/icons");
|
|
1337
|
-
var
|
|
1436
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
1338
1437
|
function useActionProps8() {
|
|
1339
1438
|
return {
|
|
1340
1439
|
icon: import_icons20.KeyboardIcon,
|
|
1341
|
-
title: (0,
|
|
1440
|
+
title: (0, import_i18n23.__)("Keyboard Shortcuts", "elementor"),
|
|
1342
1441
|
onClick: () => {
|
|
1343
1442
|
const extendedWindow = window;
|
|
1344
1443
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1366,11 +1465,11 @@ function init11() {
|
|
|
1366
1465
|
}
|
|
1367
1466
|
|
|
1368
1467
|
// src/extensions/responsive/components/breakpoints-switcher.tsx
|
|
1369
|
-
var
|
|
1468
|
+
var React25 = __toESM(require("react"));
|
|
1370
1469
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
1371
1470
|
var import_icons21 = require("@elementor/icons");
|
|
1372
|
-
var
|
|
1373
|
-
var
|
|
1471
|
+
var import_ui16 = require("@elementor/ui");
|
|
1472
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
1374
1473
|
function BreakpointsSwitcher() {
|
|
1375
1474
|
const breakpoints = (0, import_editor_responsive.useBreakpoints)();
|
|
1376
1475
|
const activeBreakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
|
|
@@ -1392,14 +1491,14 @@ function BreakpointsSwitcher() {
|
|
|
1392
1491
|
}
|
|
1393
1492
|
activateBreakpoint(value);
|
|
1394
1493
|
};
|
|
1395
|
-
return /* @__PURE__ */
|
|
1396
|
-
|
|
1494
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1495
|
+
import_ui16.Tabs,
|
|
1397
1496
|
{
|
|
1398
1497
|
textColor: "inherit",
|
|
1399
1498
|
indicatorColor: "secondary",
|
|
1400
1499
|
value: activeBreakpoint,
|
|
1401
1500
|
onChange,
|
|
1402
|
-
"aria-label": (0,
|
|
1501
|
+
"aria-label": (0, import_i18n24.__)("Switch Device", "elementor"),
|
|
1403
1502
|
sx: {
|
|
1404
1503
|
"& .MuiTabs-indicator": {
|
|
1405
1504
|
backgroundColor: "text.primary"
|
|
@@ -1409,13 +1508,13 @@ function BreakpointsSwitcher() {
|
|
|
1409
1508
|
breakpoints.map(({ id, label, type, width }) => {
|
|
1410
1509
|
const Icon = iconsMap[id];
|
|
1411
1510
|
const title = labelsMap[type || "default"].replace("%s", label).replace("%d", width?.toString() || "");
|
|
1412
|
-
return /* @__PURE__ */
|
|
1413
|
-
|
|
1511
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1512
|
+
import_ui16.Tab,
|
|
1414
1513
|
{
|
|
1415
1514
|
value: id,
|
|
1416
1515
|
key: id,
|
|
1417
1516
|
"aria-label": title,
|
|
1418
|
-
icon: /* @__PURE__ */
|
|
1517
|
+
icon: /* @__PURE__ */ React25.createElement(Tooltip4, { title }, /* @__PURE__ */ React25.createElement(Icon, null)),
|
|
1419
1518
|
sx: { minWidth: "auto" },
|
|
1420
1519
|
"data-testid": `switch-device-to-${id}`
|
|
1421
1520
|
}
|
|
@@ -1424,8 +1523,8 @@ function BreakpointsSwitcher() {
|
|
|
1424
1523
|
);
|
|
1425
1524
|
}
|
|
1426
1525
|
function Tooltip4(props) {
|
|
1427
|
-
return /* @__PURE__ */
|
|
1428
|
-
|
|
1526
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1527
|
+
import_ui16.Tooltip,
|
|
1429
1528
|
{
|
|
1430
1529
|
PopperProps: {
|
|
1431
1530
|
sx: {
|
|
@@ -1450,9 +1549,9 @@ var iconsMap = {
|
|
|
1450
1549
|
var labelsMap = {
|
|
1451
1550
|
default: "%s",
|
|
1452
1551
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1453
|
-
"min-width": (0,
|
|
1552
|
+
"min-width": (0, import_i18n24.__)("%s (%dpx and up)", "elementor"),
|
|
1454
1553
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1455
|
-
"max-width": (0,
|
|
1554
|
+
"max-width": (0, import_i18n24.__)("%s (up to %dpx)", "elementor")
|
|
1456
1555
|
};
|
|
1457
1556
|
|
|
1458
1557
|
// src/extensions/responsive/index.ts
|
|
@@ -1471,12 +1570,12 @@ function init12() {
|
|
|
1471
1570
|
var import_editor = require("@elementor/editor");
|
|
1472
1571
|
|
|
1473
1572
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
1474
|
-
var
|
|
1573
|
+
var React28 = __toESM(require("react"));
|
|
1475
1574
|
|
|
1476
1575
|
// src/extensions/site-settings/components/portal.tsx
|
|
1477
|
-
var
|
|
1576
|
+
var React26 = __toESM(require("react"));
|
|
1478
1577
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
1479
|
-
var
|
|
1578
|
+
var import_ui17 = require("@elementor/ui");
|
|
1480
1579
|
function Portal(props) {
|
|
1481
1580
|
const containerRef = (0, import_editor_v1_adapters13.__privateUseListenTo)(
|
|
1482
1581
|
[(0, import_editor_v1_adapters13.routeOpenEvent)("panel/global"), (0, import_editor_v1_adapters13.routeCloseEvent)("panel/global")],
|
|
@@ -1485,22 +1584,22 @@ function Portal(props) {
|
|
|
1485
1584
|
if (!containerRef.current) {
|
|
1486
1585
|
return null;
|
|
1487
1586
|
}
|
|
1488
|
-
return /* @__PURE__ */
|
|
1587
|
+
return /* @__PURE__ */ React26.createElement(import_ui17.Portal, { container: containerRef.current, ...props });
|
|
1489
1588
|
}
|
|
1490
1589
|
function getContainerRef() {
|
|
1491
1590
|
return (0, import_editor_v1_adapters13.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
|
|
1492
1591
|
}
|
|
1493
1592
|
|
|
1494
1593
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
1495
|
-
var
|
|
1594
|
+
var React27 = __toESM(require("react"));
|
|
1496
1595
|
var import_editor_documents10 = require("@elementor/editor-documents");
|
|
1497
|
-
var
|
|
1498
|
-
var
|
|
1596
|
+
var import_ui18 = require("@elementor/ui");
|
|
1597
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
1499
1598
|
function PrimaryAction2() {
|
|
1500
1599
|
const document2 = (0, import_editor_documents10.__useActiveDocument)();
|
|
1501
1600
|
const { save } = (0, import_editor_documents10.__useActiveDocumentActions)();
|
|
1502
|
-
return /* @__PURE__ */
|
|
1503
|
-
|
|
1601
|
+
return /* @__PURE__ */ React27.createElement(
|
|
1602
|
+
import_ui18.Paper,
|
|
1504
1603
|
{
|
|
1505
1604
|
sx: {
|
|
1506
1605
|
px: 5,
|
|
@@ -1509,8 +1608,8 @@ function PrimaryAction2() {
|
|
|
1509
1608
|
borderColor: "divider"
|
|
1510
1609
|
}
|
|
1511
1610
|
},
|
|
1512
|
-
/* @__PURE__ */
|
|
1513
|
-
|
|
1611
|
+
/* @__PURE__ */ React27.createElement(
|
|
1612
|
+
import_ui18.Button,
|
|
1514
1613
|
{
|
|
1515
1614
|
variant: "contained",
|
|
1516
1615
|
disabled: !document2 || !document2.isDirty,
|
|
@@ -1518,26 +1617,26 @@ function PrimaryAction2() {
|
|
|
1518
1617
|
sx: { width: "100%" },
|
|
1519
1618
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
1520
1619
|
},
|
|
1521
|
-
document2?.isSaving ? /* @__PURE__ */
|
|
1620
|
+
document2?.isSaving ? /* @__PURE__ */ React27.createElement(import_ui18.CircularProgress, null) : (0, import_i18n25.__)("Save Changes", "elementor")
|
|
1522
1621
|
)
|
|
1523
1622
|
);
|
|
1524
1623
|
}
|
|
1525
1624
|
|
|
1526
1625
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
1527
1626
|
function PortalledPrimaryAction() {
|
|
1528
|
-
return /* @__PURE__ */
|
|
1627
|
+
return /* @__PURE__ */ React28.createElement(Portal, null, /* @__PURE__ */ React28.createElement(PrimaryAction2, null));
|
|
1529
1628
|
}
|
|
1530
1629
|
|
|
1531
1630
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
1532
1631
|
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
1533
1632
|
var import_icons22 = require("@elementor/icons");
|
|
1534
|
-
var
|
|
1633
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
1535
1634
|
function useActionProps9() {
|
|
1536
1635
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters14.__privateUseRouteStatus)("panel/global", {
|
|
1537
1636
|
blockOnKitRoutes: false
|
|
1538
1637
|
});
|
|
1539
1638
|
return {
|
|
1540
|
-
title: (0,
|
|
1639
|
+
title: (0, import_i18n26.__)("Site Settings", "elementor"),
|
|
1541
1640
|
icon: import_icons22.SettingsIcon,
|
|
1542
1641
|
onClick: () => {
|
|
1543
1642
|
const extendedWindow = window;
|
|
@@ -1578,11 +1677,11 @@ function init13() {
|
|
|
1578
1677
|
// src/extensions/structure/hooks/use-action-props.ts
|
|
1579
1678
|
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
1580
1679
|
var import_icons23 = require("@elementor/icons");
|
|
1581
|
-
var
|
|
1680
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
1582
1681
|
function useActionProps10() {
|
|
1583
1682
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters15.__privateUseRouteStatus)("navigator");
|
|
1584
1683
|
return {
|
|
1585
|
-
title: (0,
|
|
1684
|
+
title: (0, import_i18n27.__)("Structure", "elementor"),
|
|
1586
1685
|
icon: import_icons23.StructureIcon,
|
|
1587
1686
|
onClick: () => {
|
|
1588
1687
|
const extendedWindow = window;
|
|
@@ -1614,11 +1713,11 @@ function init14() {
|
|
|
1614
1713
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1615
1714
|
var import_editor_v1_adapters16 = require("@elementor/editor-v1-adapters");
|
|
1616
1715
|
var import_icons24 = require("@elementor/icons");
|
|
1617
|
-
var
|
|
1716
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
1618
1717
|
function useActionProps11() {
|
|
1619
1718
|
return {
|
|
1620
1719
|
icon: import_icons24.ThemeBuilderIcon,
|
|
1621
|
-
title: (0,
|
|
1720
|
+
title: (0, import_i18n28.__)("Theme Builder", "elementor"),
|
|
1622
1721
|
onClick: () => {
|
|
1623
1722
|
const extendedWindow = window;
|
|
1624
1723
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1648,12 +1747,12 @@ function init15() {
|
|
|
1648
1747
|
// src/extensions/user-preferences/hooks/use-action-props.ts
|
|
1649
1748
|
var import_editor_v1_adapters17 = require("@elementor/editor-v1-adapters");
|
|
1650
1749
|
var import_icons25 = require("@elementor/icons");
|
|
1651
|
-
var
|
|
1750
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
1652
1751
|
function useActionProps12() {
|
|
1653
1752
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters17.__privateUseRouteStatus)("panel/editor-preferences");
|
|
1654
1753
|
return {
|
|
1655
1754
|
icon: import_icons25.ToggleRightIcon,
|
|
1656
|
-
title: (0,
|
|
1755
|
+
title: (0, import_i18n29.__)("User Preferences", "elementor"),
|
|
1657
1756
|
onClick: () => {
|
|
1658
1757
|
const extendedWindow = window;
|
|
1659
1758
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1685,7 +1784,7 @@ function init16() {
|
|
|
1685
1784
|
// src/extensions/wordpress/index.ts
|
|
1686
1785
|
var import_editor_documents11 = require("@elementor/editor-documents");
|
|
1687
1786
|
var import_icons26 = require("@elementor/icons");
|
|
1688
|
-
var
|
|
1787
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
1689
1788
|
function init17() {
|
|
1690
1789
|
mainMenu.registerLink({
|
|
1691
1790
|
id: "exit-to-wordpress",
|
|
@@ -1694,7 +1793,7 @@ function init17() {
|
|
|
1694
1793
|
useProps: () => {
|
|
1695
1794
|
const document2 = (0, import_editor_documents11.__useActiveDocument)();
|
|
1696
1795
|
return {
|
|
1697
|
-
title: (0,
|
|
1796
|
+
title: (0, import_i18n30.__)("Exit to WordPress", "elementor"),
|
|
1698
1797
|
href: document2?.links?.platformEdit,
|
|
1699
1798
|
icon: import_icons26.WordpressIcon,
|
|
1700
1799
|
onClick: () => {
|