@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.mjs
CHANGED
|
@@ -189,9 +189,9 @@ var documentOptionsMenu = createMenu2({
|
|
|
189
189
|
import { injectIntoTop as injectIntoTop2 } from "@elementor/editor";
|
|
190
190
|
|
|
191
191
|
// src/components/app-bar.tsx
|
|
192
|
-
import * as
|
|
192
|
+
import * as React22 from "react";
|
|
193
193
|
import { __useActiveDocument as useActiveDocument } from "@elementor/editor-documents";
|
|
194
|
-
import { AppBar as BaseAppBar, Box as Box3, Divider as Divider2, Grid, ThemeProvider as
|
|
194
|
+
import { AppBar as BaseAppBar, Box as Box3, Divider as Divider2, Grid, ThemeProvider as ThemeProvider3, Toolbar } from "@elementor/ui";
|
|
195
195
|
|
|
196
196
|
// src/components/locations/main-menu-location.tsx
|
|
197
197
|
import * as React10 from "react";
|
|
@@ -329,33 +329,145 @@ function ResponsiveLocation() {
|
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
// src/components/locations/tools-menu-location.tsx
|
|
332
|
-
import * as
|
|
332
|
+
import * as React20 from "react";
|
|
333
333
|
|
|
334
|
-
// src/components/
|
|
334
|
+
// src/extensions/angie/components/angie-guide-location.tsx
|
|
335
|
+
import * as React15 from "react";
|
|
336
|
+
import { useEffect, useState as useState2 } from "react";
|
|
337
|
+
import { ThemeProvider } from "@elementor/editor-ui";
|
|
338
|
+
import { useMixpanel } from "@elementor/events";
|
|
339
|
+
import { Infotip } from "@elementor/ui";
|
|
340
|
+
|
|
341
|
+
// src/extensions/angie/angie-consts.ts
|
|
342
|
+
import { __ as __2 } from "@wordpress/i18n";
|
|
343
|
+
var ANGIE_GUIDE_TOGGLE_EVENT = "elementor/editor/toggle-angie-guide";
|
|
344
|
+
var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
|
|
345
|
+
var ANGIE_BUTTON_ARIA_LABEL = __2("Angie", "elementor");
|
|
346
|
+
var ANGIE_LEARN_MORE_URL = "https://go.elementor.com/angie-learn-more";
|
|
347
|
+
var ANGIE_DESCRIPTION = __2(
|
|
348
|
+
"Angie lets you generate custom widgets, sections, and code using simple instructions.",
|
|
349
|
+
"elementor"
|
|
350
|
+
);
|
|
351
|
+
var AI_WIDGET_CTA_VIEWED_EVENT = "ai_widget_cta_viewed";
|
|
352
|
+
var ANGIE_TOP_BAR_PROMOTION_IMAGE_URL = "https://assets.elementor.com/packages/v1/images/angie-top-bar-promotion.svg";
|
|
353
|
+
var ANGIE_TOP_BAR_DESCRIPTION = __2("Build custom widgets using simple instructions.", "elementor");
|
|
354
|
+
|
|
355
|
+
// src/extensions/angie/components/angie-guide-card.tsx
|
|
335
356
|
import * as React14 from "react";
|
|
336
|
-
import { Stack as Stack2 } from "@elementor/ui";
|
|
357
|
+
import { Button, Chip, ClickAwayListener, CloseButton, Image, Stack as Stack2, Typography } from "@elementor/ui";
|
|
358
|
+
import { __ as __3 } from "@wordpress/i18n";
|
|
359
|
+
function AngieGuideCard({ imageUrl, description, learnMoreUrl, onInstall, onClose }) {
|
|
360
|
+
return /* @__PURE__ */ React14.createElement(ClickAwayListener, { onClickAway: onClose }, /* @__PURE__ */ React14.createElement(Stack2, { sx: { width: 296 }, "data-testid": "e-angie-guide-card" }, /* @__PURE__ */ React14.createElement(Stack2, { direction: "row", alignItems: "center", gap: 1, py: 1, px: 2 }, /* @__PURE__ */ React14.createElement(Typography, { variant: "subtitle2" }, __3("Meet Angie", "elementor")), /* @__PURE__ */ React14.createElement(Chip, { label: __3("New", "elementor"), size: "small", color: "info", variant: "standard" }), /* @__PURE__ */ React14.createElement(
|
|
361
|
+
CloseButton,
|
|
362
|
+
{
|
|
363
|
+
edge: "end",
|
|
364
|
+
sx: { ml: "auto" },
|
|
365
|
+
slotProps: { icon: { fontSize: "small" } },
|
|
366
|
+
onClick: onClose
|
|
367
|
+
}
|
|
368
|
+
)), /* @__PURE__ */ React14.createElement(Image, { src: imageUrl, alt: __3("Angie", "elementor"), sx: { height: 150, width: "100%" } }), /* @__PURE__ */ React14.createElement(Stack2, { px: 2, pt: 1.5, pb: 1 }, /* @__PURE__ */ React14.createElement(Typography, { variant: "body2", color: "secondary" }, description)), /* @__PURE__ */ React14.createElement(Stack2, { direction: "row", justifyContent: "flex-end", gap: 1, pt: 1, pb: 1.5, px: 2 }, /* @__PURE__ */ React14.createElement(
|
|
369
|
+
Button,
|
|
370
|
+
{
|
|
371
|
+
variant: "text",
|
|
372
|
+
size: "small",
|
|
373
|
+
color: "secondary",
|
|
374
|
+
onClick: () => {
|
|
375
|
+
window.open(learnMoreUrl, "_blank", "noopener,noreferrer");
|
|
376
|
+
onClose();
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
__3("Learn More", "elementor")
|
|
380
|
+
), /* @__PURE__ */ React14.createElement(Button, { variant: "contained", size: "small", color: "accent", onClick: onInstall }, __3("Try for free", "elementor")))));
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// src/extensions/angie/components/angie-guide-location.tsx
|
|
384
|
+
function AngieGuideLocation() {
|
|
385
|
+
const [anchorEl, setAnchorEl] = useState2(null);
|
|
386
|
+
const { dispatchEvent: dispatchEvent2 } = useMixpanel();
|
|
387
|
+
const isOpen = Boolean(anchorEl);
|
|
388
|
+
useEffect(() => {
|
|
389
|
+
const handleToggle = () => {
|
|
390
|
+
setAnchorEl((prev) => {
|
|
391
|
+
if (prev) {
|
|
392
|
+
return null;
|
|
393
|
+
}
|
|
394
|
+
return document.querySelector(`[aria-label="${ANGIE_BUTTON_ARIA_LABEL}"]`);
|
|
395
|
+
});
|
|
396
|
+
};
|
|
397
|
+
window.addEventListener(ANGIE_GUIDE_TOGGLE_EVENT, handleToggle);
|
|
398
|
+
return () => {
|
|
399
|
+
window.removeEventListener(ANGIE_GUIDE_TOGGLE_EVENT, handleToggle);
|
|
400
|
+
};
|
|
401
|
+
}, []);
|
|
402
|
+
const handleClose = () => setAnchorEl(null);
|
|
403
|
+
const handleInstall = async () => {
|
|
404
|
+
dispatchEvent2?.(AI_WIDGET_CTA_VIEWED_EVENT, {
|
|
405
|
+
entry_point: "top_bar_icon"
|
|
406
|
+
});
|
|
407
|
+
window.dispatchEvent(
|
|
408
|
+
new CustomEvent(CREATE_WIDGET_EVENT, {
|
|
409
|
+
detail: {
|
|
410
|
+
entry_point: "top_bar_icon"
|
|
411
|
+
}
|
|
412
|
+
})
|
|
413
|
+
);
|
|
414
|
+
handleClose();
|
|
415
|
+
};
|
|
416
|
+
return /* @__PURE__ */ React15.createElement(ThemeProvider, null, /* @__PURE__ */ React15.createElement(
|
|
417
|
+
Infotip,
|
|
418
|
+
{
|
|
419
|
+
content: /* @__PURE__ */ React15.createElement(
|
|
420
|
+
AngieGuideCard,
|
|
421
|
+
{
|
|
422
|
+
imageUrl: ANGIE_TOP_BAR_PROMOTION_IMAGE_URL,
|
|
423
|
+
description: ANGIE_TOP_BAR_DESCRIPTION,
|
|
424
|
+
learnMoreUrl: ANGIE_LEARN_MORE_URL,
|
|
425
|
+
onInstall: handleInstall,
|
|
426
|
+
onClose: handleClose
|
|
427
|
+
}
|
|
428
|
+
),
|
|
429
|
+
placement: "bottom-start",
|
|
430
|
+
open: isOpen,
|
|
431
|
+
disableHoverListener: true,
|
|
432
|
+
PopperProps: {
|
|
433
|
+
anchorEl,
|
|
434
|
+
modifiers: [
|
|
435
|
+
{
|
|
436
|
+
name: "offset",
|
|
437
|
+
options: { offset: [-4, -4] }
|
|
438
|
+
}
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
/* @__PURE__ */ React15.createElement("span", null)
|
|
443
|
+
));
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// src/components/ui/toolbar-menu.tsx
|
|
447
|
+
import * as React16 from "react";
|
|
448
|
+
import { Stack as Stack3 } from "@elementor/ui";
|
|
337
449
|
function ToolbarMenu({ children, ...props }) {
|
|
338
|
-
return /* @__PURE__ */
|
|
450
|
+
return /* @__PURE__ */ React16.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React16.createElement(Stack3, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
|
|
339
451
|
}
|
|
340
452
|
|
|
341
453
|
// src/components/ui/toolbar-menu-more.tsx
|
|
342
|
-
import * as
|
|
454
|
+
import * as React17 from "react";
|
|
343
455
|
import { DotsVerticalIcon } from "@elementor/icons";
|
|
344
456
|
import { bindMenu as bindMenu2, bindTrigger as bindTrigger2, usePopupState as usePopupState2 } from "@elementor/ui";
|
|
345
|
-
import { __ as
|
|
457
|
+
import { __ as __4 } from "@wordpress/i18n";
|
|
346
458
|
function ToolbarMenuMore({ children, id }) {
|
|
347
459
|
const popupState = usePopupState2({
|
|
348
460
|
variant: "popover",
|
|
349
461
|
popupId: id
|
|
350
462
|
});
|
|
351
|
-
return /* @__PURE__ */
|
|
463
|
+
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(ToolbarMenuItem, { ...bindTrigger2(popupState), title: __4("More", "elementor") }, /* @__PURE__ */ React17.createElement(DotsVerticalIcon, null)), /* @__PURE__ */ React17.createElement(PopoverMenu, { onClick: popupState.close, ...bindMenu2(popupState) }, children));
|
|
352
464
|
}
|
|
353
465
|
|
|
354
466
|
// src/components/locations/integrations-menu-location.tsx
|
|
355
|
-
import * as
|
|
467
|
+
import * as React18 from "react";
|
|
356
468
|
import { PlugIcon } from "@elementor/icons";
|
|
357
469
|
import { bindMenu as bindMenu3, bindTrigger as bindTrigger3, usePopupState as usePopupState3 } from "@elementor/ui";
|
|
358
|
-
import { __ as
|
|
470
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
359
471
|
var { useMenuItems: useMenuItems2 } = integrationsMenu;
|
|
360
472
|
function IntegrationsMenuLocation() {
|
|
361
473
|
const menuItems = useMenuItems2();
|
|
@@ -366,7 +478,7 @@ function IntegrationsMenuLocation() {
|
|
|
366
478
|
if (menuItems.default.length === 0) {
|
|
367
479
|
return null;
|
|
368
480
|
}
|
|
369
|
-
return /* @__PURE__ */
|
|
481
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(ToolbarMenuItem, { ...bindTrigger3(popupState), title: __5("Integrations", "elementor") }, /* @__PURE__ */ React18.createElement(PlugIcon, null)), /* @__PURE__ */ React18.createElement(
|
|
370
482
|
PopoverMenu,
|
|
371
483
|
{
|
|
372
484
|
onClick: popupState.close,
|
|
@@ -374,32 +486,32 @@ function IntegrationsMenuLocation() {
|
|
|
374
486
|
marginThreshold: 8,
|
|
375
487
|
open: popupState.isOpen
|
|
376
488
|
},
|
|
377
|
-
menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */
|
|
489
|
+
menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React18.createElement(IntegrationsMenuItem, { key: id }))
|
|
378
490
|
));
|
|
379
491
|
}
|
|
380
492
|
|
|
381
493
|
// src/components/locations/send-feedback-popup-location.tsx
|
|
382
|
-
import * as
|
|
383
|
-
import { useEffect, useState as
|
|
384
|
-
import { ThemeProvider } from "@elementor/editor-ui";
|
|
494
|
+
import * as React19 from "react";
|
|
495
|
+
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
496
|
+
import { ThemeProvider as ThemeProvider2 } from "@elementor/editor-ui";
|
|
385
497
|
import { isExperimentActive } from "@elementor/editor-v1-adapters";
|
|
386
|
-
import { useMixpanel } from "@elementor/events";
|
|
498
|
+
import { useMixpanel as useMixpanel2 } from "@elementor/events";
|
|
387
499
|
import { httpService } from "@elementor/http-client";
|
|
388
500
|
import { AlertCircleIcon, CheckIcon } from "@elementor/icons";
|
|
389
501
|
import {
|
|
390
502
|
bindDialog,
|
|
391
|
-
Button,
|
|
392
|
-
CloseButton,
|
|
503
|
+
Button as Button2,
|
|
504
|
+
CloseButton as CloseButton2,
|
|
393
505
|
Dialog,
|
|
394
506
|
DialogContent,
|
|
395
507
|
DialogHeader,
|
|
396
508
|
DialogTitle,
|
|
397
509
|
Popover,
|
|
398
|
-
Stack as
|
|
510
|
+
Stack as Stack4,
|
|
399
511
|
TextField,
|
|
400
512
|
usePopupState as usePopupState4
|
|
401
513
|
} from "@elementor/ui";
|
|
402
|
-
import { __ as
|
|
514
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
403
515
|
|
|
404
516
|
// src/extensions/feedback/feedback-consts.ts
|
|
405
517
|
var EXPERIMENT_NAME = "in_editor_feedback";
|
|
@@ -413,18 +525,18 @@ var checkIfUserIsConnected = () => {
|
|
|
413
525
|
function SendFeedbackPopupLocation() {
|
|
414
526
|
const isActive = isExperimentActive(EXPERIMENT_NAME);
|
|
415
527
|
const extendedWindow = window;
|
|
416
|
-
const [isUserConnected, setIsUserConnected] =
|
|
528
|
+
const [isUserConnected, setIsUserConnected] = useState3(checkIfUserIsConnected());
|
|
417
529
|
const connectUrl = extendedWindow?.elementor?.config.user.top_bar.connect_url;
|
|
418
|
-
const [feedbackContent, setFeedbackContent] =
|
|
419
|
-
const [feedbackResult, setFeedbackResult] =
|
|
420
|
-
const [submitDisabled, setSubmitDisabled] =
|
|
421
|
-
const { dispatchEvent: trackEvent2 = (...args) => void args } =
|
|
530
|
+
const [feedbackContent, setFeedbackContent] = useState3("");
|
|
531
|
+
const [feedbackResult, setFeedbackResult] = useState3(null);
|
|
532
|
+
const [submitDisabled, setSubmitDisabled] = useState3(true);
|
|
533
|
+
const { dispatchEvent: trackEvent2 = (...args) => void args } = useMixpanel2();
|
|
422
534
|
const popupState = usePopupState4({
|
|
423
535
|
variant: "dialog",
|
|
424
536
|
popupId: FEEDBACK_TOGGLE_EVENT
|
|
425
537
|
});
|
|
426
|
-
const [isFetching, setIsFetching] =
|
|
427
|
-
|
|
538
|
+
const [isFetching, setIsFetching] = useState3(false);
|
|
539
|
+
useEffect2(() => {
|
|
428
540
|
const handler = () => {
|
|
429
541
|
popupState.toggle();
|
|
430
542
|
setIsUserConnected(checkIfUserIsConnected());
|
|
@@ -439,7 +551,7 @@ function SendFeedbackPopupLocation() {
|
|
|
439
551
|
window.removeEventListener(FEEDBACK_TOGGLE_EVENT, handler);
|
|
440
552
|
};
|
|
441
553
|
}, [popupState, trackEvent2]);
|
|
442
|
-
|
|
554
|
+
useEffect2(() => {
|
|
443
555
|
setSubmitDisabled(feedbackContent.trim().length < 10 || !isUserConnected || isFetching);
|
|
444
556
|
}, [feedbackContent, feedbackResult, isUserConnected, isFetching]);
|
|
445
557
|
const handleClose = () => {
|
|
@@ -474,8 +586,8 @@ function SendFeedbackPopupLocation() {
|
|
|
474
586
|
if (!isActive) {
|
|
475
587
|
return null;
|
|
476
588
|
}
|
|
477
|
-
return /* @__PURE__ */
|
|
478
|
-
|
|
589
|
+
return /* @__PURE__ */ React19.createElement(ThemeProvider2, null, /* @__PURE__ */ React19.createElement(Popover, { ...bindDialog(popupState), onClose: () => handleClose() }, /* @__PURE__ */ React19.createElement(Dialog, { open: popupState.isOpen }, /* @__PURE__ */ React19.createElement(DialogHeader, { style: { width: "100%", minWidth: "35rem" } }, /* @__PURE__ */ React19.createElement(DialogTitle, { style: { width: "100%" } }, /* @__PURE__ */ React19.createElement(
|
|
590
|
+
Stack4,
|
|
479
591
|
{
|
|
480
592
|
display: "flex",
|
|
481
593
|
direction: "row",
|
|
@@ -483,18 +595,18 @@ function SendFeedbackPopupLocation() {
|
|
|
483
595
|
justifyContent: "space-between",
|
|
484
596
|
width: "100%"
|
|
485
597
|
},
|
|
486
|
-
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
))), /* @__PURE__ */
|
|
598
|
+
__6("Submit Feedback", "elementor"),
|
|
599
|
+
/* @__PURE__ */ React19.createElement(CloseButton2, { onClick: popupState.close })
|
|
600
|
+
))), /* @__PURE__ */ React19.createElement(DialogContent, null, /* @__PURE__ */ React19.createElement(Stack4, { direction: "column", gap: 2 }, isUserConnected ? /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
489
601
|
TextField,
|
|
490
602
|
{
|
|
491
603
|
autofocus: true,
|
|
492
|
-
placeholder:
|
|
604
|
+
placeholder: __6(
|
|
493
605
|
"E.g. Can you add ABC features? I want to do ABC and it\u2019s important because \u2026",
|
|
494
606
|
"elementor"
|
|
495
607
|
),
|
|
496
608
|
fullwith: true,
|
|
497
|
-
label:
|
|
609
|
+
label: __6("Your Feedback", "elementor"),
|
|
498
610
|
multiline: true,
|
|
499
611
|
id: "elementor-feedback-usercontent",
|
|
500
612
|
rows: 6,
|
|
@@ -503,8 +615,8 @@ function SendFeedbackPopupLocation() {
|
|
|
503
615
|
onChange: (event) => setFeedbackContent(event.target.value),
|
|
504
616
|
value: feedbackContent
|
|
505
617
|
}
|
|
506
|
-
), /* @__PURE__ */
|
|
507
|
-
|
|
618
|
+
), /* @__PURE__ */ React19.createElement(Stack4, { direction: "row", justifyContent: "flex-end", alignItems: "center", gap: 2 }, feedbackResult && /* @__PURE__ */ React19.createElement(React19.Fragment, null, feedbackResult.success ? /* @__PURE__ */ React19.createElement(CheckIcon, { color: "success" }) : /* @__PURE__ */ React19.createElement(AlertCircleIcon, { color: "error" }), feedbackResult.message), feedbackResult?.success ? /* @__PURE__ */ React19.createElement(Button2, { variant: "text", onClick: () => handleStartAnother() }, __6("Submit Another Feedback", "elementor")) : /* @__PURE__ */ React19.createElement(
|
|
619
|
+
Button2,
|
|
508
620
|
{
|
|
509
621
|
disabled: submitDisabled,
|
|
510
622
|
onClick: submitFeedback,
|
|
@@ -512,9 +624,9 @@ function SendFeedbackPopupLocation() {
|
|
|
512
624
|
color: "primary",
|
|
513
625
|
size: "small"
|
|
514
626
|
},
|
|
515
|
-
|
|
516
|
-
))) : /* @__PURE__ */
|
|
517
|
-
|
|
627
|
+
__6("Submit", "elementor")
|
|
628
|
+
))) : /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
629
|
+
Button2,
|
|
518
630
|
{
|
|
519
631
|
variant: "contained",
|
|
520
632
|
color: "primary",
|
|
@@ -524,7 +636,7 @@ function SendFeedbackPopupLocation() {
|
|
|
524
636
|
rel: "noopener",
|
|
525
637
|
onClick: popupState.close
|
|
526
638
|
},
|
|
527
|
-
|
|
639
|
+
__6("Connect to Elementor", "elementor")
|
|
528
640
|
)))))));
|
|
529
641
|
}
|
|
530
642
|
|
|
@@ -535,11 +647,11 @@ function ToolsMenuLocation() {
|
|
|
535
647
|
const menuItems = useMenuItems3();
|
|
536
648
|
const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS);
|
|
537
649
|
const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS);
|
|
538
|
-
return /* @__PURE__ */
|
|
650
|
+
return /* @__PURE__ */ React20.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React20.createElement(MenuItem2, { key: id })), /* @__PURE__ */ React20.createElement(AngieGuideLocation, null), /* @__PURE__ */ React20.createElement(SendFeedbackPopupLocation, null), /* @__PURE__ */ React20.createElement(IntegrationsMenuLocation, null), popoverMenuItems.length > 0 && /* @__PURE__ */ React20.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-tools-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React20.createElement(MenuItem2, { key: id }))));
|
|
539
651
|
}
|
|
540
652
|
|
|
541
653
|
// src/components/locations/utilities-menu-location.tsx
|
|
542
|
-
import * as
|
|
654
|
+
import * as React21 from "react";
|
|
543
655
|
import { Fragment as Fragment4 } from "react";
|
|
544
656
|
var MAX_TOOLBAR_ACTIONS2 = 4;
|
|
545
657
|
var { useMenuItems: useMenuItems4 } = utilitiesMenu;
|
|
@@ -548,31 +660,25 @@ function UtilitiesMenuLocation() {
|
|
|
548
660
|
const shouldUsePopover = menuItems.default.length > MAX_TOOLBAR_ACTIONS2 + 1;
|
|
549
661
|
const toolbarMenuItems = shouldUsePopover ? menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS2) : menuItems.default;
|
|
550
662
|
const popoverMenuItems = shouldUsePopover ? menuItems.default.slice(MAX_TOOLBAR_ACTIONS2) : [];
|
|
551
|
-
return /* @__PURE__ */
|
|
663
|
+
return /* @__PURE__ */ React21.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React21.createElement(Fragment4, { key: id }, /* @__PURE__ */ React21.createElement(MenuItem2, null))), popoverMenuItems.length > 0 && /* @__PURE__ */ React21.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-utilities-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React21.createElement(MenuItem2, { key: id }))));
|
|
552
664
|
}
|
|
553
665
|
|
|
554
666
|
// src/components/app-bar.tsx
|
|
555
667
|
function AppBar() {
|
|
556
668
|
const document2 = useActiveDocument();
|
|
557
|
-
return /* @__PURE__ */
|
|
669
|
+
return /* @__PURE__ */ React22.createElement(ThemeProvider3, { colorScheme: "dark" }, /* @__PURE__ */ React22.createElement(BaseAppBar, { position: "sticky" }, /* @__PURE__ */ React22.createElement(Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React22.createElement(Box3, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React22.createElement(Grid, { container: true, flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React22.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React22.createElement(Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React22.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React22.createElement(Divider2, { orientation: "vertical" }), /* @__PURE__ */ React22.createElement(PageIndicationLocation, null), /* @__PURE__ */ React22.createElement(Divider2, { orientation: "vertical" }), /* @__PURE__ */ React22.createElement(ResponsiveLocation, null), /* @__PURE__ */ React22.createElement(Divider2, { orientation: "vertical" }))), /* @__PURE__ */ React22.createElement(Grid, { container: true, justifyContent: "flex-end", flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React22.createElement(PrimaryActionLocation, null))))));
|
|
558
670
|
}
|
|
559
671
|
|
|
560
672
|
// src/extensions/angie/hooks/use-action-props.ts
|
|
561
|
-
import { useEffect as
|
|
673
|
+
import { useEffect as useEffect3 } from "react";
|
|
562
674
|
import { isAngieAvailable } from "@elementor/editor-mcp";
|
|
563
675
|
import { trackEvent } from "@elementor/events";
|
|
564
676
|
import { AngieIcon } from "@elementor/icons";
|
|
565
|
-
import { __ as
|
|
566
|
-
var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
|
|
567
|
-
var AI_WIDGET_CTA_VIEWED_EVENT = "ai_widget_cta_viewed";
|
|
568
|
-
var CREATE_WIDGET_PROMPT = `Create a widget for me.
|
|
569
|
-
Goal: [What should this widget help me accomplish?]
|
|
570
|
-
Placement: [Where will I see it in the editor/UI?]
|
|
571
|
-
How it should work: `;
|
|
677
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
572
678
|
function useActionProps() {
|
|
573
679
|
const hasAngieInstalled = isAngieAvailable();
|
|
574
680
|
const visible = !hasAngieInstalled;
|
|
575
|
-
|
|
681
|
+
useEffect3(() => {
|
|
576
682
|
if (!visible) {
|
|
577
683
|
return;
|
|
578
684
|
}
|
|
@@ -583,17 +689,10 @@ function useActionProps() {
|
|
|
583
689
|
});
|
|
584
690
|
}, [visible]);
|
|
585
691
|
return {
|
|
586
|
-
title:
|
|
692
|
+
title: __7("Angie", "elementor"),
|
|
587
693
|
icon: AngieIcon,
|
|
588
694
|
onClick: () => {
|
|
589
|
-
window.dispatchEvent(
|
|
590
|
-
new CustomEvent(CREATE_WIDGET_EVENT, {
|
|
591
|
-
detail: {
|
|
592
|
-
prompt: CREATE_WIDGET_PROMPT,
|
|
593
|
-
entry_point: "top_bar_icon"
|
|
594
|
-
}
|
|
595
|
-
})
|
|
596
|
-
);
|
|
695
|
+
window.dispatchEvent(new CustomEvent(ANGIE_GUIDE_TOGGLE_EVENT));
|
|
597
696
|
},
|
|
598
697
|
selected: false,
|
|
599
698
|
visible
|
|
@@ -612,7 +711,7 @@ function init() {
|
|
|
612
711
|
// src/extensions/connect/hooks/use-connect-link-config.tsx
|
|
613
712
|
import { useCallback } from "react";
|
|
614
713
|
import { UserIcon } from "@elementor/icons";
|
|
615
|
-
import { __ as
|
|
714
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
616
715
|
var dispatchConnectClickEvent = (eventName) => {
|
|
617
716
|
try {
|
|
618
717
|
const extendedWindow = window;
|
|
@@ -665,12 +764,12 @@ function useConnectLinkConfig() {
|
|
|
665
764
|
[extendedWindow]
|
|
666
765
|
);
|
|
667
766
|
return isUserConnected ? {
|
|
668
|
-
title:
|
|
767
|
+
title: __8("My Elementor", "elementor"),
|
|
669
768
|
href: extendedWindow?.elementor?.config.user.top_bar.my_elementor_url,
|
|
670
769
|
icon: UserIcon,
|
|
671
770
|
target: "_blank"
|
|
672
771
|
} : {
|
|
673
|
-
title:
|
|
772
|
+
title: __8("Connect my account", "elementor"),
|
|
674
773
|
href: extendedWindow?.elementor?.config.user.top_bar.connect_url,
|
|
675
774
|
icon: UserIcon,
|
|
676
775
|
target,
|
|
@@ -692,12 +791,12 @@ function init2() {
|
|
|
692
791
|
import { __useActiveDocument as useActiveDocument2 } from "@elementor/editor-documents";
|
|
693
792
|
import { __privateRunCommand as runCommand } from "@elementor/editor-v1-adapters";
|
|
694
793
|
import { EyeIcon } from "@elementor/icons";
|
|
695
|
-
import { __ as
|
|
794
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
696
795
|
function useActionProps2() {
|
|
697
796
|
const document2 = useActiveDocument2();
|
|
698
797
|
return {
|
|
699
798
|
icon: EyeIcon,
|
|
700
|
-
title:
|
|
799
|
+
title: __9("Preview Changes", "elementor"),
|
|
701
800
|
onClick: () => {
|
|
702
801
|
const extendedWindow = window;
|
|
703
802
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -729,7 +828,7 @@ function init3() {
|
|
|
729
828
|
}
|
|
730
829
|
|
|
731
830
|
// src/extensions/documents-save/components/primary-action.tsx
|
|
732
|
-
import * as
|
|
831
|
+
import * as React24 from "react";
|
|
733
832
|
import {
|
|
734
833
|
__useActiveDocument as useActiveDocument3,
|
|
735
834
|
__useActiveDocumentActions as useActiveDocumentActions
|
|
@@ -740,16 +839,16 @@ import {
|
|
|
740
839
|
bindMenu as bindMenu4,
|
|
741
840
|
bindTrigger as bindTrigger4,
|
|
742
841
|
Box as Box4,
|
|
743
|
-
Button as
|
|
842
|
+
Button as Button3,
|
|
744
843
|
ButtonGroup,
|
|
745
844
|
CircularProgress,
|
|
746
845
|
Tooltip as Tooltip3,
|
|
747
846
|
usePopupState as usePopupState5
|
|
748
847
|
} from "@elementor/ui";
|
|
749
|
-
import { __ as
|
|
848
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
750
849
|
|
|
751
850
|
// src/extensions/documents-save/components/primary-action-menu.tsx
|
|
752
|
-
import * as
|
|
851
|
+
import * as React23 from "react";
|
|
753
852
|
import { Divider as Divider3, styled as styled2 } from "@elementor/ui";
|
|
754
853
|
var { useMenuItems: useMenuItems5 } = documentOptionsMenu;
|
|
755
854
|
var StyledPopoverMenu = styled2(PopoverMenu)`
|
|
@@ -765,7 +864,7 @@ var StyledPopoverMenu = styled2(PopoverMenu)`
|
|
|
765
864
|
`;
|
|
766
865
|
function PrimaryActionMenu(props) {
|
|
767
866
|
const { save: saveActions, default: defaultActions } = useMenuItems5();
|
|
768
|
-
return /* @__PURE__ */
|
|
867
|
+
return /* @__PURE__ */ React23.createElement(
|
|
769
868
|
StyledPopoverMenu,
|
|
770
869
|
{
|
|
771
870
|
...props,
|
|
@@ -783,13 +882,13 @@ function PrimaryActionMenu(props) {
|
|
|
783
882
|
}
|
|
784
883
|
},
|
|
785
884
|
saveActions.map(({ MenuItem: MenuItem2, id }, index) => [
|
|
786
|
-
index > 0 && /* @__PURE__ */
|
|
787
|
-
/* @__PURE__ */
|
|
885
|
+
index > 0 && /* @__PURE__ */ React23.createElement(Divider3, { key: `${id}-divider` }),
|
|
886
|
+
/* @__PURE__ */ React23.createElement(MenuItem2, { key: id })
|
|
788
887
|
]),
|
|
789
|
-
saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */
|
|
888
|
+
saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */ React23.createElement(Divider3, null),
|
|
790
889
|
defaultActions.map(({ MenuItem: MenuItem2, id }, index) => [
|
|
791
|
-
index > 0 && /* @__PURE__ */
|
|
792
|
-
/* @__PURE__ */
|
|
890
|
+
index > 0 && /* @__PURE__ */ React23.createElement(Divider3, { key: `${id}-divider` }),
|
|
891
|
+
/* @__PURE__ */ React23.createElement(MenuItem2, { key: id })
|
|
793
892
|
])
|
|
794
893
|
);
|
|
795
894
|
}
|
|
@@ -810,8 +909,8 @@ function PrimaryAction() {
|
|
|
810
909
|
const isPublishDisabled = !isEditMode || !isPublishEnabled(document2);
|
|
811
910
|
const isSaveOptionsDisabled = !isEditMode || document2.type.value === "kit";
|
|
812
911
|
const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
|
|
813
|
-
return /* @__PURE__ */
|
|
814
|
-
|
|
912
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React24.createElement(
|
|
913
|
+
Button3,
|
|
815
914
|
{
|
|
816
915
|
onClick: () => {
|
|
817
916
|
const extendedWindow = window;
|
|
@@ -841,11 +940,11 @@ function PrimaryAction() {
|
|
|
841
940
|
},
|
|
842
941
|
disabled: isPublishDisabled
|
|
843
942
|
},
|
|
844
|
-
shouldShowSpinner ? /* @__PURE__ */
|
|
845
|
-
), /* @__PURE__ */
|
|
943
|
+
shouldShowSpinner ? /* @__PURE__ */ React24.createElement(CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
|
|
944
|
+
), /* @__PURE__ */ React24.createElement(
|
|
846
945
|
Tooltip3,
|
|
847
946
|
{
|
|
848
|
-
title:
|
|
947
|
+
title: __10("Save Options", "elementor"),
|
|
849
948
|
PopperProps: {
|
|
850
949
|
sx: {
|
|
851
950
|
"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
|
|
@@ -855,21 +954,21 @@ function PrimaryAction() {
|
|
|
855
954
|
}
|
|
856
955
|
}
|
|
857
956
|
},
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
-
|
|
957
|
+
/* @__PURE__ */ React24.createElement(Box4, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React24.createElement(
|
|
958
|
+
Button3,
|
|
860
959
|
{
|
|
861
960
|
size: "small",
|
|
862
961
|
...bindTrigger4(popupState),
|
|
863
962
|
sx: { px: 0, height: "100%", borderRadius: 0 },
|
|
864
963
|
disabled: isSaveOptionsDisabled,
|
|
865
|
-
"aria-label":
|
|
964
|
+
"aria-label": __10("Save Options", "elementor")
|
|
866
965
|
},
|
|
867
|
-
/* @__PURE__ */
|
|
966
|
+
/* @__PURE__ */ React24.createElement(ChevronDownIcon, null)
|
|
868
967
|
))
|
|
869
|
-
)), /* @__PURE__ */
|
|
968
|
+
)), /* @__PURE__ */ React24.createElement(PrimaryActionMenu, { ...bindMenu4(popupState), onClick: popupState.close }));
|
|
870
969
|
}
|
|
871
970
|
function getLabel(document2) {
|
|
872
|
-
return document2.userCan.publish ?
|
|
971
|
+
return document2.userCan.publish ? __10("Publish", "elementor") : __10("Submit", "elementor");
|
|
873
972
|
}
|
|
874
973
|
function isPublishEnabled(document2) {
|
|
875
974
|
if (document2.type.value === "kit") {
|
|
@@ -883,16 +982,16 @@ import {
|
|
|
883
982
|
__useActiveDocument as useActiveDocument4,
|
|
884
983
|
__useActiveDocumentActions as useActiveDocumentActions2
|
|
885
984
|
} from "@elementor/editor-documents";
|
|
886
|
-
import { useMixpanel as
|
|
985
|
+
import { useMixpanel as useMixpanel3 } from "@elementor/events";
|
|
887
986
|
import { LinkIcon } from "@elementor/icons";
|
|
888
|
-
import { __ as
|
|
987
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
889
988
|
function useDocumentCopyAndShareProps() {
|
|
890
989
|
const document2 = useActiveDocument4();
|
|
891
990
|
const { copyAndShare } = useActiveDocumentActions2();
|
|
892
|
-
const { dispatchEvent: dispatchEvent2, config } =
|
|
991
|
+
const { dispatchEvent: dispatchEvent2, config } = useMixpanel3();
|
|
893
992
|
return {
|
|
894
993
|
icon: LinkIcon,
|
|
895
|
-
title:
|
|
994
|
+
title: __11("Copy and Share", "elementor"),
|
|
896
995
|
onClick: () => {
|
|
897
996
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
898
997
|
if (eventName) {
|
|
@@ -920,16 +1019,16 @@ import {
|
|
|
920
1019
|
__useActiveDocument as useActiveDocument5,
|
|
921
1020
|
__useActiveDocumentActions as useActiveDocumentActions3
|
|
922
1021
|
} from "@elementor/editor-documents";
|
|
923
|
-
import { useMixpanel as
|
|
1022
|
+
import { useMixpanel as useMixpanel4 } from "@elementor/events";
|
|
924
1023
|
import { FileReportIcon } from "@elementor/icons";
|
|
925
|
-
import { __ as
|
|
1024
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
926
1025
|
function useDocumentSaveDraftProps() {
|
|
927
1026
|
const document2 = useActiveDocument5();
|
|
928
1027
|
const { saveDraft } = useActiveDocumentActions3();
|
|
929
|
-
const { dispatchEvent: dispatchEvent2, config } =
|
|
1028
|
+
const { dispatchEvent: dispatchEvent2, config } = useMixpanel4();
|
|
930
1029
|
return {
|
|
931
1030
|
icon: FileReportIcon,
|
|
932
|
-
title:
|
|
1031
|
+
title: __12("Save Draft", "elementor"),
|
|
933
1032
|
onClick: () => {
|
|
934
1033
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
935
1034
|
if (eventName) {
|
|
@@ -953,15 +1052,15 @@ function useDocumentSaveDraftProps() {
|
|
|
953
1052
|
|
|
954
1053
|
// src/extensions/documents-save/hooks/use-document-save-template-props.ts
|
|
955
1054
|
import { __useActiveDocumentActions as useActiveDocumentActions4 } from "@elementor/editor-documents";
|
|
956
|
-
import { useMixpanel as
|
|
1055
|
+
import { useMixpanel as useMixpanel5 } from "@elementor/events";
|
|
957
1056
|
import { FolderIcon } from "@elementor/icons";
|
|
958
|
-
import { __ as
|
|
1057
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
959
1058
|
function useDocumentSaveTemplateProps() {
|
|
960
1059
|
const { saveTemplate } = useActiveDocumentActions4();
|
|
961
|
-
const { dispatchEvent: dispatchEvent2, config } =
|
|
1060
|
+
const { dispatchEvent: dispatchEvent2, config } = useMixpanel5();
|
|
962
1061
|
return {
|
|
963
1062
|
icon: FolderIcon,
|
|
964
|
-
title:
|
|
1063
|
+
title: __13("Save as Template", "elementor"),
|
|
965
1064
|
onClick: () => {
|
|
966
1065
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
967
1066
|
if (eventName) {
|
|
@@ -986,12 +1085,12 @@ function useDocumentSaveTemplateProps() {
|
|
|
986
1085
|
import { __useActiveDocument as useActiveDocument6 } from "@elementor/editor-documents";
|
|
987
1086
|
import { __privateRunCommand as runCommand2 } from "@elementor/editor-v1-adapters";
|
|
988
1087
|
import { EyeIcon as EyeIcon2 } from "@elementor/icons";
|
|
989
|
-
import { __ as
|
|
1088
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
990
1089
|
function useDocumentViewAsMarkdownProps() {
|
|
991
1090
|
const document2 = useActiveDocument6();
|
|
992
1091
|
return {
|
|
993
1092
|
icon: EyeIcon2,
|
|
994
|
-
title:
|
|
1093
|
+
title: __14("View as Markdown", "elementor"),
|
|
995
1094
|
onClick: async () => {
|
|
996
1095
|
const baseUrl = document2?.links?.wpPreview || document2?.links?.permalink;
|
|
997
1096
|
if (!baseUrl) {
|
|
@@ -1010,15 +1109,15 @@ function useDocumentViewAsMarkdownProps() {
|
|
|
1010
1109
|
// src/extensions/documents-save/hooks/use-document-view-page-props.ts
|
|
1011
1110
|
import { __useActiveDocument as useActiveDocument7 } from "@elementor/editor-documents";
|
|
1012
1111
|
import { __privateRunCommand as runCommand3 } from "@elementor/editor-v1-adapters";
|
|
1013
|
-
import { useMixpanel as
|
|
1112
|
+
import { useMixpanel as useMixpanel6 } from "@elementor/events";
|
|
1014
1113
|
import { EyeIcon as EyeIcon3 } from "@elementor/icons";
|
|
1015
|
-
import { __ as
|
|
1114
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
1016
1115
|
function useDocumentViewPageProps() {
|
|
1017
1116
|
const document2 = useActiveDocument7();
|
|
1018
|
-
const { dispatchEvent: dispatchEvent2, config } =
|
|
1117
|
+
const { dispatchEvent: dispatchEvent2, config } = useMixpanel6();
|
|
1019
1118
|
return {
|
|
1020
1119
|
icon: EyeIcon3,
|
|
1021
|
-
title:
|
|
1120
|
+
title: __15("View Page", "elementor"),
|
|
1022
1121
|
onClick: () => {
|
|
1023
1122
|
const eventName = config?.names?.editorOne?.topBarPublishDropdown;
|
|
1024
1123
|
if (eventName) {
|
|
@@ -1088,7 +1187,7 @@ import {
|
|
|
1088
1187
|
__privateUseRouteStatus as useRouteStatus
|
|
1089
1188
|
} from "@elementor/editor-v1-adapters";
|
|
1090
1189
|
import { FileSettingsIcon } from "@elementor/icons";
|
|
1091
|
-
import { __ as
|
|
1190
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
1092
1191
|
function useActionProps3() {
|
|
1093
1192
|
const activeDocument = useActiveDocument8();
|
|
1094
1193
|
const hostDocument = useHostDocument();
|
|
@@ -1096,8 +1195,8 @@ function useActionProps3() {
|
|
|
1096
1195
|
const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
|
|
1097
1196
|
const ButtonTitle = document2 ? (
|
|
1098
1197
|
/* translators: %s: Post type label. */
|
|
1099
|
-
|
|
1100
|
-
) :
|
|
1198
|
+
__16("%s Settings", "elementor").replace("%s", document2.type.label)
|
|
1199
|
+
) : __16("Document Settings", "elementor");
|
|
1101
1200
|
return {
|
|
1102
1201
|
title: ButtonTitle,
|
|
1103
1202
|
icon: FileSettingsIcon,
|
|
@@ -1137,11 +1236,11 @@ import {
|
|
|
1137
1236
|
__privateUseRouteStatus as useRouteStatus2
|
|
1138
1237
|
} from "@elementor/editor-v1-adapters";
|
|
1139
1238
|
import { PlusIcon } from "@elementor/icons";
|
|
1140
|
-
import { __ as
|
|
1239
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
1141
1240
|
function useActionProps4() {
|
|
1142
1241
|
const { isActive, isBlocked } = useRouteStatus2("panel/elements");
|
|
1143
1242
|
return {
|
|
1144
|
-
title:
|
|
1243
|
+
title: __17("Add Element", "elementor"),
|
|
1145
1244
|
icon: PlusIcon,
|
|
1146
1245
|
onClick: () => {
|
|
1147
1246
|
const extendedWindow = window;
|
|
@@ -1168,10 +1267,10 @@ import {
|
|
|
1168
1267
|
routeOpenEvent,
|
|
1169
1268
|
v1ReadyEvent
|
|
1170
1269
|
} from "@elementor/editor-v1-adapters";
|
|
1171
|
-
import { __ as
|
|
1270
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1172
1271
|
function syncPanelTitle() {
|
|
1173
|
-
const panelTitle =
|
|
1174
|
-
const tabTitle =
|
|
1272
|
+
const panelTitle = __18("Elements", "elementor");
|
|
1273
|
+
const tabTitle = __18("Widgets", "elementor");
|
|
1175
1274
|
listenTo(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
|
import { isExperimentActive as isExperimentActive2 } from "@elementor/editor-v1-adapters";
|
|
1208
1307
|
import { MessageLinesIcon } from "@elementor/icons";
|
|
1209
|
-
import { __ as
|
|
1308
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
1210
1309
|
function init7() {
|
|
1211
1310
|
const isActive = isExperimentActive2(EXPERIMENT_NAME);
|
|
1212
1311
|
if (!isActive) {
|
|
@@ -1219,7 +1318,7 @@ function init7() {
|
|
|
1219
1318
|
useProps: () => {
|
|
1220
1319
|
return {
|
|
1221
1320
|
icon: MessageLinesIcon,
|
|
1222
|
-
title:
|
|
1321
|
+
title: __19("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
|
import { __privateRunCommand as runCommand4 } from "@elementor/editor-v1-adapters";
|
|
1233
1332
|
import { SearchIcon } from "@elementor/icons";
|
|
1234
|
-
import { __ as
|
|
1333
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1235
1334
|
function useActionProps5() {
|
|
1236
1335
|
return {
|
|
1237
|
-
title:
|
|
1336
|
+
title: __20("Finder", "elementor"),
|
|
1238
1337
|
icon: 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
|
import { HelpIcon } from "@elementor/icons";
|
|
1266
|
-
import { __ as
|
|
1365
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1267
1366
|
function useActionProps6() {
|
|
1268
1367
|
return {
|
|
1269
|
-
title:
|
|
1368
|
+
title: __21("Help Center", "elementor"),
|
|
1270
1369
|
href: "https://go.elementor.com/editor-top-bar-learn/",
|
|
1271
1370
|
icon: HelpIcon,
|
|
1272
1371
|
target: "_blank",
|
|
@@ -1301,11 +1400,11 @@ import {
|
|
|
1301
1400
|
__privateUseRouteStatus as useRouteStatus3
|
|
1302
1401
|
} from "@elementor/editor-v1-adapters";
|
|
1303
1402
|
import { HistoryIcon } from "@elementor/icons";
|
|
1304
|
-
import { __ as
|
|
1403
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
1305
1404
|
function useActionProps7() {
|
|
1306
1405
|
const { isActive, isBlocked } = useRouteStatus3("panel/history");
|
|
1307
1406
|
return {
|
|
1308
|
-
title:
|
|
1407
|
+
title: __22("History", "elementor"),
|
|
1309
1408
|
icon: HistoryIcon,
|
|
1310
1409
|
onClick: () => {
|
|
1311
1410
|
const extendedWindow = window;
|
|
@@ -1337,11 +1436,11 @@ function init10() {
|
|
|
1337
1436
|
// src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
|
|
1338
1437
|
import { __privateRunCommand as runCommand5 } from "@elementor/editor-v1-adapters";
|
|
1339
1438
|
import { KeyboardIcon } from "@elementor/icons";
|
|
1340
|
-
import { __ as
|
|
1439
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
1341
1440
|
function useActionProps8() {
|
|
1342
1441
|
return {
|
|
1343
1442
|
icon: KeyboardIcon,
|
|
1344
|
-
title:
|
|
1443
|
+
title: __23("Keyboard Shortcuts", "elementor"),
|
|
1345
1444
|
onClick: () => {
|
|
1346
1445
|
const extendedWindow = window;
|
|
1347
1446
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1369,7 +1468,7 @@ function init11() {
|
|
|
1369
1468
|
}
|
|
1370
1469
|
|
|
1371
1470
|
// src/extensions/responsive/components/breakpoints-switcher.tsx
|
|
1372
|
-
import * as
|
|
1471
|
+
import * as React25 from "react";
|
|
1373
1472
|
import {
|
|
1374
1473
|
useActivateBreakpoint,
|
|
1375
1474
|
useActiveBreakpoint,
|
|
@@ -1385,7 +1484,7 @@ import {
|
|
|
1385
1484
|
WidescreenIcon
|
|
1386
1485
|
} from "@elementor/icons";
|
|
1387
1486
|
import { Tab, Tabs, Tooltip as BaseTooltip2 } from "@elementor/ui";
|
|
1388
|
-
import { __ as
|
|
1487
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1389
1488
|
function BreakpointsSwitcher() {
|
|
1390
1489
|
const breakpoints = useBreakpoints();
|
|
1391
1490
|
const activeBreakpoint = useActiveBreakpoint();
|
|
@@ -1407,14 +1506,14 @@ function BreakpointsSwitcher() {
|
|
|
1407
1506
|
}
|
|
1408
1507
|
activateBreakpoint(value);
|
|
1409
1508
|
};
|
|
1410
|
-
return /* @__PURE__ */
|
|
1509
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1411
1510
|
Tabs,
|
|
1412
1511
|
{
|
|
1413
1512
|
textColor: "inherit",
|
|
1414
1513
|
indicatorColor: "secondary",
|
|
1415
1514
|
value: activeBreakpoint,
|
|
1416
1515
|
onChange,
|
|
1417
|
-
"aria-label":
|
|
1516
|
+
"aria-label": __24("Switch Device", "elementor"),
|
|
1418
1517
|
sx: {
|
|
1419
1518
|
"& .MuiTabs-indicator": {
|
|
1420
1519
|
backgroundColor: "text.primary"
|
|
@@ -1424,13 +1523,13 @@ function BreakpointsSwitcher() {
|
|
|
1424
1523
|
breakpoints.map(({ id, label, type, width }) => {
|
|
1425
1524
|
const Icon = iconsMap[id];
|
|
1426
1525
|
const title = labelsMap[type || "default"].replace("%s", label).replace("%d", width?.toString() || "");
|
|
1427
|
-
return /* @__PURE__ */
|
|
1526
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1428
1527
|
Tab,
|
|
1429
1528
|
{
|
|
1430
1529
|
value: id,
|
|
1431
1530
|
key: id,
|
|
1432
1531
|
"aria-label": title,
|
|
1433
|
-
icon: /* @__PURE__ */
|
|
1532
|
+
icon: /* @__PURE__ */ React25.createElement(Tooltip4, { title }, /* @__PURE__ */ React25.createElement(Icon, null)),
|
|
1434
1533
|
sx: { minWidth: "auto" },
|
|
1435
1534
|
"data-testid": `switch-device-to-${id}`
|
|
1436
1535
|
}
|
|
@@ -1439,7 +1538,7 @@ function BreakpointsSwitcher() {
|
|
|
1439
1538
|
);
|
|
1440
1539
|
}
|
|
1441
1540
|
function Tooltip4(props) {
|
|
1442
|
-
return /* @__PURE__ */
|
|
1541
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1443
1542
|
BaseTooltip2,
|
|
1444
1543
|
{
|
|
1445
1544
|
PopperProps: {
|
|
@@ -1465,9 +1564,9 @@ var iconsMap = {
|
|
|
1465
1564
|
var labelsMap = {
|
|
1466
1565
|
default: "%s",
|
|
1467
1566
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1468
|
-
"min-width":
|
|
1567
|
+
"min-width": __24("%s (%dpx and up)", "elementor"),
|
|
1469
1568
|
// translators: %s: Breakpoint label, %d: Breakpoint size.
|
|
1470
|
-
"max-width":
|
|
1569
|
+
"max-width": __24("%s (up to %dpx)", "elementor")
|
|
1471
1570
|
};
|
|
1472
1571
|
|
|
1473
1572
|
// src/extensions/responsive/index.ts
|
|
@@ -1486,10 +1585,10 @@ function init12() {
|
|
|
1486
1585
|
import { injectIntoTop } from "@elementor/editor";
|
|
1487
1586
|
|
|
1488
1587
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
1489
|
-
import * as
|
|
1588
|
+
import * as React28 from "react";
|
|
1490
1589
|
|
|
1491
1590
|
// src/extensions/site-settings/components/portal.tsx
|
|
1492
|
-
import * as
|
|
1591
|
+
import * as React26 from "react";
|
|
1493
1592
|
import {
|
|
1494
1593
|
__privateIsRouteActive as isRouteActive2,
|
|
1495
1594
|
__privateUseListenTo as useListenTo,
|
|
@@ -1505,24 +1604,24 @@ function Portal(props) {
|
|
|
1505
1604
|
if (!containerRef.current) {
|
|
1506
1605
|
return null;
|
|
1507
1606
|
}
|
|
1508
|
-
return /* @__PURE__ */
|
|
1607
|
+
return /* @__PURE__ */ React26.createElement(BasePortal, { container: containerRef.current, ...props });
|
|
1509
1608
|
}
|
|
1510
1609
|
function getContainerRef() {
|
|
1511
1610
|
return isRouteActive2("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
|
|
1512
1611
|
}
|
|
1513
1612
|
|
|
1514
1613
|
// src/extensions/site-settings/components/primary-action.tsx
|
|
1515
|
-
import * as
|
|
1614
|
+
import * as React27 from "react";
|
|
1516
1615
|
import {
|
|
1517
1616
|
__useActiveDocument as useActiveDocument9,
|
|
1518
1617
|
__useActiveDocumentActions as useActiveDocumentActions5
|
|
1519
1618
|
} from "@elementor/editor-documents";
|
|
1520
|
-
import { Button as
|
|
1521
|
-
import { __ as
|
|
1619
|
+
import { Button as Button4, CircularProgress as CircularProgress2, Paper } from "@elementor/ui";
|
|
1620
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1522
1621
|
function PrimaryAction2() {
|
|
1523
1622
|
const document2 = useActiveDocument9();
|
|
1524
1623
|
const { save } = useActiveDocumentActions5();
|
|
1525
|
-
return /* @__PURE__ */
|
|
1624
|
+
return /* @__PURE__ */ React27.createElement(
|
|
1526
1625
|
Paper,
|
|
1527
1626
|
{
|
|
1528
1627
|
sx: {
|
|
@@ -1532,8 +1631,8 @@ function PrimaryAction2() {
|
|
|
1532
1631
|
borderColor: "divider"
|
|
1533
1632
|
}
|
|
1534
1633
|
},
|
|
1535
|
-
/* @__PURE__ */
|
|
1536
|
-
|
|
1634
|
+
/* @__PURE__ */ React27.createElement(
|
|
1635
|
+
Button4,
|
|
1537
1636
|
{
|
|
1538
1637
|
variant: "contained",
|
|
1539
1638
|
disabled: !document2 || !document2.isDirty,
|
|
@@ -1541,14 +1640,14 @@ function PrimaryAction2() {
|
|
|
1541
1640
|
sx: { width: "100%" },
|
|
1542
1641
|
onClick: () => document2 && !document2.isSaving ? save() : null
|
|
1543
1642
|
},
|
|
1544
|
-
document2?.isSaving ? /* @__PURE__ */
|
|
1643
|
+
document2?.isSaving ? /* @__PURE__ */ React27.createElement(CircularProgress2, null) : __25("Save Changes", "elementor")
|
|
1545
1644
|
)
|
|
1546
1645
|
);
|
|
1547
1646
|
}
|
|
1548
1647
|
|
|
1549
1648
|
// src/extensions/site-settings/components/portalled-primary-action.tsx
|
|
1550
1649
|
function PortalledPrimaryAction() {
|
|
1551
|
-
return /* @__PURE__ */
|
|
1650
|
+
return /* @__PURE__ */ React28.createElement(Portal, null, /* @__PURE__ */ React28.createElement(PrimaryAction2, null));
|
|
1552
1651
|
}
|
|
1553
1652
|
|
|
1554
1653
|
// src/extensions/site-settings/hooks/use-action-props.ts
|
|
@@ -1557,13 +1656,13 @@ import {
|
|
|
1557
1656
|
__privateUseRouteStatus as useRouteStatus4
|
|
1558
1657
|
} from "@elementor/editor-v1-adapters";
|
|
1559
1658
|
import { SettingsIcon } from "@elementor/icons";
|
|
1560
|
-
import { __ as
|
|
1659
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1561
1660
|
function useActionProps9() {
|
|
1562
1661
|
const { isActive, isBlocked } = useRouteStatus4("panel/global", {
|
|
1563
1662
|
blockOnKitRoutes: false
|
|
1564
1663
|
});
|
|
1565
1664
|
return {
|
|
1566
|
-
title:
|
|
1665
|
+
title: __26("Site Settings", "elementor"),
|
|
1567
1666
|
icon: SettingsIcon,
|
|
1568
1667
|
onClick: () => {
|
|
1569
1668
|
const extendedWindow = window;
|
|
@@ -1607,11 +1706,11 @@ import {
|
|
|
1607
1706
|
__privateUseRouteStatus as useRouteStatus5
|
|
1608
1707
|
} from "@elementor/editor-v1-adapters";
|
|
1609
1708
|
import { StructureIcon } from "@elementor/icons";
|
|
1610
|
-
import { __ as
|
|
1709
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
1611
1710
|
function useActionProps10() {
|
|
1612
1711
|
const { isActive, isBlocked } = useRouteStatus5("navigator");
|
|
1613
1712
|
return {
|
|
1614
|
-
title:
|
|
1713
|
+
title: __27("Structure", "elementor"),
|
|
1615
1714
|
icon: StructureIcon,
|
|
1616
1715
|
onClick: () => {
|
|
1617
1716
|
const extendedWindow = window;
|
|
@@ -1643,11 +1742,11 @@ function init14() {
|
|
|
1643
1742
|
// src/extensions/theme-builder/hooks/use-action-props.ts
|
|
1644
1743
|
import { __privateRunCommand as runCommand8 } from "@elementor/editor-v1-adapters";
|
|
1645
1744
|
import { ThemeBuilderIcon } from "@elementor/icons";
|
|
1646
|
-
import { __ as
|
|
1745
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
1647
1746
|
function useActionProps11() {
|
|
1648
1747
|
return {
|
|
1649
1748
|
icon: ThemeBuilderIcon,
|
|
1650
|
-
title:
|
|
1749
|
+
title: __28("Theme Builder", "elementor"),
|
|
1651
1750
|
onClick: () => {
|
|
1652
1751
|
const extendedWindow = window;
|
|
1653
1752
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1680,12 +1779,12 @@ import {
|
|
|
1680
1779
|
__privateUseRouteStatus as useRouteStatus6
|
|
1681
1780
|
} from "@elementor/editor-v1-adapters";
|
|
1682
1781
|
import { ToggleRightIcon } from "@elementor/icons";
|
|
1683
|
-
import { __ as
|
|
1782
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
1684
1783
|
function useActionProps12() {
|
|
1685
1784
|
const { isActive, isBlocked } = useRouteStatus6("panel/editor-preferences");
|
|
1686
1785
|
return {
|
|
1687
1786
|
icon: ToggleRightIcon,
|
|
1688
|
-
title:
|
|
1787
|
+
title: __29("User Preferences", "elementor"),
|
|
1689
1788
|
onClick: () => {
|
|
1690
1789
|
const extendedWindow = window;
|
|
1691
1790
|
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
@@ -1717,7 +1816,7 @@ function init16() {
|
|
|
1717
1816
|
// src/extensions/wordpress/index.ts
|
|
1718
1817
|
import { __useActiveDocument as useActiveDocument10 } from "@elementor/editor-documents";
|
|
1719
1818
|
import { WordpressIcon } from "@elementor/icons";
|
|
1720
|
-
import { __ as
|
|
1819
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
1721
1820
|
function init17() {
|
|
1722
1821
|
mainMenu.registerLink({
|
|
1723
1822
|
id: "exit-to-wordpress",
|
|
@@ -1726,7 +1825,7 @@ function init17() {
|
|
|
1726
1825
|
useProps: () => {
|
|
1727
1826
|
const document2 = useActiveDocument10();
|
|
1728
1827
|
return {
|
|
1729
|
-
title:
|
|
1828
|
+
title: __30("Exit to WordPress", "elementor"),
|
|
1730
1829
|
href: document2?.links?.platformEdit,
|
|
1731
1830
|
icon: WordpressIcon,
|
|
1732
1831
|
onClick: () => {
|