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