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