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