@elementor/editor-editing-panel 3.32.0-52 → 3.32.0-54
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 +67 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +103 -57
- package/dist/index.mjs.map +1 -1
- package/package.json +19 -19
- package/src/components/style-sections/layout-section/flex-order-field.tsx +88 -40
- package/src/components/style-sections/layout-section/flex-size-field.tsx +43 -22
- package/src/components/style-tab.tsx +1 -0
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import { useBoundProp as
|
|
2
|
+
import { useBoundProp as useBoundProp12 } from "@elementor/editor-controls";
|
|
3
3
|
|
|
4
4
|
// src/components/css-classes/css-class-convert-local.tsx
|
|
5
5
|
import * as React4 from "react";
|
|
@@ -1723,7 +1723,7 @@ function EditorPanelErrorFallback() {
|
|
|
1723
1723
|
|
|
1724
1724
|
// src/components/editing-panel-tabs.tsx
|
|
1725
1725
|
import * as React88 from "react";
|
|
1726
|
-
import { Fragment as
|
|
1726
|
+
import { Fragment as Fragment10 } from "react";
|
|
1727
1727
|
import { Divider as Divider6, Stack as Stack15, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
1728
1728
|
import { __ as __60 } from "@wordpress/i18n";
|
|
1729
1729
|
|
|
@@ -3703,8 +3703,12 @@ var FlexDirectionField = () => {
|
|
|
3703
3703
|
|
|
3704
3704
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3705
3705
|
import * as React53 from "react";
|
|
3706
|
-
import { useEffect as useEffect5, useState as useState10 } from "react";
|
|
3707
|
-
import {
|
|
3706
|
+
import { useEffect as useEffect5, useMemo as useMemo8, useState as useState10 } from "react";
|
|
3707
|
+
import {
|
|
3708
|
+
ControlToggleButtonGroup,
|
|
3709
|
+
NumberControl,
|
|
3710
|
+
useBoundProp as useBoundProp3
|
|
3711
|
+
} from "@elementor/editor-controls";
|
|
3708
3712
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
3709
3713
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
3710
3714
|
import { __ as __28 } from "@wordpress/i18n";
|
|
@@ -3739,6 +3743,9 @@ var items = [
|
|
|
3739
3743
|
}
|
|
3740
3744
|
];
|
|
3741
3745
|
var FlexOrderField = () => {
|
|
3746
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "order", propDisplayName: ORDER_LABEL }, /* @__PURE__ */ React53.createElement(UiProviders, null, /* @__PURE__ */ React53.createElement(SectionContent, null, /* @__PURE__ */ React53.createElement(FlexOrderFieldContent, null))));
|
|
3747
|
+
};
|
|
3748
|
+
function FlexOrderFieldContent() {
|
|
3742
3749
|
const {
|
|
3743
3750
|
value: order,
|
|
3744
3751
|
setValue: setOrder,
|
|
@@ -3746,37 +3753,61 @@ var FlexOrderField = () => {
|
|
|
3746
3753
|
} = useStylesField("order", {
|
|
3747
3754
|
history: { propDisplayName: ORDER_LABEL }
|
|
3748
3755
|
});
|
|
3749
|
-
const
|
|
3756
|
+
const { placeholder } = useBoundProp3();
|
|
3757
|
+
const placeholderValue = placeholder;
|
|
3758
|
+
const currentGroup = useMemo8(() => getGroupControlValue(order?.value ?? null), [order]);
|
|
3759
|
+
const [activeGroup, setActiveGroup] = useState10(currentGroup);
|
|
3760
|
+
const [customLocked, setCustomLocked] = useState10(false);
|
|
3761
|
+
useEffect5(() => {
|
|
3762
|
+
if (!customLocked) {
|
|
3763
|
+
setActiveGroup(currentGroup);
|
|
3764
|
+
}
|
|
3765
|
+
}, [currentGroup, customLocked]);
|
|
3750
3766
|
useEffect5(() => {
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3767
|
+
if (order === null) {
|
|
3768
|
+
setCustomLocked(false);
|
|
3769
|
+
}
|
|
3770
|
+
}, [order]);
|
|
3771
|
+
const groupPlaceholder = getGroupControlValue(placeholderValue?.value ?? null);
|
|
3754
3772
|
const handleToggleButtonChange = (group) => {
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3773
|
+
setActiveGroup(group);
|
|
3774
|
+
setCustomLocked(group === CUSTOM);
|
|
3775
|
+
if (CUSTOM === group) {
|
|
3776
|
+
setOrder({ $$type: "number", value: null });
|
|
3758
3777
|
return;
|
|
3759
3778
|
}
|
|
3760
|
-
|
|
3779
|
+
if (FIRST === group) {
|
|
3780
|
+
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
3781
|
+
return;
|
|
3782
|
+
}
|
|
3783
|
+
if (LAST === group) {
|
|
3784
|
+
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
3785
|
+
return;
|
|
3786
|
+
}
|
|
3787
|
+
setOrder(null);
|
|
3761
3788
|
};
|
|
3762
|
-
|
|
3789
|
+
const isCustomVisible = CUSTOM === activeGroup || CUSTOM === groupPlaceholder;
|
|
3790
|
+
const orderPlaceholder = CUSTOM === groupPlaceholder ? String(placeholderValue?.value ?? null) : "";
|
|
3791
|
+
return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(StylesFieldLayout, { label: ORDER_LABEL }, /* @__PURE__ */ React53.createElement(
|
|
3763
3792
|
ControlToggleButtonGroup,
|
|
3764
3793
|
{
|
|
3765
3794
|
items,
|
|
3766
|
-
value:
|
|
3795
|
+
value: activeGroup,
|
|
3767
3796
|
onChange: handleToggleButtonChange,
|
|
3768
3797
|
exclusive: true,
|
|
3798
|
+
placeholder: groupPlaceholder,
|
|
3769
3799
|
disabled: !canEdit
|
|
3770
3800
|
}
|
|
3771
|
-
)),
|
|
3801
|
+
)), isCustomVisible && /* @__PURE__ */ React53.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, __28("Custom order", "elementor"))), /* @__PURE__ */ React53.createElement(Grid2, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React53.createElement(
|
|
3772
3802
|
NumberControl,
|
|
3773
3803
|
{
|
|
3774
3804
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
3775
3805
|
max: LAST_DEFAULT_VALUE - 1,
|
|
3776
|
-
shouldForceInt: true
|
|
3806
|
+
shouldForceInt: true,
|
|
3807
|
+
placeholder: orderPlaceholder
|
|
3777
3808
|
}
|
|
3778
|
-
))))
|
|
3779
|
-
}
|
|
3809
|
+
))));
|
|
3810
|
+
}
|
|
3780
3811
|
var getGroupControlValue = (order) => {
|
|
3781
3812
|
if (LAST_DEFAULT_VALUE === order) {
|
|
3782
3813
|
return LAST;
|
|
@@ -3784,19 +3815,22 @@ var getGroupControlValue = (order) => {
|
|
|
3784
3815
|
if (FIRST_DEFAULT_VALUE === order) {
|
|
3785
3816
|
return FIRST;
|
|
3786
3817
|
}
|
|
3787
|
-
|
|
3818
|
+
if (null !== order) {
|
|
3819
|
+
return CUSTOM;
|
|
3820
|
+
}
|
|
3821
|
+
return null;
|
|
3788
3822
|
};
|
|
3789
3823
|
|
|
3790
3824
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3791
3825
|
import * as React54 from "react";
|
|
3792
|
-
import { useEffect as useEffect6, useMemo as
|
|
3826
|
+
import { useEffect as useEffect6, useMemo as useMemo9, useRef as useRef6, useState as useState11 } from "react";
|
|
3793
3827
|
import {
|
|
3794
3828
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
3795
3829
|
NumberControl as NumberControl2,
|
|
3796
3830
|
PropKeyProvider as PropKeyProvider3,
|
|
3797
3831
|
PropProvider as PropProvider3,
|
|
3798
3832
|
SizeControl as SizeControl3,
|
|
3799
|
-
useBoundProp as
|
|
3833
|
+
useBoundProp as useBoundProp4
|
|
3800
3834
|
} from "@elementor/editor-controls";
|
|
3801
3835
|
import { flexPropTypeUtil, numberPropTypeUtil } from "@elementor/editor-props";
|
|
3802
3836
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
@@ -3824,14 +3858,15 @@ var items2 = [
|
|
|
3824
3858
|
}
|
|
3825
3859
|
];
|
|
3826
3860
|
var FlexSizeField = () => {
|
|
3861
|
+
return /* @__PURE__ */ React54.createElement(UiProviders, null, /* @__PURE__ */ React54.createElement(SectionContent, null, /* @__PURE__ */ React54.createElement(StylesField, { bind: "flex", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React54.createElement(FlexSizeFieldContent, null))));
|
|
3862
|
+
};
|
|
3863
|
+
var FlexSizeFieldContent = () => {
|
|
3827
3864
|
const { value, setValue, canEdit } = useStylesField("flex", {
|
|
3828
3865
|
history: { propDisplayName: FLEX_SIZE_LABEL }
|
|
3829
3866
|
});
|
|
3830
|
-
const
|
|
3831
|
-
const
|
|
3832
|
-
const
|
|
3833
|
-
const basis = flexValue?.value?.flexBasis?.value || null;
|
|
3834
|
-
const currentGroup = useMemo8(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]);
|
|
3867
|
+
const { placeholder } = useBoundProp4();
|
|
3868
|
+
const flexValues = extractFlexValues(value);
|
|
3869
|
+
const currentGroup = useMemo9(() => getActiveGroup(flexValues), [flexValues]);
|
|
3835
3870
|
const [activeGroup, setActiveGroup] = useState11(currentGroup);
|
|
3836
3871
|
const [customLocked, setCustomLocked] = useState11(false);
|
|
3837
3872
|
useEffect6(() => {
|
|
@@ -3847,20 +3882,30 @@ var FlexSizeField = () => {
|
|
|
3847
3882
|
const onChangeGroup = (group = null) => {
|
|
3848
3883
|
setActiveGroup(group);
|
|
3849
3884
|
setCustomLocked(group === "custom");
|
|
3850
|
-
const newFlexValue = createFlexValueForGroup(group,
|
|
3885
|
+
const newFlexValue = createFlexValueForGroup(group, value);
|
|
3851
3886
|
setValue(newFlexValue);
|
|
3852
3887
|
};
|
|
3853
|
-
|
|
3888
|
+
const groupPlaceholder = getActiveGroup(extractFlexValues(placeholder));
|
|
3889
|
+
const isCustomVisible = "custom" === activeGroup || "custom" === groupPlaceholder;
|
|
3890
|
+
return /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(StylesFieldLayout, { label: FLEX_SIZE_LABEL }, /* @__PURE__ */ React54.createElement(
|
|
3854
3891
|
ControlToggleButtonGroup2,
|
|
3855
3892
|
{
|
|
3856
|
-
value: activeGroup,
|
|
3893
|
+
value: activeGroup ?? null,
|
|
3894
|
+
placeholder: groupPlaceholder ?? null,
|
|
3857
3895
|
onChange: onChangeGroup,
|
|
3858
3896
|
disabled: !canEdit,
|
|
3859
3897
|
items: items2,
|
|
3860
3898
|
exclusive: true
|
|
3861
3899
|
}
|
|
3862
|
-
)),
|
|
3900
|
+
)), isCustomVisible && /* @__PURE__ */ React54.createElement(FlexCustomField, null));
|
|
3863
3901
|
};
|
|
3902
|
+
function extractFlexValues(source) {
|
|
3903
|
+
return {
|
|
3904
|
+
grow: source?.value?.flexGrow?.value ?? null,
|
|
3905
|
+
shrink: source?.value?.flexShrink?.value ?? null,
|
|
3906
|
+
basis: source?.value?.flexBasis?.value ?? null
|
|
3907
|
+
};
|
|
3908
|
+
}
|
|
3864
3909
|
var createFlexValueForGroup = (group, flexValue) => {
|
|
3865
3910
|
if (!group) {
|
|
3866
3911
|
return null;
|
|
@@ -3893,7 +3938,7 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
3893
3938
|
};
|
|
3894
3939
|
var FlexCustomField = () => {
|
|
3895
3940
|
const flexBasisRowRef = useRef6(null);
|
|
3896
|
-
const context =
|
|
3941
|
+
const context = useBoundProp4(flexPropTypeUtil);
|
|
3897
3942
|
return /* @__PURE__ */ React54.createElement(PropProvider3, { ...context }, /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(StylesFieldLayout, { label: __29("Grow", "elementor") }, /* @__PURE__ */ React54.createElement(PropKeyProvider3, { bind: "flexGrow" }, /* @__PURE__ */ React54.createElement(NumberControl2, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React54.createElement(StylesFieldLayout, { label: __29("Shrink", "elementor") }, /* @__PURE__ */ React54.createElement(PropKeyProvider3, { bind: "flexShrink" }, /* @__PURE__ */ React54.createElement(NumberControl2, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React54.createElement(StylesFieldLayout, { label: __29("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React54.createElement(PropKeyProvider3, { bind: "flexBasis" }, /* @__PURE__ */ React54.createElement(SizeControl3, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
3898
3943
|
};
|
|
3899
3944
|
var getActiveGroup = ({
|
|
@@ -4851,7 +4896,8 @@ var StyleTab = () => {
|
|
|
4851
4896
|
"transform",
|
|
4852
4897
|
"filter",
|
|
4853
4898
|
"backdrop-filter",
|
|
4854
|
-
"transform-origin"
|
|
4899
|
+
"transform-origin",
|
|
4900
|
+
"transition"
|
|
4855
4901
|
]
|
|
4856
4902
|
}
|
|
4857
4903
|
), shouldRenderCustomCss && /* @__PURE__ */ React87.createElement(
|
|
@@ -4887,7 +4933,7 @@ var EditingPanelTabs = () => {
|
|
|
4887
4933
|
return (
|
|
4888
4934
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4889
4935
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4890
|
-
/* @__PURE__ */ React88.createElement(
|
|
4936
|
+
/* @__PURE__ */ React88.createElement(Fragment10, { key: element.id }, /* @__PURE__ */ React88.createElement(PanelTabContent, null))
|
|
4891
4937
|
);
|
|
4892
4938
|
};
|
|
4893
4939
|
var PanelTabContent = () => {
|
|
@@ -4966,18 +5012,18 @@ import { injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel } from "@elemen
|
|
|
4966
5012
|
|
|
4967
5013
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4968
5014
|
import * as React90 from "react";
|
|
4969
|
-
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as
|
|
5015
|
+
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
4970
5016
|
import {
|
|
4971
5017
|
backgroundImageOverlayPropTypeUtil
|
|
4972
5018
|
} from "@elementor/editor-props";
|
|
4973
5019
|
import { DatabaseIcon } from "@elementor/icons";
|
|
4974
5020
|
|
|
4975
5021
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
4976
|
-
import { useMemo as
|
|
5022
|
+
import { useMemo as useMemo11 } from "react";
|
|
4977
5023
|
|
|
4978
5024
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4979
|
-
import { useMemo as
|
|
4980
|
-
import { useBoundProp as
|
|
5025
|
+
import { useMemo as useMemo10 } from "react";
|
|
5026
|
+
import { useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
4981
5027
|
|
|
4982
5028
|
// src/dynamics/sync/get-elementor-config.ts
|
|
4983
5029
|
var getElementorConfig2 = () => {
|
|
@@ -5026,12 +5072,12 @@ var dynamicPropTypeUtil = createPropUtils(
|
|
|
5026
5072
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5027
5073
|
var usePropDynamicTags = () => {
|
|
5028
5074
|
let categories = [];
|
|
5029
|
-
const { propType } =
|
|
5075
|
+
const { propType } = useBoundProp5();
|
|
5030
5076
|
if (propType) {
|
|
5031
5077
|
const propDynamicType = getDynamicPropType(propType);
|
|
5032
5078
|
categories = propDynamicType?.settings.categories || [];
|
|
5033
5079
|
}
|
|
5034
|
-
return
|
|
5080
|
+
return useMemo10(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
5035
5081
|
};
|
|
5036
5082
|
var getDynamicTagsByCategories = (categories) => {
|
|
5037
5083
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -5047,17 +5093,17 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
5047
5093
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5048
5094
|
var useDynamicTag = (tagName) => {
|
|
5049
5095
|
const dynamicTags = usePropDynamicTags();
|
|
5050
|
-
return
|
|
5096
|
+
return useMemo11(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
5051
5097
|
};
|
|
5052
5098
|
|
|
5053
5099
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5054
5100
|
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React90.createElement(DatabaseIcon, { fontSize: "tiny" });
|
|
5055
5101
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
5056
|
-
const context =
|
|
5102
|
+
const context = useBoundProp6(backgroundImageOverlayPropTypeUtil);
|
|
5057
5103
|
return /* @__PURE__ */ React90.createElement(PropProvider4, { ...context, value: value.value }, /* @__PURE__ */ React90.createElement(PropKeyProvider4, { bind: "image" }, /* @__PURE__ */ React90.createElement(Wrapper, { rawValue: value.value })));
|
|
5058
5104
|
};
|
|
5059
5105
|
var Wrapper = ({ rawValue }) => {
|
|
5060
|
-
const { propType } =
|
|
5106
|
+
const { propType } = useBoundProp6();
|
|
5061
5107
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
5062
5108
|
return /* @__PURE__ */ React90.createElement(PropProvider4, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React90.createElement(PropKeyProvider4, { bind: "src" }, /* @__PURE__ */ React90.createElement(Content, { rawValue: rawValue.image })));
|
|
5063
5109
|
};
|
|
@@ -5069,7 +5115,7 @@ var Content = ({ rawValue }) => {
|
|
|
5069
5115
|
|
|
5070
5116
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5071
5117
|
import * as React93 from "react";
|
|
5072
|
-
import { ControlFormLabel as ControlFormLabel5, useBoundProp as
|
|
5118
|
+
import { ControlFormLabel as ControlFormLabel5, useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
5073
5119
|
import { PopoverHeader as PopoverHeader3 } from "@elementor/editor-ui";
|
|
5074
5120
|
import { DatabaseIcon as DatabaseIcon3, SettingsIcon, XIcon } from "@elementor/icons";
|
|
5075
5121
|
import {
|
|
@@ -5100,9 +5146,9 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
5100
5146
|
|
|
5101
5147
|
// src/dynamics/dynamic-control.tsx
|
|
5102
5148
|
import * as React91 from "react";
|
|
5103
|
-
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as
|
|
5149
|
+
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
5104
5150
|
var DynamicControl = ({ bind, children }) => {
|
|
5105
|
-
const { value, setValue } =
|
|
5151
|
+
const { value, setValue } = useBoundProp7(dynamicPropTypeUtil);
|
|
5106
5152
|
const { name = "", settings } = value ?? {};
|
|
5107
5153
|
const dynamicTag = useDynamicTag(name);
|
|
5108
5154
|
if (!dynamicTag) {
|
|
@@ -5125,9 +5171,9 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5125
5171
|
};
|
|
5126
5172
|
|
|
5127
5173
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5128
|
-
import { Fragment as
|
|
5174
|
+
import { Fragment as Fragment12, useState as useState13 } from "react";
|
|
5129
5175
|
import * as React92 from "react";
|
|
5130
|
-
import { useBoundProp as
|
|
5176
|
+
import { useBoundProp as useBoundProp8 } from "@elementor/editor-controls";
|
|
5131
5177
|
import { PopoverHeader as PopoverHeader2, PopoverMenuList, PopoverSearch } from "@elementor/editor-ui";
|
|
5132
5178
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
5133
5179
|
import { Divider as Divider7, Link as Link2, Stack as Stack16, Typography as Typography5, useTheme as useTheme3 } from "@elementor/ui";
|
|
@@ -5137,8 +5183,8 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5137
5183
|
const [searchValue, setSearchValue] = useState13("");
|
|
5138
5184
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5139
5185
|
const theme = useTheme3();
|
|
5140
|
-
const { value: anyValue } =
|
|
5141
|
-
const { bind, value: dynamicValue, setValue } =
|
|
5186
|
+
const { value: anyValue } = useBoundProp8();
|
|
5187
|
+
const { bind, value: dynamicValue, setValue } = useBoundProp8(dynamicPropTypeUtil);
|
|
5142
5188
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
5143
5189
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
5144
5190
|
const options12 = useFilteredOptions(searchValue);
|
|
@@ -5173,7 +5219,7 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5173
5219
|
onClose: closePopover,
|
|
5174
5220
|
icon: /* @__PURE__ */ React92.createElement(DatabaseIcon2, { fontSize: SIZE6 })
|
|
5175
5221
|
}
|
|
5176
|
-
), hasNoDynamicTags ? /* @__PURE__ */ React92.createElement(NoDynamicTags, null) : /* @__PURE__ */ React92.createElement(
|
|
5222
|
+
), hasNoDynamicTags ? /* @__PURE__ */ React92.createElement(NoDynamicTags, null) : /* @__PURE__ */ React92.createElement(Fragment12, null, /* @__PURE__ */ React92.createElement(
|
|
5177
5223
|
PopoverSearch,
|
|
5178
5224
|
{
|
|
5179
5225
|
value: searchValue,
|
|
@@ -5241,8 +5287,8 @@ var useFilteredOptions = (searchValue) => {
|
|
|
5241
5287
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5242
5288
|
var SIZE7 = "tiny";
|
|
5243
5289
|
var DynamicSelectionControl = () => {
|
|
5244
|
-
const { setValue: setAnyValue } =
|
|
5245
|
-
const { bind, value } =
|
|
5290
|
+
const { setValue: setAnyValue } = useBoundProp9();
|
|
5291
|
+
const { bind, value } = useBoundProp9(dynamicPropTypeUtil);
|
|
5246
5292
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
5247
5293
|
const selectionPopoverState = usePopupState3({ variant: "popover" });
|
|
5248
5294
|
const { name: tagName = "" } = value;
|
|
@@ -5395,11 +5441,11 @@ function getDynamicValue(name, settings) {
|
|
|
5395
5441
|
|
|
5396
5442
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
5397
5443
|
import * as React94 from "react";
|
|
5398
|
-
import { useBoundProp as
|
|
5444
|
+
import { useBoundProp as useBoundProp10 } from "@elementor/editor-controls";
|
|
5399
5445
|
import { DatabaseIcon as DatabaseIcon4 } from "@elementor/icons";
|
|
5400
5446
|
import { __ as __64 } from "@wordpress/i18n";
|
|
5401
5447
|
var usePropDynamicAction = () => {
|
|
5402
|
-
const { propType } =
|
|
5448
|
+
const { propType } = useBoundProp10();
|
|
5403
5449
|
const visible = !!propType && supportsDynamic(propType);
|
|
5404
5450
|
return {
|
|
5405
5451
|
visible,
|
|
@@ -5435,7 +5481,7 @@ var init = () => {
|
|
|
5435
5481
|
};
|
|
5436
5482
|
|
|
5437
5483
|
// src/reset-style-props.tsx
|
|
5438
|
-
import { useBoundProp as
|
|
5484
|
+
import { useBoundProp as useBoundProp11 } from "@elementor/editor-controls";
|
|
5439
5485
|
import { BrushBigIcon } from "@elementor/icons";
|
|
5440
5486
|
import { __ as __65 } from "@wordpress/i18n";
|
|
5441
5487
|
var { registerAction } = controlActionsMenu;
|
|
@@ -5447,7 +5493,7 @@ function initResetStyleProps() {
|
|
|
5447
5493
|
}
|
|
5448
5494
|
function useResetStyleValueProps() {
|
|
5449
5495
|
const isStyle = useIsStyle();
|
|
5450
|
-
const { value, setValue, path } =
|
|
5496
|
+
const { value, setValue, path } = useBoundProp11();
|
|
5451
5497
|
return {
|
|
5452
5498
|
visible: isStyle && value !== null && value !== void 0 && path.length <= 2,
|
|
5453
5499
|
title: __65("Clear", "elementor"),
|
|
@@ -5637,7 +5683,7 @@ export {
|
|
|
5637
5683
|
registerControlReplacement,
|
|
5638
5684
|
registerStyleProviderToColors,
|
|
5639
5685
|
stylesInheritanceTransformersRegistry,
|
|
5640
|
-
|
|
5686
|
+
useBoundProp12 as useBoundProp,
|
|
5641
5687
|
useCustomCss,
|
|
5642
5688
|
useFontFamilies,
|
|
5643
5689
|
usePanelActions,
|