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