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