@elementor/editor-ui 4.0.0-manual → 4.1.0-685
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.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +18 -8
- package/dist/index.mjs +18 -8
- package/package.json +2 -2
- package/src/components/promotions/promotion-alert.tsx +3 -1
- package/src/components/promotions/promotion-infotip.tsx +9 -4
- package/src/components/promotions/promotion-popover.tsx +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -114,11 +114,12 @@ type InfotipCardProps = {
|
|
|
114
114
|
assetUrl: string;
|
|
115
115
|
ctaUrl: string;
|
|
116
116
|
onClose: (e: MouseEvent) => void;
|
|
117
|
+
onCtaClick?: () => void;
|
|
117
118
|
};
|
|
118
119
|
type PromotionInfotipProps = React$1.PropsWithChildren<InfotipCardProps & {
|
|
119
120
|
open?: boolean;
|
|
120
121
|
}>;
|
|
121
|
-
declare const PromotionInfotip: ({ children, open, onClose, ...cardProps }: PromotionInfotipProps) => React$1.JSX.Element;
|
|
122
|
+
declare const PromotionInfotip: ({ children, open, onClose, onCtaClick, ...cardProps }: PromotionInfotipProps) => React$1.JSX.Element;
|
|
122
123
|
|
|
123
124
|
type PromotionPopoverCardProps = {
|
|
124
125
|
title: string;
|
|
@@ -126,6 +127,7 @@ type PromotionPopoverCardProps = {
|
|
|
126
127
|
ctaUrl: string;
|
|
127
128
|
ctaText?: string;
|
|
128
129
|
onClose: (e: MouseEvent$1) => void;
|
|
130
|
+
onCtaClick?: () => void;
|
|
129
131
|
};
|
|
130
132
|
type PromotionPopoverProps = React$1.PropsWithChildren<PromotionPopoverCardProps & {
|
|
131
133
|
open: boolean;
|
|
@@ -140,8 +142,9 @@ declare const PromotionChip: React$1.ForwardRefExoticComponent<React$1.RefAttrib
|
|
|
140
142
|
type PromotionAlertProps = {
|
|
141
143
|
message: string;
|
|
142
144
|
upgradeUrl: string;
|
|
145
|
+
onCtaClick?: () => void;
|
|
143
146
|
};
|
|
144
|
-
declare const PromotionAlert: ({ message, upgradeUrl }: PromotionAlertProps) => React$1.JSX.Element;
|
|
147
|
+
declare const PromotionAlert: ({ message, upgradeUrl, onCtaClick }: PromotionAlertProps) => React$1.JSX.Element;
|
|
145
148
|
|
|
146
149
|
declare function FloatingActionsBar({ actions, children }: PropsWithChildren<{
|
|
147
150
|
actions: ReactElement[];
|
package/dist/index.d.ts
CHANGED
|
@@ -114,11 +114,12 @@ type InfotipCardProps = {
|
|
|
114
114
|
assetUrl: string;
|
|
115
115
|
ctaUrl: string;
|
|
116
116
|
onClose: (e: MouseEvent) => void;
|
|
117
|
+
onCtaClick?: () => void;
|
|
117
118
|
};
|
|
118
119
|
type PromotionInfotipProps = React$1.PropsWithChildren<InfotipCardProps & {
|
|
119
120
|
open?: boolean;
|
|
120
121
|
}>;
|
|
121
|
-
declare const PromotionInfotip: ({ children, open, onClose, ...cardProps }: PromotionInfotipProps) => React$1.JSX.Element;
|
|
122
|
+
declare const PromotionInfotip: ({ children, open, onClose, onCtaClick, ...cardProps }: PromotionInfotipProps) => React$1.JSX.Element;
|
|
122
123
|
|
|
123
124
|
type PromotionPopoverCardProps = {
|
|
124
125
|
title: string;
|
|
@@ -126,6 +127,7 @@ type PromotionPopoverCardProps = {
|
|
|
126
127
|
ctaUrl: string;
|
|
127
128
|
ctaText?: string;
|
|
128
129
|
onClose: (e: MouseEvent$1) => void;
|
|
130
|
+
onCtaClick?: () => void;
|
|
129
131
|
};
|
|
130
132
|
type PromotionPopoverProps = React$1.PropsWithChildren<PromotionPopoverCardProps & {
|
|
131
133
|
open: boolean;
|
|
@@ -140,8 +142,9 @@ declare const PromotionChip: React$1.ForwardRefExoticComponent<React$1.RefAttrib
|
|
|
140
142
|
type PromotionAlertProps = {
|
|
141
143
|
message: string;
|
|
142
144
|
upgradeUrl: string;
|
|
145
|
+
onCtaClick?: () => void;
|
|
143
146
|
};
|
|
144
|
-
declare const PromotionAlert: ({ message, upgradeUrl }: PromotionAlertProps) => React$1.JSX.Element;
|
|
147
|
+
declare const PromotionAlert: ({ message, upgradeUrl, onCtaClick }: PromotionAlertProps) => React$1.JSX.Element;
|
|
145
148
|
|
|
146
149
|
declare function FloatingActionsBar({ actions, children }: PropsWithChildren<{
|
|
147
150
|
actions: ReactElement[];
|
package/dist/index.js
CHANGED
|
@@ -576,11 +576,19 @@ var useCanvasClickHandler = (isActive, onClickAway) => {
|
|
|
576
576
|
};
|
|
577
577
|
|
|
578
578
|
// src/components/promotions/promotion-infotip.tsx
|
|
579
|
-
var PromotionInfotip = ({ children, open, onClose, ...cardProps }) => {
|
|
579
|
+
var PromotionInfotip = ({ children, open, onClose, onCtaClick, ...cardProps }) => {
|
|
580
580
|
useCanvasClickHandler(!!open, onClose);
|
|
581
|
-
return /* @__PURE__ */ React14.createElement(
|
|
581
|
+
return /* @__PURE__ */ React14.createElement(
|
|
582
|
+
import_ui14.Infotip,
|
|
583
|
+
{
|
|
584
|
+
placement: "right",
|
|
585
|
+
content: /* @__PURE__ */ React14.createElement(InfotipCard, { onClose, onCtaClick, ...cardProps }),
|
|
586
|
+
open
|
|
587
|
+
},
|
|
588
|
+
children
|
|
589
|
+
);
|
|
582
590
|
};
|
|
583
|
-
function InfotipCard({ title, content, assetUrl, ctaUrl, onClose }) {
|
|
591
|
+
function InfotipCard({ title, content, assetUrl, ctaUrl, onClose, onCtaClick }) {
|
|
584
592
|
return /* @__PURE__ */ React14.createElement(
|
|
585
593
|
import_ui14.ClickAwayListener,
|
|
586
594
|
{
|
|
@@ -595,7 +603,7 @@ function InfotipCard({ title, content, assetUrl, ctaUrl, onClose }) {
|
|
|
595
603
|
title,
|
|
596
604
|
action: /* @__PURE__ */ React14.createElement(import_ui14.CloseButton, { slotProps: { icon: { fontSize: "tiny" } }, onClick: onClose })
|
|
597
605
|
}
|
|
598
|
-
), /* @__PURE__ */ React14.createElement(import_ui14.CardMedia, { component: "img", image: assetUrl, alt: "", sx: { width: "100%", aspectRatio: "16 / 9" } }), /* @__PURE__ */ React14.createElement(import_ui14.CardContent, null, /* @__PURE__ */ React14.createElement(import_ui14.Typography, { variant: "body2", color: "text.secondary" }, content)), /* @__PURE__ */ React14.createElement(import_ui14.CardActions, { sx: { justifyContent: "flex-start" } }, /* @__PURE__ */ React14.createElement(CtaButton, { href: ctaUrl })))
|
|
606
|
+
), /* @__PURE__ */ React14.createElement(import_ui14.CardMedia, { component: "img", image: assetUrl, alt: "", sx: { width: "100%", aspectRatio: "16 / 9" } }), /* @__PURE__ */ React14.createElement(import_ui14.CardContent, null, /* @__PURE__ */ React14.createElement(import_ui14.Typography, { variant: "body2", color: "text.secondary" }, content)), /* @__PURE__ */ React14.createElement(import_ui14.CardActions, { sx: { justifyContent: "flex-start" } }, /* @__PURE__ */ React14.createElement(CtaButton, { href: ctaUrl, onClick: onCtaClick })))
|
|
599
607
|
);
|
|
600
608
|
}
|
|
601
609
|
|
|
@@ -637,7 +645,7 @@ var PromotionPopover = ({
|
|
|
637
645
|
children
|
|
638
646
|
);
|
|
639
647
|
};
|
|
640
|
-
function PopoverAlert({ title, content, ctaUrl, ctaText, onClose }) {
|
|
648
|
+
function PopoverAlert({ title, content, ctaUrl, ctaText, onClose, onCtaClick }) {
|
|
641
649
|
return /* @__PURE__ */ React15.createElement(
|
|
642
650
|
import_ui15.ClickAwayListener,
|
|
643
651
|
{
|
|
@@ -663,7 +671,8 @@ function PopoverAlert({ title, content, ctaUrl, ctaText, onClose }) {
|
|
|
663
671
|
color: "promotion",
|
|
664
672
|
href: ctaUrl,
|
|
665
673
|
target: "_blank",
|
|
666
|
-
rel: "noopener noreferrer"
|
|
674
|
+
rel: "noopener noreferrer",
|
|
675
|
+
onClick: onCtaClick
|
|
667
676
|
},
|
|
668
677
|
ctaText
|
|
669
678
|
),
|
|
@@ -705,7 +714,7 @@ var React17 = __toESM(require("react"));
|
|
|
705
714
|
var import_icons7 = require("@elementor/icons");
|
|
706
715
|
var import_ui17 = require("@elementor/ui");
|
|
707
716
|
var import_i18n5 = require("@wordpress/i18n");
|
|
708
|
-
var PromotionAlert = ({ message, upgradeUrl }) => /* @__PURE__ */ React17.createElement(
|
|
717
|
+
var PromotionAlert = ({ message, upgradeUrl, onCtaClick }) => /* @__PURE__ */ React17.createElement(
|
|
709
718
|
import_ui17.Alert,
|
|
710
719
|
{
|
|
711
720
|
variant: "standard",
|
|
@@ -726,7 +735,8 @@ var PromotionAlert = ({ message, upgradeUrl }) => /* @__PURE__ */ React17.create
|
|
|
726
735
|
target: "_blank",
|
|
727
736
|
href: upgradeUrl,
|
|
728
737
|
rel: "noopener noreferrer",
|
|
729
|
-
startIcon: /* @__PURE__ */ React17.createElement(import_icons7.CrownFilledIcon, { fontSize: "tiny" })
|
|
738
|
+
startIcon: /* @__PURE__ */ React17.createElement(import_icons7.CrownFilledIcon, { fontSize: "tiny" }),
|
|
739
|
+
onClick: onCtaClick
|
|
730
740
|
},
|
|
731
741
|
(0, import_i18n5.__)("Upgrade now", "elementor")
|
|
732
742
|
)
|
package/dist/index.mjs
CHANGED
|
@@ -530,11 +530,19 @@ var useCanvasClickHandler = (isActive, onClickAway) => {
|
|
|
530
530
|
};
|
|
531
531
|
|
|
532
532
|
// src/components/promotions/promotion-infotip.tsx
|
|
533
|
-
var PromotionInfotip = ({ children, open, onClose, ...cardProps }) => {
|
|
533
|
+
var PromotionInfotip = ({ children, open, onClose, onCtaClick, ...cardProps }) => {
|
|
534
534
|
useCanvasClickHandler(!!open, onClose);
|
|
535
|
-
return /* @__PURE__ */ React14.createElement(
|
|
535
|
+
return /* @__PURE__ */ React14.createElement(
|
|
536
|
+
Infotip3,
|
|
537
|
+
{
|
|
538
|
+
placement: "right",
|
|
539
|
+
content: /* @__PURE__ */ React14.createElement(InfotipCard, { onClose, onCtaClick, ...cardProps }),
|
|
540
|
+
open
|
|
541
|
+
},
|
|
542
|
+
children
|
|
543
|
+
);
|
|
536
544
|
};
|
|
537
|
-
function InfotipCard({ title, content, assetUrl, ctaUrl, onClose }) {
|
|
545
|
+
function InfotipCard({ title, content, assetUrl, ctaUrl, onClose, onCtaClick }) {
|
|
538
546
|
return /* @__PURE__ */ React14.createElement(
|
|
539
547
|
ClickAwayListener,
|
|
540
548
|
{
|
|
@@ -549,7 +557,7 @@ function InfotipCard({ title, content, assetUrl, ctaUrl, onClose }) {
|
|
|
549
557
|
title,
|
|
550
558
|
action: /* @__PURE__ */ React14.createElement(CloseButton, { slotProps: { icon: { fontSize: "tiny" } }, onClick: onClose })
|
|
551
559
|
}
|
|
552
|
-
), /* @__PURE__ */ React14.createElement(CardMedia, { component: "img", image: assetUrl, alt: "", sx: { width: "100%", aspectRatio: "16 / 9" } }), /* @__PURE__ */ React14.createElement(CardContent2, null, /* @__PURE__ */ React14.createElement(Typography3, { variant: "body2", color: "text.secondary" }, content)), /* @__PURE__ */ React14.createElement(CardActions2, { sx: { justifyContent: "flex-start" } }, /* @__PURE__ */ React14.createElement(CtaButton, { href: ctaUrl })))
|
|
560
|
+
), /* @__PURE__ */ React14.createElement(CardMedia, { component: "img", image: assetUrl, alt: "", sx: { width: "100%", aspectRatio: "16 / 9" } }), /* @__PURE__ */ React14.createElement(CardContent2, null, /* @__PURE__ */ React14.createElement(Typography3, { variant: "body2", color: "text.secondary" }, content)), /* @__PURE__ */ React14.createElement(CardActions2, { sx: { justifyContent: "flex-start" } }, /* @__PURE__ */ React14.createElement(CtaButton, { href: ctaUrl, onClick: onCtaClick })))
|
|
553
561
|
);
|
|
554
562
|
}
|
|
555
563
|
|
|
@@ -599,7 +607,7 @@ var PromotionPopover = ({
|
|
|
599
607
|
children
|
|
600
608
|
);
|
|
601
609
|
};
|
|
602
|
-
function PopoverAlert({ title, content, ctaUrl, ctaText, onClose }) {
|
|
610
|
+
function PopoverAlert({ title, content, ctaUrl, ctaText, onClose, onCtaClick }) {
|
|
603
611
|
return /* @__PURE__ */ React15.createElement(
|
|
604
612
|
ClickAwayListener2,
|
|
605
613
|
{
|
|
@@ -625,7 +633,8 @@ function PopoverAlert({ title, content, ctaUrl, ctaText, onClose }) {
|
|
|
625
633
|
color: "promotion",
|
|
626
634
|
href: ctaUrl,
|
|
627
635
|
target: "_blank",
|
|
628
|
-
rel: "noopener noreferrer"
|
|
636
|
+
rel: "noopener noreferrer",
|
|
637
|
+
onClick: onCtaClick
|
|
629
638
|
},
|
|
630
639
|
ctaText
|
|
631
640
|
),
|
|
@@ -667,7 +676,7 @@ import * as React17 from "react";
|
|
|
667
676
|
import { CrownFilledIcon as CrownFilledIcon4 } from "@elementor/icons";
|
|
668
677
|
import { Alert as Alert4, Button as Button5 } from "@elementor/ui";
|
|
669
678
|
import { __ as __5 } from "@wordpress/i18n";
|
|
670
|
-
var PromotionAlert = ({ message, upgradeUrl }) => /* @__PURE__ */ React17.createElement(
|
|
679
|
+
var PromotionAlert = ({ message, upgradeUrl, onCtaClick }) => /* @__PURE__ */ React17.createElement(
|
|
671
680
|
Alert4,
|
|
672
681
|
{
|
|
673
682
|
variant: "standard",
|
|
@@ -688,7 +697,8 @@ var PromotionAlert = ({ message, upgradeUrl }) => /* @__PURE__ */ React17.create
|
|
|
688
697
|
target: "_blank",
|
|
689
698
|
href: upgradeUrl,
|
|
690
699
|
rel: "noopener noreferrer",
|
|
691
|
-
startIcon: /* @__PURE__ */ React17.createElement(CrownFilledIcon4, { fontSize: "tiny" })
|
|
700
|
+
startIcon: /* @__PURE__ */ React17.createElement(CrownFilledIcon4, { fontSize: "tiny" }),
|
|
701
|
+
onClick: onCtaClick
|
|
692
702
|
},
|
|
693
703
|
__5("Upgrade now", "elementor")
|
|
694
704
|
)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-ui",
|
|
3
3
|
"description": "Elementor Editor UI",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.1.0-685",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react-dom": "^18.3.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@elementor/editor-v1-adapters": "4.
|
|
40
|
+
"@elementor/editor-v1-adapters": "4.1.0-685",
|
|
41
41
|
"@elementor/icons": "^1.68.0",
|
|
42
42
|
"@elementor/ui": "1.36.17",
|
|
43
43
|
"@tanstack/react-virtual": "^3.13.3",
|
|
@@ -6,9 +6,10 @@ import { __ } from '@wordpress/i18n';
|
|
|
6
6
|
type PromotionAlertProps = {
|
|
7
7
|
message: string;
|
|
8
8
|
upgradeUrl: string;
|
|
9
|
+
onCtaClick?: () => void;
|
|
9
10
|
};
|
|
10
11
|
|
|
11
|
-
export const PromotionAlert = ( { message, upgradeUrl }: PromotionAlertProps ) => (
|
|
12
|
+
export const PromotionAlert = ( { message, upgradeUrl, onCtaClick }: PromotionAlertProps ) => (
|
|
12
13
|
<Alert
|
|
13
14
|
variant="standard"
|
|
14
15
|
color="promotion"
|
|
@@ -27,6 +28,7 @@ export const PromotionAlert = ( { message, upgradeUrl }: PromotionAlertProps ) =
|
|
|
27
28
|
href={ upgradeUrl }
|
|
28
29
|
rel="noopener noreferrer"
|
|
29
30
|
startIcon={ <CrownFilledIcon fontSize="tiny" /> }
|
|
31
|
+
onClick={ onCtaClick }
|
|
30
32
|
>
|
|
31
33
|
{ __( 'Upgrade now', 'elementor' ) }
|
|
32
34
|
</Button>
|
|
@@ -20,6 +20,7 @@ type InfotipCardProps = {
|
|
|
20
20
|
assetUrl: string;
|
|
21
21
|
ctaUrl: string;
|
|
22
22
|
onClose: ( e: MouseEvent ) => void;
|
|
23
|
+
onCtaClick?: () => void;
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
type PromotionInfotipProps = React.PropsWithChildren<
|
|
@@ -28,17 +29,21 @@ type PromotionInfotipProps = React.PropsWithChildren<
|
|
|
28
29
|
}
|
|
29
30
|
>;
|
|
30
31
|
|
|
31
|
-
export const PromotionInfotip = ( { children, open, onClose, ...cardProps }: PromotionInfotipProps ) => {
|
|
32
|
+
export const PromotionInfotip = ( { children, open, onClose, onCtaClick, ...cardProps }: PromotionInfotipProps ) => {
|
|
32
33
|
useCanvasClickHandler( !! open, onClose );
|
|
33
34
|
|
|
34
35
|
return (
|
|
35
|
-
<Infotip
|
|
36
|
+
<Infotip
|
|
37
|
+
placement="right"
|
|
38
|
+
content={ <InfotipCard onClose={ onClose } onCtaClick={ onCtaClick } { ...cardProps } /> }
|
|
39
|
+
open={ open }
|
|
40
|
+
>
|
|
36
41
|
{ children }
|
|
37
42
|
</Infotip>
|
|
38
43
|
);
|
|
39
44
|
};
|
|
40
45
|
|
|
41
|
-
function InfotipCard( { title, content, assetUrl, ctaUrl, onClose }: InfotipCardProps ) {
|
|
46
|
+
function InfotipCard( { title, content, assetUrl, ctaUrl, onClose, onCtaClick }: InfotipCardProps ) {
|
|
42
47
|
return (
|
|
43
48
|
<ClickAwayListener
|
|
44
49
|
disableReactTree={ true }
|
|
@@ -58,7 +63,7 @@ function InfotipCard( { title, content, assetUrl, ctaUrl, onClose }: InfotipCard
|
|
|
58
63
|
</Typography>
|
|
59
64
|
</CardContent>
|
|
60
65
|
<CardActions sx={ { justifyContent: 'flex-start' } }>
|
|
61
|
-
<CtaButton href={ ctaUrl } />
|
|
66
|
+
<CtaButton href={ ctaUrl } onClick={ onCtaClick } />
|
|
62
67
|
</CardActions>
|
|
63
68
|
</Card>
|
|
64
69
|
</ClickAwayListener>
|
|
@@ -18,6 +18,7 @@ type PromotionPopoverCardProps = {
|
|
|
18
18
|
ctaUrl: string;
|
|
19
19
|
ctaText?: string;
|
|
20
20
|
onClose: ( e: MouseEvent ) => void;
|
|
21
|
+
onCtaClick?: () => void;
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
type PromotionPopoverProps = React.PropsWithChildren<
|
|
@@ -66,7 +67,7 @@ export const PromotionPopover = ( {
|
|
|
66
67
|
);
|
|
67
68
|
};
|
|
68
69
|
|
|
69
|
-
function PopoverAlert( { title, content, ctaUrl, ctaText, onClose }: PromotionPopoverCardProps ) {
|
|
70
|
+
function PopoverAlert( { title, content, ctaUrl, ctaText, onClose, onCtaClick }: PromotionPopoverCardProps ) {
|
|
70
71
|
return (
|
|
71
72
|
<ClickAwayListener
|
|
72
73
|
disableReactTree={ true }
|
|
@@ -89,6 +90,7 @@ function PopoverAlert( { title, content, ctaUrl, ctaText, onClose }: PromotionPo
|
|
|
89
90
|
href={ ctaUrl }
|
|
90
91
|
target="_blank"
|
|
91
92
|
rel="noopener noreferrer"
|
|
93
|
+
onClick={ onCtaClick }
|
|
92
94
|
>
|
|
93
95
|
{ ctaText }
|
|
94
96
|
</AlertAction>
|