@uniquedj95/vform 3.0.3 → 3.0.6

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