@elementor/editor-editing-panel 3.35.0-337 → 3.35.0-339
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
|
@@ -2312,7 +2312,10 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
2312
2312
|
elementType: { propsSchema, dependenciesPerTargetMapping = {} }
|
|
2313
2313
|
} = useElement();
|
|
2314
2314
|
const elementSettingValues = (0, import_editor_elements7.useElementSettings)(elementId, Object.keys(propsSchema));
|
|
2315
|
-
const
|
|
2315
|
+
const migratedValues = (0, import_react20.useMemo)(() => {
|
|
2316
|
+
return migratePropValues(elementSettingValues, propsSchema);
|
|
2317
|
+
}, [elementSettingValues, propsSchema]);
|
|
2318
|
+
const value = { [bind]: migratedValues?.[bind] ?? null };
|
|
2316
2319
|
const propType = createTopLevelObjectType({ schema: propsSchema });
|
|
2317
2320
|
const undoableUpdateElementProp = useUndoableUpdateElementProp({
|
|
2318
2321
|
elementId,
|
|
@@ -2320,10 +2323,10 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
2320
2323
|
});
|
|
2321
2324
|
const setValue = (newValue) => {
|
|
2322
2325
|
const dependents = extractOrderedDependencies(dependenciesPerTargetMapping);
|
|
2323
|
-
const settings = getUpdatedValues(newValue, dependents, propsSchema,
|
|
2326
|
+
const settings = getUpdatedValues(newValue, dependents, propsSchema, migratedValues, elementId);
|
|
2324
2327
|
undoableUpdateElementProp(settings);
|
|
2325
2328
|
};
|
|
2326
|
-
const isDisabled = (prop) => !(0, import_editor_props6.isDependencyMet)(prop?.dependencies,
|
|
2329
|
+
const isDisabled = (prop) => !(0, import_editor_props6.isDependencyMet)(prop?.dependencies, migratedValues).isMet;
|
|
2327
2330
|
return /* @__PURE__ */ React22.createElement(import_editor_controls4.PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React22.createElement(import_editor_controls4.PropKeyProvider, { bind }, children));
|
|
2328
2331
|
};
|
|
2329
2332
|
function useUndoableUpdateElementProp({
|
|
@@ -2352,6 +2355,25 @@ function useUndoableUpdateElementProp({
|
|
|
2352
2355
|
);
|
|
2353
2356
|
}, [elementId, propDisplayName]);
|
|
2354
2357
|
}
|
|
2358
|
+
function migratePropValues(values, schema) {
|
|
2359
|
+
if (!values) {
|
|
2360
|
+
return values;
|
|
2361
|
+
}
|
|
2362
|
+
const migrated = {};
|
|
2363
|
+
for (const [key, value] of Object.entries(values)) {
|
|
2364
|
+
if (value === null || value === void 0) {
|
|
2365
|
+
migrated[key] = value;
|
|
2366
|
+
continue;
|
|
2367
|
+
}
|
|
2368
|
+
const propType = schema[key];
|
|
2369
|
+
if (!propType) {
|
|
2370
|
+
migrated[key] = value;
|
|
2371
|
+
continue;
|
|
2372
|
+
}
|
|
2373
|
+
migrated[key] = (0, import_editor_props6.migratePropValue)(value, propType);
|
|
2374
|
+
}
|
|
2375
|
+
return migrated;
|
|
2376
|
+
}
|
|
2355
2377
|
|
|
2356
2378
|
// src/field-indicators-registry.ts
|
|
2357
2379
|
var indicatorsRegistry = {
|
|
@@ -3116,17 +3138,7 @@ var blendModeOptions = [
|
|
|
3116
3138
|
{ label: (0, import_i18n14.__)("Hard light", "elementor"), value: "hard-light" }
|
|
3117
3139
|
];
|
|
3118
3140
|
var BlendModeField = () => {
|
|
3119
|
-
return /* @__PURE__ */ React38.createElement(StylesField, { bind: "mix-blend-mode", propDisplayName: BLEND_MODE_LABEL }, /* @__PURE__ */ React38.createElement(StylesFieldLayout, { label: BLEND_MODE_LABEL }, /* @__PURE__ */ React38.createElement(
|
|
3120
|
-
import_editor_controls14.SelectControl,
|
|
3121
|
-
{
|
|
3122
|
-
options: blendModeOptions,
|
|
3123
|
-
MenuProps: {
|
|
3124
|
-
sx: {
|
|
3125
|
-
maxHeight: "256px"
|
|
3126
|
-
}
|
|
3127
|
-
}
|
|
3128
|
-
}
|
|
3129
|
-
)));
|
|
3141
|
+
return /* @__PURE__ */ React38.createElement(StylesField, { bind: "mix-blend-mode", propDisplayName: BLEND_MODE_LABEL }, /* @__PURE__ */ React38.createElement(StylesFieldLayout, { label: BLEND_MODE_LABEL }, /* @__PURE__ */ React38.createElement(import_editor_controls14.SelectControl, { options: blendModeOptions })));
|
|
3130
3142
|
};
|
|
3131
3143
|
|
|
3132
3144
|
// src/components/style-sections/effects-section/opacity-control-field.tsx
|