@elementor/editor-controls 4.2.0-939 → 4.2.0-940
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/controls/font-family-control/font-family-control.tsx +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3924,7 +3924,7 @@ function getCssDimensionProps(label, isSiteRtl) {
|
|
|
3924
3924
|
// src/controls/font-family-control/font-family-control.tsx
|
|
3925
3925
|
import * as React67 from "react";
|
|
3926
3926
|
import { useMemo as useMemo8 } from "react";
|
|
3927
|
-
import {
|
|
3927
|
+
import { fontFamilyPropTypeUtil } from "@elementor/editor-props";
|
|
3928
3928
|
import { ChevronDownIcon as ChevronDownIcon2, TextIcon } from "@elementor/icons";
|
|
3929
3929
|
import { bindPopover as bindPopover5, bindTrigger as bindTrigger4, Popover as Popover5, UnstableTag as UnstableTag2, usePopupState as usePopupState7 } from "@elementor/ui";
|
|
3930
3930
|
import { __ as __22 } from "@wordpress/i18n";
|
|
@@ -4103,7 +4103,7 @@ var FontFamilyControl = createControl(
|
|
|
4103
4103
|
setValue: setFontFamily,
|
|
4104
4104
|
disabled,
|
|
4105
4105
|
placeholder
|
|
4106
|
-
} = useBoundProp(
|
|
4106
|
+
} = useBoundProp(fontFamilyPropTypeUtil);
|
|
4107
4107
|
const popoverState = usePopupState7({ variant: "popover" });
|
|
4108
4108
|
const isShowingPlaceholder = !fontFamily && placeholder;
|
|
4109
4109
|
const mapFontSubs = useMemo8(() => {
|
|
@@ -4279,7 +4279,7 @@ var RestrictedLinkInfotip = ({
|
|
|
4279
4279
|
|
|
4280
4280
|
// src/controls/query-control.tsx
|
|
4281
4281
|
import * as React71 from "react";
|
|
4282
|
-
import { numberPropTypeUtil as numberPropTypeUtil3, queryPropTypeUtil, stringPropTypeUtil as
|
|
4282
|
+
import { numberPropTypeUtil as numberPropTypeUtil3, queryPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil9, urlPropTypeUtil as urlPropTypeUtil3 } from "@elementor/editor-props";
|
|
4283
4283
|
import { SearchIcon } from "@elementor/icons";
|
|
4284
4284
|
import { __ as __24 } from "@wordpress/i18n";
|
|
4285
4285
|
|
|
@@ -4416,7 +4416,7 @@ function factoryFilter(newValue, options, minInputLength) {
|
|
|
4416
4416
|
|
|
4417
4417
|
// src/hooks/use-query-autocomplete.ts
|
|
4418
4418
|
import { useMemo as useMemo9, useState as useState11 } from "react";
|
|
4419
|
-
import { numberPropTypeUtil as numberPropTypeUtil2, stringPropTypeUtil as
|
|
4419
|
+
import { numberPropTypeUtil as numberPropTypeUtil2, stringPropTypeUtil as stringPropTypeUtil8 } from "@elementor/editor-props";
|
|
4420
4420
|
import { httpService as httpService2 } from "@elementor/http-client";
|
|
4421
4421
|
import { debounce as debounce2 } from "@elementor/utils";
|
|
4422
4422
|
function useQueryAutocomplete({
|
|
@@ -4473,7 +4473,7 @@ function filterExcludedOptions(options, excludeIdSet) {
|
|
|
4473
4473
|
}
|
|
4474
4474
|
function extractFlatOptionFromQueryValue(queryValue) {
|
|
4475
4475
|
const id = numberPropTypeUtil2.extract(queryValue?.id);
|
|
4476
|
-
const label =
|
|
4476
|
+
const label = stringPropTypeUtil8.extract(queryValue?.label);
|
|
4477
4477
|
if (id === null) {
|
|
4478
4478
|
return null;
|
|
4479
4479
|
}
|
|
@@ -4513,7 +4513,7 @@ var QueryControl = createControl((props) => {
|
|
|
4513
4513
|
}
|
|
4514
4514
|
const newQueryValue = {
|
|
4515
4515
|
id: numberPropTypeUtil3.create(newValue),
|
|
4516
|
-
label:
|
|
4516
|
+
label: stringPropTypeUtil9.create(findMatchingOption(options, newValue)?.label || null)
|
|
4517
4517
|
};
|
|
4518
4518
|
setQueryValue(newQueryValue);
|
|
4519
4519
|
onSetValue?.(queryPropTypeUtil.create(newQueryValue));
|
|
@@ -4684,7 +4684,7 @@ function isSameRestriction(a, b) {
|
|
|
4684
4684
|
// src/controls/html-tag-control.tsx
|
|
4685
4685
|
import * as React75 from "react";
|
|
4686
4686
|
import { getElementLabel } from "@elementor/editor-elements";
|
|
4687
|
-
import { stringPropTypeUtil as
|
|
4687
|
+
import { stringPropTypeUtil as stringPropTypeUtil10 } from "@elementor/editor-props";
|
|
4688
4688
|
import { MenuListItem as MenuListItem4 } from "@elementor/editor-ui";
|
|
4689
4689
|
import { Select as Select2, styled as styled8, Typography as Typography6 } from "@elementor/ui";
|
|
4690
4690
|
import { __ as __26 } from "@wordpress/i18n";
|
|
@@ -4742,7 +4742,7 @@ var HtmlTagControl = createControl((props) => {
|
|
|
4742
4742
|
fallbackLabels = {},
|
|
4743
4743
|
context: { elementId }
|
|
4744
4744
|
} = props;
|
|
4745
|
-
const { value, setValue, disabled, placeholder } = useBoundProp(
|
|
4745
|
+
const { value, setValue, disabled, placeholder } = useBoundProp(stringPropTypeUtil10);
|
|
4746
4746
|
const handleChange = (event) => {
|
|
4747
4747
|
const newValue = event.target.value || null;
|
|
4748
4748
|
onChange?.(newValue, value);
|
|
@@ -4793,7 +4793,7 @@ import {
|
|
|
4793
4793
|
createArrayPropUtils,
|
|
4794
4794
|
numberPropTypeUtil as numberPropTypeUtil4,
|
|
4795
4795
|
queryPropTypeUtil as queryPropTypeUtil2,
|
|
4796
|
-
stringPropTypeUtil as
|
|
4796
|
+
stringPropTypeUtil as stringPropTypeUtil11
|
|
4797
4797
|
} from "@elementor/editor-props";
|
|
4798
4798
|
import { Autocomplete as Autocomplete3, TextField as TextField9 } from "@elementor/ui";
|
|
4799
4799
|
import { __ as __27 } from "@wordpress/i18n";
|
|
@@ -4818,7 +4818,7 @@ var QueryChipsControl = createControl((props) => {
|
|
|
4818
4818
|
newValue.map(
|
|
4819
4819
|
(option) => queryPropTypeUtil2.create({
|
|
4820
4820
|
id: numberPropTypeUtil4.create(Number(option.id)),
|
|
4821
|
-
label:
|
|
4821
|
+
label: stringPropTypeUtil11.create(option.label)
|
|
4822
4822
|
})
|
|
4823
4823
|
)
|
|
4824
4824
|
);
|
|
@@ -4870,7 +4870,7 @@ import {
|
|
|
4870
4870
|
queryFilterArrayPropTypeUtil,
|
|
4871
4871
|
queryFilterPropTypeUtil,
|
|
4872
4872
|
stringArrayPropTypeUtil as stringArrayPropTypeUtil2,
|
|
4873
|
-
stringPropTypeUtil as
|
|
4873
|
+
stringPropTypeUtil as stringPropTypeUtil12
|
|
4874
4874
|
} from "@elementor/editor-props";
|
|
4875
4875
|
import { PlusIcon as PlusIcon3 } from "@elementor/icons";
|
|
4876
4876
|
import { Box as Box14, Grid as Grid11, IconButton as IconButton7 } from "@elementor/ui";
|
|
@@ -4944,7 +4944,7 @@ var AddFilterItemAction = ({
|
|
|
4944
4944
|
};
|
|
4945
4945
|
var EmptyIcon = () => null;
|
|
4946
4946
|
var ItemLabel2 = ({ value, keyConfig }) => {
|
|
4947
|
-
const itemKey =
|
|
4947
|
+
const itemKey = stringPropTypeUtil12.extract(value?.value?.key);
|
|
4948
4948
|
const label = itemKey && keyConfig[itemKey]?.label || __28("Item", "elementor");
|
|
4949
4949
|
const chipLabels = extractChipLabels(value?.value?.values);
|
|
4950
4950
|
const taxonomyLabels = extractTaxonomyLabels(
|
|
@@ -4957,7 +4957,7 @@ var ItemLabel2 = ({ value, keyConfig }) => {
|
|
|
4957
4957
|
};
|
|
4958
4958
|
function extractChipLabels(chipsProp) {
|
|
4959
4959
|
const chips = chipsProp?.value ?? [];
|
|
4960
|
-
return chips.map((chip) =>
|
|
4960
|
+
return chips.map((chip) => stringPropTypeUtil12.extract(chip?.value?.label)).filter((label) => !!label);
|
|
4961
4961
|
}
|
|
4962
4962
|
var ItemContent = ({
|
|
4963
4963
|
keyConfig,
|
|
@@ -4971,8 +4971,8 @@ var ItemContent = ({
|
|
|
4971
4971
|
propContext.setValue(nextValue, options, meta);
|
|
4972
4972
|
return;
|
|
4973
4973
|
}
|
|
4974
|
-
const previousKey =
|
|
4975
|
-
const newKey =
|
|
4974
|
+
const previousKey = stringPropTypeUtil12.extract(propContext.value?.key);
|
|
4975
|
+
const newKey = stringPropTypeUtil12.extract(nextValue?.key);
|
|
4976
4976
|
if (previousKey) {
|
|
4977
4977
|
snapshotsByKeyRef.current[previousKey] = {
|
|
4978
4978
|
values: propContext.value?.values ?? null,
|
|
@@ -4990,7 +4990,7 @@ var ItemContent = ({
|
|
|
4990
4990
|
meta
|
|
4991
4991
|
);
|
|
4992
4992
|
};
|
|
4993
|
-
const currentKey =
|
|
4993
|
+
const currentKey = stringPropTypeUtil12.extract(propContext.value?.key);
|
|
4994
4994
|
const currentKeyConfig = currentKey ? keyConfig[currentKey] : void 0;
|
|
4995
4995
|
const valueType = currentKeyConfig?.valueType ?? "chips";
|
|
4996
4996
|
const keySelectOptions = useMemo11(() => getKeySelectOptions(currentKey), [getKeySelectOptions, currentKey]);
|
|
@@ -5012,11 +5012,11 @@ function isKeyVisible(rule, settings) {
|
|
|
5012
5012
|
if (!settings) {
|
|
5013
5013
|
return false;
|
|
5014
5014
|
}
|
|
5015
|
-
const extracted =
|
|
5015
|
+
const extracted = stringPropTypeUtil12.extract(extractValue(rule.path, settings));
|
|
5016
5016
|
return extracted !== null && rule.in.includes(extracted);
|
|
5017
5017
|
}
|
|
5018
5018
|
function extractTaxonomyLabels(taxonomiesProp, config) {
|
|
5019
|
-
const slugs = (stringArrayPropTypeUtil2.extract(taxonomiesProp) ?? []).map((item) =>
|
|
5019
|
+
const slugs = (stringArrayPropTypeUtil2.extract(taxonomiesProp) ?? []).map((item) => stringPropTypeUtil12.extract(item)).filter((slug) => !!slug);
|
|
5020
5020
|
if (!slugs.length) {
|
|
5021
5021
|
return [];
|
|
5022
5022
|
}
|
|
@@ -5025,13 +5025,13 @@ function extractTaxonomyLabels(taxonomiesProp, config) {
|
|
|
5025
5025
|
}
|
|
5026
5026
|
function createItemForKey(key) {
|
|
5027
5027
|
return queryFilterPropTypeUtil.create({
|
|
5028
|
-
key:
|
|
5028
|
+
key: stringPropTypeUtil12.create(key),
|
|
5029
5029
|
values: null,
|
|
5030
5030
|
taxonomies: null
|
|
5031
5031
|
});
|
|
5032
5032
|
}
|
|
5033
5033
|
function getUsedKeys(items2) {
|
|
5034
|
-
const keys = items2.map((item) =>
|
|
5034
|
+
const keys = items2.map((item) => stringPropTypeUtil12.extract(item?.value?.key)).filter((key) => !!key);
|
|
5035
5035
|
return new Set(keys);
|
|
5036
5036
|
}
|
|
5037
5037
|
|
|
@@ -5163,7 +5163,7 @@ var Control4 = ({
|
|
|
5163
5163
|
// src/controls/aspect-ratio-control.tsx
|
|
5164
5164
|
import * as React79 from "react";
|
|
5165
5165
|
import { useEffect as useEffect14, useState as useState14 } from "react";
|
|
5166
|
-
import { stringPropTypeUtil as
|
|
5166
|
+
import { stringPropTypeUtil as stringPropTypeUtil13 } from "@elementor/editor-props";
|
|
5167
5167
|
import { MenuListItem as MenuListItem5 } from "@elementor/editor-ui";
|
|
5168
5168
|
import { ArrowsMoveHorizontalIcon, ArrowsMoveVerticalIcon } from "@elementor/icons";
|
|
5169
5169
|
import { Grid as Grid13, Select as Select3, Stack as Stack12, TextField as TextField10 } from "@elementor/ui";
|
|
@@ -5185,7 +5185,7 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
5185
5185
|
setValue: setAspectRatioValue,
|
|
5186
5186
|
disabled,
|
|
5187
5187
|
placeholder: externalPlaceholder
|
|
5188
|
-
} = useBoundProp(
|
|
5188
|
+
} = useBoundProp(stringPropTypeUtil13);
|
|
5189
5189
|
const aspectRatioValue = currentPropValue ?? externalPlaceholder;
|
|
5190
5190
|
const isCustomSelected = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
|
|
5191
5191
|
const [initialWidth, initialHeight] = isCustomSelected ? aspectRatioValue.split("/") : ["", ""];
|
|
@@ -5576,7 +5576,7 @@ import {
|
|
|
5576
5576
|
colorStopPropTypeUtil,
|
|
5577
5577
|
gradientColorStopPropTypeUtil,
|
|
5578
5578
|
numberPropTypeUtil as numberPropTypeUtil5,
|
|
5579
|
-
stringPropTypeUtil as
|
|
5579
|
+
stringPropTypeUtil as stringPropTypeUtil14
|
|
5580
5580
|
} from "@elementor/editor-props";
|
|
5581
5581
|
import { UnstableGradientBox } from "@elementor/ui";
|
|
5582
5582
|
var BackgroundGradientColorControl = createControl(() => {
|
|
@@ -5584,13 +5584,13 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
5584
5584
|
const handleChange = (newValue) => {
|
|
5585
5585
|
const transformedValue = createTransformableValue(newValue);
|
|
5586
5586
|
if (transformedValue.positions) {
|
|
5587
|
-
transformedValue.positions =
|
|
5587
|
+
transformedValue.positions = stringPropTypeUtil14.create(newValue.positions.join(" "));
|
|
5588
5588
|
}
|
|
5589
5589
|
setValue(transformedValue);
|
|
5590
5590
|
};
|
|
5591
5591
|
const createTransformableValue = (newValue) => ({
|
|
5592
5592
|
...newValue,
|
|
5593
|
-
type:
|
|
5593
|
+
type: stringPropTypeUtil14.create(newValue.type),
|
|
5594
5594
|
angle: numberPropTypeUtil5.create(newValue.angle),
|
|
5595
5595
|
stops: gradientColorStopPropTypeUtil.create(
|
|
5596
5596
|
newValue.stops.map(
|
|
@@ -5626,7 +5626,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
5626
5626
|
);
|
|
5627
5627
|
});
|
|
5628
5628
|
var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.create({
|
|
5629
|
-
type:
|
|
5629
|
+
type: stringPropTypeUtil14.create("linear"),
|
|
5630
5630
|
angle: numberPropTypeUtil5.create(180),
|
|
5631
5631
|
stops: gradientColorStopPropTypeUtil.create([
|
|
5632
5632
|
colorStopPropTypeUtil.create({
|
|
@@ -5666,7 +5666,7 @@ var BackgroundImageOverlayAttachment = () => {
|
|
|
5666
5666
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
5667
5667
|
import * as React85 from "react";
|
|
5668
5668
|
import { useRef as useRef15 } from "react";
|
|
5669
|
-
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as
|
|
5669
|
+
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil15 } from "@elementor/editor-props";
|
|
5670
5670
|
import { MenuListItem as MenuListItem6 } from "@elementor/editor-ui";
|
|
5671
5671
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
5672
5672
|
import { Grid as Grid15, Select as Select4 } from "@elementor/ui";
|
|
@@ -5685,7 +5685,7 @@ var backgroundPositionOptions = [
|
|
|
5685
5685
|
];
|
|
5686
5686
|
var BackgroundImageOverlayPosition = () => {
|
|
5687
5687
|
const backgroundImageOffsetContext = useBoundProp(backgroundImagePositionOffsetPropTypeUtil);
|
|
5688
|
-
const stringPropContext = useBoundProp(
|
|
5688
|
+
const stringPropContext = useBoundProp(stringPropTypeUtil15);
|
|
5689
5689
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
5690
5690
|
const rowRef = useRef15(null);
|
|
5691
5691
|
const handlePositionChange = (event) => {
|
|
@@ -5761,7 +5761,7 @@ var BackgroundImageOverlayRepeat = () => {
|
|
|
5761
5761
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
5762
5762
|
import * as React87 from "react";
|
|
5763
5763
|
import { useRef as useRef16 } from "react";
|
|
5764
|
-
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as
|
|
5764
|
+
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil16 } from "@elementor/editor-props";
|
|
5765
5765
|
import {
|
|
5766
5766
|
ArrowBarBothIcon,
|
|
5767
5767
|
ArrowsMaximizeIcon,
|
|
@@ -5800,7 +5800,7 @@ var sizeControlOptions = [
|
|
|
5800
5800
|
];
|
|
5801
5801
|
var BackgroundImageOverlaySize = () => {
|
|
5802
5802
|
const backgroundImageScaleContext = useBoundProp(backgroundImageSizeScalePropTypeUtil);
|
|
5803
|
-
const stringPropContext = useBoundProp(
|
|
5803
|
+
const stringPropContext = useBoundProp(stringPropTypeUtil16);
|
|
5804
5804
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
5805
5805
|
const rowRef = useRef16(null);
|
|
5806
5806
|
const handleSizeChange = (size) => {
|
|
@@ -6268,7 +6268,7 @@ import { useMemo as useMemo13, useState as useState17 } from "react";
|
|
|
6268
6268
|
import {
|
|
6269
6269
|
isTransformable,
|
|
6270
6270
|
keyValuePropTypeUtil,
|
|
6271
|
-
stringPropTypeUtil as
|
|
6271
|
+
stringPropTypeUtil as stringPropTypeUtil17
|
|
6272
6272
|
} from "@elementor/editor-props";
|
|
6273
6273
|
import { FormHelperText, FormLabel as FormLabel3, Grid as Grid19 } from "@elementor/ui";
|
|
6274
6274
|
import { __ as __40 } from "@wordpress/i18n";
|
|
@@ -6340,7 +6340,7 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6340
6340
|
});
|
|
6341
6341
|
return;
|
|
6342
6342
|
}
|
|
6343
|
-
const extractedValue =
|
|
6343
|
+
const extractedValue = stringPropTypeUtil17.extract(newChangedValue);
|
|
6344
6344
|
setSessionState((prev) => ({
|
|
6345
6345
|
...prev,
|
|
6346
6346
|
[fieldType]: extractedValue
|
|
@@ -6380,7 +6380,7 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6380
6380
|
|
|
6381
6381
|
// src/controls/position-control.tsx
|
|
6382
6382
|
import * as React92 from "react";
|
|
6383
|
-
import { positionPropTypeUtil, stringPropTypeUtil as
|
|
6383
|
+
import { positionPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil18 } from "@elementor/editor-props";
|
|
6384
6384
|
import { MenuListItem as MenuListItem7 } from "@elementor/editor-ui";
|
|
6385
6385
|
import { LetterXIcon as LetterXIcon2, LetterYIcon as LetterYIcon2 } from "@elementor/icons";
|
|
6386
6386
|
import { Grid as Grid20, Select as Select5 } from "@elementor/ui";
|
|
@@ -6399,7 +6399,7 @@ var positionOptions = [
|
|
|
6399
6399
|
];
|
|
6400
6400
|
var PositionControl = () => {
|
|
6401
6401
|
const positionContext = useBoundProp(positionPropTypeUtil);
|
|
6402
|
-
const stringPropContext = useBoundProp(
|
|
6402
|
+
const stringPropContext = useBoundProp(stringPropTypeUtil18);
|
|
6403
6403
|
const isCustom = !!positionContext.value;
|
|
6404
6404
|
const placeholder = positionContext.placeholder ? "custom" : stringPropContext.placeholder ?? null;
|
|
6405
6405
|
const handlePositionChange = (event) => {
|
|
@@ -7658,7 +7658,7 @@ var TransitionRepeaterControl = createControl(
|
|
|
7658
7658
|
// src/controls/date-time-control.tsx
|
|
7659
7659
|
import * as React109 from "react";
|
|
7660
7660
|
import * as dayjs from "dayjs";
|
|
7661
|
-
import { isTransformable as isTransformable2, stringPropTypeUtil as
|
|
7661
|
+
import { isTransformable as isTransformable2, stringPropTypeUtil as stringPropTypeUtil19 } from "@elementor/editor-props";
|
|
7662
7662
|
import { DateTimePropTypeUtil } from "@elementor/editor-props";
|
|
7663
7663
|
import { Box as Box23, DatePicker, LocalizationProvider, TimePicker } from "@elementor/ui";
|
|
7664
7664
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
@@ -7707,7 +7707,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7707
7707
|
return /* @__PURE__ */ React109.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React109.createElement(ControlActions, null, /* @__PURE__ */ React109.createElement(LocalizationProvider, null, /* @__PURE__ */ React109.createElement(Box23, { display: "flex", gap: 1, alignItems: "center" }, /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: "date" }, /* @__PURE__ */ React109.createElement(
|
|
7708
7708
|
DatePicker,
|
|
7709
7709
|
{
|
|
7710
|
-
value: parseDateValue(
|
|
7710
|
+
value: parseDateValue(stringPropTypeUtil19.extract(value?.date)),
|
|
7711
7711
|
onChange: (v) => handleChange({ date: v }, { bind: "date" }),
|
|
7712
7712
|
disabled: inputDisabled,
|
|
7713
7713
|
slotProps: {
|
|
@@ -7719,7 +7719,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7719
7719
|
)), /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: "time" }, /* @__PURE__ */ React109.createElement(
|
|
7720
7720
|
TimePicker,
|
|
7721
7721
|
{
|
|
7722
|
-
value: parseTimeValue(
|
|
7722
|
+
value: parseTimeValue(stringPropTypeUtil19.extract(value?.time)),
|
|
7723
7723
|
onChange: (v) => handleChange({ time: v }, { bind: "time" }),
|
|
7724
7724
|
disabled: inputDisabled,
|
|
7725
7725
|
slotProps: {
|
|
@@ -7911,7 +7911,7 @@ var BoundTimeStringControl = ({ bind, ariaLabel }) => {
|
|
|
7911
7911
|
// src/controls/inline-editing-control.tsx
|
|
7912
7912
|
import * as React115 from "react";
|
|
7913
7913
|
import { useCallback as useCallback4, useEffect as useEffect17, useMemo as useMemo17 } from "react";
|
|
7914
|
-
import { htmlV3PropTypeUtil, parseHtmlChildren, stringPropTypeUtil as
|
|
7914
|
+
import { htmlV3PropTypeUtil, parseHtmlChildren, stringPropTypeUtil as stringPropTypeUtil20 } from "@elementor/editor-props";
|
|
7915
7915
|
import { Box as Box25 } from "@elementor/ui";
|
|
7916
7916
|
import { debounce as debounce3 } from "@elementor/utils";
|
|
7917
7917
|
|
|
@@ -8088,12 +8088,12 @@ var InlineEditingControl = createControl(
|
|
|
8088
8088
|
props
|
|
8089
8089
|
}) => {
|
|
8090
8090
|
const { value, setValue, placeholder } = useBoundProp(htmlV3PropTypeUtil);
|
|
8091
|
-
const content =
|
|
8091
|
+
const content = stringPropTypeUtil20.extract(value?.content ?? null) ?? "";
|
|
8092
8092
|
const debouncedParse = useMemo17(
|
|
8093
8093
|
() => debounce3((html) => {
|
|
8094
8094
|
const parsed = parseHtmlChildren(html);
|
|
8095
8095
|
setValue({
|
|
8096
|
-
content: parsed.content ?
|
|
8096
|
+
content: parsed.content ? stringPropTypeUtil20.create(parsed.content) : null,
|
|
8097
8097
|
children: parsed.children
|
|
8098
8098
|
});
|
|
8099
8099
|
}, CHILDREN_PARSE_DEBOUNCE_MS),
|
|
@@ -8103,7 +8103,7 @@ var InlineEditingControl = createControl(
|
|
|
8103
8103
|
(newValue) => {
|
|
8104
8104
|
const html = newValue ?? "";
|
|
8105
8105
|
setValue({
|
|
8106
|
-
content: html ?
|
|
8106
|
+
content: html ? stringPropTypeUtil20.create(html) : null,
|
|
8107
8107
|
children: value?.children ?? []
|
|
8108
8108
|
});
|
|
8109
8109
|
debouncedParse(html);
|
|
@@ -8183,7 +8183,7 @@ import { __ as __57 } from "@wordpress/i18n";
|
|
|
8183
8183
|
|
|
8184
8184
|
// src/hooks/use-form-field-suggestions.ts
|
|
8185
8185
|
import { getContainer as getContainer2, getSelectedElements as getSelectedElements3, getWidgetsCache } from "@elementor/editor-elements";
|
|
8186
|
-
import { stringPropTypeUtil as
|
|
8186
|
+
import { stringPropTypeUtil as stringPropTypeUtil21 } from "@elementor/editor-props";
|
|
8187
8187
|
import { __privateUseListenTo as useListenTo2, commandEndEvent as commandEndEvent2, v1ReadyEvent } from "@elementor/editor-v1-adapters";
|
|
8188
8188
|
var FORM_FIELD_WIDGET_TYPES = [
|
|
8189
8189
|
"e-form-input",
|
|
@@ -8200,7 +8200,7 @@ function isFormFieldWidgetType(widgetType) {
|
|
|
8200
8200
|
return FORM_FIELD_WIDGET_TYPES.includes(widgetType);
|
|
8201
8201
|
}
|
|
8202
8202
|
function extractStringPropValue(value) {
|
|
8203
|
-
return
|
|
8203
|
+
return stringPropTypeUtil21.extract(value);
|
|
8204
8204
|
}
|
|
8205
8205
|
function getSettingWithDefault(child, widgetType, key) {
|
|
8206
8206
|
const fromGet = child.settings.get(key);
|
|
@@ -8270,7 +8270,7 @@ function useFormFieldSuggestions(options) {
|
|
|
8270
8270
|
// src/controls/email-form-action-control/email-chips-field.tsx
|
|
8271
8271
|
import * as React116 from "react";
|
|
8272
8272
|
import { useState as useState19 } from "react";
|
|
8273
|
-
import { stringArrayPropTypeUtil as stringArrayPropTypeUtil3, stringPropTypeUtil as
|
|
8273
|
+
import { stringArrayPropTypeUtil as stringArrayPropTypeUtil3, stringPropTypeUtil as stringPropTypeUtil22 } from "@elementor/editor-props";
|
|
8274
8274
|
import { Autocomplete as Autocomplete4, Grid as Grid32, TextField as TextField11 } from "@elementor/ui";
|
|
8275
8275
|
|
|
8276
8276
|
// src/controls/email-form-action-control/utils.ts
|
|
@@ -8297,13 +8297,13 @@ var EmailChipsField = ({ fieldLabel, placeholder }) => {
|
|
|
8297
8297
|
const { value, setValue, disabled } = useBoundProp(stringArrayPropTypeUtil3);
|
|
8298
8298
|
const [inputValue, setInputValue] = useState19("");
|
|
8299
8299
|
const items2 = value || [];
|
|
8300
|
-
const selectedValues = items2.map((item) =>
|
|
8300
|
+
const selectedValues = items2.map((item) => stringPropTypeUtil22.extract(item)).filter((val) => val !== null);
|
|
8301
8301
|
const tryAddChip = (raw) => {
|
|
8302
8302
|
const address = raw.trim();
|
|
8303
8303
|
if (!address || selectedValues.includes(address) || !isValidEmail(address)) {
|
|
8304
8304
|
return;
|
|
8305
8305
|
}
|
|
8306
|
-
setValue([...items2,
|
|
8306
|
+
setValue([...items2, stringPropTypeUtil22.create(address)]);
|
|
8307
8307
|
setInputValue("");
|
|
8308
8308
|
};
|
|
8309
8309
|
const handleChange = (_, newValue) => {
|
|
@@ -8313,7 +8313,7 @@ var EmailChipsField = ({ fieldLabel, placeholder }) => {
|
|
|
8313
8313
|
if (!address || !isValidEmail(address)) {
|
|
8314
8314
|
continue;
|
|
8315
8315
|
}
|
|
8316
|
-
updated.push(
|
|
8316
|
+
updated.push(stringPropTypeUtil22.create(address));
|
|
8317
8317
|
}
|
|
8318
8318
|
setValue(updated);
|
|
8319
8319
|
setInputValue("");
|