@stonecrop/aform 0.7.9 → 0.8.1
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.d.ts +98 -1
- package/dist/aform.js +2594 -503
- 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/index.js +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +96 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +5 -7
- package/src/components/AForm.vue +108 -39
- package/src/components/form/AFieldset.vue +1 -1
- package/src/index.ts +2 -0
- package/src/types/index.ts +108 -1
package/dist/aform.js
CHANGED
|
@@ -1,7 +1,2068 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as j, useTemplateRef as ne, ref as S, computed as M, createElementBlock as k, openBlock as x, unref as $, normalizeClass as ee, normalizeStyle as ce, createBlock as re, resolveDynamicComponent as Ae, mergeProps as et, toDisplayString as W, createCommentVNode as K, createElementVNode as y, Fragment as te, renderList as ae, withDirectives as U, renderSlot as oe, createTextVNode as Ct, withModifiers as $e, onMounted as ve, watch as Y, onBeforeUnmount as tn, nextTick as tt, useCssVars as xn, onUnmounted as bn, vShow as be, mergeModels as de, useModel as fe, createVNode as Ze, withCtx as It, shallowRef as J, toValue as T, reactive as nn, vModelText as se, vModelCheckbox as on, vModelSelect as In, isRef as kn, toRefs as Cn, customRef as Et, getCurrentScope as nt, onScopeDispose as ot, getCurrentInstance as lt, watchEffect as Ce, toRef as ln, readonly as Dt, resolveComponent as an, withKeys as De } from "vue";
|
|
2
|
+
import { defineStore as En } from "pinia";
|
|
3
|
+
import './assets/index.css';function rn(e, t) {
|
|
4
|
+
return nt() ? (ot(e, t), !0) : !1;
|
|
5
|
+
}
|
|
6
|
+
const Dn = typeof window < "u" && typeof document < "u";
|
|
7
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
8
|
+
const Tn = (e) => e != null, An = Object.prototype.toString, $n = (e) => An.call(e) === "[object Object]", Mn = () => {
|
|
9
|
+
};
|
|
10
|
+
function Je(e) {
|
|
11
|
+
return Array.isArray(e) ? e : [e];
|
|
12
|
+
}
|
|
13
|
+
function Sn(e, t, n) {
|
|
14
|
+
return Y(e, t, {
|
|
15
|
+
...n,
|
|
16
|
+
immediate: !0
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
const Le = Dn ? window : void 0;
|
|
20
|
+
function Me(e) {
|
|
21
|
+
var t;
|
|
22
|
+
const n = T(e);
|
|
23
|
+
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
24
|
+
}
|
|
25
|
+
function Oe(...e) {
|
|
26
|
+
const t = (o, a, s, l) => (o.addEventListener(a, s, l), () => o.removeEventListener(a, s, l)), n = M(() => {
|
|
27
|
+
const o = Je(T(e[0])).filter((a) => a != null);
|
|
28
|
+
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
29
|
+
});
|
|
30
|
+
return Sn(() => {
|
|
31
|
+
var o, a;
|
|
32
|
+
return [
|
|
33
|
+
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((s) => Me(s))) !== null && o !== void 0 ? o : [Le].filter((s) => s != null),
|
|
34
|
+
Je(T(n.value ? e[1] : e[0])),
|
|
35
|
+
Je($(n.value ? e[2] : e[1])),
|
|
36
|
+
T(n.value ? e[3] : e[2])
|
|
37
|
+
];
|
|
38
|
+
}, ([o, a, s, l], r, i) => {
|
|
39
|
+
if (!o?.length || !a?.length || !s?.length) return;
|
|
40
|
+
const u = $n(l) ? { ...l } : l, c = o.flatMap((m) => a.flatMap((g) => s.map((p) => t(m, g, p, u))));
|
|
41
|
+
i(() => {
|
|
42
|
+
c.forEach((m) => m());
|
|
43
|
+
});
|
|
44
|
+
}, { flush: "post" });
|
|
45
|
+
}
|
|
46
|
+
// @__NO_SIDE_EFFECTS__
|
|
47
|
+
function Ln() {
|
|
48
|
+
const e = J(!1), t = lt();
|
|
49
|
+
return t && ve(() => {
|
|
50
|
+
e.value = !0;
|
|
51
|
+
}, t), e;
|
|
52
|
+
}
|
|
53
|
+
// @__NO_SIDE_EFFECTS__
|
|
54
|
+
function Rn(e) {
|
|
55
|
+
const t = /* @__PURE__ */ Ln();
|
|
56
|
+
return M(() => (t.value, !!e()));
|
|
57
|
+
}
|
|
58
|
+
function Vn(e, t, n = {}) {
|
|
59
|
+
const { window: o = Le, ...a } = n;
|
|
60
|
+
let s;
|
|
61
|
+
const l = /* @__PURE__ */ Rn(() => o && "MutationObserver" in o), r = () => {
|
|
62
|
+
s && (s.disconnect(), s = void 0);
|
|
63
|
+
}, i = Y(M(() => {
|
|
64
|
+
const m = Je(T(e)).map(Me).filter(Tn);
|
|
65
|
+
return new Set(m);
|
|
66
|
+
}), (m) => {
|
|
67
|
+
r(), l.value && m.size && (s = new MutationObserver(t), m.forEach((g) => s.observe(g, a)));
|
|
68
|
+
}, {
|
|
69
|
+
immediate: !0,
|
|
70
|
+
flush: "post"
|
|
71
|
+
}), u = () => s?.takeRecords(), c = () => {
|
|
72
|
+
i(), r();
|
|
73
|
+
};
|
|
74
|
+
return rn(c), {
|
|
75
|
+
isSupported: l,
|
|
76
|
+
stop: c,
|
|
77
|
+
takeRecords: u
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function Pn(e, t, n = {}) {
|
|
81
|
+
const { window: o = Le, document: a = o?.document, flush: s = "sync" } = n;
|
|
82
|
+
if (!o || !a) return Mn;
|
|
83
|
+
let l;
|
|
84
|
+
const r = (c) => {
|
|
85
|
+
l?.(), l = c;
|
|
86
|
+
}, i = Ce(() => {
|
|
87
|
+
const c = Me(e);
|
|
88
|
+
if (c) {
|
|
89
|
+
const { stop: m } = Vn(a, (g) => {
|
|
90
|
+
g.map((p) => [...p.removedNodes]).flat().some((p) => p === c || p.contains(c)) && t(g);
|
|
91
|
+
}, {
|
|
92
|
+
window: o,
|
|
93
|
+
childList: !0,
|
|
94
|
+
subtree: !0
|
|
95
|
+
});
|
|
96
|
+
r(m);
|
|
97
|
+
}
|
|
98
|
+
}, { flush: s }), u = () => {
|
|
99
|
+
i(), r();
|
|
100
|
+
};
|
|
101
|
+
return rn(u), u;
|
|
102
|
+
}
|
|
103
|
+
// @__NO_SIDE_EFFECTS__
|
|
104
|
+
function On(e = {}) {
|
|
105
|
+
var t;
|
|
106
|
+
const { window: n = Le, deep: o = !0, triggerOnRemoval: a = !1 } = e, s = (t = e.document) !== null && t !== void 0 ? t : n?.document, l = () => {
|
|
107
|
+
let u = s?.activeElement;
|
|
108
|
+
if (o)
|
|
109
|
+
for (var c; u?.shadowRoot; ) u = u == null || (c = u.shadowRoot) === null || c === void 0 ? void 0 : c.activeElement;
|
|
110
|
+
return u;
|
|
111
|
+
}, r = J(), i = () => {
|
|
112
|
+
r.value = l();
|
|
113
|
+
};
|
|
114
|
+
if (n) {
|
|
115
|
+
const u = {
|
|
116
|
+
capture: !0,
|
|
117
|
+
passive: !0
|
|
118
|
+
};
|
|
119
|
+
Oe(n, "blur", (c) => {
|
|
120
|
+
c.relatedTarget === null && i();
|
|
121
|
+
}, u), Oe(n, "focus", i, u);
|
|
122
|
+
}
|
|
123
|
+
return a && Pn(r, i, { document: s }), i(), r;
|
|
124
|
+
}
|
|
125
|
+
const _n = "focusin", Hn = "focusout", Fn = ":focus-within";
|
|
126
|
+
function Nn(e, t = {}) {
|
|
127
|
+
const { window: n = Le } = t, o = M(() => Me(e)), a = J(!1), s = M(() => a.value);
|
|
128
|
+
if (!n || !(/* @__PURE__ */ On(t)).value) return { focused: s };
|
|
129
|
+
const l = { passive: !0 };
|
|
130
|
+
return Oe(o, _n, () => a.value = !0, l), Oe(o, Hn, () => {
|
|
131
|
+
var r, i, u;
|
|
132
|
+
return a.value = (r = (i = o.value) === null || i === void 0 || (u = i.matches) === null || u === void 0 ? void 0 : u.call(i, Fn)) !== null && r !== void 0 ? r : !1;
|
|
133
|
+
}, l), { focused: s };
|
|
134
|
+
}
|
|
135
|
+
function Bn(e, { window: t = Le, scrollTarget: n } = {}) {
|
|
136
|
+
const o = S(!1), a = () => {
|
|
137
|
+
if (!t) return;
|
|
138
|
+
const s = t.document, l = Me(e);
|
|
139
|
+
if (!l)
|
|
140
|
+
o.value = !1;
|
|
141
|
+
else {
|
|
142
|
+
const r = l.getBoundingClientRect();
|
|
143
|
+
o.value = r.top <= (t.innerHeight || s.documentElement.clientHeight) && r.left <= (t.innerWidth || s.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
return Y(
|
|
147
|
+
() => Me(e),
|
|
148
|
+
() => a(),
|
|
149
|
+
{ immediate: !0, flush: "post" }
|
|
150
|
+
), t && Oe(n || t, "scroll", a, {
|
|
151
|
+
capture: !1,
|
|
152
|
+
passive: !0
|
|
153
|
+
}), o;
|
|
154
|
+
}
|
|
155
|
+
const me = (e) => {
|
|
156
|
+
let t = Bn(e).value;
|
|
157
|
+
return t = t && e.offsetHeight > 0, t;
|
|
158
|
+
}, pe = (e) => e.tabIndex >= 0, Ht = (e) => {
|
|
159
|
+
const t = e.target;
|
|
160
|
+
return Tt(t);
|
|
161
|
+
}, Tt = (e) => {
|
|
162
|
+
let t;
|
|
163
|
+
if (e instanceof HTMLTableCellElement) {
|
|
164
|
+
const n = e.parentElement?.previousElementSibling;
|
|
165
|
+
if (n) {
|
|
166
|
+
const o = Array.from(n.children)[e.cellIndex];
|
|
167
|
+
o && (t = o);
|
|
168
|
+
}
|
|
169
|
+
} else if (e instanceof HTMLTableRowElement) {
|
|
170
|
+
const n = e.previousElementSibling;
|
|
171
|
+
n && (t = n);
|
|
172
|
+
}
|
|
173
|
+
return t && (!pe(t) || !me(t)) ? Tt(t) : t;
|
|
174
|
+
}, Gn = (e) => {
|
|
175
|
+
const t = e.target;
|
|
176
|
+
let n;
|
|
177
|
+
if (t instanceof HTMLTableCellElement) {
|
|
178
|
+
const o = t.parentElement?.parentElement;
|
|
179
|
+
if (o) {
|
|
180
|
+
const a = o.firstElementChild?.children[t.cellIndex];
|
|
181
|
+
a && (n = a);
|
|
182
|
+
}
|
|
183
|
+
} else if (t instanceof HTMLTableRowElement) {
|
|
184
|
+
const o = t.parentElement;
|
|
185
|
+
if (o) {
|
|
186
|
+
const a = o.firstElementChild;
|
|
187
|
+
a && (n = a);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return n && (!pe(n) || !me(n)) ? At(n) : n;
|
|
191
|
+
}, Ft = (e) => {
|
|
192
|
+
const t = e.target;
|
|
193
|
+
return At(t);
|
|
194
|
+
}, At = (e) => {
|
|
195
|
+
let t;
|
|
196
|
+
if (e instanceof HTMLTableCellElement) {
|
|
197
|
+
const n = e.parentElement?.nextElementSibling;
|
|
198
|
+
if (n) {
|
|
199
|
+
const o = Array.from(n.children)[e.cellIndex];
|
|
200
|
+
o && (t = o);
|
|
201
|
+
}
|
|
202
|
+
} else if (e instanceof HTMLTableRowElement) {
|
|
203
|
+
const n = e.nextElementSibling;
|
|
204
|
+
n && (t = n);
|
|
205
|
+
}
|
|
206
|
+
return t && (!pe(t) || !me(t)) ? At(t) : t;
|
|
207
|
+
}, Un = (e) => {
|
|
208
|
+
const t = e.target;
|
|
209
|
+
let n;
|
|
210
|
+
if (t instanceof HTMLTableCellElement) {
|
|
211
|
+
const o = t.parentElement?.parentElement;
|
|
212
|
+
if (o) {
|
|
213
|
+
const a = o.lastElementChild?.children[t.cellIndex];
|
|
214
|
+
a && (n = a);
|
|
215
|
+
}
|
|
216
|
+
} else if (t instanceof HTMLTableRowElement) {
|
|
217
|
+
const o = t.parentElement;
|
|
218
|
+
if (o) {
|
|
219
|
+
const a = o.lastElementChild;
|
|
220
|
+
a && (n = a);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return n && (!pe(n) || !me(n)) ? Tt(n) : n;
|
|
224
|
+
}, Nt = (e) => {
|
|
225
|
+
const t = e.target;
|
|
226
|
+
return $t(t);
|
|
227
|
+
}, $t = (e) => {
|
|
228
|
+
let t;
|
|
229
|
+
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!pe(t) || !me(t)) ? $t(t) : t;
|
|
230
|
+
}, Bt = (e) => {
|
|
231
|
+
const t = e.target;
|
|
232
|
+
return Mt(t);
|
|
233
|
+
}, Mt = (e) => {
|
|
234
|
+
let t;
|
|
235
|
+
return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!pe(t) || !me(t)) ? Mt(t) : t;
|
|
236
|
+
}, Gt = (e) => {
|
|
237
|
+
const t = e.target.parentElement?.firstElementChild;
|
|
238
|
+
return t && (!pe(t) || !me(t)) ? Mt(t) : t;
|
|
239
|
+
}, Ut = (e) => {
|
|
240
|
+
const t = e.target.parentElement?.lastElementChild;
|
|
241
|
+
return t && (!pe(t) || !me(t)) ? $t(t) : t;
|
|
242
|
+
}, je = ["alt", "control", "shift", "meta"], zn = {
|
|
243
|
+
ArrowUp: "up",
|
|
244
|
+
ArrowDown: "down",
|
|
245
|
+
ArrowLeft: "left",
|
|
246
|
+
ArrowRight: "right"
|
|
247
|
+
}, at = {
|
|
248
|
+
"keydown.up": (e) => {
|
|
249
|
+
const t = Ht(e);
|
|
250
|
+
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
251
|
+
},
|
|
252
|
+
"keydown.down": (e) => {
|
|
253
|
+
const t = Ft(e);
|
|
254
|
+
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
255
|
+
},
|
|
256
|
+
"keydown.left": (e) => {
|
|
257
|
+
const t = Nt(e);
|
|
258
|
+
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
259
|
+
},
|
|
260
|
+
"keydown.right": (e) => {
|
|
261
|
+
const t = Bt(e);
|
|
262
|
+
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
263
|
+
},
|
|
264
|
+
"keydown.control.up": (e) => {
|
|
265
|
+
const t = Gn(e);
|
|
266
|
+
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
267
|
+
},
|
|
268
|
+
"keydown.control.down": (e) => {
|
|
269
|
+
const t = Un(e);
|
|
270
|
+
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
271
|
+
},
|
|
272
|
+
"keydown.control.left": (e) => {
|
|
273
|
+
const t = Gt(e);
|
|
274
|
+
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
275
|
+
},
|
|
276
|
+
"keydown.control.right": (e) => {
|
|
277
|
+
const t = Ut(e);
|
|
278
|
+
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
279
|
+
},
|
|
280
|
+
"keydown.end": (e) => {
|
|
281
|
+
const t = Ut(e);
|
|
282
|
+
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
283
|
+
},
|
|
284
|
+
"keydown.enter": (e) => {
|
|
285
|
+
if (e.target instanceof HTMLTableCellElement) {
|
|
286
|
+
e.preventDefault(), e.stopPropagation();
|
|
287
|
+
const t = Ft(e);
|
|
288
|
+
t && t.focus();
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"keydown.shift.enter": (e) => {
|
|
292
|
+
if (e.target instanceof HTMLTableCellElement) {
|
|
293
|
+
e.preventDefault(), e.stopPropagation();
|
|
294
|
+
const t = Ht(e);
|
|
295
|
+
t && t.focus();
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"keydown.home": (e) => {
|
|
299
|
+
const t = Gt(e);
|
|
300
|
+
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
301
|
+
},
|
|
302
|
+
"keydown.tab": (e) => {
|
|
303
|
+
const t = Bt(e);
|
|
304
|
+
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
305
|
+
},
|
|
306
|
+
"keydown.shift.tab": (e) => {
|
|
307
|
+
const t = Nt(e);
|
|
308
|
+
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
function St(e) {
|
|
312
|
+
const t = (l) => {
|
|
313
|
+
let r = null;
|
|
314
|
+
return l.parent && (typeof l.parent == "string" ? r = document.querySelector(l.parent) : l.parent instanceof HTMLElement ? r = l.parent : r = l.parent.value), r;
|
|
315
|
+
}, n = (l) => {
|
|
316
|
+
const r = t(l);
|
|
317
|
+
let i = [];
|
|
318
|
+
if (typeof l.selectors == "string")
|
|
319
|
+
i = Array.from(r ? r.querySelectorAll(l.selectors) : document.querySelectorAll(l.selectors));
|
|
320
|
+
else if (Array.isArray(l.selectors))
|
|
321
|
+
for (const u of l.selectors)
|
|
322
|
+
u instanceof HTMLElement ? i.push(u) : i.push(u.$el);
|
|
323
|
+
else if (l.selectors instanceof HTMLElement)
|
|
324
|
+
i.push(l.selectors);
|
|
325
|
+
else if (l.selectors?.value)
|
|
326
|
+
if (Array.isArray(l.selectors.value))
|
|
327
|
+
for (const u of l.selectors.value)
|
|
328
|
+
u instanceof HTMLElement ? i.push(u) : i.push(u.$el);
|
|
329
|
+
else
|
|
330
|
+
i.push(l.selectors.value);
|
|
331
|
+
return i;
|
|
332
|
+
}, o = (l) => {
|
|
333
|
+
const r = t(l);
|
|
334
|
+
let i = [];
|
|
335
|
+
return l.selectors ? i = n(l) : r && (i = Array.from(r.children).filter((u) => pe(u) && me(u))), i;
|
|
336
|
+
}, a = (l) => (r) => {
|
|
337
|
+
const i = zn[r.key] || r.key.toLowerCase();
|
|
338
|
+
if (je.includes(i)) return;
|
|
339
|
+
const u = l.handlers || at;
|
|
340
|
+
for (const c of Object.keys(u)) {
|
|
341
|
+
const [m, ...g] = c.split(".");
|
|
342
|
+
if (m === "keydown" && g.includes(i)) {
|
|
343
|
+
const p = u[c], D = g.filter((f) => je.includes(f)), w = je.some((f) => {
|
|
344
|
+
const h = f.charAt(0).toUpperCase() + f.slice(1);
|
|
345
|
+
return r.getModifierState(h);
|
|
346
|
+
});
|
|
347
|
+
if (D.length > 0) {
|
|
348
|
+
if (w) {
|
|
349
|
+
for (const f of je)
|
|
350
|
+
if (g.includes(f)) {
|
|
351
|
+
const h = f.charAt(0).toUpperCase() + f.slice(1);
|
|
352
|
+
r.getModifierState(h) && p(r);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
} else
|
|
356
|
+
w || p(r);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}, s = [];
|
|
360
|
+
ve(() => {
|
|
361
|
+
for (const l of e) {
|
|
362
|
+
const r = t(l), i = o(l), u = a(l), c = r ? [r] : i;
|
|
363
|
+
for (const m of c) {
|
|
364
|
+
const { focused: g } = Nn(S(m)), p = Y(g, (D) => {
|
|
365
|
+
D ? m.addEventListener("keydown", u) : m.removeEventListener("keydown", u);
|
|
366
|
+
});
|
|
367
|
+
s.push(p);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}), tn(() => {
|
|
371
|
+
for (const l of s)
|
|
372
|
+
l();
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
function Lt(e, t) {
|
|
376
|
+
return nt() ? (ot(e, t), !0) : !1;
|
|
377
|
+
}
|
|
378
|
+
const sn = typeof window < "u" && typeof document < "u";
|
|
379
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
380
|
+
const Wn = (e) => e != null, Xn = Object.prototype.toString, jn = (e) => Xn.call(e) === "[object Object]", Ee = () => {
|
|
381
|
+
};
|
|
382
|
+
function qn(...e) {
|
|
383
|
+
if (e.length !== 1) return ln(...e);
|
|
384
|
+
const t = e[0];
|
|
385
|
+
return typeof t == "function" ? Dt(Et(() => ({
|
|
386
|
+
get: t,
|
|
387
|
+
set: Ee
|
|
388
|
+
}))) : S(t);
|
|
389
|
+
}
|
|
390
|
+
function Yn(e, t) {
|
|
391
|
+
function n(...o) {
|
|
392
|
+
return new Promise((a, s) => {
|
|
393
|
+
Promise.resolve(e(() => t.apply(this, o), {
|
|
394
|
+
fn: t,
|
|
395
|
+
thisArg: this,
|
|
396
|
+
args: o
|
|
397
|
+
})).then(a).catch(s);
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
return n;
|
|
401
|
+
}
|
|
402
|
+
function Jn(e, t = {}) {
|
|
403
|
+
let n, o, a = Ee;
|
|
404
|
+
const s = (r) => {
|
|
405
|
+
clearTimeout(r), a(), a = Ee;
|
|
406
|
+
};
|
|
407
|
+
let l;
|
|
408
|
+
return (r) => {
|
|
409
|
+
const i = T(e), u = T(t.maxWait);
|
|
410
|
+
return n && s(n), i <= 0 || u !== void 0 && u <= 0 ? (o && (s(o), o = void 0), Promise.resolve(r())) : new Promise((c, m) => {
|
|
411
|
+
a = t.rejectOnCancel ? m : c, l = r, u && !o && (o = setTimeout(() => {
|
|
412
|
+
n && s(n), o = void 0, c(l());
|
|
413
|
+
}, u)), n = setTimeout(() => {
|
|
414
|
+
o && s(o), o = void 0, c(r());
|
|
415
|
+
}, i);
|
|
416
|
+
});
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
function Ke(e) {
|
|
420
|
+
return Array.isArray(e) ? e : [e];
|
|
421
|
+
}
|
|
422
|
+
function Kn(e) {
|
|
423
|
+
return lt();
|
|
424
|
+
}
|
|
425
|
+
// @__NO_SIDE_EFFECTS__
|
|
426
|
+
function Qn(e, t = 200, n = {}) {
|
|
427
|
+
return Yn(Jn(t, n), e);
|
|
428
|
+
}
|
|
429
|
+
function Zn(e, t = {}) {
|
|
430
|
+
if (!kn(e)) return Cn(e);
|
|
431
|
+
const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
432
|
+
for (const o in e.value) n[o] = Et(() => ({
|
|
433
|
+
get() {
|
|
434
|
+
return e.value[o];
|
|
435
|
+
},
|
|
436
|
+
set(a) {
|
|
437
|
+
var s;
|
|
438
|
+
if (!((s = T(t.replaceRef)) !== null && s !== void 0) || s) if (Array.isArray(e.value)) {
|
|
439
|
+
const l = [...e.value];
|
|
440
|
+
l[o] = a, e.value = l;
|
|
441
|
+
} else {
|
|
442
|
+
const l = {
|
|
443
|
+
...e.value,
|
|
444
|
+
[o]: a
|
|
445
|
+
};
|
|
446
|
+
Object.setPrototypeOf(l, Object.getPrototypeOf(e.value)), e.value = l;
|
|
447
|
+
}
|
|
448
|
+
else e.value[o] = a;
|
|
449
|
+
}
|
|
450
|
+
}));
|
|
451
|
+
return n;
|
|
452
|
+
}
|
|
453
|
+
function eo(e, t = !0, n) {
|
|
454
|
+
Kn() ? ve(e, n) : t ? e() : tt(e);
|
|
455
|
+
}
|
|
456
|
+
function to(e, t, n) {
|
|
457
|
+
return Y(e, t, {
|
|
458
|
+
...n,
|
|
459
|
+
immediate: !0
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
const He = sn ? window : void 0;
|
|
463
|
+
function ue(e) {
|
|
464
|
+
var t;
|
|
465
|
+
const n = T(e);
|
|
466
|
+
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
467
|
+
}
|
|
468
|
+
function xe(...e) {
|
|
469
|
+
const t = (o, a, s, l) => (o.addEventListener(a, s, l), () => o.removeEventListener(a, s, l)), n = M(() => {
|
|
470
|
+
const o = Ke(T(e[0])).filter((a) => a != null);
|
|
471
|
+
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
472
|
+
});
|
|
473
|
+
return to(() => {
|
|
474
|
+
var o, a;
|
|
475
|
+
return [
|
|
476
|
+
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((s) => ue(s))) !== null && o !== void 0 ? o : [He].filter((s) => s != null),
|
|
477
|
+
Ke(T(n.value ? e[1] : e[0])),
|
|
478
|
+
Ke($(n.value ? e[2] : e[1])),
|
|
479
|
+
T(n.value ? e[3] : e[2])
|
|
480
|
+
];
|
|
481
|
+
}, ([o, a, s, l], r, i) => {
|
|
482
|
+
if (!o?.length || !a?.length || !s?.length) return;
|
|
483
|
+
const u = jn(l) ? { ...l } : l, c = o.flatMap((m) => a.flatMap((g) => s.map((p) => t(m, g, p, u))));
|
|
484
|
+
i(() => {
|
|
485
|
+
c.forEach((m) => m());
|
|
486
|
+
});
|
|
487
|
+
}, { flush: "post" });
|
|
488
|
+
}
|
|
489
|
+
function zt(e, t, n = {}) {
|
|
490
|
+
const { window: o = He, ignore: a = [], capture: s = !0, detectIframe: l = !1, controls: r = !1 } = n;
|
|
491
|
+
if (!o) return r ? {
|
|
492
|
+
stop: Ee,
|
|
493
|
+
cancel: Ee,
|
|
494
|
+
trigger: Ee
|
|
495
|
+
} : Ee;
|
|
496
|
+
let i = !0;
|
|
497
|
+
const u = (f) => T(a).some((h) => {
|
|
498
|
+
if (typeof h == "string") return Array.from(o.document.querySelectorAll(h)).some((I) => I === f.target || f.composedPath().includes(I));
|
|
499
|
+
{
|
|
500
|
+
const I = ue(h);
|
|
501
|
+
return I && (f.target === I || f.composedPath().includes(I));
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
function c(f) {
|
|
505
|
+
const h = T(f);
|
|
506
|
+
return h && h.$.subTree.shapeFlag === 16;
|
|
507
|
+
}
|
|
508
|
+
function m(f, h) {
|
|
509
|
+
const I = T(f), E = I.$.subTree && I.$.subTree.children;
|
|
510
|
+
return E == null || !Array.isArray(E) ? !1 : E.some((L) => L.el === h.target || h.composedPath().includes(L.el));
|
|
511
|
+
}
|
|
512
|
+
const g = (f) => {
|
|
513
|
+
const h = ue(e);
|
|
514
|
+
if (f.target != null && !(!(h instanceof Element) && c(e) && m(e, f)) && !(!h || h === f.target || f.composedPath().includes(h))) {
|
|
515
|
+
if ("detail" in f && f.detail === 0 && (i = !u(f)), !i) {
|
|
516
|
+
i = !0;
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
t(f);
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
let p = !1;
|
|
523
|
+
const D = [
|
|
524
|
+
xe(o, "click", (f) => {
|
|
525
|
+
p || (p = !0, setTimeout(() => {
|
|
526
|
+
p = !1;
|
|
527
|
+
}, 0), g(f));
|
|
528
|
+
}, {
|
|
529
|
+
passive: !0,
|
|
530
|
+
capture: s
|
|
531
|
+
}),
|
|
532
|
+
xe(o, "pointerdown", (f) => {
|
|
533
|
+
const h = ue(e);
|
|
534
|
+
i = !u(f) && !!(h && !f.composedPath().includes(h));
|
|
535
|
+
}, { passive: !0 }),
|
|
536
|
+
l && xe(o, "blur", (f) => {
|
|
537
|
+
setTimeout(() => {
|
|
538
|
+
var h;
|
|
539
|
+
const I = ue(e);
|
|
540
|
+
((h = o.document.activeElement) === null || h === void 0 ? void 0 : h.tagName) === "IFRAME" && !I?.contains(o.document.activeElement) && t(f);
|
|
541
|
+
}, 0);
|
|
542
|
+
}, { passive: !0 })
|
|
543
|
+
].filter(Boolean), w = () => D.forEach((f) => f());
|
|
544
|
+
return r ? {
|
|
545
|
+
stop: w,
|
|
546
|
+
cancel: () => {
|
|
547
|
+
i = !1;
|
|
548
|
+
},
|
|
549
|
+
trigger: (f) => {
|
|
550
|
+
i = !0, g(f), i = !1;
|
|
551
|
+
}
|
|
552
|
+
} : w;
|
|
553
|
+
}
|
|
554
|
+
// @__NO_SIDE_EFFECTS__
|
|
555
|
+
function no() {
|
|
556
|
+
const e = J(!1), t = lt();
|
|
557
|
+
return t && ve(() => {
|
|
558
|
+
e.value = !0;
|
|
559
|
+
}, t), e;
|
|
560
|
+
}
|
|
561
|
+
// @__NO_SIDE_EFFECTS__
|
|
562
|
+
function un(e) {
|
|
563
|
+
const t = /* @__PURE__ */ no();
|
|
564
|
+
return M(() => (t.value, !!e()));
|
|
565
|
+
}
|
|
566
|
+
function cn(e, t, n = {}) {
|
|
567
|
+
const { window: o = He, ...a } = n;
|
|
568
|
+
let s;
|
|
569
|
+
const l = /* @__PURE__ */ un(() => o && "MutationObserver" in o), r = () => {
|
|
570
|
+
s && (s.disconnect(), s = void 0);
|
|
571
|
+
}, i = Y(M(() => {
|
|
572
|
+
const m = Ke(T(e)).map(ue).filter(Wn);
|
|
573
|
+
return new Set(m);
|
|
574
|
+
}), (m) => {
|
|
575
|
+
r(), l.value && m.size && (s = new MutationObserver(t), m.forEach((g) => s.observe(g, a)));
|
|
576
|
+
}, {
|
|
577
|
+
immediate: !0,
|
|
578
|
+
flush: "post"
|
|
579
|
+
}), u = () => s?.takeRecords(), c = () => {
|
|
580
|
+
i(), r();
|
|
581
|
+
};
|
|
582
|
+
return Lt(c), {
|
|
583
|
+
isSupported: l,
|
|
584
|
+
stop: c,
|
|
585
|
+
takeRecords: u
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
function vt(e, t = {}) {
|
|
589
|
+
var n;
|
|
590
|
+
const { pointerTypes: o, preventDefault: a, stopPropagation: s, exact: l, onMove: r, onEnd: i, onStart: u, initialValue: c, axis: m = "both", draggingElement: g = He, containerElement: p, handle: D = e, buttons: w = [0] } = t, f = S((n = T(c)) !== null && n !== void 0 ? n : {
|
|
591
|
+
x: 0,
|
|
592
|
+
y: 0
|
|
593
|
+
}), h = S(), I = (C) => o ? o.includes(C.pointerType) : !0, E = (C) => {
|
|
594
|
+
T(a) && C.preventDefault(), T(s) && C.stopPropagation();
|
|
595
|
+
}, L = (C) => {
|
|
596
|
+
var O;
|
|
597
|
+
if (!T(w).includes(C.button) || T(t.disabled) || !I(C) || T(l) && C.target !== T(e)) return;
|
|
598
|
+
const q = T(p), G = q == null || (O = q.getBoundingClientRect) === null || O === void 0 ? void 0 : O.call(q), F = T(e).getBoundingClientRect(), le = {
|
|
599
|
+
x: C.clientX - (q ? F.left - G.left + q.scrollLeft : F.left),
|
|
600
|
+
y: C.clientY - (q ? F.top - G.top + q.scrollTop : F.top)
|
|
601
|
+
};
|
|
602
|
+
u?.(le, C) !== !1 && (h.value = le, E(C));
|
|
603
|
+
}, z = (C) => {
|
|
604
|
+
if (T(t.disabled) || !I(C) || !h.value) return;
|
|
605
|
+
const O = T(p), q = T(e).getBoundingClientRect();
|
|
606
|
+
let { x: G, y: F } = f.value;
|
|
607
|
+
(m === "x" || m === "both") && (G = C.clientX - h.value.x, O && (G = Math.min(Math.max(0, G), O.scrollWidth - q.width))), (m === "y" || m === "both") && (F = C.clientY - h.value.y, O && (F = Math.min(Math.max(0, F), O.scrollHeight - q.height))), f.value = {
|
|
608
|
+
x: G,
|
|
609
|
+
y: F
|
|
610
|
+
}, r?.(f.value, C), E(C);
|
|
611
|
+
}, R = (C) => {
|
|
612
|
+
T(t.disabled) || !I(C) || h.value && (h.value = void 0, i?.(f.value, C), E(C));
|
|
613
|
+
};
|
|
614
|
+
if (sn) {
|
|
615
|
+
const C = () => {
|
|
616
|
+
var O;
|
|
617
|
+
return {
|
|
618
|
+
capture: (O = t.capture) !== null && O !== void 0 ? O : !0,
|
|
619
|
+
passive: !T(a)
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
xe(D, "pointerdown", L, C), xe(g, "pointermove", z, C), xe(g, "pointerup", R, C);
|
|
623
|
+
}
|
|
624
|
+
return {
|
|
625
|
+
...Zn(f),
|
|
626
|
+
position: f,
|
|
627
|
+
isDragging: M(() => !!h.value),
|
|
628
|
+
style: M(() => `left:${f.value.x}px;top:${f.value.y}px;`)
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
function kt(e, t, n = {}) {
|
|
632
|
+
const { window: o = He, ...a } = n;
|
|
633
|
+
let s;
|
|
634
|
+
const l = /* @__PURE__ */ un(() => o && "ResizeObserver" in o), r = () => {
|
|
635
|
+
s && (s.disconnect(), s = void 0);
|
|
636
|
+
}, i = Y(M(() => {
|
|
637
|
+
const c = T(e);
|
|
638
|
+
return Array.isArray(c) ? c.map((m) => ue(m)) : [ue(c)];
|
|
639
|
+
}), (c) => {
|
|
640
|
+
if (r(), l.value && o) {
|
|
641
|
+
s = new ResizeObserver(t);
|
|
642
|
+
for (const m of c) m && s.observe(m, a);
|
|
643
|
+
}
|
|
644
|
+
}, {
|
|
645
|
+
immediate: !0,
|
|
646
|
+
flush: "post"
|
|
647
|
+
}), u = () => {
|
|
648
|
+
r(), i();
|
|
649
|
+
};
|
|
650
|
+
return Lt(u), {
|
|
651
|
+
isSupported: l,
|
|
652
|
+
stop: u
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
function ke(e, t = {}) {
|
|
656
|
+
const { reset: n = !0, windowResize: o = !0, windowScroll: a = !0, immediate: s = !0, updateTiming: l = "sync" } = t, r = J(0), i = J(0), u = J(0), c = J(0), m = J(0), g = J(0), p = J(0), D = J(0);
|
|
657
|
+
function w() {
|
|
658
|
+
const h = ue(e);
|
|
659
|
+
if (!h) {
|
|
660
|
+
n && (r.value = 0, i.value = 0, u.value = 0, c.value = 0, m.value = 0, g.value = 0, p.value = 0, D.value = 0);
|
|
661
|
+
return;
|
|
662
|
+
}
|
|
663
|
+
const I = h.getBoundingClientRect();
|
|
664
|
+
r.value = I.height, i.value = I.bottom, u.value = I.left, c.value = I.right, m.value = I.top, g.value = I.width, p.value = I.x, D.value = I.y;
|
|
665
|
+
}
|
|
666
|
+
function f() {
|
|
667
|
+
l === "sync" ? w() : l === "next-frame" && requestAnimationFrame(() => w());
|
|
668
|
+
}
|
|
669
|
+
return kt(e, f), Y(() => ue(e), (h) => !h && f()), cn(e, f, { attributeFilter: ["style", "class"] }), a && xe("scroll", f, {
|
|
670
|
+
capture: !0,
|
|
671
|
+
passive: !0
|
|
672
|
+
}), o && xe("resize", f, { passive: !0 }), eo(() => {
|
|
673
|
+
s && f();
|
|
674
|
+
}), {
|
|
675
|
+
height: r,
|
|
676
|
+
bottom: i,
|
|
677
|
+
left: u,
|
|
678
|
+
right: c,
|
|
679
|
+
top: m,
|
|
680
|
+
width: g,
|
|
681
|
+
x: p,
|
|
682
|
+
y: D,
|
|
683
|
+
update: f
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
function mt(e) {
|
|
687
|
+
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
688
|
+
}
|
|
689
|
+
const pt = /* @__PURE__ */ new WeakMap();
|
|
690
|
+
function oo(e, t = !1) {
|
|
691
|
+
const n = J(t);
|
|
692
|
+
let o = "";
|
|
693
|
+
Y(qn(e), (l) => {
|
|
694
|
+
const r = mt(T(l));
|
|
695
|
+
if (r) {
|
|
696
|
+
const i = r;
|
|
697
|
+
if (pt.get(i) || pt.set(i, i.style.overflow), i.style.overflow !== "hidden" && (o = i.style.overflow), i.style.overflow === "hidden") return n.value = !0;
|
|
698
|
+
if (n.value) return i.style.overflow = "hidden";
|
|
699
|
+
}
|
|
700
|
+
}, { immediate: !0 });
|
|
701
|
+
const a = () => {
|
|
702
|
+
const l = mt(T(e));
|
|
703
|
+
!l || n.value || (l.style.overflow = "hidden", n.value = !0);
|
|
704
|
+
}, s = () => {
|
|
705
|
+
const l = mt(T(e));
|
|
706
|
+
!l || !n.value || (l.style.overflow = o, pt.delete(l), n.value = !1);
|
|
707
|
+
};
|
|
708
|
+
return Lt(s), M({
|
|
709
|
+
get() {
|
|
710
|
+
return n.value;
|
|
711
|
+
},
|
|
712
|
+
set(l) {
|
|
713
|
+
l ? a() : s();
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
const lo = (e) => {
|
|
718
|
+
const t = new DOMParser().parseFromString(e, "text/html");
|
|
719
|
+
return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
|
|
720
|
+
}, ao = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), ro = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], so = ["innerHTML"], io = { key: 2 }, uo = /* @__PURE__ */ j({
|
|
721
|
+
__name: "ACell",
|
|
722
|
+
props: {
|
|
723
|
+
colIndex: {},
|
|
724
|
+
rowIndex: {},
|
|
725
|
+
store: {},
|
|
726
|
+
addNavigation: { type: [Boolean, Object], default: !0 },
|
|
727
|
+
tabIndex: { default: 0 },
|
|
728
|
+
pinned: { type: Boolean, default: !1 },
|
|
729
|
+
debounce: { default: 300 }
|
|
730
|
+
},
|
|
731
|
+
setup(e, { expose: t }) {
|
|
732
|
+
const n = ne("cell"), o = e.store.getCellData(e.colIndex, e.rowIndex), a = S(""), s = S(!1), l = e.store.columns[e.colIndex], r = e.store.rows[e.rowIndex], i = l.align || "center", u = l.width || "40ch", c = M(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), m = M(() => typeof c.value == "string" ? lo(c.value) : !1), g = M(() => ({
|
|
733
|
+
textAlign: i,
|
|
734
|
+
width: u,
|
|
735
|
+
fontWeight: s.value ? "bold" : "inherit",
|
|
736
|
+
paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
|
|
737
|
+
})), p = M(() => ({
|
|
738
|
+
"sticky-column": e.pinned,
|
|
739
|
+
"cell-modified": s.value
|
|
740
|
+
})), D = () => {
|
|
741
|
+
f(), w();
|
|
742
|
+
}, w = () => {
|
|
743
|
+
const { left: R, bottom: C, width: O, height: q } = ke(n);
|
|
744
|
+
l.mask, l.modalComponent && e.store.$patch((G) => {
|
|
745
|
+
G.modal.visible = !0, G.modal.colIndex = e.colIndex, G.modal.rowIndex = e.rowIndex, G.modal.left = R, G.modal.bottom = C, G.modal.width = O, G.modal.height = q, G.modal.cell = n.value, typeof l.modalComponent == "function" ? G.modal.component = l.modalComponent({ table: G.table, row: r, column: l }) : G.modal.component = l.modalComponent, G.modal.componentProps = l.modalComponentExtraProps;
|
|
746
|
+
});
|
|
747
|
+
};
|
|
748
|
+
if (e.addNavigation) {
|
|
749
|
+
let R = {
|
|
750
|
+
...at,
|
|
751
|
+
"keydown.f2": w,
|
|
752
|
+
"keydown.alt.up": w,
|
|
753
|
+
"keydown.alt.down": w,
|
|
754
|
+
"keydown.alt.left": w,
|
|
755
|
+
"keydown.alt.right": w
|
|
756
|
+
};
|
|
757
|
+
typeof e.addNavigation == "object" && (R = {
|
|
758
|
+
...R,
|
|
759
|
+
...e.addNavigation
|
|
760
|
+
}), St([
|
|
761
|
+
{
|
|
762
|
+
selectors: n,
|
|
763
|
+
handlers: R
|
|
764
|
+
}
|
|
765
|
+
]);
|
|
766
|
+
}
|
|
767
|
+
const f = () => {
|
|
768
|
+
if (n.value && l.edit) {
|
|
769
|
+
const R = window.getSelection();
|
|
770
|
+
if (R)
|
|
771
|
+
try {
|
|
772
|
+
const C = document.createRange();
|
|
773
|
+
C.selectNodeContents && (C.selectNodeContents(n.value), R.removeAllRanges(), R.addRange(C));
|
|
774
|
+
} catch {
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}, h = () => {
|
|
778
|
+
n.value && (a.value = n.value.textContent, f());
|
|
779
|
+
}, I = () => {
|
|
780
|
+
try {
|
|
781
|
+
const R = window.getSelection();
|
|
782
|
+
if (R && R.rangeCount > 0 && n.value) {
|
|
783
|
+
const C = R.getRangeAt(0), O = C.cloneRange();
|
|
784
|
+
if (O.selectNodeContents && O.setEnd)
|
|
785
|
+
return O.selectNodeContents(n.value), O.setEnd(C.endContainer, C.endOffset), O.toString().length;
|
|
786
|
+
}
|
|
787
|
+
} catch {
|
|
788
|
+
}
|
|
789
|
+
return 0;
|
|
790
|
+
}, E = (R) => {
|
|
791
|
+
if (n.value)
|
|
792
|
+
try {
|
|
793
|
+
const C = window.getSelection();
|
|
794
|
+
if (!C) return;
|
|
795
|
+
let O = 0;
|
|
796
|
+
const q = document.createTreeWalker ? document.createTreeWalker(n.value, NodeFilter.SHOW_TEXT, null) : null;
|
|
797
|
+
if (!q) return;
|
|
798
|
+
let G, F = null;
|
|
799
|
+
for (; G = q.nextNode(); ) {
|
|
800
|
+
const le = G, we = O + le.textContent.length;
|
|
801
|
+
if (R <= we && (F = document.createRange(), F.setStart && F.setEnd)) {
|
|
802
|
+
F.setStart(le, R - O), F.setEnd(le, R - O);
|
|
803
|
+
break;
|
|
804
|
+
}
|
|
805
|
+
O = we;
|
|
806
|
+
}
|
|
807
|
+
F && C.removeAllRanges && C.addRange && (C.removeAllRanges(), C.addRange(F));
|
|
808
|
+
} catch {
|
|
809
|
+
}
|
|
810
|
+
}, L = (R) => {
|
|
811
|
+
if (!l.edit) return;
|
|
812
|
+
const C = R.target;
|
|
813
|
+
if (C.textContent === a.value)
|
|
814
|
+
return;
|
|
815
|
+
const O = I();
|
|
816
|
+
a.value = C.textContent, l.format ? (s.value = C.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, o), e.store.setCellText(e.colIndex, e.rowIndex, C.textContent)) : (s.value = C.textContent !== o, e.store.setCellData(e.colIndex, e.rowIndex, C.textContent)), tt().then(() => {
|
|
817
|
+
E(O);
|
|
818
|
+
});
|
|
819
|
+
}, z = /* @__PURE__ */ Qn(L, e.debounce);
|
|
820
|
+
return t({
|
|
821
|
+
currentData: a
|
|
822
|
+
}), (R, C) => (x(), k("td", {
|
|
823
|
+
ref: "cell",
|
|
824
|
+
"data-colindex": e.colIndex,
|
|
825
|
+
"data-rowindex": e.rowIndex,
|
|
826
|
+
"data-editable": $(l).edit,
|
|
827
|
+
contenteditable: $(l).edit,
|
|
828
|
+
tabindex: e.tabIndex,
|
|
829
|
+
spellcheck: !1,
|
|
830
|
+
style: ce(g.value),
|
|
831
|
+
class: ee(["atable-cell", p.value]),
|
|
832
|
+
onFocus: h,
|
|
833
|
+
onPaste: L,
|
|
834
|
+
onInput: C[0] || (C[0] = //@ts-ignore
|
|
835
|
+
(...O) => $(z) && $(z)(...O)),
|
|
836
|
+
onClick: D
|
|
837
|
+
}, [
|
|
838
|
+
$(l).cellComponent ? (x(), re(Ae($(l).cellComponent), et({
|
|
839
|
+
key: 0,
|
|
840
|
+
value: c.value
|
|
841
|
+
}, $(l).cellComponentProps), null, 16, ["value"])) : m.value ? (x(), k("span", {
|
|
842
|
+
key: 1,
|
|
843
|
+
innerHTML: c.value
|
|
844
|
+
}, null, 8, so)) : (x(), k("span", io, W(c.value), 1))
|
|
845
|
+
], 46, ro));
|
|
846
|
+
}
|
|
847
|
+
}), co = ["tabindex"], fo = ["tabindex"], vo = ["colspan"], mo = /* @__PURE__ */ j({
|
|
848
|
+
__name: "AExpansionRow",
|
|
849
|
+
props: {
|
|
850
|
+
rowIndex: {},
|
|
851
|
+
store: {},
|
|
852
|
+
tabIndex: { default: () => -1 },
|
|
853
|
+
addNavigation: { type: [Boolean, Object], default: () => at }
|
|
854
|
+
},
|
|
855
|
+
setup(e) {
|
|
856
|
+
const t = ne("rowEl"), n = M(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
|
|
857
|
+
if (e.addNavigation) {
|
|
858
|
+
const o = {
|
|
859
|
+
"keydown.control.g": (a) => {
|
|
860
|
+
a.stopPropagation(), a.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
|
|
861
|
+
}
|
|
862
|
+
};
|
|
863
|
+
typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation), St([
|
|
864
|
+
{
|
|
865
|
+
selectors: t,
|
|
866
|
+
handlers: o
|
|
867
|
+
}
|
|
868
|
+
]);
|
|
869
|
+
}
|
|
870
|
+
return (o, a) => (x(), k(te, null, [
|
|
871
|
+
y("tr", et(o.$attrs, {
|
|
872
|
+
ref: "rowEl",
|
|
873
|
+
tabindex: e.tabIndex,
|
|
874
|
+
class: "expandable-row"
|
|
875
|
+
}), [
|
|
876
|
+
y("td", {
|
|
877
|
+
tabIndex: -1,
|
|
878
|
+
class: "row-index",
|
|
879
|
+
onClick: a[0] || (a[0] = (s) => e.store.toggleRowExpand(e.rowIndex))
|
|
880
|
+
}, W(n.value), 1),
|
|
881
|
+
oe(o.$slots, "row", {}, void 0, !0)
|
|
882
|
+
], 16, co),
|
|
883
|
+
e.store.display[e.rowIndex].expanded ? (x(), k("tr", {
|
|
884
|
+
key: 0,
|
|
885
|
+
ref: "rowExpanded",
|
|
886
|
+
tabindex: e.tabIndex,
|
|
887
|
+
class: "expanded-row"
|
|
888
|
+
}, [
|
|
889
|
+
y("td", {
|
|
890
|
+
tabIndex: -1,
|
|
891
|
+
colspan: e.store.columns.length + 1,
|
|
892
|
+
class: "expanded-row-content"
|
|
893
|
+
}, [
|
|
894
|
+
oe(o.$slots, "content", {}, void 0, !0)
|
|
895
|
+
], 8, vo)
|
|
896
|
+
], 8, fo)) : K("", !0)
|
|
897
|
+
], 64));
|
|
898
|
+
}
|
|
899
|
+
}), Ie = (e, t) => {
|
|
900
|
+
const n = e.__vccOpts || e;
|
|
901
|
+
for (const [o, a] of t)
|
|
902
|
+
n[o] = a;
|
|
903
|
+
return n;
|
|
904
|
+
}, po = /* @__PURE__ */ Ie(mo, [["__scopeId", "data-v-a42297c7"]]), ho = ["colspan"], go = {
|
|
905
|
+
ref: "container",
|
|
906
|
+
class: "gantt-container"
|
|
907
|
+
}, yo = ["data-rowindex", "data-colindex"], wo = {
|
|
908
|
+
key: 2,
|
|
909
|
+
class: "gantt-label"
|
|
910
|
+
}, xo = ["x1", "y1", "x2", "y2"], bo = /* @__PURE__ */ j({
|
|
911
|
+
__name: "AGanttCell",
|
|
912
|
+
props: {
|
|
913
|
+
store: {},
|
|
914
|
+
columnsCount: {},
|
|
915
|
+
rowIndex: {},
|
|
916
|
+
colIndex: {},
|
|
917
|
+
start: { default: 0 },
|
|
918
|
+
end: { default: 0 },
|
|
919
|
+
colspan: { default: 1 },
|
|
920
|
+
label: { default: "" },
|
|
921
|
+
color: { default: "#cccccc" }
|
|
922
|
+
},
|
|
923
|
+
emits: ["connection:create"],
|
|
924
|
+
setup(e, { expose: t, emit: n }) {
|
|
925
|
+
xn((V) => ({
|
|
926
|
+
v6d722296: a.value,
|
|
927
|
+
v260b36f8: V.colspan
|
|
928
|
+
}));
|
|
929
|
+
const o = n, a = S(e.color.length >= 6 ? e.color : "#cccccc"), s = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, l = ne("container"), r = ne("bar"), i = ne("leftResizeHandle"), u = ne("rightResizeHandle"), c = ne("leftConnectionHandle"), m = ne("rightConnectionHandle"), { width: g } = ke(l), { left: p, right: D } = ke(r), w = S(e.start), f = S(e.end || w.value + e.colspan), h = S(!1), I = S(!1), E = S(!1), L = S(!1), z = S(!1), R = S({ startX: 0, startY: 0, endX: 0, endY: 0 }), C = M(() => Fe.value || le.value || we.value), O = M(() => e.colspan > 0 ? g.value / e.colspan : 0), q = M(() => {
|
|
930
|
+
const V = w.value / e.colspan * 100, P = f.value / e.colspan * 100;
|
|
931
|
+
return {
|
|
932
|
+
left: `${V}%`,
|
|
933
|
+
width: `${P - V}%`,
|
|
934
|
+
backgroundColor: a.value
|
|
935
|
+
};
|
|
936
|
+
}), G = M(
|
|
937
|
+
() => ({
|
|
938
|
+
position: "fixed",
|
|
939
|
+
top: 0,
|
|
940
|
+
left: 0,
|
|
941
|
+
width: "100vw",
|
|
942
|
+
height: "100vh",
|
|
943
|
+
pointerEvents: "none",
|
|
944
|
+
zIndex: 1e3
|
|
945
|
+
})
|
|
946
|
+
), F = S({ startX: 0, startPos: 0 }), { isDragging: le } = vt(i, {
|
|
947
|
+
axis: "x",
|
|
948
|
+
onStart: () => Ve(p.value, w.value),
|
|
949
|
+
onMove: ({ x: V }) => rt(V),
|
|
950
|
+
onEnd: ({ x: V }) => st(V)
|
|
951
|
+
}), { isDragging: we } = vt(u, {
|
|
952
|
+
axis: "x",
|
|
953
|
+
onStart: () => Ve(D.value, f.value),
|
|
954
|
+
onMove: ({ x: V }) => Ne(V),
|
|
955
|
+
onEnd: ({ x: V }) => it(V)
|
|
956
|
+
}), { isDragging: Fe } = vt(r, {
|
|
957
|
+
exact: !0,
|
|
958
|
+
axis: "x",
|
|
959
|
+
onStart: () => Ve(p.value, w.value),
|
|
960
|
+
onMove: ({ x: V }) => Be(V),
|
|
961
|
+
onEnd: ({ x: V }) => ut(V)
|
|
962
|
+
});
|
|
963
|
+
ve(() => {
|
|
964
|
+
ct();
|
|
965
|
+
}), bn(() => {
|
|
966
|
+
dt();
|
|
967
|
+
});
|
|
968
|
+
function Ve(V, P) {
|
|
969
|
+
r.value && (r.value.style.transition = "none"), F.value = { startX: V, startPos: P };
|
|
970
|
+
}
|
|
971
|
+
function rt(V) {
|
|
972
|
+
if (!le.value || !r.value) return;
|
|
973
|
+
const P = (V - F.value.startX) / O.value, N = Math.max(0, Math.min(f.value - 1, F.value.startPos + P));
|
|
974
|
+
r.value.style.left = `${N / e.colspan * 100}%`, r.value.style.width = `${(f.value - N) / e.colspan * 100}%`;
|
|
975
|
+
}
|
|
976
|
+
function st(V) {
|
|
977
|
+
if (!r.value) return;
|
|
978
|
+
const P = V - F.value.startX, N = Math.round(P / O.value), X = w.value, Q = Math.max(0, Math.min(f.value - 1, F.value.startPos + N));
|
|
979
|
+
w.value = Q, e.store.updateGanttBar({
|
|
980
|
+
rowIndex: e.rowIndex,
|
|
981
|
+
colIndex: e.colIndex,
|
|
982
|
+
type: "resize",
|
|
983
|
+
edge: "start",
|
|
984
|
+
oldStart: X,
|
|
985
|
+
newStart: Q,
|
|
986
|
+
end: f.value,
|
|
987
|
+
delta: N,
|
|
988
|
+
oldColspan: f.value - X,
|
|
989
|
+
newColspan: f.value - Q
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
function Ne(V) {
|
|
993
|
+
if (!we.value || !r.value) return;
|
|
994
|
+
const P = (V - F.value.startX) / O.value, N = Math.max(w.value + 1, Math.min(e.columnsCount, F.value.startPos + P));
|
|
995
|
+
r.value.style.width = `${(N - w.value) / e.colspan * 100}%`;
|
|
996
|
+
}
|
|
997
|
+
function it(V) {
|
|
998
|
+
if (!r.value) return;
|
|
999
|
+
const P = V - F.value.startX, N = Math.round(P / O.value), X = f.value, Q = Math.max(w.value + 1, Math.min(e.columnsCount, F.value.startPos + N));
|
|
1000
|
+
f.value = Q, e.store.updateGanttBar({
|
|
1001
|
+
rowIndex: e.rowIndex,
|
|
1002
|
+
colIndex: e.colIndex,
|
|
1003
|
+
type: "resize",
|
|
1004
|
+
edge: "end",
|
|
1005
|
+
oldEnd: X,
|
|
1006
|
+
newEnd: Q,
|
|
1007
|
+
start: w.value,
|
|
1008
|
+
delta: N,
|
|
1009
|
+
oldColspan: X - w.value,
|
|
1010
|
+
newColspan: Q - w.value
|
|
1011
|
+
});
|
|
1012
|
+
}
|
|
1013
|
+
function Be(V) {
|
|
1014
|
+
if (!Fe.value || !r.value) return;
|
|
1015
|
+
const P = (V - F.value.startX) / O.value, N = f.value - w.value, X = Math.max(0, Math.min(F.value.startPos + P, e.columnsCount - N));
|
|
1016
|
+
r.value.style.left = `${X / e.colspan * 100}%`;
|
|
1017
|
+
}
|
|
1018
|
+
function ut(V) {
|
|
1019
|
+
if (!r.value) return;
|
|
1020
|
+
const P = V - F.value.startX, N = Math.round(P / O.value), X = f.value - w.value, Q = w.value, d = f.value;
|
|
1021
|
+
let v = F.value.startPos + N, b = v + X;
|
|
1022
|
+
v < 0 ? (v = 0, b = X) : b > e.columnsCount && (b = e.columnsCount, v = b - X), w.value = v, f.value = b, e.store.updateGanttBar({
|
|
1023
|
+
rowIndex: e.rowIndex,
|
|
1024
|
+
colIndex: e.colIndex,
|
|
1025
|
+
type: "bar",
|
|
1026
|
+
oldStart: Q,
|
|
1027
|
+
oldEnd: d,
|
|
1028
|
+
newStart: v,
|
|
1029
|
+
newEnd: b,
|
|
1030
|
+
delta: N,
|
|
1031
|
+
colspan: b - v
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
function ct() {
|
|
1035
|
+
const { x: V, y: P } = ke(r), { x: N, y: X } = ke(c), { x: Q, y: d } = ke(m);
|
|
1036
|
+
e.store.registerGanttBar({
|
|
1037
|
+
id: s,
|
|
1038
|
+
rowIndex: e.rowIndex,
|
|
1039
|
+
colIndex: e.colIndex,
|
|
1040
|
+
startIndex: w,
|
|
1041
|
+
endIndex: f,
|
|
1042
|
+
color: a,
|
|
1043
|
+
label: e.label,
|
|
1044
|
+
position: { x: V, y: P }
|
|
1045
|
+
}), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
|
|
1046
|
+
id: `${s}-connection-left`,
|
|
1047
|
+
rowIndex: e.rowIndex,
|
|
1048
|
+
colIndex: e.colIndex,
|
|
1049
|
+
side: "left",
|
|
1050
|
+
position: { x: N, y: X },
|
|
1051
|
+
visible: h,
|
|
1052
|
+
barId: s
|
|
1053
|
+
}), e.store.registerConnectionHandle({
|
|
1054
|
+
id: `${s}-connection-right`,
|
|
1055
|
+
rowIndex: e.rowIndex,
|
|
1056
|
+
colIndex: e.colIndex,
|
|
1057
|
+
side: "right",
|
|
1058
|
+
position: { x: Q, y: d },
|
|
1059
|
+
visible: I,
|
|
1060
|
+
barId: s
|
|
1061
|
+
}));
|
|
1062
|
+
}
|
|
1063
|
+
function dt() {
|
|
1064
|
+
e.store.unregisterGanttBar(s), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${s}-connection-left`), e.store.unregisterConnectionHandle(`${s}-connection-right`));
|
|
1065
|
+
}
|
|
1066
|
+
function ft() {
|
|
1067
|
+
e.store.isDependencyGraphEnabled && (h.value = !0, I.value = !0);
|
|
1068
|
+
}
|
|
1069
|
+
function Ge() {
|
|
1070
|
+
!E.value && !L.value && (h.value = !1, I.value = !1);
|
|
1071
|
+
}
|
|
1072
|
+
function Ue(V, P) {
|
|
1073
|
+
P.preventDefault(), P.stopPropagation(), z.value = !0, V === "left" ? E.value = !0 : L.value = !0;
|
|
1074
|
+
const N = V === "left" ? c.value : m.value;
|
|
1075
|
+
if (N) {
|
|
1076
|
+
const d = N.getBoundingClientRect(), v = d.left + d.width / 2, b = d.top + d.height / 2;
|
|
1077
|
+
R.value = { startX: v, startY: b, endX: v, endY: b };
|
|
1078
|
+
}
|
|
1079
|
+
const X = (d) => {
|
|
1080
|
+
R.value.endX = d.clientX, R.value.endY = d.clientY;
|
|
1081
|
+
}, Q = (d) => {
|
|
1082
|
+
ze(d, V), We(X, Q);
|
|
1083
|
+
};
|
|
1084
|
+
document.addEventListener("mousemove", X), document.addEventListener("mouseup", Q);
|
|
1085
|
+
}
|
|
1086
|
+
function ze(V, P) {
|
|
1087
|
+
const N = document.elementFromPoint(V.clientX, V.clientY)?.closest(".connection-handle");
|
|
1088
|
+
if (N && N !== (P === "left" ? c.value : m.value)) {
|
|
1089
|
+
const X = N.closest(".gantt-bar");
|
|
1090
|
+
if (X) {
|
|
1091
|
+
const Q = parseInt(X.getAttribute("data-rowindex") || "0"), d = parseInt(X.getAttribute("data-colindex") || "0"), v = N.classList.contains("left-connection-handle") ? "left" : "right", b = `gantt-bar-row-${Q}-col-${d}`, H = e.store.createConnection(
|
|
1092
|
+
`${s}-connection-${P}`,
|
|
1093
|
+
`${b}-connection-${v}`
|
|
1094
|
+
);
|
|
1095
|
+
H && o("connection:create", H);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
function We(V, P) {
|
|
1100
|
+
z.value = !1, E.value = !1, L.value = !1, document.removeEventListener("mousemove", V), document.removeEventListener("mouseup", P), r.value?.matches(":hover") || Ge();
|
|
1101
|
+
}
|
|
1102
|
+
return t({
|
|
1103
|
+
barStyle: q,
|
|
1104
|
+
cleanupConnectionDrag: We,
|
|
1105
|
+
currentEnd: f,
|
|
1106
|
+
handleConnectionDrop: ze,
|
|
1107
|
+
isLeftConnectionDragging: E,
|
|
1108
|
+
isLeftConnectionVisible: h,
|
|
1109
|
+
isRightConnectionDragging: L,
|
|
1110
|
+
isRightConnectionVisible: I,
|
|
1111
|
+
showDragPreview: z
|
|
1112
|
+
}), (V, P) => (x(), k("td", {
|
|
1113
|
+
class: "aganttcell",
|
|
1114
|
+
colspan: e.colspan
|
|
1115
|
+
}, [
|
|
1116
|
+
y("div", go, [
|
|
1117
|
+
y("div", {
|
|
1118
|
+
ref: "bar",
|
|
1119
|
+
"data-rowindex": e.rowIndex,
|
|
1120
|
+
"data-colindex": e.colIndex,
|
|
1121
|
+
class: ee(["gantt-bar", { "is-dragging": C.value }]),
|
|
1122
|
+
style: ce(q.value),
|
|
1123
|
+
onMouseenter: ft,
|
|
1124
|
+
onMouseleave: Ge
|
|
1125
|
+
}, [
|
|
1126
|
+
e.store.isDependencyGraphEnabled ? (x(), k("div", {
|
|
1127
|
+
key: 0,
|
|
1128
|
+
ref: "leftConnectionHandle",
|
|
1129
|
+
class: ee(["connection-handle left-connection-handle", { visible: h.value, "is-dragging": E.value }]),
|
|
1130
|
+
onMousedown: P[0] || (P[0] = $e((N) => Ue("left", N), ["stop"]))
|
|
1131
|
+
}, [...P[2] || (P[2] = [
|
|
1132
|
+
y("div", { class: "connection-dot" }, null, -1)
|
|
1133
|
+
])], 34)) : K("", !0),
|
|
1134
|
+
e.store.isDependencyGraphEnabled ? (x(), k("div", {
|
|
1135
|
+
key: 1,
|
|
1136
|
+
ref: "rightConnectionHandle",
|
|
1137
|
+
class: ee(["connection-handle right-connection-handle", { visible: I.value, "is-dragging": L.value }]),
|
|
1138
|
+
onMousedown: P[1] || (P[1] = $e((N) => Ue("right", N), ["stop"]))
|
|
1139
|
+
}, [...P[3] || (P[3] = [
|
|
1140
|
+
y("div", { class: "connection-dot" }, null, -1)
|
|
1141
|
+
])], 34)) : K("", !0),
|
|
1142
|
+
y("div", {
|
|
1143
|
+
ref: "leftResizeHandle",
|
|
1144
|
+
class: ee(["resize-handle left-resize-handle", { "is-dragging": $(le) }])
|
|
1145
|
+
}, [...P[4] || (P[4] = [
|
|
1146
|
+
y("div", { class: "handle-grip" }, null, -1),
|
|
1147
|
+
y("div", { class: "vertical-indicator left-indicator" }, null, -1)
|
|
1148
|
+
])], 2),
|
|
1149
|
+
e.label ? (x(), k("label", wo, W(e.label), 1)) : K("", !0),
|
|
1150
|
+
y("div", {
|
|
1151
|
+
ref: "rightResizeHandle",
|
|
1152
|
+
class: ee(["resize-handle right-resize-handle", { "is-dragging": $(we) }])
|
|
1153
|
+
}, [...P[5] || (P[5] = [
|
|
1154
|
+
y("div", { class: "handle-grip" }, null, -1),
|
|
1155
|
+
y("div", { class: "vertical-indicator right-indicator" }, null, -1)
|
|
1156
|
+
])], 2)
|
|
1157
|
+
], 46, yo)
|
|
1158
|
+
], 512),
|
|
1159
|
+
e.store.isDependencyGraphEnabled && z.value ? (x(), k("svg", {
|
|
1160
|
+
key: 0,
|
|
1161
|
+
style: ce(G.value)
|
|
1162
|
+
}, [
|
|
1163
|
+
y("line", {
|
|
1164
|
+
x1: R.value.startX,
|
|
1165
|
+
y1: R.value.startY,
|
|
1166
|
+
x2: R.value.endX,
|
|
1167
|
+
y2: R.value.endY,
|
|
1168
|
+
stroke: "#2196f3",
|
|
1169
|
+
"stroke-width": "2",
|
|
1170
|
+
"stroke-dasharray": "5,5"
|
|
1171
|
+
}, null, 8, xo)
|
|
1172
|
+
], 4)) : K("", !0)
|
|
1173
|
+
], 8, ho));
|
|
1174
|
+
}
|
|
1175
|
+
}), Io = /* @__PURE__ */ Ie(bo, [["__scopeId", "data-v-8917a8a3"]]), ko = ["tabindex"], Co = /* @__PURE__ */ j({
|
|
1176
|
+
__name: "ARow",
|
|
1177
|
+
props: {
|
|
1178
|
+
rowIndex: {},
|
|
1179
|
+
store: {},
|
|
1180
|
+
tabIndex: { default: () => -1 },
|
|
1181
|
+
addNavigation: { type: [Boolean, Object], default: !1 }
|
|
1182
|
+
},
|
|
1183
|
+
setup(e) {
|
|
1184
|
+
const t = ne("rowEl"), n = M(() => e.store.isRowVisible(e.rowIndex)), o = M(() => e.store.getRowExpandSymbol(e.rowIndex));
|
|
1185
|
+
if (e.addNavigation) {
|
|
1186
|
+
let a = at;
|
|
1187
|
+
typeof e.addNavigation == "object" && (a = {
|
|
1188
|
+
...a,
|
|
1189
|
+
...e.addNavigation
|
|
1190
|
+
}), St([
|
|
1191
|
+
{
|
|
1192
|
+
selectors: t,
|
|
1193
|
+
handlers: a
|
|
1194
|
+
}
|
|
1195
|
+
]);
|
|
1196
|
+
}
|
|
1197
|
+
return (a, s) => U((x(), k("tr", {
|
|
1198
|
+
ref: "rowEl",
|
|
1199
|
+
tabindex: e.tabIndex,
|
|
1200
|
+
class: "atable-row"
|
|
1201
|
+
}, [
|
|
1202
|
+
e.store.config.view !== "uncounted" ? oe(a.$slots, "index", { key: 0 }, () => [
|
|
1203
|
+
e.store.config.view === "list" ? (x(), k("td", {
|
|
1204
|
+
key: 0,
|
|
1205
|
+
tabIndex: -1,
|
|
1206
|
+
class: ee(["list-index", e.store.hasPinnedColumns ? "sticky-index" : ""])
|
|
1207
|
+
}, W(e.rowIndex + 1), 3)) : e.store.isTreeView ? (x(), k("td", {
|
|
1208
|
+
key: 1,
|
|
1209
|
+
tabIndex: -1,
|
|
1210
|
+
class: ee(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
1211
|
+
onClick: s[0] || (s[0] = (l) => e.store.toggleRowExpand(e.rowIndex))
|
|
1212
|
+
}, W(o.value), 3)) : K("", !0)
|
|
1213
|
+
], !0) : K("", !0),
|
|
1214
|
+
oe(a.$slots, "default", {}, void 0, !0)
|
|
1215
|
+
], 8, ko)), [
|
|
1216
|
+
[be, n.value]
|
|
1217
|
+
]);
|
|
1218
|
+
}
|
|
1219
|
+
}), dn = /* @__PURE__ */ Ie(Co, [["__scopeId", "data-v-0fa91f83"]]), ht = /* @__PURE__ */ new WeakMap(), Eo = {
|
|
1220
|
+
mounted(e, t) {
|
|
1221
|
+
const n = !t.modifiers.bubble;
|
|
1222
|
+
let o;
|
|
1223
|
+
if (typeof t.value == "function") o = zt(e, t.value, { capture: n });
|
|
1224
|
+
else {
|
|
1225
|
+
const [a, s] = t.value;
|
|
1226
|
+
o = zt(e, a, Object.assign({ capture: n }, s));
|
|
1227
|
+
}
|
|
1228
|
+
ht.set(e, o);
|
|
1229
|
+
},
|
|
1230
|
+
unmounted(e) {
|
|
1231
|
+
const t = ht.get(e);
|
|
1232
|
+
t && typeof t == "function" ? t() : t?.stop(), ht.delete(e);
|
|
1233
|
+
}
|
|
1234
|
+
}, Do = { mounted(e, t) {
|
|
1235
|
+
typeof t.value == "function" ? kt(e, t.value) : kt(e, ...t.value);
|
|
1236
|
+
} };
|
|
1237
|
+
function To() {
|
|
1238
|
+
let e = !1;
|
|
1239
|
+
const t = J(!1);
|
|
1240
|
+
return (n, o) => {
|
|
1241
|
+
if (t.value = o.value, e) return;
|
|
1242
|
+
e = !0;
|
|
1243
|
+
const a = oo(n, o.value);
|
|
1244
|
+
Y(t, (s) => a.value = s);
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
To();
|
|
1248
|
+
const Ao = { class: "gantt-connection-overlay" }, $o = {
|
|
1249
|
+
class: "connection-svg",
|
|
1250
|
+
style: {
|
|
1251
|
+
position: "absolute",
|
|
1252
|
+
top: 0,
|
|
1253
|
+
left: 0,
|
|
1254
|
+
width: "100%",
|
|
1255
|
+
height: "100%",
|
|
1256
|
+
pointerEvents: "none",
|
|
1257
|
+
zIndex: 1
|
|
1258
|
+
}
|
|
1259
|
+
}, Mo = ["d", "stroke-width", "onDblclick"], So = ["id", "d", "stroke", "stroke-width", "onDblclick"], Lo = 0.25, qe = 16, Ro = /* @__PURE__ */ j({
|
|
1260
|
+
__name: "AGanttConnection",
|
|
1261
|
+
props: {
|
|
1262
|
+
store: {}
|
|
1263
|
+
},
|
|
1264
|
+
emits: ["connection:delete"],
|
|
1265
|
+
setup(e, { emit: t }) {
|
|
1266
|
+
const n = t, o = M(() => e.store.connectionPaths.filter((l) => {
|
|
1267
|
+
const r = e.store.ganttBars.find((u) => u.id === l.from.barId), i = e.store.ganttBars.find((u) => u.id === l.to.barId);
|
|
1268
|
+
return r && i;
|
|
1269
|
+
})), a = (l) => {
|
|
1270
|
+
const r = e.store.connectionHandles.find(
|
|
1271
|
+
(C) => C.barId === l.from.barId && C.side === l.from.side
|
|
1272
|
+
), i = e.store.connectionHandles.find(
|
|
1273
|
+
(C) => C.barId === l.to.barId && C.side === l.to.side
|
|
1274
|
+
);
|
|
1275
|
+
if (!r || !i) return "";
|
|
1276
|
+
const u = r.position.x + qe / 2, c = r.position.y + qe / 2, m = i.position.x + qe / 2, g = i.position.y + qe / 2, p = Math.abs(m - u), D = Math.max(p * Lo, 50), w = u + (l.from.side === "left" ? -D : D), f = m + (l.to.side === "left" ? -D : D), h = { x: 0.5 * u + 0.5 * w, y: 0.5 * c + 0.5 * c }, I = { x: 0.5 * w + 0.5 * f, y: 0.5 * c + 0.5 * g }, E = { x: 0.5 * f + 0.5 * m, y: 0.5 * g + 0.5 * g }, L = { x: 0.5 * h.x + 0.5 * I.x, y: 0.5 * h.y + 0.5 * I.y }, z = { x: 0.5 * I.x + 0.5 * E.x, y: 0.5 * I.y + 0.5 * E.y }, R = { x: 0.5 * L.x + 0.5 * z.x, y: 0.5 * L.y + 0.5 * z.y };
|
|
1277
|
+
return `M ${u} ${c} Q ${w} ${c}, ${R.x} ${R.y} Q ${f} ${g}, ${m} ${g}`;
|
|
1278
|
+
}, s = (l) => {
|
|
1279
|
+
e.store.deleteConnection(l.id) && n("connection:delete", l);
|
|
1280
|
+
};
|
|
1281
|
+
return (l, r) => (x(), k("div", Ao, [
|
|
1282
|
+
(x(), k("svg", $o, [
|
|
1283
|
+
r[0] || (r[0] = y("defs", null, [
|
|
1284
|
+
y("path", {
|
|
1285
|
+
id: "arrowhead",
|
|
1286
|
+
d: "M 0 -7 L 20 0 L 0 7Z",
|
|
1287
|
+
stroke: "black",
|
|
1288
|
+
"stroke-width": "1",
|
|
1289
|
+
fill: "currentColor"
|
|
1290
|
+
}),
|
|
1291
|
+
y("marker", {
|
|
1292
|
+
id: "arrowhead-marker",
|
|
1293
|
+
markerWidth: "10",
|
|
1294
|
+
markerHeight: "7",
|
|
1295
|
+
refX: "5",
|
|
1296
|
+
refY: "3.5",
|
|
1297
|
+
orient: "auto",
|
|
1298
|
+
markerUnits: "strokeWidth"
|
|
1299
|
+
}, [
|
|
1300
|
+
y("polygon", {
|
|
1301
|
+
points: "0 0, 10 3.5, 0 7",
|
|
1302
|
+
fill: "currentColor"
|
|
1303
|
+
})
|
|
1304
|
+
])
|
|
1305
|
+
], -1)),
|
|
1306
|
+
(x(!0), k(te, null, ae(o.value, (i) => (x(), k("path", {
|
|
1307
|
+
key: `${i.id}-hitbox`,
|
|
1308
|
+
d: a(i),
|
|
1309
|
+
stroke: "transparent",
|
|
1310
|
+
"stroke-width": (i.style?.width || 2) + 10,
|
|
1311
|
+
fill: "none",
|
|
1312
|
+
class: "connection-hitbox",
|
|
1313
|
+
onDblclick: (u) => s(i)
|
|
1314
|
+
}, null, 40, Mo))), 128)),
|
|
1315
|
+
(x(!0), k(te, null, ae(o.value, (i) => (x(), k("path", {
|
|
1316
|
+
id: i.id,
|
|
1317
|
+
key: i.id,
|
|
1318
|
+
d: a(i),
|
|
1319
|
+
stroke: i.style?.color || "#666",
|
|
1320
|
+
"stroke-width": i.style?.width || 2,
|
|
1321
|
+
fill: "none",
|
|
1322
|
+
"marker-mid": "url(#arrowhead-marker)",
|
|
1323
|
+
class: "connection-path animated-path",
|
|
1324
|
+
onDblclick: (u) => s(i)
|
|
1325
|
+
}, null, 40, So))), 128))
|
|
1326
|
+
]))
|
|
1327
|
+
]));
|
|
1328
|
+
}
|
|
1329
|
+
}), Vo = /* @__PURE__ */ Ie(Ro, [["__scopeId", "data-v-71911260"]]), Po = { class: "column-filter" }, Oo = {
|
|
1330
|
+
key: 2,
|
|
1331
|
+
class: "checkbox-filter"
|
|
1332
|
+
}, _o = ["value"], Ho = {
|
|
1333
|
+
key: 5,
|
|
1334
|
+
class: "date-range-filter"
|
|
1335
|
+
}, Fo = /* @__PURE__ */ j({
|
|
1336
|
+
__name: "ATableColumnFilter",
|
|
1337
|
+
props: {
|
|
1338
|
+
column: {},
|
|
1339
|
+
colIndex: {},
|
|
1340
|
+
store: {}
|
|
1341
|
+
},
|
|
1342
|
+
setup(e) {
|
|
1343
|
+
const t = S(""), n = nn({
|
|
1344
|
+
startValue: "",
|
|
1345
|
+
endValue: ""
|
|
1346
|
+
}), o = (i) => {
|
|
1347
|
+
if (i.filterOptions) return i.filterOptions;
|
|
1348
|
+
const u = /* @__PURE__ */ new Set();
|
|
1349
|
+
return e.store.rows.forEach((c) => {
|
|
1350
|
+
const m = c[i.name];
|
|
1351
|
+
m != null && m !== "" && u.add(m);
|
|
1352
|
+
}), Array.from(u).map((c) => ({
|
|
1353
|
+
value: c,
|
|
1354
|
+
label: String(c)
|
|
1355
|
+
}));
|
|
1356
|
+
}, a = M(() => !!(t.value || n.startValue || n.endValue)), s = (i) => {
|
|
1357
|
+
!i && e.column.filterType !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = i, e.store.setFilter(e.colIndex, { value: i }));
|
|
1358
|
+
}, l = (i, u) => {
|
|
1359
|
+
i === "start" ? n.startValue = u : n.endValue = u, !n.startValue && !n.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
|
|
1360
|
+
value: null,
|
|
1361
|
+
startValue: n.startValue,
|
|
1362
|
+
endValue: n.endValue
|
|
1363
|
+
});
|
|
1364
|
+
}, r = () => {
|
|
1365
|
+
t.value = "", n.startValue = "", n.endValue = "", e.store.clearFilter(e.colIndex);
|
|
1366
|
+
};
|
|
1367
|
+
return (i, u) => (x(), k("div", Po, [
|
|
1368
|
+
(e.column.filterType || "text") === "text" ? U((x(), k("input", {
|
|
1369
|
+
key: 0,
|
|
1370
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => t.value = c),
|
|
1371
|
+
type: "text",
|
|
1372
|
+
class: "filter-input",
|
|
1373
|
+
onInput: u[1] || (u[1] = (c) => s(t.value))
|
|
1374
|
+
}, null, 544)), [
|
|
1375
|
+
[se, t.value]
|
|
1376
|
+
]) : e.column.filterType === "number" ? U((x(), k("input", {
|
|
1377
|
+
key: 1,
|
|
1378
|
+
"onUpdate:modelValue": u[2] || (u[2] = (c) => t.value = c),
|
|
1379
|
+
type: "number",
|
|
1380
|
+
class: "filter-input",
|
|
1381
|
+
onInput: u[3] || (u[3] = (c) => s(t.value))
|
|
1382
|
+
}, null, 544)), [
|
|
1383
|
+
[se, t.value]
|
|
1384
|
+
]) : e.column.filterType === "checkbox" ? (x(), k("label", Oo, [
|
|
1385
|
+
U(y("input", {
|
|
1386
|
+
"onUpdate:modelValue": u[4] || (u[4] = (c) => t.value = c),
|
|
1387
|
+
type: "checkbox",
|
|
1388
|
+
class: "filter-checkbox",
|
|
1389
|
+
onChange: u[5] || (u[5] = (c) => s(t.value))
|
|
1390
|
+
}, null, 544), [
|
|
1391
|
+
[on, t.value]
|
|
1392
|
+
]),
|
|
1393
|
+
y("span", null, W(e.column.label), 1)
|
|
1394
|
+
])) : e.column.filterType === "select" ? U((x(), k("select", {
|
|
1395
|
+
key: 3,
|
|
1396
|
+
"onUpdate:modelValue": u[6] || (u[6] = (c) => t.value = c),
|
|
1397
|
+
class: "filter-select",
|
|
1398
|
+
onChange: u[7] || (u[7] = (c) => s(t.value))
|
|
1399
|
+
}, [
|
|
1400
|
+
u[15] || (u[15] = y("option", { value: "" }, "All", -1)),
|
|
1401
|
+
(x(!0), k(te, null, ae(o(e.column), (c) => (x(), k("option", {
|
|
1402
|
+
key: c.value || c,
|
|
1403
|
+
value: c.value || c
|
|
1404
|
+
}, W(c.label || c), 9, _o))), 128))
|
|
1405
|
+
], 544)), [
|
|
1406
|
+
[In, t.value]
|
|
1407
|
+
]) : e.column.filterType === "date" ? U((x(), k("input", {
|
|
1408
|
+
key: 4,
|
|
1409
|
+
"onUpdate:modelValue": u[8] || (u[8] = (c) => t.value = c),
|
|
1410
|
+
type: "date",
|
|
1411
|
+
class: "filter-input",
|
|
1412
|
+
onChange: u[9] || (u[9] = (c) => s(t.value))
|
|
1413
|
+
}, null, 544)), [
|
|
1414
|
+
[se, t.value]
|
|
1415
|
+
]) : e.column.filterType === "dateRange" ? (x(), k("div", Ho, [
|
|
1416
|
+
U(y("input", {
|
|
1417
|
+
"onUpdate:modelValue": u[10] || (u[10] = (c) => n.startValue = c),
|
|
1418
|
+
type: "date",
|
|
1419
|
+
class: "filter-input",
|
|
1420
|
+
onChange: u[11] || (u[11] = (c) => l("start", n.startValue))
|
|
1421
|
+
}, null, 544), [
|
|
1422
|
+
[se, n.startValue]
|
|
1423
|
+
]),
|
|
1424
|
+
u[16] || (u[16] = y("span", { class: "date-separator" }, "-", -1)),
|
|
1425
|
+
U(y("input", {
|
|
1426
|
+
"onUpdate:modelValue": u[12] || (u[12] = (c) => n.endValue = c),
|
|
1427
|
+
type: "date",
|
|
1428
|
+
class: "filter-input",
|
|
1429
|
+
onChange: u[13] || (u[13] = (c) => l("end", n.endValue))
|
|
1430
|
+
}, null, 544), [
|
|
1431
|
+
[se, n.endValue]
|
|
1432
|
+
])
|
|
1433
|
+
])) : e.column.filterType === "component" && e.column.filterComponent ? (x(), re(Ae(e.column.filterComponent), {
|
|
1434
|
+
key: 6,
|
|
1435
|
+
value: t.value,
|
|
1436
|
+
column: e.column,
|
|
1437
|
+
colIndex: e.colIndex,
|
|
1438
|
+
store: e.store,
|
|
1439
|
+
"onUpdate:value": u[14] || (u[14] = (c) => s(c))
|
|
1440
|
+
}, null, 40, ["value", "column", "colIndex", "store"])) : K("", !0),
|
|
1441
|
+
a.value ? (x(), k("button", {
|
|
1442
|
+
key: 7,
|
|
1443
|
+
onClick: r,
|
|
1444
|
+
class: "clear-btn",
|
|
1445
|
+
title: "Clear"
|
|
1446
|
+
}, "×")) : K("", !0)
|
|
1447
|
+
]));
|
|
1448
|
+
}
|
|
1449
|
+
}), No = /* @__PURE__ */ Ie(Fo, [["__scopeId", "data-v-8487462d"]]), Bo = { key: 0 }, Go = {
|
|
1450
|
+
class: "atable-header-row",
|
|
1451
|
+
tabindex: "-1"
|
|
1452
|
+
}, Uo = ["data-colindex", "onClick"], zo = {
|
|
1453
|
+
key: 0,
|
|
1454
|
+
class: "atable-filters-row"
|
|
1455
|
+
}, fn = /* @__PURE__ */ j({
|
|
1456
|
+
__name: "ATableHeader",
|
|
1457
|
+
props: {
|
|
1458
|
+
columns: {},
|
|
1459
|
+
store: {}
|
|
1460
|
+
},
|
|
1461
|
+
setup(e) {
|
|
1462
|
+
const t = M(() => e.columns.filter((a) => a.filterable)), n = (a) => e.store.sortByColumn(a), o = (a) => {
|
|
1463
|
+
for (const s of a) {
|
|
1464
|
+
if (s.borderBoxSize.length === 0) continue;
|
|
1465
|
+
const l = s.borderBoxSize[0].inlineSize, r = Number(s.target.dataset.colindex), i = e.store.columns[r]?.width;
|
|
1466
|
+
typeof i == "number" && i !== l && e.store.resizeColumn(r, l);
|
|
1467
|
+
}
|
|
1468
|
+
};
|
|
1469
|
+
return (a, s) => e.columns.length ? (x(), k("thead", Bo, [
|
|
1470
|
+
y("tr", Go, [
|
|
1471
|
+
e.store.zeroColumn ? (x(), k("th", {
|
|
1472
|
+
key: 0,
|
|
1473
|
+
id: "header-index",
|
|
1474
|
+
class: ee([[
|
|
1475
|
+
e.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1476
|
+
e.store.isTreeView ? "tree-index" : "",
|
|
1477
|
+
e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1478
|
+
], "list-index"])
|
|
1479
|
+
}, null, 2)) : K("", !0),
|
|
1480
|
+
(x(!0), k(te, null, ae(e.columns, (l, r) => U((x(), k("th", {
|
|
1481
|
+
key: l.name,
|
|
1482
|
+
"data-colindex": r,
|
|
1483
|
+
tabindex: "-1",
|
|
1484
|
+
style: ce(e.store.getHeaderCellStyle(l)),
|
|
1485
|
+
class: ee(`${l.pinned ? "sticky-column" : ""} ${l.sortable === !1 ? "" : "cursor-pointer"}`),
|
|
1486
|
+
onClick: (i) => l.sortable !== !1 ? n(r) : void 0
|
|
1487
|
+
}, [
|
|
1488
|
+
oe(a.$slots, "default", {}, () => [
|
|
1489
|
+
Ct(W(l.label || String.fromCharCode(r + 97).toUpperCase()), 1)
|
|
1490
|
+
])
|
|
1491
|
+
], 14, Uo)), [
|
|
1492
|
+
[$(Do), o]
|
|
1493
|
+
])), 128))
|
|
1494
|
+
]),
|
|
1495
|
+
t.value.length > 0 ? (x(), k("tr", zo, [
|
|
1496
|
+
e.store.zeroColumn ? (x(), k("th", {
|
|
1497
|
+
key: 0,
|
|
1498
|
+
class: ee([[
|
|
1499
|
+
e.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1500
|
+
e.store.isTreeView ? "tree-index" : "",
|
|
1501
|
+
e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1502
|
+
], "list-index"])
|
|
1503
|
+
}, null, 2)) : K("", !0),
|
|
1504
|
+
(x(!0), k(te, null, ae(e.columns, (l, r) => (x(), k("th", {
|
|
1505
|
+
key: `filter-${l.name}`,
|
|
1506
|
+
class: ee(`${l.pinned ? "sticky-column" : ""}`),
|
|
1507
|
+
style: ce(e.store.getHeaderCellStyle(l))
|
|
1508
|
+
}, [
|
|
1509
|
+
l.filterable ? (x(), re(No, {
|
|
1510
|
+
key: 0,
|
|
1511
|
+
column: l,
|
|
1512
|
+
"col-index": r,
|
|
1513
|
+
store: e.store
|
|
1514
|
+
}, null, 8, ["column", "col-index", "store"])) : K("", !0)
|
|
1515
|
+
], 6))), 128))
|
|
1516
|
+
])) : K("", !0)
|
|
1517
|
+
])) : K("", !0);
|
|
1518
|
+
}
|
|
1519
|
+
}), vn = /* @__PURE__ */ j({
|
|
1520
|
+
__name: "ATableModal",
|
|
1521
|
+
props: {
|
|
1522
|
+
store: {}
|
|
1523
|
+
},
|
|
1524
|
+
setup(e) {
|
|
1525
|
+
const t = ne("amodal"), { width: n, height: o } = ke(t), a = M(() => {
|
|
1526
|
+
if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
|
|
1527
|
+
const s = e.store.modal.cell?.closest("table");
|
|
1528
|
+
if (!s) return {};
|
|
1529
|
+
const l = s.offsetHeight || 0, r = s.offsetWidth || 0;
|
|
1530
|
+
let i = e.store.modal.cell?.offsetTop || 0;
|
|
1531
|
+
const u = s.querySelector("thead")?.offsetHeight || 0;
|
|
1532
|
+
i += u, i = i + o.value < l ? i : i - (o.value + e.store.modal.height);
|
|
1533
|
+
let c = e.store.modal.cell?.offsetLeft || 0;
|
|
1534
|
+
return c = c + n.value <= r ? c : c - (n.value - e.store.modal.width), {
|
|
1535
|
+
left: `${c}px`,
|
|
1536
|
+
top: `${i}px`
|
|
1537
|
+
};
|
|
1538
|
+
});
|
|
1539
|
+
return (s, l) => (x(), k("div", {
|
|
1540
|
+
ref: "amodal",
|
|
1541
|
+
class: "amodal",
|
|
1542
|
+
tabindex: "-1",
|
|
1543
|
+
style: ce(a.value),
|
|
1544
|
+
onClick: l[0] || (l[0] = $e(() => {
|
|
1545
|
+
}, ["stop"])),
|
|
1546
|
+
onInput: l[1] || (l[1] = $e(() => {
|
|
1547
|
+
}, ["stop"]))
|
|
1548
|
+
}, [
|
|
1549
|
+
oe(s.$slots, "default")
|
|
1550
|
+
], 36));
|
|
1551
|
+
}
|
|
1552
|
+
}), Wo = (e) => {
|
|
1553
|
+
const t = e.id || ao();
|
|
1554
|
+
return En(`table-${t}`, () => {
|
|
1555
|
+
const n = () => {
|
|
1556
|
+
const d = [Object.assign({}, { rowModified: !1 })], v = /* @__PURE__ */ new Set();
|
|
1557
|
+
for (let A = 0; A < a.value.length; A++) {
|
|
1558
|
+
const _ = a.value[A];
|
|
1559
|
+
_.parent !== null && _.parent !== void 0 && v.add(_.parent);
|
|
1560
|
+
}
|
|
1561
|
+
const b = (A) => a.value[A]?.gantt !== void 0, H = (A) => {
|
|
1562
|
+
for (let _ = 0; _ < a.value.length; _++)
|
|
1563
|
+
if (a.value[_].parent === A && (b(_) || H(_)))
|
|
1564
|
+
return !0;
|
|
1565
|
+
return !1;
|
|
1566
|
+
}, B = (A) => {
|
|
1567
|
+
const _ = s.value, Z = _.view === "tree" || _.view === "tree-gantt" ? _.defaultTreeExpansion : void 0;
|
|
1568
|
+
if (!Z) return !0;
|
|
1569
|
+
switch (Z) {
|
|
1570
|
+
case "root":
|
|
1571
|
+
return !1;
|
|
1572
|
+
// Only root nodes are visible, all children start collapsed
|
|
1573
|
+
case "branch":
|
|
1574
|
+
return H(A);
|
|
1575
|
+
case "leaf":
|
|
1576
|
+
return !0;
|
|
1577
|
+
// All nodes should be expanded
|
|
1578
|
+
default:
|
|
1579
|
+
return !0;
|
|
1580
|
+
}
|
|
1581
|
+
};
|
|
1582
|
+
for (let A = 0; A < a.value.length; A++) {
|
|
1583
|
+
const _ = a.value[A], Z = _.parent === null || _.parent === void 0, ie = v.has(A);
|
|
1584
|
+
d[A] = {
|
|
1585
|
+
childrenOpen: B(A),
|
|
1586
|
+
expanded: !1,
|
|
1587
|
+
indent: _.indent || 0,
|
|
1588
|
+
isParent: ie,
|
|
1589
|
+
isRoot: Z,
|
|
1590
|
+
rowModified: !1,
|
|
1591
|
+
open: Z,
|
|
1592
|
+
// This will be recalculated later for non-root nodes
|
|
1593
|
+
parent: _.parent
|
|
1594
|
+
};
|
|
1595
|
+
}
|
|
1596
|
+
return d;
|
|
1597
|
+
}, o = S(e.columns), a = S(e.rows), s = S(e.config || {}), l = S({}), r = S({}), i = M(() => {
|
|
1598
|
+
const d = {};
|
|
1599
|
+
for (const [v, b] of o.value.entries())
|
|
1600
|
+
for (const [H, B] of a.value.entries())
|
|
1601
|
+
d[`${v}:${H}`] = B[b.name];
|
|
1602
|
+
return d;
|
|
1603
|
+
}), u = M({
|
|
1604
|
+
get: () => {
|
|
1605
|
+
const d = n();
|
|
1606
|
+
for (let v = 0; v < d.length; v++)
|
|
1607
|
+
l.value[v] && (d[v].rowModified = l.value[v]), r.value[v] && (r.value[v].childrenOpen !== void 0 && (d[v].childrenOpen = r.value[v].childrenOpen), r.value[v].expanded !== void 0 && (d[v].expanded = r.value[v].expanded));
|
|
1608
|
+
if (E.value) {
|
|
1609
|
+
const v = (b, H) => {
|
|
1610
|
+
const B = H[b];
|
|
1611
|
+
if (B.isRoot || B.parent === null || B.parent === void 0)
|
|
1612
|
+
return !0;
|
|
1613
|
+
const A = B.parent;
|
|
1614
|
+
return A < 0 || A >= H.length ? !1 : (H[A].childrenOpen || !1) && v(A, H);
|
|
1615
|
+
};
|
|
1616
|
+
for (let b = 0; b < d.length; b++)
|
|
1617
|
+
d[b].isRoot || (d[b].open = v(b, d));
|
|
1618
|
+
}
|
|
1619
|
+
return d;
|
|
1620
|
+
},
|
|
1621
|
+
set: (d) => {
|
|
1622
|
+
JSON.stringify(d) !== JSON.stringify(u.value) && (u.value = d);
|
|
1623
|
+
}
|
|
1624
|
+
}), c = S(e.modal || { visible: !1 }), m = S({}), g = S([]), p = S([]), D = S([]), w = S({
|
|
1625
|
+
column: null,
|
|
1626
|
+
direction: null
|
|
1627
|
+
}), f = S({}), h = M(() => o.value.some((d) => d.pinned)), I = M(() => s.value.view === "gantt" || s.value.view === "tree-gantt"), E = M(() => s.value.view === "tree" || s.value.view === "tree-gantt"), L = M(() => {
|
|
1628
|
+
const d = s.value;
|
|
1629
|
+
return d.view === "gantt" || d.view === "tree-gantt" ? d.dependencyGraph !== !1 : !0;
|
|
1630
|
+
}), z = M(() => `${Math.ceil(a.value.length / 100 + 1)}ch`), R = M(
|
|
1631
|
+
() => s.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(s.value.view) : !1
|
|
1632
|
+
), C = M(() => {
|
|
1633
|
+
let d = a.value.map((v, b) => ({
|
|
1634
|
+
...v,
|
|
1635
|
+
originalIndex: b
|
|
1636
|
+
}));
|
|
1637
|
+
if (Object.entries(f.value).forEach(([v, b]) => {
|
|
1638
|
+
const H = parseInt(v), B = o.value[H];
|
|
1639
|
+
!B || !(b.value || b.startValue || b.endValue || B.filterType === "checkbox" && b.value !== void 0) || (d = d.filter((A) => {
|
|
1640
|
+
const _ = A[B.name];
|
|
1641
|
+
return Q(_, b, B);
|
|
1642
|
+
}));
|
|
1643
|
+
}), w.value.column !== null && w.value.direction) {
|
|
1644
|
+
const v = o.value[w.value.column], b = w.value.direction;
|
|
1645
|
+
d.sort((H, B) => {
|
|
1646
|
+
let A = H[v.name], _ = B[v.name];
|
|
1647
|
+
A == null && (A = ""), _ == null && (_ = "");
|
|
1648
|
+
const Z = Number(A), ie = Number(_);
|
|
1649
|
+
if (!isNaN(Z) && !isNaN(ie) && A !== "" && _ !== "")
|
|
1650
|
+
return b === "asc" ? Z - ie : ie - Z;
|
|
1651
|
+
{
|
|
1652
|
+
const Xe = String(A).toLowerCase(), _t = String(_).toLowerCase();
|
|
1653
|
+
return b === "asc" ? Xe.localeCompare(_t) : _t.localeCompare(Xe);
|
|
1654
|
+
}
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
return d;
|
|
1658
|
+
}), O = (d, v) => i.value[`${d}:${v}`], q = (d, v, b) => {
|
|
1659
|
+
const H = `${d}:${v}`, B = o.value[d];
|
|
1660
|
+
i.value[H] !== b && (l.value[v] = !0), i.value[H] = b, a.value[v] = {
|
|
1661
|
+
...a.value[v],
|
|
1662
|
+
[B.name]: b
|
|
1663
|
+
};
|
|
1664
|
+
}, G = (d) => {
|
|
1665
|
+
a.value = d;
|
|
1666
|
+
}, F = (d, v, b) => {
|
|
1667
|
+
const H = `${d}:${v}`;
|
|
1668
|
+
i.value[H] !== b && (l.value[v] = !0, m.value[H] = b);
|
|
1669
|
+
}, le = (d) => {
|
|
1670
|
+
const v = o.value.indexOf(d) === o.value.length - 1, b = s.value.fullWidth ? d.resizable && !v : d.resizable;
|
|
1671
|
+
return {
|
|
1672
|
+
width: d.width || "40ch",
|
|
1673
|
+
textAlign: d.align || "center",
|
|
1674
|
+
...b && {
|
|
1675
|
+
resize: "horizontal",
|
|
1676
|
+
overflow: "hidden",
|
|
1677
|
+
whiteSpace: "nowrap"
|
|
1678
|
+
}
|
|
1679
|
+
};
|
|
1680
|
+
}, we = (d, v) => {
|
|
1681
|
+
if (d < 0 || d >= o.value.length) return;
|
|
1682
|
+
const b = Math.max(v, 40);
|
|
1683
|
+
o.value[d] = {
|
|
1684
|
+
...o.value[d],
|
|
1685
|
+
width: `${b}px`
|
|
1686
|
+
};
|
|
1687
|
+
}, Fe = (d) => {
|
|
1688
|
+
const v = a.value[d];
|
|
1689
|
+
return I.value && v.gantt !== void 0;
|
|
1690
|
+
}, Ve = (d) => !E.value || u.value[d].isRoot || u.value[d].open, rt = (d) => !E.value && s.value.view !== "list-expansion" ? "" : E.value && (u.value[d].isRoot || u.value[d].isParent) ? u.value[d].childrenOpen ? "▼" : "►" : s.value.view === "list-expansion" ? u.value[d].expanded ? "▼" : "►" : "", st = (d) => {
|
|
1691
|
+
if (E.value) {
|
|
1692
|
+
const v = r.value[d] || {}, b = !(v.childrenOpen ?? u.value[d].childrenOpen);
|
|
1693
|
+
r.value[d] = {
|
|
1694
|
+
...v,
|
|
1695
|
+
childrenOpen: b
|
|
1696
|
+
}, b || Ne(d);
|
|
1697
|
+
} else if (s.value.view === "list-expansion") {
|
|
1698
|
+
const v = r.value[d] || {}, b = v.expanded ?? u.value[d].expanded;
|
|
1699
|
+
r.value[d] = {
|
|
1700
|
+
...v,
|
|
1701
|
+
expanded: !b
|
|
1702
|
+
};
|
|
1703
|
+
}
|
|
1704
|
+
}, Ne = (d) => {
|
|
1705
|
+
for (let v = 0; v < a.value.length; v++)
|
|
1706
|
+
if (u.value[v].parent === d) {
|
|
1707
|
+
const b = r.value[v] || {};
|
|
1708
|
+
r.value[v] = {
|
|
1709
|
+
...b,
|
|
1710
|
+
childrenOpen: !1
|
|
1711
|
+
}, Ne(v);
|
|
1712
|
+
}
|
|
1713
|
+
}, it = (d, v) => {
|
|
1714
|
+
const b = O(d, v);
|
|
1715
|
+
return Be(d, v, b);
|
|
1716
|
+
}, Be = (d, v, b) => {
|
|
1717
|
+
const H = o.value[d], B = a.value[v], A = H.format;
|
|
1718
|
+
return A ? typeof A == "function" ? A(b, { table: i.value, row: B, column: H }) : typeof A == "string" ? Function(`"use strict";return (${A})`)()(b, { table: i.value, row: B, column: H }) : b : b;
|
|
1719
|
+
}, ut = (d) => {
|
|
1720
|
+
d.target instanceof Node && c.value.parent?.contains(d.target) || c.value.visible && (c.value.visible = !1);
|
|
1721
|
+
}, ct = (d, v) => v && d === 0 && v > 0 ? `${v}ch` : "inherit", dt = (d) => {
|
|
1722
|
+
const v = a.value[d.rowIndex]?.gantt;
|
|
1723
|
+
v && (d.type === "resize" ? d.edge === "start" ? (v.startIndex = d.newStart, v.endIndex = d.end, v.colspan = v.endIndex - v.startIndex) : d.edge === "end" && (v.startIndex = d.start, v.endIndex = d.newEnd, v.colspan = v.endIndex - v.startIndex) : d.type === "bar" && (v.startIndex = d.newStart, v.endIndex = d.newEnd, v.colspan = v.endIndex - v.startIndex));
|
|
1724
|
+
}, ft = (d) => {
|
|
1725
|
+
const v = g.value.findIndex((b) => b.id === d.id);
|
|
1726
|
+
v >= 0 ? g.value[v] = d : g.value.push(d);
|
|
1727
|
+
}, Ge = (d) => {
|
|
1728
|
+
const v = g.value.findIndex((b) => b.id === d);
|
|
1729
|
+
v >= 0 && g.value.splice(v, 1);
|
|
1730
|
+
}, Ue = (d) => {
|
|
1731
|
+
const v = p.value.findIndex((b) => b.id === d.id);
|
|
1732
|
+
v >= 0 ? p.value[v] = d : p.value.push(d);
|
|
1733
|
+
}, ze = (d) => {
|
|
1734
|
+
const v = p.value.findIndex((b) => b.id === d);
|
|
1735
|
+
v >= 0 && p.value.splice(v, 1);
|
|
1736
|
+
}, We = (d, v, b) => {
|
|
1737
|
+
const H = p.value.find((_) => _.id === d), B = p.value.find((_) => _.id === v);
|
|
1738
|
+
if (!H || !B)
|
|
1739
|
+
return console.warn("Cannot create connection: handle not found"), null;
|
|
1740
|
+
const A = {
|
|
1741
|
+
id: `connection-${d}-${v}`,
|
|
1742
|
+
from: {
|
|
1743
|
+
barId: H.barId,
|
|
1744
|
+
side: H.side
|
|
1745
|
+
},
|
|
1746
|
+
to: {
|
|
1747
|
+
barId: B.barId,
|
|
1748
|
+
side: B.side
|
|
1749
|
+
},
|
|
1750
|
+
style: b?.style,
|
|
1751
|
+
label: b?.label
|
|
1752
|
+
};
|
|
1753
|
+
return D.value.push(A), A;
|
|
1754
|
+
}, V = (d) => {
|
|
1755
|
+
const v = D.value.findIndex((b) => b.id === d);
|
|
1756
|
+
return v >= 0 ? (D.value.splice(v, 1), !0) : !1;
|
|
1757
|
+
}, P = (d) => D.value.filter((v) => v.from.barId === d || v.to.barId === d), N = (d) => p.value.filter((v) => v.barId === d), X = (d) => {
|
|
1758
|
+
if (o.value[d].sortable === !1) return;
|
|
1759
|
+
let v;
|
|
1760
|
+
w.value.column === d && w.value.direction === "asc" ? v = "desc" : v = "asc", w.value.column = d, w.value.direction = v;
|
|
1761
|
+
}, Q = (d, v, b) => {
|
|
1762
|
+
const H = b.filterType || "text", B = v.value;
|
|
1763
|
+
if (!B && H !== "dateRange" && H !== "checkbox") return !0;
|
|
1764
|
+
switch (H) {
|
|
1765
|
+
case "text": {
|
|
1766
|
+
let A = "";
|
|
1767
|
+
return typeof d == "object" && d !== null ? A = Object.values(d).join(" ") : A = String(d || ""), A.toLowerCase().includes(String(B).toLowerCase());
|
|
1768
|
+
}
|
|
1769
|
+
case "number": {
|
|
1770
|
+
const A = Number(d), _ = Number(B);
|
|
1771
|
+
return !isNaN(A) && !isNaN(_) && A === _;
|
|
1772
|
+
}
|
|
1773
|
+
case "select":
|
|
1774
|
+
return d === B;
|
|
1775
|
+
case "checkbox":
|
|
1776
|
+
return B === !0 ? !!d : !0;
|
|
1777
|
+
case "date": {
|
|
1778
|
+
let A;
|
|
1779
|
+
if (typeof d == "number") {
|
|
1780
|
+
const Z = new Date(d), ie = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1781
|
+
A = new Date(ie, Z.getMonth(), Z.getDate());
|
|
1782
|
+
} else
|
|
1783
|
+
A = new Date(String(d));
|
|
1784
|
+
const _ = new Date(String(B));
|
|
1785
|
+
return A.toDateString() === _.toDateString();
|
|
1786
|
+
}
|
|
1787
|
+
case "dateRange": {
|
|
1788
|
+
const A = v.startValue, _ = v.endValue;
|
|
1789
|
+
if (!A && !_) return !0;
|
|
1790
|
+
let Z;
|
|
1791
|
+
if (typeof d == "number") {
|
|
1792
|
+
const ie = new Date(d), Xe = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1793
|
+
Z = new Date(Xe, ie.getMonth(), ie.getDate());
|
|
1794
|
+
} else
|
|
1795
|
+
Z = new Date(String(d));
|
|
1796
|
+
return !(A && Z < new Date(String(A)) || _ && Z > new Date(String(_)));
|
|
1797
|
+
}
|
|
1798
|
+
default:
|
|
1799
|
+
return !0;
|
|
1800
|
+
}
|
|
1801
|
+
};
|
|
1802
|
+
return {
|
|
1803
|
+
// state
|
|
1804
|
+
columns: o,
|
|
1805
|
+
config: s,
|
|
1806
|
+
connectionHandles: p,
|
|
1807
|
+
connectionPaths: D,
|
|
1808
|
+
display: u,
|
|
1809
|
+
filterState: f,
|
|
1810
|
+
ganttBars: g,
|
|
1811
|
+
modal: c,
|
|
1812
|
+
rows: a,
|
|
1813
|
+
sortState: w,
|
|
1814
|
+
table: i,
|
|
1815
|
+
updates: m,
|
|
1816
|
+
// getters
|
|
1817
|
+
filteredRows: C,
|
|
1818
|
+
hasPinnedColumns: h,
|
|
1819
|
+
isGanttView: I,
|
|
1820
|
+
isTreeView: E,
|
|
1821
|
+
isDependencyGraphEnabled: L,
|
|
1822
|
+
numberedRowWidth: z,
|
|
1823
|
+
zeroColumn: R,
|
|
1824
|
+
// actions
|
|
1825
|
+
clearFilter: (d) => {
|
|
1826
|
+
delete f.value[d];
|
|
1827
|
+
},
|
|
1828
|
+
closeModal: ut,
|
|
1829
|
+
createConnection: We,
|
|
1830
|
+
deleteConnection: V,
|
|
1831
|
+
getCellData: O,
|
|
1832
|
+
getCellDisplayValue: it,
|
|
1833
|
+
getConnectionsForBar: P,
|
|
1834
|
+
getFormattedValue: Be,
|
|
1835
|
+
getHandlesForBar: N,
|
|
1836
|
+
getHeaderCellStyle: le,
|
|
1837
|
+
getIndent: ct,
|
|
1838
|
+
getRowExpandSymbol: rt,
|
|
1839
|
+
isRowGantt: Fe,
|
|
1840
|
+
isRowVisible: Ve,
|
|
1841
|
+
registerConnectionHandle: Ue,
|
|
1842
|
+
registerGanttBar: ft,
|
|
1843
|
+
resizeColumn: we,
|
|
1844
|
+
setCellData: q,
|
|
1845
|
+
setCellText: F,
|
|
1846
|
+
setFilter: (d, v) => {
|
|
1847
|
+
!v.value && !v.startValue && !v.endValue ? delete f.value[d] : f.value[d] = v;
|
|
1848
|
+
},
|
|
1849
|
+
sortByColumn: X,
|
|
1850
|
+
toggleRowExpand: st,
|
|
1851
|
+
unregisterConnectionHandle: ze,
|
|
1852
|
+
unregisterGanttBar: Ge,
|
|
1853
|
+
updateGanttBar: dt,
|
|
1854
|
+
updateRows: G
|
|
1855
|
+
};
|
|
1856
|
+
})();
|
|
1857
|
+
}, Xo = {
|
|
1858
|
+
class: "atable-container",
|
|
1859
|
+
style: { position: "relative" }
|
|
1860
|
+
}, jo = /* @__PURE__ */ j({
|
|
1861
|
+
__name: "ATable",
|
|
1862
|
+
props: /* @__PURE__ */ de({
|
|
1863
|
+
id: { default: "" },
|
|
1864
|
+
config: { default: () => new Object() }
|
|
1865
|
+
}, {
|
|
1866
|
+
rows: { required: !0 },
|
|
1867
|
+
rowsModifiers: {},
|
|
1868
|
+
columns: { required: !0 },
|
|
1869
|
+
columnsModifiers: {}
|
|
1870
|
+
}),
|
|
1871
|
+
emits: /* @__PURE__ */ de(["cellUpdate", "gantt:drag", "connection:event", "columns:update"], ["update:rows", "update:columns"]),
|
|
1872
|
+
setup(e, { expose: t, emit: n }) {
|
|
1873
|
+
const o = fe(e, "rows"), a = fe(e, "columns"), s = n, l = ne("table"), r = Wo({ columns: a.value, rows: o.value, id: e.id, config: e.config });
|
|
1874
|
+
r.$onAction(({ name: p, store: D, args: w, after: f }) => {
|
|
1875
|
+
if (p === "setCellData" || p === "setCellText") {
|
|
1876
|
+
const [h, I, E] = w, L = D.getCellData(h, I);
|
|
1877
|
+
f(() => {
|
|
1878
|
+
o.value = [...D.rows], s("cellUpdate", { colIndex: h, rowIndex: I, newValue: E, oldValue: L });
|
|
1879
|
+
});
|
|
1880
|
+
} else if (p === "updateGanttBar") {
|
|
1881
|
+
const [h] = w;
|
|
1882
|
+
let I = !1;
|
|
1883
|
+
h.type === "resize" ? I = h.oldColspan !== h.newColspan : h.type === "bar" && (I = h.oldStart !== h.newStart || h.oldEnd !== h.newEnd), I && f(() => {
|
|
1884
|
+
s("gantt:drag", h);
|
|
1885
|
+
});
|
|
1886
|
+
} else p === "resizeColumn" && f(() => {
|
|
1887
|
+
a.value = [...D.columns], s("columns:update", [...D.columns]);
|
|
1888
|
+
});
|
|
1889
|
+
}), Y(
|
|
1890
|
+
() => o.value,
|
|
1891
|
+
(p) => {
|
|
1892
|
+
JSON.stringify(p) !== JSON.stringify(r.rows) && (r.rows = [...p]);
|
|
1893
|
+
},
|
|
1894
|
+
{ deep: !0 }
|
|
1895
|
+
), Y(
|
|
1896
|
+
a,
|
|
1897
|
+
(p) => {
|
|
1898
|
+
JSON.stringify(p) !== JSON.stringify(r.columns) && (r.columns = [...p], s("columns:update", [...p]));
|
|
1899
|
+
},
|
|
1900
|
+
{ deep: !0 }
|
|
1901
|
+
), ve(() => {
|
|
1902
|
+
a.value.some((p) => p.pinned) && (u(), r.isTreeView && cn(l, u, { childList: !0, subtree: !0 }));
|
|
1903
|
+
});
|
|
1904
|
+
const i = M(() => r.columns.filter((p) => p.pinned).length), u = () => {
|
|
1905
|
+
const p = l.value, D = p?.rows[0], w = p?.rows[1], f = D ? Array.from(D.cells) : [];
|
|
1906
|
+
for (const [h, I] of f.entries()) {
|
|
1907
|
+
const E = w?.cells[h];
|
|
1908
|
+
E && (I.style.width = `${E.offsetWidth}px`);
|
|
1909
|
+
}
|
|
1910
|
+
for (const h of p?.rows || []) {
|
|
1911
|
+
let I = 0;
|
|
1912
|
+
const E = [];
|
|
1913
|
+
for (const L of h.cells)
|
|
1914
|
+
(L.classList.contains("sticky-column") || L.classList.contains("sticky-index")) && (L.style.left = `${I}px`, I += L.offsetWidth, E.push(L));
|
|
1915
|
+
E.length > 0 && E[E.length - 1].classList.add("sticky-column-edge");
|
|
1916
|
+
}
|
|
1917
|
+
};
|
|
1918
|
+
window.addEventListener("keydown", (p) => {
|
|
1919
|
+
if (p.key === "Escape" && r.modal.visible) {
|
|
1920
|
+
r.modal.visible = !1;
|
|
1921
|
+
const D = r.modal.parent;
|
|
1922
|
+
D && tt().then(() => {
|
|
1923
|
+
D.focus();
|
|
1924
|
+
});
|
|
1925
|
+
}
|
|
1926
|
+
});
|
|
1927
|
+
const c = (p) => {
|
|
1928
|
+
if (!p.gantt || i.value === 0)
|
|
1929
|
+
return r.columns;
|
|
1930
|
+
const D = [];
|
|
1931
|
+
for (let w = 0; w < i.value; w++) {
|
|
1932
|
+
const f = { ...r.columns[w] };
|
|
1933
|
+
f.originalIndex = w, D.push(f);
|
|
1934
|
+
}
|
|
1935
|
+
return D.push({
|
|
1936
|
+
...r.columns[i.value],
|
|
1937
|
+
isGantt: !0,
|
|
1938
|
+
colspan: p.gantt?.colspan || r.columns.length - i.value,
|
|
1939
|
+
originalIndex: i.value,
|
|
1940
|
+
width: "auto"
|
|
1941
|
+
// TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
|
|
1942
|
+
}), D;
|
|
1943
|
+
}, m = (p) => {
|
|
1944
|
+
s("connection:event", { type: "create", connection: p });
|
|
1945
|
+
}, g = (p) => {
|
|
1946
|
+
s("connection:event", { type: "delete", connection: p });
|
|
1947
|
+
};
|
|
1948
|
+
return t({
|
|
1949
|
+
store: r,
|
|
1950
|
+
createConnection: r.createConnection,
|
|
1951
|
+
deleteConnection: r.deleteConnection,
|
|
1952
|
+
getConnectionsForBar: r.getConnectionsForBar,
|
|
1953
|
+
getHandlesForBar: r.getHandlesForBar
|
|
1954
|
+
}), (p, D) => (x(), k("div", Xo, [
|
|
1955
|
+
U((x(), k("table", {
|
|
1956
|
+
ref: "table",
|
|
1957
|
+
class: "atable",
|
|
1958
|
+
style: ce({
|
|
1959
|
+
width: $(r).config.fullWidth ? "100%" : "auto"
|
|
1960
|
+
})
|
|
1961
|
+
}, [
|
|
1962
|
+
oe(p.$slots, "header", { data: $(r) }, () => [
|
|
1963
|
+
Ze(fn, {
|
|
1964
|
+
columns: $(r).columns,
|
|
1965
|
+
store: $(r)
|
|
1966
|
+
}, null, 8, ["columns", "store"])
|
|
1967
|
+
], !0),
|
|
1968
|
+
y("tbody", null, [
|
|
1969
|
+
oe(p.$slots, "body", { data: $(r) }, () => [
|
|
1970
|
+
(x(!0), k(te, null, ae($(r).filteredRows, (w, f) => (x(), re(dn, {
|
|
1971
|
+
key: `${w.originalIndex}-${f}`,
|
|
1972
|
+
row: w,
|
|
1973
|
+
rowIndex: w.originalIndex,
|
|
1974
|
+
store: $(r)
|
|
1975
|
+
}, {
|
|
1976
|
+
default: It(() => [
|
|
1977
|
+
(x(!0), k(te, null, ae(c(w), (h, I) => (x(), k(te, {
|
|
1978
|
+
key: h.name
|
|
1979
|
+
}, [
|
|
1980
|
+
h.isGantt ? (x(), re(Ae(h.ganttComponent || "AGanttCell"), {
|
|
1981
|
+
key: 0,
|
|
1982
|
+
store: $(r),
|
|
1983
|
+
"columns-count": $(r).columns.length - i.value,
|
|
1984
|
+
color: w.gantt?.color,
|
|
1985
|
+
start: w.gantt?.startIndex,
|
|
1986
|
+
end: w.gantt?.endIndex,
|
|
1987
|
+
colspan: h.colspan,
|
|
1988
|
+
pinned: h.pinned,
|
|
1989
|
+
rowIndex: w.originalIndex,
|
|
1990
|
+
colIndex: h.originalIndex ?? I,
|
|
1991
|
+
style: ce({
|
|
1992
|
+
textAlign: h?.align || "center",
|
|
1993
|
+
minWidth: h?.width || "40ch",
|
|
1994
|
+
width: $(r).config.fullWidth ? "auto" : null
|
|
1995
|
+
}),
|
|
1996
|
+
"onConnection:create": m
|
|
1997
|
+
}, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (x(), re(Ae(h.cellComponent || "ACell"), {
|
|
1998
|
+
key: 1,
|
|
1999
|
+
store: $(r),
|
|
2000
|
+
pinned: h.pinned,
|
|
2001
|
+
rowIndex: w.originalIndex,
|
|
2002
|
+
colIndex: I,
|
|
2003
|
+
style: ce({
|
|
2004
|
+
textAlign: h?.align || "center",
|
|
2005
|
+
width: $(r).config.fullWidth ? "auto" : null
|
|
2006
|
+
}),
|
|
2007
|
+
spellcheck: "false"
|
|
2008
|
+
}, null, 8, ["store", "pinned", "rowIndex", "colIndex", "style"]))
|
|
2009
|
+
], 64))), 128))
|
|
2010
|
+
]),
|
|
2011
|
+
_: 2
|
|
2012
|
+
}, 1032, ["row", "rowIndex", "store"]))), 128))
|
|
2013
|
+
], !0)
|
|
2014
|
+
]),
|
|
2015
|
+
oe(p.$slots, "footer", { data: $(r) }, void 0, !0),
|
|
2016
|
+
oe(p.$slots, "modal", { data: $(r) }, () => [
|
|
2017
|
+
U(Ze(vn, { store: $(r) }, {
|
|
2018
|
+
default: It(() => [
|
|
2019
|
+
(x(), re(Ae($(r).modal.component), et({
|
|
2020
|
+
key: `${$(r).modal.rowIndex}:${$(r).modal.colIndex}`,
|
|
2021
|
+
"col-index": $(r).modal.colIndex,
|
|
2022
|
+
"row-index": $(r).modal.rowIndex,
|
|
2023
|
+
store: $(r)
|
|
2024
|
+
}, $(r).modal.componentProps), null, 16, ["col-index", "row-index", "store"]))
|
|
2025
|
+
]),
|
|
2026
|
+
_: 1
|
|
2027
|
+
}, 8, ["store"]), [
|
|
2028
|
+
[be, $(r).modal.visible]
|
|
2029
|
+
])
|
|
2030
|
+
], !0)
|
|
2031
|
+
], 4)), [
|
|
2032
|
+
[$(Eo), $(r).closeModal]
|
|
2033
|
+
]),
|
|
2034
|
+
$(r).isGanttView && $(r).isDependencyGraphEnabled ? (x(), re(Vo, {
|
|
2035
|
+
key: 0,
|
|
2036
|
+
store: $(r),
|
|
2037
|
+
"onConnection:delete": g
|
|
2038
|
+
}, null, 8, ["store"])) : K("", !0)
|
|
2039
|
+
]));
|
|
2040
|
+
}
|
|
2041
|
+
}), qo = /* @__PURE__ */ Ie(jo, [["__scopeId", "data-v-c0a0032f"]]), Yo = {}, Jo = { class: "aloading" }, Ko = { class: "aloading-header" };
|
|
2042
|
+
function Qo(e, t) {
|
|
2043
|
+
return x(), k("div", Jo, [
|
|
2044
|
+
y("h2", Ko, [
|
|
2045
|
+
oe(e.$slots, "default", {}, void 0, !0)
|
|
2046
|
+
]),
|
|
2047
|
+
t[0] || (t[0] = y("div", { class: "aloading-bar" }, null, -1))
|
|
2048
|
+
]);
|
|
2049
|
+
}
|
|
2050
|
+
const Zo = /* @__PURE__ */ Ie(Yo, [["render", Qo], ["__scopeId", "data-v-a930a25b"]]), el = {}, tl = { class: "aloading" }, nl = { class: "aloading-header" };
|
|
2051
|
+
function ol(e, t) {
|
|
2052
|
+
return x(), k("div", tl, [
|
|
2053
|
+
y("h2", nl, [
|
|
2054
|
+
oe(e.$slots, "default", {}, void 0, !0)
|
|
2055
|
+
]),
|
|
2056
|
+
t[0] || (t[0] = y("div", { class: "aloading-bar" }, null, -1))
|
|
2057
|
+
]);
|
|
2058
|
+
}
|
|
2059
|
+
const ll = /* @__PURE__ */ Ie(el, [["render", ol], ["__scopeId", "data-v-e1165876"]]);
|
|
2060
|
+
function al(e) {
|
|
2061
|
+
e.component("ACell", uo), e.component("AExpansionRow", po), e.component("AGanttCell", Io), e.component("ARow", dn), e.component("ATable", qo), e.component("ATableHeader", fn), e.component("ATableLoading", Zo), e.component("ATableLoadingBar", ll), e.component("ATableModal", vn);
|
|
2062
|
+
}
|
|
2063
|
+
const rl = { class: "aform_form-element" }, sl = ["for"], il = { class: "aform_checkbox-container aform_input-field" }, ul = ["id", "readonly", "required"], cl = ["innerHTML"], dl = /* @__PURE__ */ j({
|
|
3
2064
|
__name: "ACheckbox",
|
|
4
|
-
props: /* @__PURE__ */
|
|
2065
|
+
props: /* @__PURE__ */ de({
|
|
5
2066
|
schema: {},
|
|
6
2067
|
label: {},
|
|
7
2068
|
mask: {},
|
|
@@ -15,62 +2076,62 @@ import './assets/index.css';const ze = { class: "aform_form-element" }, Ge = ["f
|
|
|
15
2076
|
}),
|
|
16
2077
|
emits: ["update:modelValue"],
|
|
17
2078
|
setup(e) {
|
|
18
|
-
const t =
|
|
19
|
-
return (n, o) => (
|
|
20
|
-
|
|
2079
|
+
const t = fe(e, "modelValue");
|
|
2080
|
+
return (n, o) => (x(), k("div", rl, [
|
|
2081
|
+
y("label", {
|
|
21
2082
|
class: "aform_field-label",
|
|
22
2083
|
for: e.uuid
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
2084
|
+
}, W(e.label), 9, sl),
|
|
2085
|
+
y("span", il, [
|
|
2086
|
+
U(y("input", {
|
|
26
2087
|
id: e.uuid,
|
|
27
2088
|
"onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
|
|
28
2089
|
type: "checkbox",
|
|
29
2090
|
class: "aform_checkbox",
|
|
30
2091
|
readonly: e.readOnly,
|
|
31
2092
|
required: e.required
|
|
32
|
-
}, null, 8,
|
|
33
|
-
[
|
|
2093
|
+
}, null, 8, ul), [
|
|
2094
|
+
[on, t.value]
|
|
34
2095
|
])
|
|
35
2096
|
]),
|
|
36
|
-
|
|
2097
|
+
U(y("p", {
|
|
37
2098
|
class: "aform_error",
|
|
38
2099
|
innerHTML: e.validation.errorMessage
|
|
39
|
-
}, null, 8,
|
|
40
|
-
[
|
|
2100
|
+
}, null, 8, cl), [
|
|
2101
|
+
[be, e.validation.errorMessage]
|
|
41
2102
|
])
|
|
42
2103
|
]));
|
|
43
2104
|
}
|
|
44
|
-
}),
|
|
2105
|
+
}), he = (e, t) => {
|
|
45
2106
|
const n = e.__vccOpts || e;
|
|
46
2107
|
for (const [o, a] of t)
|
|
47
2108
|
n[o] = a;
|
|
48
2109
|
return n;
|
|
49
|
-
},
|
|
2110
|
+
}, fl = /* @__PURE__ */ he(dl, [["__scopeId", "data-v-f13fd4d6"]]), vl = /* @__PURE__ */ j({
|
|
50
2111
|
__name: "AComboBox",
|
|
51
2112
|
props: ["event", "cellData", "tableID"],
|
|
52
2113
|
setup(e) {
|
|
53
2114
|
return (t, n) => {
|
|
54
|
-
const o =
|
|
55
|
-
return
|
|
2115
|
+
const o = an("ATableModal");
|
|
2116
|
+
return x(), re(o, {
|
|
56
2117
|
event: e.event,
|
|
57
2118
|
"cell-data": e.cellData,
|
|
58
2119
|
class: "amodal"
|
|
59
2120
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
2121
|
+
default: It(() => [...n[0] || (n[0] = [
|
|
2122
|
+
y("div", null, [
|
|
2123
|
+
y("input", { type: "text" }),
|
|
2124
|
+
y("input", { type: "text" }),
|
|
2125
|
+
y("input", { type: "text" })
|
|
65
2126
|
], -1)
|
|
66
2127
|
])]),
|
|
67
2128
|
_: 1
|
|
68
2129
|
}, 8, ["event", "cell-data"]);
|
|
69
2130
|
};
|
|
70
2131
|
}
|
|
71
|
-
}),
|
|
2132
|
+
}), ml = ["id", "disabled", "required"], pl = ["for"], hl = ["innerHTML"], gl = /* @__PURE__ */ j({
|
|
72
2133
|
__name: "ADate",
|
|
73
|
-
props: /* @__PURE__ */
|
|
2134
|
+
props: /* @__PURE__ */ de({
|
|
74
2135
|
schema: {},
|
|
75
2136
|
label: { default: "Date" },
|
|
76
2137
|
mask: {},
|
|
@@ -86,14 +2147,14 @@ import './assets/index.css';const ze = { class: "aform_form-element" }, Ge = ["f
|
|
|
86
2147
|
}),
|
|
87
2148
|
emits: ["update:modelValue"],
|
|
88
2149
|
setup(e) {
|
|
89
|
-
const t =
|
|
2150
|
+
const t = fe(e, "modelValue", {
|
|
90
2151
|
// format the date to be compatible with the native input datepicker
|
|
91
2152
|
set: (a) => new Date(a).toISOString().split("T")[0]
|
|
92
|
-
}), n =
|
|
2153
|
+
}), n = ne("date"), o = () => {
|
|
93
2154
|
n.value && "showPicker" in HTMLInputElement.prototype && n.value.showPicker();
|
|
94
2155
|
};
|
|
95
|
-
return (a, s) => (
|
|
96
|
-
|
|
2156
|
+
return (a, s) => (x(), k("div", null, [
|
|
2157
|
+
U(y("input", {
|
|
97
2158
|
id: e.uuid,
|
|
98
2159
|
ref: "date",
|
|
99
2160
|
"onUpdate:modelValue": s[0] || (s[0] = (l) => t.value = l),
|
|
@@ -101,23 +2162,23 @@ import './assets/index.css';const ze = { class: "aform_form-element" }, Ge = ["f
|
|
|
101
2162
|
disabled: e.readOnly,
|
|
102
2163
|
required: e.required,
|
|
103
2164
|
onClick: o
|
|
104
|
-
}, null, 8,
|
|
105
|
-
[
|
|
2165
|
+
}, null, 8, ml), [
|
|
2166
|
+
[se, t.value]
|
|
106
2167
|
]),
|
|
107
|
-
|
|
108
|
-
|
|
2168
|
+
y("label", { for: e.uuid }, W(e.label), 9, pl),
|
|
2169
|
+
U(y("p", {
|
|
109
2170
|
innerHTML: e.validation.errorMessage
|
|
110
|
-
}, null, 8,
|
|
111
|
-
[
|
|
2171
|
+
}, null, 8, hl), [
|
|
2172
|
+
[be, e.validation.errorMessage]
|
|
112
2173
|
])
|
|
113
2174
|
]));
|
|
114
2175
|
}
|
|
115
|
-
}),
|
|
116
|
-
function
|
|
117
|
-
return
|
|
2176
|
+
}), yl = /* @__PURE__ */ he(gl, [["__scopeId", "data-v-a15ed922"]]);
|
|
2177
|
+
function mn(e, t) {
|
|
2178
|
+
return nt() ? (ot(e, t), !0) : !1;
|
|
118
2179
|
}
|
|
119
2180
|
// @__NO_SIDE_EFFECTS__
|
|
120
|
-
function
|
|
2181
|
+
function Wt() {
|
|
121
2182
|
const e = /* @__PURE__ */ new Set(), t = (s) => {
|
|
122
2183
|
e.delete(s);
|
|
123
2184
|
};
|
|
@@ -125,7 +2186,7 @@ function fe() {
|
|
|
125
2186
|
on: (s) => {
|
|
126
2187
|
e.add(s);
|
|
127
2188
|
const l = () => t(s);
|
|
128
|
-
return
|
|
2189
|
+
return mn(l), { off: l };
|
|
129
2190
|
},
|
|
130
2191
|
off: t,
|
|
131
2192
|
trigger: (...s) => Promise.all(Array.from(e).map((l) => l(...s))),
|
|
@@ -134,80 +2195,80 @@ function fe() {
|
|
|
134
2195
|
}
|
|
135
2196
|
};
|
|
136
2197
|
}
|
|
137
|
-
const
|
|
2198
|
+
const pn = typeof window < "u" && typeof document < "u";
|
|
138
2199
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
139
|
-
const
|
|
140
|
-
},
|
|
141
|
-
function
|
|
142
|
-
if (e.length !== 1) return
|
|
2200
|
+
const wl = Object.prototype.toString, xl = (e) => wl.call(e) === "[object Object]", Pe = () => {
|
|
2201
|
+
}, bl = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
2202
|
+
function Il(...e) {
|
|
2203
|
+
if (e.length !== 1) return ln(...e);
|
|
143
2204
|
const t = e[0];
|
|
144
|
-
return typeof t == "function" ?
|
|
2205
|
+
return typeof t == "function" ? Dt(Et(() => ({
|
|
145
2206
|
get: t,
|
|
146
|
-
set:
|
|
147
|
-
}))) :
|
|
2207
|
+
set: Pe
|
|
2208
|
+
}))) : S(t);
|
|
148
2209
|
}
|
|
149
|
-
function
|
|
2210
|
+
function gt(e) {
|
|
150
2211
|
return Array.isArray(e) ? e : [e];
|
|
151
2212
|
}
|
|
152
|
-
function
|
|
153
|
-
return
|
|
2213
|
+
function kl(e, t, n) {
|
|
2214
|
+
return Y(e, t, {
|
|
154
2215
|
...n,
|
|
155
2216
|
immediate: !0
|
|
156
2217
|
});
|
|
157
2218
|
}
|
|
158
|
-
const
|
|
159
|
-
function
|
|
2219
|
+
const hn = pn ? window : void 0, Cl = pn ? window.document : void 0;
|
|
2220
|
+
function Te(e) {
|
|
160
2221
|
var t;
|
|
161
|
-
const n =
|
|
2222
|
+
const n = T(e);
|
|
162
2223
|
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
163
2224
|
}
|
|
164
|
-
function
|
|
165
|
-
const t = (o, a, s, l) => (o.addEventListener(a, s, l), () => o.removeEventListener(a, s, l)), n =
|
|
166
|
-
const o =
|
|
2225
|
+
function yt(...e) {
|
|
2226
|
+
const t = (o, a, s, l) => (o.addEventListener(a, s, l), () => o.removeEventListener(a, s, l)), n = M(() => {
|
|
2227
|
+
const o = gt(T(e[0])).filter((a) => a != null);
|
|
167
2228
|
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
168
2229
|
});
|
|
169
|
-
return
|
|
2230
|
+
return kl(() => {
|
|
170
2231
|
var o, a;
|
|
171
2232
|
return [
|
|
172
|
-
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((s) =>
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
2233
|
+
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((s) => Te(s))) !== null && o !== void 0 ? o : [hn].filter((s) => s != null),
|
|
2234
|
+
gt(T(n.value ? e[1] : e[0])),
|
|
2235
|
+
gt($(n.value ? e[2] : e[1])),
|
|
2236
|
+
T(n.value ? e[3] : e[2])
|
|
176
2237
|
];
|
|
177
2238
|
}, ([o, a, s, l], r, i) => {
|
|
178
2239
|
if (!o?.length || !a?.length || !s?.length) return;
|
|
179
|
-
const u =
|
|
2240
|
+
const u = xl(l) ? { ...l } : l, c = o.flatMap((m) => a.flatMap((g) => s.map((p) => t(m, g, p, u))));
|
|
180
2241
|
i(() => {
|
|
181
|
-
|
|
2242
|
+
c.forEach((m) => m());
|
|
182
2243
|
});
|
|
183
2244
|
}, { flush: "post" });
|
|
184
2245
|
}
|
|
185
|
-
function
|
|
186
|
-
const { window: o =
|
|
2246
|
+
function Xt(e, t, n = {}) {
|
|
2247
|
+
const { window: o = hn, ignore: a = [], capture: s = !0, detectIframe: l = !1, controls: r = !1 } = n;
|
|
187
2248
|
if (!o) return r ? {
|
|
188
|
-
stop:
|
|
189
|
-
cancel:
|
|
190
|
-
trigger:
|
|
191
|
-
} :
|
|
2249
|
+
stop: Pe,
|
|
2250
|
+
cancel: Pe,
|
|
2251
|
+
trigger: Pe
|
|
2252
|
+
} : Pe;
|
|
192
2253
|
let i = !0;
|
|
193
|
-
const u = (f) =>
|
|
194
|
-
if (typeof h == "string") return Array.from(o.document.querySelectorAll(h)).some((
|
|
2254
|
+
const u = (f) => T(a).some((h) => {
|
|
2255
|
+
if (typeof h == "string") return Array.from(o.document.querySelectorAll(h)).some((I) => I === f.target || f.composedPath().includes(I));
|
|
195
2256
|
{
|
|
196
|
-
const
|
|
197
|
-
return
|
|
2257
|
+
const I = Te(h);
|
|
2258
|
+
return I && (f.target === I || f.composedPath().includes(I));
|
|
198
2259
|
}
|
|
199
2260
|
});
|
|
200
|
-
function
|
|
201
|
-
const h =
|
|
2261
|
+
function c(f) {
|
|
2262
|
+
const h = T(f);
|
|
202
2263
|
return h && h.$.subTree.shapeFlag === 16;
|
|
203
2264
|
}
|
|
204
2265
|
function m(f, h) {
|
|
205
|
-
const
|
|
206
|
-
return
|
|
2266
|
+
const I = T(f), E = I.$.subTree && I.$.subTree.children;
|
|
2267
|
+
return E == null || !Array.isArray(E) ? !1 : E.some((L) => L.el === h.target || h.composedPath().includes(L.el));
|
|
207
2268
|
}
|
|
208
|
-
const
|
|
209
|
-
const h =
|
|
210
|
-
if (f.target != null && !(!(h instanceof Element) &&
|
|
2269
|
+
const g = (f) => {
|
|
2270
|
+
const h = Te(e);
|
|
2271
|
+
if (f.target != null && !(!(h instanceof Element) && c(e) && m(e, f)) && !(!h || h === f.target || f.composedPath().includes(h))) {
|
|
211
2272
|
if ("detail" in f && f.detail === 0 && (i = !u(f)), !i) {
|
|
212
2273
|
i = !0;
|
|
213
2274
|
return;
|
|
@@ -216,107 +2277,107 @@ function me(e, t, n = {}) {
|
|
|
216
2277
|
}
|
|
217
2278
|
};
|
|
218
2279
|
let p = !1;
|
|
219
|
-
const
|
|
220
|
-
|
|
2280
|
+
const D = [
|
|
2281
|
+
yt(o, "click", (f) => {
|
|
221
2282
|
p || (p = !0, setTimeout(() => {
|
|
222
2283
|
p = !1;
|
|
223
|
-
}, 0),
|
|
2284
|
+
}, 0), g(f));
|
|
224
2285
|
}, {
|
|
225
2286
|
passive: !0,
|
|
226
2287
|
capture: s
|
|
227
2288
|
}),
|
|
228
|
-
|
|
229
|
-
const h =
|
|
2289
|
+
yt(o, "pointerdown", (f) => {
|
|
2290
|
+
const h = Te(e);
|
|
230
2291
|
i = !u(f) && !!(h && !f.composedPath().includes(h));
|
|
231
2292
|
}, { passive: !0 }),
|
|
232
|
-
l &&
|
|
2293
|
+
l && yt(o, "blur", (f) => {
|
|
233
2294
|
setTimeout(() => {
|
|
234
2295
|
var h;
|
|
235
|
-
const
|
|
236
|
-
((h = o.document.activeElement) === null || h === void 0 ? void 0 : h.tagName) === "IFRAME" && !
|
|
2296
|
+
const I = Te(e);
|
|
2297
|
+
((h = o.document.activeElement) === null || h === void 0 ? void 0 : h.tagName) === "IFRAME" && !I?.contains(o.document.activeElement) && t(f);
|
|
237
2298
|
}, 0);
|
|
238
2299
|
}, { passive: !0 })
|
|
239
|
-
].filter(Boolean),
|
|
2300
|
+
].filter(Boolean), w = () => D.forEach((f) => f());
|
|
240
2301
|
return r ? {
|
|
241
|
-
stop:
|
|
2302
|
+
stop: w,
|
|
242
2303
|
cancel: () => {
|
|
243
2304
|
i = !1;
|
|
244
2305
|
},
|
|
245
2306
|
trigger: (f) => {
|
|
246
|
-
i = !0,
|
|
2307
|
+
i = !0, g(f), i = !1;
|
|
247
2308
|
}
|
|
248
|
-
} :
|
|
2309
|
+
} : w;
|
|
249
2310
|
}
|
|
250
|
-
const
|
|
2311
|
+
const El = {
|
|
251
2312
|
multiple: !0,
|
|
252
2313
|
accept: "*",
|
|
253
2314
|
reset: !1,
|
|
254
2315
|
directory: !1
|
|
255
2316
|
};
|
|
256
|
-
function
|
|
2317
|
+
function Dl(e) {
|
|
257
2318
|
if (!e) return null;
|
|
258
2319
|
if (e instanceof FileList) return e;
|
|
259
2320
|
const t = new DataTransfer();
|
|
260
2321
|
for (const n of e) t.items.add(n);
|
|
261
2322
|
return t.files;
|
|
262
2323
|
}
|
|
263
|
-
function
|
|
264
|
-
const { document: t =
|
|
2324
|
+
function Tl(e = {}) {
|
|
2325
|
+
const { document: t = Cl } = e, n = S(Dl(e.initialFiles)), { on: o, trigger: a } = /* @__PURE__ */ Wt(), { on: s, trigger: l } = /* @__PURE__ */ Wt(), r = M(() => {
|
|
265
2326
|
var m;
|
|
266
|
-
const
|
|
267
|
-
return
|
|
2327
|
+
const g = (m = Te(e.input)) !== null && m !== void 0 ? m : t ? t.createElement("input") : void 0;
|
|
2328
|
+
return g && (g.type = "file", g.onchange = (p) => {
|
|
268
2329
|
n.value = p.target.files, a(n.value);
|
|
269
|
-
},
|
|
2330
|
+
}, g.oncancel = () => {
|
|
270
2331
|
l();
|
|
271
|
-
}),
|
|
2332
|
+
}), g;
|
|
272
2333
|
}), i = () => {
|
|
273
2334
|
n.value = null, r.value && r.value.value && (r.value.value = "", a(null));
|
|
274
2335
|
}, u = (m) => {
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
const
|
|
279
|
-
if (!
|
|
2336
|
+
const g = r.value;
|
|
2337
|
+
g && (g.multiple = T(m.multiple), g.accept = T(m.accept), g.webkitdirectory = T(m.directory), bl(m, "capture") && (g.capture = T(m.capture)));
|
|
2338
|
+
}, c = (m) => {
|
|
2339
|
+
const g = r.value;
|
|
2340
|
+
if (!g) return;
|
|
280
2341
|
const p = {
|
|
281
|
-
...
|
|
2342
|
+
...El,
|
|
282
2343
|
...e,
|
|
283
2344
|
...m
|
|
284
2345
|
};
|
|
285
|
-
u(p),
|
|
2346
|
+
u(p), T(p.reset) && i(), g.click();
|
|
286
2347
|
};
|
|
287
|
-
return
|
|
2348
|
+
return Ce(() => {
|
|
288
2349
|
u(e);
|
|
289
2350
|
}), {
|
|
290
|
-
files:
|
|
291
|
-
open:
|
|
2351
|
+
files: Dt(n),
|
|
2352
|
+
open: c,
|
|
292
2353
|
reset: i,
|
|
293
2354
|
onCancel: s,
|
|
294
2355
|
onChange: o
|
|
295
2356
|
};
|
|
296
2357
|
}
|
|
297
|
-
function
|
|
2358
|
+
function wt(e) {
|
|
298
2359
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
299
2360
|
}
|
|
300
|
-
const
|
|
301
|
-
function
|
|
302
|
-
const n =
|
|
2361
|
+
const xt = /* @__PURE__ */ new WeakMap();
|
|
2362
|
+
function Al(e, t = !1) {
|
|
2363
|
+
const n = J(t);
|
|
303
2364
|
let o = "";
|
|
304
|
-
|
|
305
|
-
const r =
|
|
2365
|
+
Y(Il(e), (l) => {
|
|
2366
|
+
const r = wt(T(l));
|
|
306
2367
|
if (r) {
|
|
307
2368
|
const i = r;
|
|
308
|
-
if (
|
|
2369
|
+
if (xt.get(i) || xt.set(i, i.style.overflow), i.style.overflow !== "hidden" && (o = i.style.overflow), i.style.overflow === "hidden") return n.value = !0;
|
|
309
2370
|
if (n.value) return i.style.overflow = "hidden";
|
|
310
2371
|
}
|
|
311
2372
|
}, { immediate: !0 });
|
|
312
2373
|
const a = () => {
|
|
313
|
-
const l =
|
|
2374
|
+
const l = wt(T(e));
|
|
314
2375
|
!l || n.value || (l.style.overflow = "hidden", n.value = !0);
|
|
315
2376
|
}, s = () => {
|
|
316
|
-
const l =
|
|
317
|
-
!l || !n.value || (l.style.overflow = o,
|
|
2377
|
+
const l = wt(T(e));
|
|
2378
|
+
!l || !n.value || (l.style.overflow = o, xt.delete(l), n.value = !1);
|
|
318
2379
|
};
|
|
319
|
-
return
|
|
2380
|
+
return mn(s), M({
|
|
320
2381
|
get() {
|
|
321
2382
|
return n.value;
|
|
322
2383
|
},
|
|
@@ -325,42 +2386,42 @@ function ht(e, t = !1) {
|
|
|
325
2386
|
}
|
|
326
2387
|
});
|
|
327
2388
|
}
|
|
328
|
-
const
|
|
2389
|
+
const bt = /* @__PURE__ */ new WeakMap(), $l = {
|
|
329
2390
|
mounted(e, t) {
|
|
330
2391
|
const n = !t.modifiers.bubble;
|
|
331
2392
|
let o;
|
|
332
|
-
if (typeof t.value == "function") o =
|
|
2393
|
+
if (typeof t.value == "function") o = Xt(e, t.value, { capture: n });
|
|
333
2394
|
else {
|
|
334
2395
|
const [a, s] = t.value;
|
|
335
|
-
o =
|
|
2396
|
+
o = Xt(e, a, Object.assign({ capture: n }, s));
|
|
336
2397
|
}
|
|
337
|
-
|
|
2398
|
+
bt.set(e, o);
|
|
338
2399
|
},
|
|
339
2400
|
unmounted(e) {
|
|
340
|
-
const t =
|
|
341
|
-
t && typeof t == "function" ? t() : t?.stop(),
|
|
2401
|
+
const t = bt.get(e);
|
|
2402
|
+
t && typeof t == "function" ? t() : t?.stop(), bt.delete(e);
|
|
342
2403
|
}
|
|
343
2404
|
};
|
|
344
|
-
function
|
|
2405
|
+
function Ml() {
|
|
345
2406
|
let e = !1;
|
|
346
|
-
const t =
|
|
2407
|
+
const t = J(!1);
|
|
347
2408
|
return (n, o) => {
|
|
348
2409
|
if (t.value = o.value, e) return;
|
|
349
2410
|
e = !0;
|
|
350
|
-
const a =
|
|
351
|
-
|
|
2411
|
+
const a = Al(n, o.value);
|
|
2412
|
+
Y(t, (s) => a.value = s);
|
|
352
2413
|
};
|
|
353
2414
|
}
|
|
354
|
-
|
|
355
|
-
const
|
|
2415
|
+
Ml();
|
|
2416
|
+
const Sl = { class: "input-wrapper" }, Ll = {
|
|
356
2417
|
id: "autocomplete-results",
|
|
357
2418
|
class: "autocomplete-results"
|
|
358
|
-
},
|
|
2419
|
+
}, Rl = {
|
|
359
2420
|
key: 0,
|
|
360
2421
|
class: "loading autocomplete-result"
|
|
361
|
-
},
|
|
2422
|
+
}, Vl = ["onClick"], Pl = /* @__PURE__ */ j({
|
|
362
2423
|
__name: "ADropdown",
|
|
363
|
-
props: /* @__PURE__ */
|
|
2424
|
+
props: /* @__PURE__ */ de({
|
|
364
2425
|
label: {},
|
|
365
2426
|
items: { default: () => [] },
|
|
366
2427
|
isAsync: { type: Boolean, default: !1 },
|
|
@@ -371,7 +2432,7 @@ const bt = { class: "input-wrapper" }, wt = {
|
|
|
371
2432
|
}),
|
|
372
2433
|
emits: ["update:modelValue"],
|
|
373
2434
|
setup(e) {
|
|
374
|
-
const t =
|
|
2435
|
+
const t = fe(e, "modelValue"), n = nn({
|
|
375
2436
|
activeItemIndex: null,
|
|
376
2437
|
open: !1,
|
|
377
2438
|
loading: !1,
|
|
@@ -380,8 +2441,8 @@ const bt = { class: "input-wrapper" }, wt = {
|
|
|
380
2441
|
if (n.open = !0, n.activeItemIndex = null, e.filterFunction) {
|
|
381
2442
|
e.isAsync && (n.loading = !0);
|
|
382
2443
|
try {
|
|
383
|
-
const
|
|
384
|
-
n.results =
|
|
2444
|
+
const g = await e.filterFunction(t.value || "");
|
|
2445
|
+
n.results = g || [];
|
|
385
2446
|
} catch {
|
|
386
2447
|
n.results = [];
|
|
387
2448
|
} finally {
|
|
@@ -389,158 +2450,158 @@ const bt = { class: "input-wrapper" }, wt = {
|
|
|
389
2450
|
}
|
|
390
2451
|
} else
|
|
391
2452
|
i();
|
|
392
|
-
}, s = (
|
|
393
|
-
t.value =
|
|
2453
|
+
}, s = (g) => {
|
|
2454
|
+
t.value = g, r(g);
|
|
394
2455
|
}, l = () => {
|
|
395
2456
|
n.activeItemIndex = e.isAsync ? null : t.value && e.items?.indexOf(t.value) || null, n.open = !0, n.results = e.isAsync ? [] : e.items;
|
|
396
|
-
}, r = (
|
|
397
|
-
n.activeItemIndex = null, n.open = !1, e.items?.includes(
|
|
2457
|
+
}, r = (g) => {
|
|
2458
|
+
n.activeItemIndex = null, n.open = !1, e.items?.includes(g || t.value || "") || (t.value = "");
|
|
398
2459
|
}, i = () => {
|
|
399
|
-
t.value ? n.results = e.items?.filter((
|
|
2460
|
+
t.value ? n.results = e.items?.filter((g) => g.toLowerCase().includes((t.value ?? "").toLowerCase())) : n.results = e.items;
|
|
400
2461
|
}, u = () => {
|
|
401
|
-
const
|
|
2462
|
+
const g = n.results?.length || 0;
|
|
402
2463
|
if (n.activeItemIndex != null) {
|
|
403
2464
|
const p = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
|
|
404
|
-
n.activeItemIndex = (p + 1) %
|
|
2465
|
+
n.activeItemIndex = (p + 1) % g;
|
|
405
2466
|
} else
|
|
406
2467
|
n.activeItemIndex = 0;
|
|
407
|
-
},
|
|
408
|
-
const
|
|
2468
|
+
}, c = () => {
|
|
2469
|
+
const g = n.results?.length || 0;
|
|
409
2470
|
if (n.activeItemIndex != null) {
|
|
410
2471
|
const p = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
|
|
411
2472
|
p === 0 ? n.activeItemIndex = null : n.activeItemIndex = p - 1;
|
|
412
2473
|
} else
|
|
413
|
-
n.activeItemIndex =
|
|
2474
|
+
n.activeItemIndex = g - 1;
|
|
414
2475
|
}, m = () => {
|
|
415
2476
|
if (n.results) {
|
|
416
|
-
const
|
|
2477
|
+
const g = n.activeItemIndex || 0, p = n.results[g];
|
|
417
2478
|
s(p);
|
|
418
2479
|
}
|
|
419
2480
|
n.activeItemIndex = 0;
|
|
420
2481
|
};
|
|
421
|
-
return (
|
|
422
|
-
class:
|
|
2482
|
+
return (g, p) => U((x(), k("div", {
|
|
2483
|
+
class: ee(["autocomplete", { isOpen: n.open }])
|
|
423
2484
|
}, [
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
2485
|
+
y("div", Sl, [
|
|
2486
|
+
U(y("input", {
|
|
2487
|
+
"onUpdate:modelValue": p[0] || (p[0] = (D) => t.value = D),
|
|
427
2488
|
type: "text",
|
|
428
2489
|
onInput: a,
|
|
429
2490
|
onFocus: l,
|
|
430
2491
|
onKeydown: [
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
2492
|
+
De(u, ["down"]),
|
|
2493
|
+
De(c, ["up"]),
|
|
2494
|
+
De(m, ["enter"]),
|
|
2495
|
+
De(o, ["esc"]),
|
|
2496
|
+
De(o, ["tab"])
|
|
436
2497
|
]
|
|
437
2498
|
}, null, 544), [
|
|
438
|
-
[
|
|
2499
|
+
[se, t.value]
|
|
439
2500
|
]),
|
|
440
|
-
|
|
441
|
-
n.loading ? (
|
|
442
|
-
key:
|
|
443
|
-
class:
|
|
444
|
-
onClick:
|
|
445
|
-
},
|
|
2501
|
+
U(y("ul", Ll, [
|
|
2502
|
+
n.loading ? (x(), k("li", Rl, "Loading results...")) : (x(!0), k(te, { key: 1 }, ae(n.results, (D, w) => (x(), k("li", {
|
|
2503
|
+
key: D,
|
|
2504
|
+
class: ee(["autocomplete-result", { "is-active": w === n.activeItemIndex }]),
|
|
2505
|
+
onClick: $e((f) => s(D), ["stop"])
|
|
2506
|
+
}, W(D), 11, Vl))), 128))
|
|
446
2507
|
], 512), [
|
|
447
|
-
[
|
|
2508
|
+
[be, n.open]
|
|
448
2509
|
]),
|
|
449
|
-
|
|
2510
|
+
y("label", null, W(e.label), 1)
|
|
450
2511
|
])
|
|
451
2512
|
], 2)), [
|
|
452
|
-
[
|
|
2513
|
+
[$($l), o]
|
|
453
2514
|
]);
|
|
454
2515
|
}
|
|
455
|
-
}),
|
|
456
|
-
function
|
|
457
|
-
return
|
|
2516
|
+
}), Ol = /* @__PURE__ */ he(Pl, [["__scopeId", "data-v-31a6db8c"]]);
|
|
2517
|
+
function gn(e, t) {
|
|
2518
|
+
return nt() ? (ot(e, t), !0) : !1;
|
|
458
2519
|
}
|
|
459
|
-
const
|
|
2520
|
+
const _l = typeof window < "u" && typeof document < "u";
|
|
460
2521
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
461
|
-
const
|
|
2522
|
+
const Hl = (e) => e != null, Fl = Object.prototype.toString, Nl = (e) => Fl.call(e) === "[object Object]", Bl = () => {
|
|
462
2523
|
};
|
|
463
|
-
function
|
|
2524
|
+
function Qe(e) {
|
|
464
2525
|
return Array.isArray(e) ? e : [e];
|
|
465
2526
|
}
|
|
466
|
-
function
|
|
467
|
-
return
|
|
2527
|
+
function Gl(e, t, n) {
|
|
2528
|
+
return Y(e, t, {
|
|
468
2529
|
...n,
|
|
469
2530
|
immediate: !0
|
|
470
2531
|
});
|
|
471
2532
|
}
|
|
472
|
-
const
|
|
473
|
-
function
|
|
2533
|
+
const Re = _l ? window : void 0;
|
|
2534
|
+
function Se(e) {
|
|
474
2535
|
var t;
|
|
475
|
-
const n =
|
|
2536
|
+
const n = T(e);
|
|
476
2537
|
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
477
2538
|
}
|
|
478
|
-
function
|
|
479
|
-
const t = (o, a, s, l) => (o.addEventListener(a, s, l), () => o.removeEventListener(a, s, l)), n =
|
|
480
|
-
const o =
|
|
2539
|
+
function _e(...e) {
|
|
2540
|
+
const t = (o, a, s, l) => (o.addEventListener(a, s, l), () => o.removeEventListener(a, s, l)), n = M(() => {
|
|
2541
|
+
const o = Qe(T(e[0])).filter((a) => a != null);
|
|
481
2542
|
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
482
2543
|
});
|
|
483
|
-
return
|
|
2544
|
+
return Gl(() => {
|
|
484
2545
|
var o, a;
|
|
485
2546
|
return [
|
|
486
|
-
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((s) =>
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
2547
|
+
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((s) => Se(s))) !== null && o !== void 0 ? o : [Re].filter((s) => s != null),
|
|
2548
|
+
Qe(T(n.value ? e[1] : e[0])),
|
|
2549
|
+
Qe($(n.value ? e[2] : e[1])),
|
|
2550
|
+
T(n.value ? e[3] : e[2])
|
|
490
2551
|
];
|
|
491
2552
|
}, ([o, a, s, l], r, i) => {
|
|
492
2553
|
if (!o?.length || !a?.length || !s?.length) return;
|
|
493
|
-
const u =
|
|
2554
|
+
const u = Nl(l) ? { ...l } : l, c = o.flatMap((m) => a.flatMap((g) => s.map((p) => t(m, g, p, u))));
|
|
494
2555
|
i(() => {
|
|
495
|
-
|
|
2556
|
+
c.forEach((m) => m());
|
|
496
2557
|
});
|
|
497
2558
|
}, { flush: "post" });
|
|
498
2559
|
}
|
|
499
2560
|
// @__NO_SIDE_EFFECTS__
|
|
500
|
-
function
|
|
501
|
-
const e =
|
|
502
|
-
return t &&
|
|
2561
|
+
function Ul() {
|
|
2562
|
+
const e = J(!1), t = lt();
|
|
2563
|
+
return t && ve(() => {
|
|
503
2564
|
e.value = !0;
|
|
504
2565
|
}, t), e;
|
|
505
2566
|
}
|
|
506
2567
|
// @__NO_SIDE_EFFECTS__
|
|
507
|
-
function
|
|
508
|
-
const t = /* @__PURE__ */
|
|
509
|
-
return
|
|
2568
|
+
function zl(e) {
|
|
2569
|
+
const t = /* @__PURE__ */ Ul();
|
|
2570
|
+
return M(() => (t.value, !!e()));
|
|
510
2571
|
}
|
|
511
|
-
function
|
|
512
|
-
const { window: o =
|
|
2572
|
+
function Wl(e, t, n = {}) {
|
|
2573
|
+
const { window: o = Re, ...a } = n;
|
|
513
2574
|
let s;
|
|
514
|
-
const l = /* @__PURE__ */
|
|
2575
|
+
const l = /* @__PURE__ */ zl(() => o && "MutationObserver" in o), r = () => {
|
|
515
2576
|
s && (s.disconnect(), s = void 0);
|
|
516
|
-
}, i =
|
|
517
|
-
const m =
|
|
2577
|
+
}, i = Y(M(() => {
|
|
2578
|
+
const m = Qe(T(e)).map(Se).filter(Hl);
|
|
518
2579
|
return new Set(m);
|
|
519
2580
|
}), (m) => {
|
|
520
|
-
r(), l.value && m.size && (s = new MutationObserver(t), m.forEach((
|
|
2581
|
+
r(), l.value && m.size && (s = new MutationObserver(t), m.forEach((g) => s.observe(g, a)));
|
|
521
2582
|
}, {
|
|
522
2583
|
immediate: !0,
|
|
523
2584
|
flush: "post"
|
|
524
|
-
}), u = () => s?.takeRecords(),
|
|
2585
|
+
}), u = () => s?.takeRecords(), c = () => {
|
|
525
2586
|
i(), r();
|
|
526
2587
|
};
|
|
527
|
-
return
|
|
2588
|
+
return gn(c), {
|
|
528
2589
|
isSupported: l,
|
|
529
|
-
stop:
|
|
2590
|
+
stop: c,
|
|
530
2591
|
takeRecords: u
|
|
531
2592
|
};
|
|
532
2593
|
}
|
|
533
|
-
function
|
|
534
|
-
const { window: o =
|
|
535
|
-
if (!o || !a) return
|
|
2594
|
+
function Xl(e, t, n = {}) {
|
|
2595
|
+
const { window: o = Re, document: a = o?.document, flush: s = "sync" } = n;
|
|
2596
|
+
if (!o || !a) return Bl;
|
|
536
2597
|
let l;
|
|
537
|
-
const r = (
|
|
538
|
-
l?.(), l =
|
|
539
|
-
}, i =
|
|
540
|
-
const
|
|
541
|
-
if (
|
|
542
|
-
const { stop: m } =
|
|
543
|
-
|
|
2598
|
+
const r = (c) => {
|
|
2599
|
+
l?.(), l = c;
|
|
2600
|
+
}, i = Ce(() => {
|
|
2601
|
+
const c = Se(e);
|
|
2602
|
+
if (c) {
|
|
2603
|
+
const { stop: m } = Wl(a, (g) => {
|
|
2604
|
+
g.map((p) => [...p.removedNodes]).flat().some((p) => p === c || p.contains(c)) && t(g);
|
|
544
2605
|
}, {
|
|
545
2606
|
window: o,
|
|
546
2607
|
childList: !0,
|
|
@@ -551,17 +2612,17 @@ function Vt(e, t, n = {}) {
|
|
|
551
2612
|
}, { flush: s }), u = () => {
|
|
552
2613
|
i(), r();
|
|
553
2614
|
};
|
|
554
|
-
return
|
|
2615
|
+
return gn(u), u;
|
|
555
2616
|
}
|
|
556
2617
|
// @__NO_SIDE_EFFECTS__
|
|
557
|
-
function
|
|
2618
|
+
function jl(e = {}) {
|
|
558
2619
|
var t;
|
|
559
|
-
const { window: n =
|
|
2620
|
+
const { window: n = Re, deep: o = !0, triggerOnRemoval: a = !1 } = e, s = (t = e.document) !== null && t !== void 0 ? t : n?.document, l = () => {
|
|
560
2621
|
let u = s?.activeElement;
|
|
561
2622
|
if (o)
|
|
562
|
-
for (var
|
|
2623
|
+
for (var c; u?.shadowRoot; ) u = u == null || (c = u.shadowRoot) === null || c === void 0 ? void 0 : c.activeElement;
|
|
563
2624
|
return u;
|
|
564
|
-
}, r =
|
|
2625
|
+
}, r = J(), i = () => {
|
|
565
2626
|
r.value = l();
|
|
566
2627
|
};
|
|
567
2628
|
if (n) {
|
|
@@ -569,26 +2630,26 @@ function Ot(e = {}) {
|
|
|
569
2630
|
capture: !0,
|
|
570
2631
|
passive: !0
|
|
571
2632
|
};
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
}, u),
|
|
2633
|
+
_e(n, "blur", (c) => {
|
|
2634
|
+
c.relatedTarget === null && i();
|
|
2635
|
+
}, u), _e(n, "focus", i, u);
|
|
575
2636
|
}
|
|
576
|
-
return a &&
|
|
2637
|
+
return a && Xl(r, i, { document: s }), i(), r;
|
|
577
2638
|
}
|
|
578
|
-
const
|
|
579
|
-
function
|
|
580
|
-
const { window: n =
|
|
581
|
-
if (!n || !(/* @__PURE__ */
|
|
2639
|
+
const ql = "focusin", Yl = "focusout", Jl = ":focus-within";
|
|
2640
|
+
function Kl(e, t = {}) {
|
|
2641
|
+
const { window: n = Re } = t, o = M(() => Se(e)), a = J(!1), s = M(() => a.value);
|
|
2642
|
+
if (!n || !(/* @__PURE__ */ jl(t)).value) return { focused: s };
|
|
582
2643
|
const l = { passive: !0 };
|
|
583
|
-
return
|
|
2644
|
+
return _e(o, ql, () => a.value = !0, l), _e(o, Yl, () => {
|
|
584
2645
|
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,
|
|
2646
|
+
return a.value = (r = (i = o.value) === null || i === void 0 || (u = i.matches) === null || u === void 0 ? void 0 : u.call(i, Jl)) !== null && r !== void 0 ? r : !1;
|
|
586
2647
|
}, l), { focused: s };
|
|
587
2648
|
}
|
|
588
|
-
function
|
|
589
|
-
const o =
|
|
2649
|
+
function Ql(e, { window: t = Re, scrollTarget: n } = {}) {
|
|
2650
|
+
const o = S(!1), a = () => {
|
|
590
2651
|
if (!t) return;
|
|
591
|
-
const s = t.document, l =
|
|
2652
|
+
const s = t.document, l = Se(e);
|
|
592
2653
|
if (!l)
|
|
593
2654
|
o.value = !1;
|
|
594
2655
|
else {
|
|
@@ -596,22 +2657,22 @@ function Bt(e, { window: t = W, scrollTarget: n } = {}) {
|
|
|
596
2657
|
o.value = r.top <= (t.innerHeight || s.documentElement.clientHeight) && r.left <= (t.innerWidth || s.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;
|
|
597
2658
|
}
|
|
598
2659
|
};
|
|
599
|
-
return
|
|
600
|
-
() =>
|
|
2660
|
+
return Y(
|
|
2661
|
+
() => Se(e),
|
|
601
2662
|
() => a(),
|
|
602
2663
|
{ immediate: !0, flush: "post" }
|
|
603
|
-
), t &&
|
|
2664
|
+
), t && _e(n || t, "scroll", a, {
|
|
604
2665
|
capture: !1,
|
|
605
2666
|
passive: !0
|
|
606
2667
|
}), o;
|
|
607
2668
|
}
|
|
608
|
-
const
|
|
609
|
-
let t =
|
|
2669
|
+
const ge = (e) => {
|
|
2670
|
+
let t = Ql(e).value;
|
|
610
2671
|
return t = t && e.offsetHeight > 0, t;
|
|
611
|
-
},
|
|
2672
|
+
}, ye = (e) => e.tabIndex >= 0, jt = (e) => {
|
|
612
2673
|
const t = e.target;
|
|
613
|
-
return
|
|
614
|
-
},
|
|
2674
|
+
return Rt(t);
|
|
2675
|
+
}, Rt = (e) => {
|
|
615
2676
|
let t;
|
|
616
2677
|
if (e instanceof HTMLTableCellElement) {
|
|
617
2678
|
const n = e.parentElement?.previousElementSibling;
|
|
@@ -623,8 +2684,8 @@ const _ = (e) => {
|
|
|
623
2684
|
const n = e.previousElementSibling;
|
|
624
2685
|
n && (t = n);
|
|
625
2686
|
}
|
|
626
|
-
return t && (!
|
|
627
|
-
},
|
|
2687
|
+
return t && (!ye(t) || !ge(t)) ? Rt(t) : t;
|
|
2688
|
+
}, Zl = (e) => {
|
|
628
2689
|
const t = e.target;
|
|
629
2690
|
let n;
|
|
630
2691
|
if (t instanceof HTMLTableCellElement) {
|
|
@@ -640,11 +2701,11 @@ const _ = (e) => {
|
|
|
640
2701
|
a && (n = a);
|
|
641
2702
|
}
|
|
642
2703
|
}
|
|
643
|
-
return n && (!
|
|
644
|
-
},
|
|
2704
|
+
return n && (!ye(n) || !ge(n)) ? Vt(n) : n;
|
|
2705
|
+
}, qt = (e) => {
|
|
645
2706
|
const t = e.target;
|
|
646
|
-
return
|
|
647
|
-
},
|
|
2707
|
+
return Vt(t);
|
|
2708
|
+
}, Vt = (e) => {
|
|
648
2709
|
let t;
|
|
649
2710
|
if (e instanceof HTMLTableCellElement) {
|
|
650
2711
|
const n = e.parentElement?.nextElementSibling;
|
|
@@ -656,8 +2717,8 @@ const _ = (e) => {
|
|
|
656
2717
|
const n = e.nextElementSibling;
|
|
657
2718
|
n && (t = n);
|
|
658
2719
|
}
|
|
659
|
-
return t && (!
|
|
660
|
-
},
|
|
2720
|
+
return t && (!ye(t) || !ge(t)) ? Vt(t) : t;
|
|
2721
|
+
}, ea = (e) => {
|
|
661
2722
|
const t = e.target;
|
|
662
2723
|
let n;
|
|
663
2724
|
if (t instanceof HTMLTableCellElement) {
|
|
@@ -673,95 +2734,95 @@ const _ = (e) => {
|
|
|
673
2734
|
a && (n = a);
|
|
674
2735
|
}
|
|
675
2736
|
}
|
|
676
|
-
return n && (!
|
|
677
|
-
},
|
|
2737
|
+
return n && (!ye(n) || !ge(n)) ? Rt(n) : n;
|
|
2738
|
+
}, Yt = (e) => {
|
|
678
2739
|
const t = e.target;
|
|
679
|
-
return
|
|
680
|
-
},
|
|
2740
|
+
return Pt(t);
|
|
2741
|
+
}, Pt = (e) => {
|
|
681
2742
|
let t;
|
|
682
|
-
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!
|
|
683
|
-
},
|
|
2743
|
+
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!ye(t) || !ge(t)) ? Pt(t) : t;
|
|
2744
|
+
}, Jt = (e) => {
|
|
684
2745
|
const t = e.target;
|
|
685
|
-
return
|
|
686
|
-
},
|
|
2746
|
+
return Ot(t);
|
|
2747
|
+
}, Ot = (e) => {
|
|
687
2748
|
let t;
|
|
688
|
-
return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!
|
|
689
|
-
},
|
|
2749
|
+
return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!ye(t) || !ge(t)) ? Ot(t) : t;
|
|
2750
|
+
}, Kt = (e) => {
|
|
690
2751
|
const t = e.target.parentElement?.firstElementChild;
|
|
691
|
-
return t && (!
|
|
692
|
-
},
|
|
2752
|
+
return t && (!ye(t) || !ge(t)) ? Ot(t) : t;
|
|
2753
|
+
}, Qt = (e) => {
|
|
693
2754
|
const t = e.target.parentElement?.lastElementChild;
|
|
694
|
-
return t && (!
|
|
695
|
-
},
|
|
2755
|
+
return t && (!ye(t) || !ge(t)) ? Pt(t) : t;
|
|
2756
|
+
}, Ye = ["alt", "control", "shift", "meta"], ta = {
|
|
696
2757
|
ArrowUp: "up",
|
|
697
2758
|
ArrowDown: "down",
|
|
698
2759
|
ArrowLeft: "left",
|
|
699
2760
|
ArrowRight: "right"
|
|
700
|
-
},
|
|
2761
|
+
}, yn = {
|
|
701
2762
|
"keydown.up": (e) => {
|
|
702
|
-
const t =
|
|
2763
|
+
const t = jt(e);
|
|
703
2764
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
704
2765
|
},
|
|
705
2766
|
"keydown.down": (e) => {
|
|
706
|
-
const t =
|
|
2767
|
+
const t = qt(e);
|
|
707
2768
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
708
2769
|
},
|
|
709
2770
|
"keydown.left": (e) => {
|
|
710
|
-
const t =
|
|
2771
|
+
const t = Yt(e);
|
|
711
2772
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
712
2773
|
},
|
|
713
2774
|
"keydown.right": (e) => {
|
|
714
|
-
const t =
|
|
2775
|
+
const t = Jt(e);
|
|
715
2776
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
716
2777
|
},
|
|
717
2778
|
"keydown.control.up": (e) => {
|
|
718
|
-
const t =
|
|
2779
|
+
const t = Zl(e);
|
|
719
2780
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
720
2781
|
},
|
|
721
2782
|
"keydown.control.down": (e) => {
|
|
722
|
-
const t =
|
|
2783
|
+
const t = ea(e);
|
|
723
2784
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
724
2785
|
},
|
|
725
2786
|
"keydown.control.left": (e) => {
|
|
726
|
-
const t =
|
|
2787
|
+
const t = Kt(e);
|
|
727
2788
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
728
2789
|
},
|
|
729
2790
|
"keydown.control.right": (e) => {
|
|
730
|
-
const t =
|
|
2791
|
+
const t = Qt(e);
|
|
731
2792
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
732
2793
|
},
|
|
733
2794
|
"keydown.end": (e) => {
|
|
734
|
-
const t =
|
|
2795
|
+
const t = Qt(e);
|
|
735
2796
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
736
2797
|
},
|
|
737
2798
|
"keydown.enter": (e) => {
|
|
738
2799
|
if (e.target instanceof HTMLTableCellElement) {
|
|
739
2800
|
e.preventDefault(), e.stopPropagation();
|
|
740
|
-
const t =
|
|
2801
|
+
const t = qt(e);
|
|
741
2802
|
t && t.focus();
|
|
742
2803
|
}
|
|
743
2804
|
},
|
|
744
2805
|
"keydown.shift.enter": (e) => {
|
|
745
2806
|
if (e.target instanceof HTMLTableCellElement) {
|
|
746
2807
|
e.preventDefault(), e.stopPropagation();
|
|
747
|
-
const t =
|
|
2808
|
+
const t = jt(e);
|
|
748
2809
|
t && t.focus();
|
|
749
2810
|
}
|
|
750
2811
|
},
|
|
751
2812
|
"keydown.home": (e) => {
|
|
752
|
-
const t =
|
|
2813
|
+
const t = Kt(e);
|
|
753
2814
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
754
2815
|
},
|
|
755
2816
|
"keydown.tab": (e) => {
|
|
756
|
-
const t =
|
|
2817
|
+
const t = Jt(e);
|
|
757
2818
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
758
2819
|
},
|
|
759
2820
|
"keydown.shift.tab": (e) => {
|
|
760
|
-
const t =
|
|
2821
|
+
const t = Yt(e);
|
|
761
2822
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
762
2823
|
}
|
|
763
2824
|
};
|
|
764
|
-
function
|
|
2825
|
+
function na(e) {
|
|
765
2826
|
const t = (l) => {
|
|
766
2827
|
let r = null;
|
|
767
2828
|
return l.parent && (typeof l.parent == "string" ? r = document.querySelector(l.parent) : l.parent instanceof HTMLElement ? r = l.parent : r = l.parent.value), r;
|
|
@@ -785,54 +2846,54 @@ function Nt(e) {
|
|
|
785
2846
|
}, o = (l) => {
|
|
786
2847
|
const r = t(l);
|
|
787
2848
|
let i = [];
|
|
788
|
-
return l.selectors ? i = n(l) : r && (i = Array.from(r.children).filter((u) =>
|
|
2849
|
+
return l.selectors ? i = n(l) : r && (i = Array.from(r.children).filter((u) => ye(u) && ge(u))), i;
|
|
789
2850
|
}, a = (l) => (r) => {
|
|
790
|
-
const i =
|
|
791
|
-
if (
|
|
792
|
-
const u = l.handlers ||
|
|
793
|
-
for (const
|
|
794
|
-
const [m, ...
|
|
795
|
-
if (m === "keydown" &&
|
|
796
|
-
const p = u[
|
|
2851
|
+
const i = ta[r.key] || r.key.toLowerCase();
|
|
2852
|
+
if (Ye.includes(i)) return;
|
|
2853
|
+
const u = l.handlers || yn;
|
|
2854
|
+
for (const c of Object.keys(u)) {
|
|
2855
|
+
const [m, ...g] = c.split(".");
|
|
2856
|
+
if (m === "keydown" && g.includes(i)) {
|
|
2857
|
+
const p = u[c], D = g.filter((f) => Ye.includes(f)), w = Ye.some((f) => {
|
|
797
2858
|
const h = f.charAt(0).toUpperCase() + f.slice(1);
|
|
798
2859
|
return r.getModifierState(h);
|
|
799
2860
|
});
|
|
800
|
-
if (
|
|
801
|
-
if (
|
|
802
|
-
for (const f of
|
|
803
|
-
if (
|
|
2861
|
+
if (D.length > 0) {
|
|
2862
|
+
if (w) {
|
|
2863
|
+
for (const f of Ye)
|
|
2864
|
+
if (g.includes(f)) {
|
|
804
2865
|
const h = f.charAt(0).toUpperCase() + f.slice(1);
|
|
805
2866
|
r.getModifierState(h) && p(r);
|
|
806
2867
|
}
|
|
807
2868
|
}
|
|
808
2869
|
} else
|
|
809
|
-
|
|
2870
|
+
w || p(r);
|
|
810
2871
|
}
|
|
811
2872
|
}
|
|
812
2873
|
}, s = [];
|
|
813
|
-
|
|
2874
|
+
ve(() => {
|
|
814
2875
|
for (const l of e) {
|
|
815
|
-
const r = t(l), i = o(l), u = a(l),
|
|
816
|
-
for (const m of
|
|
817
|
-
const { focused:
|
|
818
|
-
|
|
2876
|
+
const r = t(l), i = o(l), u = a(l), c = r ? [r] : i;
|
|
2877
|
+
for (const m of c) {
|
|
2878
|
+
const { focused: g } = Kl(S(m)), p = Y(g, (D) => {
|
|
2879
|
+
D ? m.addEventListener("keydown", u) : m.removeEventListener("keydown", u);
|
|
819
2880
|
});
|
|
820
2881
|
s.push(p);
|
|
821
2882
|
}
|
|
822
2883
|
}
|
|
823
|
-
}),
|
|
2884
|
+
}), tn(() => {
|
|
824
2885
|
for (const l of s)
|
|
825
2886
|
l();
|
|
826
2887
|
});
|
|
827
2888
|
}
|
|
828
|
-
const
|
|
2889
|
+
const oa = {
|
|
829
2890
|
ref: "datepicker",
|
|
830
2891
|
class: "adatepicker",
|
|
831
2892
|
tabindex: "0"
|
|
832
|
-
},
|
|
2893
|
+
}, la = {
|
|
833
2894
|
colspan: "5",
|
|
834
2895
|
tabindex: -1
|
|
835
|
-
},
|
|
2896
|
+
}, aa = ["onClick", "onKeydown"], ra = 6, Zt = 7, sa = /* @__PURE__ */ j({
|
|
836
2897
|
__name: "ADatePicker",
|
|
837
2898
|
props: {
|
|
838
2899
|
modelValue: { default: /* @__PURE__ */ new Date() },
|
|
@@ -840,153 +2901,183 @@ const jt = {
|
|
|
840
2901
|
},
|
|
841
2902
|
emits: ["update:modelValue"],
|
|
842
2903
|
setup(e, { expose: t }) {
|
|
843
|
-
const n =
|
|
844
|
-
|
|
845
|
-
i(), await
|
|
846
|
-
const
|
|
847
|
-
if (
|
|
848
|
-
|
|
2904
|
+
const n = fe(e, "modelValue"), o = S(new Date(n.value)), a = S(o.value.getMonth()), s = S(o.value.getFullYear()), l = S([]), r = ne("datepicker");
|
|
2905
|
+
ve(async () => {
|
|
2906
|
+
i(), await tt();
|
|
2907
|
+
const E = document.getElementsByClassName("selectedDate");
|
|
2908
|
+
if (E.length > 0)
|
|
2909
|
+
E[0].focus();
|
|
849
2910
|
else {
|
|
850
|
-
const
|
|
851
|
-
|
|
2911
|
+
const L = document.getElementsByClassName("todaysDate");
|
|
2912
|
+
L.length > 0 && L[0].focus();
|
|
852
2913
|
}
|
|
853
2914
|
});
|
|
854
2915
|
const i = () => {
|
|
855
2916
|
l.value = [];
|
|
856
|
-
const
|
|
857
|
-
for (const
|
|
858
|
-
l.value.push(
|
|
2917
|
+
const E = new Date(s.value, a.value, 1), L = E.getDay(), z = E.setDate(E.getDate() - L);
|
|
2918
|
+
for (const R of Array(43).keys())
|
|
2919
|
+
l.value.push(z + R * 864e5);
|
|
859
2920
|
};
|
|
860
|
-
|
|
861
|
-
const u = () => s.value -= 1,
|
|
2921
|
+
Y([a, s], i);
|
|
2922
|
+
const u = () => s.value -= 1, c = () => s.value += 1, m = () => {
|
|
862
2923
|
a.value == 0 ? (a.value = 11, u()) : a.value -= 1;
|
|
863
|
-
},
|
|
864
|
-
a.value == 11 ? (a.value = 0,
|
|
865
|
-
}, p = (
|
|
866
|
-
const
|
|
867
|
-
if (a.value ===
|
|
868
|
-
return
|
|
869
|
-
},
|
|
870
|
-
n.value = o.value = new Date(l.value[
|
|
871
|
-
},
|
|
2924
|
+
}, g = () => {
|
|
2925
|
+
a.value == 11 ? (a.value = 0, c()) : a.value += 1;
|
|
2926
|
+
}, p = (E) => {
|
|
2927
|
+
const L = /* @__PURE__ */ new Date();
|
|
2928
|
+
if (a.value === L.getMonth())
|
|
2929
|
+
return L.toDateString() === new Date(E).toDateString();
|
|
2930
|
+
}, D = (E) => new Date(E).toDateString() === new Date(o.value).toDateString(), w = (E, L) => (E - 1) * Zt + L, f = (E, L) => l.value[w(E, L)], h = (E) => {
|
|
2931
|
+
n.value = o.value = new Date(l.value[E]);
|
|
2932
|
+
}, I = M(() => new Date(s.value, a.value, 1).toLocaleDateString(void 0, {
|
|
872
2933
|
year: "numeric",
|
|
873
2934
|
month: "long"
|
|
874
2935
|
}));
|
|
875
|
-
return
|
|
2936
|
+
return na([
|
|
876
2937
|
{
|
|
877
2938
|
parent: r,
|
|
878
2939
|
selectors: "td",
|
|
879
2940
|
handlers: {
|
|
880
|
-
...
|
|
2941
|
+
...yn,
|
|
881
2942
|
"keydown.pageup": m,
|
|
882
2943
|
"keydown.shift.pageup": u,
|
|
883
|
-
"keydown.pagedown":
|
|
884
|
-
"keydown.shift.pagedown":
|
|
2944
|
+
"keydown.pagedown": g,
|
|
2945
|
+
"keydown.shift.pagedown": c,
|
|
885
2946
|
// TODO: this is a hack to override the stonecrop enter handler;
|
|
886
2947
|
// store context inside the component so that handlers can be setup consistently
|
|
887
2948
|
"keydown.enter": () => {
|
|
888
2949
|
}
|
|
889
2950
|
}
|
|
890
2951
|
}
|
|
891
|
-
]), t({ currentMonth: a, currentYear: s, selectedDate: o }), (
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
2952
|
+
]), t({ currentMonth: a, currentYear: s, selectedDate: o }), (E, L) => (x(), k("div", oa, [
|
|
2953
|
+
y("table", null, [
|
|
2954
|
+
y("tbody", null, [
|
|
2955
|
+
y("tr", null, [
|
|
2956
|
+
y("td", {
|
|
896
2957
|
id: "previous-month-btn",
|
|
897
2958
|
tabindex: -1,
|
|
898
2959
|
onClick: m
|
|
899
2960
|
}, "<"),
|
|
900
|
-
|
|
901
|
-
|
|
2961
|
+
y("th", la, W(I.value), 1),
|
|
2962
|
+
y("td", {
|
|
902
2963
|
id: "next-month-btn",
|
|
903
2964
|
tabindex: -1,
|
|
904
|
-
onClick:
|
|
2965
|
+
onClick: g
|
|
905
2966
|
}, ">")
|
|
906
2967
|
]),
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
2968
|
+
L[0] || (L[0] = y("tr", { class: "days-header" }, [
|
|
2969
|
+
y("td", null, "M"),
|
|
2970
|
+
y("td", null, "T"),
|
|
2971
|
+
y("td", null, "W"),
|
|
2972
|
+
y("td", null, "T"),
|
|
2973
|
+
y("td", null, "F"),
|
|
2974
|
+
y("td", null, "S"),
|
|
2975
|
+
y("td", null, "S")
|
|
915
2976
|
], -1)),
|
|
916
|
-
(
|
|
917
|
-
(
|
|
2977
|
+
(x(), k(te, null, ae(ra, (z) => y("tr", { key: z }, [
|
|
2978
|
+
(x(), k(te, null, ae(Zt, (R) => y("td", {
|
|
918
2979
|
ref_for: !0,
|
|
919
2980
|
ref: "celldate",
|
|
920
|
-
key:
|
|
2981
|
+
key: w(z, R),
|
|
921
2982
|
contenteditable: !1,
|
|
922
2983
|
spellcheck: !1,
|
|
923
2984
|
tabindex: 0,
|
|
924
|
-
class:
|
|
925
|
-
todaysDate: p(f(
|
|
926
|
-
selectedDate:
|
|
2985
|
+
class: ee({
|
|
2986
|
+
todaysDate: p(f(z, R)),
|
|
2987
|
+
selectedDate: D(f(z, R))
|
|
927
2988
|
}),
|
|
928
|
-
onClick:
|
|
929
|
-
onKeydown:
|
|
930
|
-
},
|
|
2989
|
+
onClick: $e((C) => h(w(z, R)), ["prevent", "stop"]),
|
|
2990
|
+
onKeydown: De((C) => h(w(z, R)), ["enter"])
|
|
2991
|
+
}, W(new Date(f(z, R)).getDate()), 43, aa)), 64))
|
|
931
2992
|
])), 64))
|
|
932
2993
|
])
|
|
933
2994
|
])
|
|
934
2995
|
], 512));
|
|
935
2996
|
}
|
|
936
|
-
}),
|
|
2997
|
+
}), ia = /* @__PURE__ */ he(sa, [["__scopeId", "data-v-056d2b5e"]]), ua = /* @__PURE__ */ j({
|
|
937
2998
|
__name: "CollapseButton",
|
|
938
2999
|
props: {
|
|
939
3000
|
collapsed: { type: Boolean }
|
|
940
3001
|
},
|
|
941
3002
|
setup(e) {
|
|
942
|
-
return (t, n) => (
|
|
943
|
-
class:
|
|
3003
|
+
return (t, n) => (x(), k("button", {
|
|
3004
|
+
class: ee(["collapse-button", e.collapsed ? "rotated" : "unrotated"])
|
|
944
3005
|
}, "×", 2));
|
|
945
3006
|
}
|
|
946
|
-
}),
|
|
3007
|
+
}), ca = /* @__PURE__ */ he(ua, [["__scopeId", "data-v-6f1c1b45"]]), da = { class: "aform" }, fa = {
|
|
3008
|
+
key: 0,
|
|
3009
|
+
class: "aform-nested-section"
|
|
3010
|
+
}, va = {
|
|
3011
|
+
key: 0,
|
|
3012
|
+
class: "aform-nested-label"
|
|
3013
|
+
}, ma = /* @__PURE__ */ j({
|
|
947
3014
|
__name: "AForm",
|
|
948
|
-
props: {
|
|
949
|
-
|
|
950
|
-
data: {},
|
|
3015
|
+
props: /* @__PURE__ */ de({
|
|
3016
|
+
schema: {},
|
|
951
3017
|
readOnly: { type: Boolean }
|
|
952
|
-
},
|
|
953
|
-
|
|
3018
|
+
}, {
|
|
3019
|
+
data: { required: !0 },
|
|
3020
|
+
dataModifiers: {}
|
|
3021
|
+
}),
|
|
3022
|
+
emits: /* @__PURE__ */ de(["update:schema", "update:data"], ["update:data"]),
|
|
954
3023
|
setup(e, { emit: t }) {
|
|
955
|
-
const n = t, o =
|
|
956
|
-
|
|
957
|
-
e.
|
|
958
|
-
|
|
959
|
-
})
|
|
3024
|
+
const n = t, o = fe(e, "data"), a = S({});
|
|
3025
|
+
Ce(() => {
|
|
3026
|
+
!e.schema || !o.value || e.schema.forEach((i) => {
|
|
3027
|
+
"schema" in i && Array.isArray(i.schema) && i.schema.length > 0 && (!a.value[i.fieldname] && o.value[i.fieldname] ? a.value[i.fieldname] = o.value[i.fieldname] : a.value[i.fieldname] || (a.value[i.fieldname] = {}));
|
|
3028
|
+
});
|
|
3029
|
+
}), Ce(() => {
|
|
3030
|
+
Object.keys(a.value).forEach((i) => {
|
|
3031
|
+
o.value && a.value[i] !== o.value[i] && (o.value[i] = a.value[i], n("update:data", o.value));
|
|
3032
|
+
});
|
|
3033
|
+
}), Ce(() => {
|
|
3034
|
+
o.value && e.schema && e.schema.forEach((i) => {
|
|
3035
|
+
i.fieldname && o.value[i.fieldname] !== void 0 && (i.value = o.value[i.fieldname]);
|
|
3036
|
+
});
|
|
960
3037
|
});
|
|
961
|
-
const
|
|
962
|
-
|
|
963
|
-
for (const [
|
|
964
|
-
["component", "fieldtype"].includes(
|
|
965
|
-
return
|
|
966
|
-
},
|
|
967
|
-
|
|
3038
|
+
const s = (i) => {
|
|
3039
|
+
const u = {};
|
|
3040
|
+
for (const [c, m] of Object.entries(i))
|
|
3041
|
+
["component", "fieldtype"].includes(c) || (u[c] = m), c === "rows" && (!m || Array.isArray(m) && m.length === 0) && (u.rows = o.value[i.fieldname] || []);
|
|
3042
|
+
return u;
|
|
3043
|
+
}, l = S([]);
|
|
3044
|
+
Ce(() => {
|
|
3045
|
+
e.schema && l.value.length !== e.schema.length && (l.value = e.schema.map((i, u) => M({
|
|
968
3046
|
get() {
|
|
969
|
-
return
|
|
3047
|
+
return i.value;
|
|
970
3048
|
},
|
|
971
|
-
set: (
|
|
972
|
-
e.
|
|
3049
|
+
set: (c) => {
|
|
3050
|
+
const m = e.schema[u].fieldname;
|
|
3051
|
+
e.schema[u].value = c, m && o.value && (o.value[m] = c, n("update:data", o.value)), n("update:schema", e.schema);
|
|
973
3052
|
}
|
|
974
|
-
}))
|
|
975
|
-
set: () => {
|
|
976
|
-
}
|
|
3053
|
+
})));
|
|
977
3054
|
});
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
3055
|
+
const r = M(() => l.value);
|
|
3056
|
+
return (i, u) => {
|
|
3057
|
+
const c = an("AForm", !0);
|
|
3058
|
+
return x(), k("form", da, [
|
|
3059
|
+
(x(!0), k(te, null, ae(e.schema, (m, g) => (x(), k(te, { key: g }, [
|
|
3060
|
+
"schema" in m && Array.isArray(m.schema) && m.schema.length > 0 ? (x(), k("div", fa, [
|
|
3061
|
+
m.label ? (x(), k("h4", va, W(m.label), 1)) : K("", !0),
|
|
3062
|
+
Ze(c, {
|
|
3063
|
+
data: a.value[m.fieldname],
|
|
3064
|
+
"onUpdate:data": (p) => a.value[m.fieldname] = p,
|
|
3065
|
+
schema: m.schema,
|
|
3066
|
+
"read-only": e.readOnly || m.readOnly
|
|
3067
|
+
}, null, 8, ["data", "onUpdate:data", "schema", "read-only"])
|
|
3068
|
+
])) : (x(), re(Ae(m.component), et({
|
|
3069
|
+
key: 1,
|
|
3070
|
+
modelValue: r.value[g].value,
|
|
3071
|
+
"onUpdate:modelValue": (p) => r.value[g].value = p,
|
|
3072
|
+
schema: m,
|
|
3073
|
+
data: o.value[m.fieldname],
|
|
3074
|
+
"read-only": e.readOnly
|
|
3075
|
+
}, { ref_for: !0 }, s(m)), null, 16, ["modelValue", "onUpdate:modelValue", "schema", "data", "read-only"]))
|
|
3076
|
+
], 64))), 128))
|
|
3077
|
+
]);
|
|
3078
|
+
};
|
|
988
3079
|
}
|
|
989
|
-
}),
|
|
3080
|
+
}), wn = /* @__PURE__ */ he(ma, [["__scopeId", "data-v-06e17c5b"]]), pa = /* @__PURE__ */ j({
|
|
990
3081
|
__name: "AFieldset",
|
|
991
3082
|
props: {
|
|
992
3083
|
schema: {},
|
|
@@ -995,67 +3086,67 @@ const jt = {
|
|
|
995
3086
|
data: { default: () => ({}) }
|
|
996
3087
|
},
|
|
997
3088
|
setup(e, { expose: t }) {
|
|
998
|
-
const n =
|
|
3089
|
+
const n = S(!1), o = S(e.data || []), a = S(e.schema), s = (l) => {
|
|
999
3090
|
l.preventDefault(), e.collapsible && (n.value = !n.value);
|
|
1000
3091
|
};
|
|
1001
|
-
return t({ collapsed: n }), (l, r) => (
|
|
1002
|
-
|
|
3092
|
+
return t({ collapsed: n }), (l, r) => (x(), k("fieldset", null, [
|
|
3093
|
+
y("legend", {
|
|
1003
3094
|
onClick: s,
|
|
1004
3095
|
onSubmit: s
|
|
1005
3096
|
}, [
|
|
1006
|
-
|
|
1007
|
-
e.collapsible ? (
|
|
3097
|
+
Ct(W(e.label) + " ", 1),
|
|
3098
|
+
e.collapsible ? (x(), re(ca, {
|
|
1008
3099
|
key: 0,
|
|
1009
3100
|
collapsed: n.value
|
|
1010
|
-
}, null, 8, ["collapsed"])) :
|
|
3101
|
+
}, null, 8, ["collapsed"])) : K("", !0)
|
|
1011
3102
|
], 32),
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
data: o.value
|
|
1017
|
-
}, null, 8, ["
|
|
1018
|
-
[
|
|
3103
|
+
oe(l.$slots, "default", { collapsed: n.value }, () => [
|
|
3104
|
+
U(Ze(wn, {
|
|
3105
|
+
schema: a.value,
|
|
3106
|
+
data: o.value,
|
|
3107
|
+
"onUpdate:data": r[0] || (r[0] = (i) => o.value = i)
|
|
3108
|
+
}, null, 8, ["schema", "data"]), [
|
|
3109
|
+
[be, !n.value]
|
|
1019
3110
|
])
|
|
1020
3111
|
], !0)
|
|
1021
3112
|
]));
|
|
1022
3113
|
}
|
|
1023
|
-
}),
|
|
3114
|
+
}), ha = /* @__PURE__ */ he(pa, [["__scopeId", "data-v-18fd6c61"]]), ga = { class: "aform_form-element aform_file-attach aform__grid--full" }, ya = {
|
|
1024
3115
|
key: 0,
|
|
1025
3116
|
class: "aform_file-attach-feedback"
|
|
1026
|
-
},
|
|
3117
|
+
}, wa = ["disabled"], xa = /* @__PURE__ */ j({
|
|
1027
3118
|
__name: "AFileAttach",
|
|
1028
3119
|
props: {
|
|
1029
3120
|
label: {}
|
|
1030
3121
|
},
|
|
1031
3122
|
setup(e) {
|
|
1032
|
-
const { files: t, open: n, reset: o, onChange: a } =
|
|
1033
|
-
return a((l) => l), (l, r) => (
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
r[2] || (r[2] =
|
|
1037
|
-
|
|
3123
|
+
const { files: t, open: n, reset: o, onChange: a } = Tl(), s = M(() => `${t.value.length} ${t.value.length === 1 ? "file" : "files"}`);
|
|
3124
|
+
return a((l) => l), (l, r) => (x(), k("div", ga, [
|
|
3125
|
+
$(t) ? (x(), k("div", ya, [
|
|
3126
|
+
y("p", null, [
|
|
3127
|
+
r[2] || (r[2] = Ct(" You have selected: ", -1)),
|
|
3128
|
+
y("b", null, W(s.value), 1)
|
|
1038
3129
|
]),
|
|
1039
|
-
(
|
|
3130
|
+
(x(!0), k(te, null, ae($(t), (i) => (x(), k("li", {
|
|
1040
3131
|
key: i.name
|
|
1041
|
-
},
|
|
1042
|
-
])) :
|
|
1043
|
-
|
|
3132
|
+
}, W(i.name), 1))), 128))
|
|
3133
|
+
])) : K("", !0),
|
|
3134
|
+
y("button", {
|
|
1044
3135
|
type: "button",
|
|
1045
3136
|
class: "aform_form-btn",
|
|
1046
|
-
onClick: r[0] || (r[0] = (i) =>
|
|
1047
|
-
},
|
|
1048
|
-
|
|
3137
|
+
onClick: r[0] || (r[0] = (i) => $(n)())
|
|
3138
|
+
}, W(e.label), 1),
|
|
3139
|
+
y("button", {
|
|
1049
3140
|
type: "button",
|
|
1050
|
-
disabled:
|
|
3141
|
+
disabled: !$(t),
|
|
1051
3142
|
class: "aform_form-btn",
|
|
1052
|
-
onClick: r[1] || (r[1] = (i) =>
|
|
1053
|
-
}, "Reset", 8,
|
|
3143
|
+
onClick: r[1] || (r[1] = (i) => $(o)())
|
|
3144
|
+
}, "Reset", 8, wa)
|
|
1054
3145
|
]));
|
|
1055
3146
|
}
|
|
1056
|
-
}),
|
|
3147
|
+
}), ba = /* @__PURE__ */ he(xa, [["__scopeId", "data-v-b700734f"]]), Ia = { class: "aform_form-element" }, ka = ["id", "disabled", "required"], Ca = ["for"], Ea = ["innerHTML"], Da = /* @__PURE__ */ j({
|
|
1057
3148
|
__name: "ANumericInput",
|
|
1058
|
-
props: /* @__PURE__ */
|
|
3149
|
+
props: /* @__PURE__ */ de({
|
|
1059
3150
|
schema: {},
|
|
1060
3151
|
label: {},
|
|
1061
3152
|
mask: {},
|
|
@@ -1069,31 +3160,31 @@ const jt = {
|
|
|
1069
3160
|
}),
|
|
1070
3161
|
emits: ["update:modelValue"],
|
|
1071
3162
|
setup(e) {
|
|
1072
|
-
const t =
|
|
1073
|
-
return (n, o) => (
|
|
1074
|
-
|
|
3163
|
+
const t = fe(e, "modelValue");
|
|
3164
|
+
return (n, o) => (x(), k("div", Ia, [
|
|
3165
|
+
U(y("input", {
|
|
1075
3166
|
id: e.uuid,
|
|
1076
3167
|
"onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
|
|
1077
3168
|
class: "aform_input-field",
|
|
1078
3169
|
type: "number",
|
|
1079
3170
|
disabled: e.readOnly,
|
|
1080
3171
|
required: e.required
|
|
1081
|
-
}, null, 8,
|
|
1082
|
-
[
|
|
3172
|
+
}, null, 8, ka), [
|
|
3173
|
+
[se, t.value]
|
|
1083
3174
|
]),
|
|
1084
|
-
|
|
3175
|
+
y("label", {
|
|
1085
3176
|
class: "aform_field-label",
|
|
1086
3177
|
for: e.uuid
|
|
1087
|
-
},
|
|
1088
|
-
|
|
3178
|
+
}, W(e.label), 9, Ca),
|
|
3179
|
+
U(y("p", {
|
|
1089
3180
|
class: "aform_error",
|
|
1090
3181
|
innerHTML: e.validation.errorMessage
|
|
1091
|
-
}, null, 8,
|
|
1092
|
-
[
|
|
3182
|
+
}, null, 8, Ea), [
|
|
3183
|
+
[be, e.validation.errorMessage]
|
|
1093
3184
|
])
|
|
1094
3185
|
]));
|
|
1095
3186
|
}
|
|
1096
|
-
}),
|
|
3187
|
+
}), en = {
|
|
1097
3188
|
date: "##/##/####",
|
|
1098
3189
|
datetime: "####/##/## ##:##",
|
|
1099
3190
|
time: "##:##",
|
|
@@ -1101,34 +3192,34 @@ const jt = {
|
|
|
1101
3192
|
phone: "(###) ### - ####",
|
|
1102
3193
|
card: "#### #### #### ####"
|
|
1103
3194
|
};
|
|
1104
|
-
function
|
|
3195
|
+
function Ta(e) {
|
|
1105
3196
|
try {
|
|
1106
3197
|
return Function(`"use strict";return (${e})`)();
|
|
1107
3198
|
} catch {
|
|
1108
3199
|
}
|
|
1109
3200
|
}
|
|
1110
|
-
function
|
|
3201
|
+
function Aa(e) {
|
|
1111
3202
|
let t = e.value;
|
|
1112
3203
|
if (t) {
|
|
1113
|
-
const n =
|
|
3204
|
+
const n = Ta(t);
|
|
1114
3205
|
if (n) {
|
|
1115
3206
|
const o = e.instance?.locale;
|
|
1116
3207
|
t = n(o);
|
|
1117
3208
|
}
|
|
1118
3209
|
} else {
|
|
1119
3210
|
const o = e.instance?.schema?.fieldtype?.toLowerCase();
|
|
1120
|
-
o &&
|
|
3211
|
+
o && en[o] && (t = en[o]);
|
|
1121
3212
|
}
|
|
1122
3213
|
return t;
|
|
1123
3214
|
}
|
|
1124
|
-
function
|
|
3215
|
+
function $a(e, t) {
|
|
1125
3216
|
let n = e;
|
|
1126
3217
|
const o = [t, "/", "-", "(", ")", " "];
|
|
1127
3218
|
for (const a of o)
|
|
1128
3219
|
n = n.replaceAll(a, "");
|
|
1129
3220
|
return n;
|
|
1130
3221
|
}
|
|
1131
|
-
function
|
|
3222
|
+
function Ma(e, t, n) {
|
|
1132
3223
|
let o = t;
|
|
1133
3224
|
for (const a of e) {
|
|
1134
3225
|
const s = o.indexOf(n);
|
|
@@ -1139,19 +3230,19 @@ function gn(e, t, n) {
|
|
|
1139
3230
|
}
|
|
1140
3231
|
return o.slice(0, t.length);
|
|
1141
3232
|
}
|
|
1142
|
-
function
|
|
1143
|
-
const n =
|
|
3233
|
+
function Sa(e, t) {
|
|
3234
|
+
const n = Aa(t);
|
|
1144
3235
|
if (!n) return;
|
|
1145
|
-
const o = "#", a = e.value, s =
|
|
3236
|
+
const o = "#", a = e.value, s = $a(a, o);
|
|
1146
3237
|
if (s) {
|
|
1147
|
-
const l =
|
|
3238
|
+
const l = Ma(s, n, o);
|
|
1148
3239
|
t.instance?.maskFilled && (t.instance.maskFilled = !l.includes(o)), e.value = l;
|
|
1149
3240
|
} else
|
|
1150
3241
|
e.value = n;
|
|
1151
3242
|
}
|
|
1152
|
-
const
|
|
3243
|
+
const La = { class: "aform_form-element" }, Ra = ["id", "disabled", "maxlength", "required"], Va = ["for"], Pa = ["innerHTML"], Oa = /* @__PURE__ */ j({
|
|
1153
3244
|
__name: "ATextInput",
|
|
1154
|
-
props: /* @__PURE__ */
|
|
3245
|
+
props: /* @__PURE__ */ de({
|
|
1155
3246
|
schema: {},
|
|
1156
3247
|
label: {},
|
|
1157
3248
|
mask: {},
|
|
@@ -1165,35 +3256,35 @@ const bn = { class: "aform_form-element" }, wn = ["id", "disabled", "maxlength",
|
|
|
1165
3256
|
}),
|
|
1166
3257
|
emits: ["update:modelValue"],
|
|
1167
3258
|
setup(e) {
|
|
1168
|
-
const t =
|
|
1169
|
-
return (o, a) => (
|
|
1170
|
-
|
|
3259
|
+
const t = S(!0), n = fe(e, "modelValue");
|
|
3260
|
+
return (o, a) => (x(), k("div", La, [
|
|
3261
|
+
U(y("input", {
|
|
1171
3262
|
id: e.uuid,
|
|
1172
3263
|
"onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
|
|
1173
3264
|
class: "aform_input-field",
|
|
1174
3265
|
disabled: e.readOnly,
|
|
1175
3266
|
maxlength: e.mask && t.value ? e.mask.length : void 0,
|
|
1176
3267
|
required: e.required
|
|
1177
|
-
}, null, 8,
|
|
1178
|
-
[
|
|
1179
|
-
[
|
|
3268
|
+
}, null, 8, Ra), [
|
|
3269
|
+
[se, n.value],
|
|
3270
|
+
[$(Sa), e.mask]
|
|
1180
3271
|
]),
|
|
1181
|
-
|
|
3272
|
+
y("label", {
|
|
1182
3273
|
class: "aform_field-label",
|
|
1183
3274
|
for: e.uuid
|
|
1184
|
-
},
|
|
1185
|
-
|
|
3275
|
+
}, W(e.label), 9, Va),
|
|
3276
|
+
U(y("p", {
|
|
1186
3277
|
class: "aform_error",
|
|
1187
3278
|
innerHTML: e.validation.errorMessage
|
|
1188
|
-
}, null, 8,
|
|
1189
|
-
[
|
|
3279
|
+
}, null, 8, Pa), [
|
|
3280
|
+
[be, e.validation.errorMessage]
|
|
1190
3281
|
])
|
|
1191
3282
|
]));
|
|
1192
3283
|
}
|
|
1193
|
-
}),
|
|
3284
|
+
}), _a = { class: "login-container" }, Ha = { class: "account-container" }, Fa = { class: "account-header" }, Na = { id: "account-title" }, Ba = { id: "account-subtitle" }, Ga = { class: "login-form-container" }, Ua = { class: "login-form-email aform_form-element" }, za = ["disabled"], Wa = { class: "login-form-password aform_form-element" }, Xa = ["disabled"], ja = ["disabled"], qa = {
|
|
1194
3285
|
key: 0,
|
|
1195
3286
|
class: "material-symbols-outlined loading-icon"
|
|
1196
|
-
},
|
|
3287
|
+
}, Ya = /* @__PURE__ */ j({
|
|
1197
3288
|
__name: "Login",
|
|
1198
3289
|
props: {
|
|
1199
3290
|
headerTitle: { default: "Login" },
|
|
@@ -1201,7 +3292,7 @@ const bn = { class: "aform_form-element" }, wn = ["id", "disabled", "maxlength",
|
|
|
1201
3292
|
},
|
|
1202
3293
|
emits: ["loginFailed", "loginSuccess"],
|
|
1203
3294
|
setup(e, { emit: t }) {
|
|
1204
|
-
const n = t, o =
|
|
3295
|
+
const n = t, o = S(""), a = S(""), s = S(!1), l = S(!1);
|
|
1205
3296
|
function r(i) {
|
|
1206
3297
|
if (i.preventDefault(), s.value = !0, l.value) {
|
|
1207
3298
|
s.value = !1, n("loginFailed");
|
|
@@ -1209,24 +3300,24 @@ const bn = { class: "aform_form-element" }, wn = ["id", "disabled", "maxlength",
|
|
|
1209
3300
|
}
|
|
1210
3301
|
s.value = !1, n("loginSuccess");
|
|
1211
3302
|
}
|
|
1212
|
-
return (i, u) => (
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
3303
|
+
return (i, u) => (x(), k("div", _a, [
|
|
3304
|
+
y("div", null, [
|
|
3305
|
+
y("div", Ha, [
|
|
3306
|
+
y("div", Fa, [
|
|
3307
|
+
y("h1", Na, W(e.headerTitle), 1),
|
|
3308
|
+
y("p", Ba, W(e.headerSubtitle), 1)
|
|
1218
3309
|
]),
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
u[2] || (u[2] =
|
|
3310
|
+
y("form", { onSubmit: r }, [
|
|
3311
|
+
y("div", Ga, [
|
|
3312
|
+
y("div", Ua, [
|
|
3313
|
+
u[2] || (u[2] = y("label", {
|
|
1223
3314
|
id: "login-email",
|
|
1224
3315
|
for: "email",
|
|
1225
3316
|
class: "aform_field-label"
|
|
1226
3317
|
}, "Email", -1)),
|
|
1227
|
-
|
|
3318
|
+
U(y("input", {
|
|
1228
3319
|
id: "email",
|
|
1229
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
3320
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => o.value = c),
|
|
1230
3321
|
class: "aform_input-field",
|
|
1231
3322
|
name: "email",
|
|
1232
3323
|
placeholder: "name@example.com",
|
|
@@ -1235,60 +3326,60 @@ const bn = { class: "aform_form-element" }, wn = ["id", "disabled", "maxlength",
|
|
|
1235
3326
|
"auto-complete": "email",
|
|
1236
3327
|
"auto-correct": "off",
|
|
1237
3328
|
disabled: s.value
|
|
1238
|
-
}, null, 8,
|
|
1239
|
-
[
|
|
3329
|
+
}, null, 8, za), [
|
|
3330
|
+
[se, o.value]
|
|
1240
3331
|
])
|
|
1241
3332
|
]),
|
|
1242
|
-
|
|
1243
|
-
u[3] || (u[3] =
|
|
3333
|
+
y("div", Wa, [
|
|
3334
|
+
u[3] || (u[3] = y("label", {
|
|
1244
3335
|
id: "login-password",
|
|
1245
3336
|
for: "password",
|
|
1246
3337
|
class: "aform_field-label"
|
|
1247
3338
|
}, "Password", -1)),
|
|
1248
|
-
|
|
3339
|
+
U(y("input", {
|
|
1249
3340
|
id: "password",
|
|
1250
|
-
"onUpdate:modelValue": u[1] || (u[1] = (
|
|
3341
|
+
"onUpdate:modelValue": u[1] || (u[1] = (c) => a.value = c),
|
|
1251
3342
|
class: "aform_input-field",
|
|
1252
3343
|
name: "password",
|
|
1253
3344
|
type: "password",
|
|
1254
3345
|
disabled: s.value
|
|
1255
|
-
}, null, 8,
|
|
1256
|
-
[
|
|
3346
|
+
}, null, 8, Xa), [
|
|
3347
|
+
[se, a.value]
|
|
1257
3348
|
])
|
|
1258
3349
|
]),
|
|
1259
|
-
|
|
3350
|
+
y("button", {
|
|
1260
3351
|
class: "btn",
|
|
1261
3352
|
disabled: s.value || !o.value || !a.value,
|
|
1262
3353
|
onClick: r
|
|
1263
3354
|
}, [
|
|
1264
|
-
s.value ? (
|
|
1265
|
-
u[4] || (u[4] =
|
|
1266
|
-
], 8,
|
|
3355
|
+
s.value ? (x(), k("span", qa, "progress_activity")) : K("", !0),
|
|
3356
|
+
u[4] || (u[4] = y("span", { id: "login-form-button" }, "Login", -1))
|
|
3357
|
+
], 8, ja)
|
|
1267
3358
|
])
|
|
1268
3359
|
], 32),
|
|
1269
|
-
u[5] || (u[5] =
|
|
1270
|
-
|
|
3360
|
+
u[5] || (u[5] = y("button", { class: "btn" }, [
|
|
3361
|
+
y("span", { id: "forgot-password-button" }, "Forgot password?")
|
|
1271
3362
|
], -1))
|
|
1272
3363
|
])
|
|
1273
3364
|
])
|
|
1274
3365
|
]));
|
|
1275
3366
|
}
|
|
1276
|
-
}),
|
|
1277
|
-
function
|
|
1278
|
-
e.component("ACheckbox",
|
|
3367
|
+
}), Qa = /* @__PURE__ */ he(Ya, [["__scopeId", "data-v-d9ffd0a7"]]);
|
|
3368
|
+
function Za(e) {
|
|
3369
|
+
e.use(al), e.component("ACheckbox", fl), e.component("ACombobox", vl), e.component("ADate", yl), e.component("ADropdown", Ol), e.component("ADatePicker", ia), e.component("AFieldset", ha), e.component("AFileAttach", ba), e.component("AForm", wn), e.component("ANumericInput", Da), e.component("ATextInput", Oa);
|
|
1279
3370
|
}
|
|
1280
3371
|
export {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
3372
|
+
fl as ACheckbox,
|
|
3373
|
+
vl as AComboBox,
|
|
3374
|
+
yl as ADate,
|
|
3375
|
+
ia as ADatePicker,
|
|
3376
|
+
Ol as ADropdown,
|
|
3377
|
+
ha as AFieldset,
|
|
3378
|
+
ba as AFileAttach,
|
|
3379
|
+
wn as AForm,
|
|
3380
|
+
Da as ANumericInput,
|
|
3381
|
+
Oa as ATextInput,
|
|
3382
|
+
Qa as Login,
|
|
3383
|
+
Za as install
|
|
1293
3384
|
};
|
|
1294
3385
|
//# sourceMappingURL=aform.js.map
|