@uniquedj95/vform 3.1.4 → 3.2.0

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