@dzeio/schema 0.8.0 → 0.9.0

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/Schema.js CHANGED
@@ -280,6 +280,9 @@ __decorateClass([
280
280
  __decorateClass([
281
281
  parsable()
282
282
  ], _SchemaItem.prototype, "in", 1);
283
+ __decorateClass([
284
+ parsable()
285
+ ], _SchemaItem.prototype, "setInvalidError", 1);
283
286
  var SchemaItem = _SchemaItem;
284
287
 
285
288
  // src/items/array.ts
@@ -446,8 +449,8 @@ function parseFormData(schema, data, opts) {
446
449
  if (value instanceof SchemaObject) {
447
450
  handleSchemaForBoolean(value.model, keys);
448
451
  }
449
- if (value instanceof SchemaBoolean) {
450
- (0, import_object_util3.objectSet)(record, keys, !!data.get(keys.join(".")));
452
+ if (value instanceof SchemaBoolean && typeof (0, import_object_util3.objectGet)(record, keys) === "undefined") {
453
+ (0, import_object_util3.objectSet)(record, keys, false);
451
454
  }
452
455
  };
453
456
  const handleSchemaForBoolean = (model, keys = []) => {
package/dist/Schema.mjs CHANGED
@@ -230,6 +230,9 @@ __decorateClass([
230
230
  __decorateClass([
231
231
  parsable()
232
232
  ], _SchemaItem.prototype, "in", 1);
233
+ __decorateClass([
234
+ parsable()
235
+ ], _SchemaItem.prototype, "setInvalidError", 1);
233
236
  var SchemaItem = _SchemaItem;
234
237
 
235
238
  // src/items/array.ts
@@ -396,8 +399,8 @@ function parseFormData(schema, data, opts) {
396
399
  if (value instanceof SchemaObject) {
397
400
  handleSchemaForBoolean(value.model, keys);
398
401
  }
399
- if (value instanceof SchemaBoolean) {
400
- objectSet2(record, keys, !!data.get(keys.join(".")));
402
+ if (value instanceof SchemaBoolean && typeof objectGet(record, keys) === "undefined") {
403
+ objectSet2(record, keys, false);
401
404
  }
402
405
  };
403
406
  const handleSchemaForBoolean = (model, keys = []) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dzeio/schema",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "dependencies": {
5
5
  "@dzeio/object-util": "^1.9.2"
6
6
  },