@elementor/editor-controls 4.3.0-1059 → 4.3.0-1061
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 +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +243 -135
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +201 -83
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/controls/open-icon-library.ts +82 -0
- package/src/controls/svg-media-control.tsx +124 -18
package/dist/index.js
CHANGED
|
@@ -5379,7 +5379,7 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
5379
5379
|
var React81 = __toESM(require("react"));
|
|
5380
5380
|
var import_react49 = require("react");
|
|
5381
5381
|
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
5382
|
-
var
|
|
5382
|
+
var import_editor_props35 = require("@elementor/editor-props");
|
|
5383
5383
|
var import_icons21 = require("@elementor/icons");
|
|
5384
5384
|
var import_ui64 = require("@elementor/ui");
|
|
5385
5385
|
var import_wp_media2 = require("@elementor/wp-media");
|
|
@@ -5435,10 +5435,49 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
5435
5435
|
isPending ? /* @__PURE__ */ React80.createElement(import_ui63.CircularProgress, { size: 24 }) : (0, import_i18n31.__)("Enable", "elementor")
|
|
5436
5436
|
)));
|
|
5437
5437
|
|
|
5438
|
+
// src/controls/open-icon-library.ts
|
|
5439
|
+
var import_editor_props34 = require("@elementor/editor-props");
|
|
5440
|
+
var SVG_ICON_LIBRARY = "svg";
|
|
5441
|
+
function isSvgLibrarySelection(icon) {
|
|
5442
|
+
return icon.library === SVG_ICON_LIBRARY && typeof icon.value === "object" && icon.value !== null;
|
|
5443
|
+
}
|
|
5444
|
+
function openIconLibrary({ selected, onSelect } = {}) {
|
|
5445
|
+
const iconManager = window.elementor?.iconManager;
|
|
5446
|
+
if (!iconManager) {
|
|
5447
|
+
return;
|
|
5448
|
+
}
|
|
5449
|
+
iconManager.loadIconLibraries();
|
|
5450
|
+
iconManager.show({
|
|
5451
|
+
view: createIconManagerControlView(selected, onSelect)
|
|
5452
|
+
});
|
|
5453
|
+
}
|
|
5454
|
+
function enqueueIconFonts(library) {
|
|
5455
|
+
window.elementor?.helpers?.enqueueIconFonts?.(library);
|
|
5456
|
+
}
|
|
5457
|
+
function createIconManagerControlView(selected, onSelect) {
|
|
5458
|
+
return {
|
|
5459
|
+
model: {
|
|
5460
|
+
get: () => false
|
|
5461
|
+
},
|
|
5462
|
+
getControlValue: () => selected ?? { value: "", library: "" },
|
|
5463
|
+
setValue: (icon) => {
|
|
5464
|
+
onSelect?.(icon);
|
|
5465
|
+
},
|
|
5466
|
+
applySavedValue: () => void 0
|
|
5467
|
+
};
|
|
5468
|
+
}
|
|
5469
|
+
function createIconPropValue(icon, library) {
|
|
5470
|
+
return {
|
|
5471
|
+
value: import_editor_props34.stringPropTypeUtil.create(icon),
|
|
5472
|
+
library: import_editor_props34.stringPropTypeUtil.create(library)
|
|
5473
|
+
};
|
|
5474
|
+
}
|
|
5475
|
+
|
|
5438
5476
|
// src/controls/svg-media-control.tsx
|
|
5439
5477
|
var TILE_SIZE = 8;
|
|
5440
5478
|
var TILE_WHITE = "transparent";
|
|
5441
5479
|
var TILE_BLACK = "#c1c1c1";
|
|
5480
|
+
var ICON_PREVIEW_FONT_SIZE = 50;
|
|
5442
5481
|
var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
|
|
5443
5482
|
var StyledCard = (0, import_ui64.styled)(import_ui64.Card)`
|
|
5444
5483
|
background-color: white;
|
|
@@ -5460,26 +5499,29 @@ var StyledCardMediaContainer = (0, import_ui64.styled)(import_ui64.Stack)`
|
|
|
5460
5499
|
`;
|
|
5461
5500
|
var MODE_BROWSE = { mode: "browse" };
|
|
5462
5501
|
var MODE_UPLOAD = { mode: "upload" };
|
|
5463
|
-
var SvgMediaControl = createControl(() => {
|
|
5464
|
-
const { value, setValue } = useBoundProp(
|
|
5465
|
-
const
|
|
5466
|
-
const
|
|
5502
|
+
var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
5503
|
+
const { value: svgValue, setValue: setSvgValue } = useBoundProp(import_editor_props35.svgSrcPropTypeUtil);
|
|
5504
|
+
const { value: iconValue, setValue: setIconValue } = useBoundProp(import_editor_props35.iconPropTypeUtil);
|
|
5505
|
+
const id = svgValue?.id;
|
|
5506
|
+
const url = svgValue?.url;
|
|
5467
5507
|
const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(id?.value || null);
|
|
5468
5508
|
const src = attachment?.url ?? url?.value ?? null;
|
|
5469
5509
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
5470
5510
|
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = (0, import_react49.useState)(false);
|
|
5471
5511
|
const { isAdmin } = (0, import_editor_current_user.useCurrentUserCapabilities)();
|
|
5512
|
+
const selectedIconClass = showIconLibrary && typeof iconValue?.value?.value === "string" ? iconValue.value.value : null;
|
|
5513
|
+
const selectedIconLibrary = showIconLibrary && typeof iconValue?.library?.value === "string" ? iconValue.library.value : null;
|
|
5472
5514
|
const { open } = (0, import_wp_media2.useWpMediaFrame)({
|
|
5473
5515
|
mediaTypes: ["svg"],
|
|
5474
5516
|
multiple: false,
|
|
5475
5517
|
selected: id?.value || null,
|
|
5476
5518
|
onSelect: (selectedAttachment) => {
|
|
5477
|
-
|
|
5519
|
+
setSvgValue({
|
|
5478
5520
|
id: {
|
|
5479
5521
|
$$type: "image-attachment-id",
|
|
5480
5522
|
value: selectedAttachment.id
|
|
5481
5523
|
},
|
|
5482
|
-
url:
|
|
5524
|
+
url: import_editor_props35.urlPropTypeUtil.create(selectedAttachment.url)
|
|
5483
5525
|
});
|
|
5484
5526
|
}
|
|
5485
5527
|
});
|
|
@@ -5496,18 +5538,36 @@ var SvgMediaControl = createControl(() => {
|
|
|
5496
5538
|
open(openOptions);
|
|
5497
5539
|
}
|
|
5498
5540
|
};
|
|
5541
|
+
const handleIconLibrarySelect = (icon) => {
|
|
5542
|
+
if (!showIconLibrary) {
|
|
5543
|
+
return;
|
|
5544
|
+
}
|
|
5545
|
+
if (isSvgLibrarySelection(icon)) {
|
|
5546
|
+
setSvgValue({
|
|
5547
|
+
id: icon.value.id ? {
|
|
5548
|
+
$$type: "image-attachment-id",
|
|
5549
|
+
value: icon.value.id
|
|
5550
|
+
} : null,
|
|
5551
|
+
url: icon.value.url ? import_editor_props35.urlPropTypeUtil.create(icon.value.url) : null
|
|
5552
|
+
});
|
|
5553
|
+
return;
|
|
5554
|
+
}
|
|
5555
|
+
if (typeof icon.value === "string") {
|
|
5556
|
+
setIconValue(createIconPropValue(icon.value, icon.library));
|
|
5557
|
+
}
|
|
5558
|
+
};
|
|
5499
5559
|
const infotipProps = {
|
|
5500
5560
|
title: (0, import_i18n32.__)("Sorry, you can't upload that file yet.", "elementor"),
|
|
5501
5561
|
description: /* @__PURE__ */ React81.createElement(React81.Fragment, null, (0, import_i18n32.__)("To upload them anyway, ask the site administrator to enable unfiltered", "elementor"), /* @__PURE__ */ React81.createElement("br", null), (0, import_i18n32.__)("file uploads.", "elementor")),
|
|
5502
5562
|
isEnabled: !isAdmin
|
|
5503
5563
|
};
|
|
5504
|
-
return /* @__PURE__ */ React81.createElement(import_ui64.Stack, { gap: 1, "aria-label": "SVG Control" }, /* @__PURE__ */ React81.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React81.createElement(ControlActions, null, /* @__PURE__ */ React81.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React81.createElement(StyledCardMediaContainer, null,
|
|
5505
|
-
|
|
5564
|
+
return /* @__PURE__ */ React81.createElement(import_ui64.Stack, { gap: 1, "aria-label": "SVG Control" }, /* @__PURE__ */ React81.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React81.createElement(ControlActions, null, /* @__PURE__ */ React81.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React81.createElement(StyledCardMediaContainer, null, /* @__PURE__ */ React81.createElement(
|
|
5565
|
+
SvgMediaPreview,
|
|
5506
5566
|
{
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5567
|
+
isFetching,
|
|
5568
|
+
src,
|
|
5569
|
+
iconClassName: selectedIconClass,
|
|
5570
|
+
iconLibrary: selectedIconLibrary
|
|
5511
5571
|
}
|
|
5512
5572
|
)), /* @__PURE__ */ React81.createElement(
|
|
5513
5573
|
import_ui64.CardOverlay,
|
|
@@ -5528,7 +5588,20 @@ var SvgMediaControl = createControl(() => {
|
|
|
5528
5588
|
"aria-label": "Select SVG"
|
|
5529
5589
|
},
|
|
5530
5590
|
(0, import_i18n32.__)("Select SVG", "elementor")
|
|
5531
|
-
),
|
|
5591
|
+
), showIconLibrary ? /* @__PURE__ */ React81.createElement(
|
|
5592
|
+
import_ui64.Button,
|
|
5593
|
+
{
|
|
5594
|
+
size: "tiny",
|
|
5595
|
+
variant: "text",
|
|
5596
|
+
color: "inherit",
|
|
5597
|
+
onClick: () => openIconLibrary({
|
|
5598
|
+
selected: selectedIconClass && selectedIconLibrary ? { value: selectedIconClass, library: selectedIconLibrary } : void 0,
|
|
5599
|
+
onSelect: handleIconLibrarySelect
|
|
5600
|
+
}),
|
|
5601
|
+
"aria-label": (0, import_i18n32.__)("Icon library", "elementor")
|
|
5602
|
+
},
|
|
5603
|
+
(0, import_i18n32.__)("Icon library", "elementor")
|
|
5604
|
+
) : null, /* @__PURE__ */ React81.createElement(ConditionalControlInfotip, { ...infotipProps }, /* @__PURE__ */ React81.createElement("span", null, /* @__PURE__ */ React81.createElement(import_ui64.ThemeProvider, { colorScheme: isAdmin ? "light" : "dark" }, /* @__PURE__ */ React81.createElement(
|
|
5532
5605
|
import_ui64.Button,
|
|
5533
5606
|
{
|
|
5534
5607
|
size: "tiny",
|
|
@@ -5543,21 +5616,56 @@ var SvgMediaControl = createControl(() => {
|
|
|
5543
5616
|
)))))
|
|
5544
5617
|
))));
|
|
5545
5618
|
});
|
|
5619
|
+
function SvgMediaPreview({
|
|
5620
|
+
isFetching,
|
|
5621
|
+
src,
|
|
5622
|
+
iconClassName,
|
|
5623
|
+
iconLibrary
|
|
5624
|
+
}) {
|
|
5625
|
+
(0, import_react49.useEffect)(() => {
|
|
5626
|
+
if (iconLibrary) {
|
|
5627
|
+
enqueueIconFonts(iconLibrary);
|
|
5628
|
+
}
|
|
5629
|
+
}, [iconLibrary]);
|
|
5630
|
+
if (isFetching) {
|
|
5631
|
+
return /* @__PURE__ */ React81.createElement(import_ui64.CircularProgress, { role: "progressbar" });
|
|
5632
|
+
}
|
|
5633
|
+
if (iconClassName) {
|
|
5634
|
+
return /* @__PURE__ */ React81.createElement(
|
|
5635
|
+
import_ui64.Box,
|
|
5636
|
+
{
|
|
5637
|
+
component: "i",
|
|
5638
|
+
className: iconClassName,
|
|
5639
|
+
"aria-label": (0, import_i18n32.__)("Preview icon", "elementor"),
|
|
5640
|
+
sx: { fontSize: ICON_PREVIEW_FONT_SIZE }
|
|
5641
|
+
}
|
|
5642
|
+
);
|
|
5643
|
+
}
|
|
5644
|
+
return /* @__PURE__ */ React81.createElement(
|
|
5645
|
+
import_ui64.CardMedia,
|
|
5646
|
+
{
|
|
5647
|
+
component: "img",
|
|
5648
|
+
image: src,
|
|
5649
|
+
alt: (0, import_i18n32.__)("Preview SVG", "elementor"),
|
|
5650
|
+
sx: { maxHeight: "140px", width: `${ICON_PREVIEW_FONT_SIZE}px` }
|
|
5651
|
+
}
|
|
5652
|
+
);
|
|
5653
|
+
}
|
|
5546
5654
|
|
|
5547
5655
|
// src/controls/video-media-control.tsx
|
|
5548
5656
|
var React82 = __toESM(require("react"));
|
|
5549
|
-
var
|
|
5657
|
+
var import_editor_props36 = require("@elementor/editor-props");
|
|
5550
5658
|
var import_icons22 = require("@elementor/icons");
|
|
5551
5659
|
var import_ui65 = require("@elementor/ui");
|
|
5552
5660
|
var import_wp_media3 = require("@elementor/wp-media");
|
|
5553
5661
|
var import_i18n33 = require("@wordpress/i18n");
|
|
5554
5662
|
var PLACEHOLDER_IMAGE = window.elementorCommon?.config?.urls?.assets + "/shapes/play-triangle.svg";
|
|
5555
5663
|
var VideoMediaControl = createControl(() => {
|
|
5556
|
-
const { value, setValue, propType } = useBoundProp(
|
|
5664
|
+
const { value, setValue, propType } = useBoundProp(import_editor_props36.videoSrcPropTypeUtil);
|
|
5557
5665
|
const { id, url } = value ?? {};
|
|
5558
5666
|
const { data: attachment, isFetching } = (0, import_wp_media3.useWpMediaAttachment)(id?.value || null);
|
|
5559
5667
|
const videoUrl = attachment?.url ?? url?.value ?? null;
|
|
5560
|
-
const defaultUrl =
|
|
5668
|
+
const defaultUrl = import_editor_props36.videoSrcPropTypeUtil.extract(propType.default ?? null)?.url?.value;
|
|
5561
5669
|
const currentUrlForModal = url?.value && url.value !== defaultUrl ? url.value : void 0;
|
|
5562
5670
|
const { open } = (0, import_wp_media3.useWpMediaFrame)({
|
|
5563
5671
|
mediaTypes: ["video"],
|
|
@@ -5576,7 +5684,7 @@ var VideoMediaControl = createControl(() => {
|
|
|
5576
5684
|
onSelectUrl: (selectedUrl) => {
|
|
5577
5685
|
setValue({
|
|
5578
5686
|
id: null,
|
|
5579
|
-
url:
|
|
5687
|
+
url: import_editor_props36.urlPropTypeUtil.create(selectedUrl)
|
|
5580
5688
|
});
|
|
5581
5689
|
}
|
|
5582
5690
|
});
|
|
@@ -5652,13 +5760,13 @@ var VideoPreview = ({ isFetching = false, videoUrl }) => {
|
|
|
5652
5760
|
|
|
5653
5761
|
// src/controls/background-control/background-control.tsx
|
|
5654
5762
|
var React89 = __toESM(require("react"));
|
|
5655
|
-
var
|
|
5763
|
+
var import_editor_props42 = require("@elementor/editor-props");
|
|
5656
5764
|
var import_ui73 = require("@elementor/ui");
|
|
5657
5765
|
var import_i18n39 = require("@wordpress/i18n");
|
|
5658
5766
|
|
|
5659
5767
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
5660
5768
|
var React88 = __toESM(require("react"));
|
|
5661
|
-
var
|
|
5769
|
+
var import_editor_props41 = require("@elementor/editor-props");
|
|
5662
5770
|
var import_ui72 = require("@elementor/ui");
|
|
5663
5771
|
var import_wp_media4 = require("@elementor/wp-media");
|
|
5664
5772
|
var import_i18n38 = require("@wordpress/i18n");
|
|
@@ -5669,26 +5777,26 @@ var { env } = (0, import_env.parseEnv)("@elementor/editor-controls");
|
|
|
5669
5777
|
|
|
5670
5778
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
5671
5779
|
var React83 = __toESM(require("react"));
|
|
5672
|
-
var
|
|
5780
|
+
var import_editor_props37 = require("@elementor/editor-props");
|
|
5673
5781
|
var import_ui66 = require("@elementor/ui");
|
|
5674
5782
|
var BackgroundGradientColorControl = createControl(() => {
|
|
5675
|
-
const { value, setValue } = useBoundProp(
|
|
5783
|
+
const { value, setValue } = useBoundProp(import_editor_props37.backgroundGradientOverlayPropTypeUtil);
|
|
5676
5784
|
const handleChange = (newValue) => {
|
|
5677
5785
|
const transformedValue = createTransformableValue(newValue);
|
|
5678
5786
|
if (transformedValue.positions) {
|
|
5679
|
-
transformedValue.positions =
|
|
5787
|
+
transformedValue.positions = import_editor_props37.stringPropTypeUtil.create(newValue.positions.join(" "));
|
|
5680
5788
|
}
|
|
5681
5789
|
setValue(transformedValue);
|
|
5682
5790
|
};
|
|
5683
5791
|
const createTransformableValue = (newValue) => ({
|
|
5684
5792
|
...newValue,
|
|
5685
|
-
type:
|
|
5686
|
-
angle:
|
|
5687
|
-
stops:
|
|
5793
|
+
type: import_editor_props37.stringPropTypeUtil.create(newValue.type),
|
|
5794
|
+
angle: import_editor_props37.numberPropTypeUtil.create(newValue.angle),
|
|
5795
|
+
stops: import_editor_props37.gradientColorStopPropTypeUtil.create(
|
|
5688
5796
|
newValue.stops.map(
|
|
5689
|
-
({ color, offset }) =>
|
|
5690
|
-
color:
|
|
5691
|
-
offset:
|
|
5797
|
+
({ color, offset }) => import_editor_props37.colorStopPropTypeUtil.create({
|
|
5798
|
+
color: import_editor_props37.colorPropTypeUtil.create(color),
|
|
5799
|
+
offset: import_editor_props37.numberPropTypeUtil.create(offset)
|
|
5692
5800
|
})
|
|
5693
5801
|
)
|
|
5694
5802
|
)
|
|
@@ -5717,17 +5825,17 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
5717
5825
|
}
|
|
5718
5826
|
);
|
|
5719
5827
|
});
|
|
5720
|
-
var initialBackgroundGradientOverlay =
|
|
5721
|
-
type:
|
|
5722
|
-
angle:
|
|
5723
|
-
stops:
|
|
5724
|
-
|
|
5725
|
-
color:
|
|
5726
|
-
offset:
|
|
5828
|
+
var initialBackgroundGradientOverlay = import_editor_props37.backgroundGradientOverlayPropTypeUtil.create({
|
|
5829
|
+
type: import_editor_props37.stringPropTypeUtil.create("linear"),
|
|
5830
|
+
angle: import_editor_props37.numberPropTypeUtil.create(180),
|
|
5831
|
+
stops: import_editor_props37.gradientColorStopPropTypeUtil.create([
|
|
5832
|
+
import_editor_props37.colorStopPropTypeUtil.create({
|
|
5833
|
+
color: import_editor_props37.colorPropTypeUtil.create("rgb(0,0,0)"),
|
|
5834
|
+
offset: import_editor_props37.numberPropTypeUtil.create(0)
|
|
5727
5835
|
}),
|
|
5728
|
-
|
|
5729
|
-
color:
|
|
5730
|
-
offset:
|
|
5836
|
+
import_editor_props37.colorStopPropTypeUtil.create({
|
|
5837
|
+
color: import_editor_props37.colorPropTypeUtil.create("rgb(255,255,255)"),
|
|
5838
|
+
offset: import_editor_props37.numberPropTypeUtil.create(100)
|
|
5731
5839
|
})
|
|
5732
5840
|
])
|
|
5733
5841
|
});
|
|
@@ -5758,7 +5866,7 @@ var BackgroundImageOverlayAttachment = () => {
|
|
|
5758
5866
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
5759
5867
|
var React85 = __toESM(require("react"));
|
|
5760
5868
|
var import_react50 = require("react");
|
|
5761
|
-
var
|
|
5869
|
+
var import_editor_props38 = require("@elementor/editor-props");
|
|
5762
5870
|
var import_editor_ui11 = require("@elementor/editor-ui");
|
|
5763
5871
|
var import_icons24 = require("@elementor/icons");
|
|
5764
5872
|
var import_ui68 = require("@elementor/ui");
|
|
@@ -5776,8 +5884,8 @@ var backgroundPositionOptions = [
|
|
|
5776
5884
|
{ label: (0, import_i18n35.__)("Custom", "elementor"), value: "custom" }
|
|
5777
5885
|
];
|
|
5778
5886
|
var BackgroundImageOverlayPosition = () => {
|
|
5779
|
-
const backgroundImageOffsetContext = useBoundProp(
|
|
5780
|
-
const stringPropContext = useBoundProp(
|
|
5887
|
+
const backgroundImageOffsetContext = useBoundProp(import_editor_props38.backgroundImagePositionOffsetPropTypeUtil);
|
|
5888
|
+
const stringPropContext = useBoundProp(import_editor_props38.stringPropTypeUtil);
|
|
5781
5889
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
5782
5890
|
const rowRef = (0, import_react50.useRef)(null);
|
|
5783
5891
|
const handlePositionChange = (event) => {
|
|
@@ -5853,7 +5961,7 @@ var BackgroundImageOverlayRepeat = () => {
|
|
|
5853
5961
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
5854
5962
|
var React87 = __toESM(require("react"));
|
|
5855
5963
|
var import_react51 = require("react");
|
|
5856
|
-
var
|
|
5964
|
+
var import_editor_props39 = require("@elementor/editor-props");
|
|
5857
5965
|
var import_icons26 = require("@elementor/icons");
|
|
5858
5966
|
var import_ui70 = require("@elementor/ui");
|
|
5859
5967
|
var import_i18n37 = require("@wordpress/i18n");
|
|
@@ -5884,8 +5992,8 @@ var sizeControlOptions = [
|
|
|
5884
5992
|
}
|
|
5885
5993
|
];
|
|
5886
5994
|
var BackgroundImageOverlaySize = () => {
|
|
5887
|
-
const backgroundImageScaleContext = useBoundProp(
|
|
5888
|
-
const stringPropContext = useBoundProp(
|
|
5995
|
+
const backgroundImageScaleContext = useBoundProp(import_editor_props39.backgroundImageSizeScalePropTypeUtil);
|
|
5996
|
+
const stringPropContext = useBoundProp(import_editor_props39.stringPropTypeUtil);
|
|
5889
5997
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
5890
5998
|
const rowRef = (0, import_react51.useRef)(null);
|
|
5891
5999
|
const handleSizeChange = (size) => {
|
|
@@ -5923,16 +6031,16 @@ var BackgroundImageOverlaySize = () => {
|
|
|
5923
6031
|
|
|
5924
6032
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
5925
6033
|
var import_react52 = require("react");
|
|
5926
|
-
var
|
|
6034
|
+
var import_editor_props40 = require("@elementor/editor-props");
|
|
5927
6035
|
var import_ui71 = require("@elementor/ui");
|
|
5928
6036
|
var useBackgroundTabsHistory = ({
|
|
5929
6037
|
color: initialBackgroundColorOverlay2,
|
|
5930
6038
|
image: initialBackgroundImageOverlay,
|
|
5931
6039
|
gradient: initialBackgroundGradientOverlay2
|
|
5932
6040
|
}) => {
|
|
5933
|
-
const { value: imageValue, setValue: setImageValue } = useBoundProp(
|
|
5934
|
-
const { value: colorValue, setValue: setColorValue } = useBoundProp(
|
|
5935
|
-
const { value: gradientValue, setValue: setGradientValue } = useBoundProp(
|
|
6041
|
+
const { value: imageValue, setValue: setImageValue } = useBoundProp(import_editor_props40.backgroundImageOverlayPropTypeUtil);
|
|
6042
|
+
const { value: colorValue, setValue: setColorValue } = useBoundProp(import_editor_props40.backgroundColorOverlayPropTypeUtil);
|
|
6043
|
+
const { value: gradientValue, setValue: setGradientValue } = useBoundProp(import_editor_props40.backgroundGradientOverlayPropTypeUtil);
|
|
5936
6044
|
const getCurrentOverlayType = () => {
|
|
5937
6045
|
if (colorValue) {
|
|
5938
6046
|
return "color";
|
|
@@ -5981,9 +6089,9 @@ var useBackgroundTabsHistory = ({
|
|
|
5981
6089
|
|
|
5982
6090
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
5983
6091
|
var DEFAULT_BACKGROUND_COLOR_OVERLAY_COLOR = "#00000033";
|
|
5984
|
-
var initialBackgroundColorOverlay =
|
|
6092
|
+
var initialBackgroundColorOverlay = import_editor_props41.backgroundColorOverlayPropTypeUtil.create(
|
|
5985
6093
|
{
|
|
5986
|
-
color:
|
|
6094
|
+
color: import_editor_props41.colorPropTypeUtil.create(DEFAULT_BACKGROUND_COLOR_OVERLAY_COLOR)
|
|
5987
6095
|
}
|
|
5988
6096
|
);
|
|
5989
6097
|
var getInitialBackgroundOverlay = () => ({
|
|
@@ -6017,12 +6125,12 @@ var backgroundResolutionOptions = [
|
|
|
6017
6125
|
{ label: (0, import_i18n38.__)("Full", "elementor"), value: "full" }
|
|
6018
6126
|
];
|
|
6019
6127
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
6020
|
-
const { propType, value: overlayValues, setValue } = useBoundProp(
|
|
6128
|
+
const { propType, value: overlayValues, setValue } = useBoundProp(import_editor_props41.backgroundOverlayPropTypeUtil);
|
|
6021
6129
|
return /* @__PURE__ */ React88.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React88.createElement(
|
|
6022
6130
|
ControlRepeater,
|
|
6023
6131
|
{
|
|
6024
6132
|
initial: getInitialBackgroundOverlay(),
|
|
6025
|
-
propTypeUtil:
|
|
6133
|
+
propTypeUtil: import_editor_props41.backgroundOverlayPropTypeUtil
|
|
6026
6134
|
},
|
|
6027
6135
|
/* @__PURE__ */ React88.createElement(RepeaterHeader, { label: (0, import_i18n38.__)("Overlay", "elementor") }, /* @__PURE__ */ React88.createElement(TooltipAddItemAction, { newItemIndex: 0 })),
|
|
6028
6136
|
/* @__PURE__ */ React88.createElement(ItemsContainer, null, /* @__PURE__ */ React88.createElement(
|
|
@@ -6124,11 +6232,11 @@ var ItemLabelGradient = ({ value }) => {
|
|
|
6124
6232
|
return /* @__PURE__ */ React88.createElement("span", null, (0, import_i18n38.__)("Radial Gradient", "elementor"));
|
|
6125
6233
|
};
|
|
6126
6234
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
6127
|
-
const propContext = useBoundProp(
|
|
6235
|
+
const propContext = useBoundProp(import_editor_props41.backgroundColorOverlayPropTypeUtil);
|
|
6128
6236
|
return /* @__PURE__ */ React88.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React88.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React88.createElement(ColorControl, { anchorEl })));
|
|
6129
6237
|
};
|
|
6130
6238
|
var ImageOverlayContent = () => {
|
|
6131
|
-
const propContext = useBoundProp(
|
|
6239
|
+
const propContext = useBoundProp(import_editor_props41.backgroundImageOverlayPropTypeUtil);
|
|
6132
6240
|
return /* @__PURE__ */ React88.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React88.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React88.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React88.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React88.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React88.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React88.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React88.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React88.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React88.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React88.createElement(BackgroundImageOverlayAttachment, null)));
|
|
6133
6241
|
};
|
|
6134
6242
|
var StyledUnstableColorIndicator3 = (0, import_ui72.styled)(import_ui72.UnstableColorIndicator)(({ theme }) => ({
|
|
@@ -6178,7 +6286,7 @@ var clipOptions = [
|
|
|
6178
6286
|
var colorLabel = (0, import_i18n39.__)("Color", "elementor");
|
|
6179
6287
|
var clipLabel = (0, import_i18n39.__)("Clipping", "elementor");
|
|
6180
6288
|
var BackgroundControl = createControl(() => {
|
|
6181
|
-
const propContext = useBoundProp(
|
|
6289
|
+
const propContext = useBoundProp(import_editor_props42.backgroundPropTypeUtil);
|
|
6182
6290
|
return /* @__PURE__ */ React89.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React89.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React89.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React89.createElement(BackgroundColorField, null), /* @__PURE__ */ React89.createElement(BackgroundClipField, null));
|
|
6183
6291
|
});
|
|
6184
6292
|
var BackgroundColorField = () => {
|
|
@@ -6191,7 +6299,7 @@ var BackgroundClipField = () => {
|
|
|
6191
6299
|
// src/controls/repeatable-control.tsx
|
|
6192
6300
|
var React90 = __toESM(require("react"));
|
|
6193
6301
|
var import_react53 = require("react");
|
|
6194
|
-
var
|
|
6302
|
+
var import_editor_props43 = require("@elementor/editor-props");
|
|
6195
6303
|
var import_ui74 = require("@elementor/ui");
|
|
6196
6304
|
var PLACEHOLDER_REGEX = /\$\{([^}]+)\}/g;
|
|
6197
6305
|
var RepeatableControl = createControl(
|
|
@@ -6212,7 +6320,7 @@ var RepeatableControl = createControl(
|
|
|
6212
6320
|
return null;
|
|
6213
6321
|
}
|
|
6214
6322
|
const childArrayPropTypeUtil2 = (0, import_react53.useMemo)(
|
|
6215
|
-
() => (0,
|
|
6323
|
+
() => (0, import_editor_props43.createArrayPropUtils)(childPropTypeUtil.key, childPropTypeUtil.schema, propKey),
|
|
6216
6324
|
[childPropTypeUtil.key, childPropTypeUtil.schema, propKey]
|
|
6217
6325
|
);
|
|
6218
6326
|
const contextValue = (0, import_react53.useMemo)(
|
|
@@ -6348,7 +6456,7 @@ var getAllProperties = (pattern) => {
|
|
|
6348
6456
|
// src/controls/key-value-control.tsx
|
|
6349
6457
|
var React91 = __toESM(require("react"));
|
|
6350
6458
|
var import_react54 = require("react");
|
|
6351
|
-
var
|
|
6459
|
+
var import_editor_props44 = require("@elementor/editor-props");
|
|
6352
6460
|
var import_ui75 = require("@elementor/ui");
|
|
6353
6461
|
var import_i18n40 = require("@wordpress/i18n");
|
|
6354
6462
|
|
|
@@ -6373,7 +6481,7 @@ var getInitialFieldValue = (fieldValue) => {
|
|
|
6373
6481
|
return transformableValue.value || "";
|
|
6374
6482
|
};
|
|
6375
6483
|
var KeyValueControl = createControl((props = {}) => {
|
|
6376
|
-
const { value, setValue, ...propContext } = useBoundProp(
|
|
6484
|
+
const { value, setValue, ...propContext } = useBoundProp(import_editor_props44.keyValuePropTypeUtil);
|
|
6377
6485
|
const [keyError, setKeyError] = (0, import_react54.useState)("");
|
|
6378
6486
|
const [valueError, setValueError] = (0, import_react54.useState)("");
|
|
6379
6487
|
const [sessionState, setSessionState] = (0, import_react54.useState)({
|
|
@@ -6412,14 +6520,14 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6412
6520
|
return;
|
|
6413
6521
|
}
|
|
6414
6522
|
const newChangedValue = newValue[fieldType];
|
|
6415
|
-
if ((0,
|
|
6523
|
+
if ((0, import_editor_props44.isTransformable)(newChangedValue) && newChangedValue.$$type === "dynamic") {
|
|
6416
6524
|
setValue({
|
|
6417
6525
|
...value,
|
|
6418
6526
|
[fieldType]: newChangedValue
|
|
6419
6527
|
});
|
|
6420
6528
|
return;
|
|
6421
6529
|
}
|
|
6422
|
-
const extractedValue =
|
|
6530
|
+
const extractedValue = import_editor_props44.stringPropTypeUtil.extract(newChangedValue);
|
|
6423
6531
|
setSessionState((prev) => ({
|
|
6424
6532
|
...prev,
|
|
6425
6533
|
[fieldType]: extractedValue
|
|
@@ -6459,7 +6567,7 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6459
6567
|
|
|
6460
6568
|
// src/controls/position-control.tsx
|
|
6461
6569
|
var React92 = __toESM(require("react"));
|
|
6462
|
-
var
|
|
6570
|
+
var import_editor_props45 = require("@elementor/editor-props");
|
|
6463
6571
|
var import_editor_ui12 = require("@elementor/editor-ui");
|
|
6464
6572
|
var import_icons27 = require("@elementor/icons");
|
|
6465
6573
|
var import_ui76 = require("@elementor/ui");
|
|
@@ -6477,8 +6585,8 @@ var positionOptions = [
|
|
|
6477
6585
|
{ label: (0, import_i18n41.__)("Custom", "elementor"), value: "custom" }
|
|
6478
6586
|
];
|
|
6479
6587
|
var PositionControl = () => {
|
|
6480
|
-
const positionContext = useBoundProp(
|
|
6481
|
-
const stringPropContext = useBoundProp(
|
|
6588
|
+
const positionContext = useBoundProp(import_editor_props45.positionPropTypeUtil);
|
|
6589
|
+
const stringPropContext = useBoundProp(import_editor_props45.stringPropTypeUtil);
|
|
6482
6590
|
const isCustom = !!positionContext.value;
|
|
6483
6591
|
const placeholder = positionContext.placeholder ? "custom" : stringPropContext.placeholder ?? null;
|
|
6484
6592
|
const handlePositionChange = (event) => {
|
|
@@ -6519,13 +6627,13 @@ var PositionControl = () => {
|
|
|
6519
6627
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
6520
6628
|
var React105 = __toESM(require("react"));
|
|
6521
6629
|
var import_react62 = require("react");
|
|
6522
|
-
var
|
|
6630
|
+
var import_editor_props54 = require("@elementor/editor-props");
|
|
6523
6631
|
var import_icons34 = require("@elementor/icons");
|
|
6524
6632
|
var import_ui89 = require("@elementor/ui");
|
|
6525
6633
|
var import_i18n51 = require("@wordpress/i18n");
|
|
6526
6634
|
|
|
6527
6635
|
// src/controls/transform-control/initial-values.ts
|
|
6528
|
-
var
|
|
6636
|
+
var import_editor_props46 = require("@elementor/editor-props");
|
|
6529
6637
|
var TransformFunctionKeys = {
|
|
6530
6638
|
move: "transform-move",
|
|
6531
6639
|
scale: "transform-scale",
|
|
@@ -6555,17 +6663,17 @@ var initialTransformValue = {
|
|
|
6555
6663
|
z: { $$type: "size", value: { size: defaultValues.move.size, unit: defaultValues.move.unit } }
|
|
6556
6664
|
}
|
|
6557
6665
|
};
|
|
6558
|
-
var initialScaleValue =
|
|
6559
|
-
x:
|
|
6560
|
-
y:
|
|
6561
|
-
z:
|
|
6666
|
+
var initialScaleValue = import_editor_props46.scaleTransformPropTypeUtil.create({
|
|
6667
|
+
x: import_editor_props46.numberPropTypeUtil.create(defaultValues.scale),
|
|
6668
|
+
y: import_editor_props46.numberPropTypeUtil.create(defaultValues.scale),
|
|
6669
|
+
z: import_editor_props46.numberPropTypeUtil.create(defaultValues.scale)
|
|
6562
6670
|
});
|
|
6563
|
-
var initialRotateValue =
|
|
6671
|
+
var initialRotateValue = import_editor_props46.rotateTransformPropTypeUtil.create({
|
|
6564
6672
|
x: { $$type: "size", value: { size: defaultValues.rotate.size, unit: defaultValues.rotate.unit } },
|
|
6565
6673
|
y: { $$type: "size", value: { size: defaultValues.rotate.size, unit: defaultValues.rotate.unit } },
|
|
6566
6674
|
z: { $$type: "size", value: { size: defaultValues.rotate.size, unit: defaultValues.rotate.unit } }
|
|
6567
6675
|
});
|
|
6568
|
-
var initialSkewValue =
|
|
6676
|
+
var initialSkewValue = import_editor_props46.skewTransformPropTypeUtil.create({
|
|
6569
6677
|
x: { $$type: "size", value: { size: defaultValues.skew.size, unit: defaultValues.skew.unit } },
|
|
6570
6678
|
y: { $$type: "size", value: { size: defaultValues.skew.size, unit: defaultValues.skew.unit } }
|
|
6571
6679
|
});
|
|
@@ -6578,7 +6686,7 @@ var import_i18n46 = require("@wordpress/i18n");
|
|
|
6578
6686
|
// src/controls/transform-control/functions/move.tsx
|
|
6579
6687
|
var React94 = __toESM(require("react"));
|
|
6580
6688
|
var import_react55 = require("react");
|
|
6581
|
-
var
|
|
6689
|
+
var import_editor_props47 = require("@elementor/editor-props");
|
|
6582
6690
|
var import_icons28 = require("@elementor/icons");
|
|
6583
6691
|
var import_ui78 = require("@elementor/ui");
|
|
6584
6692
|
var import_i18n42 = require("@wordpress/i18n");
|
|
@@ -6623,7 +6731,7 @@ var moveAxisControls = [
|
|
|
6623
6731
|
}
|
|
6624
6732
|
];
|
|
6625
6733
|
var Move = () => {
|
|
6626
|
-
const context = useBoundProp(
|
|
6734
|
+
const context = useBoundProp(import_editor_props47.moveTransformPropTypeUtil);
|
|
6627
6735
|
const rowRefs = [(0, import_react55.useRef)(null), (0, import_react55.useRef)(null), (0, import_react55.useRef)(null)];
|
|
6628
6736
|
return /* @__PURE__ */ React94.createElement(import_ui78.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React94.createElement(PropProvider, { ...context }, /* @__PURE__ */ React94.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React94.createElement(
|
|
6629
6737
|
AxisRow,
|
|
@@ -6640,7 +6748,7 @@ var Move = () => {
|
|
|
6640
6748
|
// src/controls/transform-control/functions/rotate.tsx
|
|
6641
6749
|
var React95 = __toESM(require("react"));
|
|
6642
6750
|
var import_react56 = require("react");
|
|
6643
|
-
var
|
|
6751
|
+
var import_editor_props48 = require("@elementor/editor-props");
|
|
6644
6752
|
var import_icons29 = require("@elementor/icons");
|
|
6645
6753
|
var import_ui79 = require("@elementor/ui");
|
|
6646
6754
|
var import_i18n43 = require("@wordpress/i18n");
|
|
@@ -6663,7 +6771,7 @@ var rotateAxisControls = [
|
|
|
6663
6771
|
];
|
|
6664
6772
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
6665
6773
|
var Rotate = () => {
|
|
6666
|
-
const context = useBoundProp(
|
|
6774
|
+
const context = useBoundProp(import_editor_props48.rotateTransformPropTypeUtil);
|
|
6667
6775
|
const rowRefs = [(0, import_react56.useRef)(null), (0, import_react56.useRef)(null), (0, import_react56.useRef)(null)];
|
|
6668
6776
|
return /* @__PURE__ */ React95.createElement(import_ui79.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React95.createElement(PropProvider, { ...context }, /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React95.createElement(
|
|
6669
6777
|
AxisRow,
|
|
@@ -6679,7 +6787,7 @@ var Rotate = () => {
|
|
|
6679
6787
|
// src/controls/transform-control/functions/scale.tsx
|
|
6680
6788
|
var React97 = __toESM(require("react"));
|
|
6681
6789
|
var import_react57 = require("react");
|
|
6682
|
-
var
|
|
6790
|
+
var import_editor_props49 = require("@elementor/editor-props");
|
|
6683
6791
|
var import_icons30 = require("@elementor/icons");
|
|
6684
6792
|
var import_ui81 = require("@elementor/ui");
|
|
6685
6793
|
var import_i18n44 = require("@wordpress/i18n");
|
|
@@ -6710,7 +6818,7 @@ var scaleAxisControls = [
|
|
|
6710
6818
|
}
|
|
6711
6819
|
];
|
|
6712
6820
|
var Scale = () => {
|
|
6713
|
-
const context = useBoundProp(
|
|
6821
|
+
const context = useBoundProp(import_editor_props49.scaleTransformPropTypeUtil);
|
|
6714
6822
|
const rowRefs = [(0, import_react57.useRef)(null), (0, import_react57.useRef)(null), (0, import_react57.useRef)(null)];
|
|
6715
6823
|
return /* @__PURE__ */ React97.createElement(import_ui81.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React97.createElement(PropProvider, { ...context }, /* @__PURE__ */ React97.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React97.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
|
|
6716
6824
|
};
|
|
@@ -6718,7 +6826,7 @@ var Scale = () => {
|
|
|
6718
6826
|
// src/controls/transform-control/functions/skew.tsx
|
|
6719
6827
|
var React98 = __toESM(require("react"));
|
|
6720
6828
|
var import_react58 = require("react");
|
|
6721
|
-
var
|
|
6829
|
+
var import_editor_props50 = require("@elementor/editor-props");
|
|
6722
6830
|
var import_icons31 = require("@elementor/icons");
|
|
6723
6831
|
var import_ui82 = require("@elementor/ui");
|
|
6724
6832
|
var import_i18n45 = require("@wordpress/i18n");
|
|
@@ -6736,7 +6844,7 @@ var skewAxisControls = [
|
|
|
6736
6844
|
];
|
|
6737
6845
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
6738
6846
|
var Skew = () => {
|
|
6739
|
-
const context = useBoundProp(
|
|
6847
|
+
const context = useBoundProp(import_editor_props50.skewTransformPropTypeUtil);
|
|
6740
6848
|
const rowRefs = [(0, import_react58.useRef)(null), (0, import_react58.useRef)(null), (0, import_react58.useRef)(null)];
|
|
6741
6849
|
return /* @__PURE__ */ React98.createElement(import_ui82.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React98.createElement(PropProvider, { ...context }, /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React98.createElement(
|
|
6742
6850
|
AxisRow,
|
|
@@ -6751,7 +6859,7 @@ var Skew = () => {
|
|
|
6751
6859
|
|
|
6752
6860
|
// src/controls/transform-control/use-transform-tabs-history.tsx
|
|
6753
6861
|
var import_react59 = require("react");
|
|
6754
|
-
var
|
|
6862
|
+
var import_editor_props51 = require("@elementor/editor-props");
|
|
6755
6863
|
var import_ui83 = require("@elementor/ui");
|
|
6756
6864
|
var useTransformTabsHistory = ({
|
|
6757
6865
|
move: initialMove,
|
|
@@ -6759,10 +6867,10 @@ var useTransformTabsHistory = ({
|
|
|
6759
6867
|
rotate: initialRotate,
|
|
6760
6868
|
skew: initialSkew
|
|
6761
6869
|
}) => {
|
|
6762
|
-
const { value: moveValue, setValue: setMoveValue } = useBoundProp(
|
|
6763
|
-
const { value: scaleValue, setValue: setScaleValue } = useBoundProp(
|
|
6764
|
-
const { value: rotateValue, setValue: setRotateValue } = useBoundProp(
|
|
6765
|
-
const { value: skewValue, setValue: setSkewValue } = useBoundProp(
|
|
6870
|
+
const { value: moveValue, setValue: setMoveValue } = useBoundProp(import_editor_props51.moveTransformPropTypeUtil);
|
|
6871
|
+
const { value: scaleValue, setValue: setScaleValue } = useBoundProp(import_editor_props51.scaleTransformPropTypeUtil);
|
|
6872
|
+
const { value: rotateValue, setValue: setRotateValue } = useBoundProp(import_editor_props51.rotateTransformPropTypeUtil);
|
|
6873
|
+
const { value: skewValue, setValue: setSkewValue } = useBoundProp(import_editor_props51.skewTransformPropTypeUtil);
|
|
6766
6874
|
const { openItemIndex, items: items2 } = useRepeaterContext();
|
|
6767
6875
|
const getCurrentTransformType = () => {
|
|
6768
6876
|
switch (true) {
|
|
@@ -6922,7 +7030,7 @@ var import_i18n50 = require("@wordpress/i18n");
|
|
|
6922
7030
|
// src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
|
|
6923
7031
|
var React102 = __toESM(require("react"));
|
|
6924
7032
|
var import_react60 = require("react");
|
|
6925
|
-
var
|
|
7033
|
+
var import_editor_props52 = require("@elementor/editor-props");
|
|
6926
7034
|
var import_ui86 = require("@elementor/ui");
|
|
6927
7035
|
var import_i18n48 = require("@wordpress/i18n");
|
|
6928
7036
|
var ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
@@ -6949,7 +7057,7 @@ var ChildrenPerspectiveControl = () => {
|
|
|
6949
7057
|
var PerspectiveControl = () => /* @__PURE__ */ React102.createElement(PropKeyProvider, { bind: "perspective" }, /* @__PURE__ */ React102.createElement(ControlFields, { control: PERSPECTIVE_CONTROL_FIELD, key: PERSPECTIVE_CONTROL_FIELD.bind }));
|
|
6950
7058
|
var PerspectiveOriginControl = () => /* @__PURE__ */ React102.createElement(PropKeyProvider, { bind: "perspective-origin" }, /* @__PURE__ */ React102.createElement(PerspectiveOriginControlProvider, null));
|
|
6951
7059
|
var PerspectiveOriginControlProvider = () => {
|
|
6952
|
-
const context = useBoundProp(
|
|
7060
|
+
const context = useBoundProp(import_editor_props52.perspectiveOriginPropTypeUtil);
|
|
6953
7061
|
return /* @__PURE__ */ React102.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React102.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React102.createElement(ControlFields, { control }))));
|
|
6954
7062
|
};
|
|
6955
7063
|
var ControlFields = ({ control }) => {
|
|
@@ -6960,7 +7068,7 @@ var ControlFields = ({ control }) => {
|
|
|
6960
7068
|
// src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
|
|
6961
7069
|
var React103 = __toESM(require("react"));
|
|
6962
7070
|
var import_react61 = require("react");
|
|
6963
|
-
var
|
|
7071
|
+
var import_editor_props53 = require("@elementor/editor-props");
|
|
6964
7072
|
var import_ui87 = require("@elementor/ui");
|
|
6965
7073
|
var import_i18n49 = require("@wordpress/i18n");
|
|
6966
7074
|
var TRANSFORM_ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
@@ -6986,7 +7094,7 @@ var TransformOriginControl = () => {
|
|
|
6986
7094
|
return /* @__PURE__ */ React103.createElement(import_ui87.Stack, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React103.createElement(ControlFormLabel, null, (0, import_i18n49.__)("Transform", "elementor")), TRANSFORM_ORIGIN_FIELDS.map((control) => /* @__PURE__ */ React103.createElement(ControlFields2, { control, key: control.bind })));
|
|
6987
7095
|
};
|
|
6988
7096
|
var ControlFields2 = ({ control }) => {
|
|
6989
|
-
const context = useBoundProp(
|
|
7097
|
+
const context = useBoundProp(import_editor_props53.transformOriginPropTypeUtil);
|
|
6990
7098
|
const rowRef = (0, import_react61.useRef)(null);
|
|
6991
7099
|
return /* @__PURE__ */ React103.createElement(PropProvider, { ...context }, /* @__PURE__ */ React103.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React103.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React103.createElement(import_ui87.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React103.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React103.createElement(import_ui87.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React103.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef })))));
|
|
6992
7100
|
};
|
|
@@ -7034,7 +7142,7 @@ var TransformSettingsControl = ({
|
|
|
7034
7142
|
var SIZE11 = "tiny";
|
|
7035
7143
|
var TransformRepeaterControl = createControl(
|
|
7036
7144
|
({ showChildrenPerspective }) => {
|
|
7037
|
-
const context = useBoundProp(
|
|
7145
|
+
const context = useBoundProp(import_editor_props54.transformPropTypeUtil);
|
|
7038
7146
|
const headerRef = (0, import_react62.useRef)(null);
|
|
7039
7147
|
const popupState = (0, import_ui89.usePopupState)({ variant: "popover" });
|
|
7040
7148
|
return /* @__PURE__ */ React105.createElement(PropProvider, { ...context }, /* @__PURE__ */ React105.createElement(
|
|
@@ -7062,7 +7170,7 @@ var Repeater2 = ({
|
|
|
7062
7170
|
propType,
|
|
7063
7171
|
popupState
|
|
7064
7172
|
}) => {
|
|
7065
|
-
const transformFunctionsContext = useBoundProp(
|
|
7173
|
+
const transformFunctionsContext = useBoundProp(import_editor_props54.transformFunctionsPropTypeUtil);
|
|
7066
7174
|
const availableValues = [initialTransformValue, initialScaleValue, initialRotateValue, initialSkewValue];
|
|
7067
7175
|
const { value: transformValues, bind } = transformFunctionsContext;
|
|
7068
7176
|
const getInitialValue2 = () => {
|
|
@@ -7073,7 +7181,7 @@ var Repeater2 = ({
|
|
|
7073
7181
|
ControlRepeater,
|
|
7074
7182
|
{
|
|
7075
7183
|
initial: getInitialValue2() ?? initialTransformValue,
|
|
7076
|
-
propTypeUtil:
|
|
7184
|
+
propTypeUtil: import_editor_props54.transformFunctionsPropTypeUtil
|
|
7077
7185
|
},
|
|
7078
7186
|
/* @__PURE__ */ React105.createElement(
|
|
7079
7187
|
RepeaterHeader,
|
|
@@ -7116,7 +7224,7 @@ var TransformBasePopoverTrigger = ({
|
|
|
7116
7224
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
7117
7225
|
var React108 = __toESM(require("react"));
|
|
7118
7226
|
var import_react65 = require("react");
|
|
7119
|
-
var
|
|
7227
|
+
var import_editor_props57 = require("@elementor/editor-props");
|
|
7120
7228
|
var import_icons36 = require("@elementor/icons");
|
|
7121
7229
|
var import_ui92 = require("@elementor/ui");
|
|
7122
7230
|
var import_utils7 = require("@elementor/utils");
|
|
@@ -7125,11 +7233,11 @@ var import_i18n54 = require("@wordpress/i18n");
|
|
|
7125
7233
|
// src/controls/selection-size-control.tsx
|
|
7126
7234
|
var React106 = __toESM(require("react"));
|
|
7127
7235
|
var import_react63 = require("react");
|
|
7128
|
-
var
|
|
7236
|
+
var import_editor_props55 = require("@elementor/editor-props");
|
|
7129
7237
|
var import_ui90 = require("@elementor/ui");
|
|
7130
7238
|
var SelectionSizeControl = createControl(
|
|
7131
7239
|
({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
|
|
7132
|
-
const { value, setValue, propType } = useBoundProp(
|
|
7240
|
+
const { value, setValue, propType } = useBoundProp(import_editor_props55.selectionSizePropTypeUtil);
|
|
7133
7241
|
const rowRef = (0, import_react63.useRef)(null);
|
|
7134
7242
|
const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
|
|
7135
7243
|
const currentSizeConfig = (0, import_react63.useMemo)(() => {
|
|
@@ -7346,7 +7454,7 @@ function subscribeToTransitionEvent() {
|
|
|
7346
7454
|
// src/controls/transition-control/transition-selector.tsx
|
|
7347
7455
|
var React107 = __toESM(require("react"));
|
|
7348
7456
|
var import_react64 = require("react");
|
|
7349
|
-
var
|
|
7457
|
+
var import_editor_props56 = require("@elementor/editor-props");
|
|
7350
7458
|
var import_editor_ui14 = require("@elementor/editor-ui");
|
|
7351
7459
|
var import_icons35 = require("@elementor/icons");
|
|
7352
7460
|
var import_ui91 = require("@elementor/ui");
|
|
@@ -7427,7 +7535,7 @@ var TransitionSelector = ({
|
|
|
7427
7535
|
disabledItems = [],
|
|
7428
7536
|
showPromotion = false
|
|
7429
7537
|
}) => {
|
|
7430
|
-
const { value, setValue } = useBoundProp(
|
|
7538
|
+
const { value, setValue } = useBoundProp(import_editor_props56.keyValuePropTypeUtil);
|
|
7431
7539
|
const {
|
|
7432
7540
|
key: { value: transitionLabel }
|
|
7433
7541
|
} = value;
|
|
@@ -7546,9 +7654,9 @@ var DURATION_CONFIG = {
|
|
|
7546
7654
|
units: ["s", "ms"],
|
|
7547
7655
|
defaultUnit: "ms"
|
|
7548
7656
|
};
|
|
7549
|
-
var childArrayPropTypeUtil = (0,
|
|
7550
|
-
|
|
7551
|
-
|
|
7657
|
+
var childArrayPropTypeUtil = (0, import_editor_props57.createArrayPropUtils)(
|
|
7658
|
+
import_editor_props57.selectionSizePropTypeUtil.key,
|
|
7659
|
+
import_editor_props57.selectionSizePropTypeUtil.schema,
|
|
7552
7660
|
"transition"
|
|
7553
7661
|
);
|
|
7554
7662
|
subscribeToTransitionEvent();
|
|
@@ -7592,7 +7700,7 @@ var isItemDisabled = (item) => {
|
|
|
7592
7700
|
};
|
|
7593
7701
|
var getChildControlConfig = (recentlyUsedList, disabledItems, showPromotion) => {
|
|
7594
7702
|
return {
|
|
7595
|
-
propTypeUtil:
|
|
7703
|
+
propTypeUtil: import_editor_props57.selectionSizePropTypeUtil,
|
|
7596
7704
|
component: SelectionSizeControl,
|
|
7597
7705
|
props: getSelectionSizeProps(recentlyUsedList, disabledItems, showPromotion),
|
|
7598
7706
|
isItemDisabled
|
|
@@ -7723,17 +7831,17 @@ var TransitionRepeaterControl = createControl(
|
|
|
7723
7831
|
// src/controls/date-time-control.tsx
|
|
7724
7832
|
var React109 = __toESM(require("react"));
|
|
7725
7833
|
var dayjs = __toESM(require("dayjs"));
|
|
7726
|
-
var import_editor_props57 = require("@elementor/editor-props");
|
|
7727
7834
|
var import_editor_props58 = require("@elementor/editor-props");
|
|
7835
|
+
var import_editor_props59 = require("@elementor/editor-props");
|
|
7728
7836
|
var import_ui93 = require("@elementor/ui");
|
|
7729
7837
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
7730
7838
|
var TIME_FORMAT = "HH:mm";
|
|
7731
7839
|
var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
7732
|
-
const { value, setValue, ...propContext } = useBoundProp(
|
|
7840
|
+
const { value, setValue, ...propContext } = useBoundProp(import_editor_props59.DateTimePropTypeUtil);
|
|
7733
7841
|
const handleChange = (newValue, meta) => {
|
|
7734
7842
|
const field = meta.bind;
|
|
7735
7843
|
const fieldValue = newValue[field];
|
|
7736
|
-
if ((0,
|
|
7844
|
+
if ((0, import_editor_props58.isTransformable)(fieldValue)) {
|
|
7737
7845
|
return setValue({ ...value, [field]: fieldValue });
|
|
7738
7846
|
}
|
|
7739
7847
|
let formattedValue = "";
|
|
@@ -7772,7 +7880,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7772
7880
|
return /* @__PURE__ */ React109.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React109.createElement(ControlActions, null, /* @__PURE__ */ React109.createElement(import_ui93.LocalizationProvider, null, /* @__PURE__ */ React109.createElement(import_ui93.Box, { display: "flex", gap: 1, alignItems: "center" }, /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: "date" }, /* @__PURE__ */ React109.createElement(
|
|
7773
7881
|
import_ui93.DatePicker,
|
|
7774
7882
|
{
|
|
7775
|
-
value: parseDateValue(
|
|
7883
|
+
value: parseDateValue(import_editor_props58.stringPropTypeUtil.extract(value?.date)),
|
|
7776
7884
|
onChange: (v) => handleChange({ date: v }, { bind: "date" }),
|
|
7777
7885
|
disabled: inputDisabled,
|
|
7778
7886
|
slotProps: {
|
|
@@ -7784,7 +7892,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7784
7892
|
)), /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: "time" }, /* @__PURE__ */ React109.createElement(
|
|
7785
7893
|
import_ui93.TimePicker,
|
|
7786
7894
|
{
|
|
7787
|
-
value: parseTimeValue(
|
|
7895
|
+
value: parseTimeValue(import_editor_props58.stringPropTypeUtil.extract(value?.time)),
|
|
7788
7896
|
onChange: (v) => handleChange({ time: v }, { bind: "time" }),
|
|
7789
7897
|
disabled: inputDisabled,
|
|
7790
7898
|
slotProps: {
|
|
@@ -7798,13 +7906,13 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7798
7906
|
|
|
7799
7907
|
// src/controls/date-range-control.tsx
|
|
7800
7908
|
var React111 = __toESM(require("react"));
|
|
7801
|
-
var
|
|
7909
|
+
var import_editor_props61 = require("@elementor/editor-props");
|
|
7802
7910
|
var import_ui95 = require("@elementor/ui");
|
|
7803
7911
|
var import_i18n55 = require("@wordpress/i18n");
|
|
7804
7912
|
|
|
7805
7913
|
// src/controls/date-string-control.tsx
|
|
7806
7914
|
var React110 = __toESM(require("react"));
|
|
7807
|
-
var
|
|
7915
|
+
var import_editor_props60 = require("@elementor/editor-props");
|
|
7808
7916
|
var import_ui94 = require("@elementor/ui");
|
|
7809
7917
|
|
|
7810
7918
|
// src/utils/date-time.ts
|
|
@@ -7839,7 +7947,7 @@ function parseTimeString(raw) {
|
|
|
7839
7947
|
// src/controls/date-string-control.tsx
|
|
7840
7948
|
var DateStringControl = createControl(
|
|
7841
7949
|
({ inputDisabled, ariaLabel, error, coerceInvalidToNull = false }) => {
|
|
7842
|
-
const { value, setValue, disabled } = useBoundProp(
|
|
7950
|
+
const { value, setValue, disabled } = useBoundProp(import_editor_props60.dateStringPropTypeUtil);
|
|
7843
7951
|
const isDisabled = inputDisabled ?? disabled;
|
|
7844
7952
|
const slotProps = {
|
|
7845
7953
|
textField: {
|
|
@@ -7887,9 +7995,9 @@ var isMaxBeforeMin = (minIso, maxIso) => {
|
|
|
7887
7995
|
};
|
|
7888
7996
|
var RANGE_ERROR_MESSAGE = (0, import_i18n55.__)("Max date must be on or after Min date", "elementor");
|
|
7889
7997
|
var DateRangeControl = createControl(() => {
|
|
7890
|
-
const { value, setValue, ...propContext } = useBoundProp(
|
|
7891
|
-
const minString =
|
|
7892
|
-
const maxString =
|
|
7998
|
+
const { value, setValue, ...propContext } = useBoundProp(import_editor_props61.dateRangePropTypeUtil);
|
|
7999
|
+
const minString = import_editor_props61.dateStringPropTypeUtil.extract(value?.min);
|
|
8000
|
+
const maxString = import_editor_props61.dateStringPropTypeUtil.extract(value?.max);
|
|
7893
8001
|
const hasInvalidRange = isMaxBeforeMin(minString, maxString);
|
|
7894
8002
|
return /* @__PURE__ */ React111.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React111.createElement(import_ui95.Stack, { gap: 0.75 }, /* @__PURE__ */ React111.createElement(import_ui95.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React111.createElement(import_ui95.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React111.createElement(import_ui95.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React111.createElement(ControlFormLabel, null, RANGE_LABELS.min)), /* @__PURE__ */ React111.createElement(import_ui95.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React111.createElement(
|
|
7895
8003
|
BoundDateStringControl,
|
|
@@ -7917,11 +8025,11 @@ var BoundDateStringControl = ({
|
|
|
7917
8025
|
|
|
7918
8026
|
// src/controls/time-string-control.tsx
|
|
7919
8027
|
var React112 = __toESM(require("react"));
|
|
7920
|
-
var
|
|
8028
|
+
var import_editor_props62 = require("@elementor/editor-props");
|
|
7921
8029
|
var import_ui96 = require("@elementor/ui");
|
|
7922
8030
|
var TimeStringControl = createControl(
|
|
7923
8031
|
({ inputDisabled, ariaLabel, error, coerceInvalidToNull = false }) => {
|
|
7924
|
-
const { value, setValue, disabled } = useBoundProp(
|
|
8032
|
+
const { value, setValue, disabled } = useBoundProp(import_editor_props62.timeStringPropTypeUtil);
|
|
7925
8033
|
const isDisabled = inputDisabled ?? disabled;
|
|
7926
8034
|
const slotProps = {
|
|
7927
8035
|
textField: {
|
|
@@ -7958,7 +8066,7 @@ var TimeStringControl = createControl(
|
|
|
7958
8066
|
|
|
7959
8067
|
// src/controls/time-range-control.tsx
|
|
7960
8068
|
var React113 = __toESM(require("react"));
|
|
7961
|
-
var
|
|
8069
|
+
var import_editor_props63 = require("@elementor/editor-props");
|
|
7962
8070
|
var import_ui97 = require("@elementor/ui");
|
|
7963
8071
|
var import_i18n56 = require("@wordpress/i18n");
|
|
7964
8072
|
var RANGE_LABELS2 = {
|
|
@@ -7966,7 +8074,7 @@ var RANGE_LABELS2 = {
|
|
|
7966
8074
|
max: (0, import_i18n56.__)("End time", "elementor")
|
|
7967
8075
|
};
|
|
7968
8076
|
var TimeRangeControl = createControl(() => {
|
|
7969
|
-
const { value, setValue, ...propContext } = useBoundProp(
|
|
8077
|
+
const { value, setValue, ...propContext } = useBoundProp(import_editor_props63.timeRangePropTypeUtil);
|
|
7970
8078
|
return /* @__PURE__ */ React113.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React113.createElement(import_ui97.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React113.createElement(import_ui97.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React113.createElement(import_ui97.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React113.createElement(ControlFormLabel, null, RANGE_LABELS2.min)), /* @__PURE__ */ React113.createElement(import_ui97.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React113.createElement(BoundTimeStringControl, { bind: "min", ariaLabel: RANGE_LABELS2.min }))), /* @__PURE__ */ React113.createElement(import_ui97.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React113.createElement(import_ui97.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React113.createElement(ControlFormLabel, null, RANGE_LABELS2.max)), /* @__PURE__ */ React113.createElement(import_ui97.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React113.createElement(BoundTimeStringControl, { bind: "max", ariaLabel: RANGE_LABELS2.max })))));
|
|
7971
8079
|
});
|
|
7972
8080
|
var BoundTimeStringControl = ({ bind, ariaLabel }) => {
|
|
@@ -7976,7 +8084,7 @@ var BoundTimeStringControl = ({ bind, ariaLabel }) => {
|
|
|
7976
8084
|
// src/controls/inline-editing-control.tsx
|
|
7977
8085
|
var React117 = __toESM(require("react"));
|
|
7978
8086
|
var import_react71 = require("react");
|
|
7979
|
-
var
|
|
8087
|
+
var import_editor_props65 = require("@elementor/editor-props");
|
|
7980
8088
|
var import_ui101 = require("@elementor/ui");
|
|
7981
8089
|
|
|
7982
8090
|
// src/components/inline-editor.tsx
|
|
@@ -7998,7 +8106,7 @@ var import_extension_underline = __toESM(require("@tiptap/extension-underline"))
|
|
|
7998
8106
|
var import_react67 = require("@tiptap/react");
|
|
7999
8107
|
|
|
8000
8108
|
// src/utils/inline-editing.ts
|
|
8001
|
-
var
|
|
8109
|
+
var import_editor_props64 = require("@elementor/editor-props");
|
|
8002
8110
|
function isEmpty(value = "") {
|
|
8003
8111
|
if (!value) {
|
|
8004
8112
|
return true;
|
|
@@ -8016,11 +8124,11 @@ function htmlToPlainText(html) {
|
|
|
8016
8124
|
return doc.body.textContent ?? "";
|
|
8017
8125
|
}
|
|
8018
8126
|
function extractInlineHtmlContent(propValue) {
|
|
8019
|
-
if (
|
|
8020
|
-
return
|
|
8127
|
+
if (import_editor_props64.escapedHtmlPropTypeUtil.isValid(propValue)) {
|
|
8128
|
+
return import_editor_props64.escapedHtmlPropTypeUtil.extract(propValue) ?? "";
|
|
8021
8129
|
}
|
|
8022
|
-
const htmlV3 =
|
|
8023
|
-
return
|
|
8130
|
+
const htmlV3 = import_editor_props64.htmlV3PropTypeUtil.extract(propValue);
|
|
8131
|
+
return import_editor_props64.stringPropTypeUtil.extract(htmlV3?.content ?? null) ?? "";
|
|
8024
8132
|
}
|
|
8025
8133
|
|
|
8026
8134
|
// src/components/inline-editor.tsx
|
|
@@ -8455,7 +8563,7 @@ var possibleFormats = Object.keys(formatButtons);
|
|
|
8455
8563
|
|
|
8456
8564
|
// src/controls/inline-editing-control.tsx
|
|
8457
8565
|
var InlineEditingControl = createControl(({ sx, attributes, props, context: { elementId } }) => {
|
|
8458
|
-
const { setValue, placeholder, value } = useBoundProp(
|
|
8566
|
+
const { setValue, placeholder, value } = useBoundProp(import_editor_props65.escapedHtmlPropTypeUtil);
|
|
8459
8567
|
const { value: rawValue } = usePropKeyContext();
|
|
8460
8568
|
const content = value ?? extractInlineHtmlContent(rawValue);
|
|
8461
8569
|
const [editor, setEditor] = (0, import_react71.useState)(null);
|
|
@@ -8542,7 +8650,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8542
8650
|
|
|
8543
8651
|
// src/controls/email-form-action-control/index.tsx
|
|
8544
8652
|
var React121 = __toESM(require("react"));
|
|
8545
|
-
var
|
|
8653
|
+
var import_editor_props68 = require("@elementor/editor-props");
|
|
8546
8654
|
var import_editor_ui16 = require("@elementor/editor-ui");
|
|
8547
8655
|
var import_ui105 = require("@elementor/ui");
|
|
8548
8656
|
var import_i18n60 = require("@wordpress/i18n");
|
|
@@ -8555,7 +8663,7 @@ var import_i18n59 = require("@wordpress/i18n");
|
|
|
8555
8663
|
|
|
8556
8664
|
// src/hooks/use-form-field-suggestions.ts
|
|
8557
8665
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
8558
|
-
var
|
|
8666
|
+
var import_editor_props66 = require("@elementor/editor-props");
|
|
8559
8667
|
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
8560
8668
|
var FORM_FIELD_WIDGET_TYPES = [
|
|
8561
8669
|
"e-form-input",
|
|
@@ -8572,7 +8680,7 @@ function isFormFieldWidgetType(widgetType) {
|
|
|
8572
8680
|
return FORM_FIELD_WIDGET_TYPES.includes(widgetType);
|
|
8573
8681
|
}
|
|
8574
8682
|
function extractStringPropValue(value) {
|
|
8575
|
-
return
|
|
8683
|
+
return import_editor_props66.stringPropTypeUtil.extract(value);
|
|
8576
8684
|
}
|
|
8577
8685
|
function getSettingWithDefault(child, widgetType, key) {
|
|
8578
8686
|
const fromGet = child.settings.get(key);
|
|
@@ -8642,7 +8750,7 @@ function useFormFieldSuggestions(options) {
|
|
|
8642
8750
|
// src/controls/email-form-action-control/email-chips-field.tsx
|
|
8643
8751
|
var React118 = __toESM(require("react"));
|
|
8644
8752
|
var import_react72 = require("react");
|
|
8645
|
-
var
|
|
8753
|
+
var import_editor_props67 = require("@elementor/editor-props");
|
|
8646
8754
|
var import_ui102 = require("@elementor/ui");
|
|
8647
8755
|
|
|
8648
8756
|
// src/controls/email-form-action-control/utils.ts
|
|
@@ -8678,10 +8786,10 @@ function resolveMention(raw, suggestions) {
|
|
|
8678
8786
|
return match ? `[${match.value}]` : raw;
|
|
8679
8787
|
}
|
|
8680
8788
|
var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
8681
|
-
const { value, setValue, disabled } = useBoundProp(
|
|
8789
|
+
const { value, setValue, disabled } = useBoundProp(import_editor_props67.stringArrayPropTypeUtil);
|
|
8682
8790
|
const [inputValue, setInputValue] = (0, import_react72.useState)("");
|
|
8683
8791
|
const items2 = value || [];
|
|
8684
|
-
const selectedValues = items2.map((item) =>
|
|
8792
|
+
const selectedValues = items2.map((item) => import_editor_props67.stringPropTypeUtil.extract(item)).filter((val) => val !== null);
|
|
8685
8793
|
const suggestionOptions = (0, import_react72.useMemo)(
|
|
8686
8794
|
() => suggestions.map((suggestion) => `[${suggestion.value}]`),
|
|
8687
8795
|
[suggestions]
|
|
@@ -8691,7 +8799,7 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
8691
8799
|
if (!address || selectedValues.includes(address) || !isValidRecipient(address)) {
|
|
8692
8800
|
return;
|
|
8693
8801
|
}
|
|
8694
|
-
setValue([...items2,
|
|
8802
|
+
setValue([...items2, import_editor_props67.stringPropTypeUtil.create(address)]);
|
|
8695
8803
|
setInputValue("");
|
|
8696
8804
|
};
|
|
8697
8805
|
const handleChange = (_, newValue) => {
|
|
@@ -8701,7 +8809,7 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
8701
8809
|
if (!address || !isValidRecipient(address)) {
|
|
8702
8810
|
continue;
|
|
8703
8811
|
}
|
|
8704
|
-
updated.push(
|
|
8812
|
+
updated.push(import_editor_props67.stringPropTypeUtil.create(address));
|
|
8705
8813
|
}
|
|
8706
8814
|
setValue(updated);
|
|
8707
8815
|
setInputValue("");
|
|
@@ -8842,7 +8950,7 @@ var SendAsField = () => /* @__PURE__ */ React120.createElement(PropKeyProvider,
|
|
|
8842
8950
|
// src/controls/email-form-action-control/index.tsx
|
|
8843
8951
|
var EmailFormActionControl = createControl(
|
|
8844
8952
|
({ toPlaceholder, label }) => {
|
|
8845
|
-
const { value, setValue, ...propContext } = useBoundProp(
|
|
8953
|
+
const { value, setValue, ...propContext } = useBoundProp(import_editor_props68.emailsPropTypeUtil);
|
|
8846
8954
|
return /* @__PURE__ */ React121.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React121.createElement(import_ui105.Stack, { gap: 2 }, /* @__PURE__ */ React121.createElement(ControlLabel, null, label ? label + " " + (0, import_i18n60.__)("settings", "elementor") : (0, import_i18n60.__)("Email settings", "elementor")), /* @__PURE__ */ React121.createElement(SendToField, { placeholder: toPlaceholder }), /* @__PURE__ */ React121.createElement(SubjectField, null), /* @__PURE__ */ React121.createElement(MessageField, null), /* @__PURE__ */ React121.createElement(FromEmailField, null), /* @__PURE__ */ React121.createElement(AdvancedSettings, null)));
|
|
8847
8955
|
}
|
|
8848
8956
|
);
|
|
@@ -8862,7 +8970,7 @@ var AttachmentTypeControl = createControl(({ label, options }) => {
|
|
|
8862
8970
|
|
|
8863
8971
|
// src/controls/grid-span-control.tsx
|
|
8864
8972
|
var React123 = __toESM(require("react"));
|
|
8865
|
-
var
|
|
8973
|
+
var import_editor_props69 = require("@elementor/editor-props");
|
|
8866
8974
|
var import_ui107 = require("@elementor/ui");
|
|
8867
8975
|
var GridSpanControl = createControl(
|
|
8868
8976
|
({
|
|
@@ -8874,7 +8982,7 @@ var GridSpanControl = createControl(
|
|
|
8874
8982
|
sx,
|
|
8875
8983
|
ariaLabel
|
|
8876
8984
|
}) => {
|
|
8877
|
-
const { value, setValue, disabled, placeholder: boundPlaceholder } = useBoundProp(
|
|
8985
|
+
const { value, setValue, disabled, placeholder: boundPlaceholder } = useBoundProp(import_editor_props69.spanPropTypeUtil);
|
|
8878
8986
|
const handleChange = (event) => {
|
|
8879
8987
|
const next = event.target.value;
|
|
8880
8988
|
setValue(next === "" ? null : next);
|