@elementor/editor-editing-panel 4.4.0-1086 → 4.4.0-1088
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 +34 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +118 -81
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +83 -42
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/controls-registry/controls-registry.tsx +2 -0
- package/src/controls-registry/settings-field.tsx +41 -3
- package/src/utils/is-responsive-prop-type.ts +19 -0
package/dist/index.mjs
CHANGED
|
@@ -2394,6 +2394,7 @@ import {
|
|
|
2394
2394
|
InlineEditingControl,
|
|
2395
2395
|
KeyValueControl,
|
|
2396
2396
|
LinkControl,
|
|
2397
|
+
NoticeControl,
|
|
2397
2398
|
NumberControl,
|
|
2398
2399
|
QueryChipsControl,
|
|
2399
2400
|
QueryControl,
|
|
@@ -2468,7 +2469,8 @@ var controlTypes = {
|
|
|
2468
2469
|
layout: "custom",
|
|
2469
2470
|
propTypeUtil: timeRangePropTypeUtil
|
|
2470
2471
|
},
|
|
2471
|
-
"attachment-type": { component: AttachmentTypeControl, layout: "custom", propTypeUtil: stringPropTypeUtil2 }
|
|
2472
|
+
"attachment-type": { component: AttachmentTypeControl, layout: "custom", propTypeUtil: stringPropTypeUtil2 },
|
|
2473
|
+
notice: { component: NoticeControl, layout: "full", propTypeUtil: stringPropTypeUtil2 }
|
|
2472
2474
|
};
|
|
2473
2475
|
var ControlsRegistry = class {
|
|
2474
2476
|
constructor(controlsRegistry2) {
|
|
@@ -2551,12 +2553,33 @@ var getStyleByLayout = (layout) => {
|
|
|
2551
2553
|
// src/controls-registry/settings-field.tsx
|
|
2552
2554
|
import * as React23 from "react";
|
|
2553
2555
|
import { useMemo as useMemo7 } from "react";
|
|
2554
|
-
import { PropKeyProvider, PropProvider } from "@elementor/editor-controls";
|
|
2556
|
+
import { PropKeyProvider, PropProvider, useBoundProp } from "@elementor/editor-controls";
|
|
2555
2557
|
import { setDocumentModifiedStatus as setDocumentModifiedStatus2 } from "@elementor/editor-documents";
|
|
2556
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";
|
|
2557
2564
|
import { undoable as undoable4 } from "@elementor/editor-v1-adapters";
|
|
2558
2565
|
import { __ as __10 } from "@wordpress/i18n";
|
|
2559
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
|
+
|
|
2560
2583
|
// src/controls-registry/create-top-level-object-type.ts
|
|
2561
2584
|
var createTopLevelObjectType = ({ schema }) => {
|
|
2562
2585
|
const schemaPropType = {
|
|
@@ -2572,6 +2595,7 @@ var createTopLevelObjectType = ({ schema }) => {
|
|
|
2572
2595
|
|
|
2573
2596
|
// src/controls-registry/settings-field.tsx
|
|
2574
2597
|
var HISTORY_DEBOUNCE_WAIT2 = 800;
|
|
2598
|
+
var DESKTOP_BREAKPOINT = "desktop";
|
|
2575
2599
|
var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
2576
2600
|
const {
|
|
2577
2601
|
element: { id: elementId },
|
|
@@ -2599,7 +2623,24 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
2599
2623
|
updateElementSettings3({ id: elementId, props: settings, withHistory: false });
|
|
2600
2624
|
}
|
|
2601
2625
|
};
|
|
2602
|
-
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
|
+
);
|
|
2603
2644
|
};
|
|
2604
2645
|
function useUndoableUpdateElementProp({
|
|
2605
2646
|
elementId,
|
|
@@ -2758,7 +2799,7 @@ function isControlHiddenByDependencies(control, propsSchema, settings) {
|
|
|
2758
2799
|
import * as React90 from "react";
|
|
2759
2800
|
import { useState as useState9 } from "react";
|
|
2760
2801
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
2761
|
-
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
2802
|
+
import { useActiveBreakpoint as useActiveBreakpoint2 } from "@elementor/editor-responsive";
|
|
2762
2803
|
import { createLocation as createLocation4 } from "@elementor/locations";
|
|
2763
2804
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
2764
2805
|
import { Box as Box7, Divider as Divider5, Stack as Stack13 } from "@elementor/ui";
|
|
@@ -3143,10 +3184,10 @@ function useStylesField(propName, meta) {
|
|
|
3143
3184
|
|
|
3144
3185
|
// src/controls-registry/conditional-field.tsx
|
|
3145
3186
|
import { useEffect as useEffect4, useRef as useRef4 } from "react";
|
|
3146
|
-
import { useBoundProp } from "@elementor/editor-controls";
|
|
3187
|
+
import { useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
3147
3188
|
import { isDependency as isDependency2, isDependencyMet as isDependencyMet2 } from "@elementor/editor-props";
|
|
3148
3189
|
var ConditionalField = ({ children }) => {
|
|
3149
|
-
const { propType, value, resetValue } =
|
|
3190
|
+
const { propType, value, resetValue } = useBoundProp2();
|
|
3150
3191
|
const depList = getDependencies(propType);
|
|
3151
3192
|
const { values: depValues, setValues: setDepValues } = useStylesFields(depList);
|
|
3152
3193
|
const inheritedValues = useInheritedValues(depList);
|
|
@@ -4106,7 +4147,7 @@ import { useEffect as useEffect5, useMemo as useMemo9, useState as useState7 } f
|
|
|
4106
4147
|
import {
|
|
4107
4148
|
ControlToggleButtonGroup,
|
|
4108
4149
|
NumberControl as NumberControl2,
|
|
4109
|
-
useBoundProp as
|
|
4150
|
+
useBoundProp as useBoundProp3
|
|
4110
4151
|
} from "@elementor/editor-controls";
|
|
4111
4152
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
4112
4153
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
@@ -4152,7 +4193,7 @@ function FlexOrderFieldContent() {
|
|
|
4152
4193
|
} = useStylesField("order", {
|
|
4153
4194
|
history: { propDisplayName: ORDER_LABEL }
|
|
4154
4195
|
});
|
|
4155
|
-
const { placeholder } =
|
|
4196
|
+
const { placeholder } = useBoundProp3();
|
|
4156
4197
|
const placeholderValue = placeholder;
|
|
4157
4198
|
const currentGroup = useMemo9(() => getGroupControlValue(order?.value ?? null), [order]);
|
|
4158
4199
|
const [activeGroup, setActiveGroup] = useState7(currentGroup);
|
|
@@ -4229,7 +4270,7 @@ import {
|
|
|
4229
4270
|
PropKeyProvider as PropKeyProvider3,
|
|
4230
4271
|
PropProvider as PropProvider3,
|
|
4231
4272
|
SizeControl as SizeControl3,
|
|
4232
|
-
useBoundProp as
|
|
4273
|
+
useBoundProp as useBoundProp4
|
|
4233
4274
|
} from "@elementor/editor-controls";
|
|
4234
4275
|
import { flexPropTypeUtil, numberPropTypeUtil as numberPropTypeUtil2, sizePropTypeUtil as sizePropTypeUtil3 } from "@elementor/editor-props";
|
|
4235
4276
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
@@ -4263,7 +4304,7 @@ var FlexSizeFieldContent = () => {
|
|
|
4263
4304
|
const { value, setValue, canEdit } = useStylesField("flex", {
|
|
4264
4305
|
history: { propDisplayName: FLEX_SIZE_LABEL }
|
|
4265
4306
|
});
|
|
4266
|
-
const { placeholder } =
|
|
4307
|
+
const { placeholder } = useBoundProp4();
|
|
4267
4308
|
const flexValues = extractFlexValues(value);
|
|
4268
4309
|
const currentGroup = useMemo10(() => getActiveGroup(flexValues), [flexValues]);
|
|
4269
4310
|
const [activeGroup, setActiveGroup] = useState8(currentGroup);
|
|
@@ -4337,7 +4378,7 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
4337
4378
|
};
|
|
4338
4379
|
var FlexCustomField = () => {
|
|
4339
4380
|
const flexBasisRowRef = useRef7(null);
|
|
4340
|
-
const context =
|
|
4381
|
+
const context = useBoundProp4(flexPropTypeUtil);
|
|
4341
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 })))));
|
|
4342
4383
|
};
|
|
4343
4384
|
var getActiveGroup = ({
|
|
@@ -4372,7 +4413,7 @@ var GapControlField = () => {
|
|
|
4372
4413
|
|
|
4373
4414
|
// src/components/style-sections/layout-section/grid-auto-flow-field.tsx
|
|
4374
4415
|
import * as React53 from "react";
|
|
4375
|
-
import { ControlToggleButtonGroup as ControlToggleButtonGroup3, useBoundProp as
|
|
4416
|
+
import { ControlToggleButtonGroup as ControlToggleButtonGroup3, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
4376
4417
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon3, ArrowRightIcon as ArrowRightIcon2, LayoutDashboardIcon } from "@elementor/icons";
|
|
4377
4418
|
import { Grid as Grid3, ToggleButton, Tooltip as Tooltip3, withDirection as withDirection7 } from "@elementor/ui";
|
|
4378
4419
|
import { __ as __30 } from "@wordpress/i18n";
|
|
@@ -4408,7 +4449,7 @@ var GridAutoFlowFieldContent = () => {
|
|
|
4408
4449
|
const { value, setValue, canEdit } = useStylesField("grid-auto-flow", {
|
|
4409
4450
|
history: { propDisplayName: AUTO_FLOW_LABEL }
|
|
4410
4451
|
});
|
|
4411
|
-
const { placeholder } =
|
|
4452
|
+
const { placeholder } = useBoundProp5();
|
|
4412
4453
|
const { direction, dense } = parseAutoFlow(value?.value ?? null);
|
|
4413
4454
|
const directionPlaceholder = parseAutoFlow(placeholder?.value ?? null).direction;
|
|
4414
4455
|
const handleDirectionChange = (newDirection) => {
|
|
@@ -4565,7 +4606,7 @@ var GridOutlineField = () => {
|
|
|
4565
4606
|
// src/components/style-sections/layout-section/grid-size-field.tsx
|
|
4566
4607
|
import * as React57 from "react";
|
|
4567
4608
|
import { useRef as useRef9 } from "react";
|
|
4568
|
-
import { ControlActions, createControl, SizeComponent, useBoundProp as
|
|
4609
|
+
import { ControlActions, createControl, SizeComponent, useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
4569
4610
|
import { Grid as Grid4 } from "@elementor/ui";
|
|
4570
4611
|
import { __ as __34 } from "@wordpress/i18n";
|
|
4571
4612
|
|
|
@@ -4684,7 +4725,7 @@ var GridTrackFieldContent = ({ cssProp, label }) => {
|
|
|
4684
4725
|
const { value, setValue } = useStylesField(cssProp, {
|
|
4685
4726
|
history: { propDisplayName: label }
|
|
4686
4727
|
});
|
|
4687
|
-
const { placeholder: inheritedPlaceholder } =
|
|
4728
|
+
const { placeholder: inheritedPlaceholder } = useBoundProp6();
|
|
4688
4729
|
const anchorRef = useRef9(null);
|
|
4689
4730
|
const local = parseValue(value);
|
|
4690
4731
|
const inherited = parseValue(inheritedPlaceholder);
|
|
@@ -5679,7 +5720,7 @@ var StyleTab = () => {
|
|
|
5679
5720
|
const currentClassesProp = useCurrentClassesProp();
|
|
5680
5721
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp ?? "");
|
|
5681
5722
|
const [activeStyleState, setActiveStyleState] = useState9(null);
|
|
5682
|
-
const breakpoint =
|
|
5723
|
+
const breakpoint = useActiveBreakpoint2();
|
|
5683
5724
|
if (!currentClassesProp) {
|
|
5684
5725
|
return null;
|
|
5685
5726
|
}
|
|
@@ -6556,7 +6597,7 @@ import * as React97 from "react";
|
|
|
6556
6597
|
import {
|
|
6557
6598
|
ControlFormLabel as ControlFormLabel5,
|
|
6558
6599
|
Repeater as Repeater3,
|
|
6559
|
-
useBoundProp as
|
|
6600
|
+
useBoundProp as useBoundProp8
|
|
6560
6601
|
} from "@elementor/editor-controls";
|
|
6561
6602
|
import {
|
|
6562
6603
|
updateElementEditorSettings as updateElementEditorSettings4,
|
|
@@ -6582,7 +6623,7 @@ var getElementByType = (elementId, type) => {
|
|
|
6582
6623
|
};
|
|
6583
6624
|
|
|
6584
6625
|
// src/controls-registry/element-controls/tabs-control/use-actions.ts
|
|
6585
|
-
import { useBoundProp as
|
|
6626
|
+
import { useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
6586
6627
|
import {
|
|
6587
6628
|
createElements as createElements3,
|
|
6588
6629
|
duplicateElements as duplicateElements3,
|
|
@@ -6595,7 +6636,7 @@ import { __ as __74 } from "@wordpress/i18n";
|
|
|
6595
6636
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
6596
6637
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
6597
6638
|
var useActions2 = () => {
|
|
6598
|
-
const { value, setValue: setDefaultActiveTab } =
|
|
6639
|
+
const { value, setValue: setDefaultActiveTab } = useBoundProp7(numberPropTypeUtil3);
|
|
6599
6640
|
const defaultActiveTab = value ?? 0;
|
|
6600
6641
|
const duplicateItem2 = ({
|
|
6601
6642
|
items: items3,
|
|
@@ -6856,7 +6897,7 @@ var ItemLabel3 = ({ value, index }) => {
|
|
|
6856
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 }));
|
|
6857
6898
|
};
|
|
6858
6899
|
var ItemDefaultTab = ({ index }) => {
|
|
6859
|
-
const { value: defaultItem } =
|
|
6900
|
+
const { value: defaultItem } = useBoundProp8(numberPropTypeUtil4);
|
|
6860
6901
|
const isDefault = defaultItem === index;
|
|
6861
6902
|
if (!isDefault) {
|
|
6862
6903
|
return null;
|
|
@@ -6870,7 +6911,7 @@ var ItemContent3 = ({ value, index }) => {
|
|
|
6870
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 })));
|
|
6871
6912
|
};
|
|
6872
6913
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
6873
|
-
const { value, setValue } =
|
|
6914
|
+
const { value, setValue } = useBoundProp8(numberPropTypeUtil4);
|
|
6874
6915
|
const isDefault = value === tabIndex;
|
|
6875
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(
|
|
6876
6917
|
Switch2,
|
|
@@ -6955,7 +6996,7 @@ import { controlActionsMenu as controlActionsMenu2 } from "@elementor/menus";
|
|
|
6955
6996
|
|
|
6956
6997
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
6957
6998
|
import * as React98 from "react";
|
|
6958
|
-
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as
|
|
6999
|
+
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as useBoundProp10 } from "@elementor/editor-controls";
|
|
6959
7000
|
import {
|
|
6960
7001
|
backgroundImageOverlayPropTypeUtil
|
|
6961
7002
|
} from "@elementor/editor-props";
|
|
@@ -6966,7 +7007,7 @@ import { useMemo as useMemo12 } from "react";
|
|
|
6966
7007
|
|
|
6967
7008
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
6968
7009
|
import { useMemo as useMemo11 } from "react";
|
|
6969
|
-
import { useBoundProp as
|
|
7010
|
+
import { useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
6970
7011
|
|
|
6971
7012
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
6972
7013
|
import { getElementorConfig } from "@elementor/editor-v1-adapters";
|
|
@@ -7053,7 +7094,7 @@ var useAllPropDynamicTags = () => {
|
|
|
7053
7094
|
};
|
|
7054
7095
|
var usePropDynamicTagsInternal = (filterByLicense2) => {
|
|
7055
7096
|
let categories = [];
|
|
7056
|
-
const { propType } =
|
|
7097
|
+
const { propType } = useBoundProp9();
|
|
7057
7098
|
if (propType) {
|
|
7058
7099
|
const propDynamicType = getDynamicPropType(propType);
|
|
7059
7100
|
categories = propDynamicType?.settings.categories || [];
|
|
@@ -7099,11 +7140,11 @@ var useDynamicTag = (tagName) => {
|
|
|
7099
7140
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
7100
7141
|
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React98.createElement(DatabaseIcon, { fontSize: "tiny" });
|
|
7101
7142
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
7102
|
-
const context =
|
|
7143
|
+
const context = useBoundProp10(backgroundImageOverlayPropTypeUtil);
|
|
7103
7144
|
return /* @__PURE__ */ React98.createElement(PropProvider4, { ...context, value: value.value }, /* @__PURE__ */ React98.createElement(PropKeyProvider4, { bind: "image" }, /* @__PURE__ */ React98.createElement(Wrapper2, { rawValue: value.value })));
|
|
7104
7145
|
};
|
|
7105
7146
|
var Wrapper2 = ({ rawValue }) => {
|
|
7106
|
-
const { propType } =
|
|
7147
|
+
const { propType } = useBoundProp10();
|
|
7107
7148
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
7108
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 })));
|
|
7109
7150
|
};
|
|
@@ -7119,7 +7160,7 @@ import {
|
|
|
7119
7160
|
ControlFormLabel as ControlFormLabel6,
|
|
7120
7161
|
PropKeyProvider as PropKeyProvider6,
|
|
7121
7162
|
PropProvider as PropProvider6,
|
|
7122
|
-
useBoundProp as
|
|
7163
|
+
useBoundProp as useBoundProp13
|
|
7123
7164
|
} from "@elementor/editor-controls";
|
|
7124
7165
|
import { PopoverHeader as PopoverHeader2, SectionPopoverBody as SectionPopoverBody2 } from "@elementor/editor-ui";
|
|
7125
7166
|
import { DatabaseIcon as DatabaseIcon3, SettingsIcon, XIcon } from "@elementor/icons";
|
|
@@ -7151,7 +7192,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
7151
7192
|
|
|
7152
7193
|
// src/dynamics/dynamic-control.tsx
|
|
7153
7194
|
import * as React100 from "react";
|
|
7154
|
-
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as
|
|
7195
|
+
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as useBoundProp11 } from "@elementor/editor-controls";
|
|
7155
7196
|
|
|
7156
7197
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
7157
7198
|
import * as React99 from "react";
|
|
@@ -7204,7 +7245,7 @@ var DynamicConditionalControl = ({
|
|
|
7204
7245
|
|
|
7205
7246
|
// src/dynamics/dynamic-control.tsx
|
|
7206
7247
|
var DynamicControl = ({ bind, children }) => {
|
|
7207
|
-
const { value, setValue } =
|
|
7248
|
+
const { value, setValue } = useBoundProp11(dynamicPropTypeUtil);
|
|
7208
7249
|
const { name = "", group = "", settings } = value ?? {};
|
|
7209
7250
|
const dynamicTag = useDynamicTag(name);
|
|
7210
7251
|
if (!dynamicTag) {
|
|
@@ -7238,7 +7279,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
7238
7279
|
// src/dynamics/components/dynamic-selection.tsx
|
|
7239
7280
|
import * as React101 from "react";
|
|
7240
7281
|
import { Fragment as Fragment16, useEffect as useEffect11, useState as useState10 } from "react";
|
|
7241
|
-
import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as
|
|
7282
|
+
import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as useBoundProp12 } from "@elementor/editor-controls";
|
|
7242
7283
|
import { CtaButton, PopoverHeader, PopoverMenuList, SearchField, SectionPopoverBody } from "@elementor/editor-ui";
|
|
7243
7284
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
7244
7285
|
import { Divider as Divider7, Link as Link2, Stack as Stack18, Typography as Typography6, useTheme as useTheme3 } from "@elementor/ui";
|
|
@@ -7251,8 +7292,8 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
7251
7292
|
const [searchValue, setSearchValue] = useState10("");
|
|
7252
7293
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
7253
7294
|
const theme = useTheme3();
|
|
7254
|
-
const { value: anyValue } =
|
|
7255
|
-
const { bind, value: dynamicValue, setValue } =
|
|
7295
|
+
const { value: anyValue } = useBoundProp12();
|
|
7296
|
+
const { bind, value: dynamicValue, setValue } = useBoundProp12(dynamicPropTypeUtil);
|
|
7256
7297
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
7257
7298
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
7258
7299
|
const options13 = useFilteredOptions(searchValue);
|
|
@@ -7404,8 +7445,8 @@ var useFilteredOptions = (searchValue) => {
|
|
|
7404
7445
|
var SIZE3 = "tiny";
|
|
7405
7446
|
var tagsWithoutTabs = ["popup"];
|
|
7406
7447
|
var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
7407
|
-
const { setValue: setAnyValue, propType } =
|
|
7408
|
-
const { bind, value } =
|
|
7448
|
+
const { setValue: setAnyValue, propType } = useBoundProp13();
|
|
7449
|
+
const { bind, value } = useBoundProp13(dynamicPropTypeUtil);
|
|
7409
7450
|
const { expired: readonly } = useLicenseConfig();
|
|
7410
7451
|
const originalPropType = createTopLevelObjectType({
|
|
7411
7452
|
schema: {
|
|
@@ -7628,11 +7669,11 @@ function getDynamicValue(name, settings, renderPostId) {
|
|
|
7628
7669
|
|
|
7629
7670
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
7630
7671
|
import * as React103 from "react";
|
|
7631
|
-
import { useBoundProp as
|
|
7672
|
+
import { useBoundProp as useBoundProp14 } from "@elementor/editor-controls";
|
|
7632
7673
|
import { DatabaseIcon as DatabaseIcon4 } from "@elementor/icons";
|
|
7633
7674
|
import { __ as __78 } from "@wordpress/i18n";
|
|
7634
7675
|
var usePropDynamicAction = () => {
|
|
7635
|
-
const { propType } =
|
|
7676
|
+
const { propType } = useBoundProp14();
|
|
7636
7677
|
const visible = !!propType && supportsDynamic(propType);
|
|
7637
7678
|
return {
|
|
7638
7679
|
visible,
|
|
@@ -7669,7 +7710,7 @@ var init2 = () => {
|
|
|
7669
7710
|
};
|
|
7670
7711
|
|
|
7671
7712
|
// src/reset-style-props.tsx
|
|
7672
|
-
import { useBoundProp as
|
|
7713
|
+
import { useBoundProp as useBoundProp15 } from "@elementor/editor-controls";
|
|
7673
7714
|
import { hasVariable as hasVariable2 } from "@elementor/editor-variables";
|
|
7674
7715
|
import { BrushBigIcon } from "@elementor/icons";
|
|
7675
7716
|
import { controlActionsMenu as controlActionsMenu3 } from "@elementor/menus";
|
|
@@ -7729,7 +7770,7 @@ function initResetStyleProps() {
|
|
|
7729
7770
|
}
|
|
7730
7771
|
function useResetStyleValueProps() {
|
|
7731
7772
|
const isStyle = useIsStyle();
|
|
7732
|
-
const { value, resetValue, propType } =
|
|
7773
|
+
const { value, resetValue, propType } = useBoundProp15();
|
|
7733
7774
|
const hasValue = value !== null && value !== void 0;
|
|
7734
7775
|
const hasInitial = propType.initial_value !== void 0 && propType.initial_value !== null;
|
|
7735
7776
|
const isRequired = !!propType.settings?.required;
|
|
@@ -7757,7 +7798,7 @@ function useResetStyleValueProps() {
|
|
|
7757
7798
|
|
|
7758
7799
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
7759
7800
|
import * as React109 from "react";
|
|
7760
|
-
import { useBoundProp as
|
|
7801
|
+
import { useBoundProp as useBoundProp16 } from "@elementor/editor-controls";
|
|
7761
7802
|
import { isEmpty as isEmpty3 } from "@elementor/editor-props";
|
|
7762
7803
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY4 } from "@elementor/editor-styles-repository";
|
|
7763
7804
|
import { __ as __83 } from "@wordpress/i18n";
|
|
@@ -7860,7 +7901,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
7860
7901
|
|
|
7861
7902
|
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
7862
7903
|
import * as React104 from "react";
|
|
7863
|
-
import { useBreakpoints } from "@elementor/editor-responsive";
|
|
7904
|
+
import { useBreakpoints as useBreakpoints2 } from "@elementor/editor-responsive";
|
|
7864
7905
|
import {
|
|
7865
7906
|
DesktopIcon,
|
|
7866
7907
|
LaptopIcon,
|
|
@@ -7883,7 +7924,7 @@ var breakpointIconMap = {
|
|
|
7883
7924
|
mobile: MobilePortraitIcon
|
|
7884
7925
|
};
|
|
7885
7926
|
var BreakpointIcon = ({ breakpoint }) => {
|
|
7886
|
-
const breakpoints =
|
|
7927
|
+
const breakpoints = useBreakpoints2();
|
|
7887
7928
|
const currentBreakpoint = breakpoint || DEFAULT_BREAKPOINT3;
|
|
7888
7929
|
const IconComponent = breakpointIconMap[currentBreakpoint];
|
|
7889
7930
|
if (!IconComponent) {
|
|
@@ -8123,7 +8164,7 @@ function TooltipOrInfotip({
|
|
|
8123
8164
|
var StylesInheritanceIndicator = ({
|
|
8124
8165
|
customContext
|
|
8125
8166
|
}) => {
|
|
8126
|
-
const context =
|
|
8167
|
+
const context = useBoundProp16();
|
|
8127
8168
|
const { path, propType } = customContext || context;
|
|
8128
8169
|
const inheritanceChain = useStylesInheritanceChain(path);
|
|
8129
8170
|
if (!path || !inheritanceChain.length) {
|