@elementor/editor-app-bar 4.1.0-838 → 4.1.0-beta1
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 +290 -176
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +272 -158
- 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 +20 -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,23 +557,23 @@ 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:
|
|
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());
|
|
463
575
|
setFeedbackResult(null);
|
|
464
|
-
|
|
576
|
+
trackEvent2("feedback_modal_opened", {
|
|
465
577
|
source: "top_bar",
|
|
466
578
|
context: "v4_beta"
|
|
467
579
|
});
|
|
@@ -470,13 +582,13 @@ function SendFeedbackPopupLocation() {
|
|
|
470
582
|
return () => {
|
|
471
583
|
window.removeEventListener(FEEDBACK_TOGGLE_EVENT, handler);
|
|
472
584
|
};
|
|
473
|
-
}, [popupState,
|
|
474
|
-
(0,
|
|
585
|
+
}, [popupState, trackEvent2]);
|
|
586
|
+
(0, import_react4.useEffect)(() => {
|
|
475
587
|
setSubmitDisabled(feedbackContent.trim().length < 10 || !isUserConnected || isFetching);
|
|
476
588
|
}, [feedbackContent, feedbackResult, isUserConnected, isFetching]);
|
|
477
589
|
const handleClose = () => {
|
|
478
590
|
popupState.close();
|
|
479
|
-
|
|
591
|
+
trackEvent2("feedback_modal_closed", {
|
|
480
592
|
feedback_text: feedbackContent
|
|
481
593
|
});
|
|
482
594
|
};
|
|
@@ -496,7 +608,7 @@ function SendFeedbackPopupLocation() {
|
|
|
496
608
|
if (!response.data.success && response.data.code.toString() === "401" || response.data.code.toString() === "403") {
|
|
497
609
|
setIsUserConnected(false);
|
|
498
610
|
}
|
|
499
|
-
|
|
611
|
+
trackEvent2(response.data.success ? "feedback_submitted" : "feedback_error", {
|
|
500
612
|
feedback_length: feedbackContent.length,
|
|
501
613
|
error_type: response.data.success ? void 0 : "server",
|
|
502
614
|
error_message: response.data.success ? void 0 : response.data.message
|
|
@@ -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,40 +692,42 @@ 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
|
|
705
|
+
var import_react6 = require("react");
|
|
593
706
|
var import_editor_mcp = require("@elementor/editor-mcp");
|
|
707
|
+
var import_events3 = require("@elementor/events");
|
|
594
708
|
var import_icons5 = require("@elementor/icons");
|
|
595
|
-
var
|
|
596
|
-
var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
|
|
597
|
-
var CREATE_WIDGET_PROMPT = `Create a widget for me.
|
|
598
|
-
Goal: [What should this widget help me accomplish?]
|
|
599
|
-
Placement: [Where will I see it in the editor/UI?]
|
|
600
|
-
How it should work: `;
|
|
709
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
601
710
|
function useActionProps() {
|
|
711
|
+
const hasAngieInstalled = (0, import_editor_mcp.isAngieAvailable)();
|
|
712
|
+
const visible = !hasAngieInstalled;
|
|
713
|
+
(0, import_react6.useEffect)(() => {
|
|
714
|
+
if (!visible) {
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
(0, import_events3.trackEvent)({
|
|
718
|
+
eventName: AI_WIDGET_CTA_VIEWED_EVENT,
|
|
719
|
+
entry_point: "top_bar_icon",
|
|
720
|
+
has_angie_installed: false
|
|
721
|
+
});
|
|
722
|
+
}, [visible]);
|
|
602
723
|
return {
|
|
603
|
-
title: (0,
|
|
724
|
+
title: (0, import_i18n7.__)("Angie", "elementor"),
|
|
604
725
|
icon: import_icons5.AngieIcon,
|
|
605
726
|
onClick: () => {
|
|
606
|
-
window.dispatchEvent(
|
|
607
|
-
new CustomEvent(CREATE_WIDGET_EVENT, {
|
|
608
|
-
detail: {
|
|
609
|
-
prompt: CREATE_WIDGET_PROMPT,
|
|
610
|
-
entry_point: "top_bar"
|
|
611
|
-
}
|
|
612
|
-
})
|
|
613
|
-
);
|
|
727
|
+
window.dispatchEvent(new CustomEvent(ANGIE_GUIDE_TOGGLE_EVENT));
|
|
614
728
|
},
|
|
615
729
|
selected: false,
|
|
616
|
-
visible
|
|
730
|
+
visible
|
|
617
731
|
};
|
|
618
732
|
}
|
|
619
733
|
|
|
@@ -627,9 +741,9 @@ function init() {
|
|
|
627
741
|
}
|
|
628
742
|
|
|
629
743
|
// src/extensions/connect/hooks/use-connect-link-config.tsx
|
|
630
|
-
var
|
|
744
|
+
var import_react7 = require("react");
|
|
631
745
|
var import_icons6 = require("@elementor/icons");
|
|
632
|
-
var
|
|
746
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
633
747
|
var dispatchConnectClickEvent = (eventName) => {
|
|
634
748
|
try {
|
|
635
749
|
const extendedWindow = window;
|
|
@@ -657,7 +771,7 @@ function useConnectLinkConfig() {
|
|
|
657
771
|
isUserConnected = extendedWindow?.elementorCommon?.config.library_connect.is_connected ?? false;
|
|
658
772
|
target = "_self";
|
|
659
773
|
}
|
|
660
|
-
const handleConnectClick = (0,
|
|
774
|
+
const handleConnectClick = (0, import_react7.useCallback)(
|
|
661
775
|
(event) => {
|
|
662
776
|
event.preventDefault();
|
|
663
777
|
if (extendedWindow.jQuery && extendedWindow.jQuery.fn?.elementorConnect) {
|
|
@@ -682,12 +796,12 @@ function useConnectLinkConfig() {
|
|
|
682
796
|
[extendedWindow]
|
|
683
797
|
);
|
|
684
798
|
return isUserConnected ? {
|
|
685
|
-
title: (0,
|
|
799
|
+
title: (0, import_i18n8.__)("My Elementor", "elementor"),
|
|
686
800
|
href: extendedWindow?.elementor?.config.user.top_bar.my_elementor_url,
|
|
687
801
|
icon: import_icons6.UserIcon,
|
|
688
802
|
target: "_blank"
|
|
689
803
|
} : {
|
|
690
|
-
title: (0,
|
|
804
|
+
title: (0, import_i18n8.__)("Connect my account", "elementor"),
|
|
691
805
|
href: extendedWindow?.elementor?.config.user.top_bar.connect_url,
|
|
692
806
|
icon: import_icons6.UserIcon,
|
|
693
807
|
target,
|
|
@@ -709,12 +823,12 @@ function init2() {
|
|
|
709
823
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
710
824
|
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
711
825
|
var import_icons7 = require("@elementor/icons");
|
|
712
|
-
var
|
|
826
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
713
827
|
function useActionProps2() {
|
|
714
828
|
const document2 = (0, import_editor_documents2.__useActiveDocument)();
|
|
715
829
|
return {
|
|
716
830
|
icon: import_icons7.EyeIcon,
|
|
717
|
-
title: (0,
|
|
831
|
+
title: (0, import_i18n9.__)("Preview Changes", "elementor"),
|
|
718
832
|
onClick: () => {
|
|
719
833
|
const extendedWindow = window;
|
|
720
834
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -746,18 +860,18 @@ function init3() {
|
|
|
746
860
|
}
|
|
747
861
|
|
|
748
862
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
749
|
-
var
|
|
863
|
+
var React24 = __toESM(require("react"));
|
|
750
864
|
var import_editor_documents3 = require("@elementor/editor-documents");
|
|
751
865
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
752
866
|
var import_icons8 = require("@elementor/icons");
|
|
753
|
-
var
|
|
754
|
-
var
|
|
867
|
+
var import_ui15 = require("@elementor/ui");
|
|
868
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
755
869
|
|
|
756
870
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
757
|
-
var
|
|
758
|
-
var
|
|
871
|
+
var React23 = __toESM(require("react"));
|
|
872
|
+
var import_ui14 = require("@elementor/ui");
|
|
759
873
|
var { useMenuItems: useMenuItems5 } = documentOptionsMenu;
|
|
760
|
-
var StyledPopoverMenu = (0,
|
|
874
|
+
var StyledPopoverMenu = (0, import_ui14.styled)(PopoverMenu)`
|
|
761
875
|
& > .MuiPopover-paper > .MuiList-root {
|
|
762
876
|
& > .MuiDivider-root {
|
|
763
877
|
display: none;
|
|
@@ -770,7 +884,7 @@ var StyledPopoverMenu = (0, import_ui12.styled)(PopoverMenu)`
|
|
|
770
884
|
`;
|
|
771
885
|
function PrimaryActionMenu(props) {
|
|
772
886
|
const { save: saveActions, default: defaultActions } = useMenuItems5();
|
|
773
|
-
return /* @__PURE__ */
|
|
887
|
+
return /* @__PURE__ */ React23.createElement(
|
|
774
888
|
StyledPopoverMenu,
|
|
775
889
|
{
|
|
776
890
|
...props,
|
|
@@ -788,13 +902,13 @@ function PrimaryActionMenu(props) {
|
|
|
788
902
|
}
|
|
789
903
|
},
|
|
790
904
|
saveActions.map(({ MenuItem: MenuItem2, id }, index) => [
|
|
791
|
-
index > 0 && /* @__PURE__ */
|
|
792
|
-
/* @__PURE__ */
|
|
905
|
+
index > 0 && /* @__PURE__ */ React23.createElement(import_ui14.Divider, { key: `${id}-divider` }),
|
|
906
|
+
/* @__PURE__ */ React23.createElement(MenuItem2, { key: id })
|
|
793
907
|
]),
|
|
794
|
-
saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */
|
|
908
|
+
saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */ React23.createElement(import_ui14.Divider, null),
|
|
795
909
|
defaultActions.map(({ MenuItem: MenuItem2, id }, index) => [
|
|
796
|
-
index > 0 && /* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */
|
|
910
|
+
index > 0 && /* @__PURE__ */ React23.createElement(import_ui14.Divider, { key: `${id}-divider` }),
|
|
911
|
+
/* @__PURE__ */ React23.createElement(MenuItem2, { key: id })
|
|
798
912
|
])
|
|
799
913
|
);
|
|
800
914
|
}
|
|
@@ -805,7 +919,7 @@ function PrimaryAction() {
|
|
|
805
919
|
const { save } = (0, import_editor_documents3.__useActiveDocumentActions)();
|
|
806
920
|
const editMode = (0, import_editor_v1_adapters3.useEditMode)();
|
|
807
921
|
const isEditMode = editMode === "edit";
|
|
808
|
-
const popupState = (0,
|
|
922
|
+
const popupState = (0, import_ui15.usePopupState)({
|
|
809
923
|
variant: "popover",
|
|
810
924
|
popupId: "document-save-options"
|
|
811
925
|
});
|
|
@@ -815,8 +929,8 @@ function PrimaryAction() {
|
|
|
815
929
|
const isPublishDisabled = !isEditMode || !isPublishEnabled(document2);
|
|
816
930
|
const isSaveOptionsDisabled = !isEditMode || document2.type.value === "kit";
|
|
817
931
|
const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
|
|
818
|
-
return /* @__PURE__ */
|
|
819
|
-
|
|
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,
|
|
820
934
|
{
|
|
821
935
|
onClick: () => {
|
|
822
936
|
const extendedWindow = window;
|
|
@@ -846,11 +960,11 @@ function PrimaryAction() {
|
|
|
846
960
|
},
|
|
847
961
|
disabled: isPublishDisabled
|
|
848
962
|
},
|
|
849
|
-
shouldShowSpinner ? /* @__PURE__ */
|
|
850
|
-
), /* @__PURE__ */
|
|
851
|
-
|
|
963
|
+
shouldShowSpinner ? /* @__PURE__ */ React24.createElement(import_ui15.CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
|
|
964
|
+
), /* @__PURE__ */ React24.createElement(
|
|
965
|
+
import_ui15.Tooltip,
|
|
852
966
|
{
|
|
853
|
-
title: (0,
|
|
967
|
+
title: (0, import_i18n10.__)("Save Options", "elementor"),
|
|
854
968
|
PopperProps: {
|
|
855
969
|
sx: {
|
|
856
970
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -860,21 +974,21 @@ function PrimaryAction() {
|
|
|
860
974
|
}
|
|
861
975
|
}
|
|
862
976
|
},
|
|
863
|
-
/* @__PURE__ */
|
|
864
|
-
|
|
977
|
+
/* @__PURE__ */ React24.createElement(import_ui15.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React24.createElement(
|
|
978
|
+
import_ui15.Button,
|
|
865
979
|
{
|
|
866
980
|
size: "small",
|
|
867
|
-
...(0,
|
|
981
|
+
...(0, import_ui15.bindTrigger)(popupState),
|
|
868
982
|
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
869
983
|
disabled: isSaveOptionsDisabled,
|
|
870
|
-
"aria-label": (0,
|
|
984
|
+
"aria-label": (0, import_i18n10.__)("Save Options", "elementor")
|
|
871
985
|
},
|
|
872
|
-
/* @__PURE__ */
|
|
986
|
+
/* @__PURE__ */ React24.createElement(import_icons8.ChevronDownIcon, null)
|
|
873
987
|
))
|
|
874
|
-
)), /* @__PURE__ */
|
|
988
|
+
)), /* @__PURE__ */ React24.createElement(PrimaryActionMenu, { ...(0, import_ui15.bindMenu)(popupState), onClick: popupState.close }));
|
|
875
989
|
}
|
|
876
990
|
function getLabel(document2) {
|
|
877
|
-
return document2.userCan.publish ? (0,
|
|
991
|
+
return document2.userCan.publish ? (0, import_i18n10.__)("Publish", "elementor") : (0, import_i18n10.__)("Submit", "elementor");
|
|
878
992
|
}
|
|
879
993
|
function isPublishEnabled(document2) {
|
|
880
994
|
if (document2.type.value === "kit") {
|
|
@@ -885,16 +999,16 @@ function isPublishEnabled(document2) {
|
|
|
885
999
|
|
|
886
1000
|
// src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
|
|
887
1001
|
var import_editor_documents4 = require("@elementor/editor-documents");
|
|
888
|
-
var
|
|
1002
|
+
var import_events4 = require("@elementor/events");
|
|
889
1003
|
var import_icons9 = require("@elementor/icons");
|
|
890
|
-
var
|
|
1004
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
891
1005
|
function useDocumentCopyAndShareProps() {
|
|
892
1006
|
const document2 = (0, import_editor_documents4.__useActiveDocument)();
|
|
893
1007
|
const { copyAndShare } = (0, import_editor_documents4.__useActiveDocumentActions)();
|
|
894
|
-
const { dispatchEvent: dispatchEvent2, config } = (0,
|
|
1008
|
+
const { dispatchEvent: dispatchEvent2, config } = (0, import_events4.useMixpanel)();
|
|
895
1009
|
return {
|
|
896
1010
|
icon: import_icons9.LinkIcon,
|
|
897
|
-
title: (0,
|
|
1011
|
+
title: (0, import_i18n11.__)("Copy and Share", "elementor"),
|
|
898
1012
|
onClick: () => {
|
|
899
1013
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
900
1014
|
if (eventName) {
|
|
@@ -919,16 +1033,16 @@ function useDocumentCopyAndShareProps() {
|
|
|
919
1033
|
|
|
920
1034
|
// src/extensions/documents-save/hooks/use-document-save-draft-props.ts
|
|
921
1035
|
var import_editor_documents5 = require("@elementor/editor-documents");
|
|
922
|
-
var
|
|
1036
|
+
var import_events5 = require("@elementor/events");
|
|
923
1037
|
var import_icons10 = require("@elementor/icons");
|
|
924
|
-
var
|
|
1038
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
925
1039
|
function useDocumentSaveDraftProps() {
|
|
926
1040
|
const document2 = (0, import_editor_documents5.__useActiveDocument)();
|
|
927
1041
|
const { saveDraft } = (0, import_editor_documents5.__useActiveDocumentActions)();
|
|
928
|
-
const { dispatchEvent: dispatchEvent2, config } = (0,
|
|
1042
|
+
const { dispatchEvent: dispatchEvent2, config } = (0, import_events5.useMixpanel)();
|
|
929
1043
|
return {
|
|
930
1044
|
icon: import_icons10.FileReportIcon,
|
|
931
|
-
title: (0,
|
|
1045
|
+
title: (0, import_i18n12.__)("Save Draft", "elementor"),
|
|
932
1046
|
onClick: () => {
|
|
933
1047
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
934
1048
|
if (eventName) {
|
|
@@ -952,15 +1066,15 @@ function useDocumentSaveDraftProps() {
|
|
|
952
1066
|
|
|
953
1067
|
// src/extensions/documents-save/hooks/use-document-save-template-props.ts
|
|
954
1068
|
var import_editor_documents6 = require("@elementor/editor-documents");
|
|
955
|
-
var
|
|
1069
|
+
var import_events6 = require("@elementor/events");
|
|
956
1070
|
var import_icons11 = require("@elementor/icons");
|
|
957
|
-
var
|
|
1071
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
958
1072
|
function useDocumentSaveTemplateProps() {
|
|
959
1073
|
const { saveTemplate } = (0, import_editor_documents6.__useActiveDocumentActions)();
|
|
960
|
-
const { dispatchEvent: dispatchEvent2, config } = (0,
|
|
1074
|
+
const { dispatchEvent: dispatchEvent2, config } = (0, import_events6.useMixpanel)();
|
|
961
1075
|
return {
|
|
962
1076
|
icon: import_icons11.FolderIcon,
|
|
963
|
-
title: (0,
|
|
1077
|
+
title: (0, import_i18n13.__)("Save as Template", "elementor"),
|
|
964
1078
|
onClick: () => {
|
|
965
1079
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
966
1080
|
if (eventName) {
|
|
@@ -985,12 +1099,12 @@ function useDocumentSaveTemplateProps() {
|
|
|
985
1099
|
var import_editor_documents7 = require("@elementor/editor-documents");
|
|
986
1100
|
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
987
1101
|
var import_icons12 = require("@elementor/icons");
|
|
988
|
-
var
|
|
1102
|
+
var import_i18n14 = require("@wordpress/i18n");
|
|
989
1103
|
function useDocumentViewAsMarkdownProps() {
|
|
990
1104
|
const document2 = (0, import_editor_documents7.__useActiveDocument)();
|
|
991
1105
|
return {
|
|
992
1106
|
icon: import_icons12.EyeIcon,
|
|
993
|
-
title: (0,
|
|
1107
|
+
title: (0, import_i18n14.__)("View as Markdown", "elementor"),
|
|
994
1108
|
onClick: async () => {
|
|
995
1109
|
const baseUrl = document2?.links?.wpPreview || document2?.links?.permalink;
|
|
996
1110
|
if (!baseUrl) {
|
|
@@ -1009,15 +1123,15 @@ function useDocumentViewAsMarkdownProps() {
|
|
|
1009
1123
|
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
1010
1124
|
var import_editor_documents8 = require("@elementor/editor-documents");
|
|
1011
1125
|
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
1012
|
-
var
|
|
1126
|
+
var import_events7 = require("@elementor/events");
|
|
1013
1127
|
var import_icons13 = require("@elementor/icons");
|
|
1014
|
-
var
|
|
1128
|
+
var import_i18n15 = require("@wordpress/i18n");
|
|
1015
1129
|
function useDocumentViewPageProps() {
|
|
1016
1130
|
const document2 = (0, import_editor_documents8.__useActiveDocument)();
|
|
1017
|
-
const { dispatchEvent: dispatchEvent2, config } = (0,
|
|
1131
|
+
const { dispatchEvent: dispatchEvent2, config } = (0, import_events7.useMixpanel)();
|
|
1018
1132
|
return {
|
|
1019
1133
|
icon: import_icons13.EyeIcon,
|
|
1020
|
-
title: (0,
|
|
1134
|
+
title: (0, import_i18n15.__)("View Page", "elementor"),
|
|
1021
1135
|
onClick: () => {
|
|
1022
1136
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
1023
1137
|
if (eventName) {
|
|
@@ -1081,7 +1195,7 @@ function init4() {
|
|
|
1081
1195
|
var import_editor_documents9 = require("@elementor/editor-documents");
|
|
1082
1196
|
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
1083
1197
|
var import_icons14 = require("@elementor/icons");
|
|
1084
|
-
var
|
|
1198
|
+
var import_i18n16 = require("@wordpress/i18n");
|
|
1085
1199
|
function useActionProps3() {
|
|
1086
1200
|
const activeDocument = (0, import_editor_documents9.__useActiveDocument)();
|
|
1087
1201
|
const hostDocument = (0, import_editor_documents9.__useHostDocument)();
|
|
@@ -1089,8 +1203,8 @@ function useActionProps3() {
|
|
|
1089
1203
|
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
1090
1204
|
const ButtonTitle = document2 ? (
|
|
1091
1205
|
/* translators: %s: Post type label. */
|
|
1092
|
-
(0,
|
|
1093
|
-
) : (0,
|
|
1206
|
+
(0, import_i18n16.__)("%s Settings", "elementor").replace("%s", document2.type.label)
|
|
1207
|
+
) : (0, import_i18n16.__)("Document Settings", "elementor");
|
|
1094
1208
|
return {
|
|
1095
1209
|
title: ButtonTitle,
|
|
1096
1210
|
icon: import_icons14.FileSettingsIcon,
|
|
@@ -1127,11 +1241,11 @@ function init5() {
|
|
|
1127
1241
|
// src/extensions/elements/hooks/use-action-props.ts
|
|
1128
1242
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
1129
1243
|
var import_icons15 = require("@elementor/icons");
|
|
1130
|
-
var
|
|
1244
|
+
var import_i18n17 = require("@wordpress/i18n");
|
|
1131
1245
|
function useActionProps4() {
|
|
1132
1246
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters7.__privateUseRouteStatus)("panel/elements");
|
|
1133
1247
|
return {
|
|
1134
|
-
title: (0,
|
|
1248
|
+
title: (0, import_i18n17.__)("Add Element", "elementor"),
|
|
1135
1249
|
icon: import_icons15.PlusIcon,
|
|
1136
1250
|
onClick: () => {
|
|
1137
1251
|
const extendedWindow = window;
|
|
@@ -1153,10 +1267,10 @@ function useActionProps4() {
|
|
|
1153
1267
|
|
|
1154
1268
|
// src/extensions/elements/sync/sync-panel-title.ts
|
|
1155
1269
|
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
1156
|
-
var
|
|
1270
|
+
var import_i18n18 = require("@wordpress/i18n");
|
|
1157
1271
|
function syncPanelTitle() {
|
|
1158
|
-
const panelTitle = (0,
|
|
1159
|
-
const tabTitle = (0,
|
|
1272
|
+
const panelTitle = (0, import_i18n18.__)("Elements", "elementor");
|
|
1273
|
+
const tabTitle = (0, import_i18n18.__)("Widgets", "elementor");
|
|
1160
1274
|
(0, import_editor_v1_adapters8.__privateListenTo)((0, import_editor_v1_adapters8.routeOpenEvent)("panel/elements"), () => {
|
|
1161
1275
|
setPanelTitle(panelTitle);
|
|
1162
1276
|
setTabTitle(tabTitle);
|
|
@@ -1191,7 +1305,7 @@ function init6() {
|
|
|
1191
1305
|
// src/extensions/feedback/index.ts
|
|
1192
1306
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
1193
1307
|
var import_icons16 = require("@elementor/icons");
|
|
1194
|
-
var
|
|
1308
|
+
var import_i18n19 = require("@wordpress/i18n");
|
|
1195
1309
|
function init7() {
|
|
1196
1310
|
const isActive = (0, import_editor_v1_adapters9.isExperimentActive)(EXPERIMENT_NAME);
|
|
1197
1311
|
if (!isActive) {
|
|
@@ -1204,7 +1318,7 @@ function init7() {
|
|
|
1204
1318
|
useProps: () => {
|
|
1205
1319
|
return {
|
|
1206
1320
|
icon: import_icons16.MessageLinesIcon,
|
|
1207
|
-
title: (0,
|
|
1321
|
+
title: (0, import_i18n19.__)("Send Feedback", "elementor"),
|
|
1208
1322
|
onClick: () => {
|
|
1209
1323
|
dispatchEvent(new CustomEvent(FEEDBACK_TOGGLE_EVENT));
|
|
1210
1324
|
}
|
|
@@ -1216,10 +1330,10 @@ function init7() {
|
|
|
1216
1330
|
// src/extensions/finder/hooks/use-action-props.ts
|
|
1217
1331
|
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
1218
1332
|
var import_icons17 = require("@elementor/icons");
|
|
1219
|
-
var
|
|
1333
|
+
var import_i18n20 = require("@wordpress/i18n");
|
|
1220
1334
|
function useActionProps5() {
|
|
1221
1335
|
return {
|
|
1222
|
-
title: (0,
|
|
1336
|
+
title: (0, import_i18n20.__)("Finder", "elementor"),
|
|
1223
1337
|
icon: import_icons17.SearchIcon,
|
|
1224
1338
|
onClick: () => {
|
|
1225
1339
|
const extendedWindow = window;
|
|
@@ -1248,10 +1362,10 @@ function init8() {
|
|
|
1248
1362
|
|
|
1249
1363
|
// src/extensions/help/hooks/use-action-props.ts
|
|
1250
1364
|
var import_icons18 = require("@elementor/icons");
|
|
1251
|
-
var
|
|
1365
|
+
var import_i18n21 = require("@wordpress/i18n");
|
|
1252
1366
|
function useActionProps6() {
|
|
1253
1367
|
return {
|
|
1254
|
-
title: (0,
|
|
1368
|
+
title: (0, import_i18n21.__)("Help Center", "elementor"),
|
|
1255
1369
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
1256
1370
|
icon: import_icons18.HelpIcon,
|
|
1257
1371
|
target: "_blank",
|
|
@@ -1283,11 +1397,11 @@ function init9() {
|
|
|
1283
1397
|
// src/extensions/history/hooks/use-action-props.ts
|
|
1284
1398
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
1285
1399
|
var import_icons19 = require("@elementor/icons");
|
|
1286
|
-
var
|
|
1400
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
1287
1401
|
function useActionProps7() {
|
|
1288
1402
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters11.__privateUseRouteStatus)("panel/history");
|
|
1289
1403
|
return {
|
|
1290
|
-
title: (0,
|
|
1404
|
+
title: (0, import_i18n22.__)("History", "elementor"),
|
|
1291
1405
|
icon: import_icons19.HistoryIcon,
|
|
1292
1406
|
onClick: () => {
|
|
1293
1407
|
const extendedWindow = window;
|
|
@@ -1319,11 +1433,11 @@ function init10() {
|
|
|
1319
1433
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
1320
1434
|
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
1321
1435
|
var import_icons20 = require("@elementor/icons");
|
|
1322
|
-
var
|
|
1436
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
1323
1437
|
function useActionProps8() {
|
|
1324
1438
|
return {
|
|
1325
1439
|
icon: import_icons20.KeyboardIcon,
|
|
1326
|
-
title: (0,
|
|
1440
|
+
title: (0, import_i18n23.__)("Keyboard Shortcuts", "elementor"),
|
|
1327
1441
|
onClick: () => {
|
|
1328
1442
|
const extendedWindow = window;
|
|
1329
1443
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1351,11 +1465,11 @@ function init11() {
|
|
|
1351
1465
|
}
|
|
1352
1466
|
|
|
1353
1467
|
// src/extensions/responsive/components/breakpoints-switcher.tsx
|
|
1354
|
-
var
|
|
1468
|
+
var React25 = __toESM(require("react"));
|
|
1355
1469
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
1356
1470
|
var import_icons21 = require("@elementor/icons");
|
|
1357
|
-
var
|
|
1358
|
-
var
|
|
1471
|
+
var import_ui16 = require("@elementor/ui");
|
|
1472
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
1359
1473
|
function BreakpointsSwitcher() {
|
|
1360
1474
|
const breakpoints = (0, import_editor_responsive.useBreakpoints)();
|
|
1361
1475
|
const activeBreakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
|
|
@@ -1377,14 +1491,14 @@ function BreakpointsSwitcher() {
|
|
|
1377
1491
|
}
|
|
1378
1492
|
activateBreakpoint(value);
|
|
1379
1493
|
};
|
|
1380
|
-
return /* @__PURE__ */
|
|
1381
|
-
|
|
1494
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1495
|
+
import_ui16.Tabs,
|
|
1382
1496
|
{
|
|
1383
1497
|
textColor: "inherit",
|
|
1384
1498
|
indicatorColor: "secondary",
|
|
1385
1499
|
value: activeBreakpoint,
|
|
1386
1500
|
onChange,
|
|
1387
|
-
"aria-label": (0,
|
|
1501
|
+
"aria-label": (0, import_i18n24.__)("Switch Device", "elementor"),
|
|
1388
1502
|
sx: {
|
|
1389
1503
|
"& .MuiTabs-indicator": {
|
|
1390
1504
|
backgroundColor: "text.primary"
|
|
@@ -1394,13 +1508,13 @@ function BreakpointsSwitcher() {
|
|
|
1394
1508
|
breakpoints.map(({ id, label, type, width }) => {
|
|
1395
1509
|
const Icon = iconsMap[id];
|
|
1396
1510
|
const title = labelsMap[type || "default"].replace("%s", label).replace("%d", width?.toString() || "");
|
|
1397
|
-
return /* @__PURE__ */
|
|
1398
|
-
|
|
1511
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1512
|
+
import_ui16.Tab,
|
|
1399
1513
|
{
|
|
1400
1514
|
value: id,
|
|
1401
1515
|
key: id,
|
|
1402
1516
|
"aria-label": title,
|
|
1403
|
-
icon: /* @__PURE__ */
|
|
1517
|
+
icon: /* @__PURE__ */ React25.createElement(Tooltip4, { title }, /* @__PURE__ */ React25.createElement(Icon, null)),
|
|
1404
1518
|
sx: { minWidth: "auto" },
|
|
1405
1519
|
"data-testid": `switch-device-to-${id}`
|
|
1406
1520
|
}
|
|
@@ -1409,8 +1523,8 @@ function BreakpointsSwitcher() {
|
|
|
1409
1523
|
);
|
|
1410
1524
|
}
|
|
1411
1525
|
function Tooltip4(props) {
|
|
1412
|
-
return /* @__PURE__ */
|
|
1413
|
-
|
|
1526
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1527
|
+
import_ui16.Tooltip,
|
|
1414
1528
|
{
|
|
1415
1529
|
PopperProps: {
|
|
1416
1530
|
sx: {
|
|
@@ -1435,9 +1549,9 @@ var iconsMap = {
|
|
|
1435
1549
|
var labelsMap = {
|
|
1436
1550
|
default: "%s",
|
|
1437
1551
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1438
|
-
"min-width": (0,
|
|
1552
|
+
"min-width": (0, import_i18n24.__)("%s (%dpx and up)", "elementor"),
|
|
1439
1553
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1440
|
-
"max-width": (0,
|
|
1554
|
+
"max-width": (0, import_i18n24.__)("%s (up to %dpx)", "elementor")
|
|
1441
1555
|
};
|
|
1442
1556
|
|
|
1443
1557
|
// src/extensions/responsive/index.ts
|
|
@@ -1456,12 +1570,12 @@ function init12() {
|
|
|
1456
1570
|
var import_editor = require("@elementor/editor");
|
|
1457
1571
|
|
|
1458
1572
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
1459
|
-
var
|
|
1573
|
+
var React28 = __toESM(require("react"));
|
|
1460
1574
|
|
|
1461
1575
|
// src/extensions/site-settings/components/portal.tsx
|
|
1462
|
-
var
|
|
1576
|
+
var React26 = __toESM(require("react"));
|
|
1463
1577
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
1464
|
-
var
|
|
1578
|
+
var import_ui17 = require("@elementor/ui");
|
|
1465
1579
|
function Portal(props) {
|
|
1466
1580
|
const containerRef = (0, import_editor_v1_adapters13.__privateUseListenTo)(
|
|
1467
1581
|
[(0, import_editor_v1_adapters13.routeOpenEvent)("panel/global"), (0, import_editor_v1_adapters13.routeCloseEvent)("panel/global")],
|
|
@@ -1470,22 +1584,22 @@ function Portal(props) {
|
|
|
1470
1584
|
if (!containerRef.current) {
|
|
1471
1585
|
return null;
|
|
1472
1586
|
}
|
|
1473
|
-
return /* @__PURE__ */
|
|
1587
|
+
return /* @__PURE__ */ React26.createElement(import_ui17.Portal, { container: containerRef.current, ...props });
|
|
1474
1588
|
}
|
|
1475
1589
|
function getContainerRef() {
|
|
1476
1590
|
return (0, import_editor_v1_adapters13.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
|
|
1477
1591
|
}
|
|
1478
1592
|
|
|
1479
1593
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
1480
|
-
var
|
|
1594
|
+
var React27 = __toESM(require("react"));
|
|
1481
1595
|
var import_editor_documents10 = require("@elementor/editor-documents");
|
|
1482
|
-
var
|
|
1483
|
-
var
|
|
1596
|
+
var import_ui18 = require("@elementor/ui");
|
|
1597
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
1484
1598
|
function PrimaryAction2() {
|
|
1485
1599
|
const document2 = (0, import_editor_documents10.__useActiveDocument)();
|
|
1486
1600
|
const { save } = (0, import_editor_documents10.__useActiveDocumentActions)();
|
|
1487
|
-
return /* @__PURE__ */
|
|
1488
|
-
|
|
1601
|
+
return /* @__PURE__ */ React27.createElement(
|
|
1602
|
+
import_ui18.Paper,
|
|
1489
1603
|
{
|
|
1490
1604
|
sx: {
|
|
1491
1605
|
px: 5,
|
|
@@ -1494,8 +1608,8 @@ function PrimaryAction2() {
|
|
|
1494
1608
|
borderColor: "divider"
|
|
1495
1609
|
}
|
|
1496
1610
|
},
|
|
1497
|
-
/* @__PURE__ */
|
|
1498
|
-
|
|
1611
|
+
/* @__PURE__ */ React27.createElement(
|
|
1612
|
+
import_ui18.Button,
|
|
1499
1613
|
{
|
|
1500
1614
|
variant: "contained",
|
|
1501
1615
|
disabled: !document2 || !document2.isDirty,
|
|
@@ -1503,26 +1617,26 @@ function PrimaryAction2() {
|
|
|
1503
1617
|
sx: { width: "100%" },
|
|
1504
1618
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
1505
1619
|
},
|
|
1506
|
-
document2?.isSaving ? /* @__PURE__ */
|
|
1620
|
+
document2?.isSaving ? /* @__PURE__ */ React27.createElement(import_ui18.CircularProgress, null) : (0, import_i18n25.__)("Save Changes", "elementor")
|
|
1507
1621
|
)
|
|
1508
1622
|
);
|
|
1509
1623
|
}
|
|
1510
1624
|
|
|
1511
1625
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
1512
1626
|
function PortalledPrimaryAction() {
|
|
1513
|
-
return /* @__PURE__ */
|
|
1627
|
+
return /* @__PURE__ */ React28.createElement(Portal, null, /* @__PURE__ */ React28.createElement(PrimaryAction2, null));
|
|
1514
1628
|
}
|
|
1515
1629
|
|
|
1516
1630
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
1517
1631
|
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
1518
1632
|
var import_icons22 = require("@elementor/icons");
|
|
1519
|
-
var
|
|
1633
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
1520
1634
|
function useActionProps9() {
|
|
1521
1635
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters14.__privateUseRouteStatus)("panel/global", {
|
|
1522
1636
|
blockOnKitRoutes: false
|
|
1523
1637
|
});
|
|
1524
1638
|
return {
|
|
1525
|
-
title: (0,
|
|
1639
|
+
title: (0, import_i18n26.__)("Site Settings", "elementor"),
|
|
1526
1640
|
icon: import_icons22.SettingsIcon,
|
|
1527
1641
|
onClick: () => {
|
|
1528
1642
|
const extendedWindow = window;
|
|
@@ -1563,11 +1677,11 @@ function init13() {
|
|
|
1563
1677
|
// src/extensions/structure/hooks/use-action-props.ts
|
|
1564
1678
|
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
1565
1679
|
var import_icons23 = require("@elementor/icons");
|
|
1566
|
-
var
|
|
1680
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
1567
1681
|
function useActionProps10() {
|
|
1568
1682
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters15.__privateUseRouteStatus)("navigator");
|
|
1569
1683
|
return {
|
|
1570
|
-
title: (0,
|
|
1684
|
+
title: (0, import_i18n27.__)("Structure", "elementor"),
|
|
1571
1685
|
icon: import_icons23.StructureIcon,
|
|
1572
1686
|
onClick: () => {
|
|
1573
1687
|
const extendedWindow = window;
|
|
@@ -1599,11 +1713,11 @@ function init14() {
|
|
|
1599
1713
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1600
1714
|
var import_editor_v1_adapters16 = require("@elementor/editor-v1-adapters");
|
|
1601
1715
|
var import_icons24 = require("@elementor/icons");
|
|
1602
|
-
var
|
|
1716
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
1603
1717
|
function useActionProps11() {
|
|
1604
1718
|
return {
|
|
1605
1719
|
icon: import_icons24.ThemeBuilderIcon,
|
|
1606
|
-
title: (0,
|
|
1720
|
+
title: (0, import_i18n28.__)("Theme Builder", "elementor"),
|
|
1607
1721
|
onClick: () => {
|
|
1608
1722
|
const extendedWindow = window;
|
|
1609
1723
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1633,12 +1747,12 @@ function init15() {
|
|
|
1633
1747
|
// src/extensions/user-preferences/hooks/use-action-props.ts
|
|
1634
1748
|
var import_editor_v1_adapters17 = require("@elementor/editor-v1-adapters");
|
|
1635
1749
|
var import_icons25 = require("@elementor/icons");
|
|
1636
|
-
var
|
|
1750
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
1637
1751
|
function useActionProps12() {
|
|
1638
1752
|
const { isActive, isBlocked } = (0, import_editor_v1_adapters17.__privateUseRouteStatus)("panel/editor-preferences");
|
|
1639
1753
|
return {
|
|
1640
1754
|
icon: import_icons25.ToggleRightIcon,
|
|
1641
|
-
title: (0,
|
|
1755
|
+
title: (0, import_i18n29.__)("User Preferences", "elementor"),
|
|
1642
1756
|
onClick: () => {
|
|
1643
1757
|
const extendedWindow = window;
|
|
1644
1758
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1670,7 +1784,7 @@ function init16() {
|
|
|
1670
1784
|
// src/extensions/wordpress/index.ts
|
|
1671
1785
|
var import_editor_documents11 = require("@elementor/editor-documents");
|
|
1672
1786
|
var import_icons26 = require("@elementor/icons");
|
|
1673
|
-
var
|
|
1787
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
1674
1788
|
function init17() {
|
|
1675
1789
|
mainMenu.registerLink({
|
|
1676
1790
|
id: "exit-to-wordpress",
|
|
@@ -1679,7 +1793,7 @@ function init17() {
|
|
|
1679
1793
|
useProps: () => {
|
|
1680
1794
|
const document2 = (0, import_editor_documents11.__useActiveDocument)();
|
|
1681
1795
|
return {
|
|
1682
|
-
title: (0,
|
|
1796
|
+
title: (0, import_i18n30.__)("Exit to WordPress", "elementor"),
|
|
1683
1797
|
href: document2?.links?.platformEdit,
|
|
1684
1798
|
icon: import_icons26.WordpressIcon,
|
|
1685
1799
|
onClick: () => {
|