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