@volverjs/form-vue 1.0.0-beta.26 → 1.0.0-beta.27

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
@@ -1,100 +1,100 @@
1
- import { ref as C, computed as I, readonly as _, defineComponent as q, toRaw as U, watch as W, isProxy as ye, onMounted as j, provide as F, h as R, withModifiers as ue, toRefs as te, useId as ie, inject as N, onBeforeUnmount as J, unref as K, resolveComponent as L, defineAsyncComponent as he, getCurrentInstance as fe } from "vue";
1
+ import { ref as C, computed as I, readonly as N, defineComponent as q, toRaw as U, watch as W, isProxy as ce, onMounted as j, provide as F, h as R, withModifiers as ue, toRefs as te, useId as ie, inject as _, onBeforeUnmount as J, unref as K, resolveComponent as L, defineAsyncComponent as ye, getCurrentInstance as he } from "vue";
2
2
  import { watchIgnorable as me, throttleFilter as be } from "@vueuse/core";
3
- import { ZodObject as H, ZodDefault as Ve, ZodNullable as pe, ZodSchema as ge, ZodArray as Oe, ZodRecord as we, ZodEffects as le, ZodOptional as ne, ZodError as xe } from "zod";
4
- var b = /* @__PURE__ */ ((r) => (r.text = "text", r.number = "number", r.email = "email", r.password = "password", r.tel = "tel", r.url = "url", r.search = "search", r.date = "date", r.time = "time", r.datetimeLocal = "datetime-local", r.month = "month", r.week = "week", r.color = "color", r.select = "select", r.checkbox = "checkbox", r.radio = "radio", r.textarea = "textarea", r.radioGroup = "radioGroup", r.checkboxGroup = "checkboxGroup", r.combobox = "combobox", r.custom = "custom", r))(b || {}), G = /* @__PURE__ */ ((r) => (r.invalid = "invalid", r.valid = "valid", r.submitting = "submitting", r.reset = "reset", r.updated = "updated", r.unknown = "unknown", r))(G || {});
5
- function X(r, s = {}) {
6
- const e = (v) => {
7
- let f = v;
8
- for (; f instanceof le; )
9
- f = f.innerType();
10
- return f instanceof ne && (f = f._def.innerType), f;
11
- }, c = (v) => {
12
- let f = v;
13
- for (; f instanceof le; )
14
- f = f.innerType();
15
- return f instanceof ne;
3
+ import { ZodObject as H, ZodDefault as pe, ZodNullable as Ve, ZodSchema as ge, ZodArray as Oe, ZodRecord as we, ZodEffects as le, ZodOptional as ne, ZodError as xe } from "zod";
4
+ var p = /* @__PURE__ */ ((r) => (r.text = "text", r.number = "number", r.email = "email", r.password = "password", r.tel = "tel", r.url = "url", r.search = "search", r.date = "date", r.time = "time", r.datetimeLocal = "datetime-local", r.month = "month", r.week = "week", r.color = "color", r.select = "select", r.checkbox = "checkbox", r.radio = "radio", r.textarea = "textarea", r.radioGroup = "radioGroup", r.checkboxGroup = "checkboxGroup", r.combobox = "combobox", r.custom = "custom", r))(p || {}), G = /* @__PURE__ */ ((r) => (r.invalid = "invalid", r.valid = "valid", r.submitting = "submitting", r.reset = "reset", r.updated = "updated", r.unknown = "unknown", r))(G || {});
5
+ function X(r, i = {}) {
6
+ const e = (d) => {
7
+ let o = d;
8
+ for (; o instanceof le; )
9
+ o = o.innerType();
10
+ return o instanceof ne && (o = o._def.innerType), o;
11
+ }, c = (d) => {
12
+ let o = d;
13
+ for (; o instanceof le; )
14
+ o = o.innerType();
15
+ return o instanceof ne;
16
16
  }, a = e(r);
17
17
  return {
18
- ...(a instanceof H ? a._def.unknownKeys === "passthrough" : !1) ? s : {},
18
+ ...(a instanceof H ? a._def.unknownKeys === "passthrough" : !1) ? i : {},
19
19
  ...Object.fromEntries(
20
20
  Object.entries(a.shape).map(
21
- ([v, f]) => {
22
- const i = s[v], p = c(f);
23
- let d = e(f), l;
24
- if (d instanceof Ve && (l = d._def.defaultValue(), d = d._def.innerType), i === null && d instanceof pe)
25
- return [v, i];
26
- if (i == null && p)
27
- return [v, l];
28
- if (d instanceof ge) {
29
- const m = f.safeParse(i);
30
- if (m.success)
31
- return [v, m.data ?? l];
21
+ ([d, o]) => {
22
+ const f = i[d], V = c(o);
23
+ let v = e(o), n;
24
+ if (v instanceof pe && (n = v._def.defaultValue(), v = v._def.innerType), f === null && v instanceof Ve)
25
+ return [d, f];
26
+ if (f == null && V)
27
+ return [d, n];
28
+ if (v instanceof ge) {
29
+ const h = o.safeParse(f);
30
+ if (h.success)
31
+ return [d, h.data ?? n];
32
32
  }
33
- if (d instanceof Oe && Array.isArray(i) && i.length) {
34
- const m = e(d._def.type);
35
- if (m instanceof H)
33
+ if (v instanceof Oe && Array.isArray(f) && f.length) {
34
+ const h = e(v._def.type);
35
+ if (h instanceof H)
36
36
  return [
37
- v,
38
- i.map(
39
- (y) => X(
40
- m,
41
- y && typeof y == "object" ? y : void 0
37
+ d,
38
+ f.map(
39
+ (b) => X(
40
+ h,
41
+ b && typeof b == "object" ? b : void 0
42
42
  )
43
43
  )
44
44
  ];
45
45
  }
46
- if (d instanceof we && i) {
47
- const m = e(d._def.valueType);
48
- if (m instanceof H)
49
- return [v, Object.keys(i).reduce((y, V) => (y[V] = X(m, i[V]), y), {})];
46
+ if (v instanceof we && f) {
47
+ const h = e(v._def.valueType);
48
+ if (h instanceof H)
49
+ return [d, Object.keys(f).reduce((b, m) => (b[m] = X(h, f[m]), b), {})];
50
50
  }
51
- return d instanceof H ? [
52
- v,
51
+ return v instanceof H ? [
52
+ d,
53
53
  X(
54
- d,
55
- i && typeof i == "object" ? i : l
54
+ v,
55
+ f && typeof f == "object" ? f : n
56
56
  )
57
- ] : [v, l];
57
+ ] : [d, n];
58
58
  }
59
59
  )
60
60
  )
61
61
  };
62
62
  }
63
- function Ie(r, s, e, c, a) {
64
- const t = C(), v = C(), f = I(() => v.value === G.invalid), i = C(), p = C(!1);
65
- let d;
66
- const l = (k) => {
63
+ function Ie(r, i, e, c, a) {
64
+ const t = C(), d = C(), o = I(() => d.value === G.invalid), f = C(), V = C(!1);
65
+ let v;
66
+ const n = (k) => {
67
67
  const O = X(r, k);
68
68
  if (e != null && e.class) {
69
- const n = e.class;
70
- return new n(O);
69
+ const l = e.class;
70
+ return new l(O);
71
71
  }
72
72
  return O;
73
- }, m = async (k = i.value, O) => {
74
- if (d = O, p.value)
73
+ }, h = async (k = f.value, O) => {
74
+ if (v = O, V.value)
75
75
  return !0;
76
- const n = await r.safeParseAsync(k);
77
- if (!n.success) {
78
- if (v.value = G.invalid, !O)
79
- return t.value = n.error.format(), !1;
80
- const w = n.error.issues.filter(($) => O.has($.path.join(".")));
76
+ const l = await r.safeParseAsync(k);
77
+ if (!l.success) {
78
+ if (d.value = G.invalid, !O)
79
+ return t.value = l.error.format(), !1;
80
+ const w = l.error.issues.filter(($) => O.has($.path.join(".")));
81
81
  return w.length ? (t.value = new xe(w).format(), !1) : (t.value = void 0, !0);
82
82
  }
83
- return t.value = void 0, v.value = G.valid, i.value = l(n.data), !0;
84
- }, y = () => {
85
- t.value = void 0, v.value = void 0, d = void 0;
86
- }, V = () => {
87
- i.value = l(), y(), v.value = G.reset;
88
- }, o = async () => p.value || !await m() ? !1 : (v.value = G.submitting, !0), { ignoreUpdates: x, stop: g } = me(
89
- i,
83
+ return t.value = void 0, d.value = G.valid, f.value = n(l.data), !0;
84
+ }, b = () => {
85
+ t.value = void 0, d.value = void 0, v = void 0;
86
+ }, m = () => {
87
+ f.value = n(), b(), d.value = G.reset;
88
+ }, s = async () => V.value || !await h() ? !1 : (d.value = G.submitting, !0), { ignoreUpdates: x, stop: g } = me(
89
+ f,
90
90
  () => {
91
- v.value = G.updated;
91
+ d.value = G.updated;
92
92
  },
93
93
  {
94
94
  deep: !0,
95
95
  eventFilter: be((e == null ? void 0 : e.updateThrottle) ?? 500)
96
96
  }
97
- ), E = _(t), A = _(v), B = q({
97
+ ), E = N(t), A = N(d), B = q({
98
98
  name: "VvForm",
99
99
  props: {
100
100
  continuousValidation: {
@@ -141,20 +141,20 @@ function Ie(r, s, e, c, a) {
141
141
  ],
142
142
  slots: Object,
143
143
  setup(k, { emit: O }) {
144
- return i.value = l(U(k.modelValue)), W(
144
+ return f.value = n(U(k.modelValue)), W(
145
145
  () => k.modelValue,
146
- (n) => {
147
- if (n) {
148
- const w = ye(n) ? U(n) : n;
149
- if (JSON.stringify(w) === JSON.stringify(U(i.value)))
146
+ (l) => {
147
+ if (l) {
148
+ const w = ce(l) ? U(l) : l;
149
+ if (JSON.stringify(w) === JSON.stringify(U(f.value)))
150
150
  return;
151
- i.value = typeof (w == null ? void 0 : w.clone) == "function" ? w.clone() : JSON.parse(JSON.stringify(w));
151
+ f.value = typeof (w == null ? void 0 : w.clone) == "function" ? w.clone() : JSON.parse(JSON.stringify(w));
152
152
  }
153
153
  },
154
154
  { deep: !0 }
155
- ), W(v, async (n) => {
155
+ ), W(d, async (l) => {
156
156
  var w, $, M, T, P, ee;
157
- if (n === G.invalid) {
157
+ if (l === G.invalid) {
158
158
  const u = U(t.value);
159
159
  O("invalid", u), (w = e == null ? void 0 : e.onInvalid) == null || w.call(
160
160
  e,
@@ -162,80 +162,80 @@ function Ie(r, s, e, c, a) {
162
162
  );
163
163
  return;
164
164
  }
165
- if (n === G.valid) {
166
- const u = U(i.value);
165
+ if (l === G.valid) {
166
+ const u = U(f.value);
167
167
  O("valid", u), ($ = e == null ? void 0 : e.onValid) == null || $.call(e, u), O("update:modelValue", u), (M = e == null ? void 0 : e.onUpdate) == null || M.call(e, u);
168
168
  return;
169
169
  }
170
- if (n === G.submitting) {
171
- const u = U(i.value);
170
+ if (l === G.submitting) {
171
+ const u = U(f.value);
172
172
  O("submit", u), (T = e == null ? void 0 : e.onSubmit) == null || T.call(e, u);
173
173
  return;
174
174
  }
175
- if (n === G.reset) {
176
- const u = U(i.value);
175
+ if (l === G.reset) {
176
+ const u = U(f.value);
177
177
  O("reset", u), (P = e == null ? void 0 : e.onReset) == null || P.call(e, u);
178
178
  return;
179
179
  }
180
- if (n === G.updated) {
181
- if ((t.value || e != null && e.continuousValidation || k.continuousValidation) && await m(void 0, d), !i.value || !k.modelValue || JSON.stringify(i.value) !== JSON.stringify(k.modelValue)) {
182
- const u = U(i.value);
180
+ if (l === G.updated) {
181
+ if ((t.value || e != null && e.continuousValidation || k.continuousValidation) && await h(void 0, v), !f.value || !k.modelValue || JSON.stringify(f.value) !== JSON.stringify(k.modelValue)) {
182
+ const u = U(f.value);
183
183
  O("update:modelValue", u), (ee = e == null ? void 0 : e.onUpdate) == null || ee.call(e, u);
184
184
  }
185
- v.value === G.updated && (v.value = G.unknown);
185
+ d.value === G.updated && (d.value = G.unknown);
186
186
  }
187
187
  }), j(() => {
188
- p.value = k.readonly;
188
+ V.value = k.readonly;
189
189
  }), W(
190
190
  () => k.readonly,
191
- (n) => {
192
- p.value = n;
191
+ (l) => {
192
+ V.value = l;
193
193
  }
194
- ), W(p, (n) => {
195
- n !== k.readonly && O("update:readonly", p.value);
196
- }), F(s, {
197
- clear: y,
194
+ ), W(V, (l) => {
195
+ l !== k.readonly && O("update:readonly", V.value);
196
+ }), F(i, {
197
+ clear: b,
198
198
  errors: E,
199
- formData: i,
199
+ formData: f,
200
200
  ignoreUpdates: x,
201
- invalid: f,
202
- readonly: p,
203
- reset: V,
201
+ invalid: o,
202
+ readonly: V,
203
+ reset: m,
204
204
  status: A,
205
205
  stopUpdatesWatch: g,
206
- submit: o,
207
- validate: m,
206
+ submit: s,
207
+ validate: h,
208
208
  wrappers: a
209
209
  }), {
210
- clear: y,
210
+ clear: b,
211
211
  errors: E,
212
- formData: i,
212
+ formData: f,
213
213
  ignoreUpdates: x,
214
- invalid: f,
215
- isReadonly: p,
216
- reset: V,
214
+ invalid: o,
215
+ isReadonly: V,
216
+ reset: m,
217
217
  status: A,
218
218
  stopUpdatesWatch: g,
219
- submit: o,
220
- validate: m,
219
+ submit: s,
220
+ validate: h,
221
221
  wrappers: a
222
222
  };
223
223
  },
224
224
  render() {
225
225
  const k = () => {
226
- var O, n;
227
- return ((n = (O = this.$slots) == null ? void 0 : O.default) == null ? void 0 : n.call(O, {
228
- clear: y,
226
+ var O, l;
227
+ return ((l = (O = this.$slots) == null ? void 0 : O.default) == null ? void 0 : l.call(O, {
228
+ clear: b,
229
229
  errors: E,
230
- formData: i,
230
+ formData: f,
231
231
  ignoreUpdates: x,
232
- invalid: f,
233
- readonly: p,
234
- reset: V,
232
+ invalid: o,
233
+ readonly: V,
234
+ reset: m,
235
235
  status: A,
236
236
  stopUpdatesWatch: g,
237
- submit: o,
238
- validate: m,
237
+ submit: s,
238
+ validate: h,
239
239
  wrappers: a
240
240
  })) ?? this.$slots.default;
241
241
  };
@@ -262,18 +262,18 @@ function Ie(r, s, e, c, a) {
262
262
  }
263
263
  });
264
264
  return {
265
- clear: y,
265
+ clear: b,
266
266
  errors: t,
267
- formData: i,
267
+ formData: f,
268
268
  ignoreUpdates: x,
269
- invalid: f,
270
- readonly: p,
271
- reset: V,
272
- status: v,
269
+ invalid: o,
270
+ readonly: V,
271
+ reset: m,
272
+ status: d,
273
273
  wrappers: a,
274
274
  stopUpdatesWatch: g,
275
- submit: o,
276
- validate: m,
275
+ submit: s,
276
+ validate: h,
277
277
  VvForm: B
278
278
  };
279
279
  }
@@ -286,68 +286,68 @@ function ke(r) {
286
286
  function se(r) {
287
287
  return r === null;
288
288
  }
289
- function oe(r) {
289
+ function fe(r) {
290
290
  return typeof r == "object";
291
291
  }
292
- function ve(r) {
292
+ function oe(r) {
293
293
  return typeof r == "string";
294
294
  }
295
295
  function Y(r) {
296
296
  return typeof r > "u";
297
297
  }
298
298
  const Se = /^[0-9]+$/, Ee = ["__proto__", "prototype", "constructor"];
299
- function Z(r, s, e) {
299
+ function Z(r, i, e) {
300
300
  const c = ke(e) ? e : void 0;
301
- if (!oe(r) || !ve(s))
301
+ if (!fe(r) || !oe(i))
302
302
  return c;
303
- const a = de(s);
303
+ const a = ve(i);
304
304
  if (a.length !== 0) {
305
305
  for (const t of a) {
306
306
  if (t === "*")
307
307
  continue;
308
- const v = function(f) {
309
- return f.map((i) => Y(i) || se(i) ? i : re(i) ? v(i) : i[t]);
308
+ const d = function(o) {
309
+ return o.map((f) => Y(f) || se(f) ? f : re(f) ? d(f) : f[t]);
310
310
  };
311
- if (re(r) && !Se.test(t) ? r = v(r) : r = r[t], Y(r) || se(r))
311
+ if (re(r) && !Se.test(t) ? r = d(r) : r = r[t], Y(r) || se(r))
312
312
  break;
313
313
  }
314
314
  return Y(r) ? c : r;
315
315
  }
316
316
  }
317
- function ae(r, s, e) {
318
- if (!oe(r) || !ve(s))
317
+ function ae(r, i, e) {
318
+ if (!fe(r) || !oe(i))
319
319
  return;
320
- const c = de(s);
320
+ const c = ve(i);
321
321
  if (c.length === 0)
322
322
  return;
323
323
  const a = c.length;
324
324
  for (let t = 0; t < a; t++) {
325
- const v = c[t];
325
+ const d = c[t];
326
326
  if (t === a - 1) {
327
- r[v] = e;
327
+ r[d] = e;
328
328
  return;
329
329
  }
330
- if (v === "*" && re(r)) {
331
- const f = c.slice(t + 1).join(".");
332
- for (const i of r)
333
- ae(i, f, e);
330
+ if (d === "*" && re(r)) {
331
+ const o = c.slice(t + 1).join(".");
332
+ for (const f of r)
333
+ ae(f, o, e);
334
334
  return;
335
335
  }
336
- Y(r[v]) && (r[v] = {}), r = r[v];
336
+ Y(r[d]) && (r[d] = {}), r = r[d];
337
337
  }
338
338
  }
339
- function de(r) {
340
- const s = r.split(/[.]|(?:\[(\d|\*)\])/).filter((e) => !!e);
341
- return s.some((e) => Ee.indexOf(e) !== -1) ? [] : s;
339
+ function ve(r) {
340
+ const i = r.split(/[.]|(?:\[(\d|\*)\])/).filter((e) => !!e);
341
+ return i.some((e) => Ee.indexOf(e) !== -1) ? [] : i;
342
342
  }
343
- function Ae(r, s, e, c) {
343
+ function Ae(r, i, e, c) {
344
344
  return q({
345
345
  name: "VvFormField",
346
346
  props: {
347
347
  type: {
348
348
  type: String,
349
- validator: (a) => Object.values(b).includes(a),
350
- default: b.custom
349
+ validator: (a) => Object.values(p).includes(a),
350
+ default: p.custom
351
351
  },
352
352
  is: {
353
353
  type: [Object, String],
@@ -394,178 +394,178 @@ function Ae(r, s, e, c) {
394
394
  "type"
395
395
  ],
396
396
  slots: Object,
397
- setup(a, { slots: t, emit: v }) {
398
- const { props: f, name: i } = te(a), p = ie(), d = N(s, void 0);
399
- d && d.fields.value.set(p, a.name);
400
- const l = N(r), m = I({
397
+ setup(a, { slots: t, emit: d }) {
398
+ const { props: o, name: f } = te(a), V = ie(), v = _(i, void 0);
399
+ v && v.fields.value.set(V, a.name);
400
+ const n = _(r), h = I({
401
401
  get() {
402
- if (l != null && l.formData)
402
+ if (n != null && n.formData)
403
403
  return Z(
404
- new Object(l.formData.value),
404
+ new Object(n.formData.value),
405
405
  String(a.name)
406
406
  );
407
407
  },
408
- set(n) {
409
- l != null && l.formData && (ae(
410
- new Object(l.formData.value),
408
+ set(l) {
409
+ n != null && n.formData && (ae(
410
+ new Object(n.formData.value),
411
411
  String(a.name),
412
- n
413
- ), v("update:modelValue", {
414
- newValue: m.value,
415
- formData: l == null ? void 0 : l.formData
412
+ l
413
+ ), d("update:modelValue", {
414
+ newValue: h.value,
415
+ formData: n == null ? void 0 : n.formData
416
416
  }));
417
417
  }
418
418
  });
419
419
  j(() => {
420
- m.value === void 0 && a.defaultValue !== void 0 && (m.value = a.defaultValue);
420
+ h.value === void 0 && a.defaultValue !== void 0 && (h.value = a.defaultValue);
421
421
  }), J(() => {
422
- d && d.fields.value.delete(p);
422
+ v && v.fields.value.delete(V);
423
423
  });
424
- const y = I(() => {
425
- if (l != null && l.errors.value)
426
- return Z(l.errors.value, String(a.name));
427
- }), V = I(() => {
428
- var n;
429
- return (n = y.value) == null ? void 0 : n._errors;
430
- }), o = I(() => y.value !== void 0), x = W(o, () => {
431
- if (o.value) {
432
- v("invalid", y.value), d && d.errors.value.set(
424
+ const b = I(() => {
425
+ if (n != null && n.errors.value)
426
+ return Z(n.errors.value, String(a.name));
427
+ }), m = I(() => {
428
+ var l;
429
+ return (l = b.value) == null ? void 0 : l._errors;
430
+ }), s = I(() => b.value !== void 0), x = W(s, () => {
431
+ if (s.value) {
432
+ d("invalid", b.value), v && v.errors.value.set(
433
433
  String(a.name),
434
- y.value
434
+ b.value
435
435
  );
436
436
  return;
437
437
  }
438
- v("valid", m.value), d && d.errors.value.delete(
438
+ d("valid", h.value), v && v.errors.value.delete(
439
439
  a.name
440
440
  );
441
441
  }), g = W(
442
- () => l == null ? void 0 : l.formData,
442
+ () => n == null ? void 0 : n.formData,
443
443
  () => {
444
- v("update:formData", l == null ? void 0 : l.formData);
444
+ d("update:formData", n == null ? void 0 : n.formData);
445
445
  },
446
446
  { deep: !0 }
447
447
  );
448
448
  J(() => {
449
449
  x(), g();
450
450
  });
451
- const E = (n) => {
452
- n instanceof InputEvent && (n = n.target.value), m.value = n;
451
+ const E = (l) => {
452
+ l instanceof InputEvent && (l = l.target.value), h.value = l;
453
453
  }, A = I(() => {
454
- let n = f.value;
455
- return typeof n == "function" && (n = n(l == null ? void 0 : l.formData)), Object.keys(n).reduce(
456
- (w, $) => (w[$] = K(n[$]), w),
454
+ let l = o.value;
455
+ return typeof l == "function" && (l = l(n == null ? void 0 : n.formData)), Object.keys(l).reduce(
456
+ (w, $) => (w[$] = K(l[$]), w),
457
457
  {}
458
458
  );
459
- }), B = I(() => l != null && l.readonly.value ? !0 : A.value.readonly ?? a.readonly), k = I(() => ({
459
+ }), B = I(() => n != null && n.readonly.value ? !0 : A.value.readonly ?? a.readonly), k = I(() => ({
460
460
  ...A.value,
461
461
  name: A.value.name ?? a.name,
462
- invalid: o.value,
463
- valid: a.showValid ? !!(!o.value && m.value) : void 0,
464
- type: ((n) => {
462
+ invalid: s.value,
463
+ valid: a.showValid ? !!(!s.value && h.value) : void 0,
464
+ type: ((l) => {
465
465
  if ([
466
- b.color,
467
- b.date,
468
- b.datetimeLocal,
469
- b.email,
470
- b.month,
471
- b.number,
472
- b.password,
473
- b.search,
474
- b.tel,
475
- b.text,
476
- b.time,
477
- b.url,
478
- b.week
479
- ].includes(n))
480
- return n;
466
+ p.color,
467
+ p.date,
468
+ p.datetimeLocal,
469
+ p.email,
470
+ p.month,
471
+ p.number,
472
+ p.password,
473
+ p.search,
474
+ p.tel,
475
+ p.text,
476
+ p.time,
477
+ p.url,
478
+ p.week
479
+ ].includes(l))
480
+ return l;
481
481
  })(a.type),
482
- invalidLabel: V.value,
483
- modelValue: m.value,
482
+ invalidLabel: m.value,
483
+ modelValue: h.value,
484
484
  readonly: B.value,
485
485
  "onUpdate:modelValue": E
486
486
  }));
487
487
  return F(e, {
488
- name: _(i),
489
- errors: _(y)
488
+ name: N(f),
489
+ errors: N(b)
490
490
  }), { component: I(() => {
491
- if (a.type === b.custom)
491
+ if (a.type === p.custom)
492
492
  return {
493
493
  render() {
494
- var n;
495
- return ((n = t.default) == null ? void 0 : n.call(t, {
496
- errors: y.value,
497
- formData: l == null ? void 0 : l.formData.value,
498
- formErrors: l == null ? void 0 : l.errors.value,
499
- invalid: o.value,
500
- invalidLabel: V.value,
501
- modelValue: m.value,
494
+ var l;
495
+ return ((l = t.default) == null ? void 0 : l.call(t, {
496
+ errors: b.value,
497
+ formData: n == null ? void 0 : n.formData.value,
498
+ formErrors: n == null ? void 0 : n.errors.value,
499
+ invalid: s.value,
500
+ invalidLabel: m.value,
501
+ modelValue: h.value,
502
502
  onUpdate: E,
503
503
  readonly: B.value,
504
- submit: l == null ? void 0 : l.submit,
505
- validate: l == null ? void 0 : l.validate
504
+ submit: n == null ? void 0 : n.submit,
505
+ validate: n == null ? void 0 : n.validate
506
506
  })) ?? t.default;
507
507
  }
508
508
  };
509
509
  if (!((c == null ? void 0 : c.lazyLoad) ?? a.lazyLoad)) {
510
- let n;
510
+ let l;
511
511
  switch (a.type) {
512
- case b.select:
513
- n = L("VvSelect");
512
+ case p.select:
513
+ l = L("VvSelect");
514
514
  break;
515
- case b.checkbox:
516
- n = L("VvCheckbox");
515
+ case p.checkbox:
516
+ l = L("VvCheckbox");
517
517
  break;
518
- case b.radio:
519
- n = L("VvRadio");
518
+ case p.radio:
519
+ l = L("VvRadio");
520
520
  break;
521
- case b.textarea:
522
- n = L("VvTextarea");
521
+ case p.textarea:
522
+ l = L("VvTextarea");
523
523
  break;
524
- case b.radioGroup:
525
- n = L("VvRadioGroup");
524
+ case p.radioGroup:
525
+ l = L("VvRadioGroup");
526
526
  break;
527
- case b.checkboxGroup:
528
- n = L("VvCheckboxGroup");
527
+ case p.checkboxGroup:
528
+ l = L("VvCheckboxGroup");
529
529
  break;
530
- case b.combobox:
531
- n = L("VvCombobox");
530
+ case p.combobox:
531
+ l = L("VvCombobox");
532
532
  break;
533
533
  default:
534
- n = L("VvInputText");
534
+ l = L("VvInputText");
535
535
  }
536
- if (typeof n != "string")
537
- return n;
536
+ if (typeof l != "string")
537
+ return l;
538
538
  console.warn(
539
- `[@volverjs/form-vue]: ${n} not found, the component will be loaded asynchronously. To avoid this warning, please set "lazyLoad" option.`
539
+ `[@volverjs/form-vue]: ${l} not found, the component will be loaded asynchronously. To avoid this warning, please set "lazyLoad" option.`
540
540
  );
541
541
  }
542
- return he(async () => {
542
+ return ye(async () => {
543
543
  switch (c != null && c.sideEffects && await Promise.resolve(c.sideEffects(a.type)), a.type) {
544
- case b.textarea:
544
+ case p.textarea:
545
545
  return import("@volverjs/ui-vue/vv-textarea");
546
- case b.radio:
546
+ case p.radio:
547
547
  return import("@volverjs/ui-vue/vv-radio");
548
- case b.radioGroup:
548
+ case p.radioGroup:
549
549
  return import("@volverjs/ui-vue/vv-radio-group");
550
- case b.checkbox:
550
+ case p.checkbox:
551
551
  return import("@volverjs/ui-vue/vv-checkbox");
552
- case b.checkboxGroup:
552
+ case p.checkboxGroup:
553
553
  return import("@volverjs/ui-vue/vv-checkbox-group");
554
- case b.select:
554
+ case p.select:
555
555
  return import("@volverjs/ui-vue/vv-select");
556
- case b.combobox:
556
+ case p.combobox:
557
557
  return import("@volverjs/ui-vue/vv-combobox");
558
558
  }
559
559
  return import("@volverjs/ui-vue/vv-input-text");
560
560
  });
561
- }), hasProps: k, invalid: o };
561
+ }), hasProps: k, invalid: s };
562
562
  },
563
563
  render() {
564
- return this.is ? R(this.is, this.hasProps, this.$slots) : this.type === b.custom ? R(this.component, null, this.$slots) : R(this.component, this.hasProps, this.$slots);
564
+ return this.is ? R(this.is, this.hasProps, this.$slots) : this.type === p.custom ? R(this.component, null, this.$slots) : R(this.component, this.hasProps, this.$slots);
565
565
  }
566
566
  });
567
567
  }
568
- function Ge(r, s, e) {
568
+ function Ge(r, i, e) {
569
569
  return q({
570
570
  name: "VvFormFieldsGroup",
571
571
  props: {
@@ -610,121 +610,121 @@ function Ge(r, s, e) {
610
610
  ],
611
611
  slots: Object,
612
612
  setup(c, { slots: a, emit: t }) {
613
- const { props: v, names: f, defaultValues: i } = te(c), p = ie(), d = I(() => Array.isArray(f.value) ? f.value : Object.values(f.value)), l = I(() => Array.isArray(f.value) ? f.value : Object.keys(f.value)), m = I(() => Array.isArray(f.value) ? f.value.reduce((u, h) => (u[String(h)] = h, u), {}) : f.value), y = I(() => Object.keys(m.value).reduce((u, h) => (u[String(m.value[h])] = h, u), {})), V = N(s, void 0);
614
- V && d.value.forEach((u) => {
615
- V.fields.value.set(`${p}-${u}`, u);
613
+ const { props: d, names: o, defaultValues: f } = te(c), V = ie(), v = I(() => Array.isArray(o.value) ? o.value : Object.values(o.value)), n = I(() => Array.isArray(o.value) ? o.value : Object.keys(o.value)), h = I(() => Array.isArray(o.value) ? o.value.reduce((u, y) => (u[String(y)] = y, u), {}) : o.value), b = I(() => Object.keys(h.value).reduce((u, y) => (u[String(h.value[y])] = y, u), {})), m = _(i, void 0);
614
+ m && v.value.forEach((u) => {
615
+ m.fields.value.set(`${V}-${u}`, u);
616
616
  });
617
- const o = N(r), x = I({
617
+ const s = _(r), x = I({
618
618
  get() {
619
- return o != null && o.formData ? l.value.reduce((u, h) => (u[h] = Z(
620
- new Object(o.formData.value),
621
- m.value[h]
619
+ return s != null && s.formData ? n.value.reduce((u, y) => (u[y] = Z(
620
+ new Object(s.formData.value),
621
+ h.value[y]
622
622
  ), u), {}) : {};
623
623
  },
624
624
  set(u) {
625
- o != null && o.formData && (l.value.forEach((h) => {
625
+ s != null && s.formData && (n.value.forEach((y) => {
626
626
  ae(
627
- new Object(o.formData.value),
628
- m.value[h],
629
- u == null ? void 0 : u[h]
627
+ new Object(s.formData.value),
628
+ h.value[y],
629
+ u == null ? void 0 : u[y]
630
630
  );
631
631
  }), t("update:modelValue", {
632
632
  newValue: x.value,
633
- formData: o == null ? void 0 : o.formData
633
+ formData: s == null ? void 0 : s.formData
634
634
  }));
635
635
  }
636
636
  });
637
637
  j(() => {
638
- i.value && d.value.forEach((u) => {
639
- var h, S;
640
- ((h = i.value) == null ? void 0 : h[u]) !== void 0 && x.value[u] === void 0 && (x.value = {
638
+ f.value && v.value.forEach((u) => {
639
+ var y, S;
640
+ ((y = f.value) == null ? void 0 : y[u]) !== void 0 && x.value[u] === void 0 && (x.value = {
641
641
  ...x.value,
642
- [u]: (S = i.value) == null ? void 0 : S[u]
642
+ [u]: (S = f.value) == null ? void 0 : S[u]
643
643
  });
644
644
  });
645
645
  }), J(() => {
646
- V && d.value.forEach((u) => {
647
- V.fields.value.delete(
648
- `${p}-${u}`
646
+ m && v.value.forEach((u) => {
647
+ m.fields.value.delete(
648
+ `${V}-${u}`
649
649
  );
650
650
  });
651
651
  });
652
652
  const g = I(() => {
653
- if (!(o != null && o.errors.value))
653
+ if (!(s != null && s.errors.value))
654
654
  return;
655
- const u = d.value.reduce((h, S) => {
656
- if (!o.errors.value)
657
- return h;
658
- const z = Z(o.errors.value, String(S));
659
- return z === void 0 || (h[String(S)] = z), h;
655
+ const u = v.value.reduce((y, S) => {
656
+ if (!s.errors.value)
657
+ return y;
658
+ const z = Z(s.errors.value, String(S));
659
+ return z === void 0 || (y[String(S)] = z), y;
660
660
  }, {});
661
661
  if (Object.keys(u).length !== 0)
662
662
  return u;
663
663
  }), E = I(() => {
664
664
  if (!g.value)
665
665
  return;
666
- const u = Object.keys(g.value).reduce((h, S) => {
666
+ const u = Object.keys(g.value).reduce((y, S) => {
667
667
  var z;
668
- return (z = g.value) != null && z[S] && (h[y.value[S]] = g.value[S]._errors), h;
668
+ return (z = g.value) != null && z[S] && (y[b.value[S]] = g.value[S]._errors), y;
669
669
  }, {});
670
670
  if (Object.keys(u).length !== 0)
671
671
  return u;
672
- }), A = I(() => g.value !== void 0), B = I(() => l.value.reduce((u, h) => {
672
+ }), A = I(() => g.value !== void 0), B = I(() => n.value.reduce((u, y) => {
673
673
  var S;
674
- return u[h] = !!((S = g.value) != null && S[y.value[h]]), u;
674
+ return u[y] = !!((S = g.value) != null && S[b.value[y]]), u;
675
675
  }, {})), k = W(A, () => {
676
676
  if (A.value) {
677
- t("invalid", g.value), V && d.value.forEach((u) => {
678
- var h, S;
679
- if (!((h = g.value) != null && h[u])) {
680
- V.errors.value.delete(
677
+ t("invalid", g.value), m && v.value.forEach((u) => {
678
+ var y, S;
679
+ if (!((y = g.value) != null && y[u])) {
680
+ m.errors.value.delete(
681
681
  u
682
682
  );
683
683
  return;
684
684
  }
685
- V.errors.value.set(
685
+ m.errors.value.set(
686
686
  u,
687
687
  (S = g.value) == null ? void 0 : S[u]
688
688
  );
689
689
  });
690
690
  return;
691
691
  }
692
- t("valid", x.value), V && d.value.forEach((u) => {
693
- V.errors.value.delete(
692
+ t("valid", x.value), m && v.value.forEach((u) => {
693
+ m.errors.value.delete(
694
694
  u
695
695
  );
696
696
  });
697
697
  }), O = W(
698
- () => o == null ? void 0 : o.formData,
698
+ () => s == null ? void 0 : s.formData,
699
699
  () => {
700
- t("update:formData", o == null ? void 0 : o.formData);
700
+ t("update:formData", s == null ? void 0 : s.formData);
701
701
  },
702
702
  { deep: !0 }
703
703
  );
704
704
  J(() => {
705
705
  k(), O();
706
706
  });
707
- const n = (u) => {
707
+ const l = (u) => {
708
708
  x.value = u;
709
- }, w = (u, h) => {
710
- h instanceof InputEvent && (h = h.target.value), l.value.includes(u) && (x.value = {
709
+ }, w = (u, y) => {
710
+ y instanceof InputEvent && (y = y.target.value), n.value.includes(u) && (x.value = {
711
711
  ...x.value,
712
- [u]: h
712
+ [u]: y
713
713
  });
714
714
  }, $ = I(() => {
715
- let u = v.value;
716
- return typeof u == "function" && (u = u(o == null ? void 0 : o.formData)), Object.keys(u).reduce(
717
- (h, S) => (h[S] = K(u[S]), h),
715
+ let u = d.value;
716
+ return typeof u == "function" && (u = u(s == null ? void 0 : s.formData)), Object.keys(u).reduce(
717
+ (y, S) => (y[S] = K(u[S]), y),
718
718
  {}
719
719
  );
720
- }), M = I(() => o != null && o.readonly.value ? !0 : $.value.readonly ?? c.readonly), T = I(() => l.value.reduce((u, h) => (u[`onUpdate:${h}`] = (S) => {
721
- w(h, S);
720
+ }), M = I(() => s != null && s.readonly.value ? !0 : $.value.readonly ?? c.readonly), T = I(() => n.value.reduce((u, y) => (u[`onUpdate:${y}`] = (S) => {
721
+ w(y, S);
722
722
  }, u), {
723
- "onUpdate:modelValue": n
723
+ "onUpdate:modelValue": l
724
724
  })), P = I(() => ({
725
725
  ...T.value,
726
726
  ...$.value,
727
- names: $.value.name ?? d.value,
727
+ names: $.value.name ?? v.value,
728
728
  invalid: A.value,
729
729
  invalids: B.value,
730
730
  valid: c.showValid ? !!(!A.value && x.value) : void 0,
@@ -733,24 +733,24 @@ function Ge(r, s, e) {
733
733
  readonly: M.value
734
734
  }));
735
735
  return F(e, {
736
- names: _(f),
737
- errors: _(g)
736
+ names: N(o),
737
+ errors: N(g)
738
738
  }), { component: I(() => ({
739
739
  render() {
740
740
  var u;
741
741
  return ((u = a.default) == null ? void 0 : u.call(a, {
742
742
  errors: g.value,
743
- formData: o == null ? void 0 : o.formData.value,
744
- formErrors: o == null ? void 0 : o.errors.value,
743
+ formData: s == null ? void 0 : s.formData.value,
744
+ formErrors: s == null ? void 0 : s.errors.value,
745
745
  invalid: A.value,
746
746
  invalids: B.value,
747
747
  invalidLabels: E.value,
748
748
  modelValue: x.value,
749
- onUpdate: n,
749
+ onUpdate: l,
750
750
  onUpdateField: w,
751
751
  readonly: M.value,
752
- submit: o == null ? void 0 : o.submit,
753
- validate: o == null ? void 0 : o.validate
752
+ submit: s == null ? void 0 : s.submit,
753
+ validate: s == null ? void 0 : s.validate
754
754
  })) ?? a.default;
755
755
  }
756
756
  })), hasProps: P, invalid: A };
@@ -760,7 +760,7 @@ function Ge(r, s, e) {
760
760
  }
761
761
  });
762
762
  }
763
- function $e(r, s) {
763
+ function $e(r, i) {
764
764
  return q({
765
765
  name: "VvFormWrapper",
766
766
  props: {
@@ -789,62 +789,62 @@ function $e(r, s) {
789
789
  ],
790
790
  slots: Object,
791
791
  setup(e, { emit: c }) {
792
- const a = N(r), t = N(s, void 0), v = C(/* @__PURE__ */ new Map()), f = C(/* @__PURE__ */ new Map()), { name: i } = te(e);
793
- F(s, {
794
- name: _(i),
795
- errors: f,
796
- fields: v
797
- }), W(
798
- v,
799
- (l, m) => {
800
- t != null && t.fields && m.entries().forEach(([y]) => {
801
- l.has(y) || t == null || t.fields.value.delete(y);
802
- }), t != null && t.fields && l.entries().forEach(([y, V]) => {
803
- t != null && t.fields.value.has(y) || t == null || t.fields.value.set(y, V);
792
+ const a = _(r), t = _(i, void 0), d = C(/* @__PURE__ */ new Map()), o = C(/* @__PURE__ */ new Map()), { name: f } = te(e), V = I(() => a != null && a.invalid.value ? o.value.size > 0 : !1);
793
+ W(V, () => {
794
+ V.value ? c("invalid") : c("valid");
795
+ });
796
+ const v = {
797
+ name: N(f),
798
+ errors: o,
799
+ invalid: N(V),
800
+ fields: d
801
+ };
802
+ F(i, v), W(
803
+ d,
804
+ (h, b) => {
805
+ t != null && t.fields && b.entries().forEach(([m]) => {
806
+ h.has(m) || t == null || t.fields.value.delete(m);
807
+ }), t != null && t.fields && h.entries().forEach(([m, s]) => {
808
+ t != null && t.fields.value.has(m) || t == null || t.fields.value.set(m, s);
804
809
  });
805
810
  },
806
811
  { deep: !0 }
807
812
  ), W(
808
- f,
809
- (l, m) => {
810
- t != null && t.errors && (Array.from(m.keys()).forEach((y) => {
811
- t.errors.value.delete(y);
812
- }), Array.from(l.keys()).forEach((y) => {
813
- const V = l.get(y);
814
- V && t.errors.value.set(y, V);
813
+ o,
814
+ (h, b) => {
815
+ t != null && t.errors && (Array.from(b.keys()).forEach((m) => {
816
+ t.errors.value.delete(m);
817
+ }), Array.from(h.keys()).forEach((m) => {
818
+ const s = h.get(m);
819
+ s && t.errors.value.set(m, s);
815
820
  }));
816
821
  },
817
822
  { deep: !0 }
818
- );
819
- const p = I(() => a != null && a.invalid.value ? f.value.size > 0 : !1);
820
- W(p, () => {
821
- p.value ? c("invalid") : c("valid");
822
- }), j(() => {
823
- const l = fe();
824
- if (!l || !(a != null && a.wrappers) || !i.value) {
823
+ ), j(() => {
824
+ if (!(a != null && a.wrappers) || !f.value) {
825
825
  console.warn("[@volverjs/form-vue]: Invalid wrapper registration state");
826
826
  return;
827
827
  }
828
- if (a.wrappers.has(i.value)) {
829
- console.warn(`[@volverjs/form-vue]: wrapper name "${i.value}" is already used`);
828
+ if (a.wrappers.has(f.value)) {
829
+ console.warn(`[@volverjs/form-vue]: wrapper name "${f.value}" is already used`);
830
830
  return;
831
831
  }
832
- a.wrappers.set(i.value, l);
832
+ a.wrappers.set(f.value, v);
833
833
  }), J(() => {
834
- a != null && a.wrappers && i.value && a.wrappers.delete(i.value);
834
+ a != null && a.wrappers && f.value && a.wrappers.delete(f.value);
835
835
  });
836
- const d = () => (a == null ? void 0 : a.validate(void 0, new Set(v.value.values()))) ?? Promise.resolve(!0);
836
+ const n = () => (a == null ? void 0 : a.validate(void 0, new Set(d.value.values()))) ?? Promise.resolve(!0);
837
837
  return {
838
838
  clear: a == null ? void 0 : a.clear,
839
839
  errors: a == null ? void 0 : a.errors,
840
- fields: v,
841
- fieldsErrors: f,
840
+ fields: d,
841
+ fieldsErrors: o,
842
842
  formData: a == null ? void 0 : a.formData,
843
- invalid: p,
843
+ invalid: V,
844
844
  reset: a == null ? void 0 : a.reset,
845
845
  submit: a == null ? void 0 : a.submit,
846
846
  validate: a == null ? void 0 : a.validate,
847
- validateWrapper: d
847
+ validateWrapper: n
848
848
  };
849
849
  },
850
850
  render() {
@@ -868,7 +868,7 @@ function $e(r, s) {
868
868
  }
869
869
  });
870
870
  }
871
- function Re(r, s) {
871
+ function Re(r, i) {
872
872
  const e = q({
873
873
  name: "VvFormTemplate",
874
874
  props: {
@@ -883,20 +883,20 @@ function Re(r, s) {
883
883
  },
884
884
  slots: Object,
885
885
  setup(c, { slots: a }) {
886
- const t = N(r);
886
+ const t = _(r);
887
887
  if (t != null && t.formData)
888
888
  return () => {
889
- var p;
890
- const v = typeof c.schema == "function" ? c.schema(
889
+ var V;
890
+ const d = typeof c.schema == "function" ? c.schema(
891
891
  t,
892
892
  c.scope
893
893
  ) : c.schema;
894
- let f;
895
- const i = v.reduce((d, l) => {
896
- const m = typeof l == "function" ? l(t, c.scope) : l, {
897
- vvIs: y,
898
- vvName: V,
899
- vvSlots: o,
894
+ let o;
895
+ const f = d.reduce((v, n) => {
896
+ const h = typeof n == "function" ? n(t, c.scope) : n, {
897
+ vvIs: b,
898
+ vvName: m,
899
+ vvSlots: s,
900
900
  vvChildren: x,
901
901
  vvIf: g,
902
902
  vvElseIf: E,
@@ -904,53 +904,53 @@ function Re(r, s) {
904
904
  vvDefaultValue: B,
905
905
  vvShowValid: k,
906
906
  vvContent: O,
907
- ...n
908
- } = m;
907
+ ...l
908
+ } = h;
909
909
  if (g !== void 0) {
910
- if (typeof g == "string" ? f = !!Z(
910
+ if (typeof g == "string" ? o = !!Z(
911
911
  new Object(t.formData.value),
912
912
  g
913
- ) : typeof g == "function" ? f = K(g(t)) : f = K(g), !f)
914
- return d;
915
- } else if (E !== void 0 && f !== void 0) {
916
- if (f || (typeof E == "string" ? f = !!Z(
913
+ ) : typeof g == "function" ? o = K(g(t)) : o = K(g), !o)
914
+ return v;
915
+ } else if (E !== void 0 && o !== void 0) {
916
+ if (o || (typeof E == "string" ? o = !!Z(
917
917
  new Object(t.formData.value),
918
918
  E
919
- ) : typeof E == "function" ? f = K(E(t)) : f = K(E), !f))
920
- return d;
919
+ ) : typeof E == "function" ? o = K(E(t)) : o = K(E), !o))
920
+ return v;
921
921
  } else
922
- f = void 0;
922
+ o = void 0;
923
923
  let w;
924
- return x && (typeof y == "string" ? w = R(e, {
924
+ return x && (typeof b == "string" ? w = R(e, {
925
925
  schema: x
926
926
  }) : w = {
927
927
  default: ($) => R(e, {
928
928
  schema: x,
929
929
  scope: $
930
930
  })
931
- }), V ? (d.push(
931
+ }), m ? (v.push(
932
932
  R(
933
- s,
933
+ i,
934
934
  {
935
- name: V,
936
- is: y,
935
+ name: m,
936
+ is: b,
937
937
  type: A,
938
938
  defaultValue: B,
939
939
  showValid: k,
940
- props: n
940
+ props: l
941
941
  },
942
- o ?? w ?? O
942
+ s ?? w ?? O
943
943
  )
944
- ), d) : y ? (d.push(
944
+ ), v) : b ? (v.push(
945
945
  R(
946
- y,
947
- n,
948
- o ?? w ?? O
946
+ b,
947
+ l,
948
+ s ?? w ?? O
949
949
  )
950
- ), d) : (w && ("default" in w ? d.push(w.default(c.scope)) : d.push(w)), d);
950
+ ), v) : (w && ("default" in w ? v.push(w.default(c.scope)) : v.push(w)), v);
951
951
  }, []);
952
- return i.push(
953
- (p = a == null ? void 0 : a.default) == null ? void 0 : p.call(a, {
952
+ return f.push(
953
+ (V = a == null ? void 0 : a.default) == null ? void 0 : V.call(a, {
954
954
  errors: t == null ? void 0 : t.errors.value,
955
955
  formData: t == null ? void 0 : t.formData.value,
956
956
  invalid: t == null ? void 0 : t.invalid.value,
@@ -960,31 +960,31 @@ function Re(r, s) {
960
960
  clear: t == null ? void 0 : t.clear,
961
961
  reset: t == null ? void 0 : t.reset
962
962
  })
963
- ), i;
963
+ ), f;
964
964
  };
965
965
  }
966
966
  });
967
967
  return e;
968
968
  }
969
- function D(r, s = {}) {
970
- const e = Symbol("formInjectionKey"), c = Symbol("formWrapperInjectionKey"), a = Symbol("formFieldInjectionKey"), t = Symbol("formFieldsGroupInjectionKey"), v = $e(
969
+ function D(r, i = {}) {
970
+ const e = Symbol("formInjectionKey"), c = Symbol("formWrapperInjectionKey"), a = Symbol("formFieldInjectionKey"), t = Symbol("formFieldsGroupInjectionKey"), d = $e(
971
971
  e,
972
972
  c
973
- ), f = Ae(
973
+ ), o = Ae(
974
974
  e,
975
975
  c,
976
976
  a,
977
- s
978
- ), i = Ge(
977
+ i
978
+ ), f = Ge(
979
979
  e,
980
980
  c,
981
981
  t
982
- ), p = Re(e, f), d = /* @__PURE__ */ new Map(), {
983
- clear: l,
984
- errors: m,
985
- formData: y,
986
- ignoreUpdates: V,
987
- invalid: o,
982
+ ), V = Re(e, o), v = /* @__PURE__ */ new Map(), {
983
+ clear: n,
984
+ errors: h,
985
+ formData: b,
986
+ ignoreUpdates: m,
987
+ invalid: s,
988
988
  readonly: x,
989
989
  reset: g,
990
990
  status: E,
@@ -992,65 +992,65 @@ function D(r, s = {}) {
992
992
  submit: B,
993
993
  validate: k,
994
994
  VvForm: O
995
- } = Ie(r, e, s, p, d);
995
+ } = Ie(r, e, i, V, v);
996
996
  return {
997
- clear: l,
998
- errors: m,
999
- formData: y,
997
+ clear: n,
998
+ errors: h,
999
+ formData: b,
1000
1000
  formFieldInjectionKey: a,
1001
1001
  formInjectionKey: e,
1002
1002
  formWrapperInjectionKey: c,
1003
- ignoreUpdates: V,
1004
- invalid: o,
1003
+ ignoreUpdates: m,
1004
+ invalid: s,
1005
1005
  readonly: x,
1006
1006
  reset: g,
1007
1007
  status: E,
1008
1008
  stopUpdatesWatch: A,
1009
1009
  submit: B,
1010
1010
  validate: k,
1011
- wrappers: d,
1011
+ wrappers: v,
1012
1012
  VvForm: O,
1013
- VvFormField: f,
1014
- VvFormFieldsGroup: i,
1015
- VvFormTemplate: p,
1016
- VvFormWrapper: v
1013
+ VvFormField: o,
1014
+ VvFormFieldsGroup: f,
1015
+ VvFormTemplate: V,
1016
+ VvFormWrapper: d
1017
1017
  };
1018
1018
  }
1019
- const ce = Symbol("pluginInjectionKey");
1019
+ const de = Symbol("pluginInjectionKey");
1020
1020
  function Le(r) {
1021
- let s = {};
1022
- return r.schema && (s = D(r.schema, r)), {
1023
- ...s,
1021
+ let i = {};
1022
+ return r.schema && (i = D(r.schema, r)), {
1023
+ ...i,
1024
1024
  install(e, { global: c = !1 } = {}) {
1025
- e.provide(ce, r), c && (e.config.globalProperties.$vvForm = r, s != null && s.VvForm && e.component("VvForm", s.VvForm), s != null && s.VvFormWrapper && e.component("VvFormWrapper", s.VvFormWrapper), s != null && s.VvFormField && e.component("VvFormField", s.VvFormField), s != null && s.VvFormFieldsGroup && e.component("VvFormFieldsGroup", s.VvFormFieldsGroup), s != null && s.VvFormTemplate && e.component("VvFormTemplate", s.VvFormTemplate));
1025
+ e.provide(de, r), c && (e.config.globalProperties.$vvForm = r, i != null && i.VvForm && e.component("VvForm", i.VvForm), i != null && i.VvFormWrapper && e.component("VvFormWrapper", i.VvFormWrapper), i != null && i.VvFormField && e.component("VvFormField", i.VvFormField), i != null && i.VvFormFieldsGroup && e.component("VvFormFieldsGroup", i.VvFormFieldsGroup), i != null && i.VvFormTemplate && e.component("VvFormTemplate", i.VvFormTemplate));
1026
1026
  }
1027
1027
  };
1028
1028
  }
1029
1029
  const Q = /* @__PURE__ */ new Map();
1030
- function Ne(r, s = {}) {
1031
- if (s.scope && Q.has(s.scope))
1032
- return Q.get(s.scope);
1033
- if (!fe()) {
1034
- const c = D(r, s);
1035
- return s.scope && Q.set(s.scope, c), c;
1030
+ function Ne(r, i = {}) {
1031
+ if (i.scope && Q.has(i.scope))
1032
+ return Q.get(i.scope);
1033
+ if (!he()) {
1034
+ const c = D(r, i);
1035
+ return i.scope && Q.set(i.scope, c), c;
1036
1036
  }
1037
1037
  const e = D(
1038
1038
  r,
1039
1039
  {
1040
- ...N(ce, {}),
1041
- ...s
1040
+ ..._(de, {}),
1041
+ ...i
1042
1042
  }
1043
1043
  );
1044
- return s.scope && Q.set(s.scope, e), e;
1044
+ return i.scope && Q.set(i.scope, e), e;
1045
1045
  }
1046
- function _e(r, s = {}) {
1047
- return D(r, s);
1046
+ function _e(r, i = {}) {
1047
+ return D(r, i);
1048
1048
  }
1049
1049
  export {
1050
- b as FormFieldType,
1050
+ p as FormFieldType,
1051
1051
  Le as createForm,
1052
1052
  X as defaultObjectBySchema,
1053
1053
  _e as formType,
1054
- ce as pluginInjectionKey,
1054
+ de as pluginInjectionKey,
1055
1055
  Ne as useForm
1056
1056
  };