Comparing version 1.0.0-pre-27 to 1.0.0-pre-28
@@ -13,2 +13,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import { isDryvProxy } from './isDryvProxy'; | ||
const excludedFromUpdate = { | ||
$model: true, | ||
toJSON: true, | ||
parent: true, | ||
_isDryvValidatable: true, | ||
session: true | ||
}; | ||
export function dryvValidatableObject(field, parentOrSession, model, options) { | ||
@@ -79,3 +86,8 @@ const parentIsValidatable = isDryvValidatable(parentOrSession); | ||
const model = this.value; | ||
Object.entries(value).forEach(([key, entry]) => { | ||
const keys = Array.from(new Set([ | ||
...Object.keys(value), | ||
...Object.keys(model).filter((k) => !excludedFromUpdate[k]) | ||
])); | ||
keys.forEach((key) => { | ||
const entry = value[key]; | ||
const newValue = isDryvValidatable(entry) ? entry.value : entry; | ||
@@ -82,0 +94,0 @@ const oldValue = model[key]; |
@@ -270,3 +270,2 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
field.group = result.group; | ||
window._field = field; | ||
const type = (_a = result.type) === null || _a === void 0 ? void 0 : _a.toLowerCase(); | ||
@@ -273,0 +272,0 @@ return type === 'success' |
{ | ||
"name": "dryvjs", | ||
"version": "1.0.0-pre-27", | ||
"version": "1.0.0-pre-28", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
79118
1079