@elementor/editor-editing-panel 4.2.0-914 → 4.2.0-915
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 +105 -102
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/components/css-classes/css-class-menu.tsx +6 -1
package/dist/index.js
CHANGED
|
@@ -653,6 +653,7 @@ function CssClassProvider({ children, ...contextValue }) {
|
|
|
653
653
|
|
|
654
654
|
// src/components/css-classes/css-class-menu.tsx
|
|
655
655
|
var React10 = __toESM(require("react"));
|
|
656
|
+
var import_editor_props3 = require("@elementor/editor-props");
|
|
656
657
|
var import_editor_styles_repository8 = require("@elementor/editor-styles-repository");
|
|
657
658
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
658
659
|
var import_ui6 = require("@elementor/ui");
|
|
@@ -1057,7 +1058,9 @@ function useModifiedStates(styleId) {
|
|
|
1057
1058
|
const { meta } = useStyle();
|
|
1058
1059
|
const styleDef = import_editor_styles_repository8.stylesRepository.all().find((style) => style.id === styleId);
|
|
1059
1060
|
return Object.fromEntries(
|
|
1060
|
-
styleDef?.variants.filter(
|
|
1061
|
+
styleDef?.variants.filter(
|
|
1062
|
+
(variant) => meta.breakpoint === variant.meta.breakpoint && (!(0, import_editor_props3.isEmpty)(variant.props) || Boolean(variant.custom_css?.raw?.trim()))
|
|
1063
|
+
).map((variant) => [variant.meta.state ?? "normal", true]) ?? []
|
|
1061
1064
|
);
|
|
1062
1065
|
}
|
|
1063
1066
|
function getMenuItemsByProvider({
|
|
@@ -1601,7 +1604,7 @@ var import_editor_styles4 = require("@elementor/editor-styles");
|
|
|
1601
1604
|
// src/hooks/use-custom-css.ts
|
|
1602
1605
|
var import_react13 = require("react");
|
|
1603
1606
|
var import_editor_elements5 = require("@elementor/editor-elements");
|
|
1604
|
-
var
|
|
1607
|
+
var import_editor_props4 = require("@elementor/editor-props");
|
|
1605
1608
|
var import_editor_styles3 = require("@elementor/editor-styles");
|
|
1606
1609
|
var import_editor_styles_repository14 = require("@elementor/editor-styles-repository");
|
|
1607
1610
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
@@ -1869,7 +1872,7 @@ function getCurrentCustomCss(style, meta) {
|
|
|
1869
1872
|
return variant?.custom_css ?? null;
|
|
1870
1873
|
}
|
|
1871
1874
|
function sanitize(raw) {
|
|
1872
|
-
return
|
|
1875
|
+
return import_editor_props4.stringPropTypeUtil.schema.safeParse(import_editor_props4.stringPropTypeUtil.create(raw)).data?.value?.trim() ?? "";
|
|
1873
1876
|
}
|
|
1874
1877
|
|
|
1875
1878
|
// src/components/custom-css-indicator.tsx
|
|
@@ -2079,7 +2082,7 @@ var React24 = __toESM(require("react"));
|
|
|
2079
2082
|
var import_session6 = require("@elementor/session");
|
|
2080
2083
|
|
|
2081
2084
|
// src/utils/prop-dependency-utils.ts
|
|
2082
|
-
var
|
|
2085
|
+
var import_editor_props5 = require("@elementor/editor-props");
|
|
2083
2086
|
var import_session5 = require("@elementor/session");
|
|
2084
2087
|
function getElementSettingsWithDefaults(propsSchema, elementSettings) {
|
|
2085
2088
|
const elementSettingsWithDefaults = { ...elementSettings };
|
|
@@ -2093,12 +2096,12 @@ function getElementSettingsWithDefaults(propsSchema, elementSettings) {
|
|
|
2093
2096
|
function extractDependencyEffect(bind, propsSchema, settings) {
|
|
2094
2097
|
const settingsWithDefaults = getElementSettingsWithDefaults(propsSchema, settings);
|
|
2095
2098
|
const propType = propsSchema[bind];
|
|
2096
|
-
const depCheck = (0,
|
|
2099
|
+
const depCheck = (0, import_editor_props5.isDependencyMet)(propType?.dependencies, settingsWithDefaults);
|
|
2097
2100
|
const failingTerm = !depCheck.isMet ? depCheck.failingDependencies[0] : void 0;
|
|
2098
|
-
const isHidden = !!failingTerm && !(0,
|
|
2101
|
+
const isHidden = !!failingTerm && !(0, import_editor_props5.isDependency)(failingTerm) && failingTerm?.effect === "hide";
|
|
2099
2102
|
return {
|
|
2100
2103
|
isHidden,
|
|
2101
|
-
isDisabled: (prop) => !(0,
|
|
2104
|
+
isDisabled: (prop) => !(0, import_editor_props5.isDependencyMet)(prop?.dependencies, settingsWithDefaults).isMet
|
|
2102
2105
|
};
|
|
2103
2106
|
}
|
|
2104
2107
|
function extractOrderedDependencies(dependenciesPerTargetMapping) {
|
|
@@ -2117,8 +2120,8 @@ function getUpdatedValues(values, dependencies, propsSchema, elementValues, elem
|
|
|
2117
2120
|
return newValues;
|
|
2118
2121
|
}
|
|
2119
2122
|
const testDependencies = {
|
|
2120
|
-
previousValues: (0,
|
|
2121
|
-
newValues: (0,
|
|
2123
|
+
previousValues: (0, import_editor_props5.isDependencyMet)(propType.dependencies, elementValues),
|
|
2124
|
+
newValues: (0, import_editor_props5.isDependencyMet)(propType.dependencies, combinedValues)
|
|
2122
2125
|
};
|
|
2123
2126
|
if (!testDependencies.newValues.isMet) {
|
|
2124
2127
|
const newValue = handleUnmetCondition({
|
|
@@ -2135,7 +2138,7 @@ function getUpdatedValues(values, dependencies, propsSchema, elementValues, elem
|
|
|
2135
2138
|
}
|
|
2136
2139
|
if (!testDependencies.previousValues.isMet) {
|
|
2137
2140
|
const savedValue = retrievePreviousValueFromStorage({ path: dependency, elementId });
|
|
2138
|
-
const currentValue = (0,
|
|
2141
|
+
const currentValue = (0, import_editor_props5.extractValue)(path, combinedValues, [], {
|
|
2139
2142
|
unwrapOverridableLeaf: false
|
|
2140
2143
|
});
|
|
2141
2144
|
removePreviousValueFromStorage({ path: dependency, elementId });
|
|
@@ -2172,7 +2175,7 @@ function evaluatePropType(props) {
|
|
|
2172
2175
|
const { key, index, path, elementValues, basePropKey } = props;
|
|
2173
2176
|
switch (prop.kind) {
|
|
2174
2177
|
case "union":
|
|
2175
|
-
const value = (0,
|
|
2178
|
+
const value = (0, import_editor_props5.extractValue)(path.slice(0, index + 1), elementValues);
|
|
2176
2179
|
const type = value?.$$type ?? null;
|
|
2177
2180
|
return getPropType(
|
|
2178
2181
|
{ [basePropKey]: prop.prop_types?.[type] },
|
|
@@ -2210,9 +2213,9 @@ function cloneDescent(child) {
|
|
|
2210
2213
|
if (!child) {
|
|
2211
2214
|
return null;
|
|
2212
2215
|
}
|
|
2213
|
-
if ((0,
|
|
2216
|
+
if ((0, import_editor_props5.isOverridable)(child)) {
|
|
2214
2217
|
const origin = child.value.origin_value;
|
|
2215
|
-
if (!origin || !(0,
|
|
2218
|
+
if (!origin || !(0, import_editor_props5.isTransformable)(origin)) {
|
|
2216
2219
|
return null;
|
|
2217
2220
|
}
|
|
2218
2221
|
const descended = { ...origin.value };
|
|
@@ -2225,7 +2228,7 @@ function cloneDescent(child) {
|
|
|
2225
2228
|
};
|
|
2226
2229
|
return { replacement, descended };
|
|
2227
2230
|
}
|
|
2228
|
-
if ((0,
|
|
2231
|
+
if ((0, import_editor_props5.isTransformable)(child)) {
|
|
2229
2232
|
const descended = { ...child.value };
|
|
2230
2233
|
const replacement = { ...child, value: descended };
|
|
2231
2234
|
return { replacement, descended };
|
|
@@ -2236,17 +2239,17 @@ function isCompatibleSavedValue(saved, current) {
|
|
|
2236
2239
|
if (!saved) {
|
|
2237
2240
|
return false;
|
|
2238
2241
|
}
|
|
2239
|
-
return (0,
|
|
2242
|
+
return (0, import_editor_props5.isOverridable)(saved) === (0, import_editor_props5.isOverridable)(current);
|
|
2240
2243
|
}
|
|
2241
2244
|
function mergeLeafValue(existing, incoming) {
|
|
2242
2245
|
if (incoming === null) {
|
|
2243
2246
|
return null;
|
|
2244
2247
|
}
|
|
2245
|
-
if (incoming && (0,
|
|
2248
|
+
if (incoming && (0, import_editor_props5.isOverridable)(incoming)) {
|
|
2246
2249
|
return incoming;
|
|
2247
2250
|
}
|
|
2248
|
-
if (existing && (0,
|
|
2249
|
-
return (0,
|
|
2251
|
+
if (existing && (0, import_editor_props5.isOverridable)(existing) && incoming) {
|
|
2252
|
+
return (0, import_editor_props5.rewrapOverridableValue)(existing, incoming);
|
|
2250
2253
|
}
|
|
2251
2254
|
return incoming;
|
|
2252
2255
|
}
|
|
@@ -2256,7 +2259,7 @@ function handleUnmetCondition(props) {
|
|
|
2256
2259
|
(term) => "newValue" in term && !!term.newValue
|
|
2257
2260
|
);
|
|
2258
2261
|
const newValue = termWithNewValue?.newValue ?? null;
|
|
2259
|
-
const currentValue = (0,
|
|
2262
|
+
const currentValue = (0, import_editor_props5.extractValue)(dependency.split("."), elementValues, [], { unwrapOverridableLeaf: false }) ?? defaultValue;
|
|
2260
2263
|
savePreviousValueToStorage({
|
|
2261
2264
|
path: dependency,
|
|
2262
2265
|
elementId,
|
|
@@ -2354,46 +2357,46 @@ var React20 = __toESM(require("react"));
|
|
|
2354
2357
|
|
|
2355
2358
|
// src/controls-registry/controls-registry.tsx
|
|
2356
2359
|
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
2357
|
-
var
|
|
2358
|
-
var queryArrayPropTypeUtil = (0,
|
|
2360
|
+
var import_editor_props6 = require("@elementor/editor-props");
|
|
2361
|
+
var queryArrayPropTypeUtil = (0, import_editor_props6.createArrayPropUtils)(import_editor_props6.queryPropTypeUtil.key, import_editor_props6.queryPropTypeUtil.schema);
|
|
2359
2362
|
var controlTypes = {
|
|
2360
|
-
image: { component: import_editor_controls2.ImageControl, layout: "custom", propTypeUtil:
|
|
2361
|
-
"svg-media": { component: import_editor_controls2.SvgMediaControl, layout: "full", propTypeUtil:
|
|
2362
|
-
text: { component: import_editor_controls2.TextControl, layout: "full", propTypeUtil:
|
|
2363
|
-
textarea: { component: import_editor_controls2.TextAreaControl, layout: "full", propTypeUtil:
|
|
2364
|
-
size: { component: import_editor_controls2.SizeControl, layout: "two-columns", propTypeUtil:
|
|
2365
|
-
select: { component: import_editor_controls2.SelectControlWrapper, layout: "two-columns", propTypeUtil:
|
|
2366
|
-
chips: { component: import_editor_controls2.ChipsControl, layout: "full", propTypeUtil:
|
|
2367
|
-
link: { component: import_editor_controls2.LinkControl, layout: "custom", propTypeUtil:
|
|
2368
|
-
query: { component: import_editor_controls2.QueryControl, layout: "full", propTypeUtil:
|
|
2363
|
+
image: { component: import_editor_controls2.ImageControl, layout: "custom", propTypeUtil: import_editor_props6.imagePropTypeUtil },
|
|
2364
|
+
"svg-media": { component: import_editor_controls2.SvgMediaControl, layout: "full", propTypeUtil: import_editor_props6.svgSrcPropTypeUtil },
|
|
2365
|
+
text: { component: import_editor_controls2.TextControl, layout: "full", propTypeUtil: import_editor_props6.stringPropTypeUtil },
|
|
2366
|
+
textarea: { component: import_editor_controls2.TextAreaControl, layout: "full", propTypeUtil: import_editor_props6.stringPropTypeUtil },
|
|
2367
|
+
size: { component: import_editor_controls2.SizeControl, layout: "two-columns", propTypeUtil: import_editor_props6.sizePropTypeUtil },
|
|
2368
|
+
select: { component: import_editor_controls2.SelectControlWrapper, layout: "two-columns", propTypeUtil: import_editor_props6.stringPropTypeUtil },
|
|
2369
|
+
chips: { component: import_editor_controls2.ChipsControl, layout: "full", propTypeUtil: import_editor_props6.stringArrayPropTypeUtil },
|
|
2370
|
+
link: { component: import_editor_controls2.LinkControl, layout: "custom", propTypeUtil: import_editor_props6.linkPropTypeUtil },
|
|
2371
|
+
query: { component: import_editor_controls2.QueryControl, layout: "full", propTypeUtil: import_editor_props6.queryPropTypeUtil },
|
|
2369
2372
|
"query-chips": { component: import_editor_controls2.QueryChipsControl, layout: "full", propTypeUtil: queryArrayPropTypeUtil },
|
|
2370
2373
|
"query-filter-repeater": {
|
|
2371
2374
|
component: import_editor_controls2.QueryFilterRepeaterControl,
|
|
2372
2375
|
layout: "full",
|
|
2373
|
-
propTypeUtil:
|
|
2376
|
+
propTypeUtil: import_editor_props6.queryFilterArrayPropTypeUtil
|
|
2374
2377
|
},
|
|
2375
|
-
url: { component: import_editor_controls2.UrlControl, layout: "full", propTypeUtil:
|
|
2376
|
-
switch: { component: import_editor_controls2.SwitchControl, layout: "two-columns", propTypeUtil:
|
|
2377
|
-
number: { component: import_editor_controls2.NumberControl, layout: "two-columns", propTypeUtil:
|
|
2378
|
+
url: { component: import_editor_controls2.UrlControl, layout: "full", propTypeUtil: import_editor_props6.stringPropTypeUtil },
|
|
2379
|
+
switch: { component: import_editor_controls2.SwitchControl, layout: "two-columns", propTypeUtil: import_editor_props6.booleanPropTypeUtil },
|
|
2380
|
+
number: { component: import_editor_controls2.NumberControl, layout: "two-columns", propTypeUtil: import_editor_props6.numberPropTypeUtil },
|
|
2378
2381
|
repeatable: { component: import_editor_controls2.RepeatableControl, layout: "full", propTypeUtil: void 0 },
|
|
2379
|
-
"key-value": { component: import_editor_controls2.KeyValueControl, layout: "full", propTypeUtil:
|
|
2380
|
-
"html-tag": { component: import_editor_controls2.HtmlTagControl, layout: "two-columns", propTypeUtil:
|
|
2381
|
-
toggle: { component: import_editor_controls2.ToggleControl, layout: "full", propTypeUtil:
|
|
2382
|
-
"date-time": { component: import_editor_controls2.DateTimeControl, layout: "full", propTypeUtil:
|
|
2383
|
-
video: { component: import_editor_controls2.VideoMediaControl, layout: "full", propTypeUtil:
|
|
2384
|
-
"inline-editing": { component: import_editor_controls2.InlineEditingControl, layout: "full", propTypeUtil:
|
|
2385
|
-
email: { component: import_editor_controls2.EmailFormActionControl, layout: "custom", propTypeUtil:
|
|
2382
|
+
"key-value": { component: import_editor_controls2.KeyValueControl, layout: "full", propTypeUtil: import_editor_props6.keyValuePropTypeUtil },
|
|
2383
|
+
"html-tag": { component: import_editor_controls2.HtmlTagControl, layout: "two-columns", propTypeUtil: import_editor_props6.stringPropTypeUtil },
|
|
2384
|
+
toggle: { component: import_editor_controls2.ToggleControl, layout: "full", propTypeUtil: import_editor_props6.stringPropTypeUtil },
|
|
2385
|
+
"date-time": { component: import_editor_controls2.DateTimeControl, layout: "full", propTypeUtil: import_editor_props6.DateTimePropTypeUtil },
|
|
2386
|
+
video: { component: import_editor_controls2.VideoMediaControl, layout: "full", propTypeUtil: import_editor_props6.videoSrcPropTypeUtil },
|
|
2387
|
+
"inline-editing": { component: import_editor_controls2.InlineEditingControl, layout: "full", propTypeUtil: import_editor_props6.htmlV3PropTypeUtil },
|
|
2388
|
+
email: { component: import_editor_controls2.EmailFormActionControl, layout: "custom", propTypeUtil: import_editor_props6.emailsPropTypeUtil },
|
|
2386
2389
|
"date-range": {
|
|
2387
2390
|
component: import_editor_controls2.DateRangeControl,
|
|
2388
2391
|
layout: "custom",
|
|
2389
|
-
propTypeUtil:
|
|
2392
|
+
propTypeUtil: import_editor_props6.dateRangePropTypeUtil
|
|
2390
2393
|
},
|
|
2391
2394
|
"time-range": {
|
|
2392
2395
|
component: import_editor_controls2.TimeRangeControl,
|
|
2393
2396
|
layout: "custom",
|
|
2394
|
-
propTypeUtil:
|
|
2397
|
+
propTypeUtil: import_editor_props6.timeRangePropTypeUtil
|
|
2395
2398
|
},
|
|
2396
|
-
"attachment-type": { component: import_editor_controls2.AttachmentTypeControl, layout: "custom", propTypeUtil:
|
|
2399
|
+
"attachment-type": { component: import_editor_controls2.AttachmentTypeControl, layout: "custom", propTypeUtil: import_editor_props6.stringPropTypeUtil }
|
|
2397
2400
|
};
|
|
2398
2401
|
var ControlsRegistry = class {
|
|
2399
2402
|
constructor(controlsRegistry2) {
|
|
@@ -2682,7 +2685,7 @@ function isControlHiddenByDependencies(control, propsSchema, settings) {
|
|
|
2682
2685
|
// src/components/style-tab.tsx
|
|
2683
2686
|
var React88 = __toESM(require("react"));
|
|
2684
2687
|
var import_react37 = require("react");
|
|
2685
|
-
var
|
|
2688
|
+
var import_editor_props16 = require("@elementor/editor-props");
|
|
2686
2689
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
2687
2690
|
var import_locations3 = require("@elementor/locations");
|
|
2688
2691
|
var import_session8 = require("@elementor/session");
|
|
@@ -2693,16 +2696,16 @@ var import_i18n62 = require("@wordpress/i18n");
|
|
|
2693
2696
|
var React25 = __toESM(require("react"));
|
|
2694
2697
|
var import_react19 = require("react");
|
|
2695
2698
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
2696
|
-
var
|
|
2699
|
+
var import_editor_props9 = require("@elementor/editor-props");
|
|
2697
2700
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
2698
2701
|
var import_editor_styles5 = require("@elementor/editor-styles");
|
|
2699
2702
|
var import_editor_styles_repository15 = require("@elementor/editor-styles-repository");
|
|
2700
2703
|
|
|
2701
2704
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
2702
|
-
var
|
|
2705
|
+
var import_editor_props8 = require("@elementor/editor-props");
|
|
2703
2706
|
|
|
2704
2707
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
2705
|
-
var
|
|
2708
|
+
var import_editor_props7 = require("@elementor/editor-props");
|
|
2706
2709
|
var import_editor_variables = require("@elementor/editor-variables");
|
|
2707
2710
|
|
|
2708
2711
|
// src/styles-inheritance/utils.ts
|
|
@@ -2803,7 +2806,7 @@ function buildInitialSnapshotFromStyles(styles) {
|
|
|
2803
2806
|
variant: { props }
|
|
2804
2807
|
} = styleData;
|
|
2805
2808
|
Object.entries(props).forEach(([key, value]) => {
|
|
2806
|
-
const filteredValue = (0,
|
|
2809
|
+
const filteredValue = (0, import_editor_props7.filterEmptyValues)(value);
|
|
2807
2810
|
const filteredVariableValue = filteredValue?.$$type?.includes("variable") && !(0, import_editor_variables.hasVariable)(filteredValue?.value) ? null : filteredValue;
|
|
2808
2811
|
if (filteredVariableValue === null) {
|
|
2809
2812
|
return;
|
|
@@ -2850,7 +2853,7 @@ function createStylesInheritance(styleDefs, breakpointsRoot) {
|
|
|
2850
2853
|
inheritanceChain = inheritanceChain.map(({ value: styleValue, ...rest }) => ({
|
|
2851
2854
|
...rest,
|
|
2852
2855
|
value: getValueByPath(styleValue, nextFields, filterPropType)
|
|
2853
|
-
})).filter(({ value: styleValue }) => !(0,
|
|
2856
|
+
})).filter(({ value: styleValue }) => !(0, import_editor_props8.isEmpty)(styleValue));
|
|
2854
2857
|
}
|
|
2855
2858
|
return inheritanceChain;
|
|
2856
2859
|
}
|
|
@@ -2892,7 +2895,7 @@ function getValueByPath(value, path, filterPropType) {
|
|
|
2892
2895
|
if (!currentScope) {
|
|
2893
2896
|
return null;
|
|
2894
2897
|
}
|
|
2895
|
-
if ((0,
|
|
2898
|
+
if ((0, import_editor_props8.isTransformable)(currentScope)) {
|
|
2896
2899
|
return currentScope.value?.[key] ?? null;
|
|
2897
2900
|
}
|
|
2898
2901
|
if (typeof currentScope === "object") {
|
|
@@ -2902,7 +2905,7 @@ function getValueByPath(value, path, filterPropType) {
|
|
|
2902
2905
|
}, value);
|
|
2903
2906
|
}
|
|
2904
2907
|
function shouldUseOriginalValue(filterPropType, value) {
|
|
2905
|
-
return !!filterPropType && (0,
|
|
2908
|
+
return !!filterPropType && (0, import_editor_props8.isTransformable)(value) && filterPropType.key !== value.$$type;
|
|
2906
2909
|
}
|
|
2907
2910
|
var getFilterPropType = (propType, path) => {
|
|
2908
2911
|
if (!propType || propType.kind !== "union") {
|
|
@@ -2969,7 +2972,7 @@ var useAppliedStyles = () => {
|
|
|
2969
2972
|
const baseStyles = useBaseStyles();
|
|
2970
2973
|
useStylesRerender();
|
|
2971
2974
|
const classesProp = usePanelElementSetting(currentClassesProp);
|
|
2972
|
-
const appliedStyles =
|
|
2975
|
+
const appliedStyles = import_editor_props9.classesPropTypeUtil.extract(classesProp) ?? [];
|
|
2973
2976
|
return import_editor_styles_repository15.stylesRepository.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
2974
2977
|
};
|
|
2975
2978
|
var useBaseStyles = () => {
|
|
@@ -3018,7 +3021,7 @@ var import_i18n10 = require("@wordpress/i18n");
|
|
|
3018
3021
|
// src/controls-registry/styles-field.tsx
|
|
3019
3022
|
var React26 = __toESM(require("react"));
|
|
3020
3023
|
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
3021
|
-
var
|
|
3024
|
+
var import_editor_props11 = require("@elementor/editor-props");
|
|
3022
3025
|
var import_editor_styles6 = require("@elementor/editor-styles");
|
|
3023
3026
|
|
|
3024
3027
|
// src/hooks/use-styles-field.ts
|
|
@@ -3034,14 +3037,14 @@ function useStylesField(propName, meta) {
|
|
|
3034
3037
|
// src/controls-registry/conditional-field.tsx
|
|
3035
3038
|
var import_react20 = require("react");
|
|
3036
3039
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
3037
|
-
var
|
|
3040
|
+
var import_editor_props10 = require("@elementor/editor-props");
|
|
3038
3041
|
var ConditionalField = ({ children }) => {
|
|
3039
3042
|
const { propType, value, resetValue } = (0, import_editor_controls5.useBoundProp)();
|
|
3040
3043
|
const depList = getDependencies(propType);
|
|
3041
3044
|
const { values: depValues, setValues: setDepValues } = useStylesFields(depList);
|
|
3042
3045
|
const inheritedValues = useInheritedValues(depList);
|
|
3043
3046
|
const resolvedValues = resolveWithInherited(depValues, inheritedValues);
|
|
3044
|
-
const isHidden = !(0,
|
|
3047
|
+
const isHidden = !(0, import_editor_props10.isDependencyMet)(propType?.dependencies, resolvedValues).isMet;
|
|
3045
3048
|
useSyncDepsWithInherited({ isHidden, depValues, value, inheritedValues, setDepValues, resetValue });
|
|
3046
3049
|
return isHidden ? null : children;
|
|
3047
3050
|
};
|
|
@@ -3097,7 +3100,7 @@ function getDependencies(propType) {
|
|
|
3097
3100
|
if (!propType?.dependencies?.terms.length) {
|
|
3098
3101
|
return [];
|
|
3099
3102
|
}
|
|
3100
|
-
return propType.dependencies.terms.flatMap((term) => !(0,
|
|
3103
|
+
return propType.dependencies.terms.flatMap((term) => !(0, import_editor_props10.isDependency)(term) ? term.path : []);
|
|
3101
3104
|
}
|
|
3102
3105
|
|
|
3103
3106
|
// src/controls-registry/styles-field.tsx
|
|
@@ -3108,10 +3111,10 @@ function buildResolvedPlaceholder(chain, startIndex) {
|
|
|
3108
3111
|
return void 0;
|
|
3109
3112
|
}
|
|
3110
3113
|
const firstValue = firstEntry.value;
|
|
3111
|
-
if (!
|
|
3114
|
+
if (!import_editor_props11.dimensionsPropTypeUtil.isValid(firstValue)) {
|
|
3112
3115
|
return firstValue;
|
|
3113
3116
|
}
|
|
3114
|
-
const firstDims =
|
|
3117
|
+
const firstDims = import_editor_props11.dimensionsPropTypeUtil.extract(firstValue);
|
|
3115
3118
|
if (DIMENSION_SIDES.every((side) => firstDims?.[side] !== null && firstDims?.[side] !== void 0)) {
|
|
3116
3119
|
return firstValue;
|
|
3117
3120
|
}
|
|
@@ -3123,15 +3126,15 @@ function buildResolvedPlaceholder(chain, startIndex) {
|
|
|
3123
3126
|
});
|
|
3124
3127
|
for (let i = startIndex + 1; i < chain.length; i++) {
|
|
3125
3128
|
const val = chain[i].value;
|
|
3126
|
-
if (
|
|
3129
|
+
if (import_editor_props11.sizePropTypeUtil.isValid(val)) {
|
|
3127
3130
|
DIMENSION_SIDES.forEach((side) => {
|
|
3128
3131
|
if (merged[side] === null || merged[side] === void 0) {
|
|
3129
3132
|
merged[side] = val;
|
|
3130
3133
|
}
|
|
3131
3134
|
});
|
|
3132
3135
|
break;
|
|
3133
|
-
} else if (
|
|
3134
|
-
const dims =
|
|
3136
|
+
} else if (import_editor_props11.dimensionsPropTypeUtil.isValid(val)) {
|
|
3137
|
+
const dims = import_editor_props11.dimensionsPropTypeUtil.extract(val);
|
|
3135
3138
|
DIMENSION_SIDES.forEach((side) => {
|
|
3136
3139
|
if ((merged[side] === null || merged[side] === void 0) && dims?.[side] !== null && dims?.[side] !== void 0) {
|
|
3137
3140
|
merged[side] = dims[side];
|
|
@@ -3142,7 +3145,7 @@ function buildResolvedPlaceholder(chain, startIndex) {
|
|
|
3142
3145
|
break;
|
|
3143
3146
|
}
|
|
3144
3147
|
}
|
|
3145
|
-
return
|
|
3148
|
+
return import_editor_props11.dimensionsPropTypeUtil.create({
|
|
3146
3149
|
"block-start": merged["block-start"] ?? null,
|
|
3147
3150
|
"block-end": merged["block-end"] ?? null,
|
|
3148
3151
|
"inline-start": merged["inline-start"] ?? null,
|
|
@@ -3231,7 +3234,7 @@ var BorderColorField = () => /* @__PURE__ */ React30.createElement(StylesField,
|
|
|
3231
3234
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
3232
3235
|
var React32 = __toESM(require("react"));
|
|
3233
3236
|
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
3234
|
-
var
|
|
3237
|
+
var import_editor_props12 = require("@elementor/editor-props");
|
|
3235
3238
|
var import_icons5 = require("@elementor/icons");
|
|
3236
3239
|
var import_ui20 = require("@elementor/ui");
|
|
3237
3240
|
var import_i18n12 = require("@wordpress/i18n");
|
|
@@ -3302,7 +3305,7 @@ var BorderRadiusField = () => {
|
|
|
3302
3305
|
label: BORDER_RADIUS_LABEL,
|
|
3303
3306
|
icon: /* @__PURE__ */ React32.createElement(import_icons5.BorderCornersIcon, { fontSize: "tiny" }),
|
|
3304
3307
|
tooltipLabel: (0, import_i18n12.__)("Adjust corners", "elementor"),
|
|
3305
|
-
multiSizePropTypeUtil:
|
|
3308
|
+
multiSizePropTypeUtil: import_editor_props12.borderRadiusPropTypeUtil
|
|
3306
3309
|
}
|
|
3307
3310
|
)));
|
|
3308
3311
|
};
|
|
@@ -3328,7 +3331,7 @@ var BorderStyleField = () => /* @__PURE__ */ React33.createElement(StylesField,
|
|
|
3328
3331
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
3329
3332
|
var React34 = __toESM(require("react"));
|
|
3330
3333
|
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
3331
|
-
var
|
|
3334
|
+
var import_editor_props13 = require("@elementor/editor-props");
|
|
3332
3335
|
var import_icons6 = require("@elementor/icons");
|
|
3333
3336
|
var import_ui21 = require("@elementor/ui");
|
|
3334
3337
|
var import_i18n14 = require("@wordpress/i18n");
|
|
@@ -3370,7 +3373,7 @@ var BorderWidthField = () => {
|
|
|
3370
3373
|
label: BORDER_WIDTH_LABEL,
|
|
3371
3374
|
icon: /* @__PURE__ */ React34.createElement(import_icons6.SideAllIcon, { fontSize: "tiny" }),
|
|
3372
3375
|
tooltipLabel: (0, import_i18n14.__)("Adjust borders", "elementor"),
|
|
3373
|
-
multiSizePropTypeUtil:
|
|
3376
|
+
multiSizePropTypeUtil: import_editor_props13.borderWidthPropTypeUtil
|
|
3374
3377
|
}
|
|
3375
3378
|
));
|
|
3376
3379
|
};
|
|
@@ -4084,7 +4087,7 @@ var getGroupControlValue = (order) => {
|
|
|
4084
4087
|
var React50 = __toESM(require("react"));
|
|
4085
4088
|
var import_react25 = require("react");
|
|
4086
4089
|
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
4087
|
-
var
|
|
4090
|
+
var import_editor_props14 = require("@elementor/editor-props");
|
|
4088
4091
|
var import_icons13 = require("@elementor/icons");
|
|
4089
4092
|
var import_i18n27 = require("@wordpress/i18n");
|
|
4090
4093
|
var FLEX_SIZE_LABEL = (0, import_i18n27.__)("Flex Size", "elementor");
|
|
@@ -4163,24 +4166,24 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
4163
4166
|
return null;
|
|
4164
4167
|
}
|
|
4165
4168
|
if (group === "flex-grow") {
|
|
4166
|
-
return
|
|
4167
|
-
flexGrow:
|
|
4168
|
-
flexShrink:
|
|
4169
|
-
flexBasis:
|
|
4169
|
+
return import_editor_props14.flexPropTypeUtil.create({
|
|
4170
|
+
flexGrow: import_editor_props14.numberPropTypeUtil.create(DEFAULT),
|
|
4171
|
+
flexShrink: import_editor_props14.numberPropTypeUtil.create(0),
|
|
4172
|
+
flexBasis: import_editor_props14.sizePropTypeUtil.create({ unit: "auto", size: "" })
|
|
4170
4173
|
});
|
|
4171
4174
|
}
|
|
4172
4175
|
if (group === "flex-shrink") {
|
|
4173
|
-
return
|
|
4174
|
-
flexGrow:
|
|
4175
|
-
flexShrink:
|
|
4176
|
-
flexBasis:
|
|
4176
|
+
return import_editor_props14.flexPropTypeUtil.create({
|
|
4177
|
+
flexGrow: import_editor_props14.numberPropTypeUtil.create(0),
|
|
4178
|
+
flexShrink: import_editor_props14.numberPropTypeUtil.create(DEFAULT),
|
|
4179
|
+
flexBasis: import_editor_props14.sizePropTypeUtil.create({ unit: "auto", size: "" })
|
|
4177
4180
|
});
|
|
4178
4181
|
}
|
|
4179
4182
|
if (group === "custom") {
|
|
4180
4183
|
if (flexValue) {
|
|
4181
4184
|
return flexValue;
|
|
4182
4185
|
}
|
|
4183
|
-
return
|
|
4186
|
+
return import_editor_props14.flexPropTypeUtil.create({
|
|
4184
4187
|
flexGrow: null,
|
|
4185
4188
|
flexShrink: null,
|
|
4186
4189
|
flexBasis: null
|
|
@@ -4190,7 +4193,7 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
4190
4193
|
};
|
|
4191
4194
|
var FlexCustomField = () => {
|
|
4192
4195
|
const flexBasisRowRef = (0, import_react25.useRef)(null);
|
|
4193
|
-
const context = (0, import_editor_controls22.useBoundProp)(
|
|
4196
|
+
const context = (0, import_editor_controls22.useBoundProp)(import_editor_props14.flexPropTypeUtil);
|
|
4194
4197
|
return /* @__PURE__ */ React50.createElement(import_editor_controls22.PropProvider, { ...context }, /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: (0, import_i18n27.__)("Grow", "elementor") }, /* @__PURE__ */ React50.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexGrow" }, /* @__PURE__ */ React50.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: (0, import_i18n27.__)("Shrink", "elementor") }, /* @__PURE__ */ React50.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexShrink" }, /* @__PURE__ */ React50.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: (0, import_i18n27.__)("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React50.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexBasis" }, /* @__PURE__ */ React50.createElement(import_editor_controls22.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
4195
4198
|
};
|
|
4196
4199
|
var getActiveGroup = ({
|
|
@@ -4394,7 +4397,7 @@ var import_ui33 = require("@elementor/ui");
|
|
|
4394
4397
|
var import_i18n33 = require("@wordpress/i18n");
|
|
4395
4398
|
|
|
4396
4399
|
// src/components/style-sections/layout-section/utils/grid-track-value.ts
|
|
4397
|
-
var
|
|
4400
|
+
var import_editor_props15 = require("@elementor/editor-props");
|
|
4398
4401
|
var FR = "fr";
|
|
4399
4402
|
var CUSTOM2 = "custom";
|
|
4400
4403
|
var UNITS = [FR, CUSTOM2];
|
|
@@ -4426,11 +4429,11 @@ var parseValue = (value) => {
|
|
|
4426
4429
|
if (!value) {
|
|
4427
4430
|
return EMPTY;
|
|
4428
4431
|
}
|
|
4429
|
-
if (
|
|
4430
|
-
return parseGridTrackSize(
|
|
4432
|
+
if (import_editor_props15.gridTrackSizePropTypeUtil.isValid(value)) {
|
|
4433
|
+
return parseGridTrackSize(import_editor_props15.gridTrackSizePropTypeUtil.extract(value));
|
|
4431
4434
|
}
|
|
4432
|
-
if (
|
|
4433
|
-
return parseString(
|
|
4435
|
+
if (import_editor_props15.stringPropTypeUtil.isValid(value)) {
|
|
4436
|
+
return parseString(import_editor_props15.stringPropTypeUtil.extract(value));
|
|
4434
4437
|
}
|
|
4435
4438
|
return EMPTY;
|
|
4436
4439
|
};
|
|
@@ -4449,9 +4452,9 @@ var toPropValue = (v) => {
|
|
|
4449
4452
|
case "empty":
|
|
4450
4453
|
return null;
|
|
4451
4454
|
case "fr":
|
|
4452
|
-
return
|
|
4455
|
+
return import_editor_props15.gridTrackSizePropTypeUtil.create({ size: v.count, unit: FR });
|
|
4453
4456
|
case "custom":
|
|
4454
|
-
return
|
|
4457
|
+
return import_editor_props15.gridTrackSizePropTypeUtil.create({ size: v.raw, unit: CUSTOM2 });
|
|
4455
4458
|
}
|
|
4456
4459
|
};
|
|
4457
4460
|
var toSizeInput = (v, fallbackUnit = FR) => {
|
|
@@ -5526,7 +5529,7 @@ function ClassesHeader({ children }) {
|
|
|
5526
5529
|
function useCurrentClassesProp() {
|
|
5527
5530
|
const { elementType } = useElement();
|
|
5528
5531
|
const prop = Object.entries(elementType.propsSchema).find(
|
|
5529
|
-
([, propType]) => propType.kind === "plain" && propType.key ===
|
|
5532
|
+
([, propType]) => propType.kind === "plain" && propType.key === import_editor_props16.CLASSES_PROP_KEY
|
|
5530
5533
|
);
|
|
5531
5534
|
if (!prop) {
|
|
5532
5535
|
return null;
|
|
@@ -5677,7 +5680,7 @@ var init = () => {
|
|
|
5677
5680
|
var React92 = __toESM(require("react"));
|
|
5678
5681
|
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
5679
5682
|
var import_editor_elements17 = require("@elementor/editor-elements");
|
|
5680
|
-
var
|
|
5683
|
+
var import_editor_props18 = require("@elementor/editor-props");
|
|
5681
5684
|
var import_icons28 = require("@elementor/icons");
|
|
5682
5685
|
var import_ui45 = require("@elementor/ui");
|
|
5683
5686
|
var import_i18n67 = require("@wordpress/i18n");
|
|
@@ -5698,12 +5701,12 @@ var getElementByType = (elementId, type) => {
|
|
|
5698
5701
|
// src/controls-registry/element-controls/tabs-control/use-actions.ts
|
|
5699
5702
|
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
5700
5703
|
var import_editor_elements16 = require("@elementor/editor-elements");
|
|
5701
|
-
var
|
|
5704
|
+
var import_editor_props17 = require("@elementor/editor-props");
|
|
5702
5705
|
var import_i18n66 = require("@wordpress/i18n");
|
|
5703
5706
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
5704
5707
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
5705
5708
|
var useActions = () => {
|
|
5706
|
-
const { value, setValue: setDefaultActiveTab } = (0, import_editor_controls59.useBoundProp)(
|
|
5709
|
+
const { value, setValue: setDefaultActiveTab } = (0, import_editor_controls59.useBoundProp)(import_editor_props17.numberPropTypeUtil);
|
|
5707
5710
|
const defaultActiveTab = value ?? 0;
|
|
5708
5711
|
const duplicateItem = ({
|
|
5709
5712
|
items: items3,
|
|
@@ -5964,7 +5967,7 @@ var ItemLabel = ({ value, index }) => {
|
|
|
5964
5967
|
return /* @__PURE__ */ React92.createElement(import_ui45.Stack, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React92.createElement("span", null, elementTitle), /* @__PURE__ */ React92.createElement(ItemDefaultTab, { index }));
|
|
5965
5968
|
};
|
|
5966
5969
|
var ItemDefaultTab = ({ index }) => {
|
|
5967
|
-
const { value: defaultItem } = (0, import_editor_controls60.useBoundProp)(
|
|
5970
|
+
const { value: defaultItem } = (0, import_editor_controls60.useBoundProp)(import_editor_props18.numberPropTypeUtil);
|
|
5968
5971
|
const isDefault = defaultItem === index;
|
|
5969
5972
|
if (!isDefault) {
|
|
5970
5973
|
return null;
|
|
@@ -5978,7 +5981,7 @@ var ItemContent = ({ value, index }) => {
|
|
|
5978
5981
|
return /* @__PURE__ */ React92.createElement(import_ui45.Stack, { p: 2, gap: 1.5 }, /* @__PURE__ */ React92.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React92.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n67.__)("Tabs", "elementor") }, /* @__PURE__ */ React92.createElement(DefaultTabControl, { tabIndex: index })));
|
|
5979
5982
|
};
|
|
5980
5983
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
5981
|
-
const { value, setValue } = (0, import_editor_controls60.useBoundProp)(
|
|
5984
|
+
const { value, setValue } = (0, import_editor_controls60.useBoundProp)(import_editor_props18.numberPropTypeUtil);
|
|
5982
5985
|
const isDefault = value === tabIndex;
|
|
5983
5986
|
return /* @__PURE__ */ React92.createElement(import_ui45.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React92.createElement(import_editor_controls60.ControlFormLabel, null, (0, import_i18n67.__)("Set as default tab", "elementor")), /* @__PURE__ */ React92.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React92.createElement(
|
|
5984
5987
|
import_ui45.Switch,
|
|
@@ -6058,7 +6061,7 @@ var import_menus2 = require("@elementor/menus");
|
|
|
6058
6061
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
6059
6062
|
var React93 = __toESM(require("react"));
|
|
6060
6063
|
var import_editor_controls62 = require("@elementor/editor-controls");
|
|
6061
|
-
var
|
|
6064
|
+
var import_editor_props20 = require("@elementor/editor-props");
|
|
6062
6065
|
var import_icons29 = require("@elementor/icons");
|
|
6063
6066
|
|
|
6064
6067
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
@@ -6114,11 +6117,11 @@ var filterByLicense = (tags) => {
|
|
|
6114
6117
|
};
|
|
6115
6118
|
|
|
6116
6119
|
// src/dynamics/utils.ts
|
|
6117
|
-
var
|
|
6120
|
+
var import_editor_props19 = require("@elementor/editor-props");
|
|
6118
6121
|
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
6119
6122
|
var import_schema = require("@elementor/schema");
|
|
6120
6123
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
6121
|
-
var dynamicPropTypeUtil = (0,
|
|
6124
|
+
var dynamicPropTypeUtil = (0, import_editor_props19.createPropUtils)(
|
|
6122
6125
|
DYNAMIC_PROP_TYPE_KEY,
|
|
6123
6126
|
import_schema.z.strictObject({
|
|
6124
6127
|
name: import_schema.z.string(),
|
|
@@ -6135,7 +6138,7 @@ var getDynamicPropType = (propType) => {
|
|
|
6135
6138
|
return dynamicPropType && isDynamicPropType(dynamicPropType) ? dynamicPropType : null;
|
|
6136
6139
|
};
|
|
6137
6140
|
var isDynamicPropValue = (prop) => {
|
|
6138
|
-
return (0,
|
|
6141
|
+
return (0, import_editor_props19.isTransformable)(prop) && prop.$$type === DYNAMIC_PROP_TYPE_KEY;
|
|
6139
6142
|
};
|
|
6140
6143
|
var supportsDynamic = (propType) => {
|
|
6141
6144
|
return !!getDynamicPropType(propType);
|
|
@@ -6196,7 +6199,7 @@ var useDynamicTag = (tagName) => {
|
|
|
6196
6199
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
6197
6200
|
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React93.createElement(import_icons29.DatabaseIcon, { fontSize: "tiny" });
|
|
6198
6201
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
6199
|
-
const context = (0, import_editor_controls62.useBoundProp)(
|
|
6202
|
+
const context = (0, import_editor_controls62.useBoundProp)(import_editor_props20.backgroundImageOverlayPropTypeUtil);
|
|
6200
6203
|
return /* @__PURE__ */ React93.createElement(import_editor_controls62.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React93.createElement(import_editor_controls62.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React93.createElement(Wrapper2, { rawValue: value.value })));
|
|
6201
6204
|
};
|
|
6202
6205
|
var Wrapper2 = ({ rawValue }) => {
|
|
@@ -6233,7 +6236,7 @@ var import_editor_controls63 = require("@elementor/editor-controls");
|
|
|
6233
6236
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
6234
6237
|
var React94 = __toESM(require("react"));
|
|
6235
6238
|
var import_react44 = require("react");
|
|
6236
|
-
var
|
|
6239
|
+
var import_editor_props21 = require("@elementor/editor-props");
|
|
6237
6240
|
var DynamicConditionalControl = ({
|
|
6238
6241
|
children,
|
|
6239
6242
|
propType,
|
|
@@ -6275,7 +6278,7 @@ var DynamicConditionalControl = ({
|
|
|
6275
6278
|
if (!propType?.dependencies?.terms.length) {
|
|
6276
6279
|
return /* @__PURE__ */ React94.createElement(React94.Fragment, null, children);
|
|
6277
6280
|
}
|
|
6278
|
-
const isHidden = !(0,
|
|
6281
|
+
const isHidden = !(0, import_editor_props21.isDependencyMet)(propType?.dependencies, effectiveSettings).isMet;
|
|
6279
6282
|
return isHidden ? null : /* @__PURE__ */ React94.createElement(React94.Fragment, null, children);
|
|
6280
6283
|
};
|
|
6281
6284
|
|
|
@@ -6653,7 +6656,7 @@ function ControlsItemsStack({ items: items3 }) {
|
|
|
6653
6656
|
|
|
6654
6657
|
// src/dynamics/dynamic-transformer.ts
|
|
6655
6658
|
var import_editor_canvas2 = require("@elementor/editor-canvas");
|
|
6656
|
-
var
|
|
6659
|
+
var import_editor_props22 = require("@elementor/editor-props");
|
|
6657
6660
|
|
|
6658
6661
|
// src/dynamics/errors.ts
|
|
6659
6662
|
var import_utils9 = require("@elementor/utils");
|
|
@@ -6671,7 +6674,7 @@ var dynamicTransformer = (0, import_editor_canvas2.createTransformer)((value, {
|
|
|
6671
6674
|
});
|
|
6672
6675
|
function simpleTransform(props) {
|
|
6673
6676
|
const transformed = Object.entries(props).map(([settingKey, settingValue]) => {
|
|
6674
|
-
const value = (0,
|
|
6677
|
+
const value = (0, import_editor_props22.isTransformable)(settingValue) ? settingValue.value : settingValue;
|
|
6675
6678
|
return [settingKey, value];
|
|
6676
6679
|
});
|
|
6677
6680
|
return Object.fromEntries(transformed);
|
|
@@ -6834,7 +6837,7 @@ function useResetStyleValueProps() {
|
|
|
6834
6837
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
6835
6838
|
var React104 = __toESM(require("react"));
|
|
6836
6839
|
var import_editor_controls69 = require("@elementor/editor-controls");
|
|
6837
|
-
var
|
|
6840
|
+
var import_editor_props23 = require("@elementor/editor-props");
|
|
6838
6841
|
var import_editor_styles_repository20 = require("@elementor/editor-styles-repository");
|
|
6839
6842
|
var import_i18n75 = require("@wordpress/i18n");
|
|
6840
6843
|
|
|
@@ -7186,7 +7189,7 @@ var StylesInheritanceIndicator = ({
|
|
|
7186
7189
|
var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
7187
7190
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
7188
7191
|
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
7189
|
-
const hasValue = !(0,
|
|
7192
|
+
const hasValue = !(0, import_editor_props23.isEmpty)(currentItem?.value);
|
|
7190
7193
|
const [actualStyle] = inheritanceChain;
|
|
7191
7194
|
if (actualStyle.provider === import_editor_styles_repository20.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
7192
7195
|
return null;
|