@elementor/editor-components 4.1.0-751 → 4.1.0-753
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.mjs
CHANGED
|
@@ -2146,7 +2146,7 @@ function OverrideControl({ overridableProp }) {
|
|
|
2146
2146
|
if (isHidden) {
|
|
2147
2147
|
return null;
|
|
2148
2148
|
}
|
|
2149
|
-
const { propValue,
|
|
2149
|
+
const { propValue, baseValue: resolvedBaseValue } = resolveOverrideValues(
|
|
2150
2150
|
matchingOverride,
|
|
2151
2151
|
overrideValue,
|
|
2152
2152
|
resolvedOriginValues,
|
|
@@ -2155,8 +2155,8 @@ function OverrideControl({ overridableProp }) {
|
|
|
2155
2155
|
const value = {
|
|
2156
2156
|
[overridableProp.overrideKey]: propValue
|
|
2157
2157
|
};
|
|
2158
|
-
const
|
|
2159
|
-
[overridableProp.overrideKey]:
|
|
2158
|
+
const baseValue = {
|
|
2159
|
+
[overridableProp.overrideKey]: resolvedBaseValue
|
|
2160
2160
|
};
|
|
2161
2161
|
const { control, controlProps, layout } = getControlParams(
|
|
2162
2162
|
controls,
|
|
@@ -2221,7 +2221,7 @@ function OverrideControl({ overridableProp }) {
|
|
|
2221
2221
|
propType: propTypeSchema,
|
|
2222
2222
|
value,
|
|
2223
2223
|
setValue,
|
|
2224
|
-
|
|
2224
|
+
baseValue,
|
|
2225
2225
|
isDisabled
|
|
2226
2226
|
},
|
|
2227
2227
|
/* @__PURE__ */ React19.createElement(PropKeyProvider, { bind: overridableProp.overrideKey }, /* @__PURE__ */ React19.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React19.createElement(Box8, { mb: 1.5 }, /* @__PURE__ */ React19.createElement(ControlTypeContainer, { layout }, layout !== "custom" && /* @__PURE__ */ React19.createElement(ControlLabel, null, overridableProp.label), /* @__PURE__ */ React19.createElement(OriginalControl, { control, controlProps })))))
|
|
@@ -2229,14 +2229,14 @@ function OverrideControl({ overridableProp }) {
|
|
|
2229
2229
|
)
|
|
2230
2230
|
);
|
|
2231
2231
|
}
|
|
2232
|
-
function
|
|
2233
|
-
const
|
|
2234
|
-
const inheritedValue =
|
|
2232
|
+
function resolveOverrideValues(matchingOverride, overrideValue, resolvedOriginValues, propKey) {
|
|
2233
|
+
const unwrappedSettings = unwrapOverridableSettings(resolvedOriginValues);
|
|
2234
|
+
const inheritedValue = unwrappedSettings[propKey] ?? null;
|
|
2235
2235
|
const isInheritedDynamic = isDynamicPropValue(inheritedValue);
|
|
2236
2236
|
const shouldUseInheritedAsValue = isInheritedDynamic && !matchingOverride;
|
|
2237
2237
|
const propValue = shouldUseInheritedAsValue ? inheritedValue : overrideValue;
|
|
2238
|
-
const
|
|
2239
|
-
return { propValue,
|
|
2238
|
+
const baseValue = matchingOverride || isInheritedDynamic ? null : inheritedValue;
|
|
2239
|
+
return { propValue, baseValue };
|
|
2240
2240
|
}
|
|
2241
2241
|
function getTempNewValueForDynamicProp(propType, propValue, newPropValue) {
|
|
2242
2242
|
const isRemovingOverride = newPropValue === null;
|