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