jedison 0.3.7 → 0.3.8
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/CHANGELOG.md +4 -0
- package/dist/cjs/jedison.cjs +1 -1
- package/dist/cjs/jedison.cjs.map +1 -1
- package/dist/esm/jedison.js +10 -1
- package/dist/esm/jedison.js.map +1 -1
- package/dist/umd/jedison.umd.js +1 -1
- package/dist/umd/jedison.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/jedison.js
CHANGED
|
@@ -128,7 +128,7 @@ function combineDeep(target, ...sources) {
|
|
|
128
128
|
const overwriteExistingProperties = (obj1, obj2) => {
|
|
129
129
|
Object.keys(obj2).forEach((key) => {
|
|
130
130
|
if (key in obj1) {
|
|
131
|
-
if (isSet(obj1[key]) && isSet(obj2[key]) && (isObject(obj1[key]) && isObject(obj2[key]) || isArray(obj1[key]) && isArray(obj2[key]) || isString(obj1[key]) && isString(obj2[key]) || isNumber(obj1[key]) && isNumber(obj2[key]) || isBoolean(obj1[key]) && isBoolean(obj2[key]))) {
|
|
131
|
+
if (isSet(obj1[key]) && isSet(obj2[key]) && (isObject(obj1[key]) && isObject(obj2[key]) || isArray(obj1[key]) && isArray(obj2[key]) || isString(obj1[key]) && isString(obj2[key]) || isNumber(obj1[key]) && isNumber(obj2[key]) || isBoolean(obj1[key]) && isBoolean(obj2[key]) || isNull(obj1[key]) && isNull(obj2[key]))) {
|
|
132
132
|
if (isObject(obj1[key]) && isObject(obj2[key])) {
|
|
133
133
|
overwriteExistingProperties(obj1[key], obj2[key]);
|
|
134
134
|
} else {
|
|
@@ -2249,6 +2249,14 @@ class InstanceIfThenElse extends Instance {
|
|
|
2249
2249
|
this.activeInstance.register();
|
|
2250
2250
|
this.instances.forEach((instance, index2) => {
|
|
2251
2251
|
instance.off("notifyParent");
|
|
2252
|
+
if (instance.children && isObject(value)) {
|
|
2253
|
+
instance.children.forEach((child) => {
|
|
2254
|
+
const shouldUpdateValue = child.isMultiple && hasOwn(value, child.getKey());
|
|
2255
|
+
if (shouldUpdateValue) {
|
|
2256
|
+
child.setValue(value[child.getKey()], false, "api");
|
|
2257
|
+
}
|
|
2258
|
+
});
|
|
2259
|
+
}
|
|
2252
2260
|
const startingValue = this.instanceStartingValues[index2];
|
|
2253
2261
|
const currentValue = instance.getValue();
|
|
2254
2262
|
let instanceValue = value;
|
|
@@ -2348,6 +2356,7 @@ class InstanceMultiple extends Instance {
|
|
|
2348
2356
|
this.schemas = [];
|
|
2349
2357
|
this.switcherOptionValues = [];
|
|
2350
2358
|
this.switcherOptionsLabels = [];
|
|
2359
|
+
this.isMultiple = true;
|
|
2351
2360
|
this.on("set-value", () => {
|
|
2352
2361
|
this.onSetValue();
|
|
2353
2362
|
});
|