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

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,328 +1,380 @@
1
- import { defineComponent as z, computed as k, onMounted as D, onBeforeUnmount as j, inject as U, toRefs as P, watch as I, unref as B, provide as M, readonly as S, resolveComponent as O, defineAsyncComponent as F, h as w, ref as C, toRaw as E, isProxy as ee, withModifiers as re, getCurrentInstance as te } from "vue";
2
- import { watchIgnorable as ae, throttleFilter as ne } from "@vueuse/core";
3
- import { ZodObject as K, ZodDefault as ue, ZodNullable as le, ZodSchema as se, ZodArray as ie, ZodEffects as fe, ZodOptional as oe } from "zod";
4
- function R(e) {
1
+ import { defineComponent as M, inject as C, toRefs as j, computed as W, onMounted as F, watch as _, onBeforeUnmount as ue, unref as G, provide as P, readonly as U, resolveComponent as B, defineAsyncComponent as le, h as A, ref as R, toRaw as N, isProxy as se, withModifiers as Q, getCurrentInstance as ie } from "vue";
2
+ import { watchIgnorable as fe, throttleFilter as oe } from "@vueuse/core";
3
+ import { ZodObject as K, ZodDefault as de, ZodNullable as ve, ZodSchema as ce, ZodArray as me, ZodRecord as ye, ZodEffects as X, ZodOptional as Y, ZodError as he } from "zod";
4
+ function q(e) {
5
5
  return Array.isArray(e);
6
6
  }
7
- function de(e) {
7
+ function be(e) {
8
8
  return typeof e < "u";
9
9
  }
10
- function q(e) {
10
+ function D(e) {
11
11
  return e === null;
12
12
  }
13
- function H(e) {
13
+ function ee(e) {
14
14
  return typeof e == "object";
15
15
  }
16
- function Q(e) {
16
+ function re(e) {
17
17
  return typeof e == "string";
18
18
  }
19
- function G(e) {
19
+ function Z(e) {
20
20
  return typeof e > "u";
21
21
  }
22
- const ve = /^[0-9]+$/, ce = ["__proto__", "prototype", "constructor"];
23
- function L(e, l, t) {
24
- const o = de(t) ? t : void 0;
25
- if (!H(e) || !Q(l))
26
- return o;
27
- const u = Y(l);
28
- if (u.length !== 0) {
29
- for (const r of u) {
30
- if (r === "*")
22
+ const Ve = /^[0-9]+$/, ge = ["__proto__", "prototype", "constructor"];
23
+ function z(e, l, r) {
24
+ const f = be(r) ? r : void 0;
25
+ if (!ee(e) || !re(l))
26
+ return f;
27
+ const a = ae(l);
28
+ if (a.length !== 0) {
29
+ for (const n of a) {
30
+ if (n === "*")
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 i = function(u) {
33
+ return u.map((t) => Z(t) || D(t) ? t : q(t) ? i(t) : t[n]);
34
34
  };
35
- if (R(e) && !ve.test(r) ? e = a(e) : e = e[r], G(e) || q(e))
35
+ if (q(e) && !Ve.test(n) ? e = i(e) : e = e[n], Z(e) || D(e))
36
36
  break;
37
37
  }
38
- return G(e) ? o : e;
38
+ return Z(e) ? f : e;
39
39
  }
40
40
  }
41
- function X(e, l, t) {
42
- if (!H(e) || !Q(l))
41
+ function te(e, l, r) {
42
+ if (!ee(e) || !re(l))
43
43
  return;
44
- const o = Y(l);
45
- if (o.length === 0)
44
+ const f = ae(l);
45
+ if (f.length === 0)
46
46
  return;
47
- const u = o.length;
48
- for (let r = 0; r < u; r++) {
49
- const a = o[r];
50
- if (r === u - 1) {
51
- e[a] = t;
47
+ const a = f.length;
48
+ for (let n = 0; n < a; n++) {
49
+ const i = f[n];
50
+ if (n === a - 1) {
51
+ e[i] = r;
52
52
  return;
53
53
  }
54
- if (a === "*" && R(e)) {
55
- const s = o.slice(r + 1).join(".");
56
- for (const f of e)
57
- X(f, s, t);
54
+ if (i === "*" && q(e)) {
55
+ const u = f.slice(n + 1).join(".");
56
+ for (const t of e)
57
+ te(t, u, r);
58
58
  return;
59
59
  }
60
- G(e[a]) && (e[a] = {}), e = e[a];
60
+ Z(e[i]) && (e[i] = {}), e = e[i];
61
61
  }
62
62
  }
63
- function Y(e) {
64
- const l = e.split(/[.]|(?:\[(\d|\*)\])/).filter((t) => !!t);
65
- return l.some((t) => ce.indexOf(t) !== -1) ? [] : l;
63
+ function ae(e) {
64
+ const l = e.split(/[.]|(?:\[(\d|\*)\])/).filter((r) => !!r);
65
+ return l.some((r) => ge.indexOf(r) !== -1) ? [] : l;
66
66
  }
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({
69
- name: "VvFormField",
70
- props: {
71
- type: {
72
- type: String,
73
- validator: (u) => Object.values(d).includes(u),
74
- default: d.custom
75
- },
76
- is: {
77
- type: [Object, String],
78
- default: void 0
79
- },
80
- name: {
81
- type: [String, Number, Boolean, Symbol],
82
- required: !0
83
- },
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 || {}), k = /* @__PURE__ */ ((e) => (e.invalid = "invalid", e.valid = "valid", e.submitting = "submitting", e.reset = "reset", e.updated = "updated", e.unknown = "unknown", e))(k || {});
68
+ function xe(e, l, r, f) {
69
+ return M({
70
+ name: "VvFormField",
84
71
  props: {
85
- type: [Object, Function],
86
- default: () => ({})
87
- },
88
- showValid: {
89
- type: Boolean,
90
- default: !1
91
- },
92
- defaultValue: {
93
- type: [String, Number, Boolean, Array, Object],
94
- default: void 0
95
- },
96
- lazyLoad: {
97
- type: Boolean,
98
- default: !1
99
- }
100
- },
101
- emits: ["invalid", "valid", "update:formData", "update:modelValue"],
102
- expose: ["invalid", "invalidLabel", "errors"],
103
- setup(u, { slots: r, emit: a }) {
104
- const s = k({
105
- get() {
106
- if (n != null && n.formData)
107
- return L(
108
- Object(n.formData.value),
109
- String(u.name)
110
- );
72
+ type: {
73
+ type: String,
74
+ validator: (a) => Object.values(d).includes(a),
75
+ default: d.custom
76
+ },
77
+ is: {
78
+ type: [Object, String],
79
+ default: void 0
80
+ },
81
+ name: {
82
+ type: [String, Number, Boolean, Symbol],
83
+ required: !0
84
+ },
85
+ props: {
86
+ type: [Object, Function],
87
+ default: () => ({})
111
88
  },
112
- set(i) {
113
- n != null && n.formData && (X(
114
- Object(n.formData.value),
115
- String(u.name),
116
- i
117
- ), a("update:modelValue", {
118
- newValue: s.value,
119
- formData: n == null ? void 0 : n.formData
120
- }));
89
+ showValid: {
90
+ type: Boolean,
91
+ default: !1
92
+ },
93
+ defaultValue: {
94
+ type: [String, Number, Boolean, Array, Object],
95
+ default: void 0
96
+ },
97
+ lazyLoad: {
98
+ type: Boolean,
99
+ default: !1
100
+ },
101
+ readonly: {
102
+ type: Boolean,
103
+ default: void 0
121
104
  }
122
- });
123
- D(() => {
124
- s.value === void 0 && u.defaultValue !== void 0 && (s.value = u.defaultValue);
125
- }), j(() => {
126
- y(), V();
127
- });
128
- const f = U(l, void 0);
129
- f && f.fields.value.add(u.name);
130
- const n = U(e), { props: c, name: b } = P(u), m = k(() => {
131
- if (n != null && n.errors.value)
132
- return L(n.errors.value, String(u.name));
133
- }), v = k(() => {
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(
138
- u.name,
139
- {
140
- _errors: v.value
105
+ },
106
+ emits: [
107
+ "invalid",
108
+ "update:formData",
109
+ "update:modelValue",
110
+ "valid"
111
+ ],
112
+ expose: [
113
+ "component",
114
+ "errors",
115
+ "hasProps",
116
+ "invalid",
117
+ "invalidLabel",
118
+ "is",
119
+ "type"
120
+ ],
121
+ slots: Object,
122
+ setup(a, { slots: n, emit: i }) {
123
+ const u = C(l, void 0);
124
+ u && u.fields.value.add(a.name);
125
+ const t = C(e), { props: g, name: o } = j(a), v = W({
126
+ get() {
127
+ if (t != null && t.formData)
128
+ return z(
129
+ new Object(t.formData.value),
130
+ String(a.name)
131
+ );
132
+ },
133
+ set(s) {
134
+ t != null && t.formData && (te(
135
+ new Object(t.formData.value),
136
+ String(a.name),
137
+ s
138
+ ), i("update:modelValue", {
139
+ newValue: v.value,
140
+ formData: t == null ? void 0 : t.formData
141
+ }));
141
142
  }
142
- )) : (a("valid", s.value), f && f.errors.value.delete(
143
- u.name
144
- ));
145
- }), V = I(
146
- () => n == null ? void 0 : n.formData,
147
- () => {
148
- a("update:formData", n == null ? void 0 : n.formData);
149
- },
150
- { deep: !0 }
151
- ), g = (i) => {
152
- s.value = i;
153
- }, p = k(() => {
154
- let i = c.value;
155
- return typeof i == "function" && (i = i(n == null ? void 0 : n.formData)), Object.keys(i).reduce(
156
- (_, $) => (_[$] = B(i[$]), _),
157
- {}
158
- );
159
- }), A = k(() => ({
160
- ...p.value,
161
- name: p.value.name ?? u.name,
162
- invalid: h.value,
163
- valid: u.showValid ? !!(!h.value && s.value) : void 0,
164
- type: ((i) => {
165
- if ([
166
- d.text,
167
- d.number,
168
- d.email,
169
- d.password,
170
- d.tel,
171
- d.url,
172
- d.search,
173
- d.date,
174
- d.time,
175
- d.datetimeLocal,
176
- d.month,
177
- d.week,
178
- d.color
179
- ].includes(i))
180
- return i;
181
- })(u.type),
182
- invalidLabel: v.value,
183
- modelValue: s.value,
184
- "onUpdate:modelValue": g
185
- }));
186
- return M(t, {
187
- name: S(b),
188
- errors: S(m)
189
- }), { component: k(() => {
190
- if (u.type === d.custom)
191
- return {
192
- render() {
193
- var i;
194
- return ((i = r.default) == null ? void 0 : i.call(r, {
195
- modelValue: s.value,
196
- onUpdate: g,
197
- submit: n == null ? void 0 : n.submit,
198
- validate: n == null ? void 0 : n.validate,
199
- invalid: h.value,
200
- invalidLabel: v.value,
201
- formData: n == null ? void 0 : n.formData.value,
202
- formErrors: n == null ? void 0 : n.errors.value,
203
- errors: m.value
204
- })) ?? r.defalut;
143
+ });
144
+ F(() => {
145
+ v.value === void 0 && a.defaultValue !== void 0 && (v.value = a.defaultValue);
146
+ });
147
+ const m = W(() => {
148
+ if (t != null && t.errors.value)
149
+ return z(t.errors.value, String(a.name));
150
+ }), c = W(() => {
151
+ var s;
152
+ return (s = m.value) == null ? void 0 : s._errors;
153
+ }), h = W(() => m.value !== void 0), S = _(h, () => {
154
+ h.value ? (i("invalid", c.value), u && u.errors.value.set(
155
+ a.name,
156
+ {
157
+ _errors: c.value
205
158
  }
206
- };
207
- if (!((o == null ? void 0 : o.lazyLoad) ?? u.lazyLoad)) {
208
- let i;
209
- switch (u.type) {
210
- case d.select:
211
- i = O("VvSelect");
212
- break;
213
- case d.checkbox:
214
- i = O("VvCheckbox");
215
- break;
216
- case d.radio:
217
- i = O("VvRadio");
218
- break;
219
- case d.textarea:
220
- i = O("VvTextarea");
221
- break;
222
- case d.radioGroup:
223
- i = O("VvRadioGroup");
224
- break;
225
- case d.checkboxGroup:
226
- i = O("VvCheckboxGroup");
227
- break;
228
- case d.combobox:
229
- i = O("VvCombobox");
230
- break;
231
- default:
232
- i = O("VvInputText");
233
- }
234
- if (typeof i != "string")
235
- return i;
236
- console.warn(
237
- `[form-vue warn]: ${i} not found, the component will be loaded asynchronously. To avoid this warning, please set "lazyLoad" option.`
159
+ )) : (i("valid", v.value), u && u.errors.value.delete(
160
+ a.name
161
+ ));
162
+ }), I = _(
163
+ () => t == null ? void 0 : t.formData,
164
+ () => {
165
+ i("update:formData", t == null ? void 0 : t.formData);
166
+ },
167
+ { deep: !0 }
168
+ );
169
+ ue(() => {
170
+ S(), I();
171
+ });
172
+ const O = (s) => {
173
+ v.value = s;
174
+ }, w = W(() => {
175
+ let s = g.value;
176
+ return typeof s == "function" && (s = s(t == null ? void 0 : t.formData)), Object.keys(s).reduce(
177
+ (E, p) => (E[p] = G(s[p]), E),
178
+ {}
238
179
  );
239
- }
240
- return F(async () => {
241
- switch (o != null && o.sideEffects && await Promise.resolve(o.sideEffects(u.type)), u.type) {
242
- case d.textarea:
243
- return import("@volverjs/ui-vue/vv-textarea");
244
- case d.radio:
245
- return import("@volverjs/ui-vue/vv-radio");
246
- case d.radioGroup:
247
- return import("@volverjs/ui-vue/vv-radio-group");
248
- case d.checkbox:
249
- return import("@volverjs/ui-vue/vv-checkbox");
250
- case d.checkboxGroup:
251
- return import("@volverjs/ui-vue/vv-checkbox-group");
252
- case d.select:
253
- return import("@volverjs/ui-vue/vv-select");
254
- case d.combobox:
255
- return import("@volverjs/ui-vue/vv-combobox");
180
+ }), b = W(() => t != null && t.readonly.value ? !0 : w.value.readonly ?? a.readonly), V = W(() => ({
181
+ ...w.value,
182
+ name: w.value.name ?? a.name,
183
+ invalid: h.value,
184
+ valid: a.showValid ? !!(!h.value && v.value) : void 0,
185
+ type: ((s) => {
186
+ if ([
187
+ d.color,
188
+ d.date,
189
+ d.datetimeLocal,
190
+ d.email,
191
+ d.month,
192
+ d.number,
193
+ d.password,
194
+ d.search,
195
+ d.tel,
196
+ d.text,
197
+ d.time,
198
+ d.url,
199
+ d.week
200
+ ].includes(s))
201
+ return s;
202
+ })(a.type),
203
+ invalidLabel: c.value,
204
+ modelValue: v.value,
205
+ readonly: b.value,
206
+ "onUpdate:modelValue": O
207
+ }));
208
+ return P(r, {
209
+ name: U(o),
210
+ errors: U(m)
211
+ }), { component: W(() => {
212
+ if (a.type === d.custom)
213
+ return {
214
+ render() {
215
+ var s;
216
+ return ((s = n.default) == null ? void 0 : s.call(n, {
217
+ errors: m.value,
218
+ formData: t == null ? void 0 : t.formData.value,
219
+ formErrors: t == null ? void 0 : t.errors.value,
220
+ invalid: h.value,
221
+ invalidLabel: c.value,
222
+ modelValue: v.value,
223
+ onUpdate: O,
224
+ readonly: b.value,
225
+ submit: t == null ? void 0 : t.submit,
226
+ validate: t == null ? void 0 : t.validate
227
+ })) ?? n.default;
228
+ }
229
+ };
230
+ if (!((f == null ? void 0 : f.lazyLoad) ?? a.lazyLoad)) {
231
+ let s;
232
+ switch (a.type) {
233
+ case d.select:
234
+ s = B("VvSelect");
235
+ break;
236
+ case d.checkbox:
237
+ s = B("VvCheckbox");
238
+ break;
239
+ case d.radio:
240
+ s = B("VvRadio");
241
+ break;
242
+ case d.textarea:
243
+ s = B("VvTextarea");
244
+ break;
245
+ case d.radioGroup:
246
+ s = B("VvRadioGroup");
247
+ break;
248
+ case d.checkboxGroup:
249
+ s = B("VvCheckboxGroup");
250
+ break;
251
+ case d.combobox:
252
+ s = B("VvCombobox");
253
+ break;
254
+ default:
255
+ s = B("VvInputText");
256
+ }
257
+ if (typeof s != "string")
258
+ return s;
259
+ console.warn(
260
+ `[form-vue warn]: ${s} not found, the component will be loaded asynchronously. To avoid this warning, please set "lazyLoad" option.`
261
+ );
256
262
  }
257
- return import("@volverjs/ui-vue/vv-input-text");
258
- });
259
- }), hasProps: A, invalid: h };
260
- },
261
- render() {
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
- }
264
- }), J = (e, l = {}) => {
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;
270
- }, o = t(e);
263
+ return le(async () => {
264
+ switch (f != null && f.sideEffects && await Promise.resolve(f.sideEffects(a.type)), a.type) {
265
+ case d.textarea:
266
+ return import("@volverjs/ui-vue/vv-textarea");
267
+ case d.radio:
268
+ return import("@volverjs/ui-vue/vv-radio");
269
+ case d.radioGroup:
270
+ return import("@volverjs/ui-vue/vv-radio-group");
271
+ case d.checkbox:
272
+ return import("@volverjs/ui-vue/vv-checkbox");
273
+ case d.checkboxGroup:
274
+ return import("@volverjs/ui-vue/vv-checkbox-group");
275
+ case d.select:
276
+ return import("@volverjs/ui-vue/vv-select");
277
+ case d.combobox:
278
+ return import("@volverjs/ui-vue/vv-combobox");
279
+ }
280
+ return import("@volverjs/ui-vue/vv-input-text");
281
+ });
282
+ }), hasProps: V, invalid: h };
283
+ },
284
+ render() {
285
+ return this.is ? A(this.is, this.hasProps, this.$slots) : this.type === d.custom ? A(this.component, null, this.$slots) : A(this.component, this.hasProps, this.$slots);
286
+ }
287
+ });
288
+ }
289
+ function L(e, l = {}) {
290
+ const r = (i) => {
291
+ let u = i;
292
+ for (; u instanceof X; )
293
+ u = u.innerType();
294
+ return u instanceof Y && (u = u._def.innerType), u;
295
+ }, f = (i) => {
296
+ let u = i;
297
+ for (; u instanceof X; )
298
+ u = u.innerType();
299
+ return u instanceof Y;
300
+ }, a = r(e);
271
301
  return {
272
- ...(o instanceof K ? o._def.unknownKeys === "passthrough" : !1) ? l : {},
302
+ ...(a instanceof K ? a._def.unknownKeys === "passthrough" : !1) ? l : {},
273
303
  ...Object.fromEntries(
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];
280
- if (f instanceof se) {
281
- const c = a.safeParse(s);
282
- if (c.success)
283
- return [r, c.data ?? n];
304
+ Object.entries(a.shape).map(
305
+ ([i, u]) => {
306
+ const t = l[i], g = f(u);
307
+ let o = r(u), v;
308
+ if (o instanceof de && (v = o._def.defaultValue(), o = o._def.innerType), t === null && o instanceof ve)
309
+ return [i, t];
310
+ if (t == null && g)
311
+ return [i, v];
312
+ if (o instanceof ce) {
313
+ const m = u.safeParse(t);
314
+ if (m.success)
315
+ return [i, m.data ?? v];
284
316
  }
285
- if (f instanceof ie && Array.isArray(s) && s.length) {
286
- const c = t(f._def.type);
287
- if (c instanceof K)
317
+ if (o instanceof me && Array.isArray(t) && t.length) {
318
+ const m = r(o._def.type);
319
+ if (m instanceof K)
288
320
  return [
289
- r,
290
- s.map(
291
- (b) => J(
292
- c,
293
- b && typeof b == "object" ? b : void 0
321
+ i,
322
+ t.map(
323
+ (c) => L(
324
+ m,
325
+ c && typeof c == "object" ? c : void 0
294
326
  )
295
- ) ?? n
327
+ )
296
328
  ];
297
329
  }
298
- return f instanceof K ? [
299
- r,
300
- J(
301
- f,
302
- s && typeof s == "object" ? s : n
330
+ if (o instanceof ye && t) {
331
+ const m = r(o._def.valueType);
332
+ if (m instanceof K)
333
+ return [i, Object.keys(t).reduce((c, h) => (c[h] = L(m, t[h]), c), {})];
334
+ }
335
+ return o instanceof K ? [
336
+ i,
337
+ L(
338
+ o,
339
+ t && typeof t == "object" ? t : v
303
340
  )
304
- ] : [r, n];
341
+ ] : [i, v];
305
342
  }
306
343
  )
307
344
  )
308
345
  };
309
- }, he = (e, l, t, o) => {
310
- const u = C(), r = C(), a = C(), s = async (m = a.value) => {
311
- const v = await e.safeParseAsync(m);
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(
314
- a,
346
+ }
347
+ function Oe(e, l, r, f) {
348
+ const a = R(), n = R(), i = W(() => n.value === k.invalid), u = R(), t = R(!1);
349
+ let g;
350
+ const o = async (b = u.value, V) => {
351
+ if (g = V, t.value)
352
+ return !0;
353
+ const y = await e.safeParseAsync(b);
354
+ if (!y.success) {
355
+ if (n.value = k.invalid, !V)
356
+ return a.value = y.error.format(), !1;
357
+ const s = y.error.issues.filter((E) => V.has(E.path.join(".")));
358
+ return s.length ? (a.value = new he(s).format(), !1) : (a.value = void 0, !0);
359
+ }
360
+ return a.value = void 0, n.value = k.valid, u.value = y.data, !0;
361
+ }, v = () => {
362
+ a.value = void 0, n.value = void 0, g = void 0;
363
+ }, m = () => {
364
+ u.value = L(e), v(), n.value = k.reset;
365
+ }, c = async () => t.value || !await o() ? !1 : (n.value = k.submitting, !0), { ignoreUpdates: h, stop: S } = fe(
366
+ u,
315
367
  () => {
316
- r.value = x.updated;
368
+ n.value = k.updated;
317
369
  },
318
370
  {
319
371
  deep: !0,
320
- eventFilter: ne((t == null ? void 0 : t.updateThrottle) ?? 500)
372
+ eventFilter: oe((r == null ? void 0 : r.updateThrottle) ?? 500)
321
373
  }
322
- ), b = z({
374
+ ), I = U(a), O = U(n), w = M({
323
375
  name: "VvForm",
324
376
  props: {
325
- continuosValidation: {
377
+ continuousValidation: {
326
378
  type: Boolean,
327
379
  default: !1
328
380
  },
@@ -330,6 +382,10 @@ const me = (e, l, t, o) => z({
330
382
  type: Object,
331
383
  default: () => ({})
332
384
  },
385
+ readonly: {
386
+ type: Boolean,
387
+ default: (r == null ? void 0 : r.readonly) ?? !1
388
+ },
333
389
  tag: {
334
390
  type: String,
335
391
  default: "form"
@@ -339,331 +395,426 @@ const me = (e, l, t, o) => z({
339
395
  default: void 0
340
396
  }
341
397
  },
342
- emits: ["invalid", "valid", "submit", "update:modelValue"],
343
- expose: ["submit", "validate", "errors", "status", "valid", "invalid"],
344
- setup(m, { emit: v }) {
345
- a.value = J(
398
+ emits: [
399
+ "invalid",
400
+ "submit",
401
+ "update:modelValue",
402
+ "update:readonly",
403
+ "valid",
404
+ "reset"
405
+ ],
406
+ expose: [
407
+ "errors",
408
+ "invalid",
409
+ "readonly",
410
+ "status",
411
+ "submit",
412
+ "tag",
413
+ "template",
414
+ "valid",
415
+ "validate",
416
+ "clear",
417
+ "reset"
418
+ ],
419
+ slots: Object,
420
+ setup(b, { emit: V }) {
421
+ return u.value = L(
346
422
  e,
347
- E(m.modelValue)
348
- ), I(
349
- () => m.modelValue,
423
+ N(b.modelValue)
424
+ ), _(
425
+ () => b.modelValue,
350
426
  (y) => {
351
427
  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));
428
+ const s = se(y) ? N(y) : y;
429
+ if (JSON.stringify(s) === JSON.stringify(N(u.value)))
430
+ return;
431
+ u.value = typeof (s == null ? void 0 : s.clone) == "function" ? s.clone() : JSON.parse(JSON.stringify(s));
354
432
  }
355
433
  },
356
434
  { deep: !0 }
357
- ), I(r, async (y) => {
358
- var V, g, p, A, W;
359
- if (y === x.invalid) {
360
- const i = E(
361
- u.value
435
+ ), _(n, async (y) => {
436
+ var s, E, p, $, T, H;
437
+ if (y === k.invalid) {
438
+ const x = N(a.value);
439
+ V("invalid", x), (s = r == null ? void 0 : r.onInvalid) == null || s.call(
440
+ r,
441
+ x
362
442
  );
363
- v("invalid", i), (V = t == null ? void 0 : t.onInvalid) == null || V.call(t, i);
364
443
  return;
365
444
  }
366
- if (y === x.valid) {
367
- const i = E(a.value);
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);
445
+ if (y === k.valid) {
446
+ const x = N(u.value);
447
+ V("valid", x), (E = r == null ? void 0 : r.onValid) == null || E.call(r, x), V("update:modelValue", x), (p = r == null ? void 0 : r.onUpdate) == null || p.call(r, x);
369
448
  return;
370
449
  }
371
- if (y === x.submitting) {
372
- const i = E(a.value);
373
- v("submit", i), (A = t == null ? void 0 : t.onSubmit) == null || A.call(t, i);
450
+ if (y === k.submitting) {
451
+ const x = N(u.value);
452
+ V("submit", x), ($ = r == null ? void 0 : r.onSubmit) == null || $.call(r, x);
453
+ return;
374
454
  }
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)) {
377
- const i = E(
378
- a.value
379
- );
380
- v("update:modelValue", i), (W = t == null ? void 0 : t.onUpdate) == null || W.call(t, i);
455
+ if (y === k.reset) {
456
+ const x = N(u.value);
457
+ V("reset", x), (T = r == null ? void 0 : r.onReset) == null || T.call(r, x);
458
+ return;
459
+ }
460
+ if (y === k.updated) {
461
+ if ((a.value || r != null && r.continuousValidation || b.continuousValidation) && await o(void 0, g), !u.value || !b.modelValue || JSON.stringify(u.value) !== JSON.stringify(b.modelValue)) {
462
+ const x = N(u.value);
463
+ V("update:modelValue", x), (H = r == null ? void 0 : r.onUpdate) == null || H.call(r, x);
381
464
  }
382
- r.value === x.updated && (r.value = x.unknown);
465
+ n.value === k.updated && (n.value = k.unknown);
383
466
  }
384
- });
385
- const h = k(() => r.value === x.invalid);
386
- return M(l, {
387
- formData: a,
388
- submit: f,
389
- validate: s,
390
- ignoreUpdates: n,
391
- stopUpdatesWatch: c,
392
- errors: S(u),
393
- status: S(r),
394
- invalid: h
467
+ }), F(() => {
468
+ t.value = b.readonly;
469
+ }), _(
470
+ () => b.readonly,
471
+ (y) => {
472
+ t.value = y;
473
+ }
474
+ ), _(t, (y) => {
475
+ y !== b.readonly && V("update:readonly", t.value);
476
+ }), P(l, {
477
+ clear: v,
478
+ errors: I,
479
+ formData: u,
480
+ ignoreUpdates: h,
481
+ invalid: i,
482
+ readonly: t,
483
+ reset: m,
484
+ status: O,
485
+ stopUpdatesWatch: S,
486
+ submit: c,
487
+ validate: o
395
488
  }), {
396
- formData: a,
397
- submit: f,
398
- validate: s,
399
- ignoreUpdates: n,
400
- stopUpdatesWatch: c,
401
- errors: S(u),
402
- status: S(r),
403
- invalid: h
489
+ clear: v,
490
+ errors: I,
491
+ formData: u,
492
+ ignoreUpdates: h,
493
+ invalid: i,
494
+ isReadonly: t,
495
+ reset: m,
496
+ status: O,
497
+ stopUpdatesWatch: S,
498
+ submit: c,
499
+ validate: o
404
500
  };
405
501
  },
406
502
  render() {
407
- const m = () => {
408
- var v, h;
409
- return ((h = (v = this.$slots) == null ? void 0 : v.default) == null ? void 0 : h.call(v, {
410
- formData: this.formData,
411
- submit: this.submit,
412
- validate: this.validate,
413
- ignoreUpdates: this.ignoreUpdates,
414
- stopUpdatesWatch: this.stopUpdatesWatch,
415
- errors: this.errors,
416
- status: this.status,
417
- invalid: this.invalid
503
+ const b = () => {
504
+ var V, y;
505
+ return ((y = (V = this.$slots) == null ? void 0 : V.default) == null ? void 0 : y.call(V, {
506
+ clear: v,
507
+ errors: I,
508
+ formData: u,
509
+ ignoreUpdates: h,
510
+ invalid: i,
511
+ readonly: t,
512
+ reset: m,
513
+ status: O,
514
+ stopUpdatesWatch: S,
515
+ submit: c,
516
+ validate: o
418
517
  })) ?? this.$slots.default;
419
518
  };
420
- return w(
519
+ return A(
421
520
  this.tag,
422
521
  {
423
- onSubmit: re(this.submit, ["prevent"])
522
+ onSubmit: Q(this.submit, ["prevent"]),
523
+ onReset: Q(this.reset, ["prevent"])
424
524
  },
425
- (this.template ?? (t == null ? void 0 : t.template)) && o ? [
426
- w(
427
- o,
525
+ (this.template ?? (r == null ? void 0 : r.template)) && f ? [
526
+ A(
527
+ f,
428
528
  {
429
- schema: this.template ?? (t == null ? void 0 : t.template)
529
+ schema: this.template ?? (r == null ? void 0 : r.template)
430
530
  },
431
531
  {
432
- default: m
532
+ default: b
433
533
  }
434
534
  )
435
535
  ] : {
436
- default: m
536
+ default: b
437
537
  }
438
538
  );
439
539
  }
440
540
  });
441
541
  return {
442
- errors: u,
443
- status: r,
444
- formData: a,
445
- validate: s,
446
- submit: f,
447
- ignoreUpdates: n,
448
- stopUpdatesWatch: c,
449
- /**
450
- * An hack to add types to the default slot
451
- */
452
- VvForm: b
542
+ clear: v,
543
+ errors: a,
544
+ formData: u,
545
+ ignoreUpdates: h,
546
+ invalid: i,
547
+ readonly: t,
548
+ reset: m,
549
+ status: n,
550
+ stopUpdatesWatch: S,
551
+ submit: c,
552
+ validate: o,
553
+ VvForm: w
453
554
  };
454
- }, be = (e, l) => z({
455
- name: "VvFormWrapper",
456
- props: {
457
- name: {
458
- type: String,
459
- required: !0
460
- },
461
- tag: {
462
- type: String,
463
- default: void 0
464
- }
465
- },
466
- emits: ["invalid", "valid"],
467
- expose: ["fields", "invalid"],
468
- 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, {
471
- name: S(n),
472
- errors: f,
473
- fields: s
474
- }), I(
475
- s,
476
- (b) => {
477
- a != null && a.fields && b.forEach((m) => {
478
- a == null || a.fields.value.add(m);
479
- });
480
- },
481
- { deep: !0 }
482
- ), I(
483
- () => 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);
490
- }));
555
+ }
556
+ function we(e, l) {
557
+ return M({
558
+ name: "VvFormWrapper",
559
+ props: {
560
+ name: {
561
+ type: String,
562
+ required: !0
491
563
  },
492
- { deep: !0 }
493
- );
494
- const c = k(() => r != null && r.invalid.value ? f.value.size > 0 : !1);
495
- return I(c, () => {
496
- c.value ? u("invalid") : u("valid");
497
- }), {
498
- formData: r == null ? void 0 : r.formData,
499
- errors: r == null ? void 0 : r.errors,
500
- submit: r == null ? void 0 : r.submit,
501
- validate: r == null ? void 0 : r.validate,
502
- invalid: c,
503
- fields: s,
504
- fieldsErrors: f
505
- };
506
- },
507
- render() {
508
- var o, u;
509
- return this.tag ? w(this.tag, null, {
510
- default: () => {
511
- var r, a;
512
- return ((a = (r = this.$slots).default) == null ? void 0 : a.call(r, {
513
- invalid: this.invalid,
564
+ tag: {
565
+ type: String,
566
+ default: void 0
567
+ }
568
+ },
569
+ emits: ["invalid", "valid"],
570
+ expose: [
571
+ "clear",
572
+ "errors",
573
+ "fields",
574
+ "fieldsErrors",
575
+ "formData",
576
+ "invalid",
577
+ "reset",
578
+ "submit",
579
+ "tag",
580
+ "validate",
581
+ "validateWrapper"
582
+ ],
583
+ slots: Object,
584
+ setup(r, { emit: f }) {
585
+ const a = C(e), n = C(l, void 0), i = R(/* @__PURE__ */ new Set()), u = R(/* @__PURE__ */ new Map()), { name: t } = j(r);
586
+ P(l, {
587
+ name: U(t),
588
+ errors: u,
589
+ fields: i
590
+ }), _(
591
+ i,
592
+ (v) => {
593
+ n != null && n.fields && v.forEach((m) => {
594
+ n == null || n.fields.value.add(m);
595
+ });
596
+ },
597
+ { deep: !0 }
598
+ ), _(
599
+ () => new Map(u.value),
600
+ (v, m) => {
601
+ n != null && n.errors && (Array.from(m.keys()).forEach((c) => {
602
+ n.errors.value.delete(c);
603
+ }), Array.from(v.keys()).forEach((c) => {
604
+ const h = v.get(c);
605
+ h && n.errors.value.set(c, h);
606
+ }));
607
+ },
608
+ { deep: !0 }
609
+ );
610
+ const g = W(() => a != null && a.invalid.value ? u.value.size > 0 : !1);
611
+ _(g, () => {
612
+ g.value ? f("invalid") : f("valid");
613
+ });
614
+ const o = () => (a == null ? void 0 : a.validate(void 0, i.value)) ?? Promise.resolve(!0);
615
+ return {
616
+ clear: a == null ? void 0 : a.clear,
617
+ errors: a == null ? void 0 : a.errors,
618
+ fields: i,
619
+ fieldsErrors: u,
620
+ formData: a == null ? void 0 : a.formData,
621
+ invalid: g,
622
+ reset: a == null ? void 0 : a.reset,
623
+ submit: a == null ? void 0 : a.submit,
624
+ validate: a == null ? void 0 : a.validate,
625
+ validateWrapper: o
626
+ };
627
+ },
628
+ render() {
629
+ const r = () => {
630
+ var f, a;
631
+ return (a = (f = this.$slots).default) == null ? void 0 : a.call(f, {
632
+ clear: this.clear,
633
+ errors: this.errors,
634
+ fieldsErrors: this.fieldsErrors,
514
635
  formData: this.formData,
636
+ invalid: this.invalid,
637
+ reset: this.reset,
515
638
  submit: this.submit,
516
639
  validate: this.validate,
517
- errors: this.errors,
518
- fieldsErrors: this.fieldsErrors
519
- })) ?? this.$slots.defalut;
520
- }
521
- }) : ((u = (o = this.$slots).default) == null ? void 0 : u.call(o, {
522
- invalid: this.invalid,
523
- formData: this.formData,
524
- submit: this.submit,
525
- validate: this.validate,
526
- errors: this.errors,
527
- fieldsErrors: this.fieldsErrors
528
- })) ?? this.$slots.defalut;
529
- }
530
- }), ye = (e, l) => {
531
- const t = z({
640
+ validateWrapper: this.validateWrapper
641
+ });
642
+ };
643
+ return this.tag ? A(this.tag, null, {
644
+ default: r
645
+ }) : r();
646
+ }
647
+ });
648
+ }
649
+ function pe(e, l) {
650
+ const r = M({
532
651
  name: "VvFormTemplate",
533
652
  props: {
534
653
  schema: {
535
654
  type: [Array, Function],
536
655
  required: !0
656
+ },
657
+ scope: {
658
+ type: Object,
659
+ default: () => ({})
537
660
  }
538
661
  },
539
- setup(o, { slots: u }) {
540
- const r = U(e);
541
- if (r != null && r.formData)
662
+ slots: Object,
663
+ setup(f, { slots: a }) {
664
+ const n = C(e);
665
+ if (n != null && n.formData)
542
666
  return () => {
543
- 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,
667
+ var g;
668
+ const i = typeof f.schema == "function" ? f.schema(
669
+ n,
670
+ f.scope
671
+ ) : f.schema;
672
+ let u;
673
+ const t = i.reduce((o, v) => {
674
+ const m = typeof v == "function" ? v(n, f.scope) : v, {
675
+ vvIs: c,
549
676
  vvName: h,
550
- vvSlots: y,
551
- vvChildren: V,
552
- vvIf: g,
553
- vvElseIf: p,
554
- vvType: A,
555
- vvDefaultValue: W,
556
- vvShowValid: i,
557
- vvContent: _,
558
- ...$
677
+ vvSlots: S,
678
+ vvChildren: I,
679
+ vvIf: O,
680
+ vvElseIf: w,
681
+ vvType: b,
682
+ vvDefaultValue: V,
683
+ vvShowValid: y,
684
+ vvContent: s,
685
+ ...E
559
686
  } = m;
560
- if (g !== void 0) {
561
- if (typeof g == "string" ? s = !!L(
562
- Object(r.formData.value),
563
- g
564
- ) : typeof g == "function" ? s = B(g(r)) : s = B(g), !s)
565
- return c;
566
- } else if (p !== void 0 && s !== void 0) {
567
- if (s || (typeof p == "string" ? s = !!L(
568
- Object(r.formData.value),
569
- p
570
- ) : typeof p == "function" ? s = B(p(r)) : s = B(p), !s))
571
- return c;
687
+ if (O !== void 0) {
688
+ if (typeof O == "string" ? u = !!z(
689
+ new Object(n.formData.value),
690
+ O
691
+ ) : typeof O == "function" ? u = G(O(n)) : u = G(O), !u)
692
+ return o;
693
+ } else if (w !== void 0 && u !== void 0) {
694
+ if (u || (typeof w == "string" ? u = !!z(
695
+ new Object(n.formData.value),
696
+ w
697
+ ) : typeof w == "function" ? u = G(w(n)) : u = G(w), !u))
698
+ return o;
572
699
  } else
573
- s = void 0;
574
- const Z = V ? w(t, {
575
- schema: V
576
- }) : void 0;
577
- return h ? (c.push(
578
- w(
700
+ u = void 0;
701
+ let p;
702
+ return I && (typeof c == "string" ? p = A(r, {
703
+ schema: I
704
+ }) : p = {
705
+ default: ($) => A(r, {
706
+ schema: I,
707
+ scope: $
708
+ })
709
+ }), h ? (o.push(
710
+ A(
579
711
  l,
580
712
  {
581
713
  name: h,
582
- is: v,
583
- type: A,
584
- defaultValue: W,
585
- showValid: i,
586
- props: $
714
+ is: c,
715
+ type: b,
716
+ defaultValue: V,
717
+ showValid: y,
718
+ props: E
587
719
  },
588
- y ?? Z ?? _
720
+ S ?? p ?? s
589
721
  )
590
- ), c) : v ? (c.push(
591
- w(
592
- v,
593
- $,
594
- y ?? Z ?? _
722
+ ), o) : c ? (o.push(
723
+ A(
724
+ c,
725
+ E,
726
+ S ?? p ?? s
595
727
  )
596
- ), c) : (V && c.push(Z), c);
728
+ ), o) : (p && ("default" in p ? o.push(p.default(f.scope)) : o.push(p)), o);
597
729
  }, []);
598
- return f.push(
599
- (n = u == null ? void 0 : u.default) == null ? void 0 : n.call(u, {
600
- formData: r == null ? void 0 : r.formData.value,
601
- submit: r == null ? void 0 : r.submit,
602
- validate: r == null ? void 0 : r.validate,
603
- errors: r == null ? void 0 : r.errors.value,
604
- status: r == null ? void 0 : r.status.value,
605
- invalid: r == null ? void 0 : r.invalid.value
730
+ return t.push(
731
+ (g = a == null ? void 0 : a.default) == null ? void 0 : g.call(a, {
732
+ errors: n == null ? void 0 : n.errors.value,
733
+ formData: n == null ? void 0 : n.formData.value,
734
+ invalid: n == null ? void 0 : n.invalid.value,
735
+ status: n == null ? void 0 : n.status.value,
736
+ submit: n == null ? void 0 : n.submit,
737
+ validate: n == null ? void 0 : n.validate,
738
+ clear: n == null ? void 0 : n.clear,
739
+ reset: n == null ? void 0 : n.reset
606
740
  })
607
- ), f;
741
+ ), t;
608
742
  };
609
743
  }
610
744
  });
611
- return t;
612
- }, N = (e, l = {}) => {
613
- const t = Symbol(), o = Symbol(), u = Symbol(), r = be(
614
- t,
615
- o
616
- ), a = me(
617
- t,
618
- o,
619
- u,
745
+ return r;
746
+ }
747
+ function J(e, l = {}) {
748
+ const r = Symbol("formInjectionKey"), f = Symbol("formWrapperInjectionKey"), a = Symbol("formFieldInjectionKey"), n = we(
749
+ r,
750
+ f
751
+ ), i = xe(
752
+ r,
753
+ f,
754
+ a,
620
755
  l
621
- ), s = ye(t, a), {
622
- VvForm: f,
623
- errors: n,
624
- status: c,
625
- formData: b,
626
- validate: m,
627
- submit: v,
628
- ignoreUpdates: h,
629
- stopUpdatesWatch: y
630
- } = he(e, t, l, s);
756
+ ), u = pe(r, i), {
757
+ clear: t,
758
+ errors: g,
759
+ formData: o,
760
+ ignoreUpdates: v,
761
+ invalid: m,
762
+ readonly: c,
763
+ reset: h,
764
+ status: S,
765
+ stopUpdatesWatch: I,
766
+ submit: O,
767
+ validate: w,
768
+ VvForm: b
769
+ } = Oe(e, r, l, u);
631
770
  return {
632
- VvForm: f,
633
- VvFormWrapper: r,
634
- VvFormField: a,
635
- VvFormTemplate: s,
636
- formInjectionKey: t,
637
- formWrapperInjectionKey: o,
638
- formFieldInjectionKey: u,
639
- errors: n,
640
- status: c,
641
- formData: b,
642
- validate: m,
643
- submit: v,
644
- ignoreUpdates: h,
645
- stopUpdatesWatch: y
771
+ clear: t,
772
+ errors: g,
773
+ formData: o,
774
+ formFieldInjectionKey: a,
775
+ formInjectionKey: r,
776
+ formWrapperInjectionKey: f,
777
+ ignoreUpdates: v,
778
+ invalid: m,
779
+ readonly: c,
780
+ reset: h,
781
+ status: S,
782
+ stopUpdatesWatch: I,
783
+ submit: O,
784
+ validate: w,
785
+ VvForm: b,
786
+ VvFormField: i,
787
+ VvFormTemplate: u,
788
+ VvFormWrapper: n
646
789
  };
647
- }, T = Symbol(), xe = (e) => {
790
+ }
791
+ const ne = Symbol("pluginInjectionKey");
792
+ function Ee(e) {
648
793
  let l = {};
649
- return e.schema && (l = N(e.schema, e)), {
794
+ return e.schema && (l = J(e.schema, e)), {
650
795
  ...l,
651
- 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));
796
+ install(r, { global: f = !1 } = {}) {
797
+ r.provide(ne, e), f && (r.config.globalProperties.$vvForm = e, l != null && l.VvForm && r.component("VvForm", l.VvForm), l != null && l.VvFormWrapper && r.component("VvFormWrapper", l.VvFormWrapper), l != null && l.VvFormField && r.component("VvFormField", l.VvFormField), l != null && l.VvFormTemplate && r.component("VvFormTemplate", l.VvFormTemplate));
653
798
  }
654
799
  };
655
- }, ke = (e, l = {}) => te() ? N(
656
- e,
657
- {
658
- ...U(T, {}),
659
- ...l
660
- }
661
- ) : N(e, l), we = (e, l = {}) => N(e, l);
800
+ }
801
+ function We(e, l = {}) {
802
+ return ie() ? J(
803
+ e,
804
+ {
805
+ ...C(ne, {}),
806
+ ...l
807
+ }
808
+ ) : J(e, l);
809
+ }
810
+ function Ae(e, l = {}) {
811
+ return J(e, l);
812
+ }
662
813
  export {
663
814
  d as FormFieldType,
664
- xe as createForm,
665
- J as defaultObjectBySchema,
666
- we as formFactory,
667
- T as pluginInjectionKey,
668
- ke as useForm
815
+ Ee as createForm,
816
+ L as defaultObjectBySchema,
817
+ Ae as formFactory,
818
+ ne as pluginInjectionKey,
819
+ We as useForm
669
820
  };