@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/README.md +327 -16
- package/dist/components/inputs/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/CheckboxInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/RadioInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/RepeatInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/TextAreaInput.vue.d.ts.map +1 -1
- package/dist/components/vForm.vue.d.ts +1 -0
- package/dist/components/vForm.vue.d.ts.map +1 -1
- package/dist/composables/useMultiStepForm.d.ts +1 -2
- package/dist/composables/useMultiStepForm.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +797 -762
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +37 -11
- package/dist/types/index.d.ts.map +1 -1
- package/dist/vform.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { IonGrid as
|
|
3
|
-
import { chevronDown as
|
|
4
|
-
import { maskito as
|
|
5
|
-
function
|
|
6
|
-
return new Promise((
|
|
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
|
-
|
|
9
|
+
u(l);
|
|
10
10
|
});
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
const
|
|
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
|
-
},
|
|
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
|
|
24
|
-
const l =
|
|
25
|
-
return l[
|
|
23
|
+
function Ye(t, u) {
|
|
24
|
+
const l = Xe[t];
|
|
25
|
+
return l[u % l.length];
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
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
|
|
38
|
-
if (
|
|
39
|
-
const [, d] =
|
|
40
|
-
s = d || parseInt(
|
|
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(
|
|
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
|
-
|
|
52
|
+
u.push(Qe[o]), l += Ye(o, a++);
|
|
53
53
|
} else
|
|
54
|
-
|
|
54
|
+
u.push(o), l += o;
|
|
55
55
|
e++;
|
|
56
56
|
}
|
|
57
57
|
return {
|
|
58
|
-
mask:
|
|
58
|
+
mask: u,
|
|
59
59
|
placeholder: l,
|
|
60
|
-
elementPredicate:
|
|
60
|
+
elementPredicate: Je
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function
|
|
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
|
|
67
|
-
return typeof t.condition == "function" ? t.condition(
|
|
66
|
+
function Ve(t, u, l) {
|
|
67
|
+
return typeof t.condition == "function" ? t.condition(u, l) : !0;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
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) =>
|
|
74
|
-
const
|
|
73
|
+
return t.map((l) => Ce(l));
|
|
74
|
+
const u = {};
|
|
75
75
|
return Object.entries(t).forEach(([l, e]) => {
|
|
76
|
-
typeof e == "function" ?
|
|
77
|
-
}),
|
|
76
|
+
typeof e == "function" ? u[l] = e.bind(u) : u[l] = Ce(e);
|
|
77
|
+
}), u;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
return
|
|
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
|
|
83
|
-
const l =
|
|
84
|
-
l >= 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
|
|
87
|
-
const l =
|
|
88
|
-
l >= 0 && (
|
|
86
|
+
function tt(t, u) {
|
|
87
|
+
const l = Se(t, u);
|
|
88
|
+
l >= 0 && (u[l].isChecked = !1);
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
t.forEach((
|
|
92
|
-
|
|
90
|
+
function lt(t) {
|
|
91
|
+
t.forEach((u) => {
|
|
92
|
+
u.isChecked = !1;
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
97
|
-
(l) => JSON.stringify(l).toLowerCase().includes(
|
|
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
|
|
101
|
-
const
|
|
102
|
-
return
|
|
100
|
+
function Re(t) {
|
|
101
|
+
const u = t.label || "", l = t.required ? " *" : "";
|
|
102
|
+
return u + l;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
if (t ===
|
|
106
|
-
if (t == null ||
|
|
107
|
-
if (typeof t != "object") return t ===
|
|
108
|
-
if (Array.isArray(t) && Array.isArray(
|
|
109
|
-
return t.length !==
|
|
110
|
-
if (Array.isArray(t) !== Array.isArray(
|
|
111
|
-
const l = Object.keys(t), e = Object.keys(
|
|
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(
|
|
113
|
+
(a) => Object.prototype.hasOwnProperty.call(u, a) && de(t[a], u[a])
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function K(t) {
|
|
117
117
|
return t.type !== "FormSection";
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function nt(t) {
|
|
120
120
|
return t.type === "FormSection";
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
const t =
|
|
124
|
-
async function
|
|
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(
|
|
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:
|
|
162
|
+
isFormValid: u,
|
|
163
163
|
resetForm: l,
|
|
164
164
|
getFormErrors: e,
|
|
165
165
|
updateFormValues: a
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
const
|
|
170
|
-
() => Object.entries(t.value).reduce((d, [p, f]) => (
|
|
171
|
-
), l =
|
|
172
|
-
const
|
|
173
|
-
if (
|
|
174
|
-
const h =
|
|
175
|
-
if (h &&
|
|
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,
|
|
180
|
-
l.value[d][
|
|
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
|
-
!
|
|
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((
|
|
186
|
-
const
|
|
187
|
-
a(d,
|
|
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, [
|
|
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
|
|
195
|
-
Array.isArray(f[d]) ? o(d,
|
|
196
|
-
},
|
|
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
|
|
202
|
-
|
|
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
|
|
205
|
-
|
|
204
|
+
return q(
|
|
205
|
+
u,
|
|
206
206
|
(d, p = {}) => {
|
|
207
207
|
Object.keys(d).forEach((f) => {
|
|
208
|
-
|
|
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:
|
|
218
|
+
formData: u,
|
|
219
219
|
computedData: l
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
const
|
|
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
|
-
([
|
|
228
|
-
|
|
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 =
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
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
|
-
|
|
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
|
|
253
|
-
const m = t.steps.find((
|
|
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
|
|
257
|
-
const V =
|
|
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
|
|
258
|
+
const y = await V.validation(
|
|
262
259
|
l.value[V.id],
|
|
263
260
|
e.value[V.id]
|
|
264
261
|
);
|
|
265
|
-
|
|
262
|
+
y && m.push(...y);
|
|
266
263
|
}
|
|
267
264
|
return a.value[V.id] = m, m.length === 0;
|
|
268
265
|
}
|
|
269
|
-
async function
|
|
270
|
-
return V < 0 || V >=
|
|
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
|
|
273
|
-
return
|
|
269
|
+
async function ee() {
|
|
270
|
+
return f.value ? W(u.value + 1) : !1;
|
|
274
271
|
}
|
|
275
|
-
async function
|
|
276
|
-
return
|
|
272
|
+
async function X() {
|
|
273
|
+
return r.value ? W(u.value - 1) : !1;
|
|
277
274
|
}
|
|
278
|
-
function
|
|
279
|
-
|
|
280
|
-
|
|
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
|
|
280
|
+
async function j() {
|
|
284
281
|
let V = !0;
|
|
285
282
|
for (const m of t.steps)
|
|
286
283
|
if (m.validation) {
|
|
287
|
-
const
|
|
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] =
|
|
288
|
+
a.value[m.id] = y || [], y && y.length > 0 && (V = !1);
|
|
292
289
|
}
|
|
293
290
|
return V;
|
|
294
291
|
}
|
|
295
|
-
function
|
|
292
|
+
function N() {
|
|
296
293
|
return {
|
|
297
|
-
|
|
298
|
-
|
|
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:
|
|
306
|
-
currentStep:
|
|
300
|
+
currentStepIndex: u,
|
|
301
|
+
currentStep: g,
|
|
307
302
|
stepData: l,
|
|
308
303
|
stepComputedData: e,
|
|
309
304
|
stepValidationErrors: a,
|
|
310
305
|
// Computed
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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:
|
|
314
|
+
updateStepData: b,
|
|
321
315
|
updateStepComputedData: w,
|
|
322
|
-
clearStepData:
|
|
323
|
-
validateCurrentStep:
|
|
324
|
-
goToStep:
|
|
325
|
-
nextStep:
|
|
326
|
-
previousStep:
|
|
327
|
-
resetForm:
|
|
328
|
-
validateAllSteps:
|
|
329
|
-
getMultiStepFormData:
|
|
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
|
|
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
|
-
},
|
|
329
|
+
}, ft = {
|
|
336
330
|
key: 0,
|
|
337
331
|
class: "step-indicator__progress"
|
|
338
|
-
},
|
|
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:
|
|
349
|
-
const l = t, e =
|
|
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:
|
|
348
|
+
class: ne(["step-indicator", [`step-indicator--${s.position}`, { "step-indicator--clickable": s.allowNavigation }]])
|
|
355
349
|
}, [
|
|
356
|
-
|
|
357
|
-
(v(!0), $(M, null,
|
|
358
|
-
key:
|
|
359
|
-
class:
|
|
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
|
-
|
|
367
|
-
|
|
368
|
-
|
|
360
|
+
P("div", it, [
|
|
361
|
+
P("div", ct, [
|
|
362
|
+
P("span", null, F(d + 1), 1)
|
|
369
363
|
]),
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
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:
|
|
378
|
-
}, null, 2)) :
|
|
379
|
-
], 10,
|
|
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",
|
|
382
|
-
|
|
383
|
-
|
|
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:
|
|
379
|
+
style: _e({ width: `${a.value}%` })
|
|
386
380
|
}, null, 4)
|
|
387
381
|
]),
|
|
388
|
-
|
|
389
|
-
])) :
|
|
382
|
+
P("div", ht, " Step " + F(s.activeStepIndex + 1) + " of " + F(s.steps.length), 1)
|
|
383
|
+
])) : R("", !0)
|
|
390
384
|
], 2));
|
|
391
385
|
}
|
|
392
|
-
}),
|
|
386
|
+
}), ve = (t, u) => {
|
|
393
387
|
const l = t.__vccOpts || t;
|
|
394
|
-
for (const [e, a] of
|
|
388
|
+
for (const [e, a] of u)
|
|
395
389
|
l[e] = a;
|
|
396
390
|
return l;
|
|
397
|
-
},
|
|
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
|
-
},
|
|
401
|
-
key:
|
|
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
|
-
},
|
|
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:
|
|
420
|
-
const e = t, a = l, o =
|
|
421
|
-
|
|
422
|
-
() =>
|
|
423
|
-
(
|
|
424
|
-
|
|
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
|
-
),
|
|
428
|
-
[f,
|
|
429
|
-
([
|
|
430
|
-
o.value && n &&
|
|
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
|
-
),
|
|
427
|
+
), q(
|
|
434
428
|
() => e.schema,
|
|
435
|
-
(
|
|
436
|
-
if (!o.value &&
|
|
437
|
-
s.value =
|
|
438
|
-
for (const [
|
|
439
|
-
|
|
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
|
|
438
|
+
async function X() {
|
|
439
|
+
var c;
|
|
445
440
|
if (o.value && n) {
|
|
446
|
-
if (!await n.validateAllSteps()) return;
|
|
447
|
-
const
|
|
448
|
-
a("multi-step-submit",
|
|
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,
|
|
446
|
+
a("submit", f.value, r.value);
|
|
452
447
|
}
|
|
453
448
|
}
|
|
454
|
-
function
|
|
449
|
+
function Y() {
|
|
455
450
|
o.value && n ? n.resetForm() : p(), a("clear");
|
|
456
451
|
}
|
|
457
|
-
function
|
|
458
|
-
o.value && n &&
|
|
452
|
+
function j() {
|
|
453
|
+
o.value && n && b.value && n.clearStepData(b.value.id);
|
|
459
454
|
}
|
|
460
|
-
function
|
|
455
|
+
function N() {
|
|
461
456
|
o.value && n ? n.resetForm() : p(), a("cancel");
|
|
462
457
|
}
|
|
463
|
-
async function
|
|
458
|
+
async function V() {
|
|
459
|
+
var c;
|
|
464
460
|
if (n) {
|
|
465
|
-
|
|
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() &&
|
|
464
|
+
await n.nextStep() && b.value && a("step-change", S.value, b.value.id);
|
|
468
465
|
}
|
|
469
466
|
}
|
|
470
|
-
async function
|
|
471
|
-
n && await n.previousStep() &&
|
|
467
|
+
async function m() {
|
|
468
|
+
n && await n.previousStep() && b.value && a("step-change", S.value, b.value.id);
|
|
472
469
|
}
|
|
473
|
-
async function
|
|
470
|
+
async function y(c) {
|
|
471
|
+
var I;
|
|
474
472
|
if (n) {
|
|
475
|
-
if (
|
|
476
|
-
|
|
477
|
-
|
|
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
|
-
|
|
481
|
+
q(
|
|
481
482
|
f,
|
|
482
483
|
async () => {
|
|
483
|
-
var
|
|
484
|
-
for (const [
|
|
485
|
-
if (
|
|
486
|
-
const
|
|
487
|
-
|
|
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
|
|
496
|
-
|
|
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
|
|
499
|
-
resetForm:
|
|
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:
|
|
507
|
+
computedData: r.value
|
|
504
508
|
},
|
|
505
509
|
// Multi-step specific methods
|
|
506
|
-
nextStep:
|
|
507
|
-
previousStep:
|
|
508
|
-
goToStep:
|
|
509
|
-
getCurrentStep: () =>
|
|
510
|
-
getCurrentStepIndex: () =>
|
|
511
|
-
}), (
|
|
512
|
-
var
|
|
513
|
-
return v(), $("div",
|
|
514
|
-
o.value ? (v(), $("div",
|
|
515
|
-
|
|
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:
|
|
518
|
-
"active-step-index":
|
|
519
|
-
position:
|
|
520
|
-
"show-progress":
|
|
521
|
-
"allow-navigation":
|
|
522
|
-
onStepClick:
|
|
523
|
-
}, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) :
|
|
524
|
-
|
|
525
|
-
class:
|
|
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
|
-
|
|
531
|
+
c.multiStepConfig && c.multiStepConfig.stepPosition === "left" ? (v(), _(me, {
|
|
528
532
|
key: 0,
|
|
529
|
-
steps:
|
|
530
|
-
"active-step-index":
|
|
531
|
-
position:
|
|
532
|
-
"show-progress":
|
|
533
|
-
"allow-navigation":
|
|
534
|
-
onStepClick:
|
|
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"])) :
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
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: ((
|
|
548
|
-
"size-sm": (
|
|
549
|
-
"size-md": (
|
|
550
|
-
"size-lg": (
|
|
551
|
-
"size-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:
|
|
555
|
-
(v(),
|
|
556
|
-
modelValue: s.value[
|
|
557
|
-
"onUpdate:modelValue": (
|
|
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:
|
|
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"])) :
|
|
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
|
-
|
|
577
|
-
key:
|
|
583
|
+
})),
|
|
584
|
+
c.hideButtons ? R("", !0) : (v(), _(i(ce), {
|
|
585
|
+
key: 2,
|
|
578
586
|
class: "multi-step-buttons"
|
|
579
587
|
}, {
|
|
580
|
-
default:
|
|
581
|
-
|
|
588
|
+
default: k(() => [
|
|
589
|
+
T(i(ae), {
|
|
582
590
|
size: "12",
|
|
583
591
|
class: "button-container"
|
|
584
592
|
}, {
|
|
585
|
-
default:
|
|
586
|
-
|
|
587
|
-
|
|
593
|
+
default: k(() => [
|
|
594
|
+
P("div", Vt, [
|
|
595
|
+
W.value ? (v(), _(i(H), {
|
|
588
596
|
key: 0,
|
|
589
|
-
onClick:
|
|
597
|
+
onClick: m,
|
|
590
598
|
fill: "outline"
|
|
591
599
|
}, {
|
|
592
|
-
default:
|
|
593
|
-
|
|
600
|
+
default: k(() => I[0] || (I[0] = [
|
|
601
|
+
U(" Previous ")
|
|
594
602
|
])),
|
|
595
603
|
_: 1,
|
|
596
604
|
__: [0]
|
|
597
|
-
})) :
|
|
605
|
+
})) : R("", !0)
|
|
598
606
|
]),
|
|
599
|
-
|
|
600
|
-
|
|
607
|
+
P("div", Ct, [
|
|
608
|
+
c.showCancelButton ? (v(), _(i(H), {
|
|
601
609
|
key: 0,
|
|
602
|
-
onClick:
|
|
610
|
+
onClick: N,
|
|
603
611
|
fill: "outline"
|
|
604
612
|
}, {
|
|
605
|
-
default:
|
|
606
|
-
|
|
613
|
+
default: k(() => [
|
|
614
|
+
U(F(c.cancelButtonText ?? "Cancel"), 1)
|
|
607
615
|
]),
|
|
608
616
|
_: 1
|
|
609
|
-
})) :
|
|
610
|
-
|
|
617
|
+
})) : R("", !0),
|
|
618
|
+
c.showClearButton ? (v(), _(i(H), {
|
|
611
619
|
key: 1,
|
|
612
|
-
onClick:
|
|
620
|
+
onClick: j,
|
|
613
621
|
fill: "outline"
|
|
614
622
|
}, {
|
|
615
|
-
default:
|
|
616
|
-
|
|
623
|
+
default: k(() => [
|
|
624
|
+
U(F(c.clearButtonText ?? "Reset"), 1)
|
|
617
625
|
]),
|
|
618
626
|
_: 1
|
|
619
|
-
})) :
|
|
620
|
-
(v(!0), $(M, null,
|
|
621
|
-
key:
|
|
622
|
-
onClick:
|
|
623
|
-
color:
|
|
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:
|
|
626
|
-
|
|
633
|
+
default: k(() => [
|
|
634
|
+
U(F(x.label), 1)
|
|
627
635
|
]),
|
|
628
636
|
_: 2
|
|
629
637
|
}, 1032, ["onClick", "color"]))), 128))
|
|
630
638
|
]),
|
|
631
|
-
|
|
632
|
-
|
|
639
|
+
P("div", kt, [
|
|
640
|
+
A.value ? (v(), _(i(H), {
|
|
633
641
|
key: 0,
|
|
634
|
-
onClick:
|
|
642
|
+
onClick: V
|
|
635
643
|
}, {
|
|
636
|
-
default:
|
|
637
|
-
|
|
644
|
+
default: k(() => I[1] || (I[1] = [
|
|
645
|
+
U(" Next ")
|
|
638
646
|
])),
|
|
639
647
|
_: 1,
|
|
640
648
|
__: [1]
|
|
641
|
-
})) :
|
|
642
|
-
|
|
649
|
+
})) : R("", !0),
|
|
650
|
+
z.value ? (v(), _(i(H), {
|
|
643
651
|
key: 1,
|
|
644
|
-
onClick:
|
|
652
|
+
onClick: X
|
|
645
653
|
}, {
|
|
646
|
-
default:
|
|
647
|
-
|
|
654
|
+
default: k(() => [
|
|
655
|
+
U(F(c.submitButtonText ?? "Submit"), 1)
|
|
648
656
|
]),
|
|
649
657
|
_: 1
|
|
650
|
-
})) :
|
|
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
|
-
|
|
659
|
-
|
|
660
|
-
|
|
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:
|
|
670
|
+
style: _e({ width: `${ee.value}%` })
|
|
663
671
|
}, null, 4)
|
|
664
672
|
]),
|
|
665
|
-
|
|
666
|
-
])) :
|
|
673
|
+
P("div", xt, " Step " + F(S.value + 1) + " of " + F(w.value.length), 1)
|
|
674
|
+
])) : R("", !0)
|
|
667
675
|
]),
|
|
668
|
-
|
|
676
|
+
c.multiStepConfig && c.multiStepConfig.stepPosition === "right" ? (v(), _(me, {
|
|
669
677
|
key: 1,
|
|
670
|
-
steps:
|
|
671
|
-
"active-step-index":
|
|
672
|
-
position:
|
|
673
|
-
"show-progress":
|
|
674
|
-
"allow-navigation":
|
|
675
|
-
onStepClick:
|
|
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"])) :
|
|
685
|
+
}, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : R("", !0)
|
|
678
686
|
], 2),
|
|
679
|
-
|
|
687
|
+
c.multiStepConfig && c.multiStepConfig.stepPosition === "bottom" ? (v(), _(me, {
|
|
680
688
|
key: 1,
|
|
681
|
-
steps:
|
|
682
|
-
"active-step-index":
|
|
683
|
-
position:
|
|
684
|
-
"show-progress":
|
|
685
|
-
"allow-navigation":
|
|
686
|
-
onStepClick:
|
|
687
|
-
}, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) :
|
|
688
|
-
])) : (v(),
|
|
689
|
-
default:
|
|
690
|
-
|
|
691
|
-
default:
|
|
692
|
-
(v(!0), $(M, null,
|
|
693
|
-
var
|
|
694
|
-
return v(), $(M, { key:
|
|
695
|
-
|
|
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: ((
|
|
698
|
-
"size-sm": (
|
|
699
|
-
"size-md": (
|
|
700
|
-
"size-lg": (
|
|
701
|
-
"size-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:
|
|
705
|
-
(v(),
|
|
706
|
-
modelValue: s.value[
|
|
707
|
-
"onUpdate:modelValue": (
|
|
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:
|
|
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"])) :
|
|
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
|
-
|
|
724
|
-
default:
|
|
725
|
-
|
|
732
|
+
c.hideButtons ? R("", !0) : (v(), _(i(ce), { key: 0 }, {
|
|
733
|
+
default: k(() => [
|
|
734
|
+
T(i(ae), {
|
|
726
735
|
size: "12",
|
|
727
|
-
style:
|
|
736
|
+
style: _e([{ display: "flex" }, { justifyContent: c.buttonPlacement }])
|
|
728
737
|
}, {
|
|
729
|
-
default:
|
|
730
|
-
|
|
738
|
+
default: k(() => [
|
|
739
|
+
c.showCancelButton ? (v(), _(i(H), {
|
|
731
740
|
key: 0,
|
|
732
|
-
onClick:
|
|
741
|
+
onClick: N
|
|
733
742
|
}, {
|
|
734
|
-
default:
|
|
735
|
-
|
|
743
|
+
default: k(() => [
|
|
744
|
+
U(F(c.cancelButtonText ?? "Cancel"), 1)
|
|
736
745
|
]),
|
|
737
746
|
_: 1
|
|
738
|
-
})) :
|
|
739
|
-
|
|
747
|
+
})) : R("", !0),
|
|
748
|
+
c.showClearButton ? (v(), _(i(H), {
|
|
740
749
|
key: 1,
|
|
741
|
-
onClick:
|
|
750
|
+
onClick: Y
|
|
742
751
|
}, {
|
|
743
|
-
default:
|
|
744
|
-
|
|
752
|
+
default: k(() => [
|
|
753
|
+
U(F(c.clearButtonText ?? "Reset"), 1)
|
|
745
754
|
]),
|
|
746
755
|
_: 1
|
|
747
|
-
})) :
|
|
748
|
-
(v(!0), $(M, null,
|
|
749
|
-
key:
|
|
750
|
-
onClick:
|
|
751
|
-
color:
|
|
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:
|
|
754
|
-
|
|
762
|
+
default: k(() => [
|
|
763
|
+
U(F(x.label), 1)
|
|
755
764
|
]),
|
|
756
765
|
_: 2
|
|
757
766
|
}, 1032, ["onClick", "color"]))), 128)),
|
|
758
|
-
|
|
759
|
-
default:
|
|
760
|
-
|
|
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
|
-
}),
|
|
777
|
-
function
|
|
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,
|
|
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"), (
|
|
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
|
|
790
|
-
const { applyValidationState: o, resetValidationState: s } =
|
|
798
|
+
function pe(t, u, l, e, a) {
|
|
799
|
+
const { applyValidationState: o, resetValidationState: s } = It(t);
|
|
791
800
|
async function n() {
|
|
792
|
-
if (
|
|
793
|
-
return
|
|
801
|
+
if (u.value.required && !l.value)
|
|
802
|
+
return u.value.error = "This field is required", !1;
|
|
794
803
|
if (a) {
|
|
795
|
-
const
|
|
796
|
-
if (typeof
|
|
797
|
-
return
|
|
798
|
-
if (
|
|
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 (
|
|
802
|
-
const
|
|
803
|
-
if (
|
|
804
|
-
return
|
|
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
|
|
809
|
-
const
|
|
810
|
-
|
|
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(),
|
|
822
|
+
s(), u.value.error = "";
|
|
814
823
|
}
|
|
815
|
-
function p(
|
|
816
|
-
l.value =
|
|
824
|
+
function p(r = "") {
|
|
825
|
+
l.value = r, u.value.error = "", u.value.value = r;
|
|
817
826
|
}
|
|
818
827
|
function f() {
|
|
819
|
-
return
|
|
828
|
+
return u.value.error ? [u.value.error] : [];
|
|
820
829
|
}
|
|
821
830
|
return {
|
|
822
831
|
isValid: n,
|
|
823
|
-
onValueUpdate:
|
|
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
|
|
832
|
-
const
|
|
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:
|
|
843
|
+
showLabel: u,
|
|
835
844
|
showRequired: l,
|
|
836
845
|
labelText: e
|
|
837
846
|
};
|
|
838
847
|
}
|
|
839
|
-
const
|
|
848
|
+
const we = /* @__PURE__ */ L({
|
|
840
849
|
__name: "InputLabel",
|
|
841
850
|
props: {
|
|
842
851
|
model: {}
|
|
843
852
|
},
|
|
844
853
|
setup(t) {
|
|
845
|
-
const
|
|
846
|
-
return (o, s) =>
|
|
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:
|
|
852
|
-
|
|
853
|
-
|
|
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:
|
|
858
|
-
|
|
866
|
+
default: k(() => s[0] || (s[0] = [
|
|
867
|
+
U("*")
|
|
859
868
|
])),
|
|
860
869
|
_: 1,
|
|
861
870
|
__: [0]
|
|
862
|
-
})) :
|
|
871
|
+
})) : R("", !0)
|
|
863
872
|
]),
|
|
864
873
|
_: 1
|
|
865
|
-
})) :
|
|
874
|
+
})) : R("", !0);
|
|
866
875
|
}
|
|
867
|
-
}),
|
|
876
|
+
}), fe = /* @__PURE__ */ L({
|
|
868
877
|
__name: "BaseInput",
|
|
869
|
-
props: /* @__PURE__ */
|
|
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:
|
|
878
|
-
const l = t, e =
|
|
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
|
-
),
|
|
884
|
-
if (e.value.pattern) return
|
|
892
|
+
), r = E(() => {
|
|
893
|
+
if (e.value.pattern) return et(e.value.pattern);
|
|
885
894
|
});
|
|
886
|
-
return
|
|
895
|
+
return q(
|
|
887
896
|
() => e.value.value,
|
|
888
897
|
(h) => o.value = h
|
|
889
|
-
),
|
|
890
|
-
onValueUpdate:
|
|
898
|
+
), u({
|
|
899
|
+
onValueUpdate: g,
|
|
891
900
|
onReset: p,
|
|
892
901
|
getErrors: f,
|
|
893
902
|
isValid: n
|
|
894
|
-
}), (h,
|
|
903
|
+
}), (h, S) => {
|
|
895
904
|
var w;
|
|
896
|
-
const
|
|
897
|
-
return
|
|
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":
|
|
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 =
|
|
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
|
-
|
|
918
|
-
|
|
919
|
-
|
|
926
|
+
style: { width: "100%" },
|
|
927
|
+
onIonFocus: i(d),
|
|
928
|
+
onIonChange: i(g),
|
|
929
|
+
onIonBlur: i(g)
|
|
920
930
|
}, {
|
|
921
|
-
default:
|
|
922
|
-
|
|
923
|
-
e.value.prefix ? (v(),
|
|
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:
|
|
928
|
-
|
|
937
|
+
default: k(() => [
|
|
938
|
+
U(F(e.value.prefix), 1)
|
|
929
939
|
]),
|
|
930
940
|
_: 1
|
|
931
|
-
})) :
|
|
932
|
-
e.value.suffix ? (v(),
|
|
941
|
+
})) : R("", !0),
|
|
942
|
+
e.value.suffix ? (v(), _(i(le), {
|
|
933
943
|
key: 1,
|
|
934
944
|
slot: "end"
|
|
935
945
|
}, {
|
|
936
|
-
default:
|
|
937
|
-
|
|
946
|
+
default: k(() => [
|
|
947
|
+
U(F(e.value.suffix), 1)
|
|
938
948
|
]),
|
|
939
949
|
_: 1
|
|
940
|
-
})) :
|
|
941
|
-
h.type === "password" ? (v(),
|
|
950
|
+
})) : R("", !0),
|
|
951
|
+
h.type === "password" ? (v(), _(i(Ue), {
|
|
942
952
|
key: 2,
|
|
943
953
|
slot: "end"
|
|
944
|
-
})) :
|
|
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
|
-
[
|
|
958
|
+
[b, r.value]
|
|
949
959
|
]);
|
|
950
960
|
};
|
|
951
961
|
}
|
|
952
|
-
}),
|
|
962
|
+
}), zt = /* @__PURE__ */ L({
|
|
953
963
|
__name: "TextInput",
|
|
954
|
-
props: /* @__PURE__ */
|
|
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:
|
|
962
|
-
const l =
|
|
963
|
-
return
|
|
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(),
|
|
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
|
-
}),
|
|
995
|
+
}), At = /* @__PURE__ */ L({
|
|
986
996
|
__name: "DateInput",
|
|
987
|
-
props: /* @__PURE__ */
|
|
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:
|
|
995
|
-
const l =
|
|
996
|
-
return
|
|
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(),
|
|
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
|
-
}),
|
|
1028
|
+
}), Ft = /* @__PURE__ */ L({
|
|
1019
1029
|
__name: "NumberInput",
|
|
1020
|
-
props: /* @__PURE__ */
|
|
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:
|
|
1028
|
-
const l =
|
|
1029
|
-
return
|
|
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(),
|
|
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
|
-
}),
|
|
1061
|
+
}), $t = /* @__PURE__ */ L({
|
|
1052
1062
|
__name: "EmailInput",
|
|
1053
|
-
props: /* @__PURE__ */
|
|
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:
|
|
1061
|
-
const l =
|
|
1062
|
-
return
|
|
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(),
|
|
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
|
-
}),
|
|
1094
|
+
}), Pt = /* @__PURE__ */ L({
|
|
1085
1095
|
__name: "PasswordInput",
|
|
1086
|
-
props: /* @__PURE__ */
|
|
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:
|
|
1094
|
-
const l =
|
|
1095
|
-
return
|
|
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(),
|
|
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
|
-
}),
|
|
1127
|
+
}), Bt = /* @__PURE__ */ L({
|
|
1118
1128
|
__name: "SelectInput",
|
|
1119
|
-
props: /* @__PURE__ */
|
|
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:
|
|
1129
|
-
const l = t, e =
|
|
1130
|
-
|
|
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
|
-
}),
|
|
1134
|
-
() => !e.value.dependsOn || !l.schema ? null : (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).map((
|
|
1135
|
-
const
|
|
1136
|
-
return
|
|
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,
|
|
1139
|
-
m &&
|
|
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
|
|
1144
|
-
e.value.error = "",
|
|
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
|
|
1147
|
-
const
|
|
1148
|
-
if (
|
|
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
|
|
1151
|
-
|
|
1160
|
+
const C = Se(m, e.value.value);
|
|
1161
|
+
C >= 0 && e.value.value.splice(C, 1);
|
|
1152
1162
|
}
|
|
1153
|
-
n.value[
|
|
1163
|
+
n.value[y].isChecked = !1;
|
|
1154
1164
|
} else
|
|
1155
|
-
e.value.multiple ||
|
|
1156
|
-
|
|
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
|
-
|
|
1171
|
+
z();
|
|
1162
1172
|
break;
|
|
1163
1173
|
case "alert":
|
|
1164
|
-
|
|
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
|
|
1173
|
-
if (await
|
|
1182
|
+
async function z() {
|
|
1183
|
+
if (await N(), e.value.multiple) {
|
|
1174
1184
|
s.value = !0;
|
|
1175
1185
|
return;
|
|
1176
1186
|
}
|
|
1177
|
-
await (await
|
|
1187
|
+
await (await qe.create({
|
|
1178
1188
|
header: e.value.label || "Select an option",
|
|
1179
1189
|
buttons: [
|
|
1180
|
-
...n.value.map((
|
|
1181
|
-
text:
|
|
1182
|
-
cssClass:
|
|
1183
|
-
handler: () => (
|
|
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
|
|
1193
|
-
await
|
|
1194
|
-
const m = n.value.map((
|
|
1195
|
-
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:
|
|
1198
|
-
checked:
|
|
1207
|
+
value: C,
|
|
1208
|
+
checked: C.isChecked
|
|
1199
1209
|
}));
|
|
1200
|
-
await (await
|
|
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: (
|
|
1220
|
+
handler: (C) => {
|
|
1211
1221
|
if (e.value.multiple)
|
|
1212
|
-
n.value.forEach((
|
|
1213
|
-
const
|
|
1214
|
-
|
|
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
|
-
|
|
1218
|
-
const
|
|
1219
|
-
|
|
1227
|
+
S();
|
|
1228
|
+
const D = n.value.find((c) => c.value === C.value);
|
|
1229
|
+
D && te(D, n.value);
|
|
1220
1230
|
}
|
|
1221
|
-
|
|
1231
|
+
j();
|
|
1222
1232
|
}
|
|
1223
1233
|
}
|
|
1224
1234
|
]
|
|
1225
1235
|
})).present();
|
|
1226
1236
|
}
|
|
1227
|
-
async function
|
|
1228
|
-
if (e.value.required &&
|
|
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(
|
|
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:
|
|
1247
|
+
const { onFocus: ee, applyValidationState: X } = pe(
|
|
1238
1248
|
a,
|
|
1239
1249
|
e,
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1250
|
+
E(() => e.value.multiple ? r.value : r.value[0]),
|
|
1251
|
+
E(() => l == null ? void 0 : l.schema),
|
|
1252
|
+
W
|
|
1243
1253
|
);
|
|
1244
|
-
function
|
|
1245
|
-
var
|
|
1246
|
-
m.target === ((
|
|
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
|
|
1249
|
-
var
|
|
1250
|
-
if ((
|
|
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
|
|
1253
|
-
|
|
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
|
|
1265
|
+
async function N() {
|
|
1256
1266
|
const m = [];
|
|
1257
1267
|
if (typeof e.value.options == "function") {
|
|
1258
|
-
let
|
|
1268
|
+
let y = {};
|
|
1259
1269
|
if (e.value.dependsOn && l.schema) {
|
|
1260
|
-
const
|
|
1261
|
-
let
|
|
1262
|
-
if (
|
|
1263
|
-
(
|
|
1264
|
-
const
|
|
1265
|
-
return
|
|
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
|
-
),
|
|
1269
|
-
const
|
|
1270
|
-
m.push(...
|
|
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
|
|
1274
|
-
m.push(...
|
|
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(...
|
|
1277
|
-
|
|
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
|
|
1283
|
-
m.forEach((
|
|
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
|
-
|
|
1295
|
+
te(m, n.value);
|
|
1286
1296
|
else {
|
|
1287
|
-
const
|
|
1288
|
-
|
|
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
|
-
|
|
1303
|
+
j();
|
|
1294
1304
|
}
|
|
1295
1305
|
}
|
|
1296
|
-
return
|
|
1297
|
-
await
|
|
1298
|
-
}),
|
|
1299
|
-
onValueUpdate:
|
|
1300
|
-
onReset:
|
|
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,
|
|
1312
|
+
}), (m, y) => (v(), $("div", {
|
|
1303
1313
|
class: "autocomplete-container",
|
|
1304
|
-
onFocusout:
|
|
1314
|
+
onFocusout: j,
|
|
1305
1315
|
ref_key: "containerRef",
|
|
1306
1316
|
ref: o
|
|
1307
1317
|
}, [
|
|
1308
|
-
|
|
1318
|
+
T(i(Ee), {
|
|
1309
1319
|
ref_key: "inputRef",
|
|
1310
1320
|
ref: a,
|
|
1311
|
-
modelValue:
|
|
1312
|
-
"onUpdate:modelValue":
|
|
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
|
-
|
|
1333
|
+
onIonFocus: Y,
|
|
1334
|
+
onClick: w,
|
|
1335
|
+
style: { width: "100%" }
|
|
1325
1336
|
}, {
|
|
1326
|
-
default:
|
|
1327
|
-
|
|
1328
|
-
e.value.multiple ? (v(),
|
|
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:
|
|
1334
|
-
(v(!0), $(M, null,
|
|
1335
|
-
default:
|
|
1336
|
-
|
|
1337
|
-
default:
|
|
1338
|
-
|
|
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(),
|
|
1358
|
+
})) : (v(), _(i(le), {
|
|
1348
1359
|
key: 1,
|
|
1349
1360
|
slot: "start",
|
|
1350
1361
|
class: "ion-no-wrap"
|
|
1351
1362
|
}, {
|
|
1352
|
-
default:
|
|
1353
|
-
var
|
|
1363
|
+
default: k(() => {
|
|
1364
|
+
var C;
|
|
1354
1365
|
return [
|
|
1355
|
-
|
|
1366
|
+
U(F(((C = r.value[0]) == null ? void 0 : C.label) ?? ""), 1)
|
|
1356
1367
|
];
|
|
1357
1368
|
}),
|
|
1358
1369
|
_: 1
|
|
1359
1370
|
})),
|
|
1360
|
-
|
|
1371
|
+
T(i(ge), {
|
|
1361
1372
|
slot: "end",
|
|
1362
|
-
icon:
|
|
1373
|
+
icon: i(Ge)
|
|
1363
1374
|
}, null, 8, ["icon"]),
|
|
1364
|
-
|
|
1375
|
+
r.value.length > 0 || g.value ? (v(), _(i(ge), {
|
|
1365
1376
|
key: 2,
|
|
1366
1377
|
slot: "end",
|
|
1367
|
-
icon:
|
|
1368
|
-
onClick:
|
|
1378
|
+
icon: i(He),
|
|
1379
|
+
onClick: S,
|
|
1369
1380
|
style: { "z-index": "999999" }
|
|
1370
|
-
}, null, 8, ["icon"])) :
|
|
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(),
|
|
1385
|
+
s.value && n.value.length > 0 && p.value === "popover" ? (v(), _(i(Te), {
|
|
1375
1386
|
key: 0,
|
|
1376
|
-
class:
|
|
1387
|
+
class: ne(["suggestions-list", f.value])
|
|
1377
1388
|
}, {
|
|
1378
|
-
default:
|
|
1379
|
-
(v(!0), $(M, null,
|
|
1389
|
+
default: k(() => [
|
|
1390
|
+
(v(!0), $(M, null, Q(n.value, (C) => (v(), _(i(Oe), {
|
|
1380
1391
|
button: "",
|
|
1381
|
-
key:
|
|
1382
|
-
onClick: (
|
|
1392
|
+
key: C.label,
|
|
1393
|
+
onClick: (D) => b(C),
|
|
1394
|
+
lines: e.value.showOptionsSeparator ? "none" : "full"
|
|
1383
1395
|
}, {
|
|
1384
|
-
default:
|
|
1385
|
-
e.value.multiple ? (v(),
|
|
1396
|
+
default: k(() => [
|
|
1397
|
+
e.value.multiple ? (v(), _(i(Ie), {
|
|
1386
1398
|
key: 0,
|
|
1387
1399
|
slot: "start",
|
|
1388
|
-
checked:
|
|
1389
|
-
}, null, 8, ["checked"])) :
|
|
1390
|
-
|
|
1391
|
-
default:
|
|
1392
|
-
|
|
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"])) :
|
|
1413
|
+
}, 8, ["class"])) : R("", !0)
|
|
1402
1414
|
], 544));
|
|
1403
1415
|
}
|
|
1404
|
-
}),
|
|
1416
|
+
}), Ut = /* @__PURE__ */ ve(Bt, [["__scopeId", "data-v-74ee432d"]]), Dt = /* @__PURE__ */ L({
|
|
1405
1417
|
__name: "TextAreaInput",
|
|
1406
|
-
props: /* @__PURE__ */
|
|
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:
|
|
1414
|
-
const l = t, e =
|
|
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
|
|
1432
|
+
return q(
|
|
1421
1433
|
() => e.value.value,
|
|
1422
1434
|
(f) => o.value = f
|
|
1423
|
-
),
|
|
1435
|
+
), u({
|
|
1424
1436
|
onReset: d,
|
|
1425
1437
|
onValueUpdate: n,
|
|
1426
1438
|
getErrors: p
|
|
1427
|
-
}), (f,
|
|
1439
|
+
}), (f, r) => (v(), _(i(Ne), {
|
|
1428
1440
|
ref_key: "inputRef",
|
|
1429
1441
|
ref: a,
|
|
1430
1442
|
modelValue: o.value,
|
|
1431
|
-
"onUpdate:modelValue":
|
|
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:
|
|
1450
|
-
onIonChange:
|
|
1451
|
-
onIonBlur:
|
|
1461
|
+
onIonFocus: i(g),
|
|
1462
|
+
onIonChange: i(n),
|
|
1463
|
+
onIonBlur: i(n),
|
|
1464
|
+
style: { width: "100%" }
|
|
1452
1465
|
}, {
|
|
1453
|
-
default:
|
|
1454
|
-
|
|
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
|
-
}),
|
|
1472
|
+
}), Tt = {
|
|
1460
1473
|
class: "ion-margin-end",
|
|
1461
1474
|
style: { "flex-grow": "1" }
|
|
1462
|
-
},
|
|
1475
|
+
}, qt = { style: { display: "flex", "justify-content": "flex-end" } }, Lt = /* @__PURE__ */ L({
|
|
1463
1476
|
__name: "RepeatInput",
|
|
1464
|
-
props: /* @__PURE__ */
|
|
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:
|
|
1474
|
-
const l =
|
|
1475
|
-
label: `Set ${
|
|
1476
|
-
value:
|
|
1477
|
-
other: Object.entries(
|
|
1478
|
-
(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
|
-
|
|
1483
|
-
|
|
1484
|
-
(
|
|
1485
|
-
l.value.value =
|
|
1495
|
+
q(
|
|
1496
|
+
g,
|
|
1497
|
+
(S) => {
|
|
1498
|
+
l.value.value = S;
|
|
1486
1499
|
},
|
|
1487
1500
|
{ deep: !0, immediate: !0 }
|
|
1488
|
-
),
|
|
1501
|
+
), ke(d);
|
|
1489
1502
|
function d() {
|
|
1490
|
-
l.value.children && e.value.push(
|
|
1503
|
+
l.value.children && e.value.push(Ce(l.value.children));
|
|
1491
1504
|
}
|
|
1492
|
-
function p(
|
|
1493
|
-
e.value.splice(
|
|
1505
|
+
function p(S) {
|
|
1506
|
+
e.value.splice(S, 1);
|
|
1494
1507
|
}
|
|
1495
1508
|
function f() {
|
|
1496
1509
|
o();
|
|
1497
1510
|
}
|
|
1498
|
-
function
|
|
1511
|
+
function r() {
|
|
1499
1512
|
return s();
|
|
1500
1513
|
}
|
|
1501
1514
|
async function h() {
|
|
1502
1515
|
await n();
|
|
1503
1516
|
}
|
|
1504
|
-
return
|
|
1517
|
+
return u({
|
|
1505
1518
|
onValueUpdate: h,
|
|
1506
1519
|
onReset: f,
|
|
1507
|
-
getErrors:
|
|
1508
|
-
}), (
|
|
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:
|
|
1523
|
+
key: z
|
|
1511
1524
|
}, [
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
default:
|
|
1515
|
-
(v(!0), $(M, null,
|
|
1516
|
-
var
|
|
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
|
-
|
|
1519
|
-
key: `${
|
|
1520
|
-
size: ((
|
|
1521
|
-
"size-sm": (
|
|
1522
|
-
"size-md": (
|
|
1523
|
-
"size-lg": (
|
|
1524
|
-
"size-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:
|
|
1528
|
-
(v(),
|
|
1529
|
-
modelValue: w[
|
|
1530
|
-
"onUpdate:modelValue": (
|
|
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": `${
|
|
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"])) :
|
|
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
|
-
|
|
1547
|
-
|
|
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:
|
|
1553
|
-
|
|
1566
|
+
default: k(() => [
|
|
1567
|
+
T(i(ge), {
|
|
1554
1568
|
slot: "icon-only",
|
|
1555
|
-
icon:
|
|
1569
|
+
icon: i(Ke)
|
|
1556
1570
|
}, null, 8, ["icon"])
|
|
1557
1571
|
]),
|
|
1558
1572
|
_: 1
|
|
1559
|
-
})) :
|
|
1560
|
-
e.value.length > 1 ? (v(),
|
|
1573
|
+
})) : R("", !0),
|
|
1574
|
+
e.value.length > 1 ? (v(), _(i(H), {
|
|
1561
1575
|
key: 1,
|
|
1562
|
-
onClick: (
|
|
1576
|
+
onClick: (A) => p(z),
|
|
1563
1577
|
color: "warning"
|
|
1564
1578
|
}, {
|
|
1565
|
-
default:
|
|
1566
|
-
|
|
1579
|
+
default: k(() => [
|
|
1580
|
+
T(i(ge), {
|
|
1567
1581
|
slot: "icon-only",
|
|
1568
|
-
icon:
|
|
1582
|
+
icon: i(We)
|
|
1569
1583
|
}, null, 8, ["icon"])
|
|
1570
1584
|
]),
|
|
1571
1585
|
_: 2
|
|
1572
|
-
}, 1032, ["onClick"])) :
|
|
1586
|
+
}, 1032, ["onClick"])) : R("", !0)
|
|
1573
1587
|
])
|
|
1574
1588
|
]))), 128));
|
|
1575
1589
|
}
|
|
1576
|
-
}),
|
|
1590
|
+
}), Nt = /* @__PURE__ */ ve(Lt, [["__scopeId", "data-v-c3c3598f"]]), Mt = /* @__PURE__ */ L({
|
|
1577
1591
|
__name: "CheckboxInput",
|
|
1578
|
-
props: /* @__PURE__ */
|
|
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:
|
|
1586
|
-
const l = t, e =
|
|
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
|
|
1604
|
+
return q(
|
|
1591
1605
|
() => e.value.value,
|
|
1592
|
-
(
|
|
1593
|
-
),
|
|
1594
|
-
onValueUpdate:
|
|
1606
|
+
(r) => o.value = r
|
|
1607
|
+
), u({
|
|
1608
|
+
onValueUpdate: g,
|
|
1595
1609
|
onReset: f,
|
|
1596
1610
|
getErrors: p
|
|
1597
|
-
}), (
|
|
1611
|
+
}), (r, h) => (v(), _(i(Ie), {
|
|
1598
1612
|
modelValue: o.value,
|
|
1599
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
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:
|
|
1606
|
-
onIonChange:
|
|
1607
|
-
onIonBlur:
|
|
1619
|
+
onIonFocus: i(d),
|
|
1620
|
+
onIonChange: i(g),
|
|
1621
|
+
onIonBlur: i(g),
|
|
1622
|
+
style: { width: "100%" }
|
|
1608
1623
|
}, {
|
|
1609
|
-
default:
|
|
1610
|
-
|
|
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
|
-
}),
|
|
1630
|
+
}), jt = /* @__PURE__ */ L({
|
|
1616
1631
|
__name: "RadioInput",
|
|
1617
|
-
props: /* @__PURE__ */
|
|
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:
|
|
1625
|
-
const l = t, e =
|
|
1626
|
-
function
|
|
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(
|
|
1630
|
-
return
|
|
1644
|
+
function h(b, w) {
|
|
1645
|
+
return b.value === w.value;
|
|
1631
1646
|
}
|
|
1632
|
-
async function
|
|
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
|
|
1650
|
+
return q(
|
|
1636
1651
|
() => e.value.value,
|
|
1637
|
-
(
|
|
1638
|
-
),
|
|
1652
|
+
(b) => o.value = b
|
|
1653
|
+
), u({
|
|
1639
1654
|
onValueUpdate: d,
|
|
1640
|
-
onReset:
|
|
1655
|
+
onReset: r,
|
|
1641
1656
|
getErrors: f
|
|
1642
|
-
}),
|
|
1657
|
+
}), ke(S), (b, w) => (v(), _(i(Me), {
|
|
1643
1658
|
modelValue: o.value,
|
|
1644
|
-
"onUpdate:modelValue": w[0] || (w[0] = (
|
|
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":
|
|
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:
|
|
1654
|
-
onIonChange:
|
|
1655
|
-
onIonBlur:
|
|
1668
|
+
onIonFocus: i(p),
|
|
1669
|
+
onIonChange: i(d),
|
|
1670
|
+
onIonBlur: i(d),
|
|
1671
|
+
style: { width: "100%" }
|
|
1656
1672
|
}, {
|
|
1657
|
-
default:
|
|
1658
|
-
(v(!0), $(M, null,
|
|
1659
|
-
key:
|
|
1660
|
-
value:
|
|
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:
|
|
1666
|
-
|
|
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, ["
|
|
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
|
-
}),
|
|
1697
|
+
}), Gt = { class: "form-section-header" }, Ht = { class: "form-section-title" }, Kt = {
|
|
1675
1698
|
key: 0,
|
|
1676
1699
|
class: "form-section-subtitle"
|
|
1677
|
-
},
|
|
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,
|
|
1689
|
-
return v(),
|
|
1690
|
-
size: ((o =
|
|
1691
|
-
"size-sm": (s =
|
|
1692
|
-
"size-md": (n =
|
|
1693
|
-
"size-lg": (
|
|
1694
|
-
"size-xl": (d =
|
|
1695
|
-
class:
|
|
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:
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
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
|
-
}),
|
|
1708
|
-
function
|
|
1709
|
-
const e =
|
|
1710
|
-
function o(p, f,
|
|
1711
|
-
a.value[p] =
|
|
1712
|
-
var
|
|
1713
|
-
(
|
|
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(([,
|
|
1718
|
-
(
|
|
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((
|
|
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
|
|
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
|
|
1753
|
+
const r = s(p), h = Object.keys(r);
|
|
1731
1754
|
if (!(h.length === 0 || !h.every(
|
|
1732
|
-
(
|
|
1755
|
+
(b) => r[b] !== void 0 && r[b] !== null
|
|
1733
1756
|
)))
|
|
1734
1757
|
try {
|
|
1735
|
-
const
|
|
1758
|
+
const b = a.value[p], w = await b(f, r);
|
|
1736
1759
|
if (!t.value[p]) return;
|
|
1737
|
-
const
|
|
1738
|
-
if (!
|
|
1739
|
-
|
|
1740
|
-
const
|
|
1741
|
-
if (!
|
|
1742
|
-
n(
|
|
1743
|
-
} catch (
|
|
1744
|
-
console.error(`Error loading options for ${p}:`,
|
|
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
|
|
1748
|
-
[
|
|
1770
|
+
return q(
|
|
1771
|
+
[u, l],
|
|
1749
1772
|
() => {
|
|
1750
1773
|
Object.entries(e.value).forEach(([p, f]) => {
|
|
1751
|
-
(
|
|
1752
|
-
d(
|
|
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
|
|
1785
|
+
const tl = {
|
|
1763
1786
|
install(t) {
|
|
1764
|
-
t.component("VForm",
|
|
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
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
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
|