@stonecrop/aform 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aform.js +718 -500
- package/dist/aform.js.map +1 -1
- package/dist/aform.umd.cjs +2 -2
- package/dist/aform.umd.cjs.map +1 -1
- package/dist/assets/index.css +1 -1
- package/package.json +7 -6
- package/src/components/form/ADropdown.vue +85 -78
package/dist/aform.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import './assets/index.css';const
|
|
1
|
+
import { defineComponent as M, mergeModels as G, useModel as H, openBlock as g, createElementBlock as b, createElementVNode as d, toDisplayString as D, withDirectives as E, vModelCheckbox as Pe, vShow as R, resolveComponent as Oe, createBlock as te, withCtx as Fe, useTemplateRef as Ae, vModelText as F, getCurrentScope as ne, onScopeDispose as oe, toRef as He, readonly as De, customRef as Re, ref as y, watch as P, toValue as V, computed as I, reactive as Be, normalizeClass as J, withKeys as O, Fragment as U, renderList as N, withModifiers as Ee, unref as x, onMounted as le, onBeforeUnmount as qe, getCurrentInstance as We, nextTick as Ue, resolveDynamicComponent as Ne, mergeProps as Ye, createTextVNode as Me, createCommentVNode as se, renderSlot as je, createVNode as Ge } from "vue";
|
|
2
|
+
import './assets/index.css';const Ke = { class: "aform_form-element" }, ze = ["for"], Xe = { class: "aform_checkbox-container aform_input-field" }, Je = ["id", "readonly", "required"], Qe = ["innerHTML"], Ze = /* @__PURE__ */ M({
|
|
3
3
|
__name: "ACheckbox",
|
|
4
|
-
props: /* @__PURE__ */
|
|
4
|
+
props: /* @__PURE__ */ G({
|
|
5
5
|
schema: {},
|
|
6
6
|
label: {},
|
|
7
7
|
mask: {},
|
|
@@ -15,29 +15,29 @@ import './assets/index.css';const Ve = { class: "aform_form-element" }, Ie = ["f
|
|
|
15
15
|
}),
|
|
16
16
|
emits: ["update:modelValue"],
|
|
17
17
|
setup(e) {
|
|
18
|
-
const t =
|
|
19
|
-
return (n, o) => (
|
|
20
|
-
|
|
18
|
+
const t = H(e, "modelValue");
|
|
19
|
+
return (n, o) => (g(), b("div", Ke, [
|
|
20
|
+
d("label", {
|
|
21
21
|
class: "aform_field-label",
|
|
22
22
|
for: n.uuid
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
}, D(n.label), 9, ze),
|
|
24
|
+
d("span", Xe, [
|
|
25
|
+
E(d("input", {
|
|
26
26
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
|
|
27
27
|
type: "checkbox",
|
|
28
28
|
id: n.uuid,
|
|
29
29
|
class: "aform_checkbox",
|
|
30
30
|
readonly: n.readonly,
|
|
31
31
|
required: n.required
|
|
32
|
-
}, null, 8,
|
|
33
|
-
[
|
|
32
|
+
}, null, 8, Je), [
|
|
33
|
+
[Pe, t.value]
|
|
34
34
|
])
|
|
35
35
|
]),
|
|
36
|
-
|
|
36
|
+
E(d("p", {
|
|
37
37
|
class: "aform_error",
|
|
38
38
|
innerHTML: n.validation.errorMessage
|
|
39
|
-
}, null, 8,
|
|
40
|
-
[
|
|
39
|
+
}, null, 8, Qe), [
|
|
40
|
+
[R, n.validation.errorMessage]
|
|
41
41
|
])
|
|
42
42
|
]));
|
|
43
43
|
}
|
|
@@ -46,31 +46,31 @@ import './assets/index.css';const Ve = { class: "aform_form-element" }, Ie = ["f
|
|
|
46
46
|
for (const [o, l] of t)
|
|
47
47
|
n[o] = l;
|
|
48
48
|
return n;
|
|
49
|
-
},
|
|
49
|
+
}, et = /* @__PURE__ */ T(Ze, [["__scopeId", "data-v-9f382ad4"]]), tt = /* @__PURE__ */ M({
|
|
50
50
|
__name: "AComboBox",
|
|
51
51
|
props: ["event", "cellData", "tableID"],
|
|
52
52
|
setup(e) {
|
|
53
53
|
return (t, n) => {
|
|
54
|
-
const o =
|
|
55
|
-
return
|
|
54
|
+
const o = Oe("ATableModal");
|
|
55
|
+
return g(), te(o, {
|
|
56
56
|
event: e.event,
|
|
57
57
|
cellData: e.cellData,
|
|
58
58
|
class: "amodal"
|
|
59
59
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
default: Fe(() => n[0] || (n[0] = [
|
|
61
|
+
d("div", null, [
|
|
62
|
+
d("input", { type: "text" }),
|
|
63
|
+
d("input", { type: "text" }),
|
|
64
|
+
d("input", { type: "text" })
|
|
65
65
|
], -1)
|
|
66
66
|
])),
|
|
67
67
|
_: 1
|
|
68
68
|
}, 8, ["event", "cellData"]);
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
}),
|
|
71
|
+
}), nt = ["id", "disabled", "required"], ot = ["for"], lt = ["innerHTML"], st = /* @__PURE__ */ M({
|
|
72
72
|
__name: "ADate",
|
|
73
|
-
props: /* @__PURE__ */
|
|
73
|
+
props: /* @__PURE__ */ G({
|
|
74
74
|
schema: {},
|
|
75
75
|
label: { default: "Date" },
|
|
76
76
|
mask: {},
|
|
@@ -86,235 +86,453 @@ import './assets/index.css';const Ve = { class: "aform_form-element" }, Ie = ["f
|
|
|
86
86
|
}),
|
|
87
87
|
emits: ["update:modelValue"],
|
|
88
88
|
setup(e) {
|
|
89
|
-
const t =
|
|
89
|
+
const t = H(e, "modelValue", {
|
|
90
90
|
// format the date to be compatible with the native input datepicker
|
|
91
91
|
set: (l) => new Date(l).toISOString().split("T")[0]
|
|
92
|
-
}), n =
|
|
92
|
+
}), n = Ae("date"), o = () => {
|
|
93
93
|
n.value && "showPicker" in HTMLInputElement.prototype && n.value.showPicker();
|
|
94
94
|
};
|
|
95
|
-
return (l,
|
|
96
|
-
|
|
97
|
-
"onUpdate:modelValue":
|
|
95
|
+
return (l, a) => (g(), b("div", null, [
|
|
96
|
+
E(d("input", {
|
|
97
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => t.value = s),
|
|
98
98
|
ref: "date",
|
|
99
99
|
type: "date",
|
|
100
100
|
id: l.uuid,
|
|
101
101
|
disabled: l.readonly,
|
|
102
102
|
required: l.required,
|
|
103
103
|
onClick: o
|
|
104
|
-
}, null, 8,
|
|
105
|
-
[
|
|
104
|
+
}, null, 8, nt), [
|
|
105
|
+
[F, t.value]
|
|
106
106
|
]),
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
d("label", { for: l.uuid }, D(l.label), 9, ot),
|
|
108
|
+
E(d("p", {
|
|
109
109
|
innerHTML: l.validation.errorMessage
|
|
110
|
-
}, null, 8,
|
|
111
|
-
[
|
|
110
|
+
}, null, 8, lt), [
|
|
111
|
+
[R, l.validation.errorMessage]
|
|
112
112
|
])
|
|
113
113
|
]));
|
|
114
114
|
}
|
|
115
|
-
}),
|
|
115
|
+
}), at = /* @__PURE__ */ T(st, [["__scopeId", "data-v-280b3d1a"]]);
|
|
116
|
+
function Ce(e) {
|
|
117
|
+
return ne() ? (oe(e), !0) : !1;
|
|
118
|
+
}
|
|
119
|
+
const Ie = typeof window < "u" && typeof document < "u";
|
|
120
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
121
|
+
const rt = Object.prototype.toString, it = (e) => rt.call(e) === "[object Object]", W = () => {
|
|
122
|
+
}, ee = /* @__PURE__ */ ut();
|
|
123
|
+
function ut() {
|
|
124
|
+
var e, t;
|
|
125
|
+
return Ie && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
126
|
+
}
|
|
127
|
+
function de(e) {
|
|
128
|
+
return Array.isArray(e) ? e : [e];
|
|
129
|
+
}
|
|
130
|
+
function ct(...e) {
|
|
131
|
+
if (e.length !== 1)
|
|
132
|
+
return He(...e);
|
|
133
|
+
const t = e[0];
|
|
134
|
+
return typeof t == "function" ? De(Re(() => ({ get: t, set: W }))) : y(t);
|
|
135
|
+
}
|
|
136
|
+
const Te = Ie ? window : void 0;
|
|
137
|
+
function q(e) {
|
|
138
|
+
var t;
|
|
139
|
+
const n = V(e);
|
|
140
|
+
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
141
|
+
}
|
|
142
|
+
function X(...e) {
|
|
143
|
+
let t, n, o, l;
|
|
144
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t = Te) : [t, n, o, l] = e, !t)
|
|
145
|
+
return W;
|
|
146
|
+
n = de(n), o = de(o);
|
|
147
|
+
const a = [], s = () => {
|
|
148
|
+
a.forEach((c) => c()), a.length = 0;
|
|
149
|
+
}, r = (c, m, f, p) => (c.addEventListener(m, f, p), () => c.removeEventListener(m, f, p)), u = P(
|
|
150
|
+
() => [q(t), V(l)],
|
|
151
|
+
([c, m]) => {
|
|
152
|
+
if (s(), !c)
|
|
153
|
+
return;
|
|
154
|
+
const f = it(m) ? { ...m } : m;
|
|
155
|
+
a.push(
|
|
156
|
+
...n.flatMap((p) => o.map((w) => r(c, p, w, f)))
|
|
157
|
+
);
|
|
158
|
+
},
|
|
159
|
+
{ immediate: !0, flush: "post" }
|
|
160
|
+
), i = () => {
|
|
161
|
+
u(), s();
|
|
162
|
+
};
|
|
163
|
+
return Ce(i), i;
|
|
164
|
+
}
|
|
165
|
+
let fe = !1;
|
|
166
|
+
function me(e, t, n = {}) {
|
|
167
|
+
const { window: o = Te, ignore: l = [], capture: a = !0, detectIframe: s = !1 } = n;
|
|
168
|
+
if (!o)
|
|
169
|
+
return W;
|
|
170
|
+
ee && !fe && (fe = !0, Array.from(o.document.body.children).forEach((v) => v.addEventListener("click", W)), o.document.documentElement.addEventListener("click", W));
|
|
171
|
+
let r = !0;
|
|
172
|
+
const u = (v) => V(l).some((h) => {
|
|
173
|
+
if (typeof h == "string")
|
|
174
|
+
return Array.from(o.document.querySelectorAll(h)).some((_) => _ === v.target || v.composedPath().includes(_));
|
|
175
|
+
{
|
|
176
|
+
const _ = q(h);
|
|
177
|
+
return _ && (v.target === _ || v.composedPath().includes(_));
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
function i(v) {
|
|
181
|
+
const h = V(v);
|
|
182
|
+
return h && h.$.subTree.shapeFlag === 16;
|
|
183
|
+
}
|
|
184
|
+
function c(v, h) {
|
|
185
|
+
const _ = V(v), B = _.$.subTree && _.$.subTree.children;
|
|
186
|
+
return B == null || !Array.isArray(B) ? !1 : B.some((k) => k.el === h.target || h.composedPath().includes(k.el));
|
|
187
|
+
}
|
|
188
|
+
const m = (v) => {
|
|
189
|
+
const h = q(e);
|
|
190
|
+
if (v.target != null && !(!(h instanceof Element) && i(e) && c(e, v)) && !(!h || h === v.target || v.composedPath().includes(h))) {
|
|
191
|
+
if (v.detail === 0 && (r = !u(v)), !r) {
|
|
192
|
+
r = !0;
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
t(v);
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
let f = !1;
|
|
199
|
+
const p = [
|
|
200
|
+
X(o, "click", (v) => {
|
|
201
|
+
f || (f = !0, setTimeout(() => {
|
|
202
|
+
f = !1;
|
|
203
|
+
}, 0), m(v));
|
|
204
|
+
}, { passive: !0, capture: a }),
|
|
205
|
+
X(o, "pointerdown", (v) => {
|
|
206
|
+
const h = q(e);
|
|
207
|
+
r = !u(v) && !!(h && !v.composedPath().includes(h));
|
|
208
|
+
}, { passive: !0 }),
|
|
209
|
+
s && X(o, "blur", (v) => {
|
|
210
|
+
setTimeout(() => {
|
|
211
|
+
var h;
|
|
212
|
+
const _ = q(e);
|
|
213
|
+
((h = o.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(_ != null && _.contains(o.document.activeElement)) && t(v);
|
|
214
|
+
}, 0);
|
|
215
|
+
}, { passive: !0 })
|
|
216
|
+
].filter(Boolean);
|
|
217
|
+
return () => p.forEach((v) => v());
|
|
218
|
+
}
|
|
219
|
+
const dt = {
|
|
220
|
+
mounted(e, t) {
|
|
221
|
+
const n = !t.modifiers.bubble;
|
|
222
|
+
if (typeof t.value == "function")
|
|
223
|
+
e.__onClickOutside_stop = me(e, t.value, { capture: n });
|
|
224
|
+
else {
|
|
225
|
+
const [o, l] = t.value;
|
|
226
|
+
e.__onClickOutside_stop = me(e, o, Object.assign({ capture: n }, l));
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
unmounted(e) {
|
|
230
|
+
e.__onClickOutside_stop();
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
function Q(e) {
|
|
234
|
+
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
235
|
+
}
|
|
236
|
+
function Se(e) {
|
|
237
|
+
const t = window.getComputedStyle(e);
|
|
238
|
+
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
|
|
239
|
+
return !0;
|
|
240
|
+
{
|
|
241
|
+
const n = e.parentNode;
|
|
242
|
+
return !n || n.tagName === "BODY" ? !1 : Se(n);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
function ft(e) {
|
|
246
|
+
const t = e || window.event, n = t.target;
|
|
247
|
+
return Se(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
248
|
+
}
|
|
249
|
+
const Z = /* @__PURE__ */ new WeakMap();
|
|
250
|
+
function mt(e, t = !1) {
|
|
251
|
+
const n = y(t);
|
|
252
|
+
let o = null, l = "";
|
|
253
|
+
P(ct(e), (r) => {
|
|
254
|
+
const u = Q(V(r));
|
|
255
|
+
if (u) {
|
|
256
|
+
const i = u;
|
|
257
|
+
if (Z.get(i) || Z.set(i, i.style.overflow), i.style.overflow !== "hidden" && (l = i.style.overflow), i.style.overflow === "hidden")
|
|
258
|
+
return n.value = !0;
|
|
259
|
+
if (n.value)
|
|
260
|
+
return i.style.overflow = "hidden";
|
|
261
|
+
}
|
|
262
|
+
}, {
|
|
263
|
+
immediate: !0
|
|
264
|
+
});
|
|
265
|
+
const a = () => {
|
|
266
|
+
const r = Q(V(e));
|
|
267
|
+
!r || n.value || (ee && (o = X(
|
|
268
|
+
r,
|
|
269
|
+
"touchmove",
|
|
270
|
+
(u) => {
|
|
271
|
+
ft(u);
|
|
272
|
+
},
|
|
273
|
+
{ passive: !1 }
|
|
274
|
+
)), r.style.overflow = "hidden", n.value = !0);
|
|
275
|
+
}, s = () => {
|
|
276
|
+
const r = Q(V(e));
|
|
277
|
+
!r || !n.value || (ee && (o == null || o()), r.style.overflow = l, Z.delete(r), n.value = !1);
|
|
278
|
+
};
|
|
279
|
+
return Ce(s), I({
|
|
280
|
+
get() {
|
|
281
|
+
return n.value;
|
|
282
|
+
},
|
|
283
|
+
set(r) {
|
|
284
|
+
r ? a() : s();
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
function pt() {
|
|
289
|
+
let e = !1;
|
|
290
|
+
const t = y(!1);
|
|
291
|
+
return (n, o) => {
|
|
292
|
+
if (t.value = o.value, e)
|
|
293
|
+
return;
|
|
294
|
+
e = !0;
|
|
295
|
+
const l = mt(n, o.value);
|
|
296
|
+
P(t, (a) => l.value = a);
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
pt();
|
|
300
|
+
const vt = { class: "input-wrapper" }, ht = {
|
|
116
301
|
id: "autocomplete-results",
|
|
117
302
|
class: "autocomplete-results"
|
|
118
|
-
},
|
|
303
|
+
}, gt = {
|
|
119
304
|
key: 0,
|
|
120
305
|
class: "loading autocomplete-result"
|
|
121
|
-
},
|
|
306
|
+
}, yt = ["onClick"], bt = /* @__PURE__ */ M({
|
|
122
307
|
__name: "ADropdown",
|
|
123
|
-
props: /* @__PURE__ */
|
|
308
|
+
props: /* @__PURE__ */ G({
|
|
124
309
|
label: {},
|
|
125
310
|
items: {},
|
|
126
|
-
isAsync: { type: Boolean }
|
|
311
|
+
isAsync: { type: Boolean },
|
|
312
|
+
filterFunction: { type: Function }
|
|
127
313
|
}, {
|
|
128
314
|
modelValue: {},
|
|
129
315
|
modelModifiers: {}
|
|
130
316
|
}),
|
|
131
|
-
emits:
|
|
132
|
-
setup(e
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
|
|
317
|
+
emits: ["update:modelValue"],
|
|
318
|
+
setup(e) {
|
|
319
|
+
const t = H(e, "modelValue"), n = Be({
|
|
320
|
+
activeItemIndex: null,
|
|
321
|
+
open: !1,
|
|
322
|
+
loading: !1,
|
|
323
|
+
results: e.items
|
|
324
|
+
}), o = () => r(), l = async () => {
|
|
325
|
+
if (n.open = !0, e.filterFunction) {
|
|
326
|
+
e.isAsync && (n.loading = !0);
|
|
327
|
+
try {
|
|
328
|
+
const f = await e.filterFunction(t.value || "");
|
|
329
|
+
n.results = f;
|
|
330
|
+
} catch {
|
|
331
|
+
n.results = [];
|
|
332
|
+
} finally {
|
|
333
|
+
e.isAsync && (n.loading = !1);
|
|
334
|
+
}
|
|
335
|
+
} else
|
|
336
|
+
u();
|
|
337
|
+
}, a = (f) => {
|
|
338
|
+
t.value = f, r(f);
|
|
339
|
+
}, s = () => {
|
|
340
|
+
var f;
|
|
341
|
+
n.activeItemIndex = e.isAsync ? null : t.value && ((f = e.items) == null ? void 0 : f.indexOf(t.value)) || null, n.open = !0, n.results = e.isAsync ? [] : e.items;
|
|
342
|
+
}, r = (f) => {
|
|
343
|
+
var p;
|
|
344
|
+
n.activeItemIndex = null, n.open = !1, (p = e.items) != null && p.includes(f || t.value || "") || (t.value = "");
|
|
141
345
|
}, u = () => {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
346
|
+
var f;
|
|
347
|
+
t.value ? n.results = (f = e.items) == null ? void 0 : f.filter((p) => p.toLowerCase().includes((t.value ?? "").toLowerCase())) : n.results = e.items;
|
|
348
|
+
}, i = () => {
|
|
349
|
+
var p;
|
|
350
|
+
const f = ((p = n.results) == null ? void 0 : p.length) || 0;
|
|
351
|
+
if (n.activeItemIndex != null) {
|
|
352
|
+
const w = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
|
|
353
|
+
n.activeItemIndex = (w + 1) % f;
|
|
354
|
+
} else
|
|
355
|
+
n.activeItemIndex = 0;
|
|
356
|
+
}, c = () => {
|
|
357
|
+
var p;
|
|
358
|
+
const f = ((p = n.results) == null ? void 0 : p.length) || 0;
|
|
359
|
+
if (n.activeItemIndex != null) {
|
|
360
|
+
const w = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
|
|
361
|
+
n.activeItemIndex = (w - 1 + f) % f;
|
|
362
|
+
} else
|
|
363
|
+
n.activeItemIndex = f - 1;
|
|
147
364
|
}, m = () => {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}, M = () => {
|
|
154
|
-
l.value = o.value[a.value], m(), a.value = 0;
|
|
365
|
+
if (n.results) {
|
|
366
|
+
const f = n.activeItemIndex || 0, p = n.results[f];
|
|
367
|
+
a(p);
|
|
368
|
+
}
|
|
369
|
+
n.activeItemIndex = 0;
|
|
155
370
|
};
|
|
156
|
-
return (
|
|
157
|
-
class:
|
|
371
|
+
return (f, p) => E((g(), b("div", {
|
|
372
|
+
class: J(["autocomplete", { isOpen: n.open }])
|
|
158
373
|
}, [
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
374
|
+
d("div", vt, [
|
|
375
|
+
E(d("input", {
|
|
376
|
+
"onUpdate:modelValue": p[0] || (p[0] = (w) => t.value = w),
|
|
162
377
|
type: "text",
|
|
163
|
-
onInput:
|
|
164
|
-
onFocus:
|
|
165
|
-
"onUpdate:modelValue": E[0] || (E[0] = (x) => l.value = x),
|
|
378
|
+
onInput: l,
|
|
379
|
+
onFocus: s,
|
|
166
380
|
onKeydown: [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
381
|
+
O(i, ["down"]),
|
|
382
|
+
O(c, ["up"]),
|
|
383
|
+
O(m, ["enter"]),
|
|
384
|
+
O(o, ["esc"]),
|
|
385
|
+
O(o, ["tab"])
|
|
170
386
|
]
|
|
171
387
|
}, null, 544), [
|
|
172
|
-
[
|
|
388
|
+
[F, t.value]
|
|
173
389
|
]),
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
key:
|
|
177
|
-
onClick: (
|
|
178
|
-
class:
|
|
179
|
-
},
|
|
390
|
+
E(d("ul", ht, [
|
|
391
|
+
n.loading ? (g(), b("li", gt, "Loading results...")) : (g(!0), b(U, { key: 1 }, N(n.results, (w, v) => (g(), b("li", {
|
|
392
|
+
key: w,
|
|
393
|
+
onClick: Ee((h) => a(w), ["stop"]),
|
|
394
|
+
class: J(["autocomplete-result", { "is-active": v === n.activeItemIndex }])
|
|
395
|
+
}, D(w), 11, yt))), 128))
|
|
180
396
|
], 512), [
|
|
181
|
-
[
|
|
397
|
+
[R, n.open]
|
|
182
398
|
]),
|
|
183
|
-
|
|
399
|
+
d("label", null, D(f.label), 1)
|
|
184
400
|
])
|
|
185
|
-
], 2))
|
|
401
|
+
], 2)), [
|
|
402
|
+
[x(dt), o]
|
|
403
|
+
]);
|
|
186
404
|
}
|
|
187
|
-
}),
|
|
188
|
-
function
|
|
189
|
-
return
|
|
405
|
+
}), wt = /* @__PURE__ */ T(bt, [["__scopeId", "data-v-16c329d1"]]);
|
|
406
|
+
function $e(e) {
|
|
407
|
+
return ne() ? (oe(e), !0) : !1;
|
|
190
408
|
}
|
|
191
|
-
function
|
|
192
|
-
return typeof e == "function" ? e() :
|
|
409
|
+
function ae(e) {
|
|
410
|
+
return typeof e == "function" ? e() : x(e);
|
|
193
411
|
}
|
|
194
|
-
const
|
|
412
|
+
const kt = typeof window < "u" && typeof document < "u";
|
|
195
413
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
196
|
-
const
|
|
197
|
-
},
|
|
198
|
-
function
|
|
414
|
+
const _t = (e) => e != null, At = Object.prototype.toString, Dt = (e) => At.call(e) === "[object Object]", Et = () => {
|
|
415
|
+
}, K = kt ? window : void 0;
|
|
416
|
+
function Y(e) {
|
|
199
417
|
var t;
|
|
200
|
-
const n =
|
|
418
|
+
const n = ae(e);
|
|
201
419
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
202
420
|
}
|
|
203
|
-
function
|
|
421
|
+
function j(...e) {
|
|
204
422
|
let t, n, o, l;
|
|
205
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t =
|
|
206
|
-
return
|
|
423
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t = K) : [t, n, o, l] = e, !t)
|
|
424
|
+
return Et;
|
|
207
425
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
}, r = (
|
|
211
|
-
() => [
|
|
212
|
-
([
|
|
213
|
-
if (
|
|
426
|
+
const a = [], s = () => {
|
|
427
|
+
a.forEach((c) => c()), a.length = 0;
|
|
428
|
+
}, r = (c, m, f, p) => (c.addEventListener(m, f, p), () => c.removeEventListener(m, f, p)), u = P(
|
|
429
|
+
() => [Y(t), ae(l)],
|
|
430
|
+
([c, m]) => {
|
|
431
|
+
if (s(), !c)
|
|
214
432
|
return;
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
...n.flatMap((
|
|
433
|
+
const f = Dt(m) ? { ...m } : m;
|
|
434
|
+
a.push(
|
|
435
|
+
...n.flatMap((p) => o.map((w) => r(c, p, w, f)))
|
|
218
436
|
);
|
|
219
437
|
},
|
|
220
438
|
{ immediate: !0, flush: "post" }
|
|
221
|
-
),
|
|
222
|
-
|
|
439
|
+
), i = () => {
|
|
440
|
+
u(), s();
|
|
223
441
|
};
|
|
224
|
-
return
|
|
442
|
+
return $e(i), i;
|
|
225
443
|
}
|
|
226
|
-
function
|
|
227
|
-
const e =
|
|
228
|
-
return t &&
|
|
444
|
+
function Mt() {
|
|
445
|
+
const e = y(!1), t = We();
|
|
446
|
+
return t && le(() => {
|
|
229
447
|
e.value = !0;
|
|
230
448
|
}, t), e;
|
|
231
449
|
}
|
|
232
|
-
function
|
|
233
|
-
const t =
|
|
234
|
-
return
|
|
450
|
+
function Ct(e) {
|
|
451
|
+
const t = Mt();
|
|
452
|
+
return I(() => (t.value, !!e()));
|
|
235
453
|
}
|
|
236
|
-
function
|
|
237
|
-
const { window: o =
|
|
238
|
-
let
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
},
|
|
242
|
-
const
|
|
243
|
-
return new Set(
|
|
244
|
-
}),
|
|
245
|
-
() =>
|
|
246
|
-
(
|
|
247
|
-
r(),
|
|
454
|
+
function It(e, t, n = {}) {
|
|
455
|
+
const { window: o = K, ...l } = n;
|
|
456
|
+
let a;
|
|
457
|
+
const s = Ct(() => o && "MutationObserver" in o), r = () => {
|
|
458
|
+
a && (a.disconnect(), a = void 0);
|
|
459
|
+
}, u = I(() => {
|
|
460
|
+
const f = ae(e), p = (Array.isArray(f) ? f : [f]).map(Y).filter(_t);
|
|
461
|
+
return new Set(p);
|
|
462
|
+
}), i = P(
|
|
463
|
+
() => u.value,
|
|
464
|
+
(f) => {
|
|
465
|
+
r(), s.value && f.size && (a = new MutationObserver(t), f.forEach((p) => a.observe(p, l)));
|
|
248
466
|
},
|
|
249
467
|
{ immediate: !0, flush: "post" }
|
|
250
|
-
),
|
|
251
|
-
|
|
468
|
+
), c = () => a == null ? void 0 : a.takeRecords(), m = () => {
|
|
469
|
+
i(), r();
|
|
252
470
|
};
|
|
253
|
-
return
|
|
254
|
-
isSupported:
|
|
255
|
-
stop:
|
|
256
|
-
takeRecords:
|
|
471
|
+
return $e(m), {
|
|
472
|
+
isSupported: s,
|
|
473
|
+
stop: m,
|
|
474
|
+
takeRecords: c
|
|
257
475
|
};
|
|
258
476
|
}
|
|
259
|
-
function
|
|
477
|
+
function Tt(e = {}) {
|
|
260
478
|
var t;
|
|
261
479
|
const {
|
|
262
|
-
window: n =
|
|
480
|
+
window: n = K,
|
|
263
481
|
deep: o = !0,
|
|
264
482
|
triggerOnRemoval: l = !1
|
|
265
|
-
} = e,
|
|
266
|
-
var
|
|
267
|
-
let
|
|
483
|
+
} = e, a = (t = e.document) != null ? t : n == null ? void 0 : n.document, s = () => {
|
|
484
|
+
var i;
|
|
485
|
+
let c = a == null ? void 0 : a.activeElement;
|
|
268
486
|
if (o)
|
|
269
|
-
for (;
|
|
270
|
-
|
|
271
|
-
return
|
|
272
|
-
}, r =
|
|
273
|
-
r.value =
|
|
487
|
+
for (; c != null && c.shadowRoot; )
|
|
488
|
+
c = (i = c == null ? void 0 : c.shadowRoot) == null ? void 0 : i.activeElement;
|
|
489
|
+
return c;
|
|
490
|
+
}, r = y(), u = () => {
|
|
491
|
+
r.value = s();
|
|
274
492
|
};
|
|
275
|
-
return n && (
|
|
276
|
-
|
|
277
|
-
}, !0),
|
|
278
|
-
|
|
279
|
-
|
|
493
|
+
return n && (j(n, "blur", (i) => {
|
|
494
|
+
i.relatedTarget === null && u();
|
|
495
|
+
}, !0), j(n, "focus", u, !0)), l && It(a, (i) => {
|
|
496
|
+
i.filter((c) => c.removedNodes.length).map((c) => Array.from(c.removedNodes)).flat().forEach((c) => {
|
|
497
|
+
c === r.value && u();
|
|
280
498
|
});
|
|
281
499
|
}, {
|
|
282
500
|
childList: !0,
|
|
283
501
|
subtree: !0
|
|
284
|
-
}),
|
|
502
|
+
}), u(), r;
|
|
285
503
|
}
|
|
286
|
-
const
|
|
287
|
-
function
|
|
288
|
-
const { window: n =
|
|
289
|
-
return !n || !
|
|
504
|
+
const St = "focusin", $t = "focusout";
|
|
505
|
+
function Lt(e, t = {}) {
|
|
506
|
+
const { window: n = K } = t, o = I(() => Y(e)), l = y(!1), a = I(() => l.value), s = Tt(t);
|
|
507
|
+
return !n || !s.value ? { focused: a } : (j(o, St, () => l.value = !0), j(o, $t, () => l.value = !1), { focused: a });
|
|
290
508
|
}
|
|
291
|
-
function
|
|
292
|
-
const o =
|
|
509
|
+
function xt(e, { window: t = K, scrollTarget: n } = {}) {
|
|
510
|
+
const o = y(!1), l = () => {
|
|
293
511
|
if (!t) return;
|
|
294
|
-
const
|
|
295
|
-
if (!
|
|
512
|
+
const a = t.document, s = Y(e);
|
|
513
|
+
if (!s)
|
|
296
514
|
o.value = !1;
|
|
297
515
|
else {
|
|
298
|
-
const r =
|
|
299
|
-
o.value = r.top <= (t.innerHeight ||
|
|
516
|
+
const r = s.getBoundingClientRect();
|
|
517
|
+
o.value = r.top <= (t.innerHeight || a.documentElement.clientHeight) && r.left <= (t.innerWidth || a.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;
|
|
300
518
|
}
|
|
301
519
|
};
|
|
302
|
-
return
|
|
303
|
-
() =>
|
|
520
|
+
return P(
|
|
521
|
+
() => Y(e),
|
|
304
522
|
() => l(),
|
|
305
523
|
{ immediate: !0, flush: "post" }
|
|
306
|
-
), t &&
|
|
524
|
+
), t && j(n || t, "scroll", l, {
|
|
307
525
|
capture: !1,
|
|
308
526
|
passive: !0
|
|
309
527
|
}), o;
|
|
310
528
|
}
|
|
311
529
|
const S = (e) => {
|
|
312
|
-
let t =
|
|
530
|
+
let t = xt(e).value;
|
|
313
531
|
return t = t && e.offsetHeight > 0, t;
|
|
314
|
-
}, $ = (e) => e.tabIndex >= 0,
|
|
532
|
+
}, $ = (e) => e.tabIndex >= 0, pe = (e) => {
|
|
315
533
|
const t = e.target;
|
|
316
|
-
return
|
|
317
|
-
},
|
|
534
|
+
return re(t);
|
|
535
|
+
}, re = (e) => {
|
|
318
536
|
var t;
|
|
319
537
|
let n;
|
|
320
538
|
if (e instanceof HTMLTableCellElement) {
|
|
@@ -327,29 +545,29 @@ const S = (e) => {
|
|
|
327
545
|
const o = e.previousElementSibling;
|
|
328
546
|
o && (n = o);
|
|
329
547
|
}
|
|
330
|
-
return n && (!$(n) || !S(n)) ?
|
|
331
|
-
},
|
|
548
|
+
return n && (!$(n) || !S(n)) ? re(n) : n;
|
|
549
|
+
}, Vt = (e) => {
|
|
332
550
|
var t;
|
|
333
551
|
const n = e.target;
|
|
334
552
|
let o;
|
|
335
553
|
if (n instanceof HTMLTableCellElement) {
|
|
336
554
|
const l = (t = n.parentElement) == null ? void 0 : t.parentElement;
|
|
337
555
|
if (l) {
|
|
338
|
-
const
|
|
339
|
-
|
|
556
|
+
const a = l.firstElementChild, s = a == null ? void 0 : a.children[n.cellIndex];
|
|
557
|
+
s && (o = s);
|
|
340
558
|
}
|
|
341
559
|
} else if (n instanceof HTMLTableRowElement) {
|
|
342
560
|
const l = n.parentElement;
|
|
343
561
|
if (l) {
|
|
344
|
-
const
|
|
345
|
-
|
|
562
|
+
const a = l.firstElementChild;
|
|
563
|
+
a && (o = a);
|
|
346
564
|
}
|
|
347
565
|
}
|
|
348
|
-
return o && (!$(o) || !S(o)) ?
|
|
349
|
-
},
|
|
566
|
+
return o && (!$(o) || !S(o)) ? ie(o) : o;
|
|
567
|
+
}, ve = (e) => {
|
|
350
568
|
const t = e.target;
|
|
351
|
-
return
|
|
352
|
-
},
|
|
569
|
+
return ie(t);
|
|
570
|
+
}, ie = (e) => {
|
|
353
571
|
var t;
|
|
354
572
|
let n;
|
|
355
573
|
if (e instanceof HTMLTableCellElement) {
|
|
@@ -362,29 +580,29 @@ const S = (e) => {
|
|
|
362
580
|
const o = e.nextElementSibling;
|
|
363
581
|
o && (n = o);
|
|
364
582
|
}
|
|
365
|
-
return n && (!$(n) || !S(n)) ?
|
|
366
|
-
},
|
|
583
|
+
return n && (!$(n) || !S(n)) ? ie(n) : n;
|
|
584
|
+
}, Pt = (e) => {
|
|
367
585
|
var t;
|
|
368
586
|
const n = e.target;
|
|
369
587
|
let o;
|
|
370
588
|
if (n instanceof HTMLTableCellElement) {
|
|
371
589
|
const l = (t = n.parentElement) == null ? void 0 : t.parentElement;
|
|
372
590
|
if (l) {
|
|
373
|
-
const
|
|
374
|
-
|
|
591
|
+
const a = l.lastElementChild, s = a == null ? void 0 : a.children[n.cellIndex];
|
|
592
|
+
s && (o = s);
|
|
375
593
|
}
|
|
376
594
|
} else if (n instanceof HTMLTableRowElement) {
|
|
377
595
|
const l = n.parentElement;
|
|
378
596
|
if (l) {
|
|
379
|
-
const
|
|
380
|
-
|
|
597
|
+
const a = l.lastElementChild;
|
|
598
|
+
a && (o = a);
|
|
381
599
|
}
|
|
382
600
|
}
|
|
383
|
-
return o && (!$(o) || !S(o)) ?
|
|
384
|
-
},
|
|
601
|
+
return o && (!$(o) || !S(o)) ? re(o) : o;
|
|
602
|
+
}, he = (e) => {
|
|
385
603
|
const t = e.target;
|
|
386
|
-
return
|
|
387
|
-
},
|
|
604
|
+
return ue(t);
|
|
605
|
+
}, ue = (e) => {
|
|
388
606
|
var t;
|
|
389
607
|
let n;
|
|
390
608
|
if (e.previousElementSibling)
|
|
@@ -393,11 +611,11 @@ const S = (e) => {
|
|
|
393
611
|
const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
|
|
394
612
|
n = o == null ? void 0 : o.lastElementChild;
|
|
395
613
|
}
|
|
396
|
-
return n && (!$(n) || !S(n)) ?
|
|
397
|
-
},
|
|
614
|
+
return n && (!$(n) || !S(n)) ? ue(n) : n;
|
|
615
|
+
}, ge = (e) => {
|
|
398
616
|
const t = e.target;
|
|
399
|
-
return
|
|
400
|
-
},
|
|
617
|
+
return ce(t);
|
|
618
|
+
}, ce = (e) => {
|
|
401
619
|
var t;
|
|
402
620
|
let n;
|
|
403
621
|
if (e.nextElementSibling)
|
|
@@ -406,155 +624,155 @@ const S = (e) => {
|
|
|
406
624
|
const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
|
|
407
625
|
n = o == null ? void 0 : o.firstElementChild;
|
|
408
626
|
}
|
|
409
|
-
return n && (!$(n) || !S(n)) ?
|
|
410
|
-
},
|
|
627
|
+
return n && (!$(n) || !S(n)) ? ce(n) : n;
|
|
628
|
+
}, ye = (e) => {
|
|
411
629
|
const t = e.target.parentElement, n = t == null ? void 0 : t.firstElementChild;
|
|
412
|
-
return n && (!$(n) || !S(n)) ?
|
|
413
|
-
},
|
|
630
|
+
return n && (!$(n) || !S(n)) ? ce(n) : n;
|
|
631
|
+
}, be = (e) => {
|
|
414
632
|
const t = e.target.parentElement, n = t == null ? void 0 : t.lastElementChild;
|
|
415
|
-
return n && (!$(n) || !S(n)) ?
|
|
416
|
-
},
|
|
633
|
+
return n && (!$(n) || !S(n)) ? ue(n) : n;
|
|
634
|
+
}, z = ["alt", "control", "shift", "meta"], Ot = {
|
|
417
635
|
ArrowUp: "up",
|
|
418
636
|
ArrowDown: "down",
|
|
419
637
|
ArrowLeft: "left",
|
|
420
638
|
ArrowRight: "right"
|
|
421
|
-
},
|
|
639
|
+
}, Le = {
|
|
422
640
|
"keydown.up": (e) => {
|
|
423
|
-
const t =
|
|
641
|
+
const t = pe(e);
|
|
424
642
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
425
643
|
},
|
|
426
644
|
"keydown.down": (e) => {
|
|
427
|
-
const t =
|
|
645
|
+
const t = ve(e);
|
|
428
646
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
429
647
|
},
|
|
430
648
|
"keydown.left": (e) => {
|
|
431
|
-
const t =
|
|
649
|
+
const t = he(e);
|
|
432
650
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
433
651
|
},
|
|
434
652
|
"keydown.right": (e) => {
|
|
435
|
-
const t =
|
|
653
|
+
const t = ge(e);
|
|
436
654
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
437
655
|
},
|
|
438
656
|
"keydown.control.up": (e) => {
|
|
439
|
-
const t =
|
|
657
|
+
const t = Vt(e);
|
|
440
658
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
441
659
|
},
|
|
442
660
|
"keydown.control.down": (e) => {
|
|
443
|
-
const t =
|
|
661
|
+
const t = Pt(e);
|
|
444
662
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
445
663
|
},
|
|
446
664
|
"keydown.control.left": (e) => {
|
|
447
|
-
const t =
|
|
665
|
+
const t = ye(e);
|
|
448
666
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
449
667
|
},
|
|
450
668
|
"keydown.control.right": (e) => {
|
|
451
|
-
const t =
|
|
669
|
+
const t = be(e);
|
|
452
670
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
453
671
|
},
|
|
454
672
|
"keydown.end": (e) => {
|
|
455
|
-
const t =
|
|
673
|
+
const t = be(e);
|
|
456
674
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
457
675
|
},
|
|
458
676
|
"keydown.enter": (e) => {
|
|
459
677
|
if (e.target instanceof HTMLTableCellElement) {
|
|
460
678
|
e.preventDefault(), e.stopPropagation();
|
|
461
|
-
const t =
|
|
679
|
+
const t = ve(e);
|
|
462
680
|
t && t.focus();
|
|
463
681
|
}
|
|
464
682
|
},
|
|
465
683
|
"keydown.shift.enter": (e) => {
|
|
466
684
|
if (e.target instanceof HTMLTableCellElement) {
|
|
467
685
|
e.preventDefault(), e.stopPropagation();
|
|
468
|
-
const t =
|
|
686
|
+
const t = pe(e);
|
|
469
687
|
t && t.focus();
|
|
470
688
|
}
|
|
471
689
|
},
|
|
472
690
|
"keydown.home": (e) => {
|
|
473
|
-
const t =
|
|
691
|
+
const t = ye(e);
|
|
474
692
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
475
693
|
},
|
|
476
694
|
"keydown.tab": (e) => {
|
|
477
|
-
const t =
|
|
695
|
+
const t = ge(e);
|
|
478
696
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
479
697
|
},
|
|
480
698
|
"keydown.shift.tab": (e) => {
|
|
481
|
-
const t =
|
|
699
|
+
const t = he(e);
|
|
482
700
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
483
701
|
}
|
|
484
702
|
};
|
|
485
|
-
function
|
|
486
|
-
const t = (
|
|
703
|
+
function Ft(e) {
|
|
704
|
+
const t = (s) => {
|
|
487
705
|
let r = null;
|
|
488
|
-
return
|
|
489
|
-
}, n = (
|
|
706
|
+
return s.parent && (typeof s.parent == "string" ? r = document.querySelector(s.parent) : s.parent instanceof HTMLElement ? r = s.parent : r = s.parent.value), r;
|
|
707
|
+
}, n = (s) => {
|
|
490
708
|
var r;
|
|
491
|
-
const
|
|
492
|
-
let
|
|
493
|
-
if (typeof
|
|
494
|
-
|
|
495
|
-
else if (Array.isArray(
|
|
496
|
-
for (const
|
|
497
|
-
|
|
498
|
-
else if (
|
|
499
|
-
|
|
500
|
-
else if ((r =
|
|
501
|
-
if (Array.isArray(
|
|
502
|
-
for (const
|
|
503
|
-
|
|
709
|
+
const u = t(s);
|
|
710
|
+
let i = [];
|
|
711
|
+
if (typeof s.selectors == "string")
|
|
712
|
+
i = u ? Array.from(u.querySelectorAll(s.selectors)) : Array.from(document.querySelectorAll(s.selectors));
|
|
713
|
+
else if (Array.isArray(s.selectors))
|
|
714
|
+
for (const c of s.selectors)
|
|
715
|
+
c instanceof HTMLElement ? i.push(c) : i.push(c.$el);
|
|
716
|
+
else if (s.selectors instanceof HTMLElement)
|
|
717
|
+
i.push(s.selectors);
|
|
718
|
+
else if ((r = s.selectors) != null && r.value)
|
|
719
|
+
if (Array.isArray(s.selectors.value))
|
|
720
|
+
for (const c of s.selectors.value)
|
|
721
|
+
c instanceof HTMLElement ? i.push(c) : i.push(c.$el);
|
|
504
722
|
else
|
|
505
|
-
|
|
506
|
-
return
|
|
507
|
-
}, o = (
|
|
508
|
-
const r = t(
|
|
509
|
-
let
|
|
510
|
-
return
|
|
511
|
-
}, l = (
|
|
512
|
-
const
|
|
513
|
-
if (
|
|
514
|
-
const
|
|
515
|
-
for (const
|
|
516
|
-
const [
|
|
517
|
-
if (
|
|
518
|
-
const
|
|
519
|
-
const
|
|
520
|
-
return r.getModifierState(
|
|
723
|
+
i.push(s.selectors.value);
|
|
724
|
+
return i;
|
|
725
|
+
}, o = (s) => {
|
|
726
|
+
const r = t(s);
|
|
727
|
+
let u = [];
|
|
728
|
+
return s.selectors ? u = n(s) : r && (u = Array.from(r.children).filter((i) => $(i) && S(i))), u;
|
|
729
|
+
}, l = (s) => (r) => {
|
|
730
|
+
const u = Ot[r.key] || r.key.toLowerCase();
|
|
731
|
+
if (z.includes(u)) return;
|
|
732
|
+
const i = s.handlers || Le;
|
|
733
|
+
for (const c of Object.keys(i)) {
|
|
734
|
+
const [m, ...f] = c.split(".");
|
|
735
|
+
if (m === "keydown" && f.includes(u)) {
|
|
736
|
+
const p = i[c], w = f.filter((h) => z.includes(h)), v = z.some((h) => {
|
|
737
|
+
const _ = h.charAt(0).toUpperCase() + h.slice(1);
|
|
738
|
+
return r.getModifierState(_);
|
|
521
739
|
});
|
|
522
|
-
if (
|
|
523
|
-
if (
|
|
524
|
-
for (const
|
|
525
|
-
if (
|
|
526
|
-
const
|
|
527
|
-
r.getModifierState(
|
|
740
|
+
if (w.length > 0) {
|
|
741
|
+
if (v) {
|
|
742
|
+
for (const h of z)
|
|
743
|
+
if (f.includes(h)) {
|
|
744
|
+
const _ = h.charAt(0).toUpperCase() + h.slice(1);
|
|
745
|
+
r.getModifierState(_) && p(r);
|
|
528
746
|
}
|
|
529
747
|
}
|
|
530
748
|
} else
|
|
531
|
-
|
|
749
|
+
v || p(r);
|
|
532
750
|
}
|
|
533
751
|
}
|
|
534
|
-
},
|
|
535
|
-
|
|
536
|
-
for (const
|
|
537
|
-
const r = t(
|
|
538
|
-
for (const
|
|
539
|
-
const { focused:
|
|
540
|
-
|
|
752
|
+
}, a = [];
|
|
753
|
+
le(() => {
|
|
754
|
+
for (const s of e) {
|
|
755
|
+
const r = t(s), u = o(s), i = l(s), c = r ? [r] : u;
|
|
756
|
+
for (const m of c) {
|
|
757
|
+
const { focused: f } = Lt(y(m)), p = P(f, (w) => {
|
|
758
|
+
w ? m.addEventListener("keydown", i) : m.removeEventListener("keydown", i);
|
|
541
759
|
});
|
|
542
|
-
|
|
760
|
+
a.push(p);
|
|
543
761
|
}
|
|
544
762
|
}
|
|
545
|
-
}),
|
|
546
|
-
for (const
|
|
547
|
-
|
|
763
|
+
}), qe(() => {
|
|
764
|
+
for (const s of a)
|
|
765
|
+
s();
|
|
548
766
|
});
|
|
549
767
|
}
|
|
550
|
-
const
|
|
768
|
+
const Ht = {
|
|
551
769
|
class: "adatepicker",
|
|
552
770
|
tabindex: "0",
|
|
553
771
|
ref: "datepicker"
|
|
554
|
-
},
|
|
772
|
+
}, Rt = {
|
|
555
773
|
colspan: "5",
|
|
556
774
|
tabindex: -1
|
|
557
|
-
},
|
|
775
|
+
}, Bt = ["onClick", "onKeydown"], qt = 6, we = 7, Wt = /* @__PURE__ */ M({
|
|
558
776
|
__name: "ADatePicker",
|
|
559
777
|
props: {
|
|
560
778
|
modelValue: { default: /* @__PURE__ */ new Date() },
|
|
@@ -562,48 +780,48 @@ const pt = {
|
|
|
562
780
|
},
|
|
563
781
|
emits: ["update:modelValue"],
|
|
564
782
|
setup(e, { expose: t }) {
|
|
565
|
-
const n =
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
if (
|
|
570
|
-
|
|
783
|
+
const n = H(e, "modelValue"), o = y(new Date(n.value)), l = y(o.value.getMonth()), a = y(o.value.getFullYear()), s = y([]), r = Ae("datepicker");
|
|
784
|
+
le(async () => {
|
|
785
|
+
u(), await Ue();
|
|
786
|
+
const k = document.getElementsByClassName("selectedDate");
|
|
787
|
+
if (k.length > 0)
|
|
788
|
+
k[0].focus();
|
|
571
789
|
else {
|
|
572
|
-
const
|
|
573
|
-
|
|
790
|
+
const A = document.getElementsByClassName("todaysDate");
|
|
791
|
+
A.length > 0 && A[0].focus();
|
|
574
792
|
}
|
|
575
793
|
});
|
|
576
|
-
const
|
|
577
|
-
|
|
578
|
-
const
|
|
794
|
+
const u = () => {
|
|
795
|
+
s.value = [];
|
|
796
|
+
const k = new Date(a.value, l.value, 1), A = k.getDay(), C = k.setDate(k.getDate() - A);
|
|
579
797
|
for (const L of Array(43).keys())
|
|
580
|
-
|
|
798
|
+
s.value.push(C + L * 864e5);
|
|
581
799
|
};
|
|
582
|
-
|
|
583
|
-
const
|
|
584
|
-
l.value == 0 ? (l.value = 11,
|
|
585
|
-
},
|
|
586
|
-
l.value == 11 ? (l.value = 0,
|
|
587
|
-
},
|
|
588
|
-
const
|
|
589
|
-
if (l.value ===
|
|
590
|
-
return
|
|
591
|
-
},
|
|
592
|
-
n.value = o.value = new Date(
|
|
593
|
-
},
|
|
800
|
+
P([l, a], u);
|
|
801
|
+
const i = () => a.value -= 1, c = () => a.value += 1, m = () => {
|
|
802
|
+
l.value == 0 ? (l.value = 11, i()) : l.value -= 1;
|
|
803
|
+
}, f = () => {
|
|
804
|
+
l.value == 11 ? (l.value = 0, c()) : l.value += 1;
|
|
805
|
+
}, p = (k) => {
|
|
806
|
+
const A = /* @__PURE__ */ new Date();
|
|
807
|
+
if (l.value === A.getMonth())
|
|
808
|
+
return A.toDateString() === new Date(k).toDateString();
|
|
809
|
+
}, w = (k) => new Date(k).toDateString() === new Date(o.value).toDateString(), v = (k, A) => (k - 1) * we + A, h = (k, A) => s.value[v(k, A)], _ = (k) => {
|
|
810
|
+
n.value = o.value = new Date(s.value[k]);
|
|
811
|
+
}, B = I(() => new Date(a.value, l.value, 1).toLocaleDateString(void 0, {
|
|
594
812
|
year: "numeric",
|
|
595
813
|
month: "long"
|
|
596
814
|
}));
|
|
597
|
-
return
|
|
815
|
+
return Ft([
|
|
598
816
|
{
|
|
599
817
|
parent: r,
|
|
600
818
|
selectors: "td",
|
|
601
819
|
handlers: {
|
|
602
|
-
...
|
|
603
|
-
"keydown.pageup":
|
|
604
|
-
"keydown.shift.pageup":
|
|
605
|
-
"keydown.pagedown":
|
|
606
|
-
"keydown.shift.pagedown":
|
|
820
|
+
...Le,
|
|
821
|
+
"keydown.pageup": m,
|
|
822
|
+
"keydown.shift.pageup": i,
|
|
823
|
+
"keydown.pagedown": f,
|
|
824
|
+
"keydown.shift.pagedown": c,
|
|
607
825
|
// TODO: this is a hack to override the stonecrop enter handler;
|
|
608
826
|
// store context inside the component so that handlers can be setup consistently
|
|
609
827
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -611,62 +829,62 @@ const pt = {
|
|
|
611
829
|
}
|
|
612
830
|
}
|
|
613
831
|
}
|
|
614
|
-
]), t({ currentMonth: l, currentYear:
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
832
|
+
]), t({ currentMonth: l, currentYear: a, selectedDate: o }), (k, A) => (g(), b("div", Ht, [
|
|
833
|
+
d("table", null, [
|
|
834
|
+
d("tbody", null, [
|
|
835
|
+
d("tr", null, [
|
|
836
|
+
d("td", {
|
|
619
837
|
id: "previous-month-btn",
|
|
620
|
-
onClick:
|
|
838
|
+
onClick: m,
|
|
621
839
|
tabindex: -1
|
|
622
840
|
}, "<"),
|
|
623
|
-
|
|
624
|
-
|
|
841
|
+
d("th", Rt, D(B.value), 1),
|
|
842
|
+
d("td", {
|
|
625
843
|
id: "next-month-btn",
|
|
626
|
-
onClick:
|
|
844
|
+
onClick: f,
|
|
627
845
|
tabindex: -1
|
|
628
846
|
}, ">")
|
|
629
847
|
]),
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
848
|
+
A[0] || (A[0] = d("tr", { class: "days-header" }, [
|
|
849
|
+
d("td", null, "M"),
|
|
850
|
+
d("td", null, "T"),
|
|
851
|
+
d("td", null, "W"),
|
|
852
|
+
d("td", null, "T"),
|
|
853
|
+
d("td", null, "F"),
|
|
854
|
+
d("td", null, "S"),
|
|
855
|
+
d("td", null, "S")
|
|
638
856
|
], -1)),
|
|
639
|
-
(
|
|
640
|
-
(
|
|
857
|
+
(g(), b(U, null, N(qt, (C) => d("tr", { key: C }, [
|
|
858
|
+
(g(), b(U, null, N(we, (L) => d("td", {
|
|
641
859
|
ref_for: !0,
|
|
642
860
|
ref: "celldate",
|
|
643
|
-
key:
|
|
861
|
+
key: v(C, L),
|
|
644
862
|
contenteditable: !1,
|
|
645
863
|
spellcheck: !1,
|
|
646
864
|
tabindex: 0,
|
|
647
|
-
onClick: Ee((
|
|
648
|
-
onKeydown:
|
|
649
|
-
class:
|
|
650
|
-
todaysDate:
|
|
651
|
-
selectedDate:
|
|
865
|
+
onClick: Ee((Ve) => _(v(C, L)), ["prevent", "stop"]),
|
|
866
|
+
onKeydown: O((Ve) => _(v(C, L)), ["enter"]),
|
|
867
|
+
class: J({
|
|
868
|
+
todaysDate: p(h(C, L)),
|
|
869
|
+
selectedDate: w(h(C, L))
|
|
652
870
|
})
|
|
653
|
-
},
|
|
871
|
+
}, D(new Date(h(C, L)).getDate()), 43, Bt)), 64))
|
|
654
872
|
])), 64))
|
|
655
873
|
])
|
|
656
874
|
])
|
|
657
875
|
], 512));
|
|
658
876
|
}
|
|
659
|
-
}),
|
|
877
|
+
}), Ut = /* @__PURE__ */ T(Wt, [["__scopeId", "data-v-f49cfd40"]]), Nt = /* @__PURE__ */ M({
|
|
660
878
|
__name: "CollapseButton",
|
|
661
879
|
props: {
|
|
662
880
|
collapsed: { type: Boolean }
|
|
663
881
|
},
|
|
664
882
|
setup(e) {
|
|
665
|
-
return (t, n) => (
|
|
666
|
-
class:
|
|
883
|
+
return (t, n) => (g(), b("button", {
|
|
884
|
+
class: J(["collapse-button", t.collapsed ? "rotated" : "unrotated"])
|
|
667
885
|
}, "×", 2));
|
|
668
886
|
}
|
|
669
|
-
}),
|
|
887
|
+
}), Yt = /* @__PURE__ */ T(Nt, [["__scopeId", "data-v-6f1c1b45"]]), jt = { class: "aform" }, Gt = /* @__PURE__ */ M({
|
|
670
888
|
__name: "AForm",
|
|
671
889
|
props: {
|
|
672
890
|
modelValue: {},
|
|
@@ -675,36 +893,36 @@ const pt = {
|
|
|
675
893
|
},
|
|
676
894
|
emits: ["update:modelValue"],
|
|
677
895
|
setup(e, { emit: t }) {
|
|
678
|
-
const n = t, o =
|
|
896
|
+
const n = t, o = y(e.data || {}), l = (s) => {
|
|
679
897
|
let r = {};
|
|
680
|
-
for (const [
|
|
681
|
-
["component", "fieldtype"].includes(
|
|
898
|
+
for (const [u, i] of Object.entries(s))
|
|
899
|
+
["component", "fieldtype"].includes(u) || (r[u] = i), u === "rows" && i && i.length === 0 && (r.rows = o.value[s.fieldname]);
|
|
682
900
|
return r;
|
|
683
|
-
},
|
|
684
|
-
get: () => e.modelValue.map((
|
|
901
|
+
}, a = I({
|
|
902
|
+
get: () => e.modelValue.map((s, r) => I({
|
|
685
903
|
get() {
|
|
686
|
-
return
|
|
904
|
+
return s.value;
|
|
687
905
|
},
|
|
688
|
-
set: (
|
|
689
|
-
e.modelValue[r].value =
|
|
906
|
+
set: (u) => {
|
|
907
|
+
e.modelValue[r].value = u, n("update:modelValue", e.modelValue);
|
|
690
908
|
}
|
|
691
909
|
})),
|
|
692
910
|
set: () => {
|
|
693
911
|
}
|
|
694
912
|
});
|
|
695
|
-
return (
|
|
696
|
-
(
|
|
697
|
-
key:
|
|
698
|
-
schema:
|
|
699
|
-
modelValue:
|
|
700
|
-
"onUpdate:modelValue": (
|
|
701
|
-
data: o.value[
|
|
702
|
-
readonly:
|
|
913
|
+
return (s, r) => (g(), b("form", jt, [
|
|
914
|
+
(g(!0), b(U, null, N(s.modelValue, (u, i) => (g(), te(Ne(u.component), Ye({
|
|
915
|
+
key: i,
|
|
916
|
+
schema: u,
|
|
917
|
+
modelValue: a.value[i].value,
|
|
918
|
+
"onUpdate:modelValue": (c) => a.value[i].value = c,
|
|
919
|
+
data: o.value[u.fieldname],
|
|
920
|
+
readonly: s.readonly,
|
|
703
921
|
ref_for: !0
|
|
704
|
-
}, l(
|
|
922
|
+
}, l(u)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128))
|
|
705
923
|
]));
|
|
706
924
|
}
|
|
707
|
-
}),
|
|
925
|
+
}), xe = /* @__PURE__ */ T(Gt, [["__scopeId", "data-v-68845234"]]), Kt = /* @__PURE__ */ M({
|
|
708
926
|
__name: "AFieldset",
|
|
709
927
|
props: {
|
|
710
928
|
schema: {},
|
|
@@ -713,126 +931,126 @@ const pt = {
|
|
|
713
931
|
data: {}
|
|
714
932
|
},
|
|
715
933
|
setup(e, { expose: t }) {
|
|
716
|
-
const n =
|
|
717
|
-
|
|
934
|
+
const n = y(!1), o = y(e.data || []), l = y(e.schema), a = (s) => {
|
|
935
|
+
s.preventDefault(), e.collapsible && (n.value = !n.value);
|
|
718
936
|
};
|
|
719
|
-
return t({ collapsed: n }), (
|
|
720
|
-
|
|
721
|
-
onClick:
|
|
722
|
-
onSubmit:
|
|
937
|
+
return t({ collapsed: n }), (s, r) => (g(), b("fieldset", null, [
|
|
938
|
+
d("legend", {
|
|
939
|
+
onClick: a,
|
|
940
|
+
onSubmit: a
|
|
723
941
|
}, [
|
|
724
|
-
|
|
725
|
-
|
|
942
|
+
Me(D(s.label) + " ", 1),
|
|
943
|
+
s.collapsible ? (g(), te(Yt, {
|
|
726
944
|
key: 0,
|
|
727
945
|
collapsed: n.value
|
|
728
|
-
}, null, 8, ["collapsed"])) :
|
|
946
|
+
}, null, 8, ["collapsed"])) : se("", !0)
|
|
729
947
|
], 32),
|
|
730
|
-
|
|
731
|
-
|
|
948
|
+
je(s.$slots, "default", { collapsed: n.value }, () => [
|
|
949
|
+
E(Ge(xe, {
|
|
732
950
|
modelValue: l.value,
|
|
733
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
951
|
+
"onUpdate:modelValue": r[0] || (r[0] = (u) => l.value = u),
|
|
734
952
|
data: o.value
|
|
735
953
|
}, null, 8, ["modelValue", "data"]), [
|
|
736
|
-
[
|
|
954
|
+
[R, !n.value]
|
|
737
955
|
])
|
|
738
956
|
], !0)
|
|
739
957
|
]));
|
|
740
958
|
}
|
|
741
|
-
}),
|
|
742
|
-
function
|
|
743
|
-
return
|
|
959
|
+
}), zt = /* @__PURE__ */ T(Kt, [["__scopeId", "data-v-e7ea7e12"]]);
|
|
960
|
+
function Xt(e) {
|
|
961
|
+
return ne() ? (oe(e), !0) : !1;
|
|
744
962
|
}
|
|
745
|
-
function
|
|
963
|
+
function ke() {
|
|
746
964
|
const e = /* @__PURE__ */ new Set(), t = (l) => {
|
|
747
965
|
e.delete(l);
|
|
748
966
|
};
|
|
749
967
|
return {
|
|
750
968
|
on: (l) => {
|
|
751
969
|
e.add(l);
|
|
752
|
-
const
|
|
753
|
-
return
|
|
754
|
-
off:
|
|
970
|
+
const a = () => t(l);
|
|
971
|
+
return Xt(a), {
|
|
972
|
+
off: a
|
|
755
973
|
};
|
|
756
974
|
},
|
|
757
975
|
off: t,
|
|
758
|
-
trigger: (...l) => Promise.all(Array.from(e).map((
|
|
976
|
+
trigger: (...l) => Promise.all(Array.from(e).map((a) => a(...l)))
|
|
759
977
|
};
|
|
760
978
|
}
|
|
761
|
-
const
|
|
979
|
+
const Jt = typeof window < "u" && typeof document < "u";
|
|
762
980
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
763
|
-
const
|
|
981
|
+
const Qt = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Zt = Jt ? window.document : void 0, en = {
|
|
764
982
|
multiple: !0,
|
|
765
983
|
accept: "*",
|
|
766
984
|
reset: !1,
|
|
767
985
|
directory: !1
|
|
768
986
|
};
|
|
769
|
-
function
|
|
987
|
+
function tn(e = {}) {
|
|
770
988
|
const {
|
|
771
|
-
document: t =
|
|
772
|
-
} = e, n =
|
|
989
|
+
document: t = Zt
|
|
990
|
+
} = e, n = y(null), { on: o, trigger: l } = ke(), { on: a, trigger: s } = ke();
|
|
773
991
|
let r;
|
|
774
|
-
t && (r = t.createElement("input"), r.type = "file", r.onchange = (
|
|
775
|
-
const
|
|
776
|
-
n.value =
|
|
992
|
+
t && (r = t.createElement("input"), r.type = "file", r.onchange = (c) => {
|
|
993
|
+
const m = c.target;
|
|
994
|
+
n.value = m.files, l(n.value);
|
|
777
995
|
}, r.oncancel = () => {
|
|
778
|
-
|
|
996
|
+
s();
|
|
779
997
|
});
|
|
780
|
-
const
|
|
998
|
+
const u = () => {
|
|
781
999
|
n.value = null, r && r.value && (r.value = "", l(null));
|
|
782
|
-
},
|
|
1000
|
+
}, i = (c) => {
|
|
783
1001
|
if (!r)
|
|
784
1002
|
return;
|
|
785
|
-
const
|
|
786
|
-
|
|
1003
|
+
const m = {
|
|
1004
|
+
...en,
|
|
787
1005
|
...e,
|
|
788
|
-
...
|
|
1006
|
+
...c
|
|
789
1007
|
};
|
|
790
|
-
r.multiple =
|
|
1008
|
+
r.multiple = m.multiple, r.accept = m.accept, r.webkitdirectory = m.directory, Qt(m, "capture") && (r.capture = m.capture), m.reset && u(), r.click();
|
|
791
1009
|
};
|
|
792
1010
|
return {
|
|
793
|
-
files:
|
|
794
|
-
open:
|
|
795
|
-
reset:
|
|
796
|
-
onCancel:
|
|
1011
|
+
files: De(n),
|
|
1012
|
+
open: i,
|
|
1013
|
+
reset: u,
|
|
1014
|
+
onCancel: a,
|
|
797
1015
|
onChange: o
|
|
798
1016
|
};
|
|
799
1017
|
}
|
|
800
|
-
const
|
|
1018
|
+
const nn = { class: "aform_form-element aform_file-attach aform__grid--full" }, on = {
|
|
801
1019
|
key: 0,
|
|
802
1020
|
class: "aform_file-attach-feedback"
|
|
803
|
-
},
|
|
1021
|
+
}, ln = ["disabled"], sn = /* @__PURE__ */ M({
|
|
804
1022
|
__name: "AFileAttach",
|
|
805
1023
|
props: {
|
|
806
1024
|
label: {}
|
|
807
1025
|
},
|
|
808
1026
|
setup(e) {
|
|
809
|
-
const { files: t, open: n, reset: o, onChange: l } =
|
|
810
|
-
return l((
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
r[2] || (r[2] =
|
|
814
|
-
|
|
1027
|
+
const { files: t, open: n, reset: o, onChange: l } = tn(), a = I(() => `${t.value.length} ${t.value.length === 1 ? "file" : "files"}`);
|
|
1028
|
+
return l((s) => s), (s, r) => (g(), b("div", nn, [
|
|
1029
|
+
x(t) ? (g(), b("div", on, [
|
|
1030
|
+
d("p", null, [
|
|
1031
|
+
r[2] || (r[2] = Me(" You have selected: ")),
|
|
1032
|
+
d("b", null, D(a.value), 1)
|
|
815
1033
|
]),
|
|
816
|
-
(
|
|
817
|
-
key:
|
|
818
|
-
},
|
|
819
|
-
])) :
|
|
820
|
-
|
|
1034
|
+
(g(!0), b(U, null, N(x(t), (u) => (g(), b("li", {
|
|
1035
|
+
key: u.name
|
|
1036
|
+
}, D(u.name), 1))), 128))
|
|
1037
|
+
])) : se("", !0),
|
|
1038
|
+
d("button", {
|
|
821
1039
|
type: "button",
|
|
822
|
-
onClick: r[0] || (r[0] = (
|
|
1040
|
+
onClick: r[0] || (r[0] = (u) => x(n)()),
|
|
823
1041
|
class: "aform_form-btn"
|
|
824
|
-
},
|
|
825
|
-
|
|
1042
|
+
}, D(s.label), 1),
|
|
1043
|
+
d("button", {
|
|
826
1044
|
type: "button",
|
|
827
|
-
disabled: !
|
|
828
|
-
onClick: r[1] || (r[1] = (
|
|
1045
|
+
disabled: !x(t),
|
|
1046
|
+
onClick: r[1] || (r[1] = (u) => x(o)()),
|
|
829
1047
|
class: "aform_form-btn"
|
|
830
|
-
}, "Reset", 8,
|
|
1048
|
+
}, "Reset", 8, ln)
|
|
831
1049
|
]));
|
|
832
1050
|
}
|
|
833
|
-
}),
|
|
1051
|
+
}), an = /* @__PURE__ */ T(sn, [["__scopeId", "data-v-0b3a11cc"]]), rn = { class: "aform_form-element" }, un = ["id", "disabled", "required"], cn = ["for"], dn = ["innerHTML"], fn = /* @__PURE__ */ M({
|
|
834
1052
|
__name: "ANumericInput",
|
|
835
|
-
props: /* @__PURE__ */
|
|
1053
|
+
props: /* @__PURE__ */ G({
|
|
836
1054
|
schema: {},
|
|
837
1055
|
label: {},
|
|
838
1056
|
mask: {},
|
|
@@ -846,31 +1064,31 @@ const Vt = { class: "aform_form-element aform_file-attach aform__grid--full" },
|
|
|
846
1064
|
}),
|
|
847
1065
|
emits: ["update:modelValue"],
|
|
848
1066
|
setup(e) {
|
|
849
|
-
const t =
|
|
850
|
-
return (n, o) => (
|
|
851
|
-
|
|
1067
|
+
const t = H(e, "modelValue");
|
|
1068
|
+
return (n, o) => (g(), b("div", rn, [
|
|
1069
|
+
E(d("input", {
|
|
852
1070
|
class: "aform_input-field",
|
|
853
1071
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
|
|
854
1072
|
type: "number",
|
|
855
1073
|
id: n.uuid,
|
|
856
1074
|
disabled: n.readonly,
|
|
857
1075
|
required: n.required
|
|
858
|
-
}, null, 8,
|
|
859
|
-
[
|
|
1076
|
+
}, null, 8, un), [
|
|
1077
|
+
[F, t.value]
|
|
860
1078
|
]),
|
|
861
|
-
|
|
1079
|
+
d("label", {
|
|
862
1080
|
class: "aform_field-label",
|
|
863
1081
|
for: n.uuid
|
|
864
|
-
},
|
|
865
|
-
|
|
1082
|
+
}, D(n.label), 9, cn),
|
|
1083
|
+
E(d("p", {
|
|
866
1084
|
class: "aform_error",
|
|
867
1085
|
innerHTML: n.validation.errorMessage
|
|
868
|
-
}, null, 8,
|
|
869
|
-
[
|
|
1086
|
+
}, null, 8, dn), [
|
|
1087
|
+
[R, n.validation.errorMessage]
|
|
870
1088
|
])
|
|
871
1089
|
]));
|
|
872
1090
|
}
|
|
873
|
-
}),
|
|
1091
|
+
}), _e = {
|
|
874
1092
|
date: "##/##/####",
|
|
875
1093
|
datetime: "####/##/## ##:##",
|
|
876
1094
|
time: "##:##",
|
|
@@ -878,59 +1096,59 @@ const Vt = { class: "aform_form-element aform_file-attach aform__grid--full" },
|
|
|
878
1096
|
phone: "(###) ### - ####",
|
|
879
1097
|
card: "#### #### #### ####"
|
|
880
1098
|
};
|
|
881
|
-
function
|
|
1099
|
+
function mn(e) {
|
|
882
1100
|
try {
|
|
883
1101
|
return Function(`"use strict";return (${e})`)();
|
|
884
1102
|
} catch {
|
|
885
1103
|
}
|
|
886
1104
|
}
|
|
887
|
-
function
|
|
1105
|
+
function pn(e) {
|
|
888
1106
|
var n, o, l;
|
|
889
1107
|
let t = e.value;
|
|
890
1108
|
if (t) {
|
|
891
|
-
const
|
|
892
|
-
if (
|
|
893
|
-
const
|
|
894
|
-
t = s
|
|
1109
|
+
const a = mn(t);
|
|
1110
|
+
if (a) {
|
|
1111
|
+
const s = (n = e.instance) == null ? void 0 : n.locale;
|
|
1112
|
+
t = a(s);
|
|
895
1113
|
}
|
|
896
1114
|
} else {
|
|
897
|
-
const
|
|
898
|
-
|
|
1115
|
+
const a = (o = e.instance) == null ? void 0 : o.schema, s = (l = a == null ? void 0 : a.fieldtype) == null ? void 0 : l.toLowerCase();
|
|
1116
|
+
s && _e[s] && (t = _e[s]);
|
|
899
1117
|
}
|
|
900
1118
|
return t;
|
|
901
1119
|
}
|
|
902
|
-
function
|
|
1120
|
+
function vn(e, t) {
|
|
903
1121
|
let n = e;
|
|
904
1122
|
const o = [t, "/", "-", "(", ")", " "];
|
|
905
1123
|
for (const l of o)
|
|
906
1124
|
n = n.replaceAll(l, "");
|
|
907
1125
|
return n;
|
|
908
1126
|
}
|
|
909
|
-
function
|
|
1127
|
+
function hn(e, t, n) {
|
|
910
1128
|
let o = t;
|
|
911
1129
|
for (const l of e) {
|
|
912
|
-
const
|
|
913
|
-
if (
|
|
914
|
-
const
|
|
915
|
-
o =
|
|
1130
|
+
const a = o.indexOf(n);
|
|
1131
|
+
if (a !== -1) {
|
|
1132
|
+
const s = o.substring(0, a), r = o.substring(a + 1);
|
|
1133
|
+
o = s + l + r;
|
|
916
1134
|
}
|
|
917
1135
|
}
|
|
918
1136
|
return o.slice(0, t.length);
|
|
919
1137
|
}
|
|
920
|
-
function
|
|
921
|
-
var
|
|
922
|
-
const n =
|
|
1138
|
+
function gn(e, t) {
|
|
1139
|
+
var s;
|
|
1140
|
+
const n = pn(t);
|
|
923
1141
|
if (!n) return;
|
|
924
|
-
const o = "#", l = e.value,
|
|
925
|
-
if (
|
|
926
|
-
const r =
|
|
927
|
-
(
|
|
1142
|
+
const o = "#", l = e.value, a = vn(l, o);
|
|
1143
|
+
if (a) {
|
|
1144
|
+
const r = hn(a, n, o);
|
|
1145
|
+
(s = t.instance) != null && s.maskFilled && (t.instance.maskFilled = !r.includes(o)), e.value = r;
|
|
928
1146
|
} else
|
|
929
1147
|
e.value = n;
|
|
930
1148
|
}
|
|
931
|
-
const
|
|
1149
|
+
const yn = { class: "aform_form-element" }, bn = ["id", "disabled", "maxlength", "required"], wn = ["for"], kn = ["innerHTML"], _n = /* @__PURE__ */ M({
|
|
932
1150
|
__name: "ATextInput",
|
|
933
|
-
props: /* @__PURE__ */
|
|
1151
|
+
props: /* @__PURE__ */ G({
|
|
934
1152
|
schema: {},
|
|
935
1153
|
label: {},
|
|
936
1154
|
mask: {},
|
|
@@ -944,35 +1162,35 @@ const zt = { class: "aform_form-element" }, Nt = ["id", "disabled", "maxlength",
|
|
|
944
1162
|
}),
|
|
945
1163
|
emits: ["update:modelValue"],
|
|
946
1164
|
setup(e) {
|
|
947
|
-
const t =
|
|
948
|
-
return (o, l) => (
|
|
949
|
-
|
|
1165
|
+
const t = y(!0), n = H(e, "modelValue");
|
|
1166
|
+
return (o, l) => (g(), b("div", yn, [
|
|
1167
|
+
E(d("input", {
|
|
950
1168
|
class: "aform_input-field",
|
|
951
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
1169
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => n.value = a),
|
|
952
1170
|
id: o.uuid,
|
|
953
1171
|
disabled: o.readonly,
|
|
954
1172
|
maxlength: o.mask ? t.value && o.mask.length : void 0,
|
|
955
1173
|
required: o.required
|
|
956
|
-
}, null, 8,
|
|
957
|
-
[
|
|
958
|
-
[
|
|
1174
|
+
}, null, 8, bn), [
|
|
1175
|
+
[F, n.value],
|
|
1176
|
+
[x(gn), o.mask]
|
|
959
1177
|
]),
|
|
960
|
-
|
|
1178
|
+
d("label", {
|
|
961
1179
|
class: "aform_field-label",
|
|
962
1180
|
for: o.uuid
|
|
963
|
-
},
|
|
964
|
-
|
|
1181
|
+
}, D(o.label), 9, wn),
|
|
1182
|
+
E(d("p", {
|
|
965
1183
|
class: "aform_error",
|
|
966
1184
|
innerHTML: o.validation.errorMessage
|
|
967
|
-
}, null, 8,
|
|
968
|
-
[
|
|
1185
|
+
}, null, 8, kn), [
|
|
1186
|
+
[R, o.validation.errorMessage]
|
|
969
1187
|
])
|
|
970
1188
|
]));
|
|
971
1189
|
}
|
|
972
|
-
}),
|
|
1190
|
+
}), An = { class: "login-container" }, Dn = { class: "account-container" }, En = { class: "account-header" }, Mn = { id: "account-title" }, Cn = { id: "account-subtitle" }, In = { class: "login-form-container" }, Tn = { class: "login-form-email aform_form-element" }, Sn = ["disabled"], $n = { class: "login-form-password aform_form-element" }, Ln = ["disabled"], xn = ["disabled"], Vn = {
|
|
973
1191
|
key: 0,
|
|
974
1192
|
class: "material-symbols-outlined loading-icon"
|
|
975
|
-
},
|
|
1193
|
+
}, Pn = /* @__PURE__ */ M({
|
|
976
1194
|
__name: "Login",
|
|
977
1195
|
props: {
|
|
978
1196
|
headerTitle: { default: "Login" },
|
|
@@ -980,94 +1198,94 @@ const zt = { class: "aform_form-element" }, Nt = ["id", "disabled", "maxlength",
|
|
|
980
1198
|
},
|
|
981
1199
|
emits: ["loginFailed", "loginSuccess"],
|
|
982
1200
|
setup(e, { emit: t }) {
|
|
983
|
-
const n = t, o =
|
|
984
|
-
function r(
|
|
985
|
-
if (
|
|
986
|
-
|
|
1201
|
+
const n = t, o = y(""), l = y(""), a = y(!1), s = y(!1);
|
|
1202
|
+
function r(u) {
|
|
1203
|
+
if (u.preventDefault(), a.value = !0, s.value) {
|
|
1204
|
+
a.value = !1, n("loginFailed");
|
|
987
1205
|
return;
|
|
988
1206
|
}
|
|
989
|
-
|
|
1207
|
+
a.value = !1, n("loginSuccess");
|
|
990
1208
|
}
|
|
991
|
-
return (
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
1209
|
+
return (u, i) => (g(), b("div", An, [
|
|
1210
|
+
d("div", null, [
|
|
1211
|
+
d("div", Dn, [
|
|
1212
|
+
d("div", En, [
|
|
1213
|
+
d("h1", Mn, D(u.headerTitle), 1),
|
|
1214
|
+
d("p", Cn, D(u.headerSubtitle), 1)
|
|
997
1215
|
]),
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1216
|
+
d("form", { onSubmit: r }, [
|
|
1217
|
+
d("div", In, [
|
|
1218
|
+
d("div", Tn, [
|
|
1219
|
+
i[2] || (i[2] = d("label", {
|
|
1002
1220
|
id: "login-email",
|
|
1003
1221
|
for: "email",
|
|
1004
1222
|
class: "aform_field-label"
|
|
1005
1223
|
}, "Email", -1)),
|
|
1006
|
-
|
|
1224
|
+
E(d("input", {
|
|
1007
1225
|
id: "email",
|
|
1008
1226
|
class: "aform_input-field",
|
|
1009
1227
|
name: "email",
|
|
1010
1228
|
placeholder: "name@example.com",
|
|
1011
1229
|
type: "email",
|
|
1012
|
-
"onUpdate:modelValue":
|
|
1230
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => o.value = c),
|
|
1013
1231
|
"auto-capitalize": "none",
|
|
1014
1232
|
"auto-complete": "email",
|
|
1015
1233
|
"auto-correct": "off",
|
|
1016
|
-
disabled:
|
|
1017
|
-
}, null, 8,
|
|
1018
|
-
[
|
|
1234
|
+
disabled: a.value
|
|
1235
|
+
}, null, 8, Sn), [
|
|
1236
|
+
[F, o.value]
|
|
1019
1237
|
])
|
|
1020
1238
|
]),
|
|
1021
|
-
|
|
1022
|
-
|
|
1239
|
+
d("div", $n, [
|
|
1240
|
+
i[3] || (i[3] = d("label", {
|
|
1023
1241
|
id: "login-password",
|
|
1024
1242
|
for: "password",
|
|
1025
1243
|
class: "aform_field-label"
|
|
1026
1244
|
}, "Password", -1)),
|
|
1027
|
-
|
|
1245
|
+
E(d("input", {
|
|
1028
1246
|
id: "password",
|
|
1029
1247
|
class: "aform_input-field",
|
|
1030
1248
|
name: "password",
|
|
1031
1249
|
type: "password",
|
|
1032
|
-
"onUpdate:modelValue":
|
|
1033
|
-
disabled:
|
|
1034
|
-
}, null, 8,
|
|
1035
|
-
[
|
|
1250
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => l.value = c),
|
|
1251
|
+
disabled: a.value
|
|
1252
|
+
}, null, 8, Ln), [
|
|
1253
|
+
[F, l.value]
|
|
1036
1254
|
])
|
|
1037
1255
|
]),
|
|
1038
|
-
|
|
1256
|
+
d("button", {
|
|
1039
1257
|
class: "btn",
|
|
1040
1258
|
onClick: r,
|
|
1041
|
-
disabled:
|
|
1259
|
+
disabled: a.value || !o.value || !l.value
|
|
1042
1260
|
}, [
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
], 8,
|
|
1261
|
+
a.value ? (g(), b("span", Vn, "progress_activity")) : se("", !0),
|
|
1262
|
+
i[4] || (i[4] = d("span", { id: "login-form-button" }, "Login", -1))
|
|
1263
|
+
], 8, xn)
|
|
1046
1264
|
])
|
|
1047
1265
|
], 32),
|
|
1048
|
-
|
|
1049
|
-
|
|
1266
|
+
i[5] || (i[5] = d("button", { class: "btn" }, [
|
|
1267
|
+
d("span", { id: "forgot-password-button" }, "Forgot password?")
|
|
1050
1268
|
], -1))
|
|
1051
1269
|
])
|
|
1052
1270
|
])
|
|
1053
1271
|
]));
|
|
1054
1272
|
}
|
|
1055
|
-
}),
|
|
1056
|
-
function
|
|
1057
|
-
e.component("ACheckbox",
|
|
1273
|
+
}), Fn = /* @__PURE__ */ T(Pn, [["__scopeId", "data-v-6cbd3add"]]);
|
|
1274
|
+
function Hn(e) {
|
|
1275
|
+
e.component("ACheckbox", et), e.component("ACombobox", tt), e.component("ADate", at), e.component("ADropdown", wt), e.component("ADatePicker", Ut), e.component("AFieldset", zt), e.component("AFileAttach", an), e.component("AForm", xe), e.component("ANumericInput", fn), e.component("ATextInput", _n);
|
|
1058
1276
|
}
|
|
1059
1277
|
export {
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1278
|
+
et as ACheckbox,
|
|
1279
|
+
tt as AComboBox,
|
|
1280
|
+
at as ADate,
|
|
1281
|
+
Ut as ADatePicker,
|
|
1282
|
+
wt as ADropdown,
|
|
1283
|
+
zt as AFieldset,
|
|
1284
|
+
an as AFileAttach,
|
|
1285
|
+
xe as AForm,
|
|
1286
|
+
fn as ANumericInput,
|
|
1287
|
+
_n as ATextInput,
|
|
1288
|
+
Fn as Login,
|
|
1289
|
+
Hn as install
|
|
1072
1290
|
};
|
|
1073
1291
|
//# sourceMappingURL=aform.js.map
|