@uniquedj95/vform 3.1.1 → 3.1.3

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,8 +1,8 @@
1
- import { ref as g, computed as C, defineComponent as U, watch as j, createBlock as p, openBlock as c, unref as s, withCtx as y, createVNode as F, createCommentVNode as E, createElementBlock as z, Fragment as $, renderList as G, resolveDynamicComponent as re, normalizeStyle as he, createTextVNode as O, toDisplayString as B, toRef as Ve, mergeModels as q, useModel as S, resolveDirective as ge, withDirectives as be, normalizeClass as _e, onMounted as se, createElementVNode as ue } from "vue";
2
- import { IonGrid as ke, IonRow as ee, IonCol as te, IonButton as W, IonLabel as N, IonText as xe, IonInput as ie, IonInputPasswordToggle as we, IonChip as Ce, IonIcon as X, IonList as Ie, IonItem as Re, IonCheckbox as ce, actionSheetController as Ee, alertController as Fe, IonTextarea as Oe, IonRadioGroup as Ue, IonRadio as Be } from "@ionic/vue";
3
- import { chevronDown as ze, close as qe, add as Se, remove as Te } from "ionicons/icons";
4
- import { maskito as $e } from "@maskito/vue";
5
- function je(t) {
1
+ import { ref as x, computed as E, reactive as Ve, watch as S, defineComponent as A, createBlock as V, openBlock as f, unref as i, withCtx as g, createVNode as F, createCommentVNode as R, createElementBlock as B, Fragment as $, renderList as G, resolveDynamicComponent as se, normalizeStyle as ge, createTextVNode as O, toDisplayString as U, toRef as be, mergeModels as q, useModel as z, resolveDirective as _e, withDirectives as xe, normalizeClass as ke, onMounted as ie, createElementVNode as re } from "vue";
2
+ import { IonGrid as Ce, IonRow as te, IonCol as le, IonButton as W, IonLabel as N, IonText as Ie, IonInput as ce, IonInputPasswordToggle as we, IonChip as Ee, IonIcon as X, IonList as Re, IonItem as Fe, IonCheckbox as de, actionSheetController as Oe, alertController as Ae, IonTextarea as Ue, IonRadioGroup as Be, IonRadio as qe } from "@ionic/vue";
3
+ import { chevronDown as ze, close as Se, add as Te, remove as $e } from "ionicons/icons";
4
+ import { maskito as Le } from "@maskito/vue";
5
+ function De(t) {
6
6
  return new Promise((o) => {
7
7
  requestAnimationFrame(async () => {
8
8
  const n = await t.getInputElement();
@@ -10,21 +10,21 @@ function je(t) {
10
10
  });
11
11
  });
12
12
  }
13
- const Ae = {
13
+ const Me = {
14
14
  d: /\d/,
15
15
  a: /[A-Za-z]/,
16
16
  "*": /[A-Za-z0-9]/
17
17
  // Default: alphanum, can customize if needed
18
- }, Le = {
18
+ }, Pe = {
19
19
  d: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"],
20
20
  a: ["A", "B", "C", "x", "y", "z", "D", "f"],
21
21
  "*": ["A", "3", "b", "8", "z", "4", "D", "0"]
22
22
  };
23
- function De(t, o) {
24
- const n = Le[t];
23
+ function je(t, o) {
24
+ const n = Pe[t];
25
25
  return n[o % n.length];
26
26
  }
27
- function Me(t) {
27
+ function Ne(t) {
28
28
  const o = [];
29
29
  let n = "", e = 0, l = 0;
30
30
  for (; e < t.length; ) {
@@ -34,12 +34,12 @@ function Me(t) {
34
34
  if (t[e + 1] === "{") {
35
35
  const u = t.indexOf("}", e + 2);
36
36
  if (u !== -1) {
37
- const d = t.slice(e + 2, u);
38
- if (d.includes(",")) {
39
- const [, h] = d.split(",").map((b) => parseInt(b.trim()));
40
- r = h || parseInt(d.split(",")[0]);
37
+ const p = t.slice(e + 2, u);
38
+ if (p.includes(",")) {
39
+ const [, c] = p.split(",").map((v) => parseInt(v.trim()));
40
+ r = c || parseInt(p.split(",")[0]);
41
41
  } else
42
- r = parseInt(d);
42
+ r = parseInt(p);
43
43
  e = u;
44
44
  }
45
45
  } else {
@@ -49,7 +49,7 @@ function Me(t) {
49
49
  e = u - 1;
50
50
  }
51
51
  for (let u = 0; u < r; u++)
52
- o.push(Ae[a]), n += De(a, l++);
52
+ o.push(Me[a]), n += je(a, l++);
53
53
  } else
54
54
  o.push(a), n += a;
55
55
  e++;
@@ -57,37 +57,37 @@ function Me(t) {
57
57
  return {
58
58
  mask: o,
59
59
  placeholder: n,
60
- elementPredicate: je
60
+ elementPredicate: De
61
61
  };
62
62
  }
63
- function le(t) {
63
+ function ae(t) {
64
64
  return t == null || Array.isArray(t) && !t.length || typeof t == "object" && !Object.keys(t).length || !t;
65
65
  }
66
- function ae(t, o, n) {
66
+ function ne(t, o, n) {
67
67
  return typeof t.condition == "function" ? t.condition(o, n) : !0;
68
68
  }
69
- function ne(t) {
69
+ function oe(t) {
70
70
  if (typeof t != "object" || t === null)
71
71
  return t;
72
72
  if (Array.isArray(t))
73
- return t.map((n) => ne(n));
73
+ return t.map((n) => oe(n));
74
74
  const o = {};
75
75
  return Object.entries(t).forEach(([n, e]) => {
76
- typeof e == "function" ? o[n] = e.bind(o) : o[n] = ne(e);
76
+ typeof e == "function" ? o[n] = e.bind(o) : o[n] = oe(e);
77
77
  }), o;
78
78
  }
79
- function de(t, o) {
79
+ function fe(t, o) {
80
80
  return o.findIndex((n) => n.value === t.value || n.label === t.label || n.value === t.label || n.label === t.value);
81
81
  }
82
- function L(t, o) {
83
- const n = de(t, o);
82
+ function D(t, o) {
83
+ const n = fe(t, o);
84
84
  n >= 0 ? o[n].isChecked = !0 : o.push({ ...t, isChecked: !0 });
85
85
  }
86
- function Y(t, o) {
87
- const n = de(t, o);
86
+ function ee(t, o) {
87
+ const n = fe(t, o);
88
88
  n >= 0 && (o[n].isChecked = !1);
89
89
  }
90
- function Pe(t, o) {
90
+ function Ge(t, o) {
91
91
  return o ? t.filter(
92
92
  (n) => JSON.stringify(n).toLowerCase().includes(o.toLowerCase())
93
93
  ) : t;
@@ -96,8 +96,20 @@ function ve(t) {
96
96
  const o = t.label || "", n = t.required ? " *" : "";
97
97
  return o + n;
98
98
  }
99
+ function Y(t, o) {
100
+ if (t === o) return !0;
101
+ if (t == null || o == null || typeof t != typeof o) return !1;
102
+ if (typeof t != "object") return t === o;
103
+ if (Array.isArray(t) && Array.isArray(o))
104
+ return t.length !== o.length ? !1 : t.every((l, a) => Y(l, o[a]));
105
+ if (Array.isArray(t) !== Array.isArray(o)) return !1;
106
+ const n = Object.keys(t), e = Object.keys(o);
107
+ return n.length !== e.length ? !1 : n.every(
108
+ (l) => Object.prototype.hasOwnProperty.call(o, l) && Y(t[l], o[l])
109
+ );
110
+ }
99
111
  function me() {
100
- const t = g([]);
112
+ const t = x([]);
101
113
  async function o() {
102
114
  console.debug("Validating form inputs");
103
115
  const a = [];
@@ -111,7 +123,7 @@ function me() {
111
123
  }
112
124
  else
113
125
  console.warn("Component does not have getErrors function:", r);
114
- return a.every(le);
126
+ return a.every(ae);
115
127
  }
116
128
  function n() {
117
129
  t.value.forEach((a) => {
@@ -142,19 +154,54 @@ function me() {
142
154
  updateFormValues: l
143
155
  };
144
156
  }
145
- function Ne(t) {
146
- const o = C(
147
- () => Object.entries(t.value).reduce((e, [l, a]) => (a.value !== void 0 && (typeof a.onChange == "function" ? e[l] = a.onChange(a.value) : e[l] = a.value), e), {})
148
- ), n = C(() => Object.entries(o.value).reduce((e, [l, a]) => (a !== void 0 && (t.value[l].children !== void 0 && (e[l] = a.map(({ other: r }) => Object.entries(r).reduce((u, [d, h]) => (typeof t.value[l].children[d].computedValue == "function" ? u[d] = t.value[l].children[d].computedValue(
149
- h,
150
- t.value
151
- ) : u[d] = h, u), {}))), typeof t.value[l].computedValue == "function" && a !== void 0 && (e[l] = t.value[l].computedValue(a, t.value))), e), {}));
152
- return {
157
+ function Ke(t) {
158
+ const o = E(
159
+ () => Object.entries(t.value).reduce((c, [v, m]) => (m.value !== void 0 && (typeof m.onChange == "function" ? c[v] = m.onChange(m.value) : c[v] = m.value), c), {})
160
+ ), n = Ve({}), e = (c, v, m) => {
161
+ var s;
162
+ return typeof ((s = t.value[c].children[v]) == null ? void 0 : s.computedValue) == "function" ? t.value[c].children[v].computedValue(m, t.value) : m;
163
+ }, l = (c, v, m, s) => {
164
+ n[c][s] || (n[c][s] = {}), Object.entries(v.other ?? {}).forEach(([b, h]) => {
165
+ var d;
166
+ !Y(h, (d = m.other) == null ? void 0 : d[b]) && (n[c][s][b] = e(c, b, h));
167
+ });
168
+ }, a = (c, v, m) => {
169
+ v.forEach((s, b) => {
170
+ const h = m[b] ?? { other: {} };
171
+ l(c, s, h, b);
172
+ });
173
+ }, r = (c, { other: v }) => Object.entries(v ?? {}).reduce(
174
+ (m, [s, b]) => (m[s] = e(c, s, b), m),
175
+ {}
176
+ ), u = (c, v, m) => {
177
+ n[c] || (n[c] = []);
178
+ const s = v;
179
+ Array.isArray(m[c]) ? a(c, s, m[c]) : n[c] = s.map((b) => r(c, b));
180
+ }, p = (c, v, m) => {
181
+ if (!v) {
182
+ delete n[c];
183
+ return;
184
+ }
185
+ const s = t.value[c];
186
+ s.children !== void 0 ? u(c, v, m) : typeof s.computedValue == "function" && (n[c] = s.computedValue(v, t.value));
187
+ };
188
+ return S(
189
+ o,
190
+ (c, v = {}) => {
191
+ Object.keys(c).forEach((m) => {
192
+ Y(c[m], v[m]) || p(m, c[m], v);
193
+ });
194
+ },
195
+ {
196
+ immediate: !0,
197
+ deep: !0
198
+ }
199
+ ), {
153
200
  formData: o,
154
201
  computedData: n
155
202
  };
156
203
  }
157
- const Ge = /* @__PURE__ */ U({
204
+ const We = /* @__PURE__ */ A({
158
205
  __name: "vForm",
159
206
  props: {
160
207
  schema: {},
@@ -170,115 +217,115 @@ const Ge = /* @__PURE__ */ U({
170
217
  },
171
218
  emits: ["submit", "clear", "cancel"],
172
219
  setup(t, { expose: o, emit: n }) {
173
- const e = t, l = n, a = g(e.schema), { dynamicRefs: r, isFormValid: u, resetForm: d } = me(), { formData: h, computedData: b } = Ne(a);
174
- async function R() {
175
- await u() && l("submit", h.value, b.value);
220
+ const e = t, l = n, a = x(e.schema), { dynamicRefs: r, isFormValid: u, resetForm: p } = me(), { formData: c, computedData: v } = Ke(a);
221
+ async function m() {
222
+ await u() && l("submit", c.value, v.value);
176
223
  }
177
- function v() {
178
- d(), l("clear");
224
+ function s() {
225
+ p(), l("clear");
179
226
  }
180
- function I() {
181
- d(), l("cancel");
227
+ function b() {
228
+ p(), l("cancel");
182
229
  }
183
- return j(
184
- h,
230
+ return S(
231
+ c,
185
232
  async () => {
186
- for (const [f, x] of Object.entries(a.value))
187
- ae(x, h.value, b.value) || (x.value = e.schema[f].value);
233
+ for (const [h, C] of Object.entries(a.value))
234
+ ne(C, c.value, v.value) || (C.value = e.schema[h].value);
188
235
  },
189
236
  {
190
237
  deep: !0,
191
238
  immediate: !0
192
239
  }
193
- ), j(
240
+ ), S(
194
241
  () => e.schema,
195
- (f) => {
196
- for (const [x, i] of Object.entries(f))
197
- i.value !== void 0 && (a.value[x].value = i.value);
242
+ (h) => {
243
+ for (const [C, d] of Object.entries(h))
244
+ d.value !== void 0 && (a.value[C].value = d.value);
198
245
  },
199
246
  {
200
247
  deep: !0,
201
248
  immediate: !0
202
249
  }
203
250
  ), o({
204
- resetForm: d,
251
+ resetForm: p,
205
252
  isFormValid: u,
206
253
  resolveData: () => ({
207
- formData: h.value,
208
- computedData: b.value
254
+ formData: c.value,
255
+ computedData: v.value
209
256
  })
210
- }), (f, x) => (c(), p(s(ke), null, {
211
- default: y(() => [
212
- F(s(ee), null, {
213
- default: y(() => [
214
- (c(!0), z($, null, G(Object.keys(a.value), (i) => {
215
- var k, w, A, D, M;
216
- return c(), z($, null, [
217
- s(ae)(a.value[i], s(h), s(b)) ? (c(), p(s(te), {
218
- key: i,
219
- size: ((k = a.value[i].grid) == null ? void 0 : k.xs) ?? "12",
220
- "size-sm": (w = a.value[i].grid) == null ? void 0 : w.sm,
221
- "size-md": (A = a.value[i].grid) == null ? void 0 : A.md,
222
- "size-lg": (D = a.value[i].grid) == null ? void 0 : D.lg,
223
- "size-xl": (M = a.value[i].grid) == null ? void 0 : M.xl,
257
+ }), (h, C) => (f(), V(i(Ce), null, {
258
+ default: g(() => [
259
+ F(i(te), null, {
260
+ default: g(() => [
261
+ (f(!0), B($, null, G(Object.keys(a.value), (d) => {
262
+ var I, w, L, M, P;
263
+ return f(), B($, null, [
264
+ i(ne)(a.value[d], i(c), i(v)) ? (f(), V(i(le), {
265
+ key: d,
266
+ size: ((I = a.value[d].grid) == null ? void 0 : I.xs) ?? "12",
267
+ "size-sm": (w = a.value[d].grid) == null ? void 0 : w.sm,
268
+ "size-md": (L = a.value[d].grid) == null ? void 0 : L.md,
269
+ "size-lg": (M = a.value[d].grid) == null ? void 0 : M.lg,
270
+ "size-xl": (P = a.value[d].grid) == null ? void 0 : P.xl,
224
271
  class: "ion-margin-vertical"
225
272
  }, {
226
- default: y(() => [
227
- (c(), p(re(a.value[i].type), {
228
- modelValue: a.value[i],
229
- "onUpdate:modelValue": (K) => a.value[i] = K,
273
+ default: g(() => [
274
+ (f(), V(se(a.value[d].type), {
275
+ modelValue: a.value[d],
276
+ "onUpdate:modelValue": (K) => a.value[d] = K,
230
277
  schema: a.value,
231
278
  ref_for: !0,
232
279
  ref_key: "dynamicRefs",
233
280
  ref: r,
234
- "ref-key": i
281
+ "ref-key": d
235
282
  }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "ref-key"]))
236
283
  ]),
237
284
  _: 2
238
- }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : E("", !0)
285
+ }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : R("", !0)
239
286
  ], 64);
240
287
  }), 256))
241
288
  ]),
242
289
  _: 1
243
290
  }),
244
- f.hideButtons ? E("", !0) : (c(), p(s(ee), { key: 0 }, {
245
- default: y(() => [
246
- F(s(te), {
291
+ h.hideButtons ? R("", !0) : (f(), V(i(te), { key: 0 }, {
292
+ default: g(() => [
293
+ F(i(le), {
247
294
  size: "12",
248
- style: he([{ display: "flex" }, { justifyContent: f.buttonPlacement }])
295
+ style: ge([{ display: "flex" }, { justifyContent: h.buttonPlacement }])
249
296
  }, {
250
- default: y(() => [
251
- f.showCancelButton ? (c(), p(s(W), {
297
+ default: g(() => [
298
+ h.showCancelButton ? (f(), V(i(W), {
252
299
  key: 0,
253
- onClick: I
300
+ onClick: b
254
301
  }, {
255
- default: y(() => [
256
- O(B(f.cancelButtonText ?? "Cancel"), 1)
302
+ default: g(() => [
303
+ O(U(h.cancelButtonText ?? "Cancel"), 1)
257
304
  ]),
258
305
  _: 1
259
- })) : E("", !0),
260
- f.showClearButton ? (c(), p(s(W), {
306
+ })) : R("", !0),
307
+ h.showClearButton ? (f(), V(i(W), {
261
308
  key: 1,
262
- onClick: v
309
+ onClick: s
263
310
  }, {
264
- default: y(() => [
265
- O(B(f.clearButtonText ?? "Reset"), 1)
311
+ default: g(() => [
312
+ O(U(h.clearButtonText ?? "Reset"), 1)
266
313
  ]),
267
314
  _: 1
268
- })) : E("", !0),
269
- (c(!0), z($, null, G(f.customButtons, (i) => (c(), p(s(W), {
270
- key: i.label,
271
- onClick: i.action,
272
- color: i.color ?? "primary"
315
+ })) : R("", !0),
316
+ (f(!0), B($, null, G(h.customButtons, (d) => (f(), V(i(W), {
317
+ key: d.label,
318
+ onClick: d.action,
319
+ color: d.color ?? "primary"
273
320
  }, {
274
- default: y(() => [
275
- O(B(i.label), 1)
321
+ default: g(() => [
322
+ O(U(d.label), 1)
276
323
  ]),
277
324
  _: 2
278
325
  }, 1032, ["onClick", "color"]))), 128)),
279
- F(s(W), { onClick: R }, {
280
- default: y(() => [
281
- O(B(f.submitButtonText ?? "Submit"), 1)
326
+ F(i(W), { onClick: m }, {
327
+ default: g(() => [
328
+ O(U(h.submitButtonText ?? "Submit"), 1)
282
329
  ]),
283
330
  _: 1
284
331
  })
@@ -293,11 +340,11 @@ const Ge = /* @__PURE__ */ U({
293
340
  }));
294
341
  }
295
342
  });
296
- function Ke(t) {
343
+ function Ze(t) {
297
344
  return {
298
345
  applyValidationState: async (e) => {
299
- var l, a, r, u, d;
300
- (l = t.value) == null || l.$el.classList.remove("ion-invalid"), (a = t.value) == null || a.$el.classList.remove("ion-valid"), e ? (r = t.value) == null || r.$el.classList.add("ion-valid") : (u = t.value) == null || u.$el.classList.add("ion-invalid"), (d = t.value) == null || d.$el.classList.add("ion-touched");
346
+ var l, a, r, u, p;
347
+ (l = t.value) == null || l.$el.classList.remove("ion-invalid"), (a = t.value) == null || a.$el.classList.remove("ion-valid"), e ? (r = t.value) == null || r.$el.classList.add("ion-valid") : (u = t.value) == null || u.$el.classList.add("ion-invalid"), (p = t.value) == null || p.$el.classList.add("ion-touched");
301
348
  },
302
349
  resetValidationState: () => {
303
350
  var e, l;
@@ -306,84 +353,84 @@ function Ke(t) {
306
353
  };
307
354
  }
308
355
  function H(t, o, n, e, l) {
309
- const { applyValidationState: a, resetValidationState: r } = Ke(t);
356
+ const { applyValidationState: a, resetValidationState: r } = Ze(t);
310
357
  async function u() {
311
358
  if (o.value.required && !n.value)
312
359
  return o.value.error = "This field is required", !1;
313
360
  if (l) {
314
- const v = await l(n.value);
315
- if (typeof v == "string")
316
- return o.value.error = v, !1;
317
- if (v === !1)
361
+ const s = await l(n.value);
362
+ if (typeof s == "string")
363
+ return o.value.error = s, !1;
364
+ if (s === !1)
318
365
  return !1;
319
366
  }
320
367
  if (o.value.validation) {
321
- const v = await o.value.validation(n.value, e == null ? void 0 : e.value);
322
- if (v && v.length)
323
- return o.value.error = v.join(), !1;
368
+ const s = await o.value.validation(n.value, e == null ? void 0 : e.value);
369
+ if (s && s.length)
370
+ return o.value.error = s.join(), !1;
324
371
  }
325
372
  return !0;
326
373
  }
327
- async function d() {
328
- const v = await u();
329
- v && (o.value.error = "", o.value.value = n.value), await a(v);
374
+ async function p() {
375
+ const s = await u();
376
+ s && (o.value.error = "", o.value.value = n.value), await a(s);
330
377
  }
331
- function h() {
378
+ function c() {
332
379
  r(), o.value.error = "";
333
380
  }
334
- function b(v = "") {
335
- n.value = v, o.value.error = "", o.value.value = v;
381
+ function v(s = "") {
382
+ n.value = s, o.value.error = "", o.value.value = s;
336
383
  }
337
- function R() {
384
+ function m() {
338
385
  return o.value.error ? [o.value.error] : [];
339
386
  }
340
387
  return {
341
388
  isValid: u,
342
- onValueUpdate: d,
343
- onFocus: h,
344
- onReset: b,
345
- getErrors: R,
389
+ onValueUpdate: p,
390
+ onFocus: c,
391
+ onReset: v,
392
+ getErrors: m,
346
393
  applyValidationState: a,
347
394
  resetValidationState: r
348
395
  };
349
396
  }
350
- function We(t) {
351
- const o = C(() => !!t.value.label), n = C(() => !!t.value.required), e = C(() => t.value.label || "");
397
+ function He(t) {
398
+ const o = E(() => !!t.value.label), n = E(() => !!t.value.required), e = E(() => t.value.label || "");
352
399
  return {
353
400
  showLabel: o,
354
401
  showRequired: n,
355
402
  labelText: e
356
403
  };
357
404
  }
358
- const oe = /* @__PURE__ */ U({
405
+ const ue = /* @__PURE__ */ A({
359
406
  __name: "InputLabel",
360
407
  props: {
361
408
  model: {}
362
409
  },
363
410
  setup(t) {
364
- const o = t, { showLabel: n, showRequired: e, labelText: l } = We(Ve(o, "model"));
365
- return (a, r) => s(n) ? (c(), p(s(N), {
411
+ const o = t, { showLabel: n, showRequired: e, labelText: l } = He(be(o, "model"));
412
+ return (a, r) => i(n) ? (f(), V(i(N), {
366
413
  key: 0,
367
414
  slot: "label",
368
415
  class: "input-label"
369
416
  }, {
370
- default: y(() => [
371
- O(B(s(l)) + " ", 1),
372
- s(e) ? (c(), p(s(xe), {
417
+ default: g(() => [
418
+ O(U(i(l)) + " ", 1),
419
+ i(e) ? (f(), V(i(Ie), {
373
420
  key: 0,
374
421
  color: "danger"
375
422
  }, {
376
- default: y(() => r[0] || (r[0] = [
423
+ default: g(() => r[0] || (r[0] = [
377
424
  O("*")
378
425
  ])),
379
426
  _: 1,
380
427
  __: [0]
381
- })) : E("", !0)
428
+ })) : R("", !0)
382
429
  ]),
383
430
  _: 1
384
- })) : E("", !0);
431
+ })) : R("", !0);
385
432
  }
386
- }), J = /* @__PURE__ */ U({
433
+ }), J = /* @__PURE__ */ A({
387
434
  __name: "BaseInput",
388
435
  props: /* @__PURE__ */ q({
389
436
  schema: {},
@@ -394,38 +441,38 @@ const oe = /* @__PURE__ */ U({
394
441
  }),
395
442
  emits: ["update:modelValue"],
396
443
  setup(t, { expose: o }) {
397
- const n = t, e = S(t, "modelValue"), l = g(null), a = g(e.value.value), r = C(() => n.schema), { isValid: u, onValueUpdate: d, onFocus: h, onReset: b, getErrors: R } = H(
444
+ const n = t, e = z(t, "modelValue"), l = x(null), a = x(e.value.value), r = E(() => n.schema), { isValid: u, onValueUpdate: p, onFocus: c, onReset: v, getErrors: m } = H(
398
445
  l,
399
446
  e,
400
447
  a,
401
448
  r
402
- ), v = C(() => {
403
- if (e.value.pattern) return Me(e.value.pattern);
449
+ ), s = E(() => {
450
+ if (e.value.pattern) return Ne(e.value.pattern);
404
451
  });
405
- return j(
452
+ return S(
406
453
  () => e.value.value,
407
- (I) => a.value = I
454
+ (b) => a.value = b
408
455
  ), o({
409
- onValueUpdate: d,
410
- onReset: b,
411
- getErrors: R,
456
+ onValueUpdate: p,
457
+ onReset: v,
458
+ getErrors: m,
412
459
  isValid: u
413
- }), (I, f) => {
414
- var i;
415
- const x = ge("maskito");
416
- return be((c(), p(s(ie), {
460
+ }), (b, h) => {
461
+ var d;
462
+ const C = _e("maskito");
463
+ return xe((f(), V(i(ce), {
417
464
  ref_key: "inputRef",
418
465
  ref: l,
419
466
  modelValue: a.value,
420
- "onUpdate:modelValue": f[0] || (f[0] = (k) => a.value = k),
467
+ "onUpdate:modelValue": h[0] || (h[0] = (I) => a.value = I),
421
468
  "clear-input": !0,
422
- fill: e.value.fill ?? "outline",
469
+ fill: e.value.fill ?? "solid",
423
470
  "label-placement": e.value.labelPlacement ?? "stacked",
424
- type: I.type ?? "text",
471
+ type: b.type ?? "text",
425
472
  required: e.value.required,
426
473
  "error-text": e.value.error,
427
474
  autofocus: e.value.autoFocus,
428
- placeholder: ((i = v.value) == null ? void 0 : i.placeholder) ?? e.value.placeholder,
475
+ placeholder: ((d = s.value) == null ? void 0 : d.placeholder) ?? e.value.placeholder,
429
476
  disabled: e.value.disabled,
430
477
  counter: e.value.counter,
431
478
  min: e.value.min,
@@ -433,42 +480,42 @@ const oe = /* @__PURE__ */ U({
433
480
  "max-length": e.value.maxLength,
434
481
  "min-length": e.value.minLength,
435
482
  pattern: e.value.pattern,
436
- onIonFocus: s(h),
437
- onIonChange: s(d),
438
- onIonBlur: s(d)
483
+ onIonFocus: i(c),
484
+ onIonChange: i(p),
485
+ onIonBlur: i(p)
439
486
  }, {
440
- default: y(() => [
441
- F(oe, { model: e.value }, null, 8, ["model"]),
442
- e.value.prefix ? (c(), p(s(N), {
487
+ default: g(() => [
488
+ F(ue, { model: e.value }, null, 8, ["model"]),
489
+ e.value.prefix ? (f(), V(i(N), {
443
490
  key: 0,
444
491
  slot: "start"
445
492
  }, {
446
- default: y(() => [
447
- O(B(e.value.prefix), 1)
493
+ default: g(() => [
494
+ O(U(e.value.prefix), 1)
448
495
  ]),
449
496
  _: 1
450
- })) : E("", !0),
451
- e.value.suffix ? (c(), p(s(N), {
497
+ })) : R("", !0),
498
+ e.value.suffix ? (f(), V(i(N), {
452
499
  key: 1,
453
500
  slot: "end"
454
501
  }, {
455
- default: y(() => [
456
- O(B(e.value.suffix), 1)
502
+ default: g(() => [
503
+ O(U(e.value.suffix), 1)
457
504
  ]),
458
505
  _: 1
459
- })) : E("", !0),
460
- I.type === "password" ? (c(), p(s(we), {
506
+ })) : R("", !0),
507
+ b.type === "password" ? (f(), V(i(we), {
461
508
  key: 2,
462
509
  slot: "end"
463
- })) : E("", !0)
510
+ })) : R("", !0)
464
511
  ]),
465
512
  _: 1
466
513
  }, 8, ["modelValue", "fill", "label-placement", "type", "required", "error-text", "autofocus", "placeholder", "disabled", "counter", "min", "max", "max-length", "min-length", "pattern", "onIonFocus", "onIonChange", "onIonBlur"])), [
467
- [x, v.value]
514
+ [C, s.value]
468
515
  ]);
469
516
  };
470
517
  }
471
- }), Ze = /* @__PURE__ */ U({
518
+ }), Je = /* @__PURE__ */ A({
472
519
  __name: "TextInput",
473
520
  props: /* @__PURE__ */ q({
474
521
  schema: {}
@@ -478,7 +525,7 @@ const oe = /* @__PURE__ */ U({
478
525
  }),
479
526
  emits: ["update:modelValue"],
480
527
  setup(t, { expose: o }) {
481
- const n = S(t, "modelValue"), e = g(null);
528
+ const n = z(t, "modelValue"), e = x(null);
482
529
  return o({
483
530
  onReset: () => {
484
531
  var l;
@@ -492,7 +539,7 @@ const oe = /* @__PURE__ */ U({
492
539
  var l, a;
493
540
  return ((a = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : a.call(l)) ?? [];
494
541
  }
495
- }), (l, a) => (c(), p(J, {
542
+ }), (l, a) => (f(), V(J, {
496
543
  modelValue: n.value,
497
544
  "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
498
545
  type: "text",
@@ -501,7 +548,7 @@ const oe = /* @__PURE__ */ U({
501
548
  ref: e
502
549
  }, null, 8, ["modelValue", "schema"]));
503
550
  }
504
- }), He = /* @__PURE__ */ U({
551
+ }), Qe = /* @__PURE__ */ A({
505
552
  __name: "DateInput",
506
553
  props: /* @__PURE__ */ q({
507
554
  schema: {}
@@ -511,7 +558,7 @@ const oe = /* @__PURE__ */ U({
511
558
  }),
512
559
  emits: ["update:modelValue"],
513
560
  setup(t, { expose: o }) {
514
- const n = S(t, "modelValue"), e = g(null);
561
+ const n = z(t, "modelValue"), e = x(null);
515
562
  return o({
516
563
  onValueUpdate: () => {
517
564
  var l;
@@ -525,7 +572,7 @@ const oe = /* @__PURE__ */ U({
525
572
  var l, a;
526
573
  return ((a = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : a.call(l)) ?? [];
527
574
  }
528
- }), (l, a) => (c(), p(J, {
575
+ }), (l, a) => (f(), V(J, {
529
576
  modelValue: n.value,
530
577
  "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
531
578
  type: n.value.enableTime ? "datetime-local" : "date",
@@ -534,7 +581,7 @@ const oe = /* @__PURE__ */ U({
534
581
  ref: e
535
582
  }, null, 8, ["modelValue", "type", "schema"]));
536
583
  }
537
- }), Je = /* @__PURE__ */ U({
584
+ }), Xe = /* @__PURE__ */ A({
538
585
  __name: "NumberInput",
539
586
  props: /* @__PURE__ */ q({
540
587
  schema: {}
@@ -544,7 +591,7 @@ const oe = /* @__PURE__ */ U({
544
591
  }),
545
592
  emits: ["update:modelValue"],
546
593
  setup(t, { expose: o }) {
547
- const n = S(t, "modelValue"), e = g(null);
594
+ const n = z(t, "modelValue"), e = x(null);
548
595
  return o({
549
596
  onReset: () => {
550
597
  var l;
@@ -558,7 +605,7 @@ const oe = /* @__PURE__ */ U({
558
605
  var l, a;
559
606
  return ((a = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : a.call(l)) ?? [];
560
607
  }
561
- }), (l, a) => (c(), p(J, {
608
+ }), (l, a) => (f(), V(J, {
562
609
  modelValue: n.value,
563
610
  "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
564
611
  type: "number",
@@ -567,7 +614,7 @@ const oe = /* @__PURE__ */ U({
567
614
  ref: e
568
615
  }, null, 8, ["modelValue", "schema"]));
569
616
  }
570
- }), Qe = /* @__PURE__ */ U({
617
+ }), Ye = /* @__PURE__ */ A({
571
618
  __name: "EmailInput",
572
619
  props: /* @__PURE__ */ q({
573
620
  schema: {}
@@ -577,7 +624,7 @@ const oe = /* @__PURE__ */ U({
577
624
  }),
578
625
  emits: ["update:modelValue"],
579
626
  setup(t, { expose: o }) {
580
- const n = S(t, "modelValue"), e = g(null);
627
+ const n = z(t, "modelValue"), e = x(null);
581
628
  return o({
582
629
  onReset: () => {
583
630
  var l;
@@ -591,7 +638,7 @@ const oe = /* @__PURE__ */ U({
591
638
  var l, a;
592
639
  return ((a = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : a.call(l)) ?? [];
593
640
  }
594
- }), (l, a) => (c(), p(J, {
641
+ }), (l, a) => (f(), V(J, {
595
642
  modelValue: n.value,
596
643
  "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
597
644
  type: "email",
@@ -600,7 +647,7 @@ const oe = /* @__PURE__ */ U({
600
647
  ref: e
601
648
  }, null, 8, ["modelValue", "schema"]));
602
649
  }
603
- }), Xe = /* @__PURE__ */ U({
650
+ }), et = /* @__PURE__ */ A({
604
651
  __name: "PasswordInput",
605
652
  props: /* @__PURE__ */ q({
606
653
  schema: {}
@@ -610,7 +657,7 @@ const oe = /* @__PURE__ */ U({
610
657
  }),
611
658
  emits: ["update:modelValue"],
612
659
  setup(t, { expose: o }) {
613
- const n = S(t, "modelValue"), e = g(null);
660
+ const n = z(t, "modelValue"), e = x(null);
614
661
  return o({
615
662
  onReset: () => {
616
663
  var l;
@@ -624,7 +671,7 @@ const oe = /* @__PURE__ */ U({
624
671
  var l, a;
625
672
  return ((a = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : a.call(l)) ?? [];
626
673
  }
627
- }), (l, a) => (c(), p(J, {
674
+ }), (l, a) => (f(), V(J, {
628
675
  modelValue: n.value,
629
676
  "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
630
677
  type: "password",
@@ -633,7 +680,7 @@ const oe = /* @__PURE__ */ U({
633
680
  ref: e
634
681
  }, null, 8, ["modelValue", "schema"]));
635
682
  }
636
- }), Ye = /* @__PURE__ */ U({
683
+ }), tt = /* @__PURE__ */ A({
637
684
  __name: "SelectInput",
638
685
  props: /* @__PURE__ */ q({
639
686
  schema: {},
@@ -644,22 +691,22 @@ const oe = /* @__PURE__ */ U({
644
691
  }),
645
692
  emits: ["update:modelValue"],
646
693
  setup(t, { expose: o }) {
647
- const n = t, e = S(t, "modelValue"), l = g(null), a = g(null), r = g(!1), u = g([]), d = g(""), h = g(1), b = C(() => e.value.interface ?? "popover"), R = C(() => e.value.optionsPlacement === "top" ? "top" : "bottom"), v = C(() => u.value.filter((m) => !!m.isChecked)), I = C(() => !d.value && le(v.value) && !r.value ? e.value.placeholder ?? "Select an option" : "");
648
- j([d, () => e.value.options], Z, {
694
+ const n = t, e = z(t, "modelValue"), l = x(null), a = x(null), r = x(!1), u = x([]), p = x(""), c = x(1), v = E(() => e.value.interface ?? "popover"), m = E(() => e.value.optionsPlacement === "top" ? "top" : "bottom"), s = E(() => u.value.filter((y) => !!y.isChecked)), b = E(() => !p.value && ae(s.value) && !r.value ? e.value.placeholder ?? "Select an option" : "");
695
+ S([p, () => e.value.options], Z, {
649
696
  immediate: !0,
650
697
  deep: !0
651
- }), j(() => e.value.value, pe, { immediate: !0, deep: !0 });
652
- function f() {
653
- u.value.forEach((m) => Y(m, u.value)), e.value.error = "", d.value = "", h.value = 1, e.value.value = e.value.multiple ? [] : "";
698
+ }), S(() => e.value.value, he, { immediate: !0, deep: !0 });
699
+ function h() {
700
+ u.value.forEach((y) => ee(y, u.value)), e.value.error = "", p.value = "", c.value = 1, e.value.value = e.value.multiple ? [] : "";
654
701
  }
655
- function x(m) {
656
- if (m.isChecked) return Y(m, u.value);
657
- e.value.multiple ? L(m, u.value) : (f(), L(m, u.value), P()), d.value = "";
702
+ function C(y) {
703
+ if (y.isChecked) return ee(y, u.value);
704
+ e.value.multiple ? D(y, u.value) : (h(), D(y, u.value), j()), p.value = "";
658
705
  }
659
- function i() {
660
- switch (b.value) {
706
+ function d() {
707
+ switch (v.value) {
661
708
  case "action-sheet":
662
- k();
709
+ I();
663
710
  break;
664
711
  case "alert":
665
712
  w();
@@ -670,18 +717,18 @@ const oe = /* @__PURE__ */ U({
670
717
  break;
671
718
  }
672
719
  }
673
- async function k() {
720
+ async function I() {
674
721
  if (await Z(), e.value.multiple) {
675
722
  r.value = !0;
676
723
  return;
677
724
  }
678
- await (await Ee.create({
725
+ await (await Oe.create({
679
726
  header: e.value.label || "Select an option",
680
727
  buttons: [
681
- ...u.value.map((_) => ({
682
- text: _.label,
683
- cssClass: _.isChecked ? "selected-option" : "",
684
- handler: () => (x(_), !1)
728
+ ...u.value.map((k) => ({
729
+ text: k.label,
730
+ cssClass: k.isChecked ? "selected-option" : "",
731
+ handler: () => (C(k), !1)
685
732
  })),
686
733
  {
687
734
  text: "Cancel",
@@ -692,15 +739,15 @@ const oe = /* @__PURE__ */ U({
692
739
  }
693
740
  async function w() {
694
741
  await Z();
695
- const m = u.value.map((V) => ({
696
- label: V.label,
742
+ const y = u.value.map((_) => ({
743
+ label: _.label,
697
744
  type: e.value.multiple ? "checkbox" : "radio",
698
- value: V,
699
- checked: V.isChecked
745
+ value: _,
746
+ checked: _.isChecked
700
747
  }));
701
- await (await Fe.create({
748
+ await (await Ae.create({
702
749
  header: e.value.label || "Select an option",
703
- inputs: m,
750
+ inputs: y,
704
751
  buttons: [
705
752
  {
706
753
  text: "Cancel",
@@ -708,108 +755,108 @@ const oe = /* @__PURE__ */ U({
708
755
  },
709
756
  {
710
757
  text: "OK",
711
- handler: (V) => {
758
+ handler: (_) => {
712
759
  if (e.value.multiple)
713
- u.value.forEach((T) => Y(T, u.value)), V.forEach((T) => {
760
+ u.value.forEach((T) => ee(T, u.value)), _.forEach((T) => {
714
761
  const Q = u.value.find((ye) => ye.value === T.value);
715
- Q && L(Q, u.value);
762
+ Q && D(Q, u.value);
716
763
  });
717
764
  else {
718
- f();
719
- const T = u.value.find((Q) => Q.value === V.value);
720
- T && L(T, u.value);
765
+ h();
766
+ const T = u.value.find((Q) => Q.value === _.value);
767
+ T && D(T, u.value);
721
768
  }
722
- P();
769
+ j();
723
770
  }
724
771
  }
725
772
  ]
726
773
  })).present();
727
774
  }
728
- async function A() {
729
- if (e.value.required && le(v.value))
775
+ async function L() {
776
+ if (e.value.required && ae(s.value))
730
777
  return "This field is required";
731
778
  if (e.value.validation) {
732
- const m = await e.value.validation(v.value, n == null ? void 0 : n.schema);
733
- if (m && m.length)
734
- return m.join();
779
+ const y = await e.value.validation(s.value, n == null ? void 0 : n.schema);
780
+ if (y && y.length)
781
+ return y.join();
735
782
  }
736
783
  return !0;
737
784
  }
738
- const { onFocus: D, applyValidationState: M } = H(
785
+ const { onFocus: M, applyValidationState: P } = H(
739
786
  l,
740
787
  e,
741
- C(() => e.value.multiple ? v.value : v.value[0]),
742
- C(() => n == null ? void 0 : n.schema),
743
- A
788
+ E(() => e.value.multiple ? s.value : s.value[0]),
789
+ E(() => n == null ? void 0 : n.schema),
790
+ L
744
791
  );
745
- function K(m) {
746
- var _;
747
- m.target === ((_ = l.value) == null ? void 0 : _.$el) && (D(), b.value === "popover" && (r.value = !0));
792
+ function K(y) {
793
+ var k;
794
+ y.target === ((k = l.value) == null ? void 0 : k.$el) && (M(), v.value === "popover" && (r.value = !0));
748
795
  }
749
- async function P(m) {
750
- var V;
751
- if ((V = m == null ? void 0 : m.relatedTarget) != null && V.closest(".suggestions-list")) return;
796
+ async function j(y) {
797
+ var _;
798
+ if ((_ = y == null ? void 0 : y.relatedTarget) != null && _.closest(".suggestions-list")) return;
752
799
  r.value = !1;
753
- const _ = await A();
754
- _ === !0 ? (e.value.error = "", e.value.value = e.value.multiple ? v.value : v.value[0]) : e.value.error = typeof _ == "string" ? _ : "Validation failed", await M(_ === !0);
800
+ const k = await L();
801
+ k === !0 ? (e.value.error = "", e.value.value = e.value.multiple ? s.value : s.value[0]) : e.value.error = typeof k == "string" ? k : "Validation failed", await P(k === !0);
755
802
  }
756
803
  async function Z() {
757
- const m = [];
804
+ const y = [];
758
805
  if (typeof e.value.options == "function") {
759
- const _ = await e.value.options(d.value);
760
- m.push(..._.filter((V) => !!V.label));
806
+ const k = await e.value.options(p.value);
807
+ y.push(...k.filter((_) => !!_.label));
761
808
  } else
762
- m.push(...Pe(e.value.options ?? [], d.value));
763
- v.value.forEach((_) => L(_, m)), u.value = m;
809
+ y.push(...Ge(e.value.options ?? [], p.value));
810
+ s.value.forEach((k) => D(k, y)), u.value = y;
764
811
  }
765
- function pe() {
766
- const m = e.value.value;
767
- m && (Array.isArray(m) ? m.forEach((_) => L(_, u.value)) : L(typeof m == "object" ? m : {
768
- value: m,
769
- label: m
812
+ function he() {
813
+ const y = e.value.value;
814
+ y && (Array.isArray(y) ? y.forEach((k) => D(k, u.value)) : D(typeof y == "object" ? y : {
815
+ value: y,
816
+ label: y
770
817
  }, u.value));
771
818
  }
772
819
  return o({
773
- onValueUpdate: P,
774
- onReset: f,
820
+ onValueUpdate: j,
821
+ onReset: h,
775
822
  getErrors: () => e.value.error ? [e.value.error] : []
776
- }), (m, _) => (c(), z("div", {
823
+ }), (y, k) => (f(), B("div", {
777
824
  class: "autocomplete-container",
778
- onFocusout: P,
825
+ onFocusout: j,
779
826
  ref_key: "containerRef",
780
827
  ref: a
781
828
  }, [
782
- F(s(ie), {
829
+ F(i(ce), {
783
830
  ref_key: "inputRef",
784
831
  ref: l,
785
- modelValue: d.value,
786
- "onUpdate:modelValue": _[0] || (_[0] = (V) => d.value = V),
787
- fill: e.value.fill ?? "outline",
832
+ modelValue: p.value,
833
+ "onUpdate:modelValue": k[0] || (k[0] = (_) => p.value = _),
834
+ fill: e.value.fill ?? "solid",
788
835
  "label-placement": e.value.labelPlacement ?? "stacked",
789
- type: m.type ?? "text",
836
+ type: y.type ?? "text",
790
837
  required: e.value.required,
791
838
  "error-text": e.value.error,
792
839
  autofocus: e.value.autoFocus,
793
- placeholder: I.value,
840
+ placeholder: b.value,
794
841
  disabled: e.value.disabled,
795
842
  counter: e.value.counter,
796
843
  onIonFocus: K,
797
844
  debounce: 300,
798
- onClick: i
845
+ onClick: d
799
846
  }, {
800
- default: y(() => [
801
- F(oe, { model: e.value }, null, 8, ["model"]),
802
- e.value.multiple ? (c(), p(s(N), {
847
+ default: g(() => [
848
+ F(ue, { model: e.value }, null, 8, ["model"]),
849
+ e.value.multiple ? (f(), V(i(N), {
803
850
  key: 0,
804
851
  style: { width: "fit-content" },
805
852
  slot: "start"
806
853
  }, {
807
- default: y(() => [
808
- (c(!0), z($, null, G(v.value, (V, T) => (c(), p(s(Ce), { key: T }, {
809
- default: y(() => [
810
- F(s(N), null, {
811
- default: y(() => [
812
- O(B(V.label), 1)
854
+ default: g(() => [
855
+ (f(!0), B($, null, G(s.value, (_, T) => (f(), V(i(Ee), { key: T }, {
856
+ default: g(() => [
857
+ F(i(N), null, {
858
+ default: g(() => [
859
+ O(U(_.label), 1)
813
860
  ]),
814
861
  _: 2
815
862
  }, 1024)
@@ -818,52 +865,52 @@ const oe = /* @__PURE__ */ U({
818
865
  }, 1024))), 128))
819
866
  ]),
820
867
  _: 1
821
- })) : (c(), p(s(N), {
868
+ })) : (f(), V(i(N), {
822
869
  key: 1,
823
870
  slot: "start",
824
871
  class: "ion-no-wrap"
825
872
  }, {
826
- default: y(() => {
827
- var V;
873
+ default: g(() => {
874
+ var _;
828
875
  return [
829
- O(B(((V = v.value[0]) == null ? void 0 : V.label) ?? ""), 1)
876
+ O(U(((_ = s.value[0]) == null ? void 0 : _.label) ?? ""), 1)
830
877
  ];
831
878
  }),
832
879
  _: 1
833
880
  })),
834
- F(s(X), {
881
+ F(i(X), {
835
882
  slot: "end",
836
- icon: s(ze)
883
+ icon: i(ze)
837
884
  }, null, 8, ["icon"]),
838
- v.value.length > 0 || d.value ? (c(), p(s(X), {
885
+ s.value.length > 0 || p.value ? (f(), V(i(X), {
839
886
  key: 2,
840
887
  slot: "end",
841
- icon: s(qe),
842
- onClick: f,
888
+ icon: i(Se),
889
+ onClick: h,
843
890
  style: { "z-index": "999999" }
844
- }, null, 8, ["icon"])) : E("", !0)
891
+ }, null, 8, ["icon"])) : R("", !0)
845
892
  ]),
846
893
  _: 1
847
894
  }, 8, ["modelValue", "fill", "label-placement", "type", "required", "error-text", "autofocus", "placeholder", "disabled", "counter"]),
848
- r.value && u.value.length > 0 && b.value === "popover" ? (c(), p(s(Ie), {
895
+ r.value && u.value.length > 0 && v.value === "popover" ? (f(), V(i(Re), {
849
896
  key: 0,
850
- class: _e(["suggestions-list", R.value])
897
+ class: ke(["suggestions-list", m.value])
851
898
  }, {
852
- default: y(() => [
853
- (c(!0), z($, null, G(u.value, (V) => (c(), p(s(Re), {
899
+ default: g(() => [
900
+ (f(!0), B($, null, G(u.value, (_) => (f(), V(i(Fe), {
854
901
  button: "",
855
- key: V.label,
856
- onClick: (T) => x(V)
902
+ key: _.label,
903
+ onClick: (T) => C(_)
857
904
  }, {
858
- default: y(() => [
859
- e.value.multiple ? (c(), p(s(ce), {
905
+ default: g(() => [
906
+ e.value.multiple ? (f(), V(i(de), {
860
907
  key: 0,
861
908
  slot: "start",
862
- checked: V.isChecked
863
- }, null, 8, ["checked"])) : E("", !0),
864
- F(s(N), null, {
865
- default: y(() => [
866
- O(B(V.label), 1)
909
+ checked: _.isChecked
910
+ }, null, 8, ["checked"])) : R("", !0),
911
+ F(i(N), null, {
912
+ default: g(() => [
913
+ O(U(_.label), 1)
867
914
  ]),
868
915
  _: 2
869
916
  }, 1024)
@@ -872,15 +919,15 @@ const oe = /* @__PURE__ */ U({
872
919
  }, 1032, ["onClick"]))), 128))
873
920
  ]),
874
921
  _: 1
875
- }, 8, ["class"])) : E("", !0)
922
+ }, 8, ["class"])) : R("", !0)
876
923
  ], 544));
877
924
  }
878
- }), fe = (t, o) => {
925
+ }), pe = (t, o) => {
879
926
  const n = t.__vccOpts || t;
880
927
  for (const [e, l] of o)
881
928
  n[e] = l;
882
929
  return n;
883
- }, et = /* @__PURE__ */ fe(Ye, [["__scopeId", "data-v-80c14c96"]]), tt = /* @__PURE__ */ U({
930
+ }, lt = /* @__PURE__ */ pe(tt, [["__scopeId", "data-v-e2c4eed6"]]), at = /* @__PURE__ */ A({
884
931
  __name: "TextAreaInput",
885
932
  props: /* @__PURE__ */ q({
886
933
  schema: {}
@@ -890,26 +937,26 @@ const oe = /* @__PURE__ */ U({
890
937
  }),
891
938
  emits: ["update:modelValue"],
892
939
  setup(t, { expose: o }) {
893
- const n = t, e = S(t, "modelValue"), l = g(null), a = g(e.value.value), r = C(() => n.schema), { onValueUpdate: u, onFocus: d, onReset: h, getErrors: b } = H(
940
+ const n = t, e = z(t, "modelValue"), l = x(null), a = x(e.value.value), r = E(() => n.schema), { onValueUpdate: u, onFocus: p, onReset: c, getErrors: v } = H(
894
941
  l,
895
942
  e,
896
943
  a,
897
944
  r
898
945
  );
899
- return j(
946
+ return S(
900
947
  () => e.value.value,
901
- (R) => a.value = R
948
+ (m) => a.value = m
902
949
  ), o({
903
- onReset: h,
950
+ onReset: c,
904
951
  onValueUpdate: u,
905
- getErrors: b
906
- }), (R, v) => (c(), p(s(Oe), {
952
+ getErrors: v
953
+ }), (m, s) => (f(), V(i(Ue), {
907
954
  ref_key: "inputRef",
908
955
  ref: l,
909
956
  modelValue: a.value,
910
- "onUpdate:modelValue": v[0] || (v[0] = (I) => a.value = I),
957
+ "onUpdate:modelValue": s[0] || (s[0] = (b) => a.value = b),
911
958
  "clear-input": !0,
912
- fill: e.value.fill ?? "outline",
959
+ fill: e.value.fill ?? "solid",
913
960
  "label-placement": e.value.labelPlacement ?? "stacked",
914
961
  required: e.value.required,
915
962
  "error-text": e.value.error,
@@ -925,20 +972,20 @@ const oe = /* @__PURE__ */ U({
925
972
  "max-length": e.value.maxLength,
926
973
  "min-length": e.value.minLength,
927
974
  pattern: e.value.pattern,
928
- onIonFocus: s(d),
929
- onIonChange: s(u),
930
- onIonBlur: s(u)
975
+ onIonFocus: i(p),
976
+ onIonChange: i(u),
977
+ onIonBlur: i(u)
931
978
  }, {
932
- default: y(() => [
933
- F(oe, { model: e.value }, null, 8, ["model"])
979
+ default: g(() => [
980
+ F(ue, { model: e.value }, null, 8, ["model"])
934
981
  ]),
935
982
  _: 1
936
983
  }, 8, ["modelValue", "fill", "label-placement", "required", "error-text", "autofocus", "placeholder", "disabled", "counter", "min", "max", "rows", "cols", "auto-grow", "max-length", "min-length", "pattern", "onIonFocus", "onIonChange", "onIonBlur"]));
937
984
  }
938
- }), lt = {
985
+ }), nt = {
939
986
  class: "ion-margin-end",
940
987
  style: { "flex-grow": "1" }
941
- }, at = { style: { display: "flex", "justify-content": "flex-end" } }, nt = /* @__PURE__ */ U({
988
+ }, ot = { style: { display: "flex", "justify-content": "flex-end" } }, ut = /* @__PURE__ */ A({
942
989
  __name: "RepeatInput",
943
990
  props: /* @__PURE__ */ q({
944
991
  schema: {},
@@ -950,109 +997,109 @@ const oe = /* @__PURE__ */ U({
950
997
  }),
951
998
  emits: ["update:modelValue"],
952
999
  setup(t, { expose: o }) {
953
- const n = S(t, "modelValue"), e = g([]), { dynamicRefs: l, resetForm: a, getFormErrors: r, updateFormValues: u } = me(), d = C(() => e.value.map((f, x) => ({
954
- label: `Set ${x + 1}`,
955
- value: x,
956
- other: Object.entries(f).reduce(
957
- (i, [k, w]) => (i[k] = w.value, i),
1000
+ const n = z(t, "modelValue"), e = x([]), { dynamicRefs: l, resetForm: a, getFormErrors: r, updateFormValues: u } = me(), p = E(() => e.value.map((h, C) => ({
1001
+ label: `Set ${C + 1}`,
1002
+ value: C,
1003
+ other: Object.entries(h).reduce(
1004
+ (d, [I, w]) => (d[I] = w.value, d),
958
1005
  {}
959
1006
  )
960
1007
  })));
961
- j(
962
- d,
963
- (f) => {
964
- n.value.value = f;
1008
+ S(
1009
+ p,
1010
+ (h) => {
1011
+ n.value.value = h;
965
1012
  },
966
1013
  { deep: !0, immediate: !0 }
967
- ), se(h);
968
- function h() {
969
- n.value.children && e.value.push(ne(n.value.children));
1014
+ ), ie(c);
1015
+ function c() {
1016
+ n.value.children && e.value.push(oe(n.value.children));
970
1017
  }
971
- function b(f) {
972
- e.value.splice(f, 1);
1018
+ function v(h) {
1019
+ e.value.splice(h, 1);
973
1020
  }
974
- function R() {
1021
+ function m() {
975
1022
  a();
976
1023
  }
977
- function v() {
1024
+ function s() {
978
1025
  return r();
979
1026
  }
980
- async function I() {
1027
+ async function b() {
981
1028
  await u();
982
1029
  }
983
1030
  return o({
984
- onValueUpdate: I,
985
- onReset: R,
986
- getErrors: v
987
- }), (f, x) => (c(!0), z($, null, G(e.value, (i, k) => (c(), z("div", {
1031
+ onValueUpdate: b,
1032
+ onReset: m,
1033
+ getErrors: s
1034
+ }), (h, C) => (f(!0), B($, null, G(e.value, (d, I) => (f(), B("div", {
988
1035
  class: "repeat-input-wrapper",
989
- key: k
1036
+ key: I
990
1037
  }, [
991
- ue("div", lt, [
992
- F(s(ee), null, {
993
- default: y(() => [
994
- (c(!0), z($, null, G(Object.keys(i), (w) => {
995
- var A, D, M, K, P;
996
- return c(), z($, null, [
997
- s(ae)(i[w], f.data, f.computedData) ? (c(), p(s(te), {
998
- key: `${k}-${w}`,
999
- size: ((A = i[w].grid) == null ? void 0 : A.xs) ?? "12",
1000
- "size-sm": (D = i[w].grid) == null ? void 0 : D.sm,
1001
- "size-md": (M = i[w].grid) == null ? void 0 : M.md,
1002
- "size-lg": (K = i[w].grid) == null ? void 0 : K.lg,
1003
- "size-xl": (P = i[w].grid) == null ? void 0 : P.xl,
1038
+ re("div", nt, [
1039
+ F(i(te), null, {
1040
+ default: g(() => [
1041
+ (f(!0), B($, null, G(Object.keys(d), (w) => {
1042
+ var L, M, P, K, j;
1043
+ return f(), B($, null, [
1044
+ i(ne)(d[w], h.data, h.computedData) ? (f(), V(i(le), {
1045
+ key: `${I}-${w}`,
1046
+ size: ((L = d[w].grid) == null ? void 0 : L.xs) ?? "12",
1047
+ "size-sm": (M = d[w].grid) == null ? void 0 : M.sm,
1048
+ "size-md": (P = d[w].grid) == null ? void 0 : P.md,
1049
+ "size-lg": (K = d[w].grid) == null ? void 0 : K.lg,
1050
+ "size-xl": (j = d[w].grid) == null ? void 0 : j.xl,
1004
1051
  class: "ion-margin-bottom"
1005
1052
  }, {
1006
- default: y(() => [
1007
- (c(), p(re(i[w].type), {
1008
- modelValue: i[w],
1009
- "onUpdate:modelValue": (Z) => i[w] = Z,
1010
- schema: i,
1011
- "ref-key": `${k}-${w}`,
1053
+ default: g(() => [
1054
+ (f(), V(se(d[w].type), {
1055
+ modelValue: d[w],
1056
+ "onUpdate:modelValue": (Z) => d[w] = Z,
1057
+ schema: d,
1058
+ "ref-key": `${I}-${w}`,
1012
1059
  ref_for: !0,
1013
1060
  ref_key: "dynamicRefs",
1014
1061
  ref: l
1015
1062
  }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "ref-key"]))
1016
1063
  ]),
1017
1064
  _: 2
1018
- }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : E("", !0)
1065
+ }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : R("", !0)
1019
1066
  ], 64);
1020
1067
  }), 256))
1021
1068
  ]),
1022
1069
  _: 2
1023
1070
  }, 1024)
1024
1071
  ]),
1025
- ue("div", at, [
1026
- k === e.value.length - 1 ? (c(), p(s(W), {
1072
+ re("div", ot, [
1073
+ I === e.value.length - 1 ? (f(), V(i(W), {
1027
1074
  key: 0,
1028
- onClick: h,
1075
+ onClick: c,
1029
1076
  color: "primary"
1030
1077
  }, {
1031
- default: y(() => [
1032
- F(s(X), {
1078
+ default: g(() => [
1079
+ F(i(X), {
1033
1080
  slot: "icon-only",
1034
- icon: s(Se)
1081
+ icon: i(Te)
1035
1082
  }, null, 8, ["icon"])
1036
1083
  ]),
1037
1084
  _: 1
1038
- })) : E("", !0),
1039
- e.value.length > 1 ? (c(), p(s(W), {
1085
+ })) : R("", !0),
1086
+ e.value.length > 1 ? (f(), V(i(W), {
1040
1087
  key: 1,
1041
- onClick: (w) => b(k),
1088
+ onClick: (w) => v(I),
1042
1089
  color: "warning"
1043
1090
  }, {
1044
- default: y(() => [
1045
- F(s(X), {
1091
+ default: g(() => [
1092
+ F(i(X), {
1046
1093
  slot: "icon-only",
1047
- icon: s(Te)
1094
+ icon: i($e)
1048
1095
  }, null, 8, ["icon"])
1049
1096
  ]),
1050
1097
  _: 2
1051
- }, 1032, ["onClick"])) : E("", !0)
1098
+ }, 1032, ["onClick"])) : R("", !0)
1052
1099
  ])
1053
1100
  ]))), 128));
1054
1101
  }
1055
- }), ot = /* @__PURE__ */ fe(nt, [["__scopeId", "data-v-402695fe"]]), ut = /* @__PURE__ */ U({
1102
+ }), rt = /* @__PURE__ */ pe(ut, [["__scopeId", "data-v-402695fe"]]), st = /* @__PURE__ */ A({
1056
1103
  __name: "CheckboxInput",
1057
1104
  props: /* @__PURE__ */ q({
1058
1105
  schema: {}
@@ -1062,36 +1109,36 @@ const oe = /* @__PURE__ */ U({
1062
1109
  }),
1063
1110
  emits: ["update:modelValue"],
1064
1111
  setup(t, { expose: o }) {
1065
- const n = t, e = S(t, "modelValue"), l = g(null), a = g(e.value.value), r = C(() => n.schema), u = C(() => ve(e.value)), { onValueUpdate: d, onFocus: h, getErrors: b } = H(l, e, a, r);
1066
- function R() {
1112
+ const n = t, e = z(t, "modelValue"), l = x(null), a = x(e.value.value), r = E(() => n.schema), u = E(() => ve(e.value)), { onValueUpdate: p, onFocus: c, getErrors: v } = H(l, e, a, r);
1113
+ function m() {
1067
1114
  a.value = !1, e.value.error = "", e.value.value = !1;
1068
1115
  }
1069
- return j(
1116
+ return S(
1070
1117
  () => e.value.value,
1071
- (v) => a.value = v
1118
+ (s) => a.value = s
1072
1119
  ), o({
1073
- onValueUpdate: d,
1074
- onReset: R,
1075
- getErrors: b
1076
- }), (v, I) => (c(), p(s(ce), {
1120
+ onValueUpdate: p,
1121
+ onReset: m,
1122
+ getErrors: v
1123
+ }), (s, b) => (f(), V(i(de), {
1077
1124
  modelValue: a.value,
1078
- "onUpdate:modelValue": I[0] || (I[0] = (f) => a.value = f),
1125
+ "onUpdate:modelValue": b[0] || (b[0] = (h) => a.value = h),
1079
1126
  ref_key: "inputRef",
1080
1127
  ref: l,
1081
1128
  required: e.value.required,
1082
1129
  "error-text": e.value.error,
1083
1130
  disabled: e.value.disabled,
1084
- onIonFocus: s(h),
1085
- onIonChange: s(d),
1086
- onIonBlur: s(d)
1131
+ onIonFocus: i(c),
1132
+ onIonChange: i(p),
1133
+ onIonBlur: i(p)
1087
1134
  }, {
1088
- default: y(() => [
1089
- O(B(u.value), 1)
1135
+ default: g(() => [
1136
+ O(U(u.value), 1)
1090
1137
  ]),
1091
1138
  _: 1
1092
1139
  }, 8, ["modelValue", "required", "error-text", "disabled", "onIonFocus", "onIonChange", "onIonBlur"]));
1093
1140
  }
1094
- }), rt = /* @__PURE__ */ U({
1141
+ }), it = /* @__PURE__ */ A({
1095
1142
  __name: "RadioInput",
1096
1143
  props: /* @__PURE__ */ q({
1097
1144
  schema: {}
@@ -1101,48 +1148,48 @@ const oe = /* @__PURE__ */ U({
1101
1148
  }),
1102
1149
  emits: ["update:modelValue"],
1103
1150
  setup(t, { expose: o }) {
1104
- const n = t, e = S(t, "modelValue"), l = g(null), a = g(e.value.value), r = C(() => n.schema), u = g([]), d = C(() => ve(e.value)), { onValueUpdate: h, onFocus: b, getErrors: R } = H(l, e, a, r);
1105
- function v() {
1151
+ const n = t, e = z(t, "modelValue"), l = x(null), a = x(e.value.value), r = E(() => n.schema), u = x([]), p = E(() => ve(e.value)), { onValueUpdate: c, onFocus: v, getErrors: m } = H(l, e, a, r);
1152
+ function s() {
1106
1153
  e.value.error = "", a.value = void 0, e.value.value = void 0;
1107
1154
  }
1108
- function I(x, i) {
1109
- return x.value === i.value;
1155
+ function b(C, d) {
1156
+ return C.value === d.value;
1110
1157
  }
1111
- async function f() {
1158
+ async function h() {
1112
1159
  typeof e.value.options == "function" ? u.value = await e.value.options() : u.value = e.value.options;
1113
1160
  }
1114
- return j(
1161
+ return S(
1115
1162
  () => e.value.value,
1116
- (x) => a.value = x
1163
+ (C) => a.value = C
1117
1164
  ), o({
1118
- onValueUpdate: h,
1119
- onReset: v,
1120
- getErrors: R
1121
- }), se(f), (x, i) => (c(), p(s(Ue), {
1165
+ onValueUpdate: c,
1166
+ onReset: s,
1167
+ getErrors: m
1168
+ }), ie(h), (C, d) => (f(), V(i(Be), {
1122
1169
  modelValue: a.value,
1123
- "onUpdate:modelValue": i[0] || (i[0] = (k) => a.value = k),
1170
+ "onUpdate:modelValue": d[0] || (d[0] = (I) => a.value = I),
1124
1171
  ref_key: "inputRef",
1125
1172
  ref: l,
1126
1173
  required: e.value.required,
1127
- "helper-text": d.value,
1174
+ "helper-text": p.value,
1128
1175
  "error-text": e.value.error,
1129
1176
  disabled: e.value.disabled,
1130
- compareWith: I,
1177
+ compareWith: b,
1131
1178
  "allow-empty-selection": !e.value.required,
1132
- onIonFocus: s(b),
1133
- onIonChange: s(h),
1134
- onIonBlur: s(h)
1179
+ onIonFocus: i(v),
1180
+ onIonChange: i(c),
1181
+ onIonBlur: i(c)
1135
1182
  }, {
1136
- default: y(() => [
1137
- (c(!0), z($, null, G(u.value, (k) => (c(), p(s(Be), {
1138
- key: k.value,
1139
- value: k,
1183
+ default: g(() => [
1184
+ (f(!0), B($, null, G(u.value, (I) => (f(), V(i(qe), {
1185
+ key: I.value,
1186
+ value: I,
1140
1187
  disabled: e.value.disabled,
1141
1188
  "label-placement": "end",
1142
1189
  justify: "start"
1143
1190
  }, {
1144
- default: y(() => [
1145
- O(B(k.label), 1)
1191
+ default: g(() => [
1192
+ O(U(I.label), 1)
1146
1193
  ]),
1147
1194
  _: 2
1148
1195
  }, 1032, ["value", "disabled"]))), 128))
@@ -1150,13 +1197,13 @@ const oe = /* @__PURE__ */ U({
1150
1197
  _: 1
1151
1198
  }, 8, ["modelValue", "required", "helper-text", "error-text", "disabled", "allow-empty-selection", "onIonFocus", "onIonChange", "onIonBlur"]));
1152
1199
  }
1153
- }), vt = {
1200
+ }), mt = {
1154
1201
  install(t) {
1155
- t.component("VForm", Ge), t.component("TextInput", Ze), t.component("DateInput", He), t.component("NumberInput", Je), t.component("EmailInput", Qe), t.component("PasswordInput", Xe), t.component("SelectInput", et), t.component("TextAreaInput", tt), t.component("RepeatInput", ot), t.component("CheckboxInput", ut), t.component("RadioInput", rt), t.directive("maskito", $e);
1202
+ t.component("VForm", We), t.component("TextInput", Je), t.component("DateInput", Qe), t.component("NumberInput", Xe), t.component("EmailInput", Ye), t.component("PasswordInput", et), t.component("SelectInput", lt), t.component("TextAreaInput", at), t.component("RepeatInput", rt), t.component("CheckboxInput", st), t.component("RadioInput", it), t.directive("maskito", Le);
1156
1203
  }
1157
1204
  };
1158
1205
  export {
1159
- vt as VForm,
1160
- vt as default
1206
+ mt as VForm,
1207
+ mt as default
1161
1208
  };
1162
1209
  //# sourceMappingURL=index.es.js.map