@elementor/editor-controls 3.35.0-393 → 3.35.0-395
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 +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/controls/equal-unequal-sizes-control.tsx +9 -9
package/dist/index.js
CHANGED
|
@@ -2674,22 +2674,22 @@ function EqualUnequalSizesControl({
|
|
|
2674
2674
|
if (!values) {
|
|
2675
2675
|
return true;
|
|
2676
2676
|
}
|
|
2677
|
+
const multiSizeValue = multiSizePropTypeUtil.create(values);
|
|
2677
2678
|
const propValue = {};
|
|
2678
2679
|
items2.forEach((item) => {
|
|
2679
|
-
propValue[item.bind] =
|
|
2680
|
+
propValue[item.bind] = multiSizeValue?.value?.[item.bind] ?? null;
|
|
2680
2681
|
});
|
|
2681
2682
|
const allValues = Object.values(propValue).map((value) => JSON.stringify(value));
|
|
2682
2683
|
return allValues.every((value) => value === allValues[0]);
|
|
2683
2684
|
};
|
|
2684
|
-
const isMixedPlaceholder = !masterValue && !isEqualValues(
|
|
2685
|
-
const isMixed = isMixedPlaceholder || !isEqualValues(
|
|
2685
|
+
const isMixedPlaceholder = !masterValue && !isEqualValues(derivedPlaceholder);
|
|
2686
|
+
const isMixed = isMixedPlaceholder || !isEqualValues(derivedValue);
|
|
2686
2687
|
const applyMultiSizeValue = (newValue) => {
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
setMasterValue(Object.values(newValue)?.pop() ?? null);
|
|
2688
|
+
if (!isEqualValues(newValue)) {
|
|
2689
|
+
setMasterValue(multiSizePropTypeUtil.create(newValue));
|
|
2690
2690
|
return;
|
|
2691
2691
|
}
|
|
2692
|
-
setMasterValue(
|
|
2692
|
+
setMasterValue(Object.values(newValue)?.pop() ?? null);
|
|
2693
2693
|
};
|
|
2694
2694
|
return /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 6 }, !isShowingGeneralIndicator ? /* @__PURE__ */ React56.createElement(ControlFormLabel, null, label) : /* @__PURE__ */ React56.createElement(ControlLabel, null, label)), /* @__PURE__ */ React56.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(import_ui41.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React56.createElement(import_ui41.Box, { flexGrow: 1 }, /* @__PURE__ */ React56.createElement(
|
|
2695
2695
|
SizeControl,
|