@volverjs/form-vue 1.0.0-beta.2 → 1.0.0-beta.4

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.es.js CHANGED
@@ -20,52 +20,52 @@ function G(e) {
20
20
  return typeof e > "u";
21
21
  }
22
22
  const ve = /^[0-9]+$/, ce = ["__proto__", "prototype", "constructor"];
23
- function L(e, l, t) {
23
+ function L(e, s, t) {
24
24
  const o = de(t) ? t : void 0;
25
- if (!H(e) || !Q(l))
25
+ if (!H(e) || !Q(s))
26
26
  return o;
27
- const u = Y(l);
27
+ const u = Y(s);
28
28
  if (u.length !== 0) {
29
29
  for (const r of u) {
30
30
  if (r === "*")
31
31
  continue;
32
- const a = function(s) {
33
- return s.map((f) => G(f) || q(f) ? f : R(f) ? a(f) : f[r]);
32
+ const l = function(a) {
33
+ return a.map((f) => G(f) || q(f) ? f : R(f) ? l(f) : f[r]);
34
34
  };
35
- if (R(e) && !ve.test(r) ? e = a(e) : e = e[r], G(e) || q(e))
35
+ if (R(e) && !ve.test(r) ? e = l(e) : e = e[r], G(e) || q(e))
36
36
  break;
37
37
  }
38
38
  return G(e) ? o : e;
39
39
  }
40
40
  }
41
- function X(e, l, t) {
42
- if (!H(e) || !Q(l))
41
+ function X(e, s, t) {
42
+ if (!H(e) || !Q(s))
43
43
  return;
44
- const o = Y(l);
44
+ const o = Y(s);
45
45
  if (o.length === 0)
46
46
  return;
47
47
  const u = o.length;
48
48
  for (let r = 0; r < u; r++) {
49
- const a = o[r];
49
+ const l = o[r];
50
50
  if (r === u - 1) {
51
- e[a] = t;
51
+ e[l] = t;
52
52
  return;
53
53
  }
54
- if (a === "*" && R(e)) {
55
- const s = o.slice(r + 1).join(".");
54
+ if (l === "*" && R(e)) {
55
+ const a = o.slice(r + 1).join(".");
56
56
  for (const f of e)
57
- X(f, s, t);
57
+ X(f, a, t);
58
58
  return;
59
59
  }
60
- G(e[a]) && (e[a] = {}), e = e[a];
60
+ G(e[l]) && (e[l] = {}), e = e[l];
61
61
  }
62
62
  }
63
63
  function Y(e) {
64
- const l = e.split(/[.]|(?:\[(\d|\*)\])/).filter((t) => !!t);
65
- return l.some((t) => ce.indexOf(t) !== -1) ? [] : l;
64
+ const s = e.split(/[.]|(?:\[(\d|\*)\])/).filter((t) => !!t);
65
+ return s.some((t) => ce.indexOf(t) !== -1) ? [] : s;
66
66
  }
67
67
  var d = /* @__PURE__ */ ((e) => (e.text = "text", e.number = "number", e.email = "email", e.password = "password", e.tel = "tel", e.url = "url", e.search = "search", e.date = "date", e.time = "time", e.datetimeLocal = "datetime-local", e.month = "month", e.week = "week", e.color = "color", e.select = "select", e.checkbox = "checkbox", e.radio = "radio", e.textarea = "textarea", e.radioGroup = "radioGroup", e.checkboxGroup = "checkboxGroup", e.combobox = "combobox", e.custom = "custom", e))(d || {}), x = /* @__PURE__ */ ((e) => (e.invalid = "invalid", e.valid = "valid", e.submitting = "submitting", e.updated = "updated", e.unknown = "unknown", e))(x || {});
68
- const me = (e, l, t, o) => z({
68
+ const me = (e, s, t, o) => z({
69
69
  name: "VvFormField",
70
70
  props: {
71
71
  type: {
@@ -100,8 +100,8 @@ const me = (e, l, t, o) => z({
100
100
  },
101
101
  emits: ["invalid", "valid", "update:formData", "update:modelValue"],
102
102
  expose: ["invalid", "invalidLabel", "errors"],
103
- setup(u, { slots: r, emit: a }) {
104
- const s = k({
103
+ setup(u, { slots: r, emit: l }) {
104
+ const a = k({
105
105
  get() {
106
106
  if (n != null && n.formData)
107
107
  return L(
@@ -114,42 +114,42 @@ const me = (e, l, t, o) => z({
114
114
  Object(n.formData.value),
115
115
  String(u.name),
116
116
  i
117
- ), a("update:modelValue", {
118
- newValue: s.value,
117
+ ), l("update:modelValue", {
118
+ newValue: a.value,
119
119
  formData: n == null ? void 0 : n.formData
120
120
  }));
121
121
  }
122
122
  });
123
123
  D(() => {
124
- s.value === void 0 && u.defaultValue !== void 0 && (s.value = u.defaultValue);
124
+ a.value === void 0 && u.defaultValue !== void 0 && (a.value = u.defaultValue);
125
125
  }), j(() => {
126
- y(), V();
126
+ b(), y();
127
127
  });
128
- const f = U(l, void 0);
128
+ const f = U(s, void 0);
129
129
  f && f.fields.value.add(u.name);
130
- const n = U(e), { props: c, name: b } = P(u), m = k(() => {
130
+ const n = U(e), { props: c, name: h } = P(u), V = k(() => {
131
131
  if (n != null && n.errors.value)
132
132
  return L(n.errors.value, String(u.name));
133
- }), v = k(() => {
133
+ }), m = k(() => {
134
134
  var i;
135
- return (i = m.value) == null ? void 0 : i._errors;
136
- }), h = k(() => m.value !== void 0), y = I(h, () => {
137
- h.value ? (a("invalid", v.value), f && f.errors.value.set(
135
+ return (i = V.value) == null ? void 0 : i._errors;
136
+ }), v = k(() => V.value !== void 0), b = I(v, () => {
137
+ v.value ? (l("invalid", m.value), f && f.errors.value.set(
138
138
  u.name,
139
139
  {
140
- _errors: v.value
140
+ _errors: m.value
141
141
  }
142
- )) : (a("valid", s.value), f && f.errors.value.delete(
142
+ )) : (l("valid", a.value), f && f.errors.value.delete(
143
143
  u.name
144
144
  ));
145
- }), V = I(
145
+ }), y = I(
146
146
  () => n == null ? void 0 : n.formData,
147
147
  () => {
148
- a("update:formData", n == null ? void 0 : n.formData);
148
+ l("update:formData", n == null ? void 0 : n.formData);
149
149
  },
150
150
  { deep: !0 }
151
151
  ), g = (i) => {
152
- s.value = i;
152
+ a.value = i;
153
153
  }, p = k(() => {
154
154
  let i = c.value;
155
155
  return typeof i == "function" && (i = i(n == null ? void 0 : n.formData)), Object.keys(i).reduce(
@@ -159,8 +159,8 @@ const me = (e, l, t, o) => z({
159
159
  }), A = k(() => ({
160
160
  ...p.value,
161
161
  name: p.value.name ?? u.name,
162
- invalid: h.value,
163
- valid: u.showValid ? !!(!h.value && s.value) : void 0,
162
+ invalid: v.value,
163
+ valid: u.showValid ? !!(!v.value && a.value) : void 0,
164
164
  type: ((i) => {
165
165
  if ([
166
166
  d.text,
@@ -179,28 +179,28 @@ const me = (e, l, t, o) => z({
179
179
  ].includes(i))
180
180
  return i;
181
181
  })(u.type),
182
- invalidLabel: v.value,
183
- modelValue: s.value,
182
+ invalidLabel: m.value,
183
+ modelValue: a.value,
184
184
  "onUpdate:modelValue": g
185
185
  }));
186
186
  return M(t, {
187
- name: S(b),
188
- errors: S(m)
187
+ name: S(h),
188
+ errors: S(V)
189
189
  }), { component: k(() => {
190
190
  if (u.type === d.custom)
191
191
  return {
192
192
  render() {
193
193
  var i;
194
194
  return ((i = r.default) == null ? void 0 : i.call(r, {
195
- modelValue: s.value,
195
+ modelValue: a.value,
196
196
  onUpdate: g,
197
197
  submit: n == null ? void 0 : n.submit,
198
198
  validate: n == null ? void 0 : n.validate,
199
- invalid: h.value,
200
- invalidLabel: v.value,
199
+ invalid: v.value,
200
+ invalidLabel: m.value,
201
201
  formData: n == null ? void 0 : n.formData.value,
202
202
  formErrors: n == null ? void 0 : n.errors.value,
203
- errors: m.value
203
+ errors: V.value
204
204
  })) ?? r.defalut;
205
205
  }
206
206
  };
@@ -256,41 +256,41 @@ const me = (e, l, t, o) => z({
256
256
  }
257
257
  return import("@volverjs/ui-vue/vv-input-text");
258
258
  });
259
- }), hasProps: A, invalid: h };
259
+ }), hasProps: A, invalid: v };
260
260
  },
261
261
  render() {
262
262
  return this.is ? w(this.is, this.hasProps, this.$slots) : this.type === d.custom ? w(this.component, null, this.$slots) : w(this.component, this.hasProps, this.$slots);
263
263
  }
264
- }), J = (e, l = {}) => {
264
+ }), J = (e, s = {}) => {
265
265
  const t = (r) => {
266
- let a = r;
267
- for (; a instanceof fe; )
268
- a = a.innerType();
269
- return a instanceof oe && (a = a._def.innerType), a;
266
+ let l = r;
267
+ for (; l instanceof fe; )
268
+ l = l.innerType();
269
+ return l instanceof oe && (l = l._def.innerType), l;
270
270
  }, o = t(e);
271
271
  return {
272
- ...(o instanceof K ? o._def.unknownKeys === "passthrough" : !1) ? l : {},
272
+ ...(o instanceof K ? o._def.unknownKeys === "passthrough" : !1) ? s : {},
273
273
  ...Object.fromEntries(
274
274
  Object.entries(o.shape).map(
275
- ([r, a]) => {
276
- const s = l[r];
277
- let f = t(a), n;
278
- if (f instanceof ue && (n = f._def.defaultValue(), f = f._def.innerType), s === null && f instanceof le)
279
- return [r, s];
275
+ ([r, l]) => {
276
+ const a = s[r];
277
+ let f = t(l), n;
278
+ if (f instanceof ue && (n = f._def.defaultValue(), f = f._def.innerType), a === null && f instanceof le)
279
+ return [r, a];
280
280
  if (f instanceof se) {
281
- const c = a.safeParse(s);
281
+ const c = l.safeParse(a);
282
282
  if (c.success)
283
283
  return [r, c.data ?? n];
284
284
  }
285
- if (f instanceof ie && Array.isArray(s) && s.length) {
285
+ if (f instanceof ie && Array.isArray(a) && a.length) {
286
286
  const c = t(f._def.type);
287
287
  if (c instanceof K)
288
288
  return [
289
289
  r,
290
- s.map(
291
- (b) => J(
290
+ a.map(
291
+ (h) => J(
292
292
  c,
293
- b && typeof b == "object" ? b : void 0
293
+ h && typeof h == "object" ? h : void 0
294
294
  )
295
295
  ) ?? n
296
296
  ];
@@ -299,18 +299,18 @@ const me = (e, l, t, o) => z({
299
299
  r,
300
300
  J(
301
301
  f,
302
- s && typeof s == "object" ? s : n
302
+ a && typeof a == "object" ? a : n
303
303
  )
304
304
  ] : [r, n];
305
305
  }
306
306
  )
307
307
  )
308
308
  };
309
- }, he = (e, l, t, o) => {
310
- const u = C(), r = C(), a = C(), s = async (m = a.value) => {
309
+ }, he = (e, s, t, o) => {
310
+ const u = C(), r = C(), l = k(() => r.value === x.invalid), a = C(), f = async (m = a.value) => {
311
311
  const v = await e.safeParseAsync(m);
312
312
  return v.success ? (u.value = void 0, r.value = x.valid, a.value = v.data, !0) : (u.value = v.error.format(), r.value = x.invalid, !1);
313
- }, f = async () => await s() ? (r.value = x.submitting, !0) : !1, { ignoreUpdates: n, stop: c } = ae(
313
+ }, n = async () => await f() ? (r.value = x.submitting, !0) : !1, { ignoreUpdates: c, stop: h } = ae(
314
314
  a,
315
315
  () => {
316
316
  r.value = x.updated;
@@ -319,7 +319,7 @@ const me = (e, l, t, o) => z({
319
319
  deep: !0,
320
320
  eventFilter: ne((t == null ? void 0 : t.updateThrottle) ?? 500)
321
321
  }
322
- ), b = z({
322
+ ), V = z({
323
323
  name: "VvForm",
324
324
  props: {
325
325
  continuosValidation: {
@@ -342,38 +342,38 @@ const me = (e, l, t, o) => z({
342
342
  emits: ["invalid", "valid", "submit", "update:modelValue"],
343
343
  expose: ["submit", "validate", "errors", "status", "valid", "invalid"],
344
344
  setup(m, { emit: v }) {
345
- a.value = J(
345
+ return a.value = J(
346
346
  e,
347
347
  E(m.modelValue)
348
348
  ), I(
349
349
  () => m.modelValue,
350
- (y) => {
351
- if (y) {
352
- const V = ee(y) ? E(y) : y;
353
- a.value = typeof (V == null ? void 0 : V.clone) == "function" ? V.clone() : JSON.parse(JSON.stringify(V));
350
+ (b) => {
351
+ if (b) {
352
+ const y = ee(b) ? E(b) : b;
353
+ a.value = typeof (y == null ? void 0 : y.clone) == "function" ? y.clone() : JSON.parse(JSON.stringify(y));
354
354
  }
355
355
  },
356
356
  { deep: !0 }
357
- ), I(r, async (y) => {
358
- var V, g, p, A, W;
359
- if (y === x.invalid) {
357
+ ), I(r, async (b) => {
358
+ var y, g, p, A, W;
359
+ if (b === x.invalid) {
360
360
  const i = E(
361
361
  u.value
362
362
  );
363
- v("invalid", i), (V = t == null ? void 0 : t.onInvalid) == null || V.call(t, i);
363
+ v("invalid", i), (y = t == null ? void 0 : t.onInvalid) == null || y.call(t, i);
364
364
  return;
365
365
  }
366
- if (y === x.valid) {
366
+ if (b === x.valid) {
367
367
  const i = E(a.value);
368
368
  v("valid", i), (g = t == null ? void 0 : t.onValid) == null || g.call(t, i), v("update:modelValue", i), (p = t == null ? void 0 : t.onUpdate) == null || p.call(t, i);
369
369
  return;
370
370
  }
371
- if (y === x.submitting) {
371
+ if (b === x.submitting) {
372
372
  const i = E(a.value);
373
373
  v("submit", i), (A = t == null ? void 0 : t.onSubmit) == null || A.call(t, i);
374
374
  }
375
- if (y === x.updated) {
376
- if ((u.value || t != null && t.continuosValidation || m.continuosValidation) && await s(), !a.value || !m.modelValue || JSON.stringify(a.value) !== JSON.stringify(m.modelValue)) {
375
+ if (b === x.updated) {
376
+ if ((u.value || t != null && t.continuosValidation || m.continuosValidation) && await f(), !a.value || !m.modelValue || JSON.stringify(a.value) !== JSON.stringify(m.modelValue)) {
377
377
  const i = E(
378
378
  a.value
379
379
  );
@@ -381,32 +381,30 @@ const me = (e, l, t, o) => z({
381
381
  }
382
382
  r.value === x.updated && (r.value = x.unknown);
383
383
  }
384
- });
385
- const h = k(() => r.value === x.invalid);
386
- return M(l, {
384
+ }), M(s, {
387
385
  formData: a,
388
- submit: f,
389
- validate: s,
390
- ignoreUpdates: n,
391
- stopUpdatesWatch: c,
386
+ submit: n,
387
+ validate: f,
388
+ ignoreUpdates: c,
389
+ stopUpdatesWatch: h,
392
390
  errors: S(u),
393
391
  status: S(r),
394
- invalid: h
392
+ invalid: l
395
393
  }), {
396
394
  formData: a,
397
- submit: f,
398
- validate: s,
399
- ignoreUpdates: n,
400
- stopUpdatesWatch: c,
395
+ submit: n,
396
+ validate: f,
397
+ ignoreUpdates: c,
398
+ stopUpdatesWatch: h,
401
399
  errors: S(u),
402
400
  status: S(r),
403
- invalid: h
401
+ invalid: l
404
402
  };
405
403
  },
406
404
  render() {
407
405
  const m = () => {
408
- var v, h;
409
- return ((h = (v = this.$slots) == null ? void 0 : v.default) == null ? void 0 : h.call(v, {
406
+ var v, b;
407
+ return ((b = (v = this.$slots) == null ? void 0 : v.default) == null ? void 0 : b.call(v, {
410
408
  formData: this.formData,
411
409
  submit: this.submit,
412
410
  validate: this.validate,
@@ -441,17 +439,18 @@ const me = (e, l, t, o) => z({
441
439
  return {
442
440
  errors: u,
443
441
  status: r,
442
+ invalid: l,
444
443
  formData: a,
445
- validate: s,
446
- submit: f,
447
- ignoreUpdates: n,
448
- stopUpdatesWatch: c,
444
+ validate: f,
445
+ submit: n,
446
+ ignoreUpdates: c,
447
+ stopUpdatesWatch: h,
449
448
  /**
450
449
  * An hack to add types to the default slot
451
450
  */
452
- VvForm: b
451
+ VvForm: V
453
452
  };
454
- }, be = (e, l) => z({
453
+ }, be = (e, s) => z({
455
454
  name: "VvFormWrapper",
456
455
  props: {
457
456
  name: {
@@ -466,27 +465,27 @@ const me = (e, l, t, o) => z({
466
465
  emits: ["invalid", "valid"],
467
466
  expose: ["fields", "invalid"],
468
467
  setup(o, { emit: u }) {
469
- const r = U(e), a = U(l, void 0), s = C(/* @__PURE__ */ new Set()), f = C(/* @__PURE__ */ new Map()), { name: n } = P(o);
470
- M(l, {
468
+ const r = U(e), l = U(s, void 0), a = C(/* @__PURE__ */ new Set()), f = C(/* @__PURE__ */ new Map()), { name: n } = P(o);
469
+ M(s, {
471
470
  name: S(n),
472
471
  errors: f,
473
- fields: s
472
+ fields: a
474
473
  }), I(
475
- s,
476
- (b) => {
477
- a != null && a.fields && b.forEach((m) => {
478
- a == null || a.fields.value.add(m);
474
+ a,
475
+ (h) => {
476
+ l != null && l.fields && h.forEach((V) => {
477
+ l == null || l.fields.value.add(V);
479
478
  });
480
479
  },
481
480
  { deep: !0 }
482
481
  ), I(
483
482
  () => new Map(f.value),
484
- (b, m) => {
485
- a != null && a.errors && (Array.from(m.keys()).forEach((v) => {
486
- a.errors.value.delete(v);
487
- }), Array.from(b.keys()).forEach((v) => {
488
- const h = b.get(v);
489
- h && a.errors.value.set(v, h);
483
+ (h, V) => {
484
+ l != null && l.errors && (Array.from(V.keys()).forEach((m) => {
485
+ l.errors.value.delete(m);
486
+ }), Array.from(h.keys()).forEach((m) => {
487
+ const v = h.get(m);
488
+ v && l.errors.value.set(m, v);
490
489
  }));
491
490
  },
492
491
  { deep: !0 }
@@ -500,7 +499,7 @@ const me = (e, l, t, o) => z({
500
499
  submit: r == null ? void 0 : r.submit,
501
500
  validate: r == null ? void 0 : r.validate,
502
501
  invalid: c,
503
- fields: s,
502
+ fields: a,
504
503
  fieldsErrors: f
505
504
  };
506
505
  },
@@ -508,8 +507,8 @@ const me = (e, l, t, o) => z({
508
507
  var o, u;
509
508
  return this.tag ? w(this.tag, null, {
510
509
  default: () => {
511
- var r, a;
512
- return ((a = (r = this.$slots).default) == null ? void 0 : a.call(r, {
510
+ var r, l;
511
+ return ((l = (r = this.$slots).default) == null ? void 0 : l.call(r, {
513
512
  invalid: this.invalid,
514
513
  formData: this.formData,
515
514
  submit: this.submit,
@@ -527,7 +526,7 @@ const me = (e, l, t, o) => z({
527
526
  fieldsErrors: this.fieldsErrors
528
527
  })) ?? this.$slots.defalut;
529
528
  }
530
- }), ye = (e, l) => {
529
+ }), ye = (e, s) => {
531
530
  const t = z({
532
531
  name: "VvFormTemplate",
533
532
  props: {
@@ -541,14 +540,14 @@ const me = (e, l, t, o) => z({
541
540
  if (r != null && r.formData)
542
541
  return () => {
543
542
  var n;
544
- const a = typeof o.schema == "function" ? o.schema(r) : o.schema;
545
- let s;
546
- const f = a.reduce((c, b) => {
547
- const m = typeof b == "function" ? b(r) : b, {
548
- vvIs: v,
549
- vvName: h,
550
- vvSlots: y,
551
- vvChildren: V,
543
+ const l = typeof o.schema == "function" ? o.schema(r) : o.schema;
544
+ let a;
545
+ const f = l.reduce((c, h) => {
546
+ const V = typeof h == "function" ? h(r) : h, {
547
+ vvIs: m,
548
+ vvName: v,
549
+ vvSlots: b,
550
+ vvChildren: y,
552
551
  vvIf: g,
553
552
  vvElseIf: p,
554
553
  vvType: A,
@@ -556,44 +555,44 @@ const me = (e, l, t, o) => z({
556
555
  vvShowValid: i,
557
556
  vvContent: _,
558
557
  ...$
559
- } = m;
558
+ } = V;
560
559
  if (g !== void 0) {
561
- if (typeof g == "string" ? s = !!L(
560
+ if (typeof g == "string" ? a = !!L(
562
561
  Object(r.formData.value),
563
562
  g
564
- ) : typeof g == "function" ? s = B(g(r)) : s = B(g), !s)
563
+ ) : typeof g == "function" ? a = B(g(r)) : a = B(g), !a)
565
564
  return c;
566
- } else if (p !== void 0 && s !== void 0) {
567
- if (s || (typeof p == "string" ? s = !!L(
565
+ } else if (p !== void 0 && a !== void 0) {
566
+ if (a || (typeof p == "string" ? a = !!L(
568
567
  Object(r.formData.value),
569
568
  p
570
- ) : typeof p == "function" ? s = B(p(r)) : s = B(p), !s))
569
+ ) : typeof p == "function" ? a = B(p(r)) : a = B(p), !a))
571
570
  return c;
572
571
  } else
573
- s = void 0;
574
- const Z = V ? w(t, {
575
- schema: V
572
+ a = void 0;
573
+ const Z = y ? w(t, {
574
+ schema: y
576
575
  }) : void 0;
577
- return h ? (c.push(
576
+ return v ? (c.push(
578
577
  w(
579
- l,
578
+ s,
580
579
  {
581
- name: h,
582
- is: v,
580
+ name: v,
581
+ is: m,
583
582
  type: A,
584
583
  defaultValue: W,
585
584
  showValid: i,
586
585
  props: $
587
586
  },
588
- y ?? Z ?? _
587
+ b ?? Z ?? _
589
588
  )
590
- ), c) : v ? (c.push(
589
+ ), c) : m ? (c.push(
591
590
  w(
592
- v,
591
+ m,
593
592
  $,
594
- y ?? Z ?? _
593
+ b ?? Z ?? _
595
594
  )
596
- ), c) : (V && c.push(Z), c);
595
+ ), c) : (y && c.push(Z), c);
597
596
  }, []);
598
597
  return f.push(
599
598
  (n = u == null ? void 0 : u.default) == null ? void 0 : n.call(u, {
@@ -609,56 +608,58 @@ const me = (e, l, t, o) => z({
609
608
  }
610
609
  });
611
610
  return t;
612
- }, N = (e, l = {}) => {
611
+ }, N = (e, s = {}) => {
613
612
  const t = Symbol(), o = Symbol(), u = Symbol(), r = be(
614
613
  t,
615
614
  o
616
- ), a = me(
615
+ ), l = me(
617
616
  t,
618
617
  o,
619
618
  u,
620
- l
621
- ), s = ye(t, a), {
619
+ s
620
+ ), a = ye(t, l), {
622
621
  VvForm: f,
623
622
  errors: n,
624
623
  status: c,
625
- formData: b,
624
+ invalid: h,
625
+ formData: V,
626
626
  validate: m,
627
627
  submit: v,
628
- ignoreUpdates: h,
628
+ ignoreUpdates: b,
629
629
  stopUpdatesWatch: y
630
- } = he(e, t, l, s);
630
+ } = he(e, t, s, a);
631
631
  return {
632
632
  VvForm: f,
633
633
  VvFormWrapper: r,
634
- VvFormField: a,
635
- VvFormTemplate: s,
634
+ VvFormField: l,
635
+ VvFormTemplate: a,
636
636
  formInjectionKey: t,
637
637
  formWrapperInjectionKey: o,
638
638
  formFieldInjectionKey: u,
639
639
  errors: n,
640
640
  status: c,
641
- formData: b,
641
+ invalid: h,
642
+ formData: V,
642
643
  validate: m,
643
644
  submit: v,
644
- ignoreUpdates: h,
645
+ ignoreUpdates: b,
645
646
  stopUpdatesWatch: y
646
647
  };
647
648
  }, T = Symbol(), xe = (e) => {
648
- let l = {};
649
- return e.schema && (l = N(e.schema, e)), {
650
- ...l,
649
+ let s = {};
650
+ return e.schema && (s = N(e.schema, e)), {
651
+ ...s,
651
652
  install(t, { global: o = !1 } = {}) {
652
- t.provide(T, e), o && (t.config.globalProperties.$vvForm = e, l != null && l.VvForm && t.component("VvForm", l.VvForm), l != null && l.VvFormWrapper && t.component("VvFormWrapper", l.VvFormWrapper), l != null && l.VvFormField && t.component("VvFormField", l.VvFormField), l != null && l.VvFormTemplate && t.component("VvFormTemplate", l.VvFormTemplate));
653
+ t.provide(T, e), o && (t.config.globalProperties.$vvForm = e, s != null && s.VvForm && t.component("VvForm", s.VvForm), s != null && s.VvFormWrapper && t.component("VvFormWrapper", s.VvFormWrapper), s != null && s.VvFormField && t.component("VvFormField", s.VvFormField), s != null && s.VvFormTemplate && t.component("VvFormTemplate", s.VvFormTemplate));
653
654
  }
654
655
  };
655
- }, ke = (e, l = {}) => te() ? N(
656
+ }, ke = (e, s = {}) => te() ? N(
656
657
  e,
657
658
  {
658
659
  ...U(T, {}),
659
- ...l
660
+ ...s
660
661
  }
661
- ) : N(e, l), we = (e, l = {}) => N(e, l);
662
+ ) : N(e, s), we = (e, s = {}) => N(e, s);
662
663
  export {
663
664
  d as FormFieldType,
664
665
  xe as createForm,