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