@uniquedj95/vform 3.8.0 → 3.8.1

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,5 +1,5 @@
1
- import { ref as F, computed as z, watch as L, defineComponent as U, createElementBlock as A, openBlock as d, normalizeClass as G, createElementVNode as D, createCommentVNode as I, Fragment as j, renderList as ee, toDisplayString as P, normalizeStyle as fe, inject as Se, createBlock as _, unref as i, withCtx as E, createTextVNode as H, resolveDynamicComponent as me, mergeProps as Te, createVNode as T, onMounted as be, toRef as Ue, mergeModels as J, useModel as Q, resolveDirective as Re, withDirectives as qe } from "vue";
2
- import { IonButton as ye, IonGrid as Ie, IonRow as ie, IonCol as oe, IonLabel as ue, IonText as xe, IonInput as Fe, IonInputPasswordToggle as Ne, IonSpinner as $e, IonChip as Le, IonIcon as ge, IonList as Me, IonItem as Ve, IonCheckbox as Ae, actionSheetController as je, alertController as Ge, IonTextarea as We, IonNote as He, IonRadioGroup as Ke, IonRadio as Ze } from "@ionic/vue";
1
+ import { ref as $, computed as F, watch as W, defineComponent as N, createElementBlock as P, openBlock as v, normalizeClass as q, createElementVNode as R, createCommentVNode as z, Fragment as K, renderList as le, toDisplayString as T, normalizeStyle as he, inject as xe, createBlock as k, unref as r, withCtx as E, createTextVNode as G, resolveDynamicComponent as ye, mergeProps as Le, createVNode as L, onMounted as Ve, toRef as Te, mergeModels as Y, useModel as ee, resolveDirective as Ue, withDirectives as Re } from "vue";
2
+ import { IonButton as ke, IonGrid as Fe, IonRow as ie, IonCol as se, IonLabel as ue, IonText as Oe, IonInput as Ae, IonInputPasswordToggle as qe, IonSpinner as de, IonChip as Ne, IonIcon as _e, IonList as Me, IonItem as ge, IonCheckbox as Pe, actionSheetController as je, alertController as We, IonTextarea as Ge, IonNote as He, IonRadioGroup as Ke, IonRadio as Ze } from "@ionic/vue";
3
3
  import { chevronDown as Je, close as Qe, add as Xe, remove as Ye } from "ionicons/icons";
4
4
  import { maskito as et } from "@maskito/vue";
5
5
  function tt(t) {
@@ -28,30 +28,30 @@ function ot(t) {
28
28
  const n = [];
29
29
  let a = "", e = 0, l = 0;
30
30
  for (; e < t.length; ) {
31
- const s = t[e];
32
- if (["d", "a", "*"].includes(s)) {
33
- let u = 1;
31
+ const i = t[e];
32
+ if (["d", "a", "*"].includes(i)) {
33
+ let s = 1;
34
34
  if (t[e + 1] === "{") {
35
35
  const o = t.indexOf("}", e + 2);
36
36
  if (o !== -1) {
37
37
  const g = t.slice(e + 2, o);
38
38
  if (g.includes(",")) {
39
- const [, v] = g.split(",").map((c) => parseInt(c.trim()));
40
- u = v || parseInt(g.split(",")[0]);
39
+ const [, d] = g.split(",").map((c) => parseInt(c.trim()));
40
+ s = d || parseInt(g.split(",")[0]);
41
41
  } else
42
- u = parseInt(g);
42
+ s = parseInt(g);
43
43
  e = o;
44
44
  }
45
45
  } else {
46
46
  let o = e + 1;
47
- for (; t[o] === s; )
48
- u++, o++;
47
+ for (; t[o] === i; )
48
+ s++, o++;
49
49
  e = o - 1;
50
50
  }
51
- for (let o = 0; o < u; o++)
52
- n.push(lt[s]), a += nt(s, l++);
51
+ for (let o = 0; o < s; o++)
52
+ n.push(lt[i]), a += nt(i, l++);
53
53
  } else
54
- n.push(s), a += s;
54
+ n.push(i), a += i;
55
55
  e++;
56
56
  }
57
57
  return {
@@ -72,20 +72,20 @@ async function st(t) {
72
72
  return await t;
73
73
  }
74
74
  }
75
- function Ce(t) {
75
+ function we(t) {
76
76
  return t == null || Array.isArray(t) && !t.length || typeof t == "object" && !Object.keys(t).length || !t;
77
77
  }
78
- function Ee(t, n, a) {
78
+ function Ie(t, n, a) {
79
79
  return t.disabled || t.hidden || typeof t.condition == "function" && !t.condition(n, a);
80
80
  }
81
81
  function ut(t, n, a, e) {
82
82
  t.forEach((l) => {
83
- var s;
84
- if (typeof (l == null ? void 0 : l.onReset) == "function" && ((s = l == null ? void 0 : l.$attrs) != null && s["ref-key"])) {
85
- const u = l.$attrs["ref-key"];
86
- if (u && n[u]) {
87
- const o = n[u];
88
- if (Ee(o, a, e))
83
+ var i;
84
+ if (typeof (l == null ? void 0 : l.onReset) == "function" && ((i = l == null ? void 0 : l.$attrs) != null && i["ref-key"])) {
85
+ const s = l.$attrs["ref-key"];
86
+ if (s && n[s]) {
87
+ const o = n[s];
88
+ if (Ie(o, a, e))
89
89
  return;
90
90
  }
91
91
  l.onReset();
@@ -94,37 +94,37 @@ function ut(t, n, a, e) {
94
94
  }
95
95
  function rt(t, n, a, e) {
96
96
  t.forEach((l) => {
97
- var s;
98
- if (typeof (l == null ? void 0 : l.onReset) == "function" && ((s = l == null ? void 0 : l.$attrs) != null && s["ref-key"])) {
99
- const u = l.$attrs["ref-key"], o = e(u);
100
- if (o && Ee(o, n, a))
97
+ var i;
98
+ if (typeof (l == null ? void 0 : l.onReset) == "function" && ((i = l == null ? void 0 : l.$attrs) != null && i["ref-key"])) {
99
+ const s = l.$attrs["ref-key"], o = e(s);
100
+ if (o && Ie(o, n, a))
101
101
  return;
102
102
  l.onReset();
103
103
  }
104
104
  });
105
105
  }
106
- function he(t, n, a) {
106
+ function be(t, n, a) {
107
107
  return typeof t.condition == "function" ? t.condition(n, a) : !0;
108
108
  }
109
- function we(t) {
109
+ function Ee(t) {
110
110
  if (typeof t != "object" || t === null)
111
111
  return t;
112
112
  if (Array.isArray(t))
113
- return t.map((a) => we(a));
113
+ return t.map((a) => Ee(a));
114
114
  const n = {};
115
115
  return Object.entries(t).forEach(([a, e]) => {
116
- typeof e == "function" ? n[a] = e.bind(n) : n[a] = we(e);
116
+ typeof e == "function" ? n[a] = e.bind(n) : n[a] = Ee(e);
117
117
  }), n;
118
118
  }
119
- function Oe(t, n) {
119
+ function ze(t, n) {
120
120
  return n.findIndex((a) => a.value === t.value || a.label === t.label || a.value === t.label || a.label === t.value);
121
121
  }
122
- function ae(t, n) {
123
- const a = Oe(t, n);
122
+ function ne(t, n) {
123
+ const a = ze(t, n);
124
124
  a >= 0 ? n[a].isChecked = !0 : n.push({ ...t, isChecked: !0 });
125
125
  }
126
126
  function it(t, n) {
127
- const a = Oe(t, n);
127
+ const a = ze(t, n);
128
128
  a >= 0 && (n[a].isChecked = !1);
129
129
  }
130
130
  function ct(t) {
@@ -132,7 +132,7 @@ function ct(t) {
132
132
  n.isChecked = !1;
133
133
  });
134
134
  }
135
- function Pe(t, n) {
135
+ function Be(t, n) {
136
136
  if (!t.description)
137
137
  return !1;
138
138
  const a = t.description.show ?? "always";
@@ -152,40 +152,40 @@ function ce(t, n) {
152
152
  if (t == null || n == null || typeof t != typeof n) return !1;
153
153
  if (typeof t != "object") return t === n;
154
154
  if (Array.isArray(t) && Array.isArray(n))
155
- return t.length !== n.length ? !1 : t.every((l, s) => ce(l, n[s]));
155
+ return t.length !== n.length ? !1 : t.every((l, i) => ce(l, n[i]));
156
156
  if (Array.isArray(t) !== Array.isArray(n)) return !1;
157
157
  const a = Object.keys(t), e = Object.keys(n);
158
158
  return a.length !== e.length ? !1 : a.every((l) => Object.hasOwn(n, l) && ce(t[l], n[l]));
159
159
  }
160
- function Z(t) {
160
+ function X(t) {
161
161
  return t.type !== "FormSection";
162
162
  }
163
- function Be() {
164
- const t = F([]);
163
+ function De() {
164
+ const t = $([]);
165
165
  async function n() {
166
166
  console.debug("Validating form inputs");
167
167
  const l = [];
168
- for (const s of t.value)
169
- if (typeof (s == null ? void 0 : s.onValueUpdate) == "function" && await s.onValueUpdate(), typeof (s == null ? void 0 : s.getErrors) == "function")
168
+ for (const i of t.value)
169
+ if (typeof (i == null ? void 0 : i.onValueUpdate) == "function" && await i.onValueUpdate(), typeof (i == null ? void 0 : i.getErrors) == "function")
170
170
  try {
171
- const u = s.getErrors();
172
- Array.isArray(u) ? l.push(...u) : console.warn("getErrors() returned non-array value:", u);
173
- } catch (u) {
174
- console.error("Error calling getErrors on component:", u, s);
171
+ const s = i.getErrors();
172
+ Array.isArray(s) ? l.push(...s) : console.warn("getErrors() returned non-array value:", s);
173
+ } catch (s) {
174
+ console.error("Error calling getErrors on component:", s, i);
175
175
  }
176
176
  else
177
- console.warn("Component does not have getErrors function:", s);
178
- return l.every(Ce);
177
+ console.warn("Component does not have getErrors function:", i);
178
+ return l.every(we);
179
179
  }
180
180
  function a() {
181
181
  const l = [];
182
- for (const s of t.value)
183
- if (typeof (s == null ? void 0 : s.getErrors) == "function")
182
+ for (const i of t.value)
183
+ if (typeof (i == null ? void 0 : i.getErrors) == "function")
184
184
  try {
185
- const u = s.getErrors();
186
- Array.isArray(u) ? l.push(...u) : l.push(String(u));
187
- } catch (u) {
188
- console.error("Error calling getErrors on component:", u, s);
185
+ const s = i.getErrors();
186
+ Array.isArray(s) ? l.push(...s) : l.push(String(s));
187
+ } catch (s) {
188
+ console.error("Error calling getErrors on component:", s, i);
189
189
  }
190
190
  return l;
191
191
  }
@@ -201,55 +201,55 @@ function Be() {
201
201
  };
202
202
  }
203
203
  function pt(t) {
204
- const n = z(
205
- () => Object.entries(t.value).reduce((v, [c, f]) => {
206
- if (Z(f) && f.value !== void 0) {
207
- if (typeof f.value == "function" || f.value instanceof Promise)
208
- return v;
209
- v[c] = f.value;
204
+ const n = F(
205
+ () => Object.entries(t.value).reduce((d, [c, p]) => {
206
+ if (X(p) && p.value !== void 0) {
207
+ if (typeof p.value == "function" || p.value instanceof Promise)
208
+ return d;
209
+ d[c] = p.value;
210
210
  }
211
- return v;
211
+ return d;
212
212
  }, {})
213
- ), a = F({}), e = (v, c, f) => {
214
- const p = t.value[v];
215
- if (Z(p) && p.children) {
216
- const h = p.children[c];
217
- if (h && Z(h) && typeof h.computedValue == "function")
218
- return h.computedValue(f, t.value);
213
+ ), a = $({}), e = (d, c, p) => {
214
+ const m = t.value[d];
215
+ if (X(m) && m.children) {
216
+ const h = m.children[c];
217
+ if (h && X(h) && typeof h.computedValue == "function")
218
+ return h.computedValue(p, t.value);
219
219
  }
220
- return f;
221
- }, l = (v, c, f, p) => {
222
- a.value[v][p] || (a.value[v][p] = {}), Object.entries(c.other ?? {}).forEach(([h, m]) => {
223
- var w;
224
- !ce(m, (w = f.other) == null ? void 0 : w[h]) && (a.value[v][p][h] = e(v, h, m));
220
+ return p;
221
+ }, l = (d, c, p, m) => {
222
+ a.value[d][m] || (a.value[d][m] = {}), Object.entries(c.other ?? {}).forEach(([h, f]) => {
223
+ var V;
224
+ !ce(f, (V = p.other) == null ? void 0 : V[h]) && (a.value[d][m][h] = e(d, h, f));
225
225
  });
226
- }, s = (v, c, f) => {
227
- c.forEach((p, h) => {
228
- const m = f[h] ?? { other: {} };
229
- l(v, p, m, h);
226
+ }, i = (d, c, p) => {
227
+ c.forEach((m, h) => {
228
+ const f = p[h] ?? { other: {} };
229
+ l(d, m, f, h);
230
230
  });
231
- }, u = (v, { other: c }) => Object.entries(c ?? {}).reduce(
232
- (f, [p, h]) => (f[p] = e(v, p, h), f),
231
+ }, s = (d, { other: c }) => Object.entries(c ?? {}).reduce(
232
+ (p, [m, h]) => (p[m] = e(d, m, h), p),
233
233
  {}
234
- ), o = (v, c, f) => {
235
- a.value[v] || (a.value[v] = []);
236
- const p = c;
237
- Array.isArray(f[v]) ? s(v, p, f[v]) : a.value[v] = p.map((h) => u(v, h));
238
- }, g = (v, c, f) => {
234
+ ), o = (d, c, p) => {
235
+ a.value[d] || (a.value[d] = []);
236
+ const m = c;
237
+ Array.isArray(p[d]) ? i(d, m, p[d]) : a.value[d] = m.map((h) => s(d, h));
238
+ }, g = (d, c, p) => {
239
239
  if (!c) {
240
- delete a.value[v];
240
+ delete a.value[d];
241
241
  return;
242
242
  }
243
- const p = t.value[v];
244
- Z(p) && (typeof p.onChange == "function" && p.onChange(c, t.value), p.children !== void 0 ? o(v, c, f) : typeof p.computedValue == "function" && (a.value[v] = p.computedValue(c, t.value)));
243
+ const m = t.value[d];
244
+ X(m) && (typeof m.onChange == "function" && m.onChange(c, t.value), m.children !== void 0 ? o(d, c, p) : typeof m.computedValue == "function" && (a.value[d] = m.computedValue(c, t.value)));
245
245
  };
246
- return L(
246
+ return W(
247
247
  n,
248
- (v, c = {}) => {
249
- Object.keys(v).forEach((f) => {
250
- ce(v[f], c[f]) || g(f, v[f], c);
251
- }), Object.keys(c).forEach((f) => {
252
- !(f in v) && f in a.value && delete a.value[f];
248
+ (d, c = {}) => {
249
+ Object.keys(d).forEach((p) => {
250
+ ce(d[p], c[p]) || g(p, d[p], c);
251
+ }), Object.keys(c).forEach((p) => {
252
+ !(p in d) && p in a.value && delete a.value[p];
253
253
  });
254
254
  },
255
255
  {
@@ -262,86 +262,86 @@ function pt(t) {
262
262
  };
263
263
  }
264
264
  function ft(t) {
265
- const n = F(0), a = F({}), e = F({}), l = F({});
266
- function s(V, O) {
267
- const B = t.steps.find((x) => x.id === V);
268
- if (!(B != null && B.schema)) return {};
269
- const r = {}, k = Object.values(a.value).reduce(
270
- (x, y) => ({ ...x, ...y }),
265
+ const n = $(0), a = $({}), e = $({}), l = $({});
266
+ function i(C, I) {
267
+ const U = t.steps.find((w) => w.id === C);
268
+ if (!(U != null && U.schema)) return {};
269
+ const u = {}, _ = Object.values(a.value).reduce(
270
+ (w, y) => ({ ...w, ...y }),
271
271
  {}
272
272
  ), b = Object.values(e.value).reduce(
273
- (x, y) => ({ ...x, ...y }),
273
+ (w, y) => ({ ...w, ...y }),
274
274
  {}
275
275
  );
276
- for (const [x, y] of Object.entries(B.schema))
277
- Z(y) && (Ee(y, k, b) && O && x in O ? r[x] = O[x] : y.value !== void 0 && (typeof y.value == "function" || y.value instanceof Promise || (r[x] = y.value)));
278
- return r;
276
+ for (const [w, y] of Object.entries(U.schema))
277
+ X(y) && (Ie(y, _, b) && I && w in I ? u[w] = I[w] : y.value !== void 0 && (typeof y.value == "function" || y.value instanceof Promise || (u[w] = y.value)));
278
+ return u;
279
279
  }
280
- t.steps.forEach((V) => {
281
- a.value[V.id] = s(V.id), e.value[V.id] = {}, l.value[V.id] = [];
280
+ t.steps.forEach((C) => {
281
+ a.value[C.id] = i(C.id), e.value[C.id] = {}, l.value[C.id] = [];
282
282
  });
283
- const u = F(t.steps.map((V) => V.id)), o = z(() => t.steps.filter((O) => O.condition ? O.condition(a.value, e.value) : !0));
284
- L(o, (V) => {
285
- const O = V.map((r) => r.id);
286
- u.value.filter(
287
- (r) => !O.includes(r)
288
- ).forEach((r) => {
289
- C(r);
290
- }), u.value = O;
283
+ const s = $(t.steps.map((C) => C.id)), o = F(() => t.steps.filter((I) => I.condition ? I.condition(a.value, e.value) : !0));
284
+ W(o, (C) => {
285
+ const I = C.map((u) => u.id);
286
+ s.value.filter(
287
+ (u) => !I.includes(u)
288
+ ).forEach((u) => {
289
+ S(u);
290
+ }), s.value = I;
291
291
  });
292
- const g = z(() => o.value.length > 0 ? n.value >= o.value.length ? o.value[o.value.length - 1] : o.value[n.value] : t.steps[n.value]), v = z(() => n.value === 0), c = z(() => n.value === o.value.length - 1), f = z(() => !c.value), p = z(() => !v.value), h = z(() => o.value.length), m = z(() => h.value === 0 ? 0 : Math.round((n.value + 1) / h.value * 100));
293
- function $(V, O) {
294
- a.value[V] = { ...a.value[V], ...O };
292
+ const g = F(() => o.value.length > 0 ? n.value >= o.value.length ? o.value[o.value.length - 1] : o.value[n.value] : t.steps[n.value]), d = F(() => n.value === 0), c = F(() => n.value === o.value.length - 1), p = F(() => !c.value), m = F(() => !d.value), h = F(() => o.value.length), f = F(() => h.value === 0 ? 0 : Math.round((n.value + 1) / h.value * 100));
293
+ function x(C, I) {
294
+ a.value[C] = { ...a.value[C], ...I };
295
295
  }
296
- function w(V, O) {
297
- e.value[V] = { ...e.value[V], ...O };
296
+ function V(C, I) {
297
+ e.value[C] = { ...e.value[C], ...I };
298
298
  }
299
- function C(V) {
300
- if (t.steps.find((B) => B.id === V)) {
301
- const B = a.value[V] || {};
302
- a.value[V] = s(V, B), e.value[V] = {};
299
+ function S(C) {
300
+ if (t.steps.find((U) => U.id === C)) {
301
+ const U = a.value[C] || {};
302
+ a.value[C] = i(C, U), e.value[C] = {};
303
303
  }
304
304
  }
305
- async function S() {
306
- const V = g.value;
307
- if (!V) return !0;
308
- const O = [];
309
- if (V.validation) {
310
- const B = await V.validation(
311
- a.value[V.id],
312
- e.value[V.id]
305
+ async function O() {
306
+ const C = g.value;
307
+ if (!C) return !0;
308
+ const I = [];
309
+ if (C.validation) {
310
+ const U = await C.validation(
311
+ a.value[C.id],
312
+ e.value[C.id]
313
313
  );
314
- B && O.push(...B);
314
+ U && I.push(...U);
315
315
  }
316
- return l.value[V.id] = O, O.length === 0;
316
+ return l.value[C.id] = I, I.length === 0;
317
317
  }
318
- async function M(V) {
319
- return V < 0 || V >= o.value.length || V > n.value && !await S() ? !1 : (n.value = V, !0);
318
+ async function H(C) {
319
+ return C < 0 || C >= o.value.length || C > n.value && !await O() ? !1 : (n.value = C, !0);
320
320
  }
321
- async function R() {
322
- return f.value ? M(n.value + 1) : !1;
321
+ async function A() {
322
+ return p.value ? H(n.value + 1) : !1;
323
323
  }
324
- async function W() {
325
- return p.value ? M(n.value - 1) : !1;
324
+ async function B() {
325
+ return m.value ? H(n.value - 1) : !1;
326
326
  }
327
- function X() {
328
- n.value = 0, l.value = {}, t.steps.forEach((V) => {
329
- C(V.id), l.value[V.id] = [];
327
+ function D() {
328
+ n.value = 0, l.value = {}, t.steps.forEach((C) => {
329
+ S(C.id), l.value[C.id] = [];
330
330
  });
331
331
  }
332
- async function te() {
333
- let V = !0;
334
- for (const O of t.steps)
335
- if (O.validation) {
336
- const B = await O.validation(
337
- a.value[O.id],
338
- e.value[O.id]
332
+ async function Z() {
333
+ let C = !0;
334
+ for (const I of t.steps)
335
+ if (I.validation) {
336
+ const U = await I.validation(
337
+ a.value[I.id],
338
+ e.value[I.id]
339
339
  );
340
- l.value[O.id] = B || [], B && B.length > 0 && (V = !1);
340
+ l.value[I.id] = U || [], U && U.length > 0 && (C = !1);
341
341
  }
342
- return V;
342
+ return C;
343
343
  }
344
- function le() {
344
+ function Q() {
345
345
  return {
346
346
  formData: { ...a.value },
347
347
  computedData: { ...e.value }
@@ -356,23 +356,23 @@ function ft(t) {
356
356
  stepValidationErrors: l,
357
357
  // Computed
358
358
  visibleSteps: o,
359
- isFirstStep: v,
359
+ isFirstStep: d,
360
360
  isLastStep: c,
361
- canGoNext: f,
362
- canGoPrevious: p,
361
+ canGoNext: p,
362
+ canGoPrevious: m,
363
363
  totalSteps: h,
364
- progressPercentage: m,
364
+ progressPercentage: f,
365
365
  // Methods
366
- updateStepData: $,
367
- updateStepComputedData: w,
368
- clearStepData: C,
369
- validateCurrentStep: S,
370
- goToStep: M,
371
- nextStep: R,
372
- previousStep: W,
373
- resetForm: X,
374
- validateAllSteps: te,
375
- getMultiStepFormData: le
366
+ updateStepData: x,
367
+ updateStepComputedData: V,
368
+ clearStepData: S,
369
+ validateCurrentStep: O,
370
+ goToStep: H,
371
+ nextStep: A,
372
+ previousStep: B,
373
+ resetForm: D,
374
+ validateAllSteps: Z,
375
+ getMultiStepFormData: Q
376
376
  };
377
377
  }
378
378
  const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { class: "step-indicator__step-content" }, gt = { class: "step-indicator__step-marker" }, bt = { class: "step-indicator__step-info" }, kt = { class: "step-indicator__step-title" }, _t = {
@@ -381,7 +381,7 @@ const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { clas
381
381
  }, Vt = {
382
382
  key: 0,
383
383
  class: "step-indicator__progress"
384
- }, Ct = { class: "step-indicator__progress-bar" }, wt = { class: "step-indicator__progress-text" }, St = /* @__PURE__ */ U({
384
+ }, Ct = { class: "step-indicator__progress-bar" }, St = { class: "step-indicator__progress-text" }, wt = /* @__PURE__ */ N({
385
385
  __name: "StepIndicator",
386
386
  props: {
387
387
  steps: {},
@@ -392,55 +392,55 @@ const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { clas
392
392
  },
393
393
  emits: ["step-click"],
394
394
  setup(t, { emit: n }) {
395
- const a = t, e = n, l = z(() => a.steps.length === 0 ? 0 : (a.activeStepIndex + 1) / a.steps.length * 100);
396
- function s(u) {
397
- a.allowNavigation && e("step-click", u);
395
+ const a = t, e = n, l = F(() => a.steps.length === 0 ? 0 : (a.activeStepIndex + 1) / a.steps.length * 100);
396
+ function i(s) {
397
+ a.allowNavigation && e("step-click", s);
398
398
  }
399
- return (u, o) => (d(), A("div", {
400
- class: G(["step-indicator", [`step-indicator--${u.position}`, { "step-indicator--clickable": u.allowNavigation }]])
399
+ return (s, o) => (v(), P("div", {
400
+ class: q(["step-indicator", [`step-indicator--${s.position}`, { "step-indicator--clickable": s.allowNavigation }]])
401
401
  }, [
402
- D("div", mt, [
403
- (d(!0), A(j, null, ee(u.steps, (g, v) => (d(), A("div", {
402
+ R("div", mt, [
403
+ (v(!0), P(K, null, le(s.steps, (g, d) => (v(), P("div", {
404
404
  key: g.id,
405
- class: G(["step-indicator__step", {
406
- "step-indicator__step--active": v === u.activeStepIndex,
407
- "step-indicator__step--completed": v < u.activeStepIndex,
408
- "step-indicator__step--clickable": u.allowNavigation
405
+ class: q(["step-indicator__step", {
406
+ "step-indicator__step--active": d === s.activeStepIndex,
407
+ "step-indicator__step--completed": d < s.activeStepIndex,
408
+ "step-indicator__step--clickable": s.allowNavigation
409
409
  }]),
410
- onClick: (c) => s(v)
410
+ onClick: (c) => i(d)
411
411
  }, [
412
- D("div", yt, [
413
- D("div", gt, [
414
- D("span", null, P(v + 1), 1)
412
+ R("div", yt, [
413
+ R("div", gt, [
414
+ R("span", null, T(d + 1), 1)
415
415
  ]),
416
- D("div", bt, [
417
- D("div", kt, P(g.title), 1),
418
- g.subtitle ? (d(), A("div", _t, P(g.subtitle), 1)) : I("", !0)
416
+ R("div", bt, [
417
+ R("div", kt, T(g.title), 1),
418
+ g.subtitle ? (v(), P("div", _t, T(g.subtitle), 1)) : z("", !0)
419
419
  ])
420
420
  ]),
421
- v < u.steps.length - 1 ? (d(), A("div", {
421
+ d < s.steps.length - 1 ? (v(), P("div", {
422
422
  key: 0,
423
- class: G(["step-indicator__connector", { "step-indicator__connector--completed": v < u.activeStepIndex }])
424
- }, null, 2)) : I("", !0)
423
+ class: q(["step-indicator__connector", { "step-indicator__connector--completed": d < s.activeStepIndex }])
424
+ }, null, 2)) : z("", !0)
425
425
  ], 10, ht))), 128))
426
426
  ]),
427
- u.showProgress && (u.position === "top" || u.position === "bottom") ? (d(), A("div", Vt, [
428
- D("div", Ct, [
429
- D("div", {
427
+ s.showProgress && (s.position === "top" || s.position === "bottom") ? (v(), P("div", Vt, [
428
+ R("div", Ct, [
429
+ R("div", {
430
430
  class: "step-indicator__progress-fill",
431
- style: fe({ width: `${l.value}%` })
431
+ style: he({ width: `${l.value}%` })
432
432
  }, null, 4)
433
433
  ]),
434
- D("div", wt, " Step " + P(u.activeStepIndex + 1) + " of " + P(u.steps.length), 1)
435
- ])) : I("", !0)
434
+ R("div", St, " Step " + T(s.activeStepIndex + 1) + " of " + T(s.steps.length), 1)
435
+ ])) : z("", !0)
436
436
  ], 2));
437
437
  }
438
- }), re = (t, n) => {
438
+ }), ae = (t, n) => {
439
439
  const a = t.__vccOpts || t;
440
440
  for (const [e, l] of n)
441
441
  a[e] = l;
442
442
  return a;
443
- }, pe = /* @__PURE__ */ re(St, [["__scopeId", "data-v-aca1a6d0"]]), ne = /* @__PURE__ */ U({
443
+ }, me = /* @__PURE__ */ ae(wt, [["__scopeId", "data-v-aca1a6d0"]]), oe = /* @__PURE__ */ N({
444
444
  __name: "ActionButton",
445
445
  props: {
446
446
  type: {
@@ -453,26 +453,26 @@ const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { clas
453
453
  }
454
454
  },
455
455
  setup(t) {
456
- const n = Se("globalConfig"), a = t, e = z(() => {
457
- var l, s;
458
- return a.label ?? ((s = (l = n == null ? void 0 : n.buttons) == null ? void 0 : l[a.type]) == null ? void 0 : s.label) ?? a.type;
456
+ const n = xe("globalConfig"), a = t, e = F(() => {
457
+ var l, i;
458
+ return a.label ?? ((i = (l = n == null ? void 0 : n.buttons) == null ? void 0 : l[a.type]) == null ? void 0 : i.label) ?? a.type;
459
459
  });
460
- return (l, s) => {
461
- var u, o, g, v, c, f, p, h, m, $, w, C;
462
- return d(), _(i(ye), {
463
- color: ((g = (o = (u = i(n)) == null ? void 0 : u.buttons) == null ? void 0 : o[t.type]) == null ? void 0 : g.color) ?? "primary",
464
- fill: ((f = (c = (v = i(n)) == null ? void 0 : v.buttons) == null ? void 0 : c[t.type]) == null ? void 0 : f.fill) ?? "solid",
465
- expand: (m = (h = (p = i(n)) == null ? void 0 : p.buttons) == null ? void 0 : h[t.type]) == null ? void 0 : m.expand,
466
- size: ((C = (w = ($ = i(n)) == null ? void 0 : $.buttons) == null ? void 0 : w[t.type]) == null ? void 0 : C.size) ?? "default"
460
+ return (l, i) => {
461
+ var s, o, g, d, c, p, m, h, f, x, V, S;
462
+ return v(), k(r(ke), {
463
+ color: ((g = (o = (s = r(n)) == null ? void 0 : s.buttons) == null ? void 0 : o[t.type]) == null ? void 0 : g.color) ?? "primary",
464
+ fill: ((p = (c = (d = r(n)) == null ? void 0 : d.buttons) == null ? void 0 : c[t.type]) == null ? void 0 : p.fill) ?? "solid",
465
+ expand: (f = (h = (m = r(n)) == null ? void 0 : m.buttons) == null ? void 0 : h[t.type]) == null ? void 0 : f.expand,
466
+ size: ((S = (V = (x = r(n)) == null ? void 0 : x.buttons) == null ? void 0 : V[t.type]) == null ? void 0 : S.size) ?? "default"
467
467
  }, {
468
468
  default: E(() => [
469
- H(P(e.value), 1)
469
+ G(T(e.value), 1)
470
470
  ]),
471
471
  _: 1
472
472
  }, 8, ["color", "fill", "expand", "size"]);
473
473
  };
474
474
  }
475
- }), ze = /* @__PURE__ */ U({
475
+ }), $e = /* @__PURE__ */ N({
476
476
  __name: "CustomButton",
477
477
  props: {
478
478
  button: {
@@ -481,7 +481,7 @@ const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { clas
481
481
  }
482
482
  },
483
483
  setup(t) {
484
- return (n, a) => (d(), _(i(ye), {
484
+ return (n, a) => (v(), k(r(ke), {
485
485
  onClick: t.button.action,
486
486
  color: t.button.color ?? "primary",
487
487
  fill: t.button.fill ?? "solid",
@@ -489,18 +489,18 @@ const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { clas
489
489
  expand: t.button.expand
490
490
  }, {
491
491
  default: E(() => [
492
- H(P(t.button.label), 1)
492
+ G(T(t.button.label), 1)
493
493
  ]),
494
494
  _: 1
495
495
  }, 8, ["onClick", "color", "fill", "size", "expand"]));
496
496
  }
497
- }), xt = { class: "v-form-container" }, Et = {
497
+ }), Et = { class: "v-form-container" }, xt = {
498
498
  key: 0,
499
499
  class: "multi-step-form"
500
500
  }, Ot = { class: "multi-step-form-content" }, It = {
501
501
  key: 3,
502
502
  class: "step-progress-bottom"
503
- }, zt = { class: "step-progress-bar" }, Ft = { class: "step-progress-text" }, $t = /* @__PURE__ */ U({
503
+ }, zt = { class: "step-progress-bar" }, Ft = { class: "step-progress-text" }, $t = /* @__PURE__ */ N({
504
504
  __name: "vForm",
505
505
  props: {
506
506
  schema: {},
@@ -519,86 +519,86 @@ const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { clas
519
519
  },
520
520
  emits: ["submit", "multi-step-submit", "step-change", "clear", "cancel"],
521
521
  setup(t, { expose: n, emit: a }) {
522
- const e = t, l = a, s = z(() => !!e.multiStepConfig), u = F(e.schema || {}), o = e.multiStepConfig ? ft(e.multiStepConfig) : null, { dynamicRefs: g, isFormValid: v } = Be(), { formData: c, computedData: f } = pt(u), p = F(null), h = z(() => (o == null ? void 0 : o.currentStepIndex.value) ?? 0), m = z(() => o == null ? void 0 : o.currentStep.value), $ = z(() => (o == null ? void 0 : o.visibleSteps.value) ?? []), w = z(() => (o == null ? void 0 : o.isLastStep.value) ?? !0), C = z(() => (o == null ? void 0 : o.canGoNext.value) ?? !1), S = z(() => (o == null ? void 0 : o.canGoPrevious.value) ?? !1), M = z(() => !s.value || !o ? 0 : o.progressPercentage.value);
523
- L(
524
- () => m.value,
525
- (r) => {
526
- r && s.value && (u.value = r.schema || {});
522
+ const e = t, l = a, i = F(() => !!e.multiStepConfig), s = $(e.schema || {}), o = e.multiStepConfig ? ft(e.multiStepConfig) : null, { dynamicRefs: g, isFormValid: d } = De(), { formData: c, computedData: p } = pt(s), m = $(null), h = F(() => (o == null ? void 0 : o.currentStepIndex.value) ?? 0), f = F(() => o == null ? void 0 : o.currentStep.value), x = F(() => (o == null ? void 0 : o.visibleSteps.value) ?? []), V = F(() => (o == null ? void 0 : o.isLastStep.value) ?? !0), S = F(() => (o == null ? void 0 : o.canGoNext.value) ?? !1), O = F(() => (o == null ? void 0 : o.canGoPrevious.value) ?? !1), H = F(() => !i.value || !o ? 0 : o.progressPercentage.value);
523
+ W(
524
+ () => f.value,
525
+ (u) => {
526
+ u && i.value && (s.value = u.schema || {});
527
527
  },
528
528
  { immediate: !0 }
529
- ), L(
530
- [c, f],
531
- ([r, k]) => {
532
- s.value && o && m.value && (o.updateStepData(m.value.id, r), o.updateStepComputedData(m.value.id, k));
529
+ ), W(
530
+ [c, p],
531
+ ([u, _]) => {
532
+ i.value && o && f.value && (o.updateStepData(f.value.id, u), o.updateStepComputedData(f.value.id, _));
533
533
  },
534
534
  { deep: !0 }
535
- ), L(
535
+ ), W(
536
536
  () => e.schema,
537
- (r) => {
538
- if (!s.value && r) {
539
- u.value = r;
540
- for (const [k, b] of Object.entries(r))
541
- Z(b) && "value" in b && b.value !== void 0 && (u.value[k].value = b.value);
537
+ (u) => {
538
+ if (!i.value && u) {
539
+ s.value = u;
540
+ for (const [_, b] of Object.entries(u))
541
+ X(b) && "value" in b && b.value !== void 0 && (s.value[_].value = b.value);
542
542
  }
543
543
  },
544
544
  { deep: !0, immediate: !0 }
545
545
  );
546
- async function R() {
547
- var r;
548
- if (s.value && o) {
549
- if ((r = m.value) != null && r.component && p.value && typeof p.value.validate == "function" && !await p.value.validate() || !await o.validateAllSteps()) return;
546
+ async function A() {
547
+ var u;
548
+ if (i.value && o) {
549
+ if ((u = f.value) != null && u.component && m.value && typeof m.value.validate == "function" && !await m.value.validate() || !await o.validateAllSteps()) return;
550
550
  const b = o.getMultiStepFormData();
551
551
  l("multi-step-submit", b);
552
552
  } else {
553
- if (!await v()) return;
554
- l("submit", c.value, f.value);
553
+ if (!await d()) return;
554
+ l("submit", c.value, p.value);
555
555
  }
556
556
  }
557
- function W() {
557
+ function B() {
558
558
  ut(
559
559
  g.value,
560
- u.value,
560
+ s.value,
561
561
  c.value,
562
- f.value
562
+ p.value
563
563
  );
564
564
  }
565
- function X() {
566
- s.value && o && m.value && o.clearStepData(m.value.id), W(), l("clear");
565
+ function D() {
566
+ i.value && o && f.value && o.clearStepData(f.value.id), B(), l("clear");
567
567
  }
568
- function te() {
569
- s.value && o ? o.resetForm() : W(), l("cancel");
568
+ function Z() {
569
+ i.value && o ? o.resetForm() : B(), l("cancel");
570
570
  }
571
- async function le() {
572
- var r;
573
- if (s.value && o) {
574
- let k = !0;
575
- if ((r = m.value) != null && r.component && p.value ? typeof p.value.validate == "function" && (k = await p.value.validate()) : k = await v(), !k)
571
+ async function Q() {
572
+ var u;
573
+ if (i.value && o) {
574
+ let _ = !0;
575
+ if ((u = f.value) != null && u.component && m.value ? typeof m.value.validate == "function" && (_ = await m.value.validate()) : _ = await d(), !_)
576
576
  return;
577
- await o.nextStep() && m.value && l("step-change", h.value, m.value.id);
577
+ await o.nextStep() && f.value && l("step-change", h.value, f.value.id);
578
578
  }
579
579
  }
580
- async function V() {
581
- o && await o.previousStep() && m.value && l("step-change", h.value, m.value.id);
580
+ async function C() {
581
+ o && await o.previousStep() && f.value && l("step-change", h.value, f.value.id);
582
582
  }
583
- async function O(r) {
584
- var k;
583
+ async function I(u) {
584
+ var _;
585
585
  if (o) {
586
- if (r > h.value) {
587
- let x = !0;
588
- if ((k = m.value) != null && k.component && p.value ? typeof p.value.validate == "function" && (x = await p.value.validate()) : x = await v(), !x)
586
+ if (u > h.value) {
587
+ let w = !0;
588
+ if ((_ = f.value) != null && _.component && m.value ? typeof m.value.validate == "function" && (w = await m.value.validate()) : w = await d(), !w)
589
589
  return;
590
590
  }
591
- await o.goToStep(r) && m.value && l("step-change", r, m.value.id);
591
+ await o.goToStep(u) && f.value && l("step-change", u, f.value.id);
592
592
  }
593
593
  }
594
- L(
594
+ W(
595
595
  c,
596
596
  async () => {
597
- var r;
598
- for (const [k, b] of Object.entries(u.value))
599
- if (!he(b, c.value, f.value)) {
600
- const x = s.value && m.value && m.value.schema ? m.value.schema[k] : (r = e.schema) == null ? void 0 : r[k];
601
- x && Z(x) && "value" in x ? b.value = x.value : b.value = void 0;
597
+ var u;
598
+ for (const [_, b] of Object.entries(s.value))
599
+ if (!be(b, c.value, p.value)) {
600
+ const w = i.value && f.value && f.value.schema ? f.value.schema[_] : (u = e.schema) == null ? void 0 : u[_];
601
+ w && X(w) && "value" in w ? b.value = w.value : b.value = void 0;
602
602
  }
603
603
  },
604
604
  {
@@ -606,80 +606,80 @@ const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { clas
606
606
  immediate: !0
607
607
  }
608
608
  );
609
- function B(r) {
610
- s.value && o && m.value && o.updateStepData(m.value.id, r);
609
+ function U(u) {
610
+ i.value && o && f.value && o.updateStepData(f.value.id, u);
611
611
  }
612
612
  return n({
613
- isLastStep: w,
614
- canGoNext: C,
615
- canGoPrevious: S,
616
- computedData: f,
613
+ isLastStep: V,
614
+ canGoNext: S,
615
+ canGoPrevious: O,
616
+ computedData: p,
617
617
  formData: c,
618
- resetForm: X,
619
- submitForm: R,
620
- isFormValid: v,
621
- resolveData: () => s.value && o ? o.getMultiStepFormData() : {
618
+ resetForm: D,
619
+ submitForm: A,
620
+ isFormValid: d,
621
+ resolveData: () => i.value && o ? o.getMultiStepFormData() : {
622
622
  formData: c.value,
623
- computedData: f.value
623
+ computedData: p.value
624
624
  },
625
625
  // Multi-step specific methods
626
- nextStep: le,
627
- previousStep: V,
628
- goToStep: O,
629
- getCurrentStep: () => m.value,
626
+ nextStep: Q,
627
+ previousStep: C,
628
+ goToStep: I,
629
+ getCurrentStep: () => f.value,
630
630
  getCurrentStepIndex: () => h.value
631
- }), (r, k) => {
632
- var b, x;
633
- return d(), A("div", xt, [
634
- s.value ? (d(), A("div", Et, [
635
- r.multiStepConfig && r.multiStepConfig.stepPosition === "top" ? (d(), _(pe, {
631
+ }), (u, _) => {
632
+ var b, w;
633
+ return v(), P("div", Et, [
634
+ i.value ? (v(), P("div", xt, [
635
+ u.multiStepConfig && u.multiStepConfig.stepPosition === "top" ? (v(), k(me, {
636
636
  key: 0,
637
- steps: $.value,
637
+ steps: x.value,
638
638
  "active-step-index": h.value,
639
- position: r.multiStepConfig.stepPosition || "top",
640
- "show-progress": r.multiStepConfig.showProgress,
641
- "allow-navigation": r.multiStepConfig.allowStepNavigation,
642
- onStepClick: O
643
- }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : I("", !0),
644
- D("div", {
645
- class: G(["multi-step-content", `multi-step-content--${((b = r.multiStepConfig) == null ? void 0 : b.stepPosition) || "top"}`])
639
+ position: u.multiStepConfig.stepPosition || "top",
640
+ "show-progress": u.multiStepConfig.showProgress,
641
+ "allow-navigation": u.multiStepConfig.allowStepNavigation,
642
+ onStepClick: I
643
+ }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : z("", !0),
644
+ R("div", {
645
+ class: q(["multi-step-content", `multi-step-content--${((b = u.multiStepConfig) == null ? void 0 : b.stepPosition) || "top"}`])
646
646
  }, [
647
- r.multiStepConfig && r.multiStepConfig.stepPosition === "left" ? (d(), _(pe, {
647
+ u.multiStepConfig && u.multiStepConfig.stepPosition === "left" ? (v(), k(me, {
648
648
  key: 0,
649
- steps: $.value,
649
+ steps: x.value,
650
650
  "active-step-index": h.value,
651
- position: r.multiStepConfig.stepPosition ?? "top",
652
- "show-progress": r.multiStepConfig.showProgress,
653
- "allow-navigation": r.multiStepConfig.allowStepNavigation,
654
- onStepClick: O,
651
+ position: u.multiStepConfig.stepPosition ?? "top",
652
+ "show-progress": u.multiStepConfig.showProgress,
653
+ "allow-navigation": u.multiStepConfig.allowStepNavigation,
654
+ onStepClick: I,
655
655
  class: "multi-step-sidebar"
656
- }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : I("", !0),
657
- D("div", Ot, [
658
- (x = m.value) != null && x.component ? (d(), _(me(m.value.component), Te({ key: 0 }, m.value.componentProps || {}, {
659
- "onUpdate:data": B,
656
+ }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : z("", !0),
657
+ R("div", Ot, [
658
+ (w = f.value) != null && w.component ? (v(), k(ye(f.value.component), Le({ key: 0 }, f.value.componentProps || {}, {
659
+ "onUpdate:data": U,
660
660
  ref_key: "customComponentRef",
661
- ref: p
662
- }), null, 16)) : (d(), _(i(Ie), { key: 1 }, {
661
+ ref: m
662
+ }), null, 16)) : (v(), k(r(Fe), { key: 1 }, {
663
663
  default: E(() => [
664
- T(i(ie), null, {
664
+ L(r(ie), null, {
665
665
  default: E(() => [
666
- (d(!0), A(j, null, ee(Object.keys(u.value), (y) => {
667
- var q, N, K, Y, se;
668
- return d(), A(j, { key: y }, [
669
- i(he)(u.value[y], i(c), i(f)) ? (d(), _(i(oe), {
666
+ (v(!0), P(K, null, le(Object.keys(s.value), (y) => {
667
+ var M, j, J, te, re;
668
+ return v(), P(K, { key: y }, [
669
+ r(be)(s.value[y], r(c), r(p)) ? (v(), k(r(se), {
670
670
  key: 0,
671
- size: ((q = u.value[y].grid) == null ? void 0 : q.xs) ?? "12",
672
- "size-sm": (N = u.value[y].grid) == null ? void 0 : N.sm,
673
- "size-md": (K = u.value[y].grid) == null ? void 0 : K.md,
674
- "size-lg": (Y = u.value[y].grid) == null ? void 0 : Y.lg,
675
- "size-xl": (se = u.value[y].grid) == null ? void 0 : se.xl,
671
+ size: ((M = s.value[y].grid) == null ? void 0 : M.xs) ?? "12",
672
+ "size-sm": (j = s.value[y].grid) == null ? void 0 : j.sm,
673
+ "size-md": (J = s.value[y].grid) == null ? void 0 : J.md,
674
+ "size-lg": (te = s.value[y].grid) == null ? void 0 : te.lg,
675
+ "size-xl": (re = s.value[y].grid) == null ? void 0 : re.xl,
676
676
  class: "ion-margin-vertical"
677
677
  }, {
678
678
  default: E(() => [
679
- (d(), _(me(u.value[y].type), {
680
- modelValue: u.value[y],
681
- "onUpdate:modelValue": (_e) => u.value[y] = _e,
682
- schema: u.value,
679
+ (v(), k(ye(s.value[y].type), {
680
+ modelValue: s.value[y],
681
+ "onUpdate:modelValue": (Se) => s.value[y] = Se,
682
+ schema: s.value,
683
683
  "form-id": y,
684
684
  ref_for: !0,
685
685
  ref_key: "dynamicRefs",
@@ -688,7 +688,7 @@ const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { clas
688
688
  }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "form-id", "ref-key"]))
689
689
  ]),
690
690
  _: 2
691
- }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : I("", !0)
691
+ }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : z("", !0)
692
692
  ], 64);
693
693
  }), 128))
694
694
  ]),
@@ -697,104 +697,104 @@ const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { clas
697
697
  ]),
698
698
  _: 1
699
699
  })),
700
- r.hideButtons ? I("", !0) : (d(), _(i(ie), { key: 2 }, {
700
+ u.hideButtons ? z("", !0) : (v(), k(r(ie), { key: 2 }, {
701
701
  default: E(() => [
702
- T(i(oe), {
702
+ L(r(se), {
703
703
  size: "12",
704
- style: fe([{ display: "flex" }, { justifyContent: r.buttonPlacement }])
704
+ style: he([{ display: "flex" }, { justifyContent: u.buttonPlacement }])
705
705
  }, {
706
706
  default: E(() => [
707
- S.value ? (d(), _(ne, {
707
+ O.value ? (v(), k(oe, {
708
708
  key: 0,
709
709
  type: "previous",
710
- label: r.previousButtonText,
711
- onClick: V
712
- }, null, 8, ["label"])) : I("", !0),
713
- r.showCancelButton ? (d(), _(ne, {
710
+ label: u.previousButtonText,
711
+ onClick: C
712
+ }, null, 8, ["label"])) : z("", !0),
713
+ u.showCancelButton ? (v(), k(oe, {
714
714
  key: 1,
715
715
  type: "cancel",
716
- label: r.cancelButtonText,
717
- onClick: te
718
- }, null, 8, ["label"])) : I("", !0),
719
- r.showClearButton ? (d(), _(ne, {
716
+ label: u.cancelButtonText,
717
+ onClick: Z
718
+ }, null, 8, ["label"])) : z("", !0),
719
+ u.showClearButton ? (v(), k(oe, {
720
720
  key: 2,
721
721
  type: "clear",
722
- label: r.clearButtonText,
723
- onClick: X
724
- }, null, 8, ["label"])) : I("", !0),
725
- (d(!0), A(j, null, ee(r.customButtons, (y) => (d(), _(ze, {
722
+ label: u.clearButtonText,
723
+ onClick: D
724
+ }, null, 8, ["label"])) : z("", !0),
725
+ (v(!0), P(K, null, le(u.customButtons, (y) => (v(), k($e, {
726
726
  button: y,
727
727
  key: y.label
728
728
  }, null, 8, ["button"]))), 128)),
729
- C.value ? (d(), _(ne, {
729
+ S.value ? (v(), k(oe, {
730
730
  key: 3,
731
731
  type: "next",
732
- label: r.nextButtonText,
733
- onClick: le
734
- }, null, 8, ["label"])) : I("", !0),
735
- w.value ? (d(), _(ne, {
732
+ label: u.nextButtonText,
733
+ onClick: Q
734
+ }, null, 8, ["label"])) : z("", !0),
735
+ V.value ? (v(), k(oe, {
736
736
  key: 4,
737
737
  type: "submit",
738
- label: r.submitButtonText,
739
- onClick: R
740
- }, null, 8, ["label"])) : I("", !0)
738
+ label: u.submitButtonText,
739
+ onClick: A
740
+ }, null, 8, ["label"])) : z("", !0)
741
741
  ]),
742
742
  _: 1
743
743
  }, 8, ["style"])
744
744
  ]),
745
745
  _: 1
746
746
  })),
747
- r.multiStepConfig && (r.multiStepConfig.stepPosition === "left" || r.multiStepConfig.stepPosition === "right") && r.multiStepConfig.showProgress ? (d(), A("div", It, [
748
- D("div", zt, [
749
- D("div", {
747
+ u.multiStepConfig && (u.multiStepConfig.stepPosition === "left" || u.multiStepConfig.stepPosition === "right") && u.multiStepConfig.showProgress ? (v(), P("div", It, [
748
+ R("div", zt, [
749
+ R("div", {
750
750
  class: "step-progress-fill",
751
- style: fe({ width: `${M.value}%` })
751
+ style: he({ width: `${H.value}%` })
752
752
  }, null, 4)
753
753
  ]),
754
- D("div", Ft, " Step " + P(h.value + 1) + " of " + P($.value.length), 1)
755
- ])) : I("", !0)
754
+ R("div", Ft, " Step " + T(h.value + 1) + " of " + T(x.value.length), 1)
755
+ ])) : z("", !0)
756
756
  ]),
757
- r.multiStepConfig && r.multiStepConfig.stepPosition === "right" ? (d(), _(pe, {
757
+ u.multiStepConfig && u.multiStepConfig.stepPosition === "right" ? (v(), k(me, {
758
758
  key: 1,
759
- steps: $.value,
759
+ steps: x.value,
760
760
  "active-step-index": h.value,
761
- position: r.multiStepConfig.stepPosition,
762
- "show-progress": r.multiStepConfig.showProgress,
763
- "allow-navigation": r.multiStepConfig.allowStepNavigation,
764
- onStepClick: O,
761
+ position: u.multiStepConfig.stepPosition,
762
+ "show-progress": u.multiStepConfig.showProgress,
763
+ "allow-navigation": u.multiStepConfig.allowStepNavigation,
764
+ onStepClick: I,
765
765
  class: "multi-step-sidebar"
766
- }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : I("", !0)
766
+ }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : z("", !0)
767
767
  ], 2),
768
- r.multiStepConfig && r.multiStepConfig.stepPosition === "bottom" ? (d(), _(pe, {
768
+ u.multiStepConfig && u.multiStepConfig.stepPosition === "bottom" ? (v(), k(me, {
769
769
  key: 1,
770
- steps: $.value,
770
+ steps: x.value,
771
771
  "active-step-index": h.value,
772
- position: r.multiStepConfig.stepPosition,
773
- "show-progress": r.multiStepConfig.showProgress,
774
- "allow-navigation": r.multiStepConfig.allowStepNavigation,
775
- onStepClick: O
776
- }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : I("", !0)
777
- ])) : (d(), _(i(Ie), { key: 1 }, {
772
+ position: u.multiStepConfig.stepPosition,
773
+ "show-progress": u.multiStepConfig.showProgress,
774
+ "allow-navigation": u.multiStepConfig.allowStepNavigation,
775
+ onStepClick: I
776
+ }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : z("", !0)
777
+ ])) : (v(), k(r(Fe), { key: 1 }, {
778
778
  default: E(() => [
779
- T(i(ie), null, {
779
+ L(r(ie), null, {
780
780
  default: E(() => [
781
- (d(!0), A(j, null, ee(Object.keys(u.value), (y) => {
782
- var q, N, K, Y, se;
783
- return d(), A(j, { key: y }, [
784
- i(he)(u.value[y], i(c), i(f)) ? (d(), _(i(oe), {
781
+ (v(!0), P(K, null, le(Object.keys(s.value), (y) => {
782
+ var M, j, J, te, re;
783
+ return v(), P(K, { key: y }, [
784
+ r(be)(s.value[y], r(c), r(p)) ? (v(), k(r(se), {
785
785
  key: 0,
786
- size: ((q = u.value[y].grid) == null ? void 0 : q.xs) ?? "12",
787
- "size-sm": (N = u.value[y].grid) == null ? void 0 : N.sm,
788
- "size-md": (K = u.value[y].grid) == null ? void 0 : K.md,
789
- "size-lg": (Y = u.value[y].grid) == null ? void 0 : Y.lg,
790
- "size-xl": (se = u.value[y].grid) == null ? void 0 : se.xl,
786
+ size: ((M = s.value[y].grid) == null ? void 0 : M.xs) ?? "12",
787
+ "size-sm": (j = s.value[y].grid) == null ? void 0 : j.sm,
788
+ "size-md": (J = s.value[y].grid) == null ? void 0 : J.md,
789
+ "size-lg": (te = s.value[y].grid) == null ? void 0 : te.lg,
790
+ "size-xl": (re = s.value[y].grid) == null ? void 0 : re.xl,
791
791
  class: "ion-margin-vertical"
792
792
  }, {
793
793
  default: E(() => [
794
- (d(), _(me(u.value[y].type), {
795
- modelValue: u.value[y],
796
- "onUpdate:modelValue": (_e) => u.value[y] = _e,
797
- schema: u.value,
794
+ (v(), k(ye(s.value[y].type), {
795
+ modelValue: s.value[y],
796
+ "onUpdate:modelValue": (Se) => s.value[y] = Se,
797
+ schema: s.value,
798
798
  "form-id": y,
799
799
  ref_for: !0,
800
800
  ref_key: "dynamicRefs",
@@ -804,39 +804,39 @@ const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { clas
804
804
  }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "form-id", "ref-key"]))
805
805
  ]),
806
806
  _: 2
807
- }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : I("", !0)
807
+ }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : z("", !0)
808
808
  ], 64);
809
809
  }), 128))
810
810
  ]),
811
811
  _: 1
812
812
  }),
813
- r.hideButtons ? I("", !0) : (d(), _(i(ie), { key: 0 }, {
813
+ u.hideButtons ? z("", !0) : (v(), k(r(ie), { key: 0 }, {
814
814
  default: E(() => [
815
- T(i(oe), {
815
+ L(r(se), {
816
816
  size: "12",
817
- style: fe([{ display: "flex" }, { justifyContent: r.buttonPlacement }])
817
+ style: he([{ display: "flex" }, { justifyContent: u.buttonPlacement }])
818
818
  }, {
819
819
  default: E(() => [
820
- r.showCancelButton ? (d(), _(ne, {
820
+ u.showCancelButton ? (v(), k(oe, {
821
821
  key: 0,
822
822
  type: "cancel",
823
- label: r.cancelButtonText,
824
- onClick: te
825
- }, null, 8, ["label"])) : I("", !0),
826
- r.showClearButton ? (d(), _(ne, {
823
+ label: u.cancelButtonText,
824
+ onClick: Z
825
+ }, null, 8, ["label"])) : z("", !0),
826
+ u.showClearButton ? (v(), k(oe, {
827
827
  key: 1,
828
828
  type: "clear",
829
- label: r.clearButtonText,
830
- onClick: X
831
- }, null, 8, ["label"])) : I("", !0),
832
- (d(!0), A(j, null, ee(r.customButtons, (y) => (d(), _(ze, {
829
+ label: u.clearButtonText,
830
+ onClick: D
831
+ }, null, 8, ["label"])) : z("", !0),
832
+ (v(!0), P(K, null, le(u.customButtons, (y) => (v(), k($e, {
833
833
  button: y,
834
834
  key: y.label
835
835
  }, null, 8, ["button"]))), 128)),
836
- T(ne, {
836
+ L(oe, {
837
837
  type: "submit",
838
- label: r.submitButtonText,
839
- onClick: R
838
+ label: u.submitButtonText,
839
+ onClick: A
840
840
  }, null, 8, ["label"])
841
841
  ]),
842
842
  _: 1
@@ -850,12 +850,12 @@ const mt = { class: "step-indicator__container" }, ht = ["onClick"], yt = { clas
850
850
  ]);
851
851
  };
852
852
  }
853
- }), At = /* @__PURE__ */ re($t, [["__scopeId", "data-v-400c942b"]]);
853
+ }), At = /* @__PURE__ */ ae($t, [["__scopeId", "data-v-400c942b"]]);
854
854
  function Pt(t) {
855
855
  return {
856
856
  applyValidationState: async (e) => {
857
- var l, s, u, o, g;
858
- (l = t.value) == null || l.$el.classList.remove("ion-invalid"), (s = t.value) == null || s.$el.classList.remove("ion-valid"), e ? (u = t.value) == null || u.$el.classList.add("ion-valid") : (o = t.value) == null || o.$el.classList.add("ion-invalid"), (g = t.value) == null || g.$el.classList.add("ion-touched");
857
+ var l, i, s, o, g;
858
+ (l = t.value) == null || l.$el.classList.remove("ion-invalid"), (i = t.value) == null || i.$el.classList.remove("ion-valid"), e ? (s = t.value) == null || s.$el.classList.add("ion-valid") : (o = t.value) == null || o.$el.classList.add("ion-invalid"), (g = t.value) == null || g.$el.classList.add("ion-touched");
859
859
  },
860
860
  resetValidationState: () => {
861
861
  var e, l;
@@ -863,51 +863,51 @@ function Pt(t) {
863
863
  }
864
864
  };
865
865
  }
866
- function de(t, n, a, e, l) {
867
- const { applyValidationState: s, resetValidationState: u } = Pt(t), o = Se("globalConfig");
866
+ function ve(t, n, a, e, l) {
867
+ const { applyValidationState: i, resetValidationState: s } = Pt(t), o = xe("globalConfig");
868
868
  async function g() {
869
869
  var h;
870
870
  if (n.value.required && !a.value)
871
871
  return n.value.error = ((h = o == null ? void 0 : o.errorMessages) == null ? void 0 : h.required) ?? "This field is required", !1;
872
872
  if (l) {
873
- const m = await l(a.value);
874
- if (typeof m == "string")
875
- return n.value.error = m, !1;
876
- if (m === !1)
873
+ const f = await l(a.value);
874
+ if (typeof f == "string")
875
+ return n.value.error = f, !1;
876
+ if (f === !1)
877
877
  return !1;
878
878
  }
879
879
  if (n.value.validation) {
880
- const m = await n.value.validation(a.value, e == null ? void 0 : e.value);
881
- if (m != null && m.length)
882
- return n.value.error = m.join(), !1;
880
+ const f = await n.value.validation(a.value, e == null ? void 0 : e.value);
881
+ if (f != null && f.length)
882
+ return n.value.error = f.join(), !1;
883
883
  }
884
884
  return !0;
885
885
  }
886
- async function v() {
886
+ async function d() {
887
887
  const h = await g();
888
- h && (n.value.error = "", n.value.value = a.value), await s(h);
888
+ h && (n.value.error = "", n.value.value = a.value), await i(h);
889
889
  }
890
890
  function c() {
891
- u(), n.value.error = "";
891
+ s(), n.value.error = "";
892
892
  }
893
- function f(h = "") {
893
+ function p(h = "") {
894
894
  a.value = h, n.value.error = "", n.value.value = h;
895
895
  }
896
- function p() {
896
+ function m() {
897
897
  return n.value.error ? [n.value.error] : [];
898
898
  }
899
899
  return {
900
900
  isValid: g,
901
- onValueUpdate: v,
901
+ onValueUpdate: d,
902
902
  onFocus: c,
903
- onReset: f,
904
- getErrors: p,
905
- applyValidationState: s,
906
- resetValidationState: u
903
+ onReset: p,
904
+ getErrors: m,
905
+ applyValidationState: i,
906
+ resetValidationState: s
907
907
  };
908
908
  }
909
- function De(t) {
910
- const n = F(void 0), a = F(!1), e = F(null);
909
+ function pe(t) {
910
+ const n = $(void 0), a = $(!1), e = $(null);
911
911
  async function l() {
912
912
  if (!t.value.value) {
913
913
  n.value = void 0;
@@ -915,73 +915,73 @@ function De(t) {
915
915
  }
916
916
  a.value = !0, e.value = null;
917
917
  try {
918
- const u = await st(t.value.value);
919
- n.value = u, t.value.value = u;
920
- } catch (u) {
921
- e.value = u instanceof Error ? u.message : "Failed to resolve field value", console.error("Error resolving field value:", u);
918
+ const s = await st(t.value.value);
919
+ n.value = s, t.value.value = s;
920
+ } catch (s) {
921
+ e.value = s instanceof Error ? s.message : "Failed to resolve field value", console.error("Error resolving field value:", s);
922
922
  } finally {
923
923
  a.value = !1;
924
924
  }
925
925
  }
926
- async function s(u) {
927
- t.value.value = u, await l();
926
+ async function i(s) {
927
+ t.value.value = s, await l();
928
928
  }
929
- return L(
929
+ return W(
930
930
  () => t.value.value,
931
931
  async () => {
932
932
  await l();
933
933
  },
934
934
  { immediate: !1 }
935
- ), be(async () => {
935
+ ), Ve(async () => {
936
936
  await l();
937
937
  }), {
938
938
  resolvedValue: n,
939
939
  isLoading: a,
940
940
  error: e,
941
941
  resolveValue: l,
942
- updateValue: s
942
+ updateValue: i
943
943
  };
944
944
  }
945
945
  function Bt(t) {
946
- const n = z(() => !!t.value.label), a = z(() => !!t.value.required), e = z(() => t.value.label || "");
946
+ const n = F(() => !!t.value.label), a = F(() => !!t.value.required), e = F(() => t.value.label || "");
947
947
  return {
948
948
  showLabel: n,
949
949
  showRequired: a,
950
950
  labelText: e
951
951
  };
952
952
  }
953
- const ke = /* @__PURE__ */ U({
953
+ const Ce = /* @__PURE__ */ N({
954
954
  __name: "InputLabel",
955
955
  props: {
956
956
  model: {},
957
957
  slotName: {}
958
958
  },
959
959
  setup(t) {
960
- const n = t, { showLabel: a, showRequired: e, labelText: l } = Bt(Ue(n, "model"));
961
- return (s, u) => i(a) ? (d(), _(i(ue), {
960
+ const n = t, { showLabel: a, showRequired: e, labelText: l } = Bt(Te(n, "model"));
961
+ return (i, s) => r(a) ? (v(), k(r(ue), {
962
962
  key: 0,
963
- slot: s.slotName,
963
+ slot: i.slotName,
964
964
  class: "input-label"
965
965
  }, {
966
966
  default: E(() => [
967
- H(P(i(l)) + " ", 1),
968
- i(e) ? (d(), _(i(xe), {
967
+ G(T(r(l)) + " ", 1),
968
+ r(e) ? (v(), k(r(Oe), {
969
969
  key: 0,
970
970
  color: "danger"
971
971
  }, {
972
- default: E(() => u[0] || (u[0] = [
973
- H("*")
972
+ default: E(() => s[0] || (s[0] = [
973
+ G("*")
974
974
  ])),
975
975
  _: 1,
976
976
  __: [0]
977
- })) : I("", !0)
977
+ })) : z("", !0)
978
978
  ]),
979
979
  _: 1
980
- }, 8, ["slot"])) : I("", !0);
980
+ }, 8, ["slot"])) : z("", !0);
981
981
  }
982
- }), Dt = /* @__PURE__ */ U({
982
+ }), Dt = /* @__PURE__ */ N({
983
983
  __name: "BaseInput",
984
- props: /* @__PURE__ */ J({
984
+ props: /* @__PURE__ */ Y({
985
985
  schema: {},
986
986
  type: {}
987
987
  }, {
@@ -990,53 +990,53 @@ const ke = /* @__PURE__ */ U({
990
990
  }),
991
991
  emits: ["update:modelValue"],
992
992
  setup(t, { expose: n }) {
993
- const a = t, e = Q(t, "modelValue"), l = F(null), s = z(() => a.schema), { resolvedValue: u, isLoading: o, error: g } = De(e), v = F("");
994
- L(
995
- u,
996
- (C) => {
997
- C != null ? v.value = String(C) : v.value = "";
993
+ const a = t, e = ee(t, "modelValue"), l = $(null), i = F(() => a.schema), { resolvedValue: s, isLoading: o, error: g } = pe(e), d = $("");
994
+ W(
995
+ s,
996
+ (S) => {
997
+ S != null ? d.value = String(S) : d.value = "";
998
998
  },
999
999
  { immediate: !0 }
1000
1000
  );
1001
- const { isValid: c, onValueUpdate: f, onFocus: p, onReset: h, getErrors: m } = de(
1001
+ const { isValid: c, onValueUpdate: p, onFocus: m, onReset: h, getErrors: f } = ve(
1002
1002
  l,
1003
1003
  e,
1004
- v,
1005
- s
1006
- ), $ = z(() => {
1004
+ d,
1005
+ i
1006
+ ), x = F(() => {
1007
1007
  if (e.value.pattern) return ot(e.value.pattern);
1008
1008
  });
1009
1009
  return n({
1010
- onValueUpdate: f,
1010
+ onValueUpdate: p,
1011
1011
  onReset: h,
1012
1012
  getErrors: () => {
1013
- const C = m();
1014
- return g.value ? [...C, g.value] : C;
1013
+ const S = f();
1014
+ return g.value ? [...S, g.value] : S;
1015
1015
  },
1016
1016
  isValid: c,
1017
1017
  isLoading: o,
1018
1018
  valueError: g
1019
- }), (C, S) => {
1020
- var R;
1021
- const M = Re("maskito");
1022
- return d(), A("div", {
1023
- class: G(["input-container", { loading: i(o) }])
1019
+ }), (S, O) => {
1020
+ var A;
1021
+ const H = Ue("maskito");
1022
+ return v(), P("div", {
1023
+ class: q(["input-container", { loading: r(o) }])
1024
1024
  }, [
1025
- qe((d(), _(i(Fe), {
1025
+ Re((v(), k(r(Ae), {
1026
1026
  ref_key: "inputRef",
1027
1027
  ref: l,
1028
- modelValue: v.value,
1029
- "onUpdate:modelValue": S[0] || (S[0] = (W) => v.value = W),
1030
- class: G(e.value.className),
1028
+ modelValue: d.value,
1029
+ "onUpdate:modelValue": O[0] || (O[0] = (B) => d.value = B),
1030
+ class: q(e.value.className),
1031
1031
  "clear-input": !0,
1032
1032
  fill: e.value.fill ?? "solid",
1033
1033
  "label-placement": e.value.labelPlacement ?? "stacked",
1034
- type: C.type ?? "text",
1034
+ type: S.type ?? "text",
1035
1035
  required: e.value.required,
1036
1036
  "error-text": e.value.error,
1037
1037
  autofocus: e.value.autoFocus,
1038
- placeholder: i(o) ? "Loading..." : ((R = $.value) == null ? void 0 : R.placeholder) ?? e.value.placeholder,
1039
- disabled: e.value.disabled || i(o),
1038
+ placeholder: r(o) ? "Loading..." : ((A = x.value) == null ? void 0 : A.placeholder) ?? e.value.placeholder,
1039
+ disabled: e.value.disabled || r(o),
1040
1040
  counter: e.value.counter,
1041
1041
  min: e.value.min,
1042
1042
  max: e.value.max,
@@ -1044,54 +1044,54 @@ const ke = /* @__PURE__ */ U({
1044
1044
  "min-length": e.value.minLength,
1045
1045
  pattern: e.value.pattern,
1046
1046
  style: { width: "100%" },
1047
- onIonFocus: i(p),
1048
- onIonChange: i(f),
1049
- onIonBlur: i(f)
1047
+ onIonFocus: r(m),
1048
+ onIonChange: r(p),
1049
+ onIonBlur: r(p)
1050
1050
  }, {
1051
1051
  default: E(() => [
1052
- T(ke, {
1052
+ L(Ce, {
1053
1053
  model: e.value,
1054
1054
  "slot-name": "label"
1055
1055
  }, null, 8, ["model"]),
1056
- e.value.prefix ? (d(), _(i(ue), {
1056
+ e.value.prefix ? (v(), k(r(ue), {
1057
1057
  key: 0,
1058
1058
  slot: "start"
1059
1059
  }, {
1060
1060
  default: E(() => [
1061
- H(P(e.value.prefix), 1)
1061
+ G(T(e.value.prefix), 1)
1062
1062
  ]),
1063
1063
  _: 1
1064
- })) : I("", !0),
1065
- e.value.suffix ? (d(), _(i(ue), {
1064
+ })) : z("", !0),
1065
+ e.value.suffix ? (v(), k(r(ue), {
1066
1066
  key: 1,
1067
1067
  slot: "end"
1068
1068
  }, {
1069
1069
  default: E(() => [
1070
- H(P(e.value.suffix), 1)
1070
+ G(T(e.value.suffix), 1)
1071
1071
  ]),
1072
1072
  _: 1
1073
- })) : I("", !0),
1074
- C.type === "password" ? (d(), _(i(Ne), {
1073
+ })) : z("", !0),
1074
+ S.type === "password" ? (v(), k(r(qe), {
1075
1075
  key: 2,
1076
1076
  slot: "end"
1077
- })) : I("", !0),
1078
- i(o) ? (d(), _(i($e), {
1077
+ })) : z("", !0),
1078
+ r(o) ? (v(), k(r(de), {
1079
1079
  key: 3,
1080
1080
  slot: "end",
1081
1081
  name: "crescent",
1082
1082
  class: "loading-spinner"
1083
- })) : I("", !0)
1083
+ })) : z("", !0)
1084
1084
  ]),
1085
1085
  _: 1
1086
1086
  }, 8, ["modelValue", "class", "fill", "label-placement", "type", "required", "error-text", "autofocus", "placeholder", "disabled", "counter", "min", "max", "max-length", "min-length", "pattern", "onIonFocus", "onIonChange", "onIonBlur"])), [
1087
- [M, $.value]
1087
+ [H, x.value]
1088
1088
  ])
1089
1089
  ], 2);
1090
1090
  };
1091
1091
  }
1092
- }), ve = /* @__PURE__ */ re(Dt, [["__scopeId", "data-v-9a88e1aa"]]), Tt = /* @__PURE__ */ U({
1092
+ }), fe = /* @__PURE__ */ ae(Dt, [["__scopeId", "data-v-9a88e1aa"]]), Lt = /* @__PURE__ */ N({
1093
1093
  __name: "TextInput",
1094
- props: /* @__PURE__ */ J({
1094
+ props: /* @__PURE__ */ Y({
1095
1095
  schema: {}
1096
1096
  }, {
1097
1097
  modelValue: { type: Object, default: {} },
@@ -1099,7 +1099,7 @@ const ke = /* @__PURE__ */ U({
1099
1099
  }),
1100
1100
  emits: ["update:modelValue"],
1101
1101
  setup(t, { expose: n }) {
1102
- const a = Q(t, "modelValue"), e = F(null);
1102
+ const a = ee(t, "modelValue"), e = $(null);
1103
1103
  return n({
1104
1104
  onReset: () => {
1105
1105
  var l;
@@ -1110,21 +1110,21 @@ const ke = /* @__PURE__ */ U({
1110
1110
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
1111
1111
  },
1112
1112
  getErrors: () => {
1113
- var l, s;
1114
- return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1113
+ var l, i;
1114
+ return ((i = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : i.call(l)) ?? [];
1115
1115
  }
1116
- }), (l, s) => (d(), _(ve, {
1116
+ }), (l, i) => (v(), k(fe, {
1117
1117
  modelValue: a.value,
1118
- "onUpdate:modelValue": s[0] || (s[0] = (u) => a.value = u),
1118
+ "onUpdate:modelValue": i[0] || (i[0] = (s) => a.value = s),
1119
1119
  type: "text",
1120
1120
  schema: l.schema,
1121
1121
  ref_key: "inputRef",
1122
1122
  ref: e
1123
1123
  }, null, 8, ["modelValue", "schema"]));
1124
1124
  }
1125
- }), Ut = /* @__PURE__ */ U({
1125
+ }), Tt = /* @__PURE__ */ N({
1126
1126
  __name: "DateInput",
1127
- props: /* @__PURE__ */ J({
1127
+ props: /* @__PURE__ */ Y({
1128
1128
  schema: {}
1129
1129
  }, {
1130
1130
  modelValue: { type: Object, default: {} },
@@ -1132,7 +1132,7 @@ const ke = /* @__PURE__ */ U({
1132
1132
  }),
1133
1133
  emits: ["update:modelValue"],
1134
1134
  setup(t, { expose: n }) {
1135
- const a = Q(t, "modelValue"), e = F(null);
1135
+ const a = ee(t, "modelValue"), e = $(null);
1136
1136
  return n({
1137
1137
  onValueUpdate: () => {
1138
1138
  var l;
@@ -1143,21 +1143,21 @@ const ke = /* @__PURE__ */ U({
1143
1143
  return (l = e.value) == null ? void 0 : l.onReset();
1144
1144
  },
1145
1145
  getErrors: () => {
1146
- var l, s;
1147
- return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1146
+ var l, i;
1147
+ return ((i = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : i.call(l)) ?? [];
1148
1148
  }
1149
- }), (l, s) => (d(), _(ve, {
1149
+ }), (l, i) => (v(), k(fe, {
1150
1150
  modelValue: a.value,
1151
- "onUpdate:modelValue": s[0] || (s[0] = (u) => a.value = u),
1151
+ "onUpdate:modelValue": i[0] || (i[0] = (s) => a.value = s),
1152
1152
  type: a.value.enableTime ? "datetime-local" : "date",
1153
1153
  schema: l.schema,
1154
1154
  ref_key: "inputRef",
1155
1155
  ref: e
1156
1156
  }, null, 8, ["modelValue", "type", "schema"]));
1157
1157
  }
1158
- }), Rt = /* @__PURE__ */ U({
1158
+ }), Ut = /* @__PURE__ */ N({
1159
1159
  __name: "NumberInput",
1160
- props: /* @__PURE__ */ J({
1160
+ props: /* @__PURE__ */ Y({
1161
1161
  schema: {}
1162
1162
  }, {
1163
1163
  modelValue: { type: Object, default: {} },
@@ -1165,7 +1165,7 @@ const ke = /* @__PURE__ */ U({
1165
1165
  }),
1166
1166
  emits: ["update:modelValue"],
1167
1167
  setup(t, { expose: n }) {
1168
- const a = Q(t, "modelValue"), e = F(null);
1168
+ const a = ee(t, "modelValue"), e = $(null);
1169
1169
  return n({
1170
1170
  onReset: () => {
1171
1171
  var l;
@@ -1176,21 +1176,21 @@ const ke = /* @__PURE__ */ U({
1176
1176
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
1177
1177
  },
1178
1178
  getErrors: () => {
1179
- var l, s;
1180
- return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1179
+ var l, i;
1180
+ return ((i = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : i.call(l)) ?? [];
1181
1181
  }
1182
- }), (l, s) => (d(), _(ve, {
1182
+ }), (l, i) => (v(), k(fe, {
1183
1183
  modelValue: a.value,
1184
- "onUpdate:modelValue": s[0] || (s[0] = (u) => a.value = u),
1184
+ "onUpdate:modelValue": i[0] || (i[0] = (s) => a.value = s),
1185
1185
  type: "number",
1186
1186
  schema: l.schema,
1187
1187
  ref_key: "inputRef",
1188
1188
  ref: e
1189
1189
  }, null, 8, ["modelValue", "schema"]));
1190
1190
  }
1191
- }), qt = /* @__PURE__ */ U({
1191
+ }), Rt = /* @__PURE__ */ N({
1192
1192
  __name: "EmailInput",
1193
- props: /* @__PURE__ */ J({
1193
+ props: /* @__PURE__ */ Y({
1194
1194
  schema: {}
1195
1195
  }, {
1196
1196
  modelValue: { type: Object, default: {} },
@@ -1198,7 +1198,7 @@ const ke = /* @__PURE__ */ U({
1198
1198
  }),
1199
1199
  emits: ["update:modelValue"],
1200
1200
  setup(t, { expose: n }) {
1201
- const a = Q(t, "modelValue"), e = F(null);
1201
+ const a = ee(t, "modelValue"), e = $(null);
1202
1202
  return n({
1203
1203
  onReset: () => {
1204
1204
  var l;
@@ -1209,21 +1209,21 @@ const ke = /* @__PURE__ */ U({
1209
1209
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
1210
1210
  },
1211
1211
  getErrors: () => {
1212
- var l, s;
1213
- return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1212
+ var l, i;
1213
+ return ((i = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : i.call(l)) ?? [];
1214
1214
  }
1215
- }), (l, s) => (d(), _(ve, {
1215
+ }), (l, i) => (v(), k(fe, {
1216
1216
  modelValue: a.value,
1217
- "onUpdate:modelValue": s[0] || (s[0] = (u) => a.value = u),
1217
+ "onUpdate:modelValue": i[0] || (i[0] = (s) => a.value = s),
1218
1218
  type: "email",
1219
1219
  schema: l.schema,
1220
1220
  ref_key: "inputRef",
1221
1221
  ref: e
1222
1222
  }, null, 8, ["modelValue", "schema"]));
1223
1223
  }
1224
- }), Nt = /* @__PURE__ */ U({
1224
+ }), qt = /* @__PURE__ */ N({
1225
1225
  __name: "PasswordInput",
1226
- props: /* @__PURE__ */ J({
1226
+ props: /* @__PURE__ */ Y({
1227
1227
  schema: {}
1228
1228
  }, {
1229
1229
  modelValue: { type: Object, default: {} },
@@ -1231,7 +1231,7 @@ const ke = /* @__PURE__ */ U({
1231
1231
  }),
1232
1232
  emits: ["update:modelValue"],
1233
1233
  setup(t, { expose: n }) {
1234
- const a = Q(t, "modelValue"), e = F(null);
1234
+ const a = ee(t, "modelValue"), e = $(null);
1235
1235
  return n({
1236
1236
  onReset: () => {
1237
1237
  var l;
@@ -1242,21 +1242,21 @@ const ke = /* @__PURE__ */ U({
1242
1242
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
1243
1243
  },
1244
1244
  getErrors: () => {
1245
- var l, s;
1246
- return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1245
+ var l, i;
1246
+ return ((i = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : i.call(l)) ?? [];
1247
1247
  }
1248
- }), (l, s) => (d(), _(ve, {
1248
+ }), (l, i) => (v(), k(fe, {
1249
1249
  modelValue: a.value,
1250
- "onUpdate:modelValue": s[0] || (s[0] = (u) => a.value = u),
1250
+ "onUpdate:modelValue": i[0] || (i[0] = (s) => a.value = s),
1251
1251
  type: "password",
1252
1252
  schema: l.schema,
1253
1253
  ref_key: "inputRef",
1254
1254
  ref: e
1255
1255
  }, null, 8, ["modelValue", "schema"]));
1256
1256
  }
1257
- }), Lt = { class: "option-content" }, Mt = /* @__PURE__ */ U({
1257
+ }), Nt = { class: "option-content" }, Mt = /* @__PURE__ */ N({
1258
1258
  __name: "SelectInput",
1259
- props: /* @__PURE__ */ J({
1259
+ props: /* @__PURE__ */ Y({
1260
1260
  schema: Object,
1261
1261
  type: String,
1262
1262
  formId: String
@@ -1266,233 +1266,233 @@ const ke = /* @__PURE__ */ U({
1266
1266
  }),
1267
1267
  emits: ["update:modelValue"],
1268
1268
  setup(t, { expose: n }) {
1269
- const a = t, e = Q(t, "modelValue"), l = F(null), s = F(null), u = F(!1), o = F([]), g = F(""), v = F(1), c = Se("globalConfig"), { isLoading: f } = De(e), p = z(() => e.value.interface ?? "popover"), h = z(() => e.value.optionsPlacement === "top" ? "top" : "bottom"), m = z(() => o.value.filter((r) => !!r.isChecked)), $ = z(() => !g.value && Ce(m.value) && !u.value ? e.value.placeholder ?? "Select an option" : "");
1270
- L([g, () => e.value.options], O, {
1269
+ const a = t, e = ee(t, "modelValue"), l = $(null), i = $(null), s = $(!1), o = $([]), g = $(""), d = $(1), c = xe("globalConfig"), { isLoading: p } = pe(e), m = F(() => e.value.interface ?? "popover"), h = F(() => e.value.optionsPlacement === "top" ? "top" : "bottom"), f = F(() => o.value.filter((u) => !!u.isChecked)), x = F(() => !g.value && we(f.value) && !s.value ? e.value.placeholder ?? "Select an option" : "");
1270
+ W([g, () => e.value.options], I, {
1271
1271
  immediate: !0,
1272
1272
  deep: !0
1273
- }), L(() => e.value.value, B, { immediate: !0, deep: !0 }), L(
1274
- () => !e.value.dependsOn || !a.schema ? null : (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).map((k) => {
1275
- const b = a.schema[k];
1276
- return Z(b) ? b.value : void 0;
1273
+ }), W(() => e.value.value, U, { immediate: !0, deep: !0 }), W(
1274
+ () => !e.value.dependsOn || !a.schema ? null : (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).map((_) => {
1275
+ const b = a.schema[_];
1276
+ return X(b) ? b.value : void 0;
1277
1277
  }),
1278
- async (r, k) => {
1279
- r && k && !ce(r, k) && (w(), o.value = [], await O());
1278
+ async (u, _) => {
1279
+ u && _ && !ce(u, _) && (V(), o.value = [], await I());
1280
1280
  },
1281
1281
  { deep: !0 }
1282
1282
  );
1283
- function w() {
1284
- e.value.error = "", g.value = "", v.value = 1, e.value.value = e.value.multiple ? [] : "", ct(o.value);
1283
+ function V() {
1284
+ e.value.error = "", g.value = "", d.value = 1, e.value.value = e.value.multiple ? [] : "", ct(o.value);
1285
1285
  }
1286
- function C(r) {
1287
- if (r.disabled) return;
1288
- const k = o.value.findIndex((b) => b.value === r.value && b.isChecked);
1289
- if (k >= 0) {
1286
+ function S(u) {
1287
+ if (u.disabled) return;
1288
+ const _ = o.value.findIndex((b) => b.value === u.value && b.isChecked);
1289
+ if (_ >= 0) {
1290
1290
  if (Array.isArray(e.value.value)) {
1291
- const b = Oe(r, e.value.value);
1291
+ const b = ze(u, e.value.value);
1292
1292
  b >= 0 && e.value.value.splice(b, 1);
1293
1293
  }
1294
- o.value[k].isChecked = !1;
1294
+ o.value[_].isChecked = !1;
1295
1295
  } else
1296
- e.value.multiple || w(), ae(r, o.value);
1297
- V(), g.value = "";
1296
+ e.value.multiple || V(), ne(u, o.value);
1297
+ C(), g.value = "";
1298
1298
  }
1299
- function S() {
1300
- switch (p.value) {
1299
+ function O() {
1300
+ switch (m.value) {
1301
1301
  case "action-sheet":
1302
- M();
1302
+ H();
1303
1303
  break;
1304
1304
  case "alert":
1305
- R();
1305
+ A();
1306
1306
  break;
1307
1307
  case "popover":
1308
1308
  default:
1309
- u.value = !0;
1309
+ s.value = !0;
1310
1310
  break;
1311
1311
  }
1312
1312
  }
1313
- async function M() {
1314
- var k, b;
1315
- if (await O(), e.value.multiple) {
1316
- u.value = !0;
1313
+ async function H() {
1314
+ var _, b;
1315
+ if (await I(), e.value.multiple) {
1316
+ s.value = !0;
1317
1317
  return;
1318
1318
  }
1319
1319
  await (await je.create({
1320
1320
  header: e.value.label || "Select an option",
1321
1321
  buttons: [
1322
- ...o.value.map((x) => {
1322
+ ...o.value.map((w) => {
1323
1323
  let y = "";
1324
- return x.isChecked ? y = "selected-option" : x.disabled && (y = "disabled-option"), {
1325
- text: x.label,
1324
+ return w.isChecked ? y = "selected-option" : w.disabled && (y = "disabled-option"), {
1325
+ text: w.label,
1326
1326
  cssClass: y,
1327
- handler: () => (C(x), !1),
1328
- disabled: x.disabled
1327
+ handler: () => (S(w), !1),
1328
+ disabled: w.disabled
1329
1329
  };
1330
1330
  }),
1331
1331
  {
1332
- text: ((b = (k = c == null ? void 0 : c.buttons) == null ? void 0 : k.cancel) == null ? void 0 : b.label) ?? "Cancel",
1332
+ text: ((b = (_ = c == null ? void 0 : c.buttons) == null ? void 0 : _.cancel) == null ? void 0 : b.label) ?? "Cancel",
1333
1333
  role: "cancel"
1334
1334
  }
1335
1335
  ]
1336
1336
  })).present();
1337
1337
  }
1338
- async function R() {
1339
- var b, x, y, q;
1340
- await O();
1341
- const r = o.value.map((N) => ({
1342
- label: N.label,
1338
+ async function A() {
1339
+ var b, w, y, M;
1340
+ await I();
1341
+ const u = o.value.map((j) => ({
1342
+ label: j.label,
1343
1343
  type: e.value.multiple ? "checkbox" : "radio",
1344
- value: N,
1345
- checked: N.isChecked,
1346
- disabled: N.disabled
1344
+ value: j,
1345
+ checked: j.isChecked,
1346
+ disabled: j.disabled
1347
1347
  }));
1348
- await (await Ge.create({
1348
+ await (await We.create({
1349
1349
  header: e.value.label || "Select an option",
1350
- inputs: r,
1350
+ inputs: u,
1351
1351
  buttons: [
1352
1352
  {
1353
- text: ((x = (b = c == null ? void 0 : c.buttons) == null ? void 0 : b.cancel) == null ? void 0 : x.label) ?? "Cancel",
1353
+ text: ((w = (b = c == null ? void 0 : c.buttons) == null ? void 0 : b.cancel) == null ? void 0 : w.label) ?? "Cancel",
1354
1354
  role: "cancel"
1355
1355
  },
1356
1356
  {
1357
- text: ((q = (y = c == null ? void 0 : c.buttons) == null ? void 0 : y.ok) == null ? void 0 : q.label) ?? "OK",
1358
- handler: (N) => {
1357
+ text: ((M = (y = c == null ? void 0 : c.buttons) == null ? void 0 : y.ok) == null ? void 0 : M.label) ?? "OK",
1358
+ handler: (j) => {
1359
1359
  if (e.value.multiple)
1360
- o.value.forEach((K) => it(K, o.value)), N.forEach((K) => {
1361
- const Y = o.value.find((se) => se.value === K.value);
1362
- Y && ae(Y, o.value);
1360
+ o.value.forEach((J) => it(J, o.value)), j.forEach((J) => {
1361
+ const te = o.value.find((re) => re.value === J.value);
1362
+ te && ne(te, o.value);
1363
1363
  });
1364
1364
  else {
1365
- w();
1366
- const K = o.value.find((Y) => Y.value === N.value);
1367
- K && ae(K, o.value);
1365
+ V();
1366
+ const J = o.value.find((te) => te.value === j.value);
1367
+ J && ne(J, o.value);
1368
1368
  }
1369
- V();
1369
+ C();
1370
1370
  }
1371
1371
  }
1372
1372
  ]
1373
1373
  })).present();
1374
1374
  }
1375
- async function W() {
1376
- var r;
1377
- if (e.value.required && Ce(m.value))
1378
- return ((r = c == null ? void 0 : c.errorMessages) == null ? void 0 : r.required) ?? "This field is required";
1375
+ async function B() {
1376
+ var u;
1377
+ if (e.value.required && we(f.value))
1378
+ return ((u = c == null ? void 0 : c.errorMessages) == null ? void 0 : u.required) ?? "This field is required";
1379
1379
  if (e.value.validation) {
1380
- const k = await e.value.validation(m.value, a == null ? void 0 : a.schema);
1381
- if (k && k.length)
1382
- return k.join();
1380
+ const _ = await e.value.validation(f.value, a == null ? void 0 : a.schema);
1381
+ if (_ && _.length)
1382
+ return _.join();
1383
1383
  }
1384
1384
  return !0;
1385
1385
  }
1386
- const { onFocus: X, applyValidationState: te } = de(
1386
+ const { onFocus: D, applyValidationState: Z } = ve(
1387
1387
  l,
1388
1388
  e,
1389
- z(() => e.value.multiple ? m.value : m.value[0]),
1390
- z(() => a == null ? void 0 : a.schema),
1391
- W
1389
+ F(() => e.value.multiple ? f.value : f.value[0]),
1390
+ F(() => a == null ? void 0 : a.schema),
1391
+ B
1392
1392
  );
1393
- function le(r) {
1394
- var k;
1395
- r.target === ((k = l.value) == null ? void 0 : k.$el) && (X(), p.value === "popover" && (u.value = !0));
1393
+ function Q(u) {
1394
+ var _;
1395
+ u.target === ((_ = l.value) == null ? void 0 : _.$el) && (D(), m.value === "popover" && (s.value = !0));
1396
1396
  }
1397
- async function V(r) {
1397
+ async function C(u) {
1398
1398
  var b;
1399
- if ((b = r == null ? void 0 : r.relatedTarget) != null && b.closest(".suggestions-list")) return;
1400
- u.value = !1;
1401
- const k = await W();
1402
- k === !0 ? (e.value.error = "", e.value.value = e.value.multiple ? m.value : m.value[0]) : e.value.error = typeof k == "string" ? k : "Validation failed", await te(k === !0);
1399
+ if ((b = u == null ? void 0 : u.relatedTarget) != null && b.closest(".suggestions-list")) return;
1400
+ s.value = !1;
1401
+ const _ = await B();
1402
+ _ === !0 ? (e.value.error = "", e.value.value = e.value.multiple ? f.value : f.value[0]) : e.value.error = typeof _ == "string" ? _ : "Validation failed", await Z(_ === !0);
1403
1403
  }
1404
- async function O() {
1405
- const r = [];
1404
+ async function I() {
1405
+ const u = [];
1406
1406
  if (typeof e.value.options == "function") {
1407
- let k = {};
1407
+ let _ = {};
1408
1408
  if (e.value.dependsOn && a.schema) {
1409
1409
  const b = Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn];
1410
- let x = !0;
1411
- if (k = b.reduce(
1412
- (y, q) => {
1413
- const N = a.schema[q];
1414
- return y[q] = Z(N) ? N.value : void 0, (y[q] === void 0 || y[q] === null || y[q] === "") && (x = !1), y;
1410
+ let w = !0;
1411
+ if (_ = b.reduce(
1412
+ (y, M) => {
1413
+ const j = a.schema[M];
1414
+ return y[M] = X(j) ? j.value : void 0, (y[M] === void 0 || y[M] === null || y[M] === "") && (w = !1), y;
1415
1415
  },
1416
1416
  {}
1417
- ), x) {
1418
- const y = await e.value.options(g.value, k);
1419
- r.push(...y.filter((q) => !!q.label));
1417
+ ), w) {
1418
+ const y = await e.value.options(g.value, _);
1419
+ u.push(...y.filter((M) => !!M.label));
1420
1420
  }
1421
1421
  } else {
1422
1422
  const b = await e.value.options(g.value, {});
1423
- r.push(...b.filter((x) => !!x.label));
1423
+ u.push(...b.filter((w) => !!w.label));
1424
1424
  }
1425
- } else Array.isArray(e.value.options) && r.push(...dt(e.value.options, g.value));
1426
- m.value.forEach((k) => ae(k, r)), o.value = r;
1425
+ } else Array.isArray(e.value.options) && u.push(...dt(e.value.options, g.value));
1426
+ f.value.forEach((_) => ne(_, u)), o.value = u;
1427
1427
  }
1428
- async function B() {
1429
- let r = e.value.value;
1430
- if (typeof r == "function") {
1431
- const k = r();
1432
- r = k instanceof Promise ? await k : k;
1433
- } else r instanceof Promise && (r = await r);
1434
- if (r) {
1435
- if (o.value.length === 0 && await O(), Array.isArray(r))
1436
- r.forEach((k) => ae(k, o.value));
1437
- else if (typeof r == "object")
1438
- ae(r, o.value);
1428
+ async function U() {
1429
+ let u = e.value.value;
1430
+ if (typeof u == "function") {
1431
+ const _ = u();
1432
+ u = _ instanceof Promise ? await _ : _;
1433
+ } else u instanceof Promise && (u = await u);
1434
+ if (u) {
1435
+ if (o.value.length === 0 && await I(), Array.isArray(u))
1436
+ u.forEach((_) => ne(_, o.value));
1437
+ else if (typeof u == "object")
1438
+ ne(u, o.value);
1439
1439
  else {
1440
- const k = o.value.find((b) => b.value === r);
1441
- ae(k || {
1442
- value: r,
1443
- label: r
1440
+ const _ = o.value.find((b) => b.value === u);
1441
+ ne(_ || {
1442
+ value: u,
1443
+ label: u
1444
1444
  }, o.value);
1445
1445
  }
1446
- e.value.value = r, V();
1446
+ e.value.value = u, C();
1447
1447
  }
1448
1448
  }
1449
- return be(async () => {
1450
- await O(), await B();
1449
+ return Ve(async () => {
1450
+ await I(), await U();
1451
1451
  }), n({
1452
- onValueUpdate: V,
1453
- onReset: w,
1452
+ onValueUpdate: C,
1453
+ onReset: V,
1454
1454
  getErrors: () => e.value.error ? [e.value.error] : []
1455
- }), (r, k) => (d(), A("div", {
1456
- class: G(["autocomplete-container", e.value.className]),
1457
- onFocusout: V,
1455
+ }), (u, _) => (v(), P("div", {
1456
+ class: q(["autocomplete-container", e.value.className]),
1457
+ onFocusout: C,
1458
1458
  ref_key: "containerRef",
1459
- ref: s
1459
+ ref: i
1460
1460
  }, [
1461
- T(i(Fe), {
1461
+ L(r(Ae), {
1462
1462
  ref_key: "inputRef",
1463
1463
  ref: l,
1464
1464
  modelValue: g.value,
1465
- "onUpdate:modelValue": k[0] || (k[0] = (b) => g.value = b),
1465
+ "onUpdate:modelValue": _[0] || (_[0] = (b) => g.value = b),
1466
1466
  fill: e.value.fill ?? "solid",
1467
1467
  "label-placement": e.value.labelPlacement ?? "stacked",
1468
1468
  type: t.type ?? "text",
1469
1469
  required: e.value.required,
1470
1470
  "error-text": e.value.error,
1471
1471
  autofocus: e.value.autoFocus,
1472
- placeholder: i(f) ? "Loading..." : $.value,
1473
- disabled: e.value.disabled || i(f),
1472
+ placeholder: r(p) ? "Loading..." : x.value,
1473
+ disabled: e.value.disabled || r(p),
1474
1474
  counter: e.value.counter,
1475
1475
  debounce: 300,
1476
- onIonFocus: le,
1477
- onClick: S,
1476
+ onIonFocus: Q,
1477
+ onClick: O,
1478
1478
  style: { width: "100%" }
1479
1479
  }, {
1480
1480
  default: E(() => [
1481
- T(ke, {
1481
+ L(Ce, {
1482
1482
  model: e.value,
1483
1483
  "slot-name": "label"
1484
1484
  }, null, 8, ["model"]),
1485
- e.value.multiple ? (d(), _(i(ue), {
1485
+ e.value.multiple ? (v(), k(r(ue), {
1486
1486
  key: 0,
1487
1487
  style: { width: "fit-content" },
1488
1488
  slot: "start"
1489
1489
  }, {
1490
1490
  default: E(() => [
1491
- (d(!0), A(j, null, ee(m.value, (b, x) => (d(), _(i(Le), { key: x }, {
1491
+ (v(!0), P(K, null, le(f.value, (b, w) => (v(), k(r(Ne), { key: w }, {
1492
1492
  default: E(() => [
1493
- T(i(ue), null, {
1493
+ L(r(ue), null, {
1494
1494
  default: E(() => [
1495
- H(P(b.label), 1)
1495
+ G(T(b.label), 1)
1496
1496
  ]),
1497
1497
  _: 2
1498
1498
  }, 1024)
@@ -1501,7 +1501,7 @@ const ke = /* @__PURE__ */ U({
1501
1501
  }, 1024))), 128))
1502
1502
  ]),
1503
1503
  _: 1
1504
- })) : (d(), _(i(ue), {
1504
+ })) : (v(), k(r(ue), {
1505
1505
  key: 1,
1506
1506
  slot: "start",
1507
1507
  class: "ion-no-wrap"
@@ -1509,73 +1509,73 @@ const ke = /* @__PURE__ */ U({
1509
1509
  default: E(() => {
1510
1510
  var b;
1511
1511
  return [
1512
- H(P(((b = m.value[0]) == null ? void 0 : b.label) ?? ""), 1)
1512
+ G(T(((b = f.value[0]) == null ? void 0 : b.label) ?? ""), 1)
1513
1513
  ];
1514
1514
  }),
1515
1515
  _: 1
1516
1516
  })),
1517
- i(f) ? (d(), _(i($e), {
1517
+ r(p) ? (v(), k(r(de), {
1518
1518
  key: 2,
1519
1519
  slot: "end",
1520
1520
  name: "crescent",
1521
1521
  class: "loading-spinner"
1522
- })) : (d(), _(i(ge), {
1522
+ })) : (v(), k(r(_e), {
1523
1523
  key: 3,
1524
1524
  slot: "end",
1525
- icon: i(Je)
1525
+ icon: r(Je)
1526
1526
  }, null, 8, ["icon"])),
1527
- (m.value.length > 0 || g.value) && !i(f) ? (d(), _(i(ge), {
1527
+ (f.value.length > 0 || g.value) && !r(p) ? (v(), k(r(_e), {
1528
1528
  key: 4,
1529
1529
  slot: "end",
1530
- icon: i(Qe),
1531
- onClick: w,
1530
+ icon: r(Qe),
1531
+ onClick: V,
1532
1532
  style: { "z-index": "999999" }
1533
- }, null, 8, ["icon"])) : I("", !0)
1533
+ }, null, 8, ["icon"])) : z("", !0)
1534
1534
  ]),
1535
1535
  _: 1
1536
1536
  }, 8, ["modelValue", "fill", "label-placement", "type", "required", "error-text", "autofocus", "placeholder", "disabled", "counter"]),
1537
- u.value && o.value.length > 0 && p.value === "popover" ? (d(), _(i(Me), {
1537
+ s.value && o.value.length > 0 && m.value === "popover" ? (v(), k(r(Me), {
1538
1538
  key: 0,
1539
- class: G(["suggestions-list", h.value])
1539
+ class: q(["suggestions-list", h.value])
1540
1540
  }, {
1541
1541
  default: E(() => [
1542
- (d(!0), A(j, null, ee(o.value, (b) => (d(), _(i(Ve), {
1542
+ (v(!0), P(K, null, le(o.value, (b) => (v(), k(r(ge), {
1543
1543
  button: "",
1544
1544
  key: b.label,
1545
- onClick: (x) => C(b),
1545
+ onClick: (w) => S(b),
1546
1546
  lines: e.value.showOptionsSeparator ? "none" : "full",
1547
1547
  disabled: b.disabled,
1548
- class: G({ "ion-item-disabled": b.disabled })
1548
+ class: q({ "ion-item-disabled": b.disabled })
1549
1549
  }, {
1550
1550
  default: E(() => {
1551
- var x;
1551
+ var w;
1552
1552
  return [
1553
- e.value.multiple ? (d(), _(i(Ae), {
1553
+ e.value.multiple ? (v(), k(r(Pe), {
1554
1554
  key: 0,
1555
1555
  slot: "start",
1556
1556
  checked: b.isChecked,
1557
1557
  disabled: b.disabled
1558
- }, null, 8, ["checked", "disabled"])) : I("", !0),
1559
- D("div", Lt, [
1560
- T(i(ue), null, {
1558
+ }, null, 8, ["checked", "disabled"])) : z("", !0),
1559
+ R("div", Nt, [
1560
+ L(r(ue), null, {
1561
1561
  default: E(() => [
1562
- H(P(b.label), 1)
1562
+ G(T(b.label), 1)
1563
1563
  ]),
1564
1564
  _: 2
1565
1565
  }, 1024),
1566
- i(Pe)(b, b.isChecked) ? (d(), _(i(xe), {
1566
+ r(Be)(b, b.isChecked) ? (v(), k(r(Oe), {
1567
1567
  key: 0,
1568
- color: (x = b.description) == null ? void 0 : x.color,
1568
+ color: (w = b.description) == null ? void 0 : w.color,
1569
1569
  class: "option-description"
1570
1570
  }, {
1571
1571
  default: E(() => {
1572
1572
  var y;
1573
1573
  return [
1574
- H(P((y = b.description) == null ? void 0 : y.text), 1)
1574
+ G(T((y = b.description) == null ? void 0 : y.text), 1)
1575
1575
  ];
1576
1576
  }),
1577
1577
  _: 2
1578
- }, 1032, ["color"])) : I("", !0)
1578
+ }, 1032, ["color"])) : z("", !0)
1579
1579
  ])
1580
1580
  ];
1581
1581
  }),
@@ -1583,12 +1583,12 @@ const ke = /* @__PURE__ */ U({
1583
1583
  }, 1032, ["onClick", "lines", "disabled", "class"]))), 128))
1584
1584
  ]),
1585
1585
  _: 1
1586
- }, 8, ["class"])) : I("", !0)
1586
+ }, 8, ["class"])) : z("", !0)
1587
1587
  ], 34));
1588
1588
  }
1589
- }), jt = /* @__PURE__ */ re(Mt, [["__scopeId", "data-v-73a59c08"]]), Gt = /* @__PURE__ */ U({
1589
+ }), jt = /* @__PURE__ */ ae(Mt, [["__scopeId", "data-v-73a59c08"]]), Wt = /* @__PURE__ */ N({
1590
1590
  __name: "TextAreaInput",
1591
- props: /* @__PURE__ */ J({
1591
+ props: /* @__PURE__ */ Y({
1592
1592
  schema: {}
1593
1593
  }, {
1594
1594
  modelValue: { type: Object, default: {} },
@@ -1596,59 +1596,79 @@ const ke = /* @__PURE__ */ U({
1596
1596
  }),
1597
1597
  emits: ["update:modelValue"],
1598
1598
  setup(t, { expose: n }) {
1599
- const a = t, e = Q(t, "modelValue"), l = F(null), s = F(e.value.value), u = z(() => a.schema), { onValueUpdate: o, onFocus: g, onReset: v, getErrors: c } = de(
1599
+ const a = t, e = ee(t, "modelValue"), l = $(null), i = F(() => a.schema), { resolvedValue: s, isLoading: o, error: g } = pe(e), d = $("");
1600
+ W(
1601
+ s,
1602
+ (x) => {
1603
+ x != null ? d.value = String(x) : d.value = "";
1604
+ },
1605
+ { immediate: !0 }
1606
+ );
1607
+ const { onValueUpdate: c, onFocus: p, onReset: m, getErrors: h } = ve(
1600
1608
  l,
1601
1609
  e,
1602
- s,
1603
- u
1610
+ d,
1611
+ i
1604
1612
  );
1605
- return L(
1606
- () => e.value.value,
1607
- (f) => s.value = f
1608
- ), n({
1609
- onReset: v,
1610
- onValueUpdate: o,
1611
- getErrors: c
1612
- }), (f, p) => (d(), _(i(We), {
1613
- ref_key: "inputRef",
1614
- ref: l,
1615
- modelValue: s.value,
1616
- "onUpdate:modelValue": p[0] || (p[0] = (h) => s.value = h),
1617
- class: G(e.value.className),
1618
- "clear-input": !0,
1619
- fill: e.value.fill ?? "solid",
1620
- "label-placement": e.value.labelPlacement ?? "stacked",
1621
- required: e.value.required,
1622
- "error-text": e.value.error,
1623
- autofocus: e.value.autoFocus,
1624
- placeholder: e.value.placeholder,
1625
- disabled: e.value.disabled,
1626
- counter: e.value.counter,
1627
- min: e.value.min,
1628
- max: e.value.max,
1629
- rows: e.value.rows,
1630
- cols: e.value.cols,
1631
- "auto-grow": e.value.autoGrow,
1632
- "max-length": e.value.maxLength,
1633
- "min-length": e.value.minLength,
1634
- pattern: e.value.pattern,
1635
- onIonFocus: i(g),
1636
- onIonChange: i(o),
1637
- onIonBlur: i(o),
1638
- style: { width: "100%" }
1639
- }, {
1640
- default: E(() => [
1641
- T(ke, {
1642
- model: e.value,
1643
- "slot-name": "label"
1644
- }, null, 8, ["model"])
1645
- ]),
1646
- _: 1
1647
- }, 8, ["modelValue", "class", "fill", "label-placement", "required", "error-text", "autofocus", "placeholder", "disabled", "counter", "min", "max", "rows", "cols", "auto-grow", "max-length", "min-length", "pattern", "onIonFocus", "onIonChange", "onIonBlur"]));
1613
+ return n({
1614
+ onReset: m,
1615
+ onValueUpdate: c,
1616
+ getErrors: () => {
1617
+ const x = h();
1618
+ return g.value ? [...x, g.value] : x;
1619
+ },
1620
+ isLoading: o,
1621
+ valueError: g
1622
+ }), (x, V) => (v(), P("div", {
1623
+ class: q(["textarea-container", { loading: r(o) }])
1624
+ }, [
1625
+ L(r(Ge), {
1626
+ ref_key: "inputRef",
1627
+ ref: l,
1628
+ modelValue: d.value,
1629
+ "onUpdate:modelValue": V[0] || (V[0] = (S) => d.value = S),
1630
+ class: q(e.value.className),
1631
+ "clear-input": !0,
1632
+ fill: e.value.fill ?? "solid",
1633
+ "label-placement": e.value.labelPlacement ?? "stacked",
1634
+ required: e.value.required,
1635
+ "error-text": e.value.error,
1636
+ autofocus: e.value.autoFocus,
1637
+ placeholder: r(o) ? "Loading..." : e.value.placeholder,
1638
+ disabled: e.value.disabled || r(o),
1639
+ counter: e.value.counter,
1640
+ min: e.value.min,
1641
+ max: e.value.max,
1642
+ rows: e.value.rows,
1643
+ cols: e.value.cols,
1644
+ "auto-grow": e.value.autoGrow,
1645
+ "max-length": e.value.maxLength,
1646
+ "min-length": e.value.minLength,
1647
+ pattern: e.value.pattern,
1648
+ onIonFocus: r(p),
1649
+ onIonChange: r(c),
1650
+ onIonBlur: r(c),
1651
+ style: { width: "100%" }
1652
+ }, {
1653
+ default: E(() => [
1654
+ L(Ce, {
1655
+ model: e.value,
1656
+ "slot-name": "label"
1657
+ }, null, 8, ["model"]),
1658
+ r(o) ? (v(), k(r(de), {
1659
+ key: 0,
1660
+ slot: "end",
1661
+ name: "crescent",
1662
+ class: "loading-spinner"
1663
+ })) : z("", !0)
1664
+ ]),
1665
+ _: 1
1666
+ }, 8, ["modelValue", "class", "fill", "label-placement", "required", "error-text", "autofocus", "placeholder", "disabled", "counter", "min", "max", "rows", "cols", "auto-grow", "max-length", "min-length", "pattern", "onIonFocus", "onIonChange", "onIonBlur"])
1667
+ ], 2));
1648
1668
  }
1649
- }), Wt = { class: "button-container" }, Ht = /* @__PURE__ */ U({
1669
+ }), Gt = /* @__PURE__ */ ae(Wt, [["__scopeId", "data-v-76df4b17"]]), Ht = { class: "button-container" }, Kt = /* @__PURE__ */ N({
1650
1670
  __name: "RepeatInput",
1651
- props: /* @__PURE__ */ J({
1671
+ props: /* @__PURE__ */ Y({
1652
1672
  schema: {},
1653
1673
  data: {},
1654
1674
  computedData: {}
@@ -1658,88 +1678,88 @@ const ke = /* @__PURE__ */ U({
1658
1678
  }),
1659
1679
  emits: ["update:modelValue"],
1660
1680
  setup(t, { expose: n }) {
1661
- const a = t, e = Q(t, "modelValue"), l = F([]), { dynamicRefs: s, getFormErrors: u, updateFormValues: o } = Be(), g = z(() => l.value.map((m, $) => ({
1662
- label: `Set ${$ + 1}`,
1663
- value: $,
1664
- other: Object.entries(m).reduce(
1665
- (w, [C, S]) => (Z(S) && (w[C] = S.value), w),
1681
+ const a = t, e = ee(t, "modelValue"), l = $([]), { dynamicRefs: i, getFormErrors: s, updateFormValues: o } = De(), g = F(() => l.value.map((f, x) => ({
1682
+ label: `Set ${x + 1}`,
1683
+ value: x,
1684
+ other: Object.entries(f).reduce(
1685
+ (V, [S, O]) => (X(O) && (V[S] = O.value), V),
1666
1686
  {}
1667
1687
  )
1668
1688
  })));
1669
- L(
1689
+ W(
1670
1690
  g,
1671
- (m) => {
1672
- e.value.value = m;
1691
+ (f) => {
1692
+ e.value.value = f;
1673
1693
  },
1674
1694
  { deep: !0, immediate: !0 }
1675
- ), be(v);
1676
- function v() {
1677
- e.value.children && l.value.push(we(e.value.children));
1695
+ ), Ve(d);
1696
+ function d() {
1697
+ e.value.children && l.value.push(Ee(e.value.children));
1678
1698
  }
1679
- function c(m) {
1680
- l.value.splice(m, 1);
1699
+ function c(f) {
1700
+ l.value.splice(f, 1);
1681
1701
  }
1682
- function f() {
1683
- const m = ($) => {
1684
- const [w, C] = $.split("-"), S = parseInt(w, 10);
1685
- return !isNaN(S) && C && l.value[S] && l.value[S][C] ? l.value[S][C] : null;
1702
+ function p() {
1703
+ const f = (x) => {
1704
+ const [V, S] = x.split("-"), O = parseInt(V, 10);
1705
+ return !isNaN(O) && S && l.value[O] && l.value[O][S] ? l.value[O][S] : null;
1686
1706
  };
1687
1707
  rt(
1688
- s.value,
1708
+ i.value,
1689
1709
  a.data,
1690
1710
  a.computedData,
1691
- m
1711
+ f
1692
1712
  );
1693
1713
  }
1694
- function p() {
1695
- return u();
1714
+ function m() {
1715
+ return s();
1696
1716
  }
1697
1717
  async function h() {
1698
1718
  await o();
1699
1719
  }
1700
1720
  return n({
1701
1721
  onValueUpdate: h,
1702
- onReset: f,
1703
- getErrors: p
1704
- }), (m, $) => (d(!0), A(j, null, ee(l.value, (w, C) => (d(), A("div", {
1705
- class: G(["repeat-input-wrapper", e.value.className]),
1706
- key: C
1722
+ onReset: p,
1723
+ getErrors: m
1724
+ }), (f, x) => (v(!0), P(K, null, le(l.value, (V, S) => (v(), P("div", {
1725
+ class: q(["repeat-input-wrapper", e.value.className]),
1726
+ key: S
1707
1727
  }, [
1708
- T(i(ie), { class: "repeat-row" }, {
1728
+ L(r(ie), { class: "repeat-row" }, {
1709
1729
  default: E(() => [
1710
- T(i(oe), {
1730
+ L(r(se), {
1711
1731
  size: "11",
1712
1732
  class: "form-fields-column"
1713
1733
  }, {
1714
1734
  default: E(() => [
1715
- T(i(ie), { class: "fields-row" }, {
1735
+ L(r(ie), { class: "fields-row" }, {
1716
1736
  default: E(() => [
1717
- (d(!0), A(j, null, ee(Object.keys(w), (S) => {
1718
- var M, R, W, X, te;
1719
- return d(), A(j, null, [
1720
- i(he)(w[S], m.data, m.computedData) ? (d(), _(i(oe), {
1721
- key: `${C}-${S}`,
1722
- size: ((M = w[S].grid) == null ? void 0 : M.xs) ?? "12",
1723
- "size-sm": (R = w[S].grid) == null ? void 0 : R.sm,
1724
- "size-md": (W = w[S].grid) == null ? void 0 : W.md,
1725
- "size-lg": (X = w[S].grid) == null ? void 0 : X.lg,
1726
- "size-xl": (te = w[S].grid) == null ? void 0 : te.xl,
1737
+ (v(!0), P(K, null, le(Object.keys(V), (O) => {
1738
+ var H, A, B, D, Z;
1739
+ return v(), P(K, null, [
1740
+ r(be)(V[O], f.data, f.computedData) ? (v(), k(r(se), {
1741
+ key: `${S}-${O}`,
1742
+ size: ((H = V[O].grid) == null ? void 0 : H.xs) ?? "12",
1743
+ "size-sm": (A = V[O].grid) == null ? void 0 : A.sm,
1744
+ "size-md": (B = V[O].grid) == null ? void 0 : B.md,
1745
+ "size-lg": (D = V[O].grid) == null ? void 0 : D.lg,
1746
+ "size-xl": (Z = V[O].grid) == null ? void 0 : Z.xl,
1727
1747
  class: "ion-margin-bottom"
1728
1748
  }, {
1729
1749
  default: E(() => [
1730
- (d(), _(me(w[S].type), {
1731
- modelValue: w[S],
1732
- "onUpdate:modelValue": (le) => w[S] = le,
1733
- schema: w,
1734
- "ref-key": `${C}-${S}`,
1750
+ (v(), k(ye(V[O].type), {
1751
+ modelValue: V[O],
1752
+ "onUpdate:modelValue": (Q) => V[O] = Q,
1753
+ schema: V,
1754
+ "ref-key": `${S}-${O}`,
1735
1755
  ref_for: !0,
1736
1756
  ref_key: "dynamicRefs",
1737
- ref: s,
1757
+ ref: i,
1738
1758
  style: { width: "100%" }
1739
1759
  }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "ref-key"]))
1740
1760
  ]),
1741
1761
  _: 2
1742
- }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : I("", !0)
1762
+ }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : z("", !0)
1743
1763
  ], 64);
1744
1764
  }), 256))
1745
1765
  ]),
@@ -1748,40 +1768,40 @@ const ke = /* @__PURE__ */ U({
1748
1768
  ]),
1749
1769
  _: 2
1750
1770
  }, 1024),
1751
- T(i(oe), {
1771
+ L(r(se), {
1752
1772
  size: "1",
1753
1773
  class: "button-column"
1754
1774
  }, {
1755
1775
  default: E(() => [
1756
- D("div", Wt, [
1757
- C === l.value.length - 1 ? (d(), _(i(ye), {
1776
+ R("div", Ht, [
1777
+ S === l.value.length - 1 ? (v(), k(r(ke), {
1758
1778
  key: 0,
1759
- onClick: v,
1779
+ onClick: d,
1760
1780
  color: "primary",
1761
1781
  size: "small"
1762
1782
  }, {
1763
1783
  default: E(() => [
1764
- T(i(ge), {
1784
+ L(r(_e), {
1765
1785
  slot: "icon-only",
1766
- icon: i(Xe)
1786
+ icon: r(Xe)
1767
1787
  }, null, 8, ["icon"])
1768
1788
  ]),
1769
1789
  _: 1
1770
- })) : I("", !0),
1771
- l.value.length > 1 ? (d(), _(i(ye), {
1790
+ })) : z("", !0),
1791
+ l.value.length > 1 ? (v(), k(r(ke), {
1772
1792
  key: 1,
1773
- onClick: (S) => c(C),
1793
+ onClick: (O) => c(S),
1774
1794
  color: "warning",
1775
1795
  size: "small"
1776
1796
  }, {
1777
1797
  default: E(() => [
1778
- T(i(ge), {
1798
+ L(r(_e), {
1779
1799
  slot: "icon-only",
1780
- icon: i(Ye)
1800
+ icon: r(Ye)
1781
1801
  }, null, 8, ["icon"])
1782
1802
  ]),
1783
1803
  _: 2
1784
- }, 1032, ["onClick"])) : I("", !0)
1804
+ }, 1032, ["onClick"])) : z("", !0)
1785
1805
  ])
1786
1806
  ]),
1787
1807
  _: 2
@@ -1791,9 +1811,9 @@ const ke = /* @__PURE__ */ U({
1791
1811
  }, 1024)
1792
1812
  ], 2))), 128));
1793
1813
  }
1794
- }), Kt = /* @__PURE__ */ re(Ht, [["__scopeId", "data-v-f27172ba"]]), Zt = /* @__PURE__ */ U({
1814
+ }), Zt = /* @__PURE__ */ ae(Kt, [["__scopeId", "data-v-f27172ba"]]), Jt = /* @__PURE__ */ N({
1795
1815
  __name: "CheckboxInput",
1796
- props: /* @__PURE__ */ J({
1816
+ props: /* @__PURE__ */ Y({
1797
1817
  schema: {}
1798
1818
  }, {
1799
1819
  modelValue: { type: Object, default: {} },
@@ -1801,41 +1821,60 @@ const ke = /* @__PURE__ */ U({
1801
1821
  }),
1802
1822
  emits: ["update:modelValue"],
1803
1823
  setup(t, { expose: n }) {
1804
- const a = t, e = Q(t, "modelValue"), l = F(null), s = F(e.value.value), u = z(() => a.schema), o = z(() => vt(e.value)), { onValueUpdate: g, onFocus: v, getErrors: c } = de(l, e, s, u);
1824
+ const a = t, e = ee(t, "modelValue"), l = $(null), i = F(() => a.schema), { resolvedValue: s, isLoading: o, error: g } = pe(e), d = $(!1);
1825
+ W(
1826
+ s,
1827
+ (V) => {
1828
+ V != null ? d.value = !!V : d.value = !1;
1829
+ },
1830
+ { immediate: !0 }
1831
+ );
1832
+ const c = F(() => vt(e.value)), { onValueUpdate: p, onFocus: m, getErrors: h } = ve(l, e, d, i);
1805
1833
  function f() {
1806
- s.value = !1, e.value.error = "", e.value.value = !1;
1834
+ d.value = !1, e.value.error = "", e.value.value = !1;
1807
1835
  }
1808
- return L(
1809
- () => e.value.value,
1810
- (p) => s.value = p
1811
- ), n({
1812
- onValueUpdate: g,
1836
+ return n({
1837
+ onValueUpdate: p,
1813
1838
  onReset: f,
1814
- getErrors: c
1815
- }), (p, h) => (d(), _(i(Ae), {
1816
- modelValue: s.value,
1817
- "onUpdate:modelValue": h[0] || (h[0] = (m) => s.value = m),
1818
- ref_key: "inputRef",
1819
- ref: l,
1820
- justify: "start",
1821
- class: G(e.value.className),
1822
- required: e.value.required,
1823
- "error-text": e.value.error,
1824
- disabled: e.value.disabled,
1825
- onIonFocus: i(v),
1826
- onIonChange: i(g),
1827
- onIonBlur: i(g),
1828
- style: { width: "100%" }
1829
- }, {
1830
- default: E(() => [
1831
- H(P(o.value), 1)
1832
- ]),
1833
- _: 1
1834
- }, 8, ["modelValue", "class", "required", "error-text", "disabled", "onIonFocus", "onIonChange", "onIonBlur"]));
1839
+ getErrors: () => {
1840
+ const V = h();
1841
+ return g.value ? [...V, g.value] : V;
1842
+ },
1843
+ isLoading: o,
1844
+ valueError: g
1845
+ }), (V, S) => (v(), P("div", {
1846
+ class: q(["checkbox-container", { loading: r(o) }])
1847
+ }, [
1848
+ L(r(Pe), {
1849
+ modelValue: d.value,
1850
+ "onUpdate:modelValue": S[0] || (S[0] = (O) => d.value = O),
1851
+ ref_key: "inputRef",
1852
+ ref: l,
1853
+ justify: "start",
1854
+ class: q(e.value.className),
1855
+ required: e.value.required,
1856
+ "error-text": e.value.error,
1857
+ disabled: e.value.disabled || r(o),
1858
+ onIonFocus: r(m),
1859
+ onIonChange: r(p),
1860
+ onIonBlur: r(p),
1861
+ style: { width: "100%" }
1862
+ }, {
1863
+ default: E(() => [
1864
+ G(T(r(o) ? "Loading..." : c.value) + " ", 1),
1865
+ r(o) ? (v(), k(r(de), {
1866
+ key: 0,
1867
+ name: "crescent",
1868
+ class: "loading-spinner"
1869
+ })) : z("", !0)
1870
+ ]),
1871
+ _: 1
1872
+ }, 8, ["modelValue", "class", "required", "error-text", "disabled", "onIonFocus", "onIonChange", "onIonBlur"])
1873
+ ], 2));
1835
1874
  }
1836
- }), Jt = { class: "radio-content" }, Qt = { class: "radio-label" }, Xt = /* @__PURE__ */ U({
1875
+ }), Qt = /* @__PURE__ */ ae(Jt, [["__scopeId", "data-v-193b3431"]]), Xt = { class: "radio-content" }, Yt = { class: "radio-label" }, el = /* @__PURE__ */ N({
1837
1876
  __name: "RadioInput",
1838
- props: /* @__PURE__ */ J({
1877
+ props: /* @__PURE__ */ Y({
1839
1878
  schema: {}
1840
1879
  }, {
1841
1880
  modelValue: { type: Object, default: {} },
@@ -1843,89 +1882,125 @@ const ke = /* @__PURE__ */ U({
1843
1882
  }),
1844
1883
  emits: ["update:modelValue"],
1845
1884
  setup(t, { expose: n }) {
1846
- const a = t, e = Q(t, "modelValue"), l = F(null), s = F(e.value.value), u = z(() => a.schema), o = F([]), { onValueUpdate: g, onFocus: v, getErrors: c, isValid: f } = de(
1885
+ const a = t, e = ee(t, "modelValue"), l = $(null), i = F(() => a.schema), s = $([]), { resolvedValue: o, isLoading: g, error: d } = pe(e), c = $(void 0);
1886
+ W(
1887
+ o,
1888
+ (A) => {
1889
+ if (A != null)
1890
+ if (typeof A == "object" && "value" in A && "label" in A)
1891
+ c.value = A;
1892
+ else {
1893
+ const B = s.value.find((D) => D.value === A);
1894
+ c.value = B;
1895
+ }
1896
+ else
1897
+ c.value = void 0;
1898
+ },
1899
+ { immediate: !0 }
1900
+ );
1901
+ const { onValueUpdate: p, onFocus: m, getErrors: h, isValid: f } = ve(
1847
1902
  l,
1848
1903
  e,
1849
- s,
1850
- u
1904
+ c,
1905
+ i
1851
1906
  );
1852
- function p() {
1853
- e.value.error = "", s.value = void 0, e.value.value = void 0;
1907
+ function x() {
1908
+ e.value.error = "", c.value = void 0, e.value.value = void 0;
1854
1909
  }
1855
- function h(w, C) {
1856
- return (w == null ? void 0 : w.value) === (C == null ? void 0 : C.value);
1910
+ function V(A, B) {
1911
+ return (A == null ? void 0 : A.value) === (B == null ? void 0 : B.value);
1857
1912
  }
1858
- function m(w) {
1859
- return s.value ? h(s.value, w) : !1;
1913
+ function S(A) {
1914
+ return c.value ? V(c.value, A) : !1;
1860
1915
  }
1861
- async function $() {
1862
- typeof e.value.options == "function" ? o.value = await e.value.options() : o.value = e.value.options;
1916
+ async function O() {
1917
+ typeof e.value.options == "function" ? s.value = await e.value.options() : s.value = e.value.options;
1863
1918
  }
1864
- return L(
1865
- () => e.value.value,
1866
- (w) => s.value = w
1867
- ), n({
1868
- onValueUpdate: g,
1869
- onReset: p,
1870
- getErrors: c,
1871
- isValid: f
1872
- }), be($), (w, C) => (d(), A(j, null, [
1873
- T(ke, { model: e.value }, null, 8, ["model"]),
1874
- C[1] || (C[1] = D("br", null, null, -1)),
1875
- e.value.error ? (d(), _(i(He), {
1919
+ return n({
1920
+ onValueUpdate: p,
1921
+ onReset: x,
1922
+ getErrors: () => {
1923
+ const A = h();
1924
+ return d.value ? [...A, d.value] : A;
1925
+ },
1926
+ isValid: f,
1927
+ isLoading: g,
1928
+ valueError: d
1929
+ }), Ve(O), (A, B) => (v(), P("div", {
1930
+ class: q(["radio-container", { loading: r(g) }])
1931
+ }, [
1932
+ L(Ce, { model: e.value }, null, 8, ["model"]),
1933
+ r(g) ? (v(), k(r(de), {
1876
1934
  key: 0,
1935
+ name: "crescent",
1936
+ class: "loading-spinner"
1937
+ })) : z("", !0),
1938
+ B[2] || (B[2] = R("br", null, null, -1)),
1939
+ e.value.error ? (v(), k(r(He), {
1940
+ key: 1,
1877
1941
  color: "danger"
1878
1942
  }, {
1879
1943
  default: E(() => [
1880
- H(P(e.value.error), 1)
1944
+ G(T(e.value.error), 1)
1881
1945
  ]),
1882
1946
  _: 1
1883
- })) : I("", !0),
1884
- T(i(Ve), null, {
1947
+ })) : z("", !0),
1948
+ r(g) ? (v(), k(r(ge), { key: 3 }, {
1885
1949
  default: E(() => [
1886
- T(i(Ke), {
1887
- modelValue: s.value,
1888
- "onUpdate:modelValue": C[0] || (C[0] = (S) => s.value = S),
1889
- class: G(e.value.className),
1950
+ L(r(ue), null, {
1951
+ default: E(() => B[1] || (B[1] = [
1952
+ G("Loading options...")
1953
+ ])),
1954
+ _: 1,
1955
+ __: [1]
1956
+ })
1957
+ ]),
1958
+ _: 1
1959
+ })) : (v(), k(r(ge), { key: 2 }, {
1960
+ default: E(() => [
1961
+ L(r(Ke), {
1962
+ modelValue: c.value,
1963
+ "onUpdate:modelValue": B[0] || (B[0] = (D) => c.value = D),
1964
+ class: q(e.value.className),
1890
1965
  required: e.value.required,
1891
1966
  disabled: e.value.disabled,
1892
- compareWith: h,
1967
+ compareWith: V,
1893
1968
  "allow-empty-selection": !e.value.required,
1894
- onIonFocus: i(v),
1895
- onIonChange: i(g),
1896
- onIonBlur: i(g),
1969
+ onIonFocus: r(m),
1970
+ onIonChange: r(p),
1971
+ onIonBlur: r(p),
1897
1972
  style: { width: "100%" }
1898
1973
  }, {
1899
1974
  default: E(() => [
1900
- (d(!0), A(j, null, ee(o.value, (S) => (d(), _(i(Ve), {
1901
- key: S.value,
1975
+ (v(!0), P(K, null, le(s.value, (D) => (v(), k(r(ge), {
1976
+ key: D.value,
1902
1977
  lines: e.value.showOptionsSeparator ? "none" : "full"
1903
1978
  }, {
1904
1979
  default: E(() => [
1905
- T(i(Ze), {
1906
- value: S,
1907
- disabled: e.value.disabled || S.disabled,
1980
+ L(r(Ze), {
1981
+ value: D,
1982
+ disabled: e.value.disabled || D.disabled,
1908
1983
  "label-placement": "end",
1909
1984
  justify: "start"
1910
1985
  }, {
1911
1986
  default: E(() => {
1912
- var M;
1987
+ var Z;
1913
1988
  return [
1914
- D("div", Jt, [
1915
- D("div", Qt, P(S.label), 1),
1916
- i(Pe)(S, m(S)) ? (d(), _(i(xe), {
1989
+ R("div", Xt, [
1990
+ R("div", Yt, T(D.label), 1),
1991
+ r(Be)(D, S(D)) ? (v(), k(r(Oe), {
1917
1992
  key: 0,
1918
- color: (M = S.description) == null ? void 0 : M.color,
1993
+ color: (Z = D.description) == null ? void 0 : Z.color,
1919
1994
  class: "radio-description"
1920
1995
  }, {
1921
1996
  default: E(() => {
1922
- var R;
1997
+ var Q;
1923
1998
  return [
1924
- H(P((R = S.description) == null ? void 0 : R.text), 1)
1999
+ G(T((Q = D.description) == null ? void 0 : Q.text), 1)
1925
2000
  ];
1926
2001
  }),
1927
2002
  _: 2
1928
- }, 1032, ["color"])) : I("", !0)
2003
+ }, 1032, ["color"])) : z("", !0)
1929
2004
  ])
1930
2005
  ];
1931
2006
  }),
@@ -1939,13 +2014,13 @@ const ke = /* @__PURE__ */ U({
1939
2014
  }, 8, ["modelValue", "class", "required", "disabled", "allow-empty-selection", "onIonFocus", "onIonChange", "onIonBlur"])
1940
2015
  ]),
1941
2016
  _: 1
1942
- })
1943
- ], 64));
2017
+ }))
2018
+ ], 2));
1944
2019
  }
1945
- }), Yt = /* @__PURE__ */ re(Xt, [["__scopeId", "data-v-3dbfeaf7"]]), el = { class: "form-section-header" }, tl = { class: "form-section-title" }, ll = {
2020
+ }), tl = /* @__PURE__ */ ae(el, [["__scopeId", "data-v-4732d2f9"]]), ll = { class: "form-section-header" }, al = { class: "form-section-title" }, nl = {
1946
2021
  key: 0,
1947
2022
  class: "form-section-subtitle"
1948
- }, al = /* @__PURE__ */ U({
2023
+ }, ol = /* @__PURE__ */ N({
1949
2024
  __name: "SectionTitle",
1950
2025
  props: {
1951
2026
  modelValue: {},
@@ -1956,106 +2031,106 @@ const ke = /* @__PURE__ */ U({
1956
2031
  setup(t) {
1957
2032
  const a = t.modelValue;
1958
2033
  return (e, l) => {
1959
- var s, u, o, g, v;
1960
- return d(), _(i(oe), {
1961
- size: ((s = i(a).grid) == null ? void 0 : s.xs) ?? "12",
1962
- "size-sm": (u = i(a).grid) == null ? void 0 : u.sm,
1963
- "size-md": (o = i(a).grid) == null ? void 0 : o.md,
1964
- "size-lg": (g = i(a).grid) == null ? void 0 : g.lg,
1965
- "size-xl": (v = i(a).grid) == null ? void 0 : v.xl,
1966
- class: G(["form-section-container", i(a).className])
2034
+ var i, s, o, g, d;
2035
+ return v(), k(r(se), {
2036
+ size: ((i = r(a).grid) == null ? void 0 : i.xs) ?? "12",
2037
+ "size-sm": (s = r(a).grid) == null ? void 0 : s.sm,
2038
+ "size-md": (o = r(a).grid) == null ? void 0 : o.md,
2039
+ "size-lg": (g = r(a).grid) == null ? void 0 : g.lg,
2040
+ "size-xl": (d = r(a).grid) == null ? void 0 : d.xl,
2041
+ class: q(["form-section-container", r(a).className])
1967
2042
  }, {
1968
2043
  default: E(() => [
1969
- D("div", el, [
1970
- D("h3", tl, P(i(a).title), 1),
1971
- i(a).subtitle ? (d(), A("p", ll, P(i(a).subtitle), 1)) : I("", !0)
2044
+ R("div", ll, [
2045
+ R("h3", al, T(r(a).title), 1),
2046
+ r(a).subtitle ? (v(), P("p", nl, T(r(a).subtitle), 1)) : z("", !0)
1972
2047
  ])
1973
2048
  ]),
1974
2049
  _: 1
1975
2050
  }, 8, ["size", "size-sm", "size-md", "size-lg", "size-xl", "class"]);
1976
2051
  };
1977
2052
  }
1978
- }), nl = /* @__PURE__ */ re(al, [["__scopeId", "data-v-e0bf7af0"]]);
1979
- function il(t, n, a) {
1980
- const e = F({}), l = F({});
1981
- function s(c, f, p) {
1982
- l.value[c] = p, f.forEach((h) => {
1983
- var m;
1984
- (m = e.value)[h] ?? (m[h] = []), e.value[h].includes(c) || e.value[h].push(c);
1985
- }), v(c);
2053
+ }), sl = /* @__PURE__ */ ae(ol, [["__scopeId", "data-v-e0bf7af0"]]);
2054
+ function dl(t, n, a) {
2055
+ const e = $({}), l = $({});
2056
+ function i(c, p, m) {
2057
+ l.value[c] = m, p.forEach((h) => {
2058
+ var f;
2059
+ (f = e.value)[h] ?? (f[h] = []), e.value[h].includes(c) || e.value[h].push(c);
2060
+ }), d(c);
1986
2061
  }
1987
- function u(c) {
1988
- return Object.entries(e.value).filter(([, p]) => p.includes(c)).map(([p]) => p).reduce(
1989
- (p, h) => (p[h] = n.value[h] ?? a.value[h], p),
2062
+ function s(c) {
2063
+ return Object.entries(e.value).filter(([, m]) => m.includes(c)).map(([m]) => m).reduce(
2064
+ (m, h) => (m[h] = n.value[h] ?? a.value[h], m),
1990
2065
  {}
1991
2066
  );
1992
2067
  }
1993
- function o(c, f) {
1994
- return c ? Array.isArray(c) ? c.some((p) => f.some((h) => g(p, h.value))) : f.some((p) => g(c, p.value)) : !1;
2068
+ function o(c, p) {
2069
+ return c ? Array.isArray(c) ? c.some((m) => p.some((h) => g(m, h.value))) : p.some((m) => g(c, m.value)) : !1;
1995
2070
  }
1996
- function g(c, f) {
1997
- return typeof c == "object" && c !== null ? c.value === f : String(c) === String(f);
2071
+ function g(c, p) {
2072
+ return typeof c == "object" && c !== null ? c.value === p : String(c) === String(p);
1998
2073
  }
1999
- async function v(c, f) {
2074
+ async function d(c, p) {
2000
2075
  if (!l.value[c]) return;
2001
- const p = u(c), h = Object.keys(p);
2076
+ const m = s(c), h = Object.keys(m);
2002
2077
  if (!(h.length === 0 || !h.every(
2003
- ($) => p[$] !== void 0 && p[$] !== null
2078
+ (x) => m[x] !== void 0 && m[x] !== null
2004
2079
  )))
2005
2080
  try {
2006
- const $ = l.value[c], w = await $(f, p);
2081
+ const x = l.value[c], V = await x(p, m);
2007
2082
  if (!t.value[c]) return;
2008
- const C = t.value[c];
2009
- if (!Z(C)) return;
2010
- C.options = w;
2011
- const S = C.value;
2012
- if (!S) return;
2013
- o(S, w) || (C.value = C.multiple ? [] : "");
2014
- } catch ($) {
2015
- console.error(`Error loading options for ${c}:`, $);
2083
+ const S = t.value[c];
2084
+ if (!X(S)) return;
2085
+ S.options = V;
2086
+ const O = S.value;
2087
+ if (!O) return;
2088
+ o(O, V) || (S.value = S.multiple ? [] : "");
2089
+ } catch (x) {
2090
+ console.error(`Error loading options for ${c}:`, x);
2016
2091
  }
2017
2092
  }
2018
- return L(
2093
+ return W(
2019
2094
  [n, a],
2020
2095
  () => {
2021
- Object.entries(e.value).forEach(([c, f]) => {
2022
- (n.value[c] !== void 0 || a.value[c] !== void 0) && f.forEach((p) => {
2023
- v(p);
2096
+ Object.entries(e.value).forEach(([c, p]) => {
2097
+ (n.value[c] !== void 0 || a.value[c] !== void 0) && p.forEach((m) => {
2098
+ d(m);
2024
2099
  });
2025
2100
  });
2026
2101
  },
2027
2102
  { deep: !0, immediate: !0 }
2028
2103
  ), {
2029
- registerDependency: s,
2030
- updateOptions: v
2104
+ registerDependency: i,
2105
+ updateOptions: d
2031
2106
  };
2032
2107
  }
2033
- const cl = {
2108
+ const vl = {
2034
2109
  install(t, n) {
2035
- n && t.provide("globalConfig", n), t.component("VForm", At), t.component("TextInput", Tt), t.component("DateInput", Ut), t.component("NumberInput", Rt), t.component("EmailInput", qt), t.component("PasswordInput", Nt), t.component("SelectInput", jt), t.component("TextAreaInput", Gt), t.component("RepeatInput", Kt), t.component("CheckboxInput", Zt), t.component("RadioInput", Yt), t.component("FormSection", nl), t.directive("maskito", et);
2110
+ n && t.provide("globalConfig", n), t.component("VForm", At), t.component("TextInput", Lt), t.component("DateInput", Tt), t.component("NumberInput", Ut), t.component("EmailInput", Rt), t.component("PasswordInput", qt), t.component("SelectInput", jt), t.component("TextAreaInput", Gt), t.component("RepeatInput", Zt), t.component("CheckboxInput", Qt), t.component("RadioInput", tl), t.component("FormSection", sl), t.directive("maskito", et);
2036
2111
  }
2037
2112
  };
2038
2113
  export {
2039
- Zt as CheckboxInput,
2040
- Ut as DateInput,
2041
- qt as EmailInput,
2114
+ Qt as CheckboxInput,
2115
+ Tt as DateInput,
2116
+ Rt as EmailInput,
2042
2117
  At as FormBuilder,
2043
- nl as FormSection,
2044
- Rt as NumberInput,
2045
- Nt as PasswordInput,
2046
- Yt as RadioInput,
2047
- Kt as RepeatInput,
2118
+ sl as FormSection,
2119
+ Ut as NumberInput,
2120
+ qt as PasswordInput,
2121
+ tl as RadioInput,
2122
+ Zt as RepeatInput,
2048
2123
  jt as SelectInput,
2049
2124
  Gt as TextAreaInput,
2050
- Tt as TextInput,
2051
- cl as VForm,
2052
- cl as default,
2125
+ Lt as TextInput,
2126
+ vl as VForm,
2127
+ vl as default,
2053
2128
  st as resolveFormFieldValue,
2054
2129
  pt as useDataTransformation,
2055
- il as useDependentOptions,
2056
- De as useFormFieldValue,
2057
- Be as useFormValidation,
2058
- de as useInputValidation,
2130
+ dl as useDependentOptions,
2131
+ pe as useFormFieldValue,
2132
+ De as useFormValidation,
2133
+ ve as useInputValidation,
2059
2134
  ft as useMultiStepForm
2060
2135
  };
2061
2136
  //# sourceMappingURL=index.es.js.map