@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.js
CHANGED
|
@@ -1962,7 +1962,7 @@ function useOverrideControlDependencies({
|
|
|
1962
1962
|
);
|
|
1963
1963
|
const dependents = (0, import_editor_editing_panel.extractOrderedDependencies)(elementType.dependenciesPerTargetMapping ?? {});
|
|
1964
1964
|
const settingsWithDepsNewValues = (0, import_editor_editing_panel.getUpdatedValues)(
|
|
1965
|
-
|
|
1965
|
+
{ [propKey]: existingOverrideValue },
|
|
1966
1966
|
dependents,
|
|
1967
1967
|
elementType.propsSchema,
|
|
1968
1968
|
resolvedSettingsWithDefaults,
|
|
@@ -2230,7 +2230,6 @@ function OverrideControl({ overridableProp }) {
|
|
|
2230
2230
|
return null;
|
|
2231
2231
|
}
|
|
2232
2232
|
const { propValue, baseValue: resolvedBaseValue } = resolveOverrideValues(
|
|
2233
|
-
matchingOverride,
|
|
2234
2233
|
overrideValue,
|
|
2235
2234
|
resolvedOriginValues,
|
|
2236
2235
|
propKey
|
|
@@ -2316,13 +2315,13 @@ function OverrideControl({ overridableProp }) {
|
|
|
2316
2315
|
)
|
|
2317
2316
|
);
|
|
2318
2317
|
}
|
|
2319
|
-
function resolveOverrideValues(
|
|
2318
|
+
function resolveOverrideValues(overrideValue, resolvedOriginValues, propKey) {
|
|
2320
2319
|
const unwrappedSettings = unwrapOverridableSettings(resolvedOriginValues);
|
|
2321
2320
|
const inheritedValue = unwrappedSettings[propKey] ?? null;
|
|
2322
2321
|
const isInheritedDynamic = (0, import_editor_editing_panel3.isDynamicPropValue)(inheritedValue);
|
|
2323
|
-
const shouldUseInheritedAsValue = isInheritedDynamic && !
|
|
2322
|
+
const shouldUseInheritedAsValue = isInheritedDynamic && !overrideValue;
|
|
2324
2323
|
const propValue = shouldUseInheritedAsValue ? inheritedValue : overrideValue;
|
|
2325
|
-
const baseValue =
|
|
2324
|
+
const baseValue = overrideValue || isInheritedDynamic ? null : inheritedValue;
|
|
2326
2325
|
return { propValue, baseValue };
|
|
2327
2326
|
}
|
|
2328
2327
|
function getTempNewValueForDynamicProp(propType, propValue, newPropValue) {
|