@elementor/editor-controls 3.35.0-387 → 3.35.0-388
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +163 -169
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +89 -95
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/controls/equal-unequal-sizes-control.tsx +57 -58
package/dist/index.js
CHANGED
|
@@ -2633,7 +2633,6 @@ var NumberControl = createControl(
|
|
|
2633
2633
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
2634
2634
|
var React56 = __toESM(require("react"));
|
|
2635
2635
|
var import_react28 = require("react");
|
|
2636
|
-
var import_editor_props18 = require("@elementor/editor-props");
|
|
2637
2636
|
var import_ui41 = require("@elementor/ui");
|
|
2638
2637
|
var import_i18n17 = require("@wordpress/i18n");
|
|
2639
2638
|
|
|
@@ -2645,16 +2644,6 @@ var ControlLabel = ({ children, ...props }) => {
|
|
|
2645
2644
|
};
|
|
2646
2645
|
|
|
2647
2646
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
2648
|
-
var isEqualSizes = (propValue, items2) => {
|
|
2649
|
-
const values = Object.values(propValue);
|
|
2650
|
-
if (values.length !== items2.length) {
|
|
2651
|
-
return false;
|
|
2652
|
-
}
|
|
2653
|
-
const [firstValue, ...restValues] = values;
|
|
2654
|
-
return restValues.every(
|
|
2655
|
-
(value) => value?.value?.size === firstValue?.value?.size && value?.value?.unit === firstValue?.value?.unit
|
|
2656
|
-
);
|
|
2657
|
-
};
|
|
2658
2647
|
function EqualUnequalSizesControl({
|
|
2659
2648
|
label,
|
|
2660
2649
|
icon,
|
|
@@ -2664,56 +2653,60 @@ function EqualUnequalSizesControl({
|
|
|
2664
2653
|
}) {
|
|
2665
2654
|
const popupId = (0, import_react28.useId)();
|
|
2666
2655
|
const popupState = (0, import_ui41.usePopupState)({ variant: "popover", popupId });
|
|
2667
|
-
const {
|
|
2668
|
-
propType: multiSizePropType,
|
|
2669
|
-
value: multiSizeValue,
|
|
2670
|
-
setValue: setMultiSizeValue,
|
|
2671
|
-
disabled: multiSizeDisabled
|
|
2672
|
-
} = useBoundProp(multiSizePropTypeUtil);
|
|
2673
|
-
const { value: sizeValue, setValue: setSizeValue } = useBoundProp(import_editor_props18.sizePropTypeUtil);
|
|
2674
2656
|
const rowRefs = [(0, import_react28.useRef)(null), (0, import_react28.useRef)(null)];
|
|
2675
|
-
const
|
|
2676
|
-
|
|
2677
|
-
|
|
2657
|
+
const { propType: multiSizePropType, disabled: multiSizeDisabled } = useBoundProp(multiSizePropTypeUtil);
|
|
2658
|
+
const { value: masterValue, setValue: setMasterValue, placeholder: masterPlaceholder } = useBoundProp();
|
|
2659
|
+
const getMultiSizeValues = (sourceValue) => {
|
|
2660
|
+
if (multiSizePropTypeUtil.isValid(sourceValue)) {
|
|
2661
|
+
return sourceValue.value;
|
|
2678
2662
|
}
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
);
|
|
2663
|
+
const propValue = {};
|
|
2664
|
+
items2.forEach((item) => {
|
|
2665
|
+
propValue[item.bind] = sourceValue;
|
|
2666
|
+
});
|
|
2667
|
+
const derived = multiSizePropTypeUtil.create(propValue);
|
|
2668
|
+
return derived?.value;
|
|
2683
2669
|
};
|
|
2684
|
-
const
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2670
|
+
const isShowingGeneralIndicator = !popupState.isOpen;
|
|
2671
|
+
const derivedValue = getMultiSizeValues(masterValue);
|
|
2672
|
+
const derivedPlaceholder = getMultiSizeValues(masterPlaceholder);
|
|
2673
|
+
const isEqualValues = (values) => {
|
|
2674
|
+
if (!values) {
|
|
2675
|
+
return true;
|
|
2676
|
+
}
|
|
2677
|
+
const propValue = {};
|
|
2678
|
+
items2.forEach((item) => {
|
|
2679
|
+
propValue[item.bind] = values?.value?.[item.bind] ?? null;
|
|
2680
|
+
});
|
|
2681
|
+
const allValues = Object.values(propValue).map((value) => JSON.stringify(value));
|
|
2682
|
+
return allValues.every((value) => value === allValues[0]);
|
|
2694
2683
|
};
|
|
2695
|
-
const
|
|
2696
|
-
|
|
2697
|
-
|
|
2684
|
+
const isMixedPlaceholder = !masterValue && !isEqualValues(multiSizePropTypeUtil.create(derivedPlaceholder));
|
|
2685
|
+
const isMixed = isMixedPlaceholder || !isEqualValues(multiSizePropTypeUtil.create(derivedValue));
|
|
2686
|
+
const applyMultiSizeValue = (newValue) => {
|
|
2687
|
+
const newPropValue = multiSizePropTypeUtil.create(newValue);
|
|
2688
|
+
if (isEqualValues(newPropValue)) {
|
|
2689
|
+
setMasterValue(Object.values(newValue)?.pop() ?? null);
|
|
2690
|
+
return;
|
|
2698
2691
|
}
|
|
2699
|
-
|
|
2692
|
+
setMasterValue(newPropValue);
|
|
2700
2693
|
};
|
|
2701
|
-
|
|
2702
|
-
const isMixed = !!multiSizeValue;
|
|
2703
|
-
return /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React56.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React56.createElement(ControlLabel, null, label)), /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_ui41.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React56.createElement(
|
|
2694
|
+
return /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React56.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React56.createElement(ControlLabel, null, label)), /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_ui41.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React56.createElement(import_ui41.Box, { flexGrow: 1 }, /* @__PURE__ */ React56.createElement(
|
|
2704
2695
|
SizeControl,
|
|
2705
2696
|
{
|
|
2706
2697
|
placeholder: isMixed ? (0, import_i18n17.__)("Mixed", "elementor") : void 0,
|
|
2698
|
+
enablePropTypeUnits: !isMixed || !isMixedPlaceholder,
|
|
2707
2699
|
anchorRef: rowRefs[0]
|
|
2708
2700
|
}
|
|
2709
|
-
), /* @__PURE__ */ React56.createElement(import_ui41.Tooltip, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React56.createElement(
|
|
2710
|
-
|
|
2701
|
+
)), /* @__PURE__ */ React56.createElement(import_ui41.Tooltip, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React56.createElement(
|
|
2702
|
+
StyledToggleButton,
|
|
2711
2703
|
{
|
|
2712
2704
|
size: "tiny",
|
|
2713
2705
|
value: "check",
|
|
2714
2706
|
sx: { marginLeft: "auto" },
|
|
2715
2707
|
...(0, import_ui41.bindToggle)(popupState),
|
|
2716
2708
|
selected: popupState.isOpen,
|
|
2709
|
+
isPlaceholder: isMixedPlaceholder,
|
|
2717
2710
|
"aria-label": tooltipLabel
|
|
2718
2711
|
},
|
|
2719
2712
|
icon
|
|
@@ -2739,8 +2732,9 @@ function EqualUnequalSizesControl({
|
|
|
2739
2732
|
PropProvider,
|
|
2740
2733
|
{
|
|
2741
2734
|
propType: multiSizePropType,
|
|
2742
|
-
value:
|
|
2743
|
-
|
|
2735
|
+
value: derivedValue,
|
|
2736
|
+
placeholder: derivedPlaceholder,
|
|
2737
|
+
setValue: applyMultiSizeValue,
|
|
2744
2738
|
isDisabled: () => multiSizeDisabled
|
|
2745
2739
|
},
|
|
2746
2740
|
/* @__PURE__ */ React56.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React56.createElement(PopoverGridContainer, { ref: rowRefs[1] }, /* @__PURE__ */ React56.createElement(MultiSizeValueControl, { item: items2[0], rowRef: rowRefs[1] }), /* @__PURE__ */ React56.createElement(MultiSizeValueControl, { item: items2[1], rowRef: rowRefs[1] })), /* @__PURE__ */ React56.createElement(PopoverGridContainer, { ref: rowRefs[2] }, /* @__PURE__ */ React56.createElement(MultiSizeValueControl, { item: items2[2], rowRef: rowRefs[2] }), /* @__PURE__ */ React56.createElement(MultiSizeValueControl, { item: items2[3], rowRef: rowRefs[2] })))
|
|
@@ -2754,27 +2748,27 @@ var MultiSizeValueControl = ({ item, rowRef }) => {
|
|
|
2754
2748
|
// src/controls/linked-dimensions-control.tsx
|
|
2755
2749
|
var React57 = __toESM(require("react"));
|
|
2756
2750
|
var import_react29 = require("react");
|
|
2757
|
-
var
|
|
2751
|
+
var import_editor_props18 = require("@elementor/editor-props");
|
|
2758
2752
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
2759
2753
|
var import_icons10 = require("@elementor/icons");
|
|
2760
2754
|
var import_ui42 = require("@elementor/ui");
|
|
2761
2755
|
var import_i18n18 = require("@wordpress/i18n");
|
|
2762
2756
|
var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min }) => {
|
|
2763
2757
|
const gridRowRefs = [(0, import_react29.useRef)(null), (0, import_react29.useRef)(null)];
|
|
2764
|
-
const { disabled: sizeDisabled } = useBoundProp(
|
|
2758
|
+
const { disabled: sizeDisabled } = useBoundProp(import_editor_props18.sizePropTypeUtil);
|
|
2765
2759
|
const {
|
|
2766
2760
|
value: dimensionsValue,
|
|
2767
2761
|
setValue: setDimensionsValue,
|
|
2768
2762
|
propType,
|
|
2769
2763
|
placeholder: dimensionsPlaceholder,
|
|
2770
2764
|
disabled: dimensionsDisabled
|
|
2771
|
-
} = useBoundProp(
|
|
2765
|
+
} = useBoundProp(import_editor_props18.dimensionsPropTypeUtil);
|
|
2772
2766
|
const { value: masterValue, placeholder: masterPlaceholder, setValue: setMasterValue } = useBoundProp();
|
|
2773
2767
|
const inferIsLinked = () => {
|
|
2774
|
-
if (
|
|
2768
|
+
if (import_editor_props18.dimensionsPropTypeUtil.isValid(masterValue)) {
|
|
2775
2769
|
return false;
|
|
2776
2770
|
}
|
|
2777
|
-
if (!masterValue &&
|
|
2771
|
+
if (!masterValue && import_editor_props18.dimensionsPropTypeUtil.isValid(masterPlaceholder)) {
|
|
2778
2772
|
return false;
|
|
2779
2773
|
}
|
|
2780
2774
|
return true;
|
|
@@ -2786,14 +2780,14 @@ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min
|
|
|
2786
2780
|
}, [activeBreakpoint]);
|
|
2787
2781
|
const onLinkToggle = () => {
|
|
2788
2782
|
setIsLinked((prev) => !prev);
|
|
2789
|
-
if (!
|
|
2783
|
+
if (!import_editor_props18.dimensionsPropTypeUtil.isValid(masterValue)) {
|
|
2790
2784
|
const value = masterValue ? masterValue : null;
|
|
2791
2785
|
if (!value) {
|
|
2792
2786
|
setMasterValue(null);
|
|
2793
2787
|
return;
|
|
2794
2788
|
}
|
|
2795
2789
|
setMasterValue(
|
|
2796
|
-
|
|
2790
|
+
import_editor_props18.dimensionsPropTypeUtil.create({
|
|
2797
2791
|
"block-start": value,
|
|
2798
2792
|
"block-end": value,
|
|
2799
2793
|
"inline-start": value,
|
|
@@ -2910,7 +2904,7 @@ function getCssDimensionProps(isSiteRtl) {
|
|
|
2910
2904
|
|
|
2911
2905
|
// src/controls/font-family-control/font-family-control.tsx
|
|
2912
2906
|
var React59 = __toESM(require("react"));
|
|
2913
|
-
var
|
|
2907
|
+
var import_editor_props19 = require("@elementor/editor-props");
|
|
2914
2908
|
var import_icons11 = require("@elementor/icons");
|
|
2915
2909
|
var import_ui44 = require("@elementor/ui");
|
|
2916
2910
|
var import_i18n20 = require("@wordpress/i18n");
|
|
@@ -3085,7 +3079,7 @@ var FontFamilyControl = createControl(
|
|
|
3085
3079
|
setValue: setFontFamily,
|
|
3086
3080
|
disabled,
|
|
3087
3081
|
placeholder
|
|
3088
|
-
} = useBoundProp(
|
|
3082
|
+
} = useBoundProp(import_editor_props19.stringPropTypeUtil);
|
|
3089
3083
|
const popoverState = (0, import_ui44.usePopupState)({ variant: "popover" });
|
|
3090
3084
|
const isShowingPlaceholder = !fontFamily && placeholder;
|
|
3091
3085
|
const mapFontSubs = React59.useMemo(() => {
|
|
@@ -3143,11 +3137,11 @@ var FontFamilyControl = createControl(
|
|
|
3143
3137
|
|
|
3144
3138
|
// src/controls/url-control.tsx
|
|
3145
3139
|
var React60 = __toESM(require("react"));
|
|
3146
|
-
var
|
|
3140
|
+
var import_editor_props20 = require("@elementor/editor-props");
|
|
3147
3141
|
var import_ui45 = require("@elementor/ui");
|
|
3148
3142
|
var UrlControl = createControl(
|
|
3149
3143
|
({ placeholder, ariaLabel }) => {
|
|
3150
|
-
const { value, setValue, disabled } = useBoundProp(
|
|
3144
|
+
const { value, setValue, disabled } = useBoundProp(import_editor_props20.urlPropTypeUtil);
|
|
3151
3145
|
const handleChange = (event) => setValue(event.target.value);
|
|
3152
3146
|
return /* @__PURE__ */ React60.createElement(ControlActions, null, /* @__PURE__ */ React60.createElement(
|
|
3153
3147
|
import_ui45.TextField,
|
|
@@ -3170,7 +3164,7 @@ var UrlControl = createControl(
|
|
|
3170
3164
|
var React65 = __toESM(require("react"));
|
|
3171
3165
|
var import_react33 = require("react");
|
|
3172
3166
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
3173
|
-
var
|
|
3167
|
+
var import_editor_props23 = require("@elementor/editor-props");
|
|
3174
3168
|
var import_icons15 = require("@elementor/icons");
|
|
3175
3169
|
var import_session = require("@elementor/session");
|
|
3176
3170
|
var import_ui49 = require("@elementor/ui");
|
|
@@ -3238,7 +3232,7 @@ var RestrictedLinkInfotip = ({
|
|
|
3238
3232
|
// src/controls/query-control.tsx
|
|
3239
3233
|
var React63 = __toESM(require("react"));
|
|
3240
3234
|
var import_react32 = require("react");
|
|
3241
|
-
var
|
|
3235
|
+
var import_editor_props21 = require("@elementor/editor-props");
|
|
3242
3236
|
var import_http_client2 = require("@elementor/http-client");
|
|
3243
3237
|
var import_icons14 = require("@elementor/icons");
|
|
3244
3238
|
var import_utils4 = require("@elementor/utils");
|
|
@@ -3392,8 +3386,8 @@ var QueryControl = createControl((props) => {
|
|
|
3392
3386
|
const valueToSave = {
|
|
3393
3387
|
$$type: "query",
|
|
3394
3388
|
value: {
|
|
3395
|
-
id:
|
|
3396
|
-
label:
|
|
3389
|
+
id: import_editor_props21.numberPropTypeUtil.create(newValue),
|
|
3390
|
+
label: import_editor_props21.stringPropTypeUtil.create(findMatchingOption(options, newValue)?.label || null)
|
|
3397
3391
|
}
|
|
3398
3392
|
};
|
|
3399
3393
|
setValue(valueToSave);
|
|
@@ -3406,7 +3400,7 @@ var QueryControl = createControl((props) => {
|
|
|
3406
3400
|
return;
|
|
3407
3401
|
}
|
|
3408
3402
|
const newLinkValue = newValue?.trim() || "";
|
|
3409
|
-
const valueToSave = newLinkValue ?
|
|
3403
|
+
const valueToSave = newLinkValue ? import_editor_props21.urlPropTypeUtil.create(newLinkValue) : null;
|
|
3410
3404
|
setValue(valueToSave);
|
|
3411
3405
|
onSetValue?.(valueToSave);
|
|
3412
3406
|
updateOptions(newValue);
|
|
@@ -3476,10 +3470,10 @@ function generateFirstLoadedOption(unionValue) {
|
|
|
3476
3470
|
|
|
3477
3471
|
// src/controls/switch-control.tsx
|
|
3478
3472
|
var React64 = __toESM(require("react"));
|
|
3479
|
-
var
|
|
3473
|
+
var import_editor_props22 = require("@elementor/editor-props");
|
|
3480
3474
|
var import_ui48 = require("@elementor/ui");
|
|
3481
3475
|
var SwitchControl = createControl(() => {
|
|
3482
|
-
const { value, setValue, disabled } = useBoundProp(
|
|
3476
|
+
const { value, setValue, disabled } = useBoundProp(import_editor_props22.booleanPropTypeUtil);
|
|
3483
3477
|
const handleChange = (event) => {
|
|
3484
3478
|
setValue(event.target.checked);
|
|
3485
3479
|
};
|
|
@@ -3500,7 +3494,7 @@ var SwitchControl = createControl(() => {
|
|
|
3500
3494
|
// src/controls/link-control.tsx
|
|
3501
3495
|
var SIZE6 = "tiny";
|
|
3502
3496
|
var LinkControl = createControl((props) => {
|
|
3503
|
-
const { value, path, setValue, ...propContext } = useBoundProp(
|
|
3497
|
+
const { value, path, setValue, ...propContext } = useBoundProp(import_editor_props23.linkPropTypeUtil);
|
|
3504
3498
|
const [linkSessionValue, setLinkSessionValue] = (0, import_session.useSessionStorage)(path.join("/"));
|
|
3505
3499
|
const [isActive, setIsActive] = (0, import_react33.useState)(!!value);
|
|
3506
3500
|
const {
|
|
@@ -3578,7 +3572,7 @@ var ToggleIconControl = ({ disabled, active, onIconClick, label }) => {
|
|
|
3578
3572
|
// src/controls/html-tag-control.tsx
|
|
3579
3573
|
var React67 = __toESM(require("react"));
|
|
3580
3574
|
var import_editor_elements3 = require("@elementor/editor-elements");
|
|
3581
|
-
var
|
|
3575
|
+
var import_editor_props24 = require("@elementor/editor-props");
|
|
3582
3576
|
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
3583
3577
|
var import_ui52 = require("@elementor/ui");
|
|
3584
3578
|
var import_i18n24 = require("@wordpress/i18n");
|
|
@@ -3630,7 +3624,7 @@ var ConditionalControlInfotip = React66.forwardRef(
|
|
|
3630
3624
|
// src/controls/html-tag-control.tsx
|
|
3631
3625
|
var StyledSelect = (0, import_ui52.styled)(import_ui52.Select)(() => ({ ".MuiSelect-select.Mui-disabled": { cursor: "not-allowed" } }));
|
|
3632
3626
|
var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} }) => {
|
|
3633
|
-
const { value, setValue, disabled, placeholder } = useBoundProp(
|
|
3627
|
+
const { value, setValue, disabled, placeholder } = useBoundProp(import_editor_props24.stringPropTypeUtil);
|
|
3634
3628
|
const handleChange = (event) => {
|
|
3635
3629
|
const newValue = event.target.value || null;
|
|
3636
3630
|
onChange?.(newValue, value);
|
|
@@ -3677,27 +3671,27 @@ var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} })
|
|
|
3677
3671
|
// src/controls/gap-control.tsx
|
|
3678
3672
|
var React68 = __toESM(require("react"));
|
|
3679
3673
|
var import_react34 = require("react");
|
|
3680
|
-
var
|
|
3674
|
+
var import_editor_props25 = require("@elementor/editor-props");
|
|
3681
3675
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
3682
3676
|
var import_icons16 = require("@elementor/icons");
|
|
3683
3677
|
var import_ui53 = require("@elementor/ui");
|
|
3684
3678
|
var import_i18n25 = require("@wordpress/i18n");
|
|
3685
3679
|
var GapControl = ({ label }) => {
|
|
3686
3680
|
const stackRef = (0, import_react34.useRef)(null);
|
|
3687
|
-
const { disabled: sizeDisabled } = useBoundProp(
|
|
3681
|
+
const { disabled: sizeDisabled } = useBoundProp(import_editor_props25.sizePropTypeUtil);
|
|
3688
3682
|
const {
|
|
3689
3683
|
value: directionValue,
|
|
3690
3684
|
setValue: setDirectionValue,
|
|
3691
3685
|
propType,
|
|
3692
3686
|
placeholder: directionPlaceholder,
|
|
3693
3687
|
disabled: directionDisabled
|
|
3694
|
-
} = useBoundProp(
|
|
3688
|
+
} = useBoundProp(import_editor_props25.layoutDirectionPropTypeUtil);
|
|
3695
3689
|
const { value: masterValue, setValue: setMasterValue, placeholder: masterPlaceholder } = useBoundProp();
|
|
3696
3690
|
const inferIsLinked = () => {
|
|
3697
|
-
if (
|
|
3691
|
+
if (import_editor_props25.layoutDirectionPropTypeUtil.isValid(masterValue)) {
|
|
3698
3692
|
return false;
|
|
3699
3693
|
}
|
|
3700
|
-
if (!masterValue &&
|
|
3694
|
+
if (!masterValue && import_editor_props25.layoutDirectionPropTypeUtil.isValid(masterPlaceholder)) {
|
|
3701
3695
|
return false;
|
|
3702
3696
|
}
|
|
3703
3697
|
return true;
|
|
@@ -3709,14 +3703,14 @@ var GapControl = ({ label }) => {
|
|
|
3709
3703
|
}, [activeBreakpoint]);
|
|
3710
3704
|
const onLinkToggle = () => {
|
|
3711
3705
|
setIsLinked((prev) => !prev);
|
|
3712
|
-
if (!
|
|
3706
|
+
if (!import_editor_props25.layoutDirectionPropTypeUtil.isValid(masterValue)) {
|
|
3713
3707
|
const currentValue2 = masterValue ? masterValue : null;
|
|
3714
3708
|
if (!currentValue2) {
|
|
3715
3709
|
setMasterValue(null);
|
|
3716
3710
|
return;
|
|
3717
3711
|
}
|
|
3718
3712
|
setMasterValue(
|
|
3719
|
-
|
|
3713
|
+
import_editor_props25.layoutDirectionPropTypeUtil.create({
|
|
3720
3714
|
row: currentValue2,
|
|
3721
3715
|
column: currentValue2
|
|
3722
3716
|
})
|
|
@@ -3767,7 +3761,7 @@ var Control4 = ({
|
|
|
3767
3761
|
// src/controls/aspect-ratio-control.tsx
|
|
3768
3762
|
var React69 = __toESM(require("react"));
|
|
3769
3763
|
var import_react35 = require("react");
|
|
3770
|
-
var
|
|
3764
|
+
var import_editor_props26 = require("@elementor/editor-props");
|
|
3771
3765
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
3772
3766
|
var import_icons17 = require("@elementor/icons");
|
|
3773
3767
|
var import_ui54 = require("@elementor/ui");
|
|
@@ -3784,7 +3778,7 @@ var RATIO_OPTIONS = [
|
|
|
3784
3778
|
];
|
|
3785
3779
|
var CUSTOM_RATIO = "custom";
|
|
3786
3780
|
var AspectRatioControl = createControl(({ label }) => {
|
|
3787
|
-
const { value: aspectRatioValue, setValue: setAspectRatioValue, disabled } = useBoundProp(
|
|
3781
|
+
const { value: aspectRatioValue, setValue: setAspectRatioValue, disabled } = useBoundProp(import_editor_props26.stringPropTypeUtil);
|
|
3788
3782
|
const isCustomSelected = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
|
|
3789
3783
|
const [initialWidth, initialHeight] = isCustomSelected ? aspectRatioValue.split("/") : ["", ""];
|
|
3790
3784
|
const [isCustom, setIsCustom] = (0, import_react35.useState)(isCustomSelected);
|
|
@@ -3879,7 +3873,7 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
3879
3873
|
var React71 = __toESM(require("react"));
|
|
3880
3874
|
var import_react37 = require("react");
|
|
3881
3875
|
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
3882
|
-
var
|
|
3876
|
+
var import_editor_props27 = require("@elementor/editor-props");
|
|
3883
3877
|
var import_icons18 = require("@elementor/icons");
|
|
3884
3878
|
var import_ui56 = require("@elementor/ui");
|
|
3885
3879
|
var import_wp_media2 = require("@elementor/wp-media");
|
|
@@ -3961,7 +3955,7 @@ var StyledCardMediaContainer = (0, import_ui56.styled)(import_ui56.Stack)`
|
|
|
3961
3955
|
var MODE_BROWSE = { mode: "browse" };
|
|
3962
3956
|
var MODE_UPLOAD = { mode: "upload" };
|
|
3963
3957
|
var SvgMediaControl = createControl(() => {
|
|
3964
|
-
const { value, setValue } = useBoundProp(
|
|
3958
|
+
const { value, setValue } = useBoundProp(import_editor_props27.imageSrcPropTypeUtil);
|
|
3965
3959
|
const { id, url } = value ?? {};
|
|
3966
3960
|
const { data: attachment, isFetching } = (0, import_wp_media2.useWpMediaAttachment)(id?.value || null);
|
|
3967
3961
|
const src = attachment?.url ?? url?.value ?? null;
|
|
@@ -4046,13 +4040,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
4046
4040
|
|
|
4047
4041
|
// src/controls/background-control/background-control.tsx
|
|
4048
4042
|
var React78 = __toESM(require("react"));
|
|
4049
|
-
var
|
|
4043
|
+
var import_editor_props33 = require("@elementor/editor-props");
|
|
4050
4044
|
var import_ui64 = require("@elementor/ui");
|
|
4051
4045
|
var import_i18n34 = require("@wordpress/i18n");
|
|
4052
4046
|
|
|
4053
4047
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
4054
4048
|
var React77 = __toESM(require("react"));
|
|
4055
|
-
var
|
|
4049
|
+
var import_editor_props32 = require("@elementor/editor-props");
|
|
4056
4050
|
var import_ui63 = require("@elementor/ui");
|
|
4057
4051
|
var import_wp_media3 = require("@elementor/wp-media");
|
|
4058
4052
|
var import_i18n33 = require("@wordpress/i18n");
|
|
@@ -4063,26 +4057,26 @@ var { env } = (0, import_env.parseEnv)("@elementor/editor-controls");
|
|
|
4063
4057
|
|
|
4064
4058
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
4065
4059
|
var React72 = __toESM(require("react"));
|
|
4066
|
-
var
|
|
4060
|
+
var import_editor_props28 = require("@elementor/editor-props");
|
|
4067
4061
|
var import_ui57 = require("@elementor/ui");
|
|
4068
4062
|
var BackgroundGradientColorControl = createControl(() => {
|
|
4069
|
-
const { value, setValue } = useBoundProp(
|
|
4063
|
+
const { value, setValue } = useBoundProp(import_editor_props28.backgroundGradientOverlayPropTypeUtil);
|
|
4070
4064
|
const handleChange = (newValue) => {
|
|
4071
4065
|
const transformedValue = createTransformableValue(newValue);
|
|
4072
4066
|
if (transformedValue.positions) {
|
|
4073
|
-
transformedValue.positions =
|
|
4067
|
+
transformedValue.positions = import_editor_props28.stringPropTypeUtil.create(newValue.positions.join(" "));
|
|
4074
4068
|
}
|
|
4075
4069
|
setValue(transformedValue);
|
|
4076
4070
|
};
|
|
4077
4071
|
const createTransformableValue = (newValue) => ({
|
|
4078
4072
|
...newValue,
|
|
4079
|
-
type:
|
|
4080
|
-
angle:
|
|
4081
|
-
stops:
|
|
4073
|
+
type: import_editor_props28.stringPropTypeUtil.create(newValue.type),
|
|
4074
|
+
angle: import_editor_props28.numberPropTypeUtil.create(newValue.angle),
|
|
4075
|
+
stops: import_editor_props28.gradientColorStopPropTypeUtil.create(
|
|
4082
4076
|
newValue.stops.map(
|
|
4083
|
-
({ color, offset }) =>
|
|
4084
|
-
color:
|
|
4085
|
-
offset:
|
|
4077
|
+
({ color, offset }) => import_editor_props28.colorStopPropTypeUtil.create({
|
|
4078
|
+
color: import_editor_props28.colorPropTypeUtil.create(color),
|
|
4079
|
+
offset: import_editor_props28.numberPropTypeUtil.create(offset)
|
|
4086
4080
|
})
|
|
4087
4081
|
)
|
|
4088
4082
|
)
|
|
@@ -4111,17 +4105,17 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
4111
4105
|
}
|
|
4112
4106
|
);
|
|
4113
4107
|
});
|
|
4114
|
-
var initialBackgroundGradientOverlay =
|
|
4115
|
-
type:
|
|
4116
|
-
angle:
|
|
4117
|
-
stops:
|
|
4118
|
-
|
|
4119
|
-
color:
|
|
4120
|
-
offset:
|
|
4108
|
+
var initialBackgroundGradientOverlay = import_editor_props28.backgroundGradientOverlayPropTypeUtil.create({
|
|
4109
|
+
type: import_editor_props28.stringPropTypeUtil.create("linear"),
|
|
4110
|
+
angle: import_editor_props28.numberPropTypeUtil.create(180),
|
|
4111
|
+
stops: import_editor_props28.gradientColorStopPropTypeUtil.create([
|
|
4112
|
+
import_editor_props28.colorStopPropTypeUtil.create({
|
|
4113
|
+
color: import_editor_props28.colorPropTypeUtil.create("rgb(0,0,0)"),
|
|
4114
|
+
offset: import_editor_props28.numberPropTypeUtil.create(0)
|
|
4121
4115
|
}),
|
|
4122
|
-
|
|
4123
|
-
color:
|
|
4124
|
-
offset:
|
|
4116
|
+
import_editor_props28.colorStopPropTypeUtil.create({
|
|
4117
|
+
color: import_editor_props28.colorPropTypeUtil.create("rgb(255,255,255)"),
|
|
4118
|
+
offset: import_editor_props28.numberPropTypeUtil.create(100)
|
|
4125
4119
|
})
|
|
4126
4120
|
])
|
|
4127
4121
|
});
|
|
@@ -4152,7 +4146,7 @@ var BackgroundImageOverlayAttachment = () => {
|
|
|
4152
4146
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
4153
4147
|
var React74 = __toESM(require("react"));
|
|
4154
4148
|
var import_react38 = require("react");
|
|
4155
|
-
var
|
|
4149
|
+
var import_editor_props29 = require("@elementor/editor-props");
|
|
4156
4150
|
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
4157
4151
|
var import_icons20 = require("@elementor/icons");
|
|
4158
4152
|
var import_ui59 = require("@elementor/ui");
|
|
@@ -4170,8 +4164,8 @@ var backgroundPositionOptions = [
|
|
|
4170
4164
|
{ label: (0, import_i18n30.__)("Custom", "elementor"), value: "custom" }
|
|
4171
4165
|
];
|
|
4172
4166
|
var BackgroundImageOverlayPosition = () => {
|
|
4173
|
-
const backgroundImageOffsetContext = useBoundProp(
|
|
4174
|
-
const stringPropContext = useBoundProp(
|
|
4167
|
+
const backgroundImageOffsetContext = useBoundProp(import_editor_props29.backgroundImagePositionOffsetPropTypeUtil);
|
|
4168
|
+
const stringPropContext = useBoundProp(import_editor_props29.stringPropTypeUtil);
|
|
4175
4169
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
4176
4170
|
const rowRef = (0, import_react38.useRef)(null);
|
|
4177
4171
|
const handlePositionChange = (event) => {
|
|
@@ -4247,7 +4241,7 @@ var BackgroundImageOverlayRepeat = () => {
|
|
|
4247
4241
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
4248
4242
|
var React76 = __toESM(require("react"));
|
|
4249
4243
|
var import_react39 = require("react");
|
|
4250
|
-
var
|
|
4244
|
+
var import_editor_props30 = require("@elementor/editor-props");
|
|
4251
4245
|
var import_icons22 = require("@elementor/icons");
|
|
4252
4246
|
var import_ui61 = require("@elementor/ui");
|
|
4253
4247
|
var import_i18n32 = require("@wordpress/i18n");
|
|
@@ -4278,8 +4272,8 @@ var sizeControlOptions = [
|
|
|
4278
4272
|
}
|
|
4279
4273
|
];
|
|
4280
4274
|
var BackgroundImageOverlaySize = () => {
|
|
4281
|
-
const backgroundImageScaleContext = useBoundProp(
|
|
4282
|
-
const stringPropContext = useBoundProp(
|
|
4275
|
+
const backgroundImageScaleContext = useBoundProp(import_editor_props30.backgroundImageSizeScalePropTypeUtil);
|
|
4276
|
+
const stringPropContext = useBoundProp(import_editor_props30.stringPropTypeUtil);
|
|
4283
4277
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
4284
4278
|
const rowRef = (0, import_react39.useRef)(null);
|
|
4285
4279
|
const handleSizeChange = (size) => {
|
|
@@ -4317,16 +4311,16 @@ var BackgroundImageOverlaySize = () => {
|
|
|
4317
4311
|
|
|
4318
4312
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
4319
4313
|
var import_react40 = require("react");
|
|
4320
|
-
var
|
|
4314
|
+
var import_editor_props31 = require("@elementor/editor-props");
|
|
4321
4315
|
var import_ui62 = require("@elementor/ui");
|
|
4322
4316
|
var useBackgroundTabsHistory = ({
|
|
4323
4317
|
color: initialBackgroundColorOverlay2,
|
|
4324
4318
|
image: initialBackgroundImageOverlay,
|
|
4325
4319
|
gradient: initialBackgroundGradientOverlay2
|
|
4326
4320
|
}) => {
|
|
4327
|
-
const { value: imageValue, setValue: setImageValue } = useBoundProp(
|
|
4328
|
-
const { value: colorValue, setValue: setColorValue } = useBoundProp(
|
|
4329
|
-
const { value: gradientValue, setValue: setGradientValue } = useBoundProp(
|
|
4321
|
+
const { value: imageValue, setValue: setImageValue } = useBoundProp(import_editor_props31.backgroundImageOverlayPropTypeUtil);
|
|
4322
|
+
const { value: colorValue, setValue: setColorValue } = useBoundProp(import_editor_props31.backgroundColorOverlayPropTypeUtil);
|
|
4323
|
+
const { value: gradientValue, setValue: setGradientValue } = useBoundProp(import_editor_props31.backgroundGradientOverlayPropTypeUtil);
|
|
4330
4324
|
const getCurrentOverlayType = () => {
|
|
4331
4325
|
if (colorValue) {
|
|
4332
4326
|
return "color";
|
|
@@ -4375,9 +4369,9 @@ var useBackgroundTabsHistory = ({
|
|
|
4375
4369
|
|
|
4376
4370
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
4377
4371
|
var DEFAULT_BACKGROUND_COLOR_OVERLAY_COLOR = "#00000033";
|
|
4378
|
-
var initialBackgroundColorOverlay =
|
|
4372
|
+
var initialBackgroundColorOverlay = import_editor_props32.backgroundColorOverlayPropTypeUtil.create(
|
|
4379
4373
|
{
|
|
4380
|
-
color:
|
|
4374
|
+
color: import_editor_props32.colorPropTypeUtil.create(DEFAULT_BACKGROUND_COLOR_OVERLAY_COLOR)
|
|
4381
4375
|
}
|
|
4382
4376
|
);
|
|
4383
4377
|
var getInitialBackgroundOverlay = () => ({
|
|
@@ -4411,12 +4405,12 @@ var backgroundResolutionOptions = [
|
|
|
4411
4405
|
{ label: (0, import_i18n33.__)("Full", "elementor"), value: "full" }
|
|
4412
4406
|
];
|
|
4413
4407
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
4414
|
-
const { propType, value: overlayValues, setValue } = useBoundProp(
|
|
4408
|
+
const { propType, value: overlayValues, setValue } = useBoundProp(import_editor_props32.backgroundOverlayPropTypeUtil);
|
|
4415
4409
|
return /* @__PURE__ */ React77.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React77.createElement(
|
|
4416
4410
|
ControlRepeater,
|
|
4417
4411
|
{
|
|
4418
4412
|
initial: getInitialBackgroundOverlay(),
|
|
4419
|
-
propTypeUtil:
|
|
4413
|
+
propTypeUtil: import_editor_props32.backgroundOverlayPropTypeUtil
|
|
4420
4414
|
},
|
|
4421
4415
|
/* @__PURE__ */ React77.createElement(RepeaterHeader, { label: (0, import_i18n33.__)("Overlay", "elementor") }, /* @__PURE__ */ React77.createElement(TooltipAddItemAction, { newItemIndex: 0 })),
|
|
4422
4416
|
/* @__PURE__ */ React77.createElement(ItemsContainer, null, /* @__PURE__ */ React77.createElement(
|
|
@@ -4518,11 +4512,11 @@ var ItemLabelGradient = ({ value }) => {
|
|
|
4518
4512
|
return /* @__PURE__ */ React77.createElement("span", null, (0, import_i18n33.__)("Radial Gradient", "elementor"));
|
|
4519
4513
|
};
|
|
4520
4514
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
4521
|
-
const propContext = useBoundProp(
|
|
4515
|
+
const propContext = useBoundProp(import_editor_props32.backgroundColorOverlayPropTypeUtil);
|
|
4522
4516
|
return /* @__PURE__ */ React77.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React77.createElement(ColorControl, { anchorEl })));
|
|
4523
4517
|
};
|
|
4524
4518
|
var ImageOverlayContent = () => {
|
|
4525
|
-
const propContext = useBoundProp(
|
|
4519
|
+
const propContext = useBoundProp(import_editor_props32.backgroundImageOverlayPropTypeUtil);
|
|
4526
4520
|
return /* @__PURE__ */ React77.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React77.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React77.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React77.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React77.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React77.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React77.createElement(BackgroundImageOverlayAttachment, null)));
|
|
4527
4521
|
};
|
|
4528
4522
|
var StyledUnstableColorIndicator3 = (0, import_ui63.styled)(import_ui63.UnstableColorIndicator)(({ theme }) => ({
|
|
@@ -4570,7 +4564,7 @@ var clipOptions = [
|
|
|
4570
4564
|
var colorLabel = (0, import_i18n34.__)("Color", "elementor");
|
|
4571
4565
|
var clipLabel = (0, import_i18n34.__)("Clipping", "elementor");
|
|
4572
4566
|
var BackgroundControl = createControl(() => {
|
|
4573
|
-
const propContext = useBoundProp(
|
|
4567
|
+
const propContext = useBoundProp(import_editor_props33.backgroundPropTypeUtil);
|
|
4574
4568
|
return /* @__PURE__ */ React78.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React78.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React78.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React78.createElement(BackgroundColorField, null), /* @__PURE__ */ React78.createElement(BackgroundClipField, null));
|
|
4575
4569
|
});
|
|
4576
4570
|
var BackgroundColorField = () => {
|
|
@@ -4583,7 +4577,7 @@ var BackgroundClipField = () => {
|
|
|
4583
4577
|
// src/controls/repeatable-control.tsx
|
|
4584
4578
|
var React79 = __toESM(require("react"));
|
|
4585
4579
|
var import_react41 = require("react");
|
|
4586
|
-
var
|
|
4580
|
+
var import_editor_props34 = require("@elementor/editor-props");
|
|
4587
4581
|
var import_ui65 = require("@elementor/ui");
|
|
4588
4582
|
var PLACEHOLDER_REGEX = /\$\{([^}]+)\}/g;
|
|
4589
4583
|
var RepeatableControl = createControl(
|
|
@@ -4603,7 +4597,7 @@ var RepeatableControl = createControl(
|
|
|
4603
4597
|
return null;
|
|
4604
4598
|
}
|
|
4605
4599
|
const childArrayPropTypeUtil2 = (0, import_react41.useMemo)(
|
|
4606
|
-
() => (0,
|
|
4600
|
+
() => (0, import_editor_props34.createArrayPropUtils)(childPropTypeUtil.key, childPropTypeUtil.schema, propKey),
|
|
4607
4601
|
[childPropTypeUtil.key, childPropTypeUtil.schema, propKey]
|
|
4608
4602
|
);
|
|
4609
4603
|
const contextValue = (0, import_react41.useMemo)(
|
|
@@ -4738,7 +4732,7 @@ var getAllProperties = (pattern) => {
|
|
|
4738
4732
|
// src/controls/key-value-control.tsx
|
|
4739
4733
|
var React80 = __toESM(require("react"));
|
|
4740
4734
|
var import_react42 = require("react");
|
|
4741
|
-
var
|
|
4735
|
+
var import_editor_props35 = require("@elementor/editor-props");
|
|
4742
4736
|
var import_ui66 = require("@elementor/ui");
|
|
4743
4737
|
var import_i18n35 = require("@wordpress/i18n");
|
|
4744
4738
|
|
|
@@ -4763,7 +4757,7 @@ var getInitialFieldValue = (fieldValue) => {
|
|
|
4763
4757
|
return transformableValue.value || "";
|
|
4764
4758
|
};
|
|
4765
4759
|
var KeyValueControl = createControl((props = {}) => {
|
|
4766
|
-
const { value, setValue, ...propContext } = useBoundProp(
|
|
4760
|
+
const { value, setValue, ...propContext } = useBoundProp(import_editor_props35.keyValuePropTypeUtil);
|
|
4767
4761
|
const [keyError, setKeyError] = (0, import_react42.useState)("");
|
|
4768
4762
|
const [valueError, setValueError] = (0, import_react42.useState)("");
|
|
4769
4763
|
const [sessionState, setSessionState] = (0, import_react42.useState)({
|
|
@@ -4802,14 +4796,14 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4802
4796
|
return;
|
|
4803
4797
|
}
|
|
4804
4798
|
const newChangedValue = newValue[fieldType];
|
|
4805
|
-
if ((0,
|
|
4799
|
+
if ((0, import_editor_props35.isTransformable)(newChangedValue) && newChangedValue.$$type === "dynamic") {
|
|
4806
4800
|
setValue({
|
|
4807
4801
|
...value,
|
|
4808
4802
|
[fieldType]: newChangedValue
|
|
4809
4803
|
});
|
|
4810
4804
|
return;
|
|
4811
4805
|
}
|
|
4812
|
-
const extractedValue =
|
|
4806
|
+
const extractedValue = import_editor_props35.stringPropTypeUtil.extract(newChangedValue);
|
|
4813
4807
|
setSessionState((prev) => ({
|
|
4814
4808
|
...prev,
|
|
4815
4809
|
[fieldType]: extractedValue
|
|
@@ -4849,7 +4843,7 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
4849
4843
|
|
|
4850
4844
|
// src/controls/position-control.tsx
|
|
4851
4845
|
var React81 = __toESM(require("react"));
|
|
4852
|
-
var
|
|
4846
|
+
var import_editor_props36 = require("@elementor/editor-props");
|
|
4853
4847
|
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
4854
4848
|
var import_icons23 = require("@elementor/icons");
|
|
4855
4849
|
var import_ui67 = require("@elementor/ui");
|
|
@@ -4867,8 +4861,8 @@ var positionOptions = [
|
|
|
4867
4861
|
{ label: (0, import_i18n36.__)("Custom", "elementor"), value: "custom" }
|
|
4868
4862
|
];
|
|
4869
4863
|
var PositionControl = () => {
|
|
4870
|
-
const positionContext = useBoundProp(
|
|
4871
|
-
const stringPropContext = useBoundProp(
|
|
4864
|
+
const positionContext = useBoundProp(import_editor_props36.positionPropTypeUtil);
|
|
4865
|
+
const stringPropContext = useBoundProp(import_editor_props36.stringPropTypeUtil);
|
|
4872
4866
|
const isCustom = !!positionContext.value;
|
|
4873
4867
|
const handlePositionChange = (event) => {
|
|
4874
4868
|
const value = event.target.value || null;
|
|
@@ -4906,13 +4900,13 @@ var PositionControl = () => {
|
|
|
4906
4900
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
4907
4901
|
var React94 = __toESM(require("react"));
|
|
4908
4902
|
var import_react48 = require("react");
|
|
4909
|
-
var
|
|
4903
|
+
var import_editor_props45 = require("@elementor/editor-props");
|
|
4910
4904
|
var import_icons30 = require("@elementor/icons");
|
|
4911
4905
|
var import_ui80 = require("@elementor/ui");
|
|
4912
4906
|
var import_i18n46 = require("@wordpress/i18n");
|
|
4913
4907
|
|
|
4914
4908
|
// src/controls/transform-control/initial-values.ts
|
|
4915
|
-
var
|
|
4909
|
+
var import_editor_props37 = require("@elementor/editor-props");
|
|
4916
4910
|
var TransformFunctionKeys = {
|
|
4917
4911
|
move: "transform-move",
|
|
4918
4912
|
scale: "transform-scale",
|
|
@@ -4942,17 +4936,17 @@ var initialTransformValue = {
|
|
|
4942
4936
|
z: { $$type: "size", value: { size: defaultValues.move.size, unit: defaultValues.move.unit } }
|
|
4943
4937
|
}
|
|
4944
4938
|
};
|
|
4945
|
-
var initialScaleValue =
|
|
4946
|
-
x:
|
|
4947
|
-
y:
|
|
4948
|
-
z:
|
|
4939
|
+
var initialScaleValue = import_editor_props37.scaleTransformPropTypeUtil.create({
|
|
4940
|
+
x: import_editor_props37.numberPropTypeUtil.create(defaultValues.scale),
|
|
4941
|
+
y: import_editor_props37.numberPropTypeUtil.create(defaultValues.scale),
|
|
4942
|
+
z: import_editor_props37.numberPropTypeUtil.create(defaultValues.scale)
|
|
4949
4943
|
});
|
|
4950
|
-
var initialRotateValue =
|
|
4944
|
+
var initialRotateValue = import_editor_props37.rotateTransformPropTypeUtil.create({
|
|
4951
4945
|
x: { $$type: "size", value: { size: defaultValues.rotate.size, unit: defaultValues.rotate.unit } },
|
|
4952
4946
|
y: { $$type: "size", value: { size: defaultValues.rotate.size, unit: defaultValues.rotate.unit } },
|
|
4953
4947
|
z: { $$type: "size", value: { size: defaultValues.rotate.size, unit: defaultValues.rotate.unit } }
|
|
4954
4948
|
});
|
|
4955
|
-
var initialSkewValue =
|
|
4949
|
+
var initialSkewValue = import_editor_props37.skewTransformPropTypeUtil.create({
|
|
4956
4950
|
x: { $$type: "size", value: { size: defaultValues.skew.size, unit: defaultValues.skew.unit } },
|
|
4957
4951
|
y: { $$type: "size", value: { size: defaultValues.skew.size, unit: defaultValues.skew.unit } }
|
|
4958
4952
|
});
|
|
@@ -4965,7 +4959,7 @@ var import_i18n41 = require("@wordpress/i18n");
|
|
|
4965
4959
|
// src/controls/transform-control/functions/move.tsx
|
|
4966
4960
|
var React83 = __toESM(require("react"));
|
|
4967
4961
|
var import_react43 = require("react");
|
|
4968
|
-
var
|
|
4962
|
+
var import_editor_props38 = require("@elementor/editor-props");
|
|
4969
4963
|
var import_icons24 = require("@elementor/icons");
|
|
4970
4964
|
var import_ui69 = require("@elementor/ui");
|
|
4971
4965
|
var import_i18n37 = require("@wordpress/i18n");
|
|
@@ -5010,7 +5004,7 @@ var moveAxisControls = [
|
|
|
5010
5004
|
}
|
|
5011
5005
|
];
|
|
5012
5006
|
var Move = () => {
|
|
5013
|
-
const context = useBoundProp(
|
|
5007
|
+
const context = useBoundProp(import_editor_props38.moveTransformPropTypeUtil);
|
|
5014
5008
|
const rowRefs = [(0, import_react43.useRef)(null), (0, import_react43.useRef)(null), (0, import_react43.useRef)(null)];
|
|
5015
5009
|
return /* @__PURE__ */ React83.createElement(import_ui69.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React83.createElement(PropProvider, { ...context }, /* @__PURE__ */ React83.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React83.createElement(
|
|
5016
5010
|
AxisRow,
|
|
@@ -5027,7 +5021,7 @@ var Move = () => {
|
|
|
5027
5021
|
// src/controls/transform-control/functions/rotate.tsx
|
|
5028
5022
|
var React84 = __toESM(require("react"));
|
|
5029
5023
|
var import_react44 = require("react");
|
|
5030
|
-
var
|
|
5024
|
+
var import_editor_props39 = require("@elementor/editor-props");
|
|
5031
5025
|
var import_icons25 = require("@elementor/icons");
|
|
5032
5026
|
var import_ui70 = require("@elementor/ui");
|
|
5033
5027
|
var import_i18n38 = require("@wordpress/i18n");
|
|
@@ -5050,7 +5044,7 @@ var rotateAxisControls = [
|
|
|
5050
5044
|
];
|
|
5051
5045
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
5052
5046
|
var Rotate = () => {
|
|
5053
|
-
const context = useBoundProp(
|
|
5047
|
+
const context = useBoundProp(import_editor_props39.rotateTransformPropTypeUtil);
|
|
5054
5048
|
const rowRefs = [(0, import_react44.useRef)(null), (0, import_react44.useRef)(null), (0, import_react44.useRef)(null)];
|
|
5055
5049
|
return /* @__PURE__ */ React84.createElement(import_ui70.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React84.createElement(PropProvider, { ...context }, /* @__PURE__ */ React84.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React84.createElement(
|
|
5056
5050
|
AxisRow,
|
|
@@ -5066,7 +5060,7 @@ var Rotate = () => {
|
|
|
5066
5060
|
// src/controls/transform-control/functions/scale.tsx
|
|
5067
5061
|
var React86 = __toESM(require("react"));
|
|
5068
5062
|
var import_react45 = require("react");
|
|
5069
|
-
var
|
|
5063
|
+
var import_editor_props40 = require("@elementor/editor-props");
|
|
5070
5064
|
var import_icons26 = require("@elementor/icons");
|
|
5071
5065
|
var import_ui72 = require("@elementor/ui");
|
|
5072
5066
|
var import_i18n39 = require("@wordpress/i18n");
|
|
@@ -5097,7 +5091,7 @@ var scaleAxisControls = [
|
|
|
5097
5091
|
}
|
|
5098
5092
|
];
|
|
5099
5093
|
var Scale = () => {
|
|
5100
|
-
const context = useBoundProp(
|
|
5094
|
+
const context = useBoundProp(import_editor_props40.scaleTransformPropTypeUtil);
|
|
5101
5095
|
const rowRefs = [(0, import_react45.useRef)(null), (0, import_react45.useRef)(null), (0, import_react45.useRef)(null)];
|
|
5102
5096
|
return /* @__PURE__ */ React86.createElement(import_ui72.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React86.createElement(PropProvider, { ...context }, /* @__PURE__ */ React86.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React86.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
|
|
5103
5097
|
};
|
|
@@ -5105,7 +5099,7 @@ var Scale = () => {
|
|
|
5105
5099
|
// src/controls/transform-control/functions/skew.tsx
|
|
5106
5100
|
var React87 = __toESM(require("react"));
|
|
5107
5101
|
var import_react46 = require("react");
|
|
5108
|
-
var
|
|
5102
|
+
var import_editor_props41 = require("@elementor/editor-props");
|
|
5109
5103
|
var import_icons27 = require("@elementor/icons");
|
|
5110
5104
|
var import_ui73 = require("@elementor/ui");
|
|
5111
5105
|
var import_i18n40 = require("@wordpress/i18n");
|
|
@@ -5123,7 +5117,7 @@ var skewAxisControls = [
|
|
|
5123
5117
|
];
|
|
5124
5118
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
5125
5119
|
var Skew = () => {
|
|
5126
|
-
const context = useBoundProp(
|
|
5120
|
+
const context = useBoundProp(import_editor_props41.skewTransformPropTypeUtil);
|
|
5127
5121
|
const rowRefs = [(0, import_react46.useRef)(null), (0, import_react46.useRef)(null), (0, import_react46.useRef)(null)];
|
|
5128
5122
|
return /* @__PURE__ */ React87.createElement(import_ui73.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React87.createElement(PropProvider, { ...context }, /* @__PURE__ */ React87.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React87.createElement(
|
|
5129
5123
|
AxisRow,
|
|
@@ -5138,7 +5132,7 @@ var Skew = () => {
|
|
|
5138
5132
|
|
|
5139
5133
|
// src/controls/transform-control/use-transform-tabs-history.tsx
|
|
5140
5134
|
var import_react47 = require("react");
|
|
5141
|
-
var
|
|
5135
|
+
var import_editor_props42 = require("@elementor/editor-props");
|
|
5142
5136
|
var import_ui74 = require("@elementor/ui");
|
|
5143
5137
|
var useTransformTabsHistory = ({
|
|
5144
5138
|
move: initialMove,
|
|
@@ -5146,10 +5140,10 @@ var useTransformTabsHistory = ({
|
|
|
5146
5140
|
rotate: initialRotate,
|
|
5147
5141
|
skew: initialSkew
|
|
5148
5142
|
}) => {
|
|
5149
|
-
const { value: moveValue, setValue: setMoveValue } = useBoundProp(
|
|
5150
|
-
const { value: scaleValue, setValue: setScaleValue } = useBoundProp(
|
|
5151
|
-
const { value: rotateValue, setValue: setRotateValue } = useBoundProp(
|
|
5152
|
-
const { value: skewValue, setValue: setSkewValue } = useBoundProp(
|
|
5143
|
+
const { value: moveValue, setValue: setMoveValue } = useBoundProp(import_editor_props42.moveTransformPropTypeUtil);
|
|
5144
|
+
const { value: scaleValue, setValue: setScaleValue } = useBoundProp(import_editor_props42.scaleTransformPropTypeUtil);
|
|
5145
|
+
const { value: rotateValue, setValue: setRotateValue } = useBoundProp(import_editor_props42.rotateTransformPropTypeUtil);
|
|
5146
|
+
const { value: skewValue, setValue: setSkewValue } = useBoundProp(import_editor_props42.skewTransformPropTypeUtil);
|
|
5153
5147
|
const { openItemIndex, items: items2 } = useRepeaterContext();
|
|
5154
5148
|
const getCurrentTransformType = () => {
|
|
5155
5149
|
switch (true) {
|
|
@@ -5306,7 +5300,7 @@ var import_i18n45 = require("@wordpress/i18n");
|
|
|
5306
5300
|
|
|
5307
5301
|
// src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
|
|
5308
5302
|
var React91 = __toESM(require("react"));
|
|
5309
|
-
var
|
|
5303
|
+
var import_editor_props43 = require("@elementor/editor-props");
|
|
5310
5304
|
var import_ui77 = require("@elementor/ui");
|
|
5311
5305
|
var import_i18n43 = require("@wordpress/i18n");
|
|
5312
5306
|
var ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
@@ -5333,7 +5327,7 @@ var ChildrenPerspectiveControl = () => {
|
|
|
5333
5327
|
var PerspectiveControl = () => /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: "perspective" }, /* @__PURE__ */ React91.createElement(ControlFields, { control: PERSPECTIVE_CONTROL_FIELD, key: PERSPECTIVE_CONTROL_FIELD.bind }));
|
|
5334
5328
|
var PerspectiveOriginControl = () => /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: "perspective-origin" }, /* @__PURE__ */ React91.createElement(PerspectiveOriginControlProvider, null));
|
|
5335
5329
|
var PerspectiveOriginControlProvider = () => {
|
|
5336
|
-
const context = useBoundProp(
|
|
5330
|
+
const context = useBoundProp(import_editor_props43.perspectiveOriginPropTypeUtil);
|
|
5337
5331
|
return /* @__PURE__ */ React91.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React91.createElement(ControlFields, { control }))));
|
|
5338
5332
|
};
|
|
5339
5333
|
var ControlFields = ({ control }) => {
|
|
@@ -5343,7 +5337,7 @@ var ControlFields = ({ control }) => {
|
|
|
5343
5337
|
|
|
5344
5338
|
// src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
|
|
5345
5339
|
var React92 = __toESM(require("react"));
|
|
5346
|
-
var
|
|
5340
|
+
var import_editor_props44 = require("@elementor/editor-props");
|
|
5347
5341
|
var import_ui78 = require("@elementor/ui");
|
|
5348
5342
|
var import_i18n44 = require("@wordpress/i18n");
|
|
5349
5343
|
var TRANSFORM_ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
@@ -5369,7 +5363,7 @@ var TransformOriginControl = () => {
|
|
|
5369
5363
|
return /* @__PURE__ */ React92.createElement(import_ui78.Stack, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React92.createElement(ControlFormLabel, null, (0, import_i18n44.__)("Transform", "elementor")), TRANSFORM_ORIGIN_FIELDS.map((control) => /* @__PURE__ */ React92.createElement(ControlFields2, { control, key: control.bind })));
|
|
5370
5364
|
};
|
|
5371
5365
|
var ControlFields2 = ({ control }) => {
|
|
5372
|
-
const context = useBoundProp(
|
|
5366
|
+
const context = useBoundProp(import_editor_props44.transformOriginPropTypeUtil);
|
|
5373
5367
|
const rowRef = React92.useRef(null);
|
|
5374
5368
|
return /* @__PURE__ */ React92.createElement(PropProvider, { ...context }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React92.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React92.createElement(import_ui78.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React92.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React92.createElement(import_ui78.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React92.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })))));
|
|
5375
5369
|
};
|
|
@@ -5415,7 +5409,7 @@ var TransformSettingsControl = ({
|
|
|
5415
5409
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
5416
5410
|
var SIZE8 = "tiny";
|
|
5417
5411
|
var TransformRepeaterControl = createControl(() => {
|
|
5418
|
-
const context = useBoundProp(
|
|
5412
|
+
const context = useBoundProp(import_editor_props45.transformPropTypeUtil);
|
|
5419
5413
|
const headerRef = (0, import_react48.useRef)(null);
|
|
5420
5414
|
const popupState = (0, import_ui80.usePopupState)({ variant: "popover" });
|
|
5421
5415
|
return /* @__PURE__ */ React94.createElement(PropProvider, { ...context }, /* @__PURE__ */ React94.createElement(TransformSettingsControl, { popupState, anchorRef: headerRef }), /* @__PURE__ */ React94.createElement(PropKeyProvider, { bind: "transform-functions" }, /* @__PURE__ */ React94.createElement(Repeater2, { headerRef, propType: context.propType, popupState })));
|
|
@@ -5435,7 +5429,7 @@ var Repeater2 = ({
|
|
|
5435
5429
|
propType,
|
|
5436
5430
|
popupState
|
|
5437
5431
|
}) => {
|
|
5438
|
-
const transformFunctionsContext = useBoundProp(
|
|
5432
|
+
const transformFunctionsContext = useBoundProp(import_editor_props45.transformFunctionsPropTypeUtil);
|
|
5439
5433
|
const availableValues = [initialTransformValue, initialScaleValue, initialRotateValue, initialSkewValue];
|
|
5440
5434
|
const { value: transformValues, bind } = transformFunctionsContext;
|
|
5441
5435
|
const getInitialValue2 = () => {
|
|
@@ -5446,7 +5440,7 @@ var Repeater2 = ({
|
|
|
5446
5440
|
ControlRepeater,
|
|
5447
5441
|
{
|
|
5448
5442
|
initial: getInitialValue2() ?? initialTransformValue,
|
|
5449
|
-
propTypeUtil:
|
|
5443
|
+
propTypeUtil: import_editor_props45.transformFunctionsPropTypeUtil
|
|
5450
5444
|
},
|
|
5451
5445
|
/* @__PURE__ */ React94.createElement(
|
|
5452
5446
|
RepeaterHeader,
|
|
@@ -5489,7 +5483,7 @@ var TransformBasePopoverTrigger = ({
|
|
|
5489
5483
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
5490
5484
|
var React97 = __toESM(require("react"));
|
|
5491
5485
|
var import_react51 = require("react");
|
|
5492
|
-
var
|
|
5486
|
+
var import_editor_props48 = require("@elementor/editor-props");
|
|
5493
5487
|
var import_icons32 = require("@elementor/icons");
|
|
5494
5488
|
var import_ui83 = require("@elementor/ui");
|
|
5495
5489
|
var import_i18n49 = require("@wordpress/i18n");
|
|
@@ -5497,11 +5491,11 @@ var import_i18n49 = require("@wordpress/i18n");
|
|
|
5497
5491
|
// src/controls/selection-size-control.tsx
|
|
5498
5492
|
var React95 = __toESM(require("react"));
|
|
5499
5493
|
var import_react49 = require("react");
|
|
5500
|
-
var
|
|
5494
|
+
var import_editor_props46 = require("@elementor/editor-props");
|
|
5501
5495
|
var import_ui81 = require("@elementor/ui");
|
|
5502
5496
|
var SelectionSizeControl = createControl(
|
|
5503
5497
|
({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
|
|
5504
|
-
const { value, setValue, propType } = useBoundProp(
|
|
5498
|
+
const { value, setValue, propType } = useBoundProp(import_editor_props46.selectionSizePropTypeUtil);
|
|
5505
5499
|
const rowRef = (0, import_react49.useRef)(null);
|
|
5506
5500
|
const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
|
|
5507
5501
|
const currentSizeConfig = (0, import_react49.useMemo)(() => {
|
|
@@ -5578,7 +5572,7 @@ function subscribeToTransitionEvent() {
|
|
|
5578
5572
|
// src/controls/transition-control/transition-selector.tsx
|
|
5579
5573
|
var React96 = __toESM(require("react"));
|
|
5580
5574
|
var import_react50 = require("react");
|
|
5581
|
-
var
|
|
5575
|
+
var import_editor_props47 = require("@elementor/editor-props");
|
|
5582
5576
|
var import_icons31 = require("@elementor/icons");
|
|
5583
5577
|
var import_ui82 = require("@elementor/ui");
|
|
5584
5578
|
var import_i18n48 = require("@wordpress/i18n");
|
|
@@ -5616,7 +5610,7 @@ var TransitionSelector = ({
|
|
|
5616
5610
|
recentlyUsedList = [],
|
|
5617
5611
|
disabledItems = []
|
|
5618
5612
|
}) => {
|
|
5619
|
-
const { value, setValue } = useBoundProp(
|
|
5613
|
+
const { value, setValue } = useBoundProp(import_editor_props47.keyValuePropTypeUtil);
|
|
5620
5614
|
const {
|
|
5621
5615
|
key: { value: transitionLabel }
|
|
5622
5616
|
} = value;
|
|
@@ -5703,9 +5697,9 @@ var DURATION_CONFIG = {
|
|
|
5703
5697
|
units: ["s", "ms"],
|
|
5704
5698
|
defaultUnit: "ms"
|
|
5705
5699
|
};
|
|
5706
|
-
var childArrayPropTypeUtil = (0,
|
|
5707
|
-
|
|
5708
|
-
|
|
5700
|
+
var childArrayPropTypeUtil = (0, import_editor_props48.createArrayPropUtils)(
|
|
5701
|
+
import_editor_props48.selectionSizePropTypeUtil.key,
|
|
5702
|
+
import_editor_props48.selectionSizePropTypeUtil.schema,
|
|
5709
5703
|
"transition"
|
|
5710
5704
|
);
|
|
5711
5705
|
subscribeToTransitionEvent();
|
|
@@ -5748,7 +5742,7 @@ var isItemDisabled = (item) => {
|
|
|
5748
5742
|
};
|
|
5749
5743
|
var getChildControlConfig = (recentlyUsedList, disabledItems) => {
|
|
5750
5744
|
return {
|
|
5751
|
-
propTypeUtil:
|
|
5745
|
+
propTypeUtil: import_editor_props48.selectionSizePropTypeUtil,
|
|
5752
5746
|
component: SelectionSizeControl,
|
|
5753
5747
|
props: getSelectionSizeProps(recentlyUsedList, disabledItems),
|
|
5754
5748
|
isItemDisabled
|
|
@@ -5863,17 +5857,17 @@ var TransitionRepeaterControl = createControl(
|
|
|
5863
5857
|
// src/controls/date-time-control.tsx
|
|
5864
5858
|
var React98 = __toESM(require("react"));
|
|
5865
5859
|
var dayjs = __toESM(require("dayjs"));
|
|
5860
|
+
var import_editor_props49 = require("@elementor/editor-props");
|
|
5866
5861
|
var import_editor_props50 = require("@elementor/editor-props");
|
|
5867
|
-
var import_editor_props51 = require("@elementor/editor-props");
|
|
5868
5862
|
var import_ui84 = require("@elementor/ui");
|
|
5869
5863
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
5870
5864
|
var TIME_FORMAT = "HH:mm";
|
|
5871
5865
|
var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
5872
|
-
const { value, setValue, ...propContext } = useBoundProp(
|
|
5866
|
+
const { value, setValue, ...propContext } = useBoundProp(import_editor_props50.DateTimePropTypeUtil);
|
|
5873
5867
|
const handleChange = (newValue, meta) => {
|
|
5874
5868
|
const field = meta.bind;
|
|
5875
5869
|
const fieldValue = newValue[field];
|
|
5876
|
-
if ((0,
|
|
5870
|
+
if ((0, import_editor_props49.isTransformable)(fieldValue)) {
|
|
5877
5871
|
return setValue({ ...value, [field]: fieldValue });
|
|
5878
5872
|
}
|
|
5879
5873
|
let formattedValue = "";
|
|
@@ -5912,7 +5906,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
5912
5906
|
return /* @__PURE__ */ React98.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React98.createElement(ControlActions, null, /* @__PURE__ */ React98.createElement(import_ui84.LocalizationProvider, null, /* @__PURE__ */ React98.createElement(import_ui84.Box, { display: "flex", gap: 1, alignItems: "center" }, /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: "date" }, /* @__PURE__ */ React98.createElement(
|
|
5913
5907
|
import_ui84.DatePicker,
|
|
5914
5908
|
{
|
|
5915
|
-
value: parseDateValue(
|
|
5909
|
+
value: parseDateValue(import_editor_props49.stringPropTypeUtil.extract(value?.date)),
|
|
5916
5910
|
onChange: (v) => handleChange({ date: v }, { bind: "date" }),
|
|
5917
5911
|
disabled: inputDisabled,
|
|
5918
5912
|
slotProps: {
|
|
@@ -5924,7 +5918,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
5924
5918
|
)), /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: "time" }, /* @__PURE__ */ React98.createElement(
|
|
5925
5919
|
import_ui84.TimePicker,
|
|
5926
5920
|
{
|
|
5927
|
-
value: parseTimeValue(
|
|
5921
|
+
value: parseTimeValue(import_editor_props49.stringPropTypeUtil.extract(value?.time)),
|
|
5928
5922
|
onChange: (v) => handleChange({ time: v }, { bind: "time" }),
|
|
5929
5923
|
disabled: inputDisabled,
|
|
5930
5924
|
slotProps: {
|
|
@@ -5938,7 +5932,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
5938
5932
|
|
|
5939
5933
|
// src/controls/inline-editing-control.tsx
|
|
5940
5934
|
var React102 = __toESM(require("react"));
|
|
5941
|
-
var
|
|
5935
|
+
var import_editor_props51 = require("@elementor/editor-props");
|
|
5942
5936
|
var import_ui88 = require("@elementor/ui");
|
|
5943
5937
|
|
|
5944
5938
|
// src/components/inline-editor.tsx
|
|
@@ -6404,7 +6398,7 @@ var InlineEditingControl = createControl(
|
|
|
6404
6398
|
attributes,
|
|
6405
6399
|
props
|
|
6406
6400
|
}) => {
|
|
6407
|
-
const { value, setValue } = useBoundProp(
|
|
6401
|
+
const { value, setValue } = useBoundProp(import_editor_props51.htmlPropTypeUtil);
|
|
6408
6402
|
const handleChange = (newValue) => setValue(newValue);
|
|
6409
6403
|
return /* @__PURE__ */ React102.createElement(ControlActions, null, /* @__PURE__ */ React102.createElement(
|
|
6410
6404
|
import_ui88.Box,
|