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