@elementor/editor-components 4.2.0-902 → 4.2.0-904
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 +4 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/components/instance-editing-panel/override-prop-control.tsx +2 -4
- package/src/components/instance-editing-panel/utils/use-override-dependencies.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1901,7 +1901,7 @@ function useOverrideControlDependencies({
|
|
|
1901
1901
|
);
|
|
1902
1902
|
const dependents = extractOrderedDependencies(elementType.dependenciesPerTargetMapping ?? {});
|
|
1903
1903
|
const settingsWithDepsNewValues = getUpdatedValues(
|
|
1904
|
-
|
|
1904
|
+
{ [propKey]: existingOverrideValue },
|
|
1905
1905
|
dependents,
|
|
1906
1906
|
elementType.propsSchema,
|
|
1907
1907
|
resolvedSettingsWithDefaults,
|
|
@@ -2169,7 +2169,6 @@ function OverrideControl({ overridableProp }) {
|
|
|
2169
2169
|
return null;
|
|
2170
2170
|
}
|
|
2171
2171
|
const { propValue, baseValue: resolvedBaseValue } = resolveOverrideValues(
|
|
2172
|
-
matchingOverride,
|
|
2173
2172
|
overrideValue,
|
|
2174
2173
|
resolvedOriginValues,
|
|
2175
2174
|
propKey
|
|
@@ -2255,13 +2254,13 @@ function OverrideControl({ overridableProp }) {
|
|
|
2255
2254
|
)
|
|
2256
2255
|
);
|
|
2257
2256
|
}
|
|
2258
|
-
function resolveOverrideValues(
|
|
2257
|
+
function resolveOverrideValues(overrideValue, resolvedOriginValues, propKey) {
|
|
2259
2258
|
const unwrappedSettings = unwrapOverridableSettings(resolvedOriginValues);
|
|
2260
2259
|
const inheritedValue = unwrappedSettings[propKey] ?? null;
|
|
2261
2260
|
const isInheritedDynamic = isDynamicPropValue(inheritedValue);
|
|
2262
|
-
const shouldUseInheritedAsValue = isInheritedDynamic && !
|
|
2261
|
+
const shouldUseInheritedAsValue = isInheritedDynamic && !overrideValue;
|
|
2263
2262
|
const propValue = shouldUseInheritedAsValue ? inheritedValue : overrideValue;
|
|
2264
|
-
const baseValue =
|
|
2263
|
+
const baseValue = overrideValue || isInheritedDynamic ? null : inheritedValue;
|
|
2265
2264
|
return { propValue, baseValue };
|
|
2266
2265
|
}
|
|
2267
2266
|
function getTempNewValueForDynamicProp(propType, propValue, newPropValue) {
|