@elementor/editor-components 4.1.0-751 → 4.1.0-752
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
CHANGED
|
@@ -2207,7 +2207,7 @@ function OverrideControl({ overridableProp }) {
|
|
|
2207
2207
|
if (isHidden) {
|
|
2208
2208
|
return null;
|
|
2209
2209
|
}
|
|
2210
|
-
const { propValue,
|
|
2210
|
+
const { propValue, baseValue: resolvedBaseValue } = resolveOverrideValues(
|
|
2211
2211
|
matchingOverride,
|
|
2212
2212
|
overrideValue,
|
|
2213
2213
|
resolvedOriginValues,
|
|
@@ -2216,8 +2216,8 @@ function OverrideControl({ overridableProp }) {
|
|
|
2216
2216
|
const value = {
|
|
2217
2217
|
[overridableProp.overrideKey]: propValue
|
|
2218
2218
|
};
|
|
2219
|
-
const
|
|
2220
|
-
[overridableProp.overrideKey]:
|
|
2219
|
+
const baseValue = {
|
|
2220
|
+
[overridableProp.overrideKey]: resolvedBaseValue
|
|
2221
2221
|
};
|
|
2222
2222
|
const { control, controlProps, layout } = getControlParams(
|
|
2223
2223
|
controls,
|
|
@@ -2282,7 +2282,7 @@ function OverrideControl({ overridableProp }) {
|
|
|
2282
2282
|
propType: propTypeSchema,
|
|
2283
2283
|
value,
|
|
2284
2284
|
setValue,
|
|
2285
|
-
|
|
2285
|
+
baseValue,
|
|
2286
2286
|
isDisabled
|
|
2287
2287
|
},
|
|
2288
2288
|
/* @__PURE__ */ React19.createElement(import_editor_controls2.PropKeyProvider, { bind: overridableProp.overrideKey }, /* @__PURE__ */ React19.createElement(import_editor_controls2.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React19.createElement(import_ui12.Box, { mb: 1.5 }, /* @__PURE__ */ React19.createElement(import_editor_editing_panel3.ControlTypeContainer, { layout }, layout !== "custom" && /* @__PURE__ */ React19.createElement(ControlLabel, null, overridableProp.label), /* @__PURE__ */ React19.createElement(OriginalControl, { control, controlProps })))))
|
|
@@ -2290,14 +2290,14 @@ function OverrideControl({ overridableProp }) {
|
|
|
2290
2290
|
)
|
|
2291
2291
|
);
|
|
2292
2292
|
}
|
|
2293
|
-
function
|
|
2294
|
-
const
|
|
2295
|
-
const inheritedValue =
|
|
2293
|
+
function resolveOverrideValues(matchingOverride, overrideValue, resolvedOriginValues, propKey) {
|
|
2294
|
+
const unwrappedSettings = unwrapOverridableSettings(resolvedOriginValues);
|
|
2295
|
+
const inheritedValue = unwrappedSettings[propKey] ?? null;
|
|
2296
2296
|
const isInheritedDynamic = (0, import_editor_editing_panel3.isDynamicPropValue)(inheritedValue);
|
|
2297
2297
|
const shouldUseInheritedAsValue = isInheritedDynamic && !matchingOverride;
|
|
2298
2298
|
const propValue = shouldUseInheritedAsValue ? inheritedValue : overrideValue;
|
|
2299
|
-
const
|
|
2300
|
-
return { propValue,
|
|
2299
|
+
const baseValue = matchingOverride || isInheritedDynamic ? null : inheritedValue;
|
|
2300
|
+
return { propValue, baseValue };
|
|
2301
2301
|
}
|
|
2302
2302
|
function getTempNewValueForDynamicProp(propType, propValue, newPropValue) {
|
|
2303
2303
|
const isRemovingOverride = newPropValue === null;
|