@uniquedj95/vform 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,202 +1,202 @@
1
- import { ref as C, computed as w, watch as S, defineComponent as F, createBlock as V, openBlock as p, unref as v, withCtx as b, createVNode as A, createCommentVNode as R, createElementBlock as q, Fragment as T, renderList as K, resolveDynamicComponent as de, normalizeStyle as Ve, createTextVNode as I, toDisplayString as B, toRef as be, mergeModels as z, useModel as $, resolveDirective as _e, withDirectives as xe, onMounted as oe, normalizeClass as ke, createElementVNode as ie } from "vue";
2
- import { IonGrid as Ce, IonRow as te, IonCol as le, IonButton as Z, IonLabel as H, IonText as Oe, IonInput as ve, IonInputPasswordToggle as Ee, IonChip as we, IonIcon as ee, IonList as Re, IonItem as Ae, IonCheckbox as fe, actionSheetController as Ie, alertController as Fe, IonTextarea as Ue, IonRadioGroup as Be, IonRadio as Se } from "@ionic/vue";
3
- import { chevronDown as qe, close as ze, add as $e, remove as Te } from "ionicons/icons";
4
- import { maskito as Le } from "@maskito/vue";
5
- function De(t) {
6
- return new Promise((u) => {
1
+ import { ref as E, computed as S, watch as I, defineComponent as U, createElementBlock as $, openBlock as f, normalizeClass as ne, createElementVNode as B, createCommentVNode as O, Fragment as T, renderList as K, toDisplayString as A, normalizeStyle as ve, createBlock as V, createVNode as P, unref as d, withCtx as b, resolveDynamicComponent as fe, createTextVNode as z, toRef as Oe, mergeModels as N, useModel as G, resolveDirective as Ee, withDirectives as xe, onMounted as ge } from "vue";
2
+ import { IonGrid as Ce, IonRow as le, IonCol as ae, IonButton as j, IonLabel as Y, IonText as Re, IonInput as Ve, IonInputPasswordToggle as Ae, IonChip as $e, IonIcon as ce, IonList as Fe, IonItem as ze, IonCheckbox as be, actionSheetController as Be, alertController as Pe, IonTextarea as Ie, IonRadioGroup as Ue, IonRadio as De } from "@ionic/vue";
3
+ import { chevronDown as Te, close as qe, add as Le, remove as Me } from "ionicons/icons";
4
+ import { maskito as je } from "@maskito/vue";
5
+ function Ne(t) {
6
+ return new Promise((o) => {
7
7
  requestAnimationFrame(async () => {
8
8
  const n = await t.getInputElement();
9
- u(n);
9
+ o(n);
10
10
  });
11
11
  });
12
12
  }
13
- const Me = {
13
+ const Ge = {
14
14
  d: /\d/,
15
15
  a: /[A-Za-z]/,
16
16
  "*": /[A-Za-z0-9]/
17
17
  // Default: alphanum, can customize if needed
18
- }, je = {
18
+ }, He = {
19
19
  d: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"],
20
20
  a: ["A", "B", "C", "x", "y", "z", "D", "f"],
21
21
  "*": ["A", "3", "b", "8", "z", "4", "D", "0"]
22
22
  };
23
- function Pe(t, u) {
24
- const n = je[t];
25
- return n[u % n.length];
23
+ function Ke(t, o) {
24
+ const n = He[t];
25
+ return n[o % n.length];
26
26
  }
27
- function Ne(t) {
28
- const u = [];
27
+ function We(t) {
28
+ const o = [];
29
29
  let n = "", e = 0, l = 0;
30
30
  for (; e < t.length; ) {
31
- const a = t[e];
32
- if (["d", "a", "*"].includes(a)) {
33
- let i = 1;
31
+ const u = t[e];
32
+ if (["d", "a", "*"].includes(u)) {
33
+ let r = 1;
34
34
  if (t[e + 1] === "{") {
35
35
  const s = t.indexOf("}", e + 2);
36
36
  if (s !== -1) {
37
- const h = t.slice(e + 2, s);
38
- if (h.includes(",")) {
39
- const [, c] = h.split(",").map((r) => parseInt(r.trim()));
40
- i = c || parseInt(h.split(",")[0]);
37
+ const y = t.slice(e + 2, s);
38
+ if (y.includes(",")) {
39
+ const [, p] = y.split(",").map((c) => parseInt(c.trim()));
40
+ r = p || parseInt(y.split(",")[0]);
41
41
  } else
42
- i = parseInt(h);
42
+ r = parseInt(y);
43
43
  e = s;
44
44
  }
45
45
  } else {
46
46
  let s = e + 1;
47
- for (; t[s] === a; )
48
- i++, s++;
47
+ for (; t[s] === u; )
48
+ r++, s++;
49
49
  e = s - 1;
50
50
  }
51
- for (let s = 0; s < i; s++)
52
- u.push(Me[a]), n += Pe(a, l++);
51
+ for (let s = 0; s < r; s++)
52
+ o.push(Ge[u]), n += Ke(u, l++);
53
53
  } else
54
- u.push(a), n += a;
54
+ o.push(u), n += u;
55
55
  e++;
56
56
  }
57
57
  return {
58
- mask: u,
58
+ mask: o,
59
59
  placeholder: n,
60
- elementPredicate: De
60
+ elementPredicate: Ne
61
61
  };
62
62
  }
63
- function ae(t) {
63
+ function me(t) {
64
64
  return t == null || Array.isArray(t) && !t.length || typeof t == "object" && !Object.keys(t).length || !t;
65
65
  }
66
- function ne(t, u, n) {
67
- return typeof t.condition == "function" ? t.condition(u, n) : !0;
66
+ function ie(t, o, n) {
67
+ return typeof t.condition == "function" ? t.condition(o, n) : !0;
68
68
  }
69
- function ue(t) {
69
+ function he(t) {
70
70
  if (typeof t != "object" || t === null)
71
71
  return t;
72
72
  if (Array.isArray(t))
73
- return t.map((n) => ue(n));
74
- const u = {};
73
+ return t.map((n) => he(n));
74
+ const o = {};
75
75
  return Object.entries(t).forEach(([n, e]) => {
76
- typeof e == "function" ? u[n] = e.bind(u) : u[n] = ue(e);
77
- }), u;
76
+ typeof e == "function" ? o[n] = e.bind(o) : o[n] = he(e);
77
+ }), o;
78
78
  }
79
- function pe(t, u) {
80
- return u.findIndex((n) => n.value === t.value || n.label === t.label || n.value === t.label || n.label === t.value);
79
+ function ke(t, o) {
80
+ return o.findIndex((n) => n.value === t.value || n.label === t.label || n.value === t.label || n.label === t.value);
81
81
  }
82
- function D(t, u) {
83
- const n = pe(t, u);
84
- n >= 0 ? u[n].isChecked = !0 : u.push({ ...t, isChecked: !0 });
82
+ function X(t, o) {
83
+ const n = ke(t, o);
84
+ n >= 0 ? o[n].isChecked = !0 : o.push({ ...t, isChecked: !0 });
85
85
  }
86
- function ce(t, u) {
87
- const n = pe(t, u);
88
- n >= 0 && (u[n].isChecked = !1);
86
+ function _e(t, o) {
87
+ const n = ke(t, o);
88
+ n >= 0 && (o[n].isChecked = !1);
89
89
  }
90
- function Ge(t) {
91
- t.forEach((u) => {
92
- u.isChecked = !1;
90
+ function Ze(t) {
91
+ t.forEach((o) => {
92
+ o.isChecked = !1;
93
93
  });
94
94
  }
95
- function He(t, u) {
96
- return u ? t.filter(
97
- (n) => JSON.stringify(n).toLowerCase().includes(u.toLowerCase())
95
+ function Je(t, o) {
96
+ return o ? t.filter(
97
+ (n) => JSON.stringify(n).toLowerCase().includes(o.toLowerCase())
98
98
  ) : t;
99
99
  }
100
- function me(t) {
101
- const u = t.label || "", n = t.required ? " *" : "";
102
- return u + n;
100
+ function Se(t) {
101
+ const o = t.label || "", n = t.required ? " *" : "";
102
+ return o + n;
103
103
  }
104
- function J(t, u) {
105
- if (t === u) return !0;
106
- if (t == null || u == null || typeof t != typeof u) return !1;
107
- if (typeof t != "object") return t === u;
108
- if (Array.isArray(t) && Array.isArray(u))
109
- return t.length !== u.length ? !1 : t.every((l, a) => J(l, u[a]));
110
- if (Array.isArray(t) !== Array.isArray(u)) return !1;
111
- const n = Object.keys(t), e = Object.keys(u);
104
+ function oe(t, o) {
105
+ if (t === o) return !0;
106
+ if (t == null || o == null || typeof t != typeof o) return !1;
107
+ if (typeof t != "object") return t === o;
108
+ if (Array.isArray(t) && Array.isArray(o))
109
+ return t.length !== o.length ? !1 : t.every((l, u) => oe(l, o[u]));
110
+ if (Array.isArray(t) !== Array.isArray(o)) return !1;
111
+ const n = Object.keys(t), e = Object.keys(o);
112
112
  return n.length !== e.length ? !1 : n.every(
113
- (l) => Object.prototype.hasOwnProperty.call(u, l) && J(t[l], u[l])
113
+ (l) => Object.prototype.hasOwnProperty.call(o, l) && oe(t[l], o[l])
114
114
  );
115
115
  }
116
- function ye() {
117
- const t = C([]);
118
- async function u() {
116
+ function we() {
117
+ const t = E([]);
118
+ async function o() {
119
119
  console.debug("Validating form inputs");
120
- const a = [];
121
- for (const i of t.value)
122
- if (typeof (i == null ? void 0 : i.onValueUpdate) == "function" && await i.onValueUpdate(), typeof (i == null ? void 0 : i.getErrors) == "function")
120
+ const u = [];
121
+ for (const r of t.value)
122
+ if (typeof (r == null ? void 0 : r.onValueUpdate) == "function" && await r.onValueUpdate(), typeof (r == null ? void 0 : r.getErrors) == "function")
123
123
  try {
124
- const s = i.getErrors();
125
- Array.isArray(s) ? a.push(...s) : console.warn("getErrors() returned non-array value:", s);
124
+ const s = r.getErrors();
125
+ Array.isArray(s) ? u.push(...s) : console.warn("getErrors() returned non-array value:", s);
126
126
  } catch (s) {
127
- console.error("Error calling getErrors on component:", s, i);
127
+ console.error("Error calling getErrors on component:", s, r);
128
128
  }
129
129
  else
130
- console.warn("Component does not have getErrors function:", i);
131
- return a.every(ae);
130
+ console.warn("Component does not have getErrors function:", r);
131
+ return u.every(me);
132
132
  }
133
133
  function n() {
134
- t.value.forEach((a) => {
135
- typeof (a == null ? void 0 : a.onReset) == "function" && a.onReset();
134
+ t.value.forEach((u) => {
135
+ typeof (u == null ? void 0 : u.onReset) == "function" && u.onReset();
136
136
  });
137
137
  }
138
138
  function e() {
139
- const a = [];
140
- for (const i of t.value)
141
- if (typeof (i == null ? void 0 : i.getErrors) == "function")
139
+ const u = [];
140
+ for (const r of t.value)
141
+ if (typeof (r == null ? void 0 : r.getErrors) == "function")
142
142
  try {
143
- const s = i.getErrors();
144
- Array.isArray(s) ? a.push(...s) : a.push(String(s));
143
+ const s = r.getErrors();
144
+ Array.isArray(s) ? u.push(...s) : u.push(String(s));
145
145
  } catch (s) {
146
- console.error("Error calling getErrors on component:", s, i);
146
+ console.error("Error calling getErrors on component:", s, r);
147
147
  }
148
- return a;
148
+ return u;
149
149
  }
150
150
  async function l() {
151
- for (const a of t.value)
152
- typeof (a == null ? void 0 : a.onValueUpdate) == "function" && await a.onValueUpdate();
151
+ for (const u of t.value)
152
+ typeof (u == null ? void 0 : u.onValueUpdate) == "function" && await u.onValueUpdate();
153
153
  }
154
154
  return {
155
155
  dynamicRefs: t,
156
- isFormValid: u,
156
+ isFormValid: o,
157
157
  resetForm: n,
158
158
  getFormErrors: e,
159
159
  updateFormValues: l
160
160
  };
161
161
  }
162
- function Ke(t) {
163
- const u = w(
164
- () => Object.entries(t.value).reduce((c, [r, d]) => (d.value !== void 0 && (typeof d.onChange == "function" ? c[r] = d.onChange(d.value, t.value) : c[r] = d.value), c), {})
165
- ), n = C({}), e = (c, r, d) => {
166
- var o;
167
- return typeof ((o = t.value[c].children[r]) == null ? void 0 : o.computedValue) == "function" ? t.value[c].children[r].computedValue(d, t.value) : d;
168
- }, l = (c, r, d, o) => {
169
- n.value[c][o] || (n.value[c][o] = {}), Object.entries(r.other ?? {}).forEach(([m, y]) => {
170
- var f;
171
- !J(y, (f = d.other) == null ? void 0 : f[m]) && (n.value[c][o][m] = e(c, m, y));
162
+ function Qe(t) {
163
+ const o = S(
164
+ () => Object.entries(t.value).reduce((p, [c, v]) => (v.value !== void 0 && (typeof v.onChange == "function" ? p[c] = v.onChange(v.value, t.value) : p[c] = v.value), p), {})
165
+ ), n = E({}), e = (p, c, v) => {
166
+ var i;
167
+ return typeof ((i = t.value[p].children[c]) == null ? void 0 : i.computedValue) == "function" ? t.value[p].children[c].computedValue(v, t.value) : v;
168
+ }, l = (p, c, v, i) => {
169
+ n.value[p][i] || (n.value[p][i] = {}), Object.entries(c.other ?? {}).forEach(([m, C]) => {
170
+ var w;
171
+ !oe(C, (w = v.other) == null ? void 0 : w[m]) && (n.value[p][i][m] = e(p, m, C));
172
172
  });
173
- }, a = (c, r, d) => {
174
- r.forEach((o, m) => {
175
- const y = d[m] ?? { other: {} };
176
- l(c, o, y, m);
173
+ }, u = (p, c, v) => {
174
+ c.forEach((i, m) => {
175
+ const C = v[m] ?? { other: {} };
176
+ l(p, i, C, m);
177
177
  });
178
- }, i = (c, { other: r }) => Object.entries(r ?? {}).reduce(
179
- (d, [o, m]) => (d[o] = e(c, o, m), d),
178
+ }, r = (p, { other: c }) => Object.entries(c ?? {}).reduce(
179
+ (v, [i, m]) => (v[i] = e(p, i, m), v),
180
180
  {}
181
- ), s = (c, r, d) => {
182
- n.value[c] || (n.value[c] = []);
183
- const o = r;
184
- Array.isArray(d[c]) ? a(c, o, d[c]) : n.value[c] = o.map((m) => i(c, m));
185
- }, h = (c, r, d) => {
186
- if (!r) {
187
- delete n.value[c];
181
+ ), s = (p, c, v) => {
182
+ n.value[p] || (n.value[p] = []);
183
+ const i = c;
184
+ Array.isArray(v[p]) ? u(p, i, v[p]) : n.value[p] = i.map((m) => r(p, m));
185
+ }, y = (p, c, v) => {
186
+ if (!c) {
187
+ delete n.value[p];
188
188
  return;
189
189
  }
190
- const o = t.value[c];
191
- o.children !== void 0 ? s(c, r, d) : typeof o.computedValue == "function" && (n.value[c] = o.computedValue(r, t.value));
190
+ const i = t.value[p];
191
+ i.children !== void 0 ? s(p, c, v) : typeof i.computedValue == "function" && (n.value[p] = i.computedValue(c, t.value));
192
192
  };
193
- return S(
194
- u,
195
- (c, r = {}) => {
196
- Object.keys(c).forEach((d) => {
197
- J(c[d], r[d]) || h(d, c[d], r);
198
- }), Object.keys(r).forEach((d) => {
199
- !(d in c) && d in n.value && delete n.value[d];
193
+ return I(
194
+ o,
195
+ (p, c = {}) => {
196
+ Object.keys(p).forEach((v) => {
197
+ oe(p[v], c[v]) || y(v, p[v], c);
198
+ }), Object.keys(c).forEach((v) => {
199
+ !(v in p) && v in n.value && delete n.value[v];
200
200
  });
201
201
  },
202
202
  {
@@ -204,14 +204,194 @@ function Ke(t) {
204
204
  deep: !0
205
205
  }
206
206
  ), {
207
- formData: u,
207
+ formData: o,
208
208
  computedData: n
209
209
  };
210
210
  }
211
- const We = /* @__PURE__ */ F({
211
+ function Xe(t) {
212
+ const o = E(0), n = E({}), e = E({}), l = E({});
213
+ function u(_) {
214
+ const a = {};
215
+ return Object.entries(_.schema).forEach(([h, k]) => {
216
+ a[h] = k.value;
217
+ }), a;
218
+ }
219
+ t.steps.forEach((_) => {
220
+ n.value[_.id] = u(_), e.value[_.id] = {}, l.value[_.id] = [];
221
+ });
222
+ const r = S(() => t.steps[o.value]), s = S(() => o.value === 0), y = S(() => o.value === t.steps.length - 1), p = S(() => !y.value), c = S(() => !s.value), v = S(() => t.steps.length), i = S(() => v.value === 0 ? 0 : Math.round((o.value + 1) / v.value * 100)), m = S(() => {
223
+ const _ = {};
224
+ return Object.values(n.value).forEach((a) => {
225
+ Object.assign(_, a);
226
+ }), _;
227
+ }), C = S(() => {
228
+ const _ = {};
229
+ return Object.values(e.value).forEach((a) => {
230
+ Object.assign(_, a);
231
+ }), _;
232
+ });
233
+ function x(_, a) {
234
+ n.value[_] = { ...n.value[_], ...a };
235
+ }
236
+ function w(_, a) {
237
+ e.value[_] = { ...e.value[_], ...a };
238
+ }
239
+ function R(_) {
240
+ const a = t.steps.find((h) => h.id === _);
241
+ a && (n.value[_] = u(a), e.value[_] = {});
242
+ }
243
+ async function F() {
244
+ const _ = r.value;
245
+ if (!_) return !0;
246
+ const a = [];
247
+ if (_.validation) {
248
+ const h = await _.validation(
249
+ n.value[_.id],
250
+ e.value[_.id]
251
+ );
252
+ h && a.push(...h);
253
+ }
254
+ return l.value[_.id] = a, a.length === 0;
255
+ }
256
+ async function q(_) {
257
+ return _ < 0 || _ >= t.steps.length || _ > o.value && !await F() ? !1 : (o.value = _, !0);
258
+ }
259
+ async function W() {
260
+ return p.value ? q(o.value + 1) : !1;
261
+ }
262
+ async function J() {
263
+ return c.value ? q(o.value - 1) : !1;
264
+ }
265
+ function Z() {
266
+ o.value = 0, l.value = {}, t.steps.forEach((_) => {
267
+ R(_.id), l.value[_.id] = [];
268
+ });
269
+ }
270
+ async function L() {
271
+ let _ = !0;
272
+ for (const a of t.steps)
273
+ if (a.validation) {
274
+ const h = await a.validation(
275
+ n.value[a.id],
276
+ e.value[a.id]
277
+ );
278
+ l.value[a.id] = h || [], h && h.length > 0 && (_ = !1);
279
+ }
280
+ return _;
281
+ }
282
+ function M() {
283
+ return {
284
+ steps: { ...n.value },
285
+ computedSteps: { ...e.value },
286
+ allFormData: m.value,
287
+ allComputedData: C.value
288
+ };
289
+ }
290
+ return {
291
+ // State
292
+ currentStepIndex: o,
293
+ currentStep: r,
294
+ stepData: n,
295
+ stepComputedData: e,
296
+ stepValidationErrors: l,
297
+ // Computed
298
+ isFirstStep: s,
299
+ isLastStep: y,
300
+ canGoNext: p,
301
+ canGoPrevious: c,
302
+ totalSteps: v,
303
+ progressPercentage: i,
304
+ allFormData: m,
305
+ allComputedData: C,
306
+ // Methods
307
+ updateStepData: x,
308
+ updateStepComputedData: w,
309
+ clearStepData: R,
310
+ validateCurrentStep: F,
311
+ goToStep: q,
312
+ nextStep: W,
313
+ previousStep: J,
314
+ resetForm: Z,
315
+ validateAllSteps: L,
316
+ getMultiStepFormData: M
317
+ };
318
+ }
319
+ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { class: "step-indicator__step-content" }, lt = { class: "step-indicator__step-marker" }, at = { class: "step-indicator__step-info" }, nt = { class: "step-indicator__step-title" }, ot = {
320
+ key: 0,
321
+ class: "step-indicator__step-subtitle"
322
+ }, ut = {
323
+ key: 0,
324
+ class: "step-indicator__progress"
325
+ }, st = { class: "step-indicator__progress-bar" }, rt = { class: "step-indicator__progress-text" }, it = /* @__PURE__ */ U({
326
+ __name: "StepIndicator",
327
+ props: {
328
+ steps: {},
329
+ activeStepIndex: {},
330
+ position: {},
331
+ showProgress: { type: Boolean, default: !0 },
332
+ allowNavigation: { type: Boolean, default: !1 }
333
+ },
334
+ emits: ["step-click"],
335
+ setup(t, { emit: o }) {
336
+ const n = t, e = o, l = S(() => n.steps.length === 0 ? 0 : (n.activeStepIndex + 1) / n.steps.length * 100);
337
+ function u(r) {
338
+ n.allowNavigation && e("step-click", r);
339
+ }
340
+ return (r, s) => (f(), $("div", {
341
+ class: ne(["step-indicator", [`step-indicator--${r.position}`, { "step-indicator--clickable": r.allowNavigation }]])
342
+ }, [
343
+ B("div", Ye, [
344
+ (f(!0), $(T, null, K(r.steps, (y, p) => (f(), $("div", {
345
+ key: y.id,
346
+ class: ne(["step-indicator__step", {
347
+ "step-indicator__step--active": p === r.activeStepIndex,
348
+ "step-indicator__step--completed": p < r.activeStepIndex,
349
+ "step-indicator__step--clickable": r.allowNavigation
350
+ }]),
351
+ onClick: (c) => u(p)
352
+ }, [
353
+ B("div", tt, [
354
+ B("div", lt, [
355
+ B("span", null, A(p + 1), 1)
356
+ ]),
357
+ B("div", at, [
358
+ B("div", nt, A(y.title), 1),
359
+ y.subtitle ? (f(), $("div", ot, A(y.subtitle), 1)) : O("", !0)
360
+ ])
361
+ ]),
362
+ p < r.steps.length - 1 ? (f(), $("div", {
363
+ key: 0,
364
+ class: ne(["step-indicator__connector", { "step-indicator__connector--completed": p < r.activeStepIndex }])
365
+ }, null, 2)) : O("", !0)
366
+ ], 10, et))), 128))
367
+ ]),
368
+ r.showProgress && (r.position === "top" || r.position === "bottom") ? (f(), $("div", ut, [
369
+ B("div", st, [
370
+ B("div", {
371
+ class: "step-indicator__progress-fill",
372
+ style: ve({ width: `${l.value}%` })
373
+ }, null, 4)
374
+ ]),
375
+ B("div", rt, " Step " + A(r.activeStepIndex + 1) + " of " + A(r.steps.length), 1)
376
+ ])) : O("", !0)
377
+ ], 2));
378
+ }
379
+ }), de = (t, o) => {
380
+ const n = t.__vccOpts || t;
381
+ for (const [e, l] of o)
382
+ n[e] = l;
383
+ return n;
384
+ }, re = /* @__PURE__ */ de(it, [["__scopeId", "data-v-aca1a6d0"]]), ct = { class: "v-form-container" }, dt = {
385
+ key: 0,
386
+ class: "multi-step-form"
387
+ }, pt = { class: "multi-step-form-content" }, vt = { class: "step-nav-buttons" }, ft = { class: "step-action-buttons" }, mt = { class: "step-nav-buttons" }, ht = {
388
+ key: 1,
389
+ class: "step-progress-bottom"
390
+ }, gt = { class: "step-progress-bar" }, yt = { class: "step-progress-text" }, Ct = /* @__PURE__ */ U({
212
391
  __name: "vForm",
213
392
  props: {
214
393
  schema: {},
394
+ multiStepConfig: {},
215
395
  showLabels: { type: Boolean, default: !0 },
216
396
  showClearButton: { type: Boolean, default: !0 },
217
397
  showCancelButton: { type: Boolean, default: !0 },
@@ -222,137 +402,366 @@ const We = /* @__PURE__ */ F({
222
402
  hideButtons: { type: Boolean, default: !1 },
223
403
  customButtons: {}
224
404
  },
225
- emits: ["submit", "clear", "cancel"],
226
- setup(t, { expose: u, emit: n }) {
227
- const e = t, l = n, a = C(e.schema), { dynamicRefs: i, isFormValid: s, resetForm: h } = ye(), { formData: c, computedData: r } = Ke(a);
228
- async function d() {
229
- await s() && l("submit", c.value, r.value);
405
+ emits: ["submit", "multi-step-submit", "step-change", "clear", "cancel"],
406
+ setup(t, { expose: o, emit: n }) {
407
+ const e = t, l = n, u = S(() => !!e.multiStepConfig), r = E(e.schema || {}), s = e.multiStepConfig ? Xe(e.multiStepConfig) : null, { dynamicRefs: y, isFormValid: p, resetForm: c } = we(), { formData: v, computedData: i } = Qe(r), m = S(() => (s == null ? void 0 : s.currentStepIndex.value) ?? 0), C = S(() => s == null ? void 0 : s.currentStep.value), x = S(() => (s == null ? void 0 : s.isLastStep.value) ?? !0), w = S(() => (s == null ? void 0 : s.canGoNext.value) ?? !1), R = S(() => (s == null ? void 0 : s.canGoPrevious.value) ?? !1), F = S(() => !u.value || !s ? 0 : s.progressPercentage.value);
408
+ I(
409
+ () => C.value,
410
+ (a) => {
411
+ a && u.value && (r.value = a.schema);
412
+ },
413
+ { immediate: !0 }
414
+ ), I(
415
+ [v, i],
416
+ ([a, h]) => {
417
+ u.value && s && C.value && (s.updateStepData(C.value.id, a), s.updateStepComputedData(C.value.id, h));
418
+ },
419
+ { deep: !0 }
420
+ ), I(
421
+ () => e.schema,
422
+ (a) => {
423
+ if (!u.value && a) {
424
+ r.value = a;
425
+ for (const [h, k] of Object.entries(a))
426
+ k.value !== void 0 && (r.value[h].value = k.value);
427
+ }
428
+ },
429
+ { deep: !0, immediate: !0 }
430
+ );
431
+ async function q() {
432
+ if (u.value && s) {
433
+ if (!await s.validateAllSteps()) return;
434
+ const h = s.getMultiStepFormData();
435
+ l("multi-step-submit", h);
436
+ } else {
437
+ if (!await p()) return;
438
+ l("submit", v.value, i.value);
439
+ }
440
+ }
441
+ function W() {
442
+ u.value && s ? s.resetForm() : c(), l("clear");
230
443
  }
231
- function o() {
232
- h(), l("clear");
444
+ function J() {
445
+ u.value && s && C.value && s.clearStepData(C.value.id);
233
446
  }
234
- function m() {
235
- h(), l("cancel");
447
+ function Z() {
448
+ u.value && s ? s.resetForm() : c(), l("cancel");
236
449
  }
237
- return S(
238
- c,
450
+ async function L() {
451
+ if (s) {
452
+ if (!await p())
453
+ return;
454
+ await s.nextStep() && C.value && l("step-change", m.value, C.value.id);
455
+ }
456
+ }
457
+ async function M() {
458
+ s && await s.previousStep() && C.value && l("step-change", m.value, C.value.id);
459
+ }
460
+ async function _(a) {
461
+ if (s) {
462
+ if (a > m.value && !await p())
463
+ return;
464
+ await s.goToStep(a) && C.value && l("step-change", a, C.value.id);
465
+ }
466
+ }
467
+ return I(
468
+ v,
239
469
  async () => {
240
- for (const [y, _] of Object.entries(a.value))
241
- ne(_, c.value, r.value) || (_.value = e.schema[y].value);
470
+ var a;
471
+ for (const [h, k] of Object.entries(r.value))
472
+ if (!ie(k, v.value, i.value)) {
473
+ const g = u.value && C.value ? C.value.schema[h] : (a = e.schema) == null ? void 0 : a[h];
474
+ g && (k.value = g.value);
475
+ }
242
476
  },
243
477
  {
244
478
  deep: !0,
245
479
  immediate: !0
246
480
  }
247
- ), S(
248
- () => e.schema,
249
- (y) => {
250
- for (const [_, f] of Object.entries(y))
251
- f.value !== void 0 && (a.value[_].value = f.value);
481
+ ), o({
482
+ resetForm: W,
483
+ isFormValid: p,
484
+ resolveData: () => u.value && s ? s.getMultiStepFormData() : {
485
+ formData: v.value,
486
+ computedData: i.value
252
487
  },
253
- {
254
- deep: !0,
255
- immediate: !0
256
- }
257
- ), u({
258
- resetForm: h,
259
- isFormValid: s,
260
- resolveData: () => ({
261
- formData: c.value,
262
- computedData: r.value
263
- })
264
- }), (y, _) => (p(), V(v(Ce), null, {
265
- default: b(() => [
266
- A(v(te), null, {
267
- default: b(() => [
268
- (p(!0), q(T, null, K(Object.keys(a.value), (f) => {
269
- var O, E, L, M, j;
270
- return p(), q(T, null, [
271
- v(ne)(a.value[f], v(c), v(r)) ? (p(), V(v(le), {
272
- key: f,
273
- size: ((O = a.value[f].grid) == null ? void 0 : O.xs) ?? "12",
274
- "size-sm": (E = a.value[f].grid) == null ? void 0 : E.sm,
275
- "size-md": (L = a.value[f].grid) == null ? void 0 : L.md,
276
- "size-lg": (M = a.value[f].grid) == null ? void 0 : M.lg,
277
- "size-xl": (j = a.value[f].grid) == null ? void 0 : j.xl,
278
- class: "ion-margin-vertical"
279
- }, {
280
- default: b(() => [
281
- (p(), V(de(a.value[f].type), {
282
- modelValue: a.value[f],
283
- "onUpdate:modelValue": (W) => a.value[f] = W,
284
- schema: a.value,
285
- "form-id": f,
286
- ref_for: !0,
287
- ref_key: "dynamicRefs",
288
- ref: i,
289
- "ref-key": f
290
- }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "form-id", "ref-key"]))
291
- ]),
292
- _: 2
293
- }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : R("", !0)
294
- ], 64);
295
- }), 256))
296
- ]),
297
- _: 1
298
- }),
299
- y.hideButtons ? R("", !0) : (p(), V(v(te), { key: 0 }, {
488
+ // Multi-step specific methods
489
+ nextStep: L,
490
+ previousStep: M,
491
+ goToStep: _,
492
+ getCurrentStep: () => C.value,
493
+ getCurrentStepIndex: () => m.value
494
+ }), (a, h) => {
495
+ var k;
496
+ return f(), $("div", ct, [
497
+ u.value ? (f(), $("div", dt, [
498
+ a.multiStepConfig && a.multiStepConfig.stepPosition === "top" ? (f(), V(re, {
499
+ key: 0,
500
+ steps: a.multiStepConfig.steps,
501
+ "active-step-index": m.value,
502
+ position: a.multiStepConfig.stepPosition || "top",
503
+ "show-progress": a.multiStepConfig.showProgress,
504
+ "allow-navigation": a.multiStepConfig.allowStepNavigation,
505
+ onStepClick: _
506
+ }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0),
507
+ B("div", {
508
+ class: ne(["multi-step-content", `multi-step-content--${((k = a.multiStepConfig) == null ? void 0 : k.stepPosition) || "top"}`])
509
+ }, [
510
+ a.multiStepConfig && a.multiStepConfig.stepPosition === "left" ? (f(), V(re, {
511
+ key: 0,
512
+ steps: a.multiStepConfig.steps,
513
+ "active-step-index": m.value,
514
+ position: a.multiStepConfig.stepPosition ?? "top",
515
+ "show-progress": a.multiStepConfig.showProgress,
516
+ "allow-navigation": a.multiStepConfig.allowStepNavigation,
517
+ onStepClick: _,
518
+ class: "multi-step-sidebar"
519
+ }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0),
520
+ B("div", pt, [
521
+ P(d(Ce), null, {
522
+ default: b(() => [
523
+ P(d(le), null, {
524
+ default: b(() => [
525
+ (f(!0), $(T, null, K(Object.keys(r.value), (g) => {
526
+ var D, H, Q, ee, te;
527
+ return f(), $(T, null, [
528
+ d(ie)(r.value[g], d(v), d(i)) ? (f(), V(d(ae), {
529
+ key: g,
530
+ size: ((D = r.value[g].grid) == null ? void 0 : D.xs) ?? "12",
531
+ "size-sm": (H = r.value[g].grid) == null ? void 0 : H.sm,
532
+ "size-md": (Q = r.value[g].grid) == null ? void 0 : Q.md,
533
+ "size-lg": (ee = r.value[g].grid) == null ? void 0 : ee.lg,
534
+ "size-xl": (te = r.value[g].grid) == null ? void 0 : te.xl,
535
+ class: "ion-margin-vertical"
536
+ }, {
537
+ default: b(() => [
538
+ (f(), V(fe(r.value[g].type), {
539
+ modelValue: r.value[g],
540
+ "onUpdate:modelValue": (pe) => r.value[g] = pe,
541
+ schema: r.value,
542
+ "form-id": g,
543
+ ref_for: !0,
544
+ ref_key: "dynamicRefs",
545
+ ref: y,
546
+ "ref-key": g
547
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "form-id", "ref-key"]))
548
+ ]),
549
+ _: 2
550
+ }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : O("", !0)
551
+ ], 64);
552
+ }), 256))
553
+ ]),
554
+ _: 1
555
+ })
556
+ ]),
557
+ _: 1
558
+ }),
559
+ a.hideButtons ? O("", !0) : (f(), V(d(le), {
560
+ key: 0,
561
+ class: "multi-step-buttons"
562
+ }, {
563
+ default: b(() => [
564
+ P(d(ae), {
565
+ size: "12",
566
+ class: "button-container"
567
+ }, {
568
+ default: b(() => [
569
+ B("div", vt, [
570
+ R.value ? (f(), V(d(j), {
571
+ key: 0,
572
+ onClick: M,
573
+ fill: "outline"
574
+ }, {
575
+ default: b(() => h[0] || (h[0] = [
576
+ z(" Previous ")
577
+ ])),
578
+ _: 1,
579
+ __: [0]
580
+ })) : O("", !0)
581
+ ]),
582
+ B("div", ft, [
583
+ a.showCancelButton ? (f(), V(d(j), {
584
+ key: 0,
585
+ onClick: Z,
586
+ fill: "outline"
587
+ }, {
588
+ default: b(() => [
589
+ z(A(a.cancelButtonText ?? "Cancel"), 1)
590
+ ]),
591
+ _: 1
592
+ })) : O("", !0),
593
+ a.showClearButton ? (f(), V(d(j), {
594
+ key: 1,
595
+ onClick: J,
596
+ fill: "outline"
597
+ }, {
598
+ default: b(() => [
599
+ z(A(a.clearButtonText ?? "Reset"), 1)
600
+ ]),
601
+ _: 1
602
+ })) : O("", !0),
603
+ (f(!0), $(T, null, K(a.customButtons, (g) => (f(), V(d(j), {
604
+ key: g.label,
605
+ onClick: g.action,
606
+ color: g.color ?? "primary"
607
+ }, {
608
+ default: b(() => [
609
+ z(A(g.label), 1)
610
+ ]),
611
+ _: 2
612
+ }, 1032, ["onClick", "color"]))), 128))
613
+ ]),
614
+ B("div", mt, [
615
+ w.value ? (f(), V(d(j), {
616
+ key: 0,
617
+ onClick: L
618
+ }, {
619
+ default: b(() => h[1] || (h[1] = [
620
+ z(" Next ")
621
+ ])),
622
+ _: 1,
623
+ __: [1]
624
+ })) : O("", !0),
625
+ x.value ? (f(), V(d(j), {
626
+ key: 1,
627
+ onClick: q
628
+ }, {
629
+ default: b(() => [
630
+ z(A(a.submitButtonText ?? "Submit"), 1)
631
+ ]),
632
+ _: 1
633
+ })) : O("", !0)
634
+ ])
635
+ ]),
636
+ _: 1
637
+ })
638
+ ]),
639
+ _: 1
640
+ })),
641
+ a.multiStepConfig && (a.multiStepConfig.stepPosition === "left" || a.multiStepConfig.stepPosition === "right") && a.multiStepConfig.showProgress ? (f(), $("div", ht, [
642
+ B("div", gt, [
643
+ B("div", {
644
+ class: "step-progress-fill",
645
+ style: ve({ width: `${F.value}%` })
646
+ }, null, 4)
647
+ ]),
648
+ B("div", yt, " Step " + A(m.value + 1) + " of " + A(a.multiStepConfig.steps.length), 1)
649
+ ])) : O("", !0)
650
+ ]),
651
+ a.multiStepConfig && a.multiStepConfig.stepPosition === "right" ? (f(), V(re, {
652
+ key: 1,
653
+ steps: a.multiStepConfig.steps,
654
+ "active-step-index": m.value,
655
+ position: a.multiStepConfig.stepPosition,
656
+ "show-progress": a.multiStepConfig.showProgress,
657
+ "allow-navigation": a.multiStepConfig.allowStepNavigation,
658
+ onStepClick: _,
659
+ class: "multi-step-sidebar"
660
+ }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0)
661
+ ], 2),
662
+ a.multiStepConfig && a.multiStepConfig.stepPosition === "bottom" ? (f(), V(re, {
663
+ key: 1,
664
+ steps: a.multiStepConfig.steps,
665
+ "active-step-index": m.value,
666
+ position: a.multiStepConfig.stepPosition,
667
+ "show-progress": a.multiStepConfig.showProgress,
668
+ "allow-navigation": a.multiStepConfig.allowStepNavigation,
669
+ onStepClick: _
670
+ }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0)
671
+ ])) : (f(), V(d(Ce), { key: 1 }, {
300
672
  default: b(() => [
301
- A(v(le), {
302
- size: "12",
303
- style: Ve([{ display: "flex" }, { justifyContent: y.buttonPlacement }])
304
- }, {
673
+ P(d(le), null, {
305
674
  default: b(() => [
306
- y.showCancelButton ? (p(), V(v(Z), {
307
- key: 0,
308
- onClick: m
309
- }, {
310
- default: b(() => [
311
- I(B(y.cancelButtonText ?? "Cancel"), 1)
312
- ]),
313
- _: 1
314
- })) : R("", !0),
315
- y.showClearButton ? (p(), V(v(Z), {
316
- key: 1,
317
- onClick: o
675
+ (f(!0), $(T, null, K(Object.keys(r.value), (g) => {
676
+ var D, H, Q, ee, te;
677
+ return f(), $(T, null, [
678
+ d(ie)(r.value[g], d(v), d(i)) ? (f(), V(d(ae), {
679
+ key: g,
680
+ size: ((D = r.value[g].grid) == null ? void 0 : D.xs) ?? "12",
681
+ "size-sm": (H = r.value[g].grid) == null ? void 0 : H.sm,
682
+ "size-md": (Q = r.value[g].grid) == null ? void 0 : Q.md,
683
+ "size-lg": (ee = r.value[g].grid) == null ? void 0 : ee.lg,
684
+ "size-xl": (te = r.value[g].grid) == null ? void 0 : te.xl,
685
+ class: "ion-margin-vertical"
686
+ }, {
687
+ default: b(() => [
688
+ (f(), V(fe(r.value[g].type), {
689
+ modelValue: r.value[g],
690
+ "onUpdate:modelValue": (pe) => r.value[g] = pe,
691
+ schema: r.value,
692
+ "form-id": g,
693
+ ref_for: !0,
694
+ ref_key: "dynamicRefs",
695
+ ref: y,
696
+ "ref-key": g
697
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "form-id", "ref-key"]))
698
+ ]),
699
+ _: 2
700
+ }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : O("", !0)
701
+ ], 64);
702
+ }), 256))
703
+ ]),
704
+ _: 1
705
+ }),
706
+ a.hideButtons ? O("", !0) : (f(), V(d(le), { key: 0 }, {
707
+ default: b(() => [
708
+ P(d(ae), {
709
+ size: "12",
710
+ style: ve([{ display: "flex" }, { justifyContent: a.buttonPlacement }])
318
711
  }, {
319
712
  default: b(() => [
320
- I(B(y.clearButtonText ?? "Reset"), 1)
713
+ a.showCancelButton ? (f(), V(d(j), {
714
+ key: 0,
715
+ onClick: Z
716
+ }, {
717
+ default: b(() => [
718
+ z(A(a.cancelButtonText ?? "Cancel"), 1)
719
+ ]),
720
+ _: 1
721
+ })) : O("", !0),
722
+ a.showClearButton ? (f(), V(d(j), {
723
+ key: 1,
724
+ onClick: W
725
+ }, {
726
+ default: b(() => [
727
+ z(A(a.clearButtonText ?? "Reset"), 1)
728
+ ]),
729
+ _: 1
730
+ })) : O("", !0),
731
+ (f(!0), $(T, null, K(a.customButtons, (g) => (f(), V(d(j), {
732
+ key: g.label,
733
+ onClick: g.action,
734
+ color: g.color ?? "primary"
735
+ }, {
736
+ default: b(() => [
737
+ z(A(g.label), 1)
738
+ ]),
739
+ _: 2
740
+ }, 1032, ["onClick", "color"]))), 128)),
741
+ P(d(j), { onClick: q }, {
742
+ default: b(() => [
743
+ z(A(a.submitButtonText ?? "Submit"), 1)
744
+ ]),
745
+ _: 1
746
+ })
321
747
  ]),
322
748
  _: 1
323
- })) : R("", !0),
324
- (p(!0), q(T, null, K(y.customButtons, (f) => (p(), V(v(Z), {
325
- key: f.label,
326
- onClick: f.action,
327
- color: f.color ?? "primary"
328
- }, {
329
- default: b(() => [
330
- I(B(f.label), 1)
331
- ]),
332
- _: 2
333
- }, 1032, ["onClick", "color"]))), 128)),
334
- A(v(Z), { onClick: d }, {
335
- default: b(() => [
336
- I(B(y.submitButtonText ?? "Submit"), 1)
337
- ]),
338
- _: 1
339
- })
749
+ }, 8, ["style"])
340
750
  ]),
341
751
  _: 1
342
- }, 8, ["style"])
752
+ }))
343
753
  ]),
344
754
  _: 1
345
755
  }))
346
- ]),
347
- _: 1
348
- }));
756
+ ]);
757
+ };
349
758
  }
350
- });
351
- function Ze(t) {
759
+ }), _t = /* @__PURE__ */ de(Ct, [["__scopeId", "data-v-3850cccc"]]);
760
+ function Vt(t) {
352
761
  return {
353
762
  applyValidationState: async (e) => {
354
- var l, a, i, s, h;
355
- (l = t.value) == null || l.$el.classList.remove("ion-invalid"), (a = t.value) == null || a.$el.classList.remove("ion-valid"), e ? (i = t.value) == null || i.$el.classList.add("ion-valid") : (s = t.value) == null || s.$el.classList.add("ion-invalid"), (h = t.value) == null || h.$el.classList.add("ion-touched");
763
+ var l, u, r, s, y;
764
+ (l = t.value) == null || l.$el.classList.remove("ion-invalid"), (u = t.value) == null || u.$el.classList.remove("ion-valid"), e ? (r = t.value) == null || r.$el.classList.add("ion-valid") : (s = t.value) == null || s.$el.classList.add("ion-invalid"), (y = t.value) == null || y.$el.classList.add("ion-touched");
356
765
  },
357
766
  resetValidationState: () => {
358
767
  var e, l;
@@ -360,87 +769,87 @@ function Ze(t) {
360
769
  }
361
770
  };
362
771
  }
363
- function Q(t, u, n, e, l) {
364
- const { applyValidationState: a, resetValidationState: i } = Ze(t);
772
+ function ue(t, o, n, e, l) {
773
+ const { applyValidationState: u, resetValidationState: r } = Vt(t);
365
774
  async function s() {
366
- if (u.value.required && !n.value)
367
- return u.value.error = "This field is required", !1;
775
+ if (o.value.required && !n.value)
776
+ return o.value.error = "This field is required", !1;
368
777
  if (l) {
369
- const o = await l(n.value);
370
- if (typeof o == "string")
371
- return u.value.error = o, !1;
372
- if (o === !1)
778
+ const i = await l(n.value);
779
+ if (typeof i == "string")
780
+ return o.value.error = i, !1;
781
+ if (i === !1)
373
782
  return !1;
374
783
  }
375
- if (u.value.validation) {
376
- const o = await u.value.validation(n.value, e == null ? void 0 : e.value);
377
- if (o && o.length)
378
- return u.value.error = o.join(), !1;
784
+ if (o.value.validation) {
785
+ const i = await o.value.validation(n.value, e == null ? void 0 : e.value);
786
+ if (i && i.length)
787
+ return o.value.error = i.join(), !1;
379
788
  }
380
789
  return !0;
381
790
  }
382
- async function h() {
383
- const o = await s();
384
- o && (u.value.error = "", u.value.value = n.value), await a(o);
791
+ async function y() {
792
+ const i = await s();
793
+ i && (o.value.error = "", o.value.value = n.value), await u(i);
385
794
  }
386
- function c() {
387
- i(), u.value.error = "";
795
+ function p() {
796
+ r(), o.value.error = "";
388
797
  }
389
- function r(o = "") {
390
- n.value = o, u.value.error = "", u.value.value = o;
798
+ function c(i = "") {
799
+ n.value = i, o.value.error = "", o.value.value = i;
391
800
  }
392
- function d() {
393
- return u.value.error ? [u.value.error] : [];
801
+ function v() {
802
+ return o.value.error ? [o.value.error] : [];
394
803
  }
395
804
  return {
396
805
  isValid: s,
397
- onValueUpdate: h,
398
- onFocus: c,
399
- onReset: r,
400
- getErrors: d,
401
- applyValidationState: a,
402
- resetValidationState: i
806
+ onValueUpdate: y,
807
+ onFocus: p,
808
+ onReset: c,
809
+ getErrors: v,
810
+ applyValidationState: u,
811
+ resetValidationState: r
403
812
  };
404
813
  }
405
- function Je(t) {
406
- const u = w(() => !!t.value.label), n = w(() => !!t.value.required), e = w(() => t.value.label || "");
814
+ function bt(t) {
815
+ const o = S(() => !!t.value.label), n = S(() => !!t.value.required), e = S(() => t.value.label || "");
407
816
  return {
408
- showLabel: u,
817
+ showLabel: o,
409
818
  showRequired: n,
410
819
  labelText: e
411
820
  };
412
821
  }
413
- const re = /* @__PURE__ */ F({
822
+ const ye = /* @__PURE__ */ U({
414
823
  __name: "InputLabel",
415
824
  props: {
416
825
  model: {}
417
826
  },
418
827
  setup(t) {
419
- const u = t, { showLabel: n, showRequired: e, labelText: l } = Je(be(u, "model"));
420
- return (a, i) => v(n) ? (p(), V(v(H), {
828
+ const o = t, { showLabel: n, showRequired: e, labelText: l } = bt(Oe(o, "model"));
829
+ return (u, r) => d(n) ? (f(), V(d(Y), {
421
830
  key: 0,
422
831
  slot: "label",
423
832
  class: "input-label"
424
833
  }, {
425
834
  default: b(() => [
426
- I(B(v(l)) + " ", 1),
427
- v(e) ? (p(), V(v(Oe), {
835
+ z(A(d(l)) + " ", 1),
836
+ d(e) ? (f(), V(d(Re), {
428
837
  key: 0,
429
838
  color: "danger"
430
839
  }, {
431
- default: b(() => i[0] || (i[0] = [
432
- I("*")
840
+ default: b(() => r[0] || (r[0] = [
841
+ z("*")
433
842
  ])),
434
843
  _: 1,
435
844
  __: [0]
436
- })) : R("", !0)
845
+ })) : O("", !0)
437
846
  ]),
438
847
  _: 1
439
- })) : R("", !0);
848
+ })) : O("", !0);
440
849
  }
441
- }), X = /* @__PURE__ */ F({
850
+ }), se = /* @__PURE__ */ U({
442
851
  __name: "BaseInput",
443
- props: /* @__PURE__ */ z({
852
+ props: /* @__PURE__ */ N({
444
853
  schema: {},
445
854
  type: {}
446
855
  }, {
@@ -448,31 +857,31 @@ const re = /* @__PURE__ */ F({
448
857
  modelModifiers: {}
449
858
  }),
450
859
  emits: ["update:modelValue"],
451
- setup(t, { expose: u }) {
452
- const n = t, e = $(t, "modelValue"), l = C(null), a = C(e.value.value), i = w(() => n.schema), { isValid: s, onValueUpdate: h, onFocus: c, onReset: r, getErrors: d } = Q(
860
+ setup(t, { expose: o }) {
861
+ const n = t, e = G(t, "modelValue"), l = E(null), u = E(e.value.value), r = S(() => n.schema), { isValid: s, onValueUpdate: y, onFocus: p, onReset: c, getErrors: v } = ue(
453
862
  l,
454
863
  e,
455
- a,
456
- i
457
- ), o = w(() => {
458
- if (e.value.pattern) return Ne(e.value.pattern);
864
+ u,
865
+ r
866
+ ), i = S(() => {
867
+ if (e.value.pattern) return We(e.value.pattern);
459
868
  });
460
- return S(
869
+ return I(
461
870
  () => e.value.value,
462
- (m) => a.value = m
463
- ), u({
464
- onValueUpdate: h,
465
- onReset: r,
466
- getErrors: d,
871
+ (m) => u.value = m
872
+ ), o({
873
+ onValueUpdate: y,
874
+ onReset: c,
875
+ getErrors: v,
467
876
  isValid: s
468
- }), (m, y) => {
469
- var f;
470
- const _ = _e("maskito");
471
- return xe((p(), V(v(ve), {
877
+ }), (m, C) => {
878
+ var w;
879
+ const x = Ee("maskito");
880
+ return xe((f(), V(d(Ve), {
472
881
  ref_key: "inputRef",
473
882
  ref: l,
474
- modelValue: a.value,
475
- "onUpdate:modelValue": y[0] || (y[0] = (O) => a.value = O),
883
+ modelValue: u.value,
884
+ "onUpdate:modelValue": C[0] || (C[0] = (R) => u.value = R),
476
885
  "clear-input": !0,
477
886
  fill: e.value.fill ?? "solid",
478
887
  "label-placement": e.value.labelPlacement ?? "stacked",
@@ -480,7 +889,7 @@ const re = /* @__PURE__ */ F({
480
889
  required: e.value.required,
481
890
  "error-text": e.value.error,
482
891
  autofocus: e.value.autoFocus,
483
- placeholder: ((f = o.value) == null ? void 0 : f.placeholder) ?? e.value.placeholder,
892
+ placeholder: ((w = i.value) == null ? void 0 : w.placeholder) ?? e.value.placeholder,
484
893
  disabled: e.value.disabled,
485
894
  counter: e.value.counter,
486
895
  min: e.value.min,
@@ -488,53 +897,53 @@ const re = /* @__PURE__ */ F({
488
897
  "max-length": e.value.maxLength,
489
898
  "min-length": e.value.minLength,
490
899
  pattern: e.value.pattern,
491
- onIonFocus: v(c),
492
- onIonChange: v(h),
493
- onIonBlur: v(h)
900
+ onIonFocus: d(p),
901
+ onIonChange: d(y),
902
+ onIonBlur: d(y)
494
903
  }, {
495
904
  default: b(() => [
496
- A(re, { model: e.value }, null, 8, ["model"]),
497
- e.value.prefix ? (p(), V(v(H), {
905
+ P(ye, { model: e.value }, null, 8, ["model"]),
906
+ e.value.prefix ? (f(), V(d(Y), {
498
907
  key: 0,
499
908
  slot: "start"
500
909
  }, {
501
910
  default: b(() => [
502
- I(B(e.value.prefix), 1)
911
+ z(A(e.value.prefix), 1)
503
912
  ]),
504
913
  _: 1
505
- })) : R("", !0),
506
- e.value.suffix ? (p(), V(v(H), {
914
+ })) : O("", !0),
915
+ e.value.suffix ? (f(), V(d(Y), {
507
916
  key: 1,
508
917
  slot: "end"
509
918
  }, {
510
919
  default: b(() => [
511
- I(B(e.value.suffix), 1)
920
+ z(A(e.value.suffix), 1)
512
921
  ]),
513
922
  _: 1
514
- })) : R("", !0),
515
- m.type === "password" ? (p(), V(v(Ee), {
923
+ })) : O("", !0),
924
+ m.type === "password" ? (f(), V(d(Ae), {
516
925
  key: 2,
517
926
  slot: "end"
518
- })) : R("", !0)
927
+ })) : O("", !0)
519
928
  ]),
520
929
  _: 1
521
930
  }, 8, ["modelValue", "fill", "label-placement", "type", "required", "error-text", "autofocus", "placeholder", "disabled", "counter", "min", "max", "max-length", "min-length", "pattern", "onIonFocus", "onIonChange", "onIonBlur"])), [
522
- [_, o.value]
931
+ [x, i.value]
523
932
  ]);
524
933
  };
525
934
  }
526
- }), Qe = /* @__PURE__ */ F({
935
+ }), kt = /* @__PURE__ */ U({
527
936
  __name: "TextInput",
528
- props: /* @__PURE__ */ z({
937
+ props: /* @__PURE__ */ N({
529
938
  schema: {}
530
939
  }, {
531
940
  modelValue: { type: Object, default: {} },
532
941
  modelModifiers: {}
533
942
  }),
534
943
  emits: ["update:modelValue"],
535
- setup(t, { expose: u }) {
536
- const n = $(t, "modelValue"), e = C(null);
537
- return u({
944
+ setup(t, { expose: o }) {
945
+ const n = G(t, "modelValue"), e = E(null);
946
+ return o({
538
947
  onReset: () => {
539
948
  var l;
540
949
  return (l = e.value) == null ? void 0 : l.onReset();
@@ -544,30 +953,30 @@ const re = /* @__PURE__ */ F({
544
953
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
545
954
  },
546
955
  getErrors: () => {
547
- var l, a;
548
- return ((a = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : a.call(l)) ?? [];
956
+ var l, u;
957
+ return ((u = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : u.call(l)) ?? [];
549
958
  }
550
- }), (l, a) => (p(), V(X, {
959
+ }), (l, u) => (f(), V(se, {
551
960
  modelValue: n.value,
552
- "onUpdate:modelValue": a[0] || (a[0] = (i) => n.value = i),
961
+ "onUpdate:modelValue": u[0] || (u[0] = (r) => n.value = r),
553
962
  type: "text",
554
963
  schema: l.schema,
555
964
  ref_key: "inputRef",
556
965
  ref: e
557
966
  }, null, 8, ["modelValue", "schema"]));
558
967
  }
559
- }), Xe = /* @__PURE__ */ F({
968
+ }), St = /* @__PURE__ */ U({
560
969
  __name: "DateInput",
561
- props: /* @__PURE__ */ z({
970
+ props: /* @__PURE__ */ N({
562
971
  schema: {}
563
972
  }, {
564
973
  modelValue: { type: Object, default: {} },
565
974
  modelModifiers: {}
566
975
  }),
567
976
  emits: ["update:modelValue"],
568
- setup(t, { expose: u }) {
569
- const n = $(t, "modelValue"), e = C(null);
570
- return u({
977
+ setup(t, { expose: o }) {
978
+ const n = G(t, "modelValue"), e = E(null);
979
+ return o({
571
980
  onValueUpdate: () => {
572
981
  var l;
573
982
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
@@ -577,30 +986,30 @@ const re = /* @__PURE__ */ F({
577
986
  return (l = e.value) == null ? void 0 : l.onReset();
578
987
  },
579
988
  getErrors: () => {
580
- var l, a;
581
- return ((a = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : a.call(l)) ?? [];
989
+ var l, u;
990
+ return ((u = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : u.call(l)) ?? [];
582
991
  }
583
- }), (l, a) => (p(), V(X, {
992
+ }), (l, u) => (f(), V(se, {
584
993
  modelValue: n.value,
585
- "onUpdate:modelValue": a[0] || (a[0] = (i) => n.value = i),
994
+ "onUpdate:modelValue": u[0] || (u[0] = (r) => n.value = r),
586
995
  type: n.value.enableTime ? "datetime-local" : "date",
587
996
  schema: l.schema,
588
997
  ref_key: "inputRef",
589
998
  ref: e
590
999
  }, null, 8, ["modelValue", "type", "schema"]));
591
1000
  }
592
- }), Ye = /* @__PURE__ */ F({
1001
+ }), wt = /* @__PURE__ */ U({
593
1002
  __name: "NumberInput",
594
- props: /* @__PURE__ */ z({
1003
+ props: /* @__PURE__ */ N({
595
1004
  schema: {}
596
1005
  }, {
597
1006
  modelValue: { type: Object, default: {} },
598
1007
  modelModifiers: {}
599
1008
  }),
600
1009
  emits: ["update:modelValue"],
601
- setup(t, { expose: u }) {
602
- const n = $(t, "modelValue"), e = C(null);
603
- return u({
1010
+ setup(t, { expose: o }) {
1011
+ const n = G(t, "modelValue"), e = E(null);
1012
+ return o({
604
1013
  onReset: () => {
605
1014
  var l;
606
1015
  return (l = e.value) == null ? void 0 : l.onReset();
@@ -610,30 +1019,30 @@ const re = /* @__PURE__ */ F({
610
1019
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
611
1020
  },
612
1021
  getErrors: () => {
613
- var l, a;
614
- return ((a = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : a.call(l)) ?? [];
1022
+ var l, u;
1023
+ return ((u = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : u.call(l)) ?? [];
615
1024
  }
616
- }), (l, a) => (p(), V(X, {
1025
+ }), (l, u) => (f(), V(se, {
617
1026
  modelValue: n.value,
618
- "onUpdate:modelValue": a[0] || (a[0] = (i) => n.value = i),
1027
+ "onUpdate:modelValue": u[0] || (u[0] = (r) => n.value = r),
619
1028
  type: "number",
620
1029
  schema: l.schema,
621
1030
  ref_key: "inputRef",
622
1031
  ref: e
623
1032
  }, null, 8, ["modelValue", "schema"]));
624
1033
  }
625
- }), et = /* @__PURE__ */ F({
1034
+ }), Ot = /* @__PURE__ */ U({
626
1035
  __name: "EmailInput",
627
- props: /* @__PURE__ */ z({
1036
+ props: /* @__PURE__ */ N({
628
1037
  schema: {}
629
1038
  }, {
630
1039
  modelValue: { type: Object, default: {} },
631
1040
  modelModifiers: {}
632
1041
  }),
633
1042
  emits: ["update:modelValue"],
634
- setup(t, { expose: u }) {
635
- const n = $(t, "modelValue"), e = C(null);
636
- return u({
1043
+ setup(t, { expose: o }) {
1044
+ const n = G(t, "modelValue"), e = E(null);
1045
+ return o({
637
1046
  onReset: () => {
638
1047
  var l;
639
1048
  return (l = e.value) == null ? void 0 : l.onReset();
@@ -643,30 +1052,30 @@ const re = /* @__PURE__ */ F({
643
1052
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
644
1053
  },
645
1054
  getErrors: () => {
646
- var l, a;
647
- return ((a = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : a.call(l)) ?? [];
1055
+ var l, u;
1056
+ return ((u = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : u.call(l)) ?? [];
648
1057
  }
649
- }), (l, a) => (p(), V(X, {
1058
+ }), (l, u) => (f(), V(se, {
650
1059
  modelValue: n.value,
651
- "onUpdate:modelValue": a[0] || (a[0] = (i) => n.value = i),
1060
+ "onUpdate:modelValue": u[0] || (u[0] = (r) => n.value = r),
652
1061
  type: "email",
653
1062
  schema: l.schema,
654
1063
  ref_key: "inputRef",
655
1064
  ref: e
656
1065
  }, null, 8, ["modelValue", "schema"]));
657
1066
  }
658
- }), tt = /* @__PURE__ */ F({
1067
+ }), Et = /* @__PURE__ */ U({
659
1068
  __name: "PasswordInput",
660
- props: /* @__PURE__ */ z({
1069
+ props: /* @__PURE__ */ N({
661
1070
  schema: {}
662
1071
  }, {
663
1072
  modelValue: { type: Object, default: {} },
664
1073
  modelModifiers: {}
665
1074
  }),
666
1075
  emits: ["update:modelValue"],
667
- setup(t, { expose: u }) {
668
- const n = $(t, "modelValue"), e = C(null);
669
- return u({
1076
+ setup(t, { expose: o }) {
1077
+ const n = G(t, "modelValue"), e = E(null);
1078
+ return o({
670
1079
  onReset: () => {
671
1080
  var l;
672
1081
  return (l = e.value) == null ? void 0 : l.onReset();
@@ -676,21 +1085,21 @@ const re = /* @__PURE__ */ F({
676
1085
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
677
1086
  },
678
1087
  getErrors: () => {
679
- var l, a;
680
- return ((a = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : a.call(l)) ?? [];
1088
+ var l, u;
1089
+ return ((u = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : u.call(l)) ?? [];
681
1090
  }
682
- }), (l, a) => (p(), V(X, {
1091
+ }), (l, u) => (f(), V(se, {
683
1092
  modelValue: n.value,
684
- "onUpdate:modelValue": a[0] || (a[0] = (i) => n.value = i),
1093
+ "onUpdate:modelValue": u[0] || (u[0] = (r) => n.value = r),
685
1094
  type: "password",
686
1095
  schema: l.schema,
687
1096
  ref_key: "inputRef",
688
1097
  ref: e
689
1098
  }, null, 8, ["modelValue", "schema"]));
690
1099
  }
691
- }), lt = /* @__PURE__ */ F({
1100
+ }), xt = /* @__PURE__ */ U({
692
1101
  __name: "SelectInput",
693
- props: /* @__PURE__ */ z({
1102
+ props: /* @__PURE__ */ N({
694
1103
  schema: Object,
695
1104
  type: String,
696
1105
  formId: String
@@ -699,54 +1108,54 @@ const re = /* @__PURE__ */ F({
699
1108
  modelModifiers: {}
700
1109
  }),
701
1110
  emits: ["update:modelValue"],
702
- setup(t, { expose: u }) {
703
- const n = t, e = $(t, "modelValue"), l = C(null), a = C(null), i = C(!1), s = C([]), h = C(""), c = C(1), r = w(() => e.value.interface ?? "popover"), d = w(() => e.value.optionsPlacement === "top" ? "top" : "bottom"), o = w(() => s.value.filter((g) => !!g.isChecked)), m = w(() => !h.value && ae(o.value) && !i.value ? e.value.placeholder ?? "Select an option" : "");
704
- S([h, () => e.value.options], N, {
1111
+ setup(t, { expose: o }) {
1112
+ const n = t, e = G(t, "modelValue"), l = E(null), u = E(null), r = E(!1), s = E([]), y = E(""), p = E(1), c = S(() => e.value.interface ?? "popover"), v = S(() => e.value.optionsPlacement === "top" ? "top" : "bottom"), i = S(() => s.value.filter((a) => !!a.isChecked)), m = S(() => !y.value && me(i.value) && !r.value ? e.value.placeholder ?? "Select an option" : "");
1113
+ I([y, () => e.value.options], M, {
705
1114
  immediate: !0,
706
1115
  deep: !0
707
- }), S(() => e.value.value, ge, { immediate: !0, deep: !0 }), S(
708
- () => !e.value.dependsOn || !n.schema ? null : (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).map((x) => {
1116
+ }), I(() => e.value.value, _, { immediate: !0, deep: !0 }), I(
1117
+ () => !e.value.dependsOn || !n.schema ? null : (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).map((h) => {
709
1118
  var k;
710
- return (k = n.schema[x]) == null ? void 0 : k.value;
1119
+ return (k = n.schema[h]) == null ? void 0 : k.value;
711
1120
  }),
712
- async (g, x) => {
713
- g && x && !J(g, x) && (y(), s.value = [], await N());
1121
+ async (a, h) => {
1122
+ a && h && !oe(a, h) && (C(), s.value = [], await M());
714
1123
  },
715
1124
  { deep: !0 }
716
1125
  );
717
- function y() {
718
- e.value.error = "", h.value = "", c.value = 1, e.value.value = e.value.multiple ? [] : "", Ge(s.value);
1126
+ function C() {
1127
+ e.value.error = "", y.value = "", p.value = 1, e.value.value = e.value.multiple ? [] : "", Ze(s.value);
719
1128
  }
720
- function _(g) {
721
- if (g.isChecked) return ce(g, s.value);
722
- e.value.multiple ? D(g, s.value) : (y(), D(g, s.value), P()), h.value = "";
1129
+ function x(a) {
1130
+ if (a.isChecked) return _e(a, s.value);
1131
+ e.value.multiple ? X(a, s.value) : (C(), X(a, s.value), L()), y.value = "";
723
1132
  }
724
- function f() {
725
- switch (r.value) {
1133
+ function w() {
1134
+ switch (c.value) {
726
1135
  case "action-sheet":
727
- O();
1136
+ R();
728
1137
  break;
729
1138
  case "alert":
730
- E();
1139
+ F();
731
1140
  break;
732
1141
  case "popover":
733
1142
  default:
734
- i.value = !0;
1143
+ r.value = !0;
735
1144
  break;
736
1145
  }
737
1146
  }
738
- async function O() {
739
- if (await N(), e.value.multiple) {
740
- i.value = !0;
1147
+ async function R() {
1148
+ if (await M(), e.value.multiple) {
1149
+ r.value = !0;
741
1150
  return;
742
1151
  }
743
- await (await Ie.create({
1152
+ await (await Be.create({
744
1153
  header: e.value.label || "Select an option",
745
1154
  buttons: [
746
- ...s.value.map((x) => ({
747
- text: x.label,
748
- cssClass: x.isChecked ? "selected-option" : "",
749
- handler: () => (_(x), !1)
1155
+ ...s.value.map((h) => ({
1156
+ text: h.label,
1157
+ cssClass: h.isChecked ? "selected-option" : "",
1158
+ handler: () => (x(h), !1)
750
1159
  })),
751
1160
  {
752
1161
  text: "Cancel",
@@ -755,17 +1164,17 @@ const re = /* @__PURE__ */ F({
755
1164
  ]
756
1165
  })).present();
757
1166
  }
758
- async function E() {
759
- await N();
760
- const g = s.value.map((k) => ({
1167
+ async function F() {
1168
+ await M();
1169
+ const a = s.value.map((k) => ({
761
1170
  label: k.label,
762
1171
  type: e.value.multiple ? "checkbox" : "radio",
763
1172
  value: k,
764
1173
  checked: k.isChecked
765
1174
  }));
766
- await (await Fe.create({
1175
+ await (await Pe.create({
767
1176
  header: e.value.label || "Select an option",
768
- inputs: g,
1177
+ inputs: a,
769
1178
  buttons: [
770
1179
  {
771
1180
  text: "Cancel",
@@ -775,89 +1184,89 @@ const re = /* @__PURE__ */ F({
775
1184
  text: "OK",
776
1185
  handler: (k) => {
777
1186
  if (e.value.multiple)
778
- s.value.forEach((U) => ce(U, s.value)), k.forEach((U) => {
779
- const G = s.value.find((Y) => Y.value === U.value);
780
- G && D(G, s.value);
1187
+ s.value.forEach((g) => _e(g, s.value)), k.forEach((g) => {
1188
+ const D = s.value.find((H) => H.value === g.value);
1189
+ D && X(D, s.value);
781
1190
  });
782
1191
  else {
783
- y();
784
- const U = s.value.find((G) => G.value === k.value);
785
- U && D(U, s.value);
1192
+ C();
1193
+ const g = s.value.find((D) => D.value === k.value);
1194
+ g && X(g, s.value);
786
1195
  }
787
- P();
1196
+ L();
788
1197
  }
789
1198
  }
790
1199
  ]
791
1200
  })).present();
792
1201
  }
793
- async function L() {
794
- if (e.value.required && ae(o.value))
1202
+ async function q() {
1203
+ if (e.value.required && me(i.value))
795
1204
  return "This field is required";
796
1205
  if (e.value.validation) {
797
- const g = await e.value.validation(o.value, n == null ? void 0 : n.schema);
798
- if (g && g.length)
799
- return g.join();
1206
+ const a = await e.value.validation(i.value, n == null ? void 0 : n.schema);
1207
+ if (a && a.length)
1208
+ return a.join();
800
1209
  }
801
1210
  return !0;
802
1211
  }
803
- const { onFocus: M, applyValidationState: j } = Q(
1212
+ const { onFocus: W, applyValidationState: J } = ue(
804
1213
  l,
805
1214
  e,
806
- w(() => e.value.multiple ? o.value : o.value[0]),
807
- w(() => n == null ? void 0 : n.schema),
808
- L
1215
+ S(() => e.value.multiple ? i.value : i.value[0]),
1216
+ S(() => n == null ? void 0 : n.schema),
1217
+ q
809
1218
  );
810
- function W(g) {
811
- var x;
812
- g.target === ((x = l.value) == null ? void 0 : x.$el) && (M(), r.value === "popover" && (i.value = !0));
1219
+ function Z(a) {
1220
+ var h;
1221
+ a.target === ((h = l.value) == null ? void 0 : h.$el) && (W(), c.value === "popover" && (r.value = !0));
813
1222
  }
814
- async function P(g) {
1223
+ async function L(a) {
815
1224
  var k;
816
- if ((k = g == null ? void 0 : g.relatedTarget) != null && k.closest(".suggestions-list")) return;
817
- i.value = !1;
818
- const x = await L();
819
- x === !0 ? (e.value.error = "", e.value.value = e.value.multiple ? o.value : o.value[0]) : e.value.error = typeof x == "string" ? x : "Validation failed", await j(x === !0);
1225
+ if ((k = a == null ? void 0 : a.relatedTarget) != null && k.closest(".suggestions-list")) return;
1226
+ r.value = !1;
1227
+ const h = await q();
1228
+ h === !0 ? (e.value.error = "", e.value.value = e.value.multiple ? i.value : i.value[0]) : e.value.error = typeof h == "string" ? h : "Validation failed", await J(h === !0);
820
1229
  }
821
- async function N() {
822
- const g = [];
1230
+ async function M() {
1231
+ const a = [];
823
1232
  if (typeof e.value.options == "function") {
824
- let x = {};
825
- e.value.dependsOn && n.schema && (x = (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).reduce(
826
- (G, Y) => {
827
- var se;
828
- return G[Y] = (se = n.schema[Y]) == null ? void 0 : se.value, G;
1233
+ let h = {};
1234
+ e.value.dependsOn && n.schema && (h = (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).reduce(
1235
+ (D, H) => {
1236
+ var Q;
1237
+ return D[H] = (Q = n.schema[H]) == null ? void 0 : Q.value, D;
829
1238
  },
830
1239
  {}
831
1240
  ));
832
- const k = await e.value.options(h.value, x);
833
- g.push(...k.filter((U) => !!U.label));
834
- } else Array.isArray(e.value.options) && g.push(...He(e.value.options, h.value));
835
- o.value.forEach((x) => D(x, g)), s.value = g;
1241
+ const k = await e.value.options(y.value, h);
1242
+ a.push(...k.filter((g) => !!g.label));
1243
+ } else Array.isArray(e.value.options) && a.push(...Je(e.value.options, y.value));
1244
+ i.value.forEach((h) => X(h, a)), s.value = a;
836
1245
  }
837
- function ge() {
838
- const g = e.value.value;
839
- g && (Array.isArray(g) ? g.forEach((x) => D(x, s.value)) : D(typeof g == "object" ? g : {
840
- value: g,
841
- label: g
1246
+ function _() {
1247
+ const a = e.value.value;
1248
+ a && (Array.isArray(a) ? a.forEach((h) => X(h, s.value)) : X(typeof a == "object" ? a : {
1249
+ value: a,
1250
+ label: a
842
1251
  }, s.value));
843
1252
  }
844
- return oe(() => {
845
- N();
846
- }), u({
847
- onValueUpdate: P,
848
- onReset: y,
1253
+ return ge(() => {
1254
+ M();
1255
+ }), o({
1256
+ onValueUpdate: L,
1257
+ onReset: C,
849
1258
  getErrors: () => e.value.error ? [e.value.error] : []
850
- }), (g, x) => (p(), q("div", {
1259
+ }), (a, h) => (f(), $("div", {
851
1260
  class: "autocomplete-container",
852
- onFocusout: P,
1261
+ onFocusout: L,
853
1262
  ref_key: "containerRef",
854
- ref: a
1263
+ ref: u
855
1264
  }, [
856
- A(v(ve), {
1265
+ P(d(Ve), {
857
1266
  ref_key: "inputRef",
858
1267
  ref: l,
859
- modelValue: h.value,
860
- "onUpdate:modelValue": x[0] || (x[0] = (k) => h.value = k),
1268
+ modelValue: y.value,
1269
+ "onUpdate:modelValue": h[0] || (h[0] = (k) => y.value = k),
861
1270
  fill: e.value.fill ?? "solid",
862
1271
  "label-placement": e.value.labelPlacement ?? "stacked",
863
1272
  type: t.type ?? "text",
@@ -867,23 +1276,23 @@ const re = /* @__PURE__ */ F({
867
1276
  placeholder: m.value,
868
1277
  disabled: e.value.disabled,
869
1278
  counter: e.value.counter,
870
- onIonFocus: W,
1279
+ onIonFocus: Z,
871
1280
  debounce: 300,
872
- onClick: f
1281
+ onClick: w
873
1282
  }, {
874
1283
  default: b(() => [
875
- A(re, { model: e.value }, null, 8, ["model"]),
876
- e.value.multiple ? (p(), V(v(H), {
1284
+ P(ye, { model: e.value }, null, 8, ["model"]),
1285
+ e.value.multiple ? (f(), V(d(Y), {
877
1286
  key: 0,
878
1287
  style: { width: "fit-content" },
879
1288
  slot: "start"
880
1289
  }, {
881
1290
  default: b(() => [
882
- (p(!0), q(T, null, K(o.value, (k, U) => (p(), V(v(we), { key: U }, {
1291
+ (f(!0), $(T, null, K(i.value, (k, g) => (f(), V(d($e), { key: g }, {
883
1292
  default: b(() => [
884
- A(v(H), null, {
1293
+ P(d(Y), null, {
885
1294
  default: b(() => [
886
- I(B(k.label), 1)
1295
+ z(A(k.label), 1)
887
1296
  ]),
888
1297
  _: 2
889
1298
  }, 1024)
@@ -892,7 +1301,7 @@ const re = /* @__PURE__ */ F({
892
1301
  }, 1024))), 128))
893
1302
  ]),
894
1303
  _: 1
895
- })) : (p(), V(v(H), {
1304
+ })) : (f(), V(d(Y), {
896
1305
  key: 1,
897
1306
  slot: "start",
898
1307
  class: "ion-no-wrap"
@@ -900,44 +1309,44 @@ const re = /* @__PURE__ */ F({
900
1309
  default: b(() => {
901
1310
  var k;
902
1311
  return [
903
- I(B(((k = o.value[0]) == null ? void 0 : k.label) ?? ""), 1)
1312
+ z(A(((k = i.value[0]) == null ? void 0 : k.label) ?? ""), 1)
904
1313
  ];
905
1314
  }),
906
1315
  _: 1
907
1316
  })),
908
- A(v(ee), {
1317
+ P(d(ce), {
909
1318
  slot: "end",
910
- icon: v(qe)
1319
+ icon: d(Te)
911
1320
  }, null, 8, ["icon"]),
912
- o.value.length > 0 || h.value ? (p(), V(v(ee), {
1321
+ i.value.length > 0 || y.value ? (f(), V(d(ce), {
913
1322
  key: 2,
914
1323
  slot: "end",
915
- icon: v(ze),
916
- onClick: y,
1324
+ icon: d(qe),
1325
+ onClick: C,
917
1326
  style: { "z-index": "999999" }
918
- }, null, 8, ["icon"])) : R("", !0)
1327
+ }, null, 8, ["icon"])) : O("", !0)
919
1328
  ]),
920
1329
  _: 1
921
1330
  }, 8, ["modelValue", "fill", "label-placement", "type", "required", "error-text", "autofocus", "placeholder", "disabled", "counter"]),
922
- i.value && s.value.length > 0 && r.value === "popover" ? (p(), V(v(Re), {
1331
+ r.value && s.value.length > 0 && c.value === "popover" ? (f(), V(d(Fe), {
923
1332
  key: 0,
924
- class: ke(["suggestions-list", d.value])
1333
+ class: ne(["suggestions-list", v.value])
925
1334
  }, {
926
1335
  default: b(() => [
927
- (p(!0), q(T, null, K(s.value, (k) => (p(), V(v(Ae), {
1336
+ (f(!0), $(T, null, K(s.value, (k) => (f(), V(d(ze), {
928
1337
  button: "",
929
1338
  key: k.label,
930
- onClick: (U) => _(k)
1339
+ onClick: (g) => x(k)
931
1340
  }, {
932
1341
  default: b(() => [
933
- e.value.multiple ? (p(), V(v(fe), {
1342
+ e.value.multiple ? (f(), V(d(be), {
934
1343
  key: 0,
935
1344
  slot: "start",
936
1345
  checked: k.isChecked
937
- }, null, 8, ["checked"])) : R("", !0),
938
- A(v(H), null, {
1346
+ }, null, 8, ["checked"])) : O("", !0),
1347
+ P(d(Y), null, {
939
1348
  default: b(() => [
940
- I(B(k.label), 1)
1349
+ z(A(k.label), 1)
941
1350
  ]),
942
1351
  _: 2
943
1352
  }, 1024)
@@ -946,42 +1355,37 @@ const re = /* @__PURE__ */ F({
946
1355
  }, 1032, ["onClick"]))), 128))
947
1356
  ]),
948
1357
  _: 1
949
- }, 8, ["class"])) : R("", !0)
1358
+ }, 8, ["class"])) : O("", !0)
950
1359
  ], 544));
951
1360
  }
952
- }), he = (t, u) => {
953
- const n = t.__vccOpts || t;
954
- for (const [e, l] of u)
955
- n[e] = l;
956
- return n;
957
- }, at = /* @__PURE__ */ he(lt, [["__scopeId", "data-v-4766dec2"]]), nt = /* @__PURE__ */ F({
1361
+ }), Rt = /* @__PURE__ */ de(xt, [["__scopeId", "data-v-4766dec2"]]), At = /* @__PURE__ */ U({
958
1362
  __name: "TextAreaInput",
959
- props: /* @__PURE__ */ z({
1363
+ props: /* @__PURE__ */ N({
960
1364
  schema: {}
961
1365
  }, {
962
1366
  modelValue: { type: Object, default: {} },
963
1367
  modelModifiers: {}
964
1368
  }),
965
1369
  emits: ["update:modelValue"],
966
- setup(t, { expose: u }) {
967
- const n = t, e = $(t, "modelValue"), l = C(null), a = C(e.value.value), i = w(() => n.schema), { onValueUpdate: s, onFocus: h, onReset: c, getErrors: r } = Q(
1370
+ setup(t, { expose: o }) {
1371
+ const n = t, e = G(t, "modelValue"), l = E(null), u = E(e.value.value), r = S(() => n.schema), { onValueUpdate: s, onFocus: y, onReset: p, getErrors: c } = ue(
968
1372
  l,
969
1373
  e,
970
- a,
971
- i
1374
+ u,
1375
+ r
972
1376
  );
973
- return S(
1377
+ return I(
974
1378
  () => e.value.value,
975
- (d) => a.value = d
976
- ), u({
977
- onReset: c,
1379
+ (v) => u.value = v
1380
+ ), o({
1381
+ onReset: p,
978
1382
  onValueUpdate: s,
979
- getErrors: r
980
- }), (d, o) => (p(), V(v(Ue), {
1383
+ getErrors: c
1384
+ }), (v, i) => (f(), V(d(Ie), {
981
1385
  ref_key: "inputRef",
982
1386
  ref: l,
983
- modelValue: a.value,
984
- "onUpdate:modelValue": o[0] || (o[0] = (m) => a.value = m),
1387
+ modelValue: u.value,
1388
+ "onUpdate:modelValue": i[0] || (i[0] = (m) => u.value = m),
985
1389
  "clear-input": !0,
986
1390
  fill: e.value.fill ?? "solid",
987
1391
  "label-placement": e.value.labelPlacement ?? "stacked",
@@ -999,22 +1403,22 @@ const re = /* @__PURE__ */ F({
999
1403
  "max-length": e.value.maxLength,
1000
1404
  "min-length": e.value.minLength,
1001
1405
  pattern: e.value.pattern,
1002
- onIonFocus: v(h),
1003
- onIonChange: v(s),
1004
- onIonBlur: v(s)
1406
+ onIonFocus: d(y),
1407
+ onIonChange: d(s),
1408
+ onIonBlur: d(s)
1005
1409
  }, {
1006
1410
  default: b(() => [
1007
- A(re, { model: e.value }, null, 8, ["model"])
1411
+ P(ye, { model: e.value }, null, 8, ["model"])
1008
1412
  ]),
1009
1413
  _: 1
1010
1414
  }, 8, ["modelValue", "fill", "label-placement", "required", "error-text", "autofocus", "placeholder", "disabled", "counter", "min", "max", "rows", "cols", "auto-grow", "max-length", "min-length", "pattern", "onIonFocus", "onIonChange", "onIonBlur"]));
1011
1415
  }
1012
- }), ut = {
1416
+ }), $t = {
1013
1417
  class: "ion-margin-end",
1014
1418
  style: { "flex-grow": "1" }
1015
- }, ot = { style: { display: "flex", "justify-content": "flex-end" } }, rt = /* @__PURE__ */ F({
1419
+ }, Ft = { style: { display: "flex", "justify-content": "flex-end" } }, zt = /* @__PURE__ */ U({
1016
1420
  __name: "RepeatInput",
1017
- props: /* @__PURE__ */ z({
1421
+ props: /* @__PURE__ */ N({
1018
1422
  schema: {},
1019
1423
  data: {},
1020
1424
  computedData: {}
@@ -1023,200 +1427,200 @@ const re = /* @__PURE__ */ F({
1023
1427
  modelModifiers: {}
1024
1428
  }),
1025
1429
  emits: ["update:modelValue"],
1026
- setup(t, { expose: u }) {
1027
- const n = $(t, "modelValue"), e = C([]), { dynamicRefs: l, resetForm: a, getFormErrors: i, updateFormValues: s } = ye(), h = w(() => e.value.map((y, _) => ({
1028
- label: `Set ${_ + 1}`,
1029
- value: _,
1030
- other: Object.entries(y).reduce(
1031
- (f, [O, E]) => (f[O] = E.value, f),
1430
+ setup(t, { expose: o }) {
1431
+ const n = G(t, "modelValue"), e = E([]), { dynamicRefs: l, resetForm: u, getFormErrors: r, updateFormValues: s } = we(), y = S(() => e.value.map((C, x) => ({
1432
+ label: `Set ${x + 1}`,
1433
+ value: x,
1434
+ other: Object.entries(C).reduce(
1435
+ (w, [R, F]) => (w[R] = F.value, w),
1032
1436
  {}
1033
1437
  )
1034
1438
  })));
1035
- S(
1036
- h,
1037
- (y) => {
1038
- n.value.value = y;
1439
+ I(
1440
+ y,
1441
+ (C) => {
1442
+ n.value.value = C;
1039
1443
  },
1040
1444
  { deep: !0, immediate: !0 }
1041
- ), oe(c);
1042
- function c() {
1043
- n.value.children && e.value.push(ue(n.value.children));
1445
+ ), ge(p);
1446
+ function p() {
1447
+ n.value.children && e.value.push(he(n.value.children));
1044
1448
  }
1045
- function r(y) {
1046
- e.value.splice(y, 1);
1449
+ function c(C) {
1450
+ e.value.splice(C, 1);
1047
1451
  }
1048
- function d() {
1049
- a();
1452
+ function v() {
1453
+ u();
1050
1454
  }
1051
- function o() {
1052
- return i();
1455
+ function i() {
1456
+ return r();
1053
1457
  }
1054
1458
  async function m() {
1055
1459
  await s();
1056
1460
  }
1057
- return u({
1461
+ return o({
1058
1462
  onValueUpdate: m,
1059
- onReset: d,
1060
- getErrors: o
1061
- }), (y, _) => (p(!0), q(T, null, K(e.value, (f, O) => (p(), q("div", {
1463
+ onReset: v,
1464
+ getErrors: i
1465
+ }), (C, x) => (f(!0), $(T, null, K(e.value, (w, R) => (f(), $("div", {
1062
1466
  class: "repeat-input-wrapper",
1063
- key: O
1467
+ key: R
1064
1468
  }, [
1065
- ie("div", ut, [
1066
- A(v(te), null, {
1469
+ B("div", $t, [
1470
+ P(d(le), null, {
1067
1471
  default: b(() => [
1068
- (p(!0), q(T, null, K(Object.keys(f), (E) => {
1069
- var L, M, j, W, P;
1070
- return p(), q(T, null, [
1071
- v(ne)(f[E], y.data, y.computedData) ? (p(), V(v(le), {
1072
- key: `${O}-${E}`,
1073
- size: ((L = f[E].grid) == null ? void 0 : L.xs) ?? "12",
1074
- "size-sm": (M = f[E].grid) == null ? void 0 : M.sm,
1075
- "size-md": (j = f[E].grid) == null ? void 0 : j.md,
1076
- "size-lg": (W = f[E].grid) == null ? void 0 : W.lg,
1077
- "size-xl": (P = f[E].grid) == null ? void 0 : P.xl,
1472
+ (f(!0), $(T, null, K(Object.keys(w), (F) => {
1473
+ var q, W, J, Z, L;
1474
+ return f(), $(T, null, [
1475
+ d(ie)(w[F], C.data, C.computedData) ? (f(), V(d(ae), {
1476
+ key: `${R}-${F}`,
1477
+ size: ((q = w[F].grid) == null ? void 0 : q.xs) ?? "12",
1478
+ "size-sm": (W = w[F].grid) == null ? void 0 : W.sm,
1479
+ "size-md": (J = w[F].grid) == null ? void 0 : J.md,
1480
+ "size-lg": (Z = w[F].grid) == null ? void 0 : Z.lg,
1481
+ "size-xl": (L = w[F].grid) == null ? void 0 : L.xl,
1078
1482
  class: "ion-margin-bottom"
1079
1483
  }, {
1080
1484
  default: b(() => [
1081
- (p(), V(de(f[E].type), {
1082
- modelValue: f[E],
1083
- "onUpdate:modelValue": (N) => f[E] = N,
1084
- schema: f,
1085
- "ref-key": `${O}-${E}`,
1485
+ (f(), V(fe(w[F].type), {
1486
+ modelValue: w[F],
1487
+ "onUpdate:modelValue": (M) => w[F] = M,
1488
+ schema: w,
1489
+ "ref-key": `${R}-${F}`,
1086
1490
  ref_for: !0,
1087
1491
  ref_key: "dynamicRefs",
1088
1492
  ref: l
1089
1493
  }, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "ref-key"]))
1090
1494
  ]),
1091
1495
  _: 2
1092
- }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : R("", !0)
1496
+ }, 1032, ["size", "size-sm", "size-md", "size-lg", "size-xl"])) : O("", !0)
1093
1497
  ], 64);
1094
1498
  }), 256))
1095
1499
  ]),
1096
1500
  _: 2
1097
1501
  }, 1024)
1098
1502
  ]),
1099
- ie("div", ot, [
1100
- O === e.value.length - 1 ? (p(), V(v(Z), {
1503
+ B("div", Ft, [
1504
+ R === e.value.length - 1 ? (f(), V(d(j), {
1101
1505
  key: 0,
1102
- onClick: c,
1506
+ onClick: p,
1103
1507
  color: "primary"
1104
1508
  }, {
1105
1509
  default: b(() => [
1106
- A(v(ee), {
1510
+ P(d(ce), {
1107
1511
  slot: "icon-only",
1108
- icon: v($e)
1512
+ icon: d(Le)
1109
1513
  }, null, 8, ["icon"])
1110
1514
  ]),
1111
1515
  _: 1
1112
- })) : R("", !0),
1113
- e.value.length > 1 ? (p(), V(v(Z), {
1516
+ })) : O("", !0),
1517
+ e.value.length > 1 ? (f(), V(d(j), {
1114
1518
  key: 1,
1115
- onClick: (E) => r(O),
1519
+ onClick: (F) => c(R),
1116
1520
  color: "warning"
1117
1521
  }, {
1118
1522
  default: b(() => [
1119
- A(v(ee), {
1523
+ P(d(ce), {
1120
1524
  slot: "icon-only",
1121
- icon: v(Te)
1525
+ icon: d(Me)
1122
1526
  }, null, 8, ["icon"])
1123
1527
  ]),
1124
1528
  _: 2
1125
- }, 1032, ["onClick"])) : R("", !0)
1529
+ }, 1032, ["onClick"])) : O("", !0)
1126
1530
  ])
1127
1531
  ]))), 128));
1128
1532
  }
1129
- }), st = /* @__PURE__ */ he(rt, [["__scopeId", "data-v-060bdf58"]]), it = /* @__PURE__ */ F({
1533
+ }), Bt = /* @__PURE__ */ de(zt, [["__scopeId", "data-v-060bdf58"]]), Pt = /* @__PURE__ */ U({
1130
1534
  __name: "CheckboxInput",
1131
- props: /* @__PURE__ */ z({
1535
+ props: /* @__PURE__ */ N({
1132
1536
  schema: {}
1133
1537
  }, {
1134
1538
  modelValue: { type: Object, default: {} },
1135
1539
  modelModifiers: {}
1136
1540
  }),
1137
1541
  emits: ["update:modelValue"],
1138
- setup(t, { expose: u }) {
1139
- const n = t, e = $(t, "modelValue"), l = C(null), a = C(e.value.value), i = w(() => n.schema), s = w(() => me(e.value)), { onValueUpdate: h, onFocus: c, getErrors: r } = Q(l, e, a, i);
1140
- function d() {
1141
- a.value = !1, e.value.error = "", e.value.value = !1;
1542
+ setup(t, { expose: o }) {
1543
+ const n = t, e = G(t, "modelValue"), l = E(null), u = E(e.value.value), r = S(() => n.schema), s = S(() => Se(e.value)), { onValueUpdate: y, onFocus: p, getErrors: c } = ue(l, e, u, r);
1544
+ function v() {
1545
+ u.value = !1, e.value.error = "", e.value.value = !1;
1142
1546
  }
1143
- return S(
1547
+ return I(
1144
1548
  () => e.value.value,
1145
- (o) => a.value = o
1146
- ), u({
1147
- onValueUpdate: h,
1148
- onReset: d,
1149
- getErrors: r
1150
- }), (o, m) => (p(), V(v(fe), {
1151
- modelValue: a.value,
1152
- "onUpdate:modelValue": m[0] || (m[0] = (y) => a.value = y),
1549
+ (i) => u.value = i
1550
+ ), o({
1551
+ onValueUpdate: y,
1552
+ onReset: v,
1553
+ getErrors: c
1554
+ }), (i, m) => (f(), V(d(be), {
1555
+ modelValue: u.value,
1556
+ "onUpdate:modelValue": m[0] || (m[0] = (C) => u.value = C),
1153
1557
  ref_key: "inputRef",
1154
1558
  ref: l,
1155
1559
  required: e.value.required,
1156
1560
  "error-text": e.value.error,
1157
1561
  disabled: e.value.disabled,
1158
- onIonFocus: v(c),
1159
- onIonChange: v(h),
1160
- onIonBlur: v(h)
1562
+ onIonFocus: d(p),
1563
+ onIonChange: d(y),
1564
+ onIonBlur: d(y)
1161
1565
  }, {
1162
1566
  default: b(() => [
1163
- I(B(s.value), 1)
1567
+ z(A(s.value), 1)
1164
1568
  ]),
1165
1569
  _: 1
1166
1570
  }, 8, ["modelValue", "required", "error-text", "disabled", "onIonFocus", "onIonChange", "onIonBlur"]));
1167
1571
  }
1168
- }), ct = /* @__PURE__ */ F({
1572
+ }), It = /* @__PURE__ */ U({
1169
1573
  __name: "RadioInput",
1170
- props: /* @__PURE__ */ z({
1574
+ props: /* @__PURE__ */ N({
1171
1575
  schema: {}
1172
1576
  }, {
1173
1577
  modelValue: { type: Object, default: {} },
1174
1578
  modelModifiers: {}
1175
1579
  }),
1176
1580
  emits: ["update:modelValue"],
1177
- setup(t, { expose: u }) {
1178
- const n = t, e = $(t, "modelValue"), l = C(null), a = C(e.value.value), i = w(() => n.schema), s = C([]), h = w(() => me(e.value)), { onValueUpdate: c, onFocus: r, getErrors: d } = Q(l, e, a, i);
1179
- function o() {
1180
- e.value.error = "", a.value = void 0, e.value.value = void 0;
1581
+ setup(t, { expose: o }) {
1582
+ const n = t, e = G(t, "modelValue"), l = E(null), u = E(e.value.value), r = S(() => n.schema), s = E([]), y = S(() => Se(e.value)), { onValueUpdate: p, onFocus: c, getErrors: v } = ue(l, e, u, r);
1583
+ function i() {
1584
+ e.value.error = "", u.value = void 0, e.value.value = void 0;
1181
1585
  }
1182
- function m(_, f) {
1183
- return _.value === f.value;
1586
+ function m(x, w) {
1587
+ return x.value === w.value;
1184
1588
  }
1185
- async function y() {
1589
+ async function C() {
1186
1590
  typeof e.value.options == "function" ? s.value = await e.value.options() : s.value = e.value.options;
1187
1591
  }
1188
- return S(
1592
+ return I(
1189
1593
  () => e.value.value,
1190
- (_) => a.value = _
1191
- ), u({
1192
- onValueUpdate: c,
1193
- onReset: o,
1194
- getErrors: d
1195
- }), oe(y), (_, f) => (p(), V(v(Be), {
1196
- modelValue: a.value,
1197
- "onUpdate:modelValue": f[0] || (f[0] = (O) => a.value = O),
1594
+ (x) => u.value = x
1595
+ ), o({
1596
+ onValueUpdate: p,
1597
+ onReset: i,
1598
+ getErrors: v
1599
+ }), ge(C), (x, w) => (f(), V(d(Ue), {
1600
+ modelValue: u.value,
1601
+ "onUpdate:modelValue": w[0] || (w[0] = (R) => u.value = R),
1198
1602
  ref_key: "inputRef",
1199
1603
  ref: l,
1200
1604
  required: e.value.required,
1201
- "helper-text": h.value,
1605
+ "helper-text": y.value,
1202
1606
  "error-text": e.value.error,
1203
1607
  disabled: e.value.disabled,
1204
1608
  compareWith: m,
1205
1609
  "allow-empty-selection": !e.value.required,
1206
- onIonFocus: v(r),
1207
- onIonChange: v(c),
1208
- onIonBlur: v(c)
1610
+ onIonFocus: d(c),
1611
+ onIonChange: d(p),
1612
+ onIonBlur: d(p)
1209
1613
  }, {
1210
1614
  default: b(() => [
1211
- (p(!0), q(T, null, K(s.value, (O) => (p(), V(v(Se), {
1212
- key: O.value,
1213
- value: O,
1615
+ (f(!0), $(T, null, K(s.value, (R) => (f(), V(d(De), {
1616
+ key: R.value,
1617
+ value: R,
1214
1618
  disabled: e.value.disabled,
1215
1619
  "label-placement": "end",
1216
1620
  justify: "start"
1217
1621
  }, {
1218
1622
  default: b(() => [
1219
- I(B(O.label), 1)
1623
+ z(A(R.label), 1)
1220
1624
  ]),
1221
1625
  _: 2
1222
1626
  }, 1032, ["value", "disabled"]))), 128))
@@ -1225,69 +1629,70 @@ const re = /* @__PURE__ */ F({
1225
1629
  }, 8, ["modelValue", "required", "helper-text", "error-text", "disabled", "allow-empty-selection", "onIonFocus", "onIonChange", "onIonBlur"]));
1226
1630
  }
1227
1631
  });
1228
- function mt(t, u, n) {
1229
- const e = C({}), l = C({});
1230
- function a(r, d, o) {
1231
- l.value[r] = o, d.forEach((m) => {
1232
- var y;
1233
- (y = e.value)[m] ?? (y[m] = []), e.value[m].includes(r) || e.value[m].push(r);
1234
- }), c(r);
1632
+ function Lt(t, o, n) {
1633
+ const e = E({}), l = E({});
1634
+ function u(c, v, i) {
1635
+ l.value[c] = i, v.forEach((m) => {
1636
+ var C;
1637
+ (C = e.value)[m] ?? (C[m] = []), e.value[m].includes(c) || e.value[m].push(c);
1638
+ }), p(c);
1235
1639
  }
1236
- function i(r) {
1237
- return Object.entries(e.value).filter(([, o]) => o.includes(r)).map(([o]) => o).reduce(
1238
- (o, m) => (o[m] = u.value[m] ?? n.value[m], o),
1640
+ function r(c) {
1641
+ return Object.entries(e.value).filter(([, i]) => i.includes(c)).map(([i]) => i).reduce(
1642
+ (i, m) => (i[m] = o.value[m] ?? n.value[m], i),
1239
1643
  {}
1240
1644
  );
1241
1645
  }
1242
- function s(r, d) {
1243
- return r ? Array.isArray(r) ? r.some((o) => d.some((m) => h(o, m.value))) : d.some((o) => h(r, o.value)) : !1;
1646
+ function s(c, v) {
1647
+ return c ? Array.isArray(c) ? c.some((i) => v.some((m) => y(i, m.value))) : v.some((i) => y(c, i.value)) : !1;
1244
1648
  }
1245
- function h(r, d) {
1246
- return typeof r == "object" && r !== null ? r.value === d : String(r) === String(d);
1649
+ function y(c, v) {
1650
+ return typeof c == "object" && c !== null ? c.value === v : String(c) === String(v);
1247
1651
  }
1248
- async function c(r, d) {
1249
- if (!l.value[r]) return;
1250
- const o = i(r), m = Object.keys(o);
1652
+ async function p(c, v) {
1653
+ if (!l.value[c]) return;
1654
+ const i = r(c), m = Object.keys(i);
1251
1655
  if (!(m.length === 0 || !m.every(
1252
- (_) => o[_] !== void 0 && o[_] !== null
1656
+ (x) => i[x] !== void 0 && i[x] !== null
1253
1657
  )))
1254
1658
  try {
1255
- const _ = l.value[r], f = await _(d, o);
1256
- if (!t.value[r]) return;
1257
- t.value[r].options = f;
1258
- const O = t.value[r].value;
1259
- if (!O) return;
1260
- s(O, f) || (t.value[r].value = t.value[r].multiple ? [] : "");
1261
- } catch (_) {
1262
- console.error(`Error loading options for ${r}:`, _);
1659
+ const x = l.value[c], w = await x(v, i);
1660
+ if (!t.value[c]) return;
1661
+ t.value[c].options = w;
1662
+ const R = t.value[c].value;
1663
+ if (!R) return;
1664
+ s(R, w) || (t.value[c].value = t.value[c].multiple ? [] : "");
1665
+ } catch (x) {
1666
+ console.error(`Error loading options for ${c}:`, x);
1263
1667
  }
1264
1668
  }
1265
- return S(
1266
- [u, n],
1669
+ return I(
1670
+ [o, n],
1267
1671
  () => {
1268
- Object.entries(e.value).forEach(([r, d]) => {
1269
- (u.value[r] !== void 0 || n.value[r] !== void 0) && d.forEach((o) => {
1270
- c(o);
1672
+ Object.entries(e.value).forEach(([c, v]) => {
1673
+ (o.value[c] !== void 0 || n.value[c] !== void 0) && v.forEach((i) => {
1674
+ p(i);
1271
1675
  });
1272
1676
  });
1273
1677
  },
1274
1678
  { deep: !0, immediate: !0 }
1275
1679
  ), {
1276
- registerDependency: a,
1277
- updateOptions: c
1680
+ registerDependency: u,
1681
+ updateOptions: p
1278
1682
  };
1279
1683
  }
1280
- const yt = {
1684
+ const Mt = {
1281
1685
  install(t) {
1282
- t.component("VForm", We), t.component("TextInput", Qe), t.component("DateInput", Xe), t.component("NumberInput", Ye), t.component("EmailInput", et), t.component("PasswordInput", tt), t.component("SelectInput", at), t.component("TextAreaInput", nt), t.component("RepeatInput", st), t.component("CheckboxInput", it), t.component("RadioInput", ct), t.directive("maskito", Le);
1686
+ t.component("VForm", _t), t.component("TextInput", kt), t.component("DateInput", St), t.component("NumberInput", wt), t.component("EmailInput", Ot), t.component("PasswordInput", Et), t.component("SelectInput", Rt), t.component("TextAreaInput", At), t.component("RepeatInput", Bt), t.component("CheckboxInput", Pt), t.component("RadioInput", It), t.directive("maskito", je);
1283
1687
  }
1284
1688
  };
1285
1689
  export {
1286
- yt as VForm,
1287
- yt as default,
1288
- Ke as useDataTransformation,
1289
- mt as useDependentOptions,
1290
- ye as useFormValidation,
1291
- Q as useInputValidation
1690
+ Mt as VForm,
1691
+ Mt as default,
1692
+ Qe as useDataTransformation,
1693
+ Lt as useDependentOptions,
1694
+ we as useFormValidation,
1695
+ ue as useInputValidation,
1696
+ Xe as useMultiStepForm
1292
1697
  };
1293
1698
  //# sourceMappingURL=index.es.js.map