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