@elementor/editor-editing-panel 4.4.0-1087 → 4.4.0-1089
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 +116 -80
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +80 -41
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/controls-registry/settings-field.tsx +41 -3
- package/src/utils/is-responsive-prop-type.ts +19 -0
package/dist/index.mjs
CHANGED
|
@@ -2553,12 +2553,33 @@ var getStyleByLayout = (layout) => {
|
|
|
2553
2553
|
// src/controls-registry/settings-field.tsx
|
|
2554
2554
|
import * as React23 from "react";
|
|
2555
2555
|
import { useMemo as useMemo7 } from "react";
|
|
2556
|
-
import { PropKeyProvider, PropProvider } from "@elementor/editor-controls";
|
|
2556
|
+
import { PropKeyProvider, PropProvider, useBoundProp } from "@elementor/editor-controls";
|
|
2557
2557
|
import { setDocumentModifiedStatus as setDocumentModifiedStatus2 } from "@elementor/editor-documents";
|
|
2558
2558
|
import { getElementLabel as getElementLabel3, getElementSettings, updateElementSettings as updateElementSettings3 } from "@elementor/editor-elements";
|
|
2559
|
+
import {
|
|
2560
|
+
responsiveFallbackChain,
|
|
2561
|
+
responsivePropTypeUtil
|
|
2562
|
+
} from "@elementor/editor-props";
|
|
2563
|
+
import { useActiveBreakpoint, useBreakpoints } from "@elementor/editor-responsive";
|
|
2559
2564
|
import { undoable as undoable4 } from "@elementor/editor-v1-adapters";
|
|
2560
2565
|
import { __ as __10 } from "@wordpress/i18n";
|
|
2561
2566
|
|
|
2567
|
+
// src/utils/is-responsive-prop-type.ts
|
|
2568
|
+
function isResponsivePropType(propType) {
|
|
2569
|
+
if (!propType) {
|
|
2570
|
+
return false;
|
|
2571
|
+
}
|
|
2572
|
+
if ("key" in propType && propType.key === "responsive") {
|
|
2573
|
+
return true;
|
|
2574
|
+
}
|
|
2575
|
+
if (propType.kind === "union") {
|
|
2576
|
+
return Object.values(propType.prop_types).some(
|
|
2577
|
+
(inner) => isResponsivePropType(inner)
|
|
2578
|
+
);
|
|
2579
|
+
}
|
|
2580
|
+
return false;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2562
2583
|
// src/controls-registry/create-top-level-object-type.ts
|
|
2563
2584
|
var createTopLevelObjectType = ({ schema }) => {
|
|
2564
2585
|
const schemaPropType = {
|
|
@@ -2574,6 +2595,7 @@ var createTopLevelObjectType = ({ schema }) => {
|
|
|
2574
2595
|
|
|
2575
2596
|
// src/controls-registry/settings-field.tsx
|
|
2576
2597
|
var HISTORY_DEBOUNCE_WAIT2 = 800;
|
|
2598
|
+
var DESKTOP_BREAKPOINT = "desktop";
|
|
2577
2599
|
var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
2578
2600
|
const {
|
|
2579
2601
|
element: { id: elementId },
|
|
@@ -2601,7 +2623,24 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
2601
2623
|
updateElementSettings3({ id: elementId, props: settings, withHistory: false });
|
|
2602
2624
|
}
|
|
2603
2625
|
};
|
|
2604
|
-
return /* @__PURE__ */ React23.createElement(PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React23.createElement(PropKeyProvider, { bind }, children));
|
|
2626
|
+
return /* @__PURE__ */ React23.createElement(PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React23.createElement(PropKeyProvider, { bind }, isResponsivePropType(propsSchema[bind]) ? /* @__PURE__ */ React23.createElement(ResponsiveBinding, null, children) : children));
|
|
2627
|
+
};
|
|
2628
|
+
var ResponsiveBinding = ({ children }) => {
|
|
2629
|
+
const { value, setValue, propType, disabled } = useBoundProp(responsivePropTypeUtil);
|
|
2630
|
+
const breakpoint = useActiveBreakpoint() ?? DESKTOP_BREAKPOINT;
|
|
2631
|
+
const activeBreakpoints = (useBreakpoints() ?? []).map(({ id }) => id);
|
|
2632
|
+
const inherited = responsiveFallbackChain(breakpoint).filter((key) => key !== breakpoint && activeBreakpoints.includes(key)).map((key) => value?.[key]).find((entry) => entry !== null && entry !== void 0);
|
|
2633
|
+
return /* @__PURE__ */ React23.createElement(
|
|
2634
|
+
PropProvider,
|
|
2635
|
+
{
|
|
2636
|
+
propType,
|
|
2637
|
+
value,
|
|
2638
|
+
setValue,
|
|
2639
|
+
placeholder: { [breakpoint]: inherited },
|
|
2640
|
+
isDisabled: () => disabled
|
|
2641
|
+
},
|
|
2642
|
+
/* @__PURE__ */ React23.createElement(PropKeyProvider, { bind: breakpoint }, children)
|
|
2643
|
+
);
|
|
2605
2644
|
};
|
|
2606
2645
|
function useUndoableUpdateElementProp({
|
|
2607
2646
|
elementId,
|
|
@@ -2760,7 +2799,7 @@ function isControlHiddenByDependencies(control, propsSchema, settings) {
|
|
|
2760
2799
|
import * as React90 from "react";
|
|
2761
2800
|
import { useState as useState9 } from "react";
|
|
2762
2801
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
2763
|
-
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
2802
|
+
import { useActiveBreakpoint as useActiveBreakpoint2 } from "@elementor/editor-responsive";
|
|
2764
2803
|
import { createLocation as createLocation4 } from "@elementor/locations";
|
|
2765
2804
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
2766
2805
|
import { Box as Box7, Divider as Divider5, Stack as Stack13 } from "@elementor/ui";
|
|
@@ -3145,10 +3184,10 @@ function useStylesField(propName, meta) {
|
|
|
3145
3184
|
|
|
3146
3185
|
// src/controls-registry/conditional-field.tsx
|
|
3147
3186
|
import { useEffect as useEffect4, useRef as useRef4 } from "react";
|
|
3148
|
-
import { useBoundProp } from "@elementor/editor-controls";
|
|
3187
|
+
import { useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
3149
3188
|
import { isDependency as isDependency2, isDependencyMet as isDependencyMet2 } from "@elementor/editor-props";
|
|
3150
3189
|
var ConditionalField = ({ children }) => {
|
|
3151
|
-
const { propType, value, resetValue } =
|
|
3190
|
+
const { propType, value, resetValue } = useBoundProp2();
|
|
3152
3191
|
const depList = getDependencies(propType);
|
|
3153
3192
|
const { values: depValues, setValues: setDepValues } = useStylesFields(depList);
|
|
3154
3193
|
const inheritedValues = useInheritedValues(depList);
|
|
@@ -4108,7 +4147,7 @@ import { useEffect as useEffect5, useMemo as useMemo9, useState as useState7 } f
|
|
|
4108
4147
|
import {
|
|
4109
4148
|
ControlToggleButtonGroup,
|
|
4110
4149
|
NumberControl as NumberControl2,
|
|
4111
|
-
useBoundProp as
|
|
4150
|
+
useBoundProp as useBoundProp3
|
|
4112
4151
|
} from "@elementor/editor-controls";
|
|
4113
4152
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
4114
4153
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
@@ -4154,7 +4193,7 @@ function FlexOrderFieldContent() {
|
|
|
4154
4193
|
} = useStylesField("order", {
|
|
4155
4194
|
history: { propDisplayName: ORDER_LABEL }
|
|
4156
4195
|
});
|
|
4157
|
-
const { placeholder } =
|
|
4196
|
+
const { placeholder } = useBoundProp3();
|
|
4158
4197
|
const placeholderValue = placeholder;
|
|
4159
4198
|
const currentGroup = useMemo9(() => getGroupControlValue(order?.value ?? null), [order]);
|
|
4160
4199
|
const [activeGroup, setActiveGroup] = useState7(currentGroup);
|
|
@@ -4231,7 +4270,7 @@ import {
|
|
|
4231
4270
|
PropKeyProvider as PropKeyProvider3,
|
|
4232
4271
|
PropProvider as PropProvider3,
|
|
4233
4272
|
SizeControl as SizeControl3,
|
|
4234
|
-
useBoundProp as
|
|
4273
|
+
useBoundProp as useBoundProp4
|
|
4235
4274
|
} from "@elementor/editor-controls";
|
|
4236
4275
|
import { flexPropTypeUtil, numberPropTypeUtil as numberPropTypeUtil2, sizePropTypeUtil as sizePropTypeUtil3 } from "@elementor/editor-props";
|
|
4237
4276
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
@@ -4265,7 +4304,7 @@ var FlexSizeFieldContent = () => {
|
|
|
4265
4304
|
const { value, setValue, canEdit } = useStylesField("flex", {
|
|
4266
4305
|
history: { propDisplayName: FLEX_SIZE_LABEL }
|
|
4267
4306
|
});
|
|
4268
|
-
const { placeholder } =
|
|
4307
|
+
const { placeholder } = useBoundProp4();
|
|
4269
4308
|
const flexValues = extractFlexValues(value);
|
|
4270
4309
|
const currentGroup = useMemo10(() => getActiveGroup(flexValues), [flexValues]);
|
|
4271
4310
|
const [activeGroup, setActiveGroup] = useState8(currentGroup);
|
|
@@ -4339,7 +4378,7 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
4339
4378
|
};
|
|
4340
4379
|
var FlexCustomField = () => {
|
|
4341
4380
|
const flexBasisRowRef = useRef7(null);
|
|
4342
|
-
const context =
|
|
4381
|
+
const context = useBoundProp4(flexPropTypeUtil);
|
|
4343
4382
|
return /* @__PURE__ */ React51.createElement(PropProvider3, { ...context }, /* @__PURE__ */ React51.createElement(React51.Fragment, null, /* @__PURE__ */ React51.createElement(StylesFieldLayout, { label: __28("Grow", "elementor") }, /* @__PURE__ */ React51.createElement(PropKeyProvider3, { bind: "flexGrow" }, /* @__PURE__ */ React51.createElement(NumberControl3, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React51.createElement(StylesFieldLayout, { label: __28("Shrink", "elementor") }, /* @__PURE__ */ React51.createElement(PropKeyProvider3, { bind: "flexShrink" }, /* @__PURE__ */ React51.createElement(NumberControl3, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React51.createElement(StylesFieldLayout, { label: __28("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React51.createElement(PropKeyProvider3, { bind: "flexBasis" }, /* @__PURE__ */ React51.createElement(SizeControl3, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
4344
4383
|
};
|
|
4345
4384
|
var getActiveGroup = ({
|
|
@@ -4374,7 +4413,7 @@ var GapControlField = () => {
|
|
|
4374
4413
|
|
|
4375
4414
|
// src/components/style-sections/layout-section/grid-auto-flow-field.tsx
|
|
4376
4415
|
import * as React53 from "react";
|
|
4377
|
-
import { ControlToggleButtonGroup as ControlToggleButtonGroup3, useBoundProp as
|
|
4416
|
+
import { ControlToggleButtonGroup as ControlToggleButtonGroup3, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
4378
4417
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon3, ArrowRightIcon as ArrowRightIcon2, LayoutDashboardIcon } from "@elementor/icons";
|
|
4379
4418
|
import { Grid as Grid3, ToggleButton, Tooltip as Tooltip3, withDirection as withDirection7 } from "@elementor/ui";
|
|
4380
4419
|
import { __ as __30 } from "@wordpress/i18n";
|
|
@@ -4410,7 +4449,7 @@ var GridAutoFlowFieldContent = () => {
|
|
|
4410
4449
|
const { value, setValue, canEdit } = useStylesField("grid-auto-flow", {
|
|
4411
4450
|
history: { propDisplayName: AUTO_FLOW_LABEL }
|
|
4412
4451
|
});
|
|
4413
|
-
const { placeholder } =
|
|
4452
|
+
const { placeholder } = useBoundProp5();
|
|
4414
4453
|
const { direction, dense } = parseAutoFlow(value?.value ?? null);
|
|
4415
4454
|
const directionPlaceholder = parseAutoFlow(placeholder?.value ?? null).direction;
|
|
4416
4455
|
const handleDirectionChange = (newDirection) => {
|
|
@@ -4567,7 +4606,7 @@ var GridOutlineField = () => {
|
|
|
4567
4606
|
// src/components/style-sections/layout-section/grid-size-field.tsx
|
|
4568
4607
|
import * as React57 from "react";
|
|
4569
4608
|
import { useRef as useRef9 } from "react";
|
|
4570
|
-
import { ControlActions, createControl, SizeComponent, useBoundProp as
|
|
4609
|
+
import { ControlActions, createControl, SizeComponent, useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
4571
4610
|
import { Grid as Grid4 } from "@elementor/ui";
|
|
4572
4611
|
import { __ as __34 } from "@wordpress/i18n";
|
|
4573
4612
|
|
|
@@ -4686,7 +4725,7 @@ var GridTrackFieldContent = ({ cssProp, label }) => {
|
|
|
4686
4725
|
const { value, setValue } = useStylesField(cssProp, {
|
|
4687
4726
|
history: { propDisplayName: label }
|
|
4688
4727
|
});
|
|
4689
|
-
const { placeholder: inheritedPlaceholder } =
|
|
4728
|
+
const { placeholder: inheritedPlaceholder } = useBoundProp6();
|
|
4690
4729
|
const anchorRef = useRef9(null);
|
|
4691
4730
|
const local = parseValue(value);
|
|
4692
4731
|
const inherited = parseValue(inheritedPlaceholder);
|
|
@@ -5681,7 +5720,7 @@ var StyleTab = () => {
|
|
|
5681
5720
|
const currentClassesProp = useCurrentClassesProp();
|
|
5682
5721
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp ?? "");
|
|
5683
5722
|
const [activeStyleState, setActiveStyleState] = useState9(null);
|
|
5684
|
-
const breakpoint =
|
|
5723
|
+
const breakpoint = useActiveBreakpoint2();
|
|
5685
5724
|
if (!currentClassesProp) {
|
|
5686
5725
|
return null;
|
|
5687
5726
|
}
|
|
@@ -6558,7 +6597,7 @@ import * as React97 from "react";
|
|
|
6558
6597
|
import {
|
|
6559
6598
|
ControlFormLabel as ControlFormLabel5,
|
|
6560
6599
|
Repeater as Repeater3,
|
|
6561
|
-
useBoundProp as
|
|
6600
|
+
useBoundProp as useBoundProp8
|
|
6562
6601
|
} from "@elementor/editor-controls";
|
|
6563
6602
|
import {
|
|
6564
6603
|
updateElementEditorSettings as updateElementEditorSettings4,
|
|
@@ -6584,7 +6623,7 @@ var getElementByType = (elementId, type) => {
|
|
|
6584
6623
|
};
|
|
6585
6624
|
|
|
6586
6625
|
// src/controls-registry/element-controls/tabs-control/use-actions.ts
|
|
6587
|
-
import { useBoundProp as
|
|
6626
|
+
import { useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
6588
6627
|
import {
|
|
6589
6628
|
createElements as createElements3,
|
|
6590
6629
|
duplicateElements as duplicateElements3,
|
|
@@ -6597,7 +6636,7 @@ import { __ as __74 } from "@wordpress/i18n";
|
|
|
6597
6636
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
6598
6637
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
6599
6638
|
var useActions2 = () => {
|
|
6600
|
-
const { value, setValue: setDefaultActiveTab } =
|
|
6639
|
+
const { value, setValue: setDefaultActiveTab } = useBoundProp7(numberPropTypeUtil3);
|
|
6601
6640
|
const defaultActiveTab = value ?? 0;
|
|
6602
6641
|
const duplicateItem2 = ({
|
|
6603
6642
|
items: items3,
|
|
@@ -6858,7 +6897,7 @@ var ItemLabel3 = ({ value, index }) => {
|
|
|
6858
6897
|
return /* @__PURE__ */ React97.createElement(Stack17, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React97.createElement("span", null, elementTitle), /* @__PURE__ */ React97.createElement(ItemDefaultTab, { index }));
|
|
6859
6898
|
};
|
|
6860
6899
|
var ItemDefaultTab = ({ index }) => {
|
|
6861
|
-
const { value: defaultItem } =
|
|
6900
|
+
const { value: defaultItem } = useBoundProp8(numberPropTypeUtil4);
|
|
6862
6901
|
const isDefault = defaultItem === index;
|
|
6863
6902
|
if (!isDefault) {
|
|
6864
6903
|
return null;
|
|
@@ -6872,7 +6911,7 @@ var ItemContent3 = ({ value, index }) => {
|
|
|
6872
6911
|
return /* @__PURE__ */ React97.createElement(Stack17, { p: 2, gap: 1.5 }, /* @__PURE__ */ React97.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React97.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __75("Tabs", "elementor") }, /* @__PURE__ */ React97.createElement(DefaultTabControl, { tabIndex: index })));
|
|
6873
6912
|
};
|
|
6874
6913
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
6875
|
-
const { value, setValue } =
|
|
6914
|
+
const { value, setValue } = useBoundProp8(numberPropTypeUtil4);
|
|
6876
6915
|
const isDefault = value === tabIndex;
|
|
6877
6916
|
return /* @__PURE__ */ React97.createElement(Stack17, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React97.createElement(ControlFormLabel5, null, __75("Set as default tab", "elementor")), /* @__PURE__ */ React97.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React97.createElement(
|
|
6878
6917
|
Switch2,
|
|
@@ -6957,7 +6996,7 @@ import { controlActionsMenu as controlActionsMenu2 } from "@elementor/menus";
|
|
|
6957
6996
|
|
|
6958
6997
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
6959
6998
|
import * as React98 from "react";
|
|
6960
|
-
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as
|
|
6999
|
+
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as useBoundProp10 } from "@elementor/editor-controls";
|
|
6961
7000
|
import {
|
|
6962
7001
|
backgroundImageOverlayPropTypeUtil
|
|
6963
7002
|
} from "@elementor/editor-props";
|
|
@@ -6968,7 +7007,7 @@ import { useMemo as useMemo12 } from "react";
|
|
|
6968
7007
|
|
|
6969
7008
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
6970
7009
|
import { useMemo as useMemo11 } from "react";
|
|
6971
|
-
import { useBoundProp as
|
|
7010
|
+
import { useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
6972
7011
|
|
|
6973
7012
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
6974
7013
|
import { getElementorConfig } from "@elementor/editor-v1-adapters";
|
|
@@ -7055,7 +7094,7 @@ var useAllPropDynamicTags = () => {
|
|
|
7055
7094
|
};
|
|
7056
7095
|
var usePropDynamicTagsInternal = (filterByLicense2) => {
|
|
7057
7096
|
let categories = [];
|
|
7058
|
-
const { propType } =
|
|
7097
|
+
const { propType } = useBoundProp9();
|
|
7059
7098
|
if (propType) {
|
|
7060
7099
|
const propDynamicType = getDynamicPropType(propType);
|
|
7061
7100
|
categories = propDynamicType?.settings.categories || [];
|
|
@@ -7101,11 +7140,11 @@ var useDynamicTag = (tagName) => {
|
|
|
7101
7140
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
7102
7141
|
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React98.createElement(DatabaseIcon, { fontSize: "tiny" });
|
|
7103
7142
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
7104
|
-
const context =
|
|
7143
|
+
const context = useBoundProp10(backgroundImageOverlayPropTypeUtil);
|
|
7105
7144
|
return /* @__PURE__ */ React98.createElement(PropProvider4, { ...context, value: value.value }, /* @__PURE__ */ React98.createElement(PropKeyProvider4, { bind: "image" }, /* @__PURE__ */ React98.createElement(Wrapper2, { rawValue: value.value })));
|
|
7106
7145
|
};
|
|
7107
7146
|
var Wrapper2 = ({ rawValue }) => {
|
|
7108
|
-
const { propType } =
|
|
7147
|
+
const { propType } = useBoundProp10();
|
|
7109
7148
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
7110
7149
|
return /* @__PURE__ */ React98.createElement(PropProvider4, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React98.createElement(PropKeyProvider4, { bind: "src" }, /* @__PURE__ */ React98.createElement(Content, { rawValue: rawValue.image })));
|
|
7111
7150
|
};
|
|
@@ -7121,7 +7160,7 @@ import {
|
|
|
7121
7160
|
ControlFormLabel as ControlFormLabel6,
|
|
7122
7161
|
PropKeyProvider as PropKeyProvider6,
|
|
7123
7162
|
PropProvider as PropProvider6,
|
|
7124
|
-
useBoundProp as
|
|
7163
|
+
useBoundProp as useBoundProp13
|
|
7125
7164
|
} from "@elementor/editor-controls";
|
|
7126
7165
|
import { PopoverHeader as PopoverHeader2, SectionPopoverBody as SectionPopoverBody2 } from "@elementor/editor-ui";
|
|
7127
7166
|
import { DatabaseIcon as DatabaseIcon3, SettingsIcon, XIcon } from "@elementor/icons";
|
|
@@ -7153,7 +7192,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
7153
7192
|
|
|
7154
7193
|
// src/dynamics/dynamic-control.tsx
|
|
7155
7194
|
import * as React100 from "react";
|
|
7156
|
-
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as
|
|
7195
|
+
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as useBoundProp11 } from "@elementor/editor-controls";
|
|
7157
7196
|
|
|
7158
7197
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
7159
7198
|
import * as React99 from "react";
|
|
@@ -7206,7 +7245,7 @@ var DynamicConditionalControl = ({
|
|
|
7206
7245
|
|
|
7207
7246
|
// src/dynamics/dynamic-control.tsx
|
|
7208
7247
|
var DynamicControl = ({ bind, children }) => {
|
|
7209
|
-
const { value, setValue } =
|
|
7248
|
+
const { value, setValue } = useBoundProp11(dynamicPropTypeUtil);
|
|
7210
7249
|
const { name = "", group = "", settings } = value ?? {};
|
|
7211
7250
|
const dynamicTag = useDynamicTag(name);
|
|
7212
7251
|
if (!dynamicTag) {
|
|
@@ -7240,7 +7279,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
7240
7279
|
// src/dynamics/components/dynamic-selection.tsx
|
|
7241
7280
|
import * as React101 from "react";
|
|
7242
7281
|
import { Fragment as Fragment16, useEffect as useEffect11, useState as useState10 } from "react";
|
|
7243
|
-
import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as
|
|
7282
|
+
import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as useBoundProp12 } from "@elementor/editor-controls";
|
|
7244
7283
|
import { CtaButton, PopoverHeader, PopoverMenuList, SearchField, SectionPopoverBody } from "@elementor/editor-ui";
|
|
7245
7284
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
7246
7285
|
import { Divider as Divider7, Link as Link2, Stack as Stack18, Typography as Typography6, useTheme as useTheme3 } from "@elementor/ui";
|
|
@@ -7253,8 +7292,8 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
7253
7292
|
const [searchValue, setSearchValue] = useState10("");
|
|
7254
7293
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
7255
7294
|
const theme = useTheme3();
|
|
7256
|
-
const { value: anyValue } =
|
|
7257
|
-
const { bind, value: dynamicValue, setValue } =
|
|
7295
|
+
const { value: anyValue } = useBoundProp12();
|
|
7296
|
+
const { bind, value: dynamicValue, setValue } = useBoundProp12(dynamicPropTypeUtil);
|
|
7258
7297
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
7259
7298
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
7260
7299
|
const options13 = useFilteredOptions(searchValue);
|
|
@@ -7406,8 +7445,8 @@ var useFilteredOptions = (searchValue) => {
|
|
|
7406
7445
|
var SIZE3 = "tiny";
|
|
7407
7446
|
var tagsWithoutTabs = ["popup"];
|
|
7408
7447
|
var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
7409
|
-
const { setValue: setAnyValue, propType } =
|
|
7410
|
-
const { bind, value } =
|
|
7448
|
+
const { setValue: setAnyValue, propType } = useBoundProp13();
|
|
7449
|
+
const { bind, value } = useBoundProp13(dynamicPropTypeUtil);
|
|
7411
7450
|
const { expired: readonly } = useLicenseConfig();
|
|
7412
7451
|
const originalPropType = createTopLevelObjectType({
|
|
7413
7452
|
schema: {
|
|
@@ -7630,11 +7669,11 @@ function getDynamicValue(name, settings, renderPostId) {
|
|
|
7630
7669
|
|
|
7631
7670
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
7632
7671
|
import * as React103 from "react";
|
|
7633
|
-
import { useBoundProp as
|
|
7672
|
+
import { useBoundProp as useBoundProp14 } from "@elementor/editor-controls";
|
|
7634
7673
|
import { DatabaseIcon as DatabaseIcon4 } from "@elementor/icons";
|
|
7635
7674
|
import { __ as __78 } from "@wordpress/i18n";
|
|
7636
7675
|
var usePropDynamicAction = () => {
|
|
7637
|
-
const { propType } =
|
|
7676
|
+
const { propType } = useBoundProp14();
|
|
7638
7677
|
const visible = !!propType && supportsDynamic(propType);
|
|
7639
7678
|
return {
|
|
7640
7679
|
visible,
|
|
@@ -7671,7 +7710,7 @@ var init2 = () => {
|
|
|
7671
7710
|
};
|
|
7672
7711
|
|
|
7673
7712
|
// src/reset-style-props.tsx
|
|
7674
|
-
import { useBoundProp as
|
|
7713
|
+
import { useBoundProp as useBoundProp15 } from "@elementor/editor-controls";
|
|
7675
7714
|
import { hasVariable as hasVariable2 } from "@elementor/editor-variables";
|
|
7676
7715
|
import { BrushBigIcon } from "@elementor/icons";
|
|
7677
7716
|
import { controlActionsMenu as controlActionsMenu3 } from "@elementor/menus";
|
|
@@ -7731,7 +7770,7 @@ function initResetStyleProps() {
|
|
|
7731
7770
|
}
|
|
7732
7771
|
function useResetStyleValueProps() {
|
|
7733
7772
|
const isStyle = useIsStyle();
|
|
7734
|
-
const { value, resetValue, propType } =
|
|
7773
|
+
const { value, resetValue, propType } = useBoundProp15();
|
|
7735
7774
|
const hasValue = value !== null && value !== void 0;
|
|
7736
7775
|
const hasInitial = propType.initial_value !== void 0 && propType.initial_value !== null;
|
|
7737
7776
|
const isRequired = !!propType.settings?.required;
|
|
@@ -7759,7 +7798,7 @@ function useResetStyleValueProps() {
|
|
|
7759
7798
|
|
|
7760
7799
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
7761
7800
|
import * as React109 from "react";
|
|
7762
|
-
import { useBoundProp as
|
|
7801
|
+
import { useBoundProp as useBoundProp16 } from "@elementor/editor-controls";
|
|
7763
7802
|
import { isEmpty as isEmpty3 } from "@elementor/editor-props";
|
|
7764
7803
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY4 } from "@elementor/editor-styles-repository";
|
|
7765
7804
|
import { __ as __83 } from "@wordpress/i18n";
|
|
@@ -7862,7 +7901,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
7862
7901
|
|
|
7863
7902
|
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
7864
7903
|
import * as React104 from "react";
|
|
7865
|
-
import { useBreakpoints } from "@elementor/editor-responsive";
|
|
7904
|
+
import { useBreakpoints as useBreakpoints2 } from "@elementor/editor-responsive";
|
|
7866
7905
|
import {
|
|
7867
7906
|
DesktopIcon,
|
|
7868
7907
|
LaptopIcon,
|
|
@@ -7885,7 +7924,7 @@ var breakpointIconMap = {
|
|
|
7885
7924
|
mobile: MobilePortraitIcon
|
|
7886
7925
|
};
|
|
7887
7926
|
var BreakpointIcon = ({ breakpoint }) => {
|
|
7888
|
-
const breakpoints =
|
|
7927
|
+
const breakpoints = useBreakpoints2();
|
|
7889
7928
|
const currentBreakpoint = breakpoint || DEFAULT_BREAKPOINT3;
|
|
7890
7929
|
const IconComponent = breakpointIconMap[currentBreakpoint];
|
|
7891
7930
|
if (!IconComponent) {
|
|
@@ -8125,7 +8164,7 @@ function TooltipOrInfotip({
|
|
|
8125
8164
|
var StylesInheritanceIndicator = ({
|
|
8126
8165
|
customContext
|
|
8127
8166
|
}) => {
|
|
8128
|
-
const context =
|
|
8167
|
+
const context = useBoundProp16();
|
|
8129
8168
|
const { path, propType } = customContext || context;
|
|
8130
8169
|
const inheritanceChain = useStylesInheritanceChain(path);
|
|
8131
8170
|
if (!path || !inheritanceChain.length) {
|