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