@stonecrop/aform 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aform.d.ts +11 -15
- package/dist/aform.js +1462 -1377
- package/dist/aform.js.map +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/src/types/index.d.ts +10 -15
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/AForm.vue +30 -28
- package/src/components/form/ACheckbox.vue +18 -12
- package/src/components/form/AComboBox.vue +4 -1
- package/src/components/form/ADate.vue +17 -17
- package/src/components/form/ADatePicker.vue +9 -1
- package/src/components/form/ADropdown.vue +16 -7
- package/src/components/form/AFieldset.vue +5 -2
- package/src/components/form/AFileAttach.vue +31 -16
- package/src/components/form/ANumericInput.vue +16 -10
- package/src/components/form/ATextInput.vue +17 -11
- package/src/types/index.ts +11 -17
package/dist/aform.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as oe, useTemplateRef as fe, ref as L, computed as T, openBlock as h, createElementBlock as b, unref as V, normalizeClass as se, normalizeStyle as be, createBlock as pe, resolveDynamicComponent as Ue, mergeProps as ft, toDisplayString as N, createElementVNode as w, withModifiers as Ie, withDirectives as K, Fragment as X, renderList as ve, vShow as Ce, createCommentVNode as Y, renderSlot as he, createTextVNode as Dt, onMounted as Ee, watch as ne, onBeforeUnmount as sn, nextTick as vt, toValue as E, shallowRef as ue, getCurrentScope as mt, onScopeDispose as pt, reactive as rn, vModelText as we, vModelCheckbox as un, vModelSelect as Cn, getCurrentInstance as ht, watchEffect as gt, useCssVars as En, onUnmounted as An, useModel as Me, createVNode as ct, withCtx as $t, mergeModels as xe, isRef as $n, toRefs as Tn, customRef as St, toRef as cn, readonly as Rt, resolveComponent as dn, withKeys as Ze } from "vue";
|
|
2
2
|
import { defineStore as Dn } from "pinia";
|
|
3
3
|
import './assets/index.css';function fn(e, t) {
|
|
4
|
-
return mt() ? (
|
|
4
|
+
return mt() ? (pt(e, t), !0) : !1;
|
|
5
5
|
}
|
|
6
6
|
const Sn = typeof window < "u" && typeof document < "u";
|
|
7
7
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
8
8
|
const Rn = (e) => e != null, Ln = Object.prototype.toString, Hn = (e) => Ln.call(e) === "[object Object]", Vn = () => {
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function st(e) {
|
|
11
11
|
return Array.isArray(e) ? e : [e];
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return
|
|
13
|
+
function _n(e, t, n) {
|
|
14
|
+
return ne(e, t, {
|
|
15
15
|
...n,
|
|
16
16
|
immediate: !0
|
|
17
17
|
});
|
|
@@ -22,58 +22,58 @@ function We(e) {
|
|
|
22
22
|
const n = E(e);
|
|
23
23
|
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n =
|
|
27
|
-
const o =
|
|
25
|
+
function Qe(...e) {
|
|
26
|
+
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = T(() => {
|
|
27
|
+
const o = st(E(e[0])).filter((a) => a != null);
|
|
28
28
|
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
29
29
|
});
|
|
30
|
-
return
|
|
30
|
+
return _n(() => {
|
|
31
31
|
var o, a;
|
|
32
32
|
return [
|
|
33
33
|
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => We(r))) !== null && o !== void 0 ? o : [ze].filter((r) => r != null),
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
st(E(n.value ? e[1] : e[0])),
|
|
35
|
+
st(V(n.value ? e[2] : e[1])),
|
|
36
36
|
E(n.value ? e[3] : e[2])
|
|
37
37
|
];
|
|
38
38
|
}, ([o, a, r, s], l, u) => {
|
|
39
39
|
if (!o?.length || !a?.length || !r?.length) return;
|
|
40
|
-
const i = Hn(s) ? { ...s } : s,
|
|
40
|
+
const i = Hn(s) ? { ...s } : s, d = o.flatMap((m) => a.flatMap((p) => r.map((I) => t(m, p, I, i))));
|
|
41
41
|
u(() => {
|
|
42
|
-
|
|
42
|
+
d.forEach((m) => m());
|
|
43
43
|
});
|
|
44
44
|
}, { flush: "post" });
|
|
45
45
|
}
|
|
46
46
|
// @__NO_SIDE_EFFECTS__
|
|
47
|
-
function
|
|
48
|
-
const e =
|
|
47
|
+
function Pn() {
|
|
48
|
+
const e = ue(!1), t = ht();
|
|
49
49
|
return t && Ee(() => {
|
|
50
50
|
e.value = !0;
|
|
51
51
|
}, t), e;
|
|
52
52
|
}
|
|
53
53
|
// @__NO_SIDE_EFFECTS__
|
|
54
54
|
function On(e) {
|
|
55
|
-
const t = /* @__PURE__ */
|
|
56
|
-
return
|
|
55
|
+
const t = /* @__PURE__ */ Pn();
|
|
56
|
+
return T(() => (t.value, !!e()));
|
|
57
57
|
}
|
|
58
58
|
function Bn(e, t, n = {}) {
|
|
59
59
|
const { window: o = ze, ...a } = n;
|
|
60
60
|
let r;
|
|
61
61
|
const s = /* @__PURE__ */ On(() => o && "MutationObserver" in o), l = () => {
|
|
62
62
|
r && (r.disconnect(), r = void 0);
|
|
63
|
-
}, u =
|
|
64
|
-
const
|
|
65
|
-
return new Set(
|
|
66
|
-
}), (
|
|
67
|
-
l(), s.value &&
|
|
63
|
+
}, u = ne(T(() => {
|
|
64
|
+
const m = st(E(e)).map(We).filter(Rn);
|
|
65
|
+
return new Set(m);
|
|
66
|
+
}), (m) => {
|
|
67
|
+
l(), s.value && m.size && (r = new MutationObserver(t), m.forEach((p) => r.observe(p, a)));
|
|
68
68
|
}, {
|
|
69
69
|
immediate: !0,
|
|
70
70
|
flush: "post"
|
|
71
|
-
}), i = () => r?.takeRecords(),
|
|
71
|
+
}), i = () => r?.takeRecords(), d = () => {
|
|
72
72
|
u(), l();
|
|
73
73
|
};
|
|
74
|
-
return fn(
|
|
74
|
+
return fn(d), {
|
|
75
75
|
isSupported: s,
|
|
76
|
-
stop:
|
|
76
|
+
stop: d,
|
|
77
77
|
takeRecords: i
|
|
78
78
|
};
|
|
79
79
|
}
|
|
@@ -81,19 +81,19 @@ function Fn(e, t, n = {}) {
|
|
|
81
81
|
const { window: o = ze, document: a = o?.document, flush: r = "sync" } = n;
|
|
82
82
|
if (!o || !a) return Vn;
|
|
83
83
|
let s;
|
|
84
|
-
const l = (
|
|
85
|
-
s?.(), s =
|
|
86
|
-
}, u =
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
const { stop:
|
|
90
|
-
|
|
84
|
+
const l = (d) => {
|
|
85
|
+
s?.(), s = d;
|
|
86
|
+
}, u = gt(() => {
|
|
87
|
+
const d = We(e);
|
|
88
|
+
if (d) {
|
|
89
|
+
const { stop: m } = Bn(a, (p) => {
|
|
90
|
+
p.map((I) => [...I.removedNodes]).flat().some((I) => I === d || I.contains(d)) && t(p);
|
|
91
91
|
}, {
|
|
92
92
|
window: o,
|
|
93
93
|
childList: !0,
|
|
94
94
|
subtree: !0
|
|
95
95
|
});
|
|
96
|
-
l(
|
|
96
|
+
l(m);
|
|
97
97
|
}
|
|
98
98
|
}, { flush: r }), i = () => {
|
|
99
99
|
u(), l();
|
|
@@ -106,9 +106,9 @@ function Zn(e = {}) {
|
|
|
106
106
|
const { window: n = ze, deep: o = !0, triggerOnRemoval: a = !1 } = e, r = (t = e.document) !== null && t !== void 0 ? t : n?.document, s = () => {
|
|
107
107
|
let i = r?.activeElement;
|
|
108
108
|
if (o)
|
|
109
|
-
for (var
|
|
109
|
+
for (var d; i?.shadowRoot; ) i = i == null || (d = i.shadowRoot) === null || d === void 0 ? void 0 : d.activeElement;
|
|
110
110
|
return i;
|
|
111
|
-
}, l =
|
|
111
|
+
}, l = ue(), u = () => {
|
|
112
112
|
l.value = s();
|
|
113
113
|
};
|
|
114
114
|
if (n) {
|
|
@@ -116,18 +116,18 @@ function Zn(e = {}) {
|
|
|
116
116
|
capture: !0,
|
|
117
117
|
passive: !0
|
|
118
118
|
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}, i),
|
|
119
|
+
Qe(n, "blur", (d) => {
|
|
120
|
+
d.relatedTarget === null && u();
|
|
121
|
+
}, i), Qe(n, "focus", u, i);
|
|
122
122
|
}
|
|
123
123
|
return a && Fn(l, u, { document: r }), u(), l;
|
|
124
124
|
}
|
|
125
125
|
const Nn = "focusin", Un = "focusout", Wn = ":focus-within";
|
|
126
126
|
function Gn(e, t = {}) {
|
|
127
|
-
const { window: n = ze } = t, o =
|
|
127
|
+
const { window: n = ze } = t, o = T(() => We(e)), a = ue(!1), r = T(() => a.value);
|
|
128
128
|
if (!n || !(/* @__PURE__ */ Zn(t)).value) return { focused: r };
|
|
129
129
|
const s = { passive: !0 };
|
|
130
|
-
return
|
|
130
|
+
return Qe(o, Nn, () => a.value = !0, s), Qe(o, Un, () => {
|
|
131
131
|
var l, u, i;
|
|
132
132
|
return a.value = (l = (u = o.value) === null || u === void 0 || (i = u.matches) === null || i === void 0 ? void 0 : i.call(u, Wn)) !== null && l !== void 0 ? l : !1;
|
|
133
133
|
}, s), { focused: r };
|
|
@@ -143,11 +143,11 @@ function zn(e, { window: t = ze, scrollTarget: n } = {}) {
|
|
|
143
143
|
o.value = l.top <= (t.innerHeight || r.documentElement.clientHeight) && l.left <= (t.innerWidth || r.documentElement.clientWidth) && l.bottom >= 0 && l.right >= 0;
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
-
return
|
|
146
|
+
return ne(
|
|
147
147
|
() => We(e),
|
|
148
148
|
() => a(),
|
|
149
149
|
{ immediate: !0, flush: "post" }
|
|
150
|
-
), t &&
|
|
150
|
+
), t && Qe(n || t, "scroll", a, {
|
|
151
151
|
capture: !1,
|
|
152
152
|
passive: !0
|
|
153
153
|
}), o;
|
|
@@ -155,7 +155,7 @@ function zn(e, { window: t = ze, scrollTarget: n } = {}) {
|
|
|
155
155
|
const Ae = (e) => {
|
|
156
156
|
let t = zn(e).value;
|
|
157
157
|
return t = t && e.offsetHeight > 0, t;
|
|
158
|
-
},
|
|
158
|
+
}, $e = (e) => e.tabIndex >= 0, Wt = (e) => {
|
|
159
159
|
const t = e.target;
|
|
160
160
|
return Lt(t);
|
|
161
161
|
}, Lt = (e) => {
|
|
@@ -170,7 +170,7 @@ const Ae = (e) => {
|
|
|
170
170
|
const n = e.previousElementSibling;
|
|
171
171
|
n && (t = n);
|
|
172
172
|
}
|
|
173
|
-
return t && (
|
|
173
|
+
return t && (!$e(t) || !Ae(t)) ? Lt(t) : t;
|
|
174
174
|
}, qn = (e) => {
|
|
175
175
|
const t = e.target;
|
|
176
176
|
let n;
|
|
@@ -187,7 +187,7 @@ const Ae = (e) => {
|
|
|
187
187
|
a && (n = a);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
return n && (
|
|
190
|
+
return n && (!$e(n) || !Ae(n)) ? Ht(n) : n;
|
|
191
191
|
}, Gt = (e) => {
|
|
192
192
|
const t = e.target;
|
|
193
193
|
return Ht(t);
|
|
@@ -203,7 +203,7 @@ const Ae = (e) => {
|
|
|
203
203
|
const n = e.nextElementSibling;
|
|
204
204
|
n && (t = n);
|
|
205
205
|
}
|
|
206
|
-
return t && (
|
|
206
|
+
return t && (!$e(t) || !Ae(t)) ? Ht(t) : t;
|
|
207
207
|
}, Yn = (e) => {
|
|
208
208
|
const t = e.target;
|
|
209
209
|
let n;
|
|
@@ -220,26 +220,26 @@ const Ae = (e) => {
|
|
|
220
220
|
a && (n = a);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
return n && (
|
|
223
|
+
return n && (!$e(n) || !Ae(n)) ? Lt(n) : n;
|
|
224
224
|
}, zt = (e) => {
|
|
225
225
|
const t = e.target;
|
|
226
226
|
return Vt(t);
|
|
227
227
|
}, Vt = (e) => {
|
|
228
228
|
let t;
|
|
229
|
-
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (
|
|
229
|
+
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!$e(t) || !Ae(t)) ? Vt(t) : t;
|
|
230
230
|
}, qt = (e) => {
|
|
231
231
|
const t = e.target;
|
|
232
|
-
return
|
|
233
|
-
},
|
|
232
|
+
return _t(t);
|
|
233
|
+
}, _t = (e) => {
|
|
234
234
|
let t;
|
|
235
|
-
return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (
|
|
235
|
+
return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!$e(t) || !Ae(t)) ? _t(t) : t;
|
|
236
236
|
}, Yt = (e) => {
|
|
237
237
|
const t = e.target.parentElement?.firstElementChild;
|
|
238
|
-
return t && (
|
|
238
|
+
return t && (!$e(t) || !Ae(t)) ? _t(t) : t;
|
|
239
239
|
}, Xt = (e) => {
|
|
240
240
|
const t = e.target.parentElement?.lastElementChild;
|
|
241
|
-
return t && (
|
|
242
|
-
},
|
|
241
|
+
return t && (!$e(t) || !Ae(t)) ? Vt(t) : t;
|
|
242
|
+
}, nt = ["alt", "control", "shift", "meta"], Xn = {
|
|
243
243
|
ArrowUp: "up",
|
|
244
244
|
ArrowDown: "down",
|
|
245
245
|
ArrowLeft: "left",
|
|
@@ -308,7 +308,7 @@ const Ae = (e) => {
|
|
|
308
308
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
309
309
|
}
|
|
310
310
|
};
|
|
311
|
-
function
|
|
311
|
+
function Pt(e) {
|
|
312
312
|
const t = (s) => {
|
|
313
313
|
let l = null;
|
|
314
314
|
return s.parent && (typeof s.parent == "string" ? l = document.querySelector(s.parent) : s.parent instanceof HTMLElement ? l = s.parent : l = s.parent.value), l;
|
|
@@ -332,37 +332,37 @@ function _t(e) {
|
|
|
332
332
|
}, o = (s) => {
|
|
333
333
|
const l = t(s);
|
|
334
334
|
let u = [];
|
|
335
|
-
return s.selectors ? u = n(s) : l && (u = Array.from(l.children).filter((i) =>
|
|
335
|
+
return s.selectors ? u = n(s) : l && (u = Array.from(l.children).filter((i) => $e(i) && Ae(i))), u;
|
|
336
336
|
}, a = (s) => (l) => {
|
|
337
337
|
const u = Xn[l.key] || l.key.toLowerCase();
|
|
338
|
-
if (
|
|
338
|
+
if (nt.includes(u)) return;
|
|
339
339
|
const i = s.handlers || wt;
|
|
340
|
-
for (const
|
|
341
|
-
const [
|
|
342
|
-
if (
|
|
343
|
-
const I = i[
|
|
344
|
-
const
|
|
345
|
-
return l.getModifierState(
|
|
340
|
+
for (const d of Object.keys(i)) {
|
|
341
|
+
const [m, ...p] = d.split(".");
|
|
342
|
+
if (m === "keydown" && p.includes(u)) {
|
|
343
|
+
const I = i[d], y = p.filter((f) => nt.includes(f)), k = nt.some((f) => {
|
|
344
|
+
const g = f.charAt(0).toUpperCase() + f.slice(1);
|
|
345
|
+
return l.getModifierState(g);
|
|
346
346
|
});
|
|
347
|
-
if (
|
|
348
|
-
if (
|
|
349
|
-
for (const f of
|
|
350
|
-
if (
|
|
351
|
-
const
|
|
352
|
-
l.getModifierState(
|
|
347
|
+
if (y.length > 0) {
|
|
348
|
+
if (k) {
|
|
349
|
+
for (const f of nt)
|
|
350
|
+
if (p.includes(f)) {
|
|
351
|
+
const g = f.charAt(0).toUpperCase() + f.slice(1);
|
|
352
|
+
l.getModifierState(g) && I(l);
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
} else
|
|
356
|
-
|
|
356
|
+
k || I(l);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
}, r = [];
|
|
360
360
|
Ee(() => {
|
|
361
361
|
for (const s of e) {
|
|
362
|
-
const l = t(s), u = o(s), i = a(s),
|
|
363
|
-
for (const
|
|
364
|
-
const { focused:
|
|
365
|
-
|
|
362
|
+
const l = t(s), u = o(s), i = a(s), d = l ? [l] : u;
|
|
363
|
+
for (const m of d) {
|
|
364
|
+
const { focused: p } = Gn(L(m)), I = ne(p, (y) => {
|
|
365
|
+
y ? m.addEventListener("keydown", i) : m.removeEventListener("keydown", i);
|
|
366
366
|
});
|
|
367
367
|
r.push(I);
|
|
368
368
|
}
|
|
@@ -373,18 +373,18 @@ function _t(e) {
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
function Ot(e, t) {
|
|
376
|
-
return mt() ? (
|
|
376
|
+
return mt() ? (pt(e, t), !0) : !1;
|
|
377
377
|
}
|
|
378
378
|
const vn = typeof window < "u" && typeof document < "u";
|
|
379
379
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
380
|
-
const jn = (e) => e != null, Jn = Object.prototype.toString, Qn = (e) => Jn.call(e) === "[object Object]",
|
|
380
|
+
const jn = (e) => e != null, Jn = Object.prototype.toString, Qn = (e) => Jn.call(e) === "[object Object]", Pe = () => {
|
|
381
381
|
};
|
|
382
382
|
function Kn(...e) {
|
|
383
383
|
if (e.length !== 1) return cn(...e);
|
|
384
384
|
const t = e[0];
|
|
385
385
|
return typeof t == "function" ? Rt(St(() => ({
|
|
386
386
|
get: t,
|
|
387
|
-
set:
|
|
387
|
+
set: Pe
|
|
388
388
|
}))) : L(t);
|
|
389
389
|
}
|
|
390
390
|
function eo(e, t) {
|
|
@@ -400,34 +400,34 @@ function eo(e, t) {
|
|
|
400
400
|
return n;
|
|
401
401
|
}
|
|
402
402
|
function to(e, t = {}) {
|
|
403
|
-
let n, o, a =
|
|
403
|
+
let n, o, a = Pe;
|
|
404
404
|
const r = (l) => {
|
|
405
|
-
clearTimeout(l), a(), a =
|
|
405
|
+
clearTimeout(l), a(), a = Pe;
|
|
406
406
|
};
|
|
407
407
|
let s;
|
|
408
408
|
return (l) => {
|
|
409
409
|
const u = E(e), i = E(t.maxWait);
|
|
410
|
-
return n && r(n), u <= 0 || i !== void 0 && i <= 0 ? (o && (r(o), o = void 0), Promise.resolve(l())) : new Promise((
|
|
411
|
-
a = t.rejectOnCancel ?
|
|
412
|
-
n && r(n), o = void 0,
|
|
410
|
+
return n && r(n), u <= 0 || i !== void 0 && i <= 0 ? (o && (r(o), o = void 0), Promise.resolve(l())) : new Promise((d, m) => {
|
|
411
|
+
a = t.rejectOnCancel ? m : d, s = l, i && !o && (o = setTimeout(() => {
|
|
412
|
+
n && r(n), o = void 0, d(s());
|
|
413
413
|
}, i)), n = setTimeout(() => {
|
|
414
|
-
o && r(o), o = void 0,
|
|
414
|
+
o && r(o), o = void 0, d(l());
|
|
415
415
|
}, u);
|
|
416
416
|
});
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function rt(e) {
|
|
420
420
|
return Array.isArray(e) ? e : [e];
|
|
421
421
|
}
|
|
422
422
|
function no(e) {
|
|
423
|
-
return
|
|
423
|
+
return ht();
|
|
424
424
|
}
|
|
425
425
|
// @__NO_SIDE_EFFECTS__
|
|
426
426
|
function oo(e, t = 200, n = {}) {
|
|
427
427
|
return eo(to(t, n), e);
|
|
428
428
|
}
|
|
429
429
|
function lo(e, t = {}) {
|
|
430
|
-
if (
|
|
430
|
+
if (!$n(e)) return Tn(e);
|
|
431
431
|
const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
432
432
|
for (const o in e.value) n[o] = St(() => ({
|
|
433
433
|
get() {
|
|
@@ -451,67 +451,67 @@ function lo(e, t = {}) {
|
|
|
451
451
|
return n;
|
|
452
452
|
}
|
|
453
453
|
function ao(e, t = !0, n) {
|
|
454
|
-
no() ? Ee(e, n) : t ? e() :
|
|
454
|
+
no() ? Ee(e, n) : t ? e() : vt(e);
|
|
455
455
|
}
|
|
456
456
|
function so(e, t, n) {
|
|
457
|
-
return
|
|
457
|
+
return ne(e, t, {
|
|
458
458
|
...n,
|
|
459
459
|
immediate: !0
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
|
-
const
|
|
462
|
+
const et = vn ? window : void 0;
|
|
463
463
|
function ye(e) {
|
|
464
464
|
var t;
|
|
465
465
|
const n = E(e);
|
|
466
466
|
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
467
467
|
}
|
|
468
468
|
function He(...e) {
|
|
469
|
-
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n =
|
|
470
|
-
const o =
|
|
469
|
+
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = T(() => {
|
|
470
|
+
const o = rt(E(e[0])).filter((a) => a != null);
|
|
471
471
|
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
472
472
|
});
|
|
473
473
|
return so(() => {
|
|
474
474
|
var o, a;
|
|
475
475
|
return [
|
|
476
|
-
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => ye(r))) !== null && o !== void 0 ? o : [
|
|
477
|
-
|
|
478
|
-
|
|
476
|
+
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => ye(r))) !== null && o !== void 0 ? o : [et].filter((r) => r != null),
|
|
477
|
+
rt(E(n.value ? e[1] : e[0])),
|
|
478
|
+
rt(V(n.value ? e[2] : e[1])),
|
|
479
479
|
E(n.value ? e[3] : e[2])
|
|
480
480
|
];
|
|
481
481
|
}, ([o, a, r, s], l, u) => {
|
|
482
482
|
if (!o?.length || !a?.length || !r?.length) return;
|
|
483
|
-
const i = Qn(s) ? { ...s } : s,
|
|
483
|
+
const i = Qn(s) ? { ...s } : s, d = o.flatMap((m) => a.flatMap((p) => r.map((I) => t(m, p, I, i))));
|
|
484
484
|
u(() => {
|
|
485
|
-
|
|
485
|
+
d.forEach((m) => m());
|
|
486
486
|
});
|
|
487
487
|
}, { flush: "post" });
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
const { window: o =
|
|
489
|
+
function Tt(e, t, n = {}) {
|
|
490
|
+
const { window: o = et, ignore: a = [], capture: r = !0, detectIframe: s = !1, controls: l = !1 } = n;
|
|
491
491
|
if (!o) return l ? {
|
|
492
|
-
stop:
|
|
493
|
-
cancel:
|
|
494
|
-
trigger:
|
|
495
|
-
} :
|
|
492
|
+
stop: Pe,
|
|
493
|
+
cancel: Pe,
|
|
494
|
+
trigger: Pe
|
|
495
|
+
} : Pe;
|
|
496
496
|
let u = !0;
|
|
497
|
-
const i = (f) => E(a).some((
|
|
498
|
-
if (typeof
|
|
497
|
+
const i = (f) => E(a).some((g) => {
|
|
498
|
+
if (typeof g == "string") return Array.from(o.document.querySelectorAll(g)).some((x) => x === f.target || f.composedPath().includes(x));
|
|
499
499
|
{
|
|
500
|
-
const
|
|
501
|
-
return
|
|
500
|
+
const x = ye(g);
|
|
501
|
+
return x && (f.target === x || f.composedPath().includes(x));
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
|
-
function
|
|
505
|
-
const
|
|
506
|
-
return
|
|
504
|
+
function d(f) {
|
|
505
|
+
const g = E(f);
|
|
506
|
+
return g && g.$.subTree.shapeFlag === 16;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
const
|
|
510
|
-
return C == null || !Array.isArray(C) ? !1 : C.some((
|
|
508
|
+
function m(f, g) {
|
|
509
|
+
const x = E(f), C = x.$.subTree && x.$.subTree.children;
|
|
510
|
+
return C == null || !Array.isArray(C) ? !1 : C.some(($) => $.el === g.target || g.composedPath().includes($.el));
|
|
511
511
|
}
|
|
512
|
-
const
|
|
513
|
-
const
|
|
514
|
-
if (f.target != null && !(!(
|
|
512
|
+
const p = (f) => {
|
|
513
|
+
const g = ye(e);
|
|
514
|
+
if (f.target != null && !(!(g instanceof Element) && d(e) && m(e, f)) && !(!g || g === f.target || f.composedPath().includes(g))) {
|
|
515
515
|
if ("detail" in f && f.detail === 0 && (u = !i(f)), !u) {
|
|
516
516
|
u = !0;
|
|
517
517
|
return;
|
|
@@ -520,72 +520,72 @@ function $t(e, t, n = {}) {
|
|
|
520
520
|
}
|
|
521
521
|
};
|
|
522
522
|
let I = !1;
|
|
523
|
-
const
|
|
523
|
+
const y = [
|
|
524
524
|
He(o, "click", (f) => {
|
|
525
525
|
I || (I = !0, setTimeout(() => {
|
|
526
526
|
I = !1;
|
|
527
|
-
}, 0),
|
|
527
|
+
}, 0), p(f));
|
|
528
528
|
}, {
|
|
529
529
|
passive: !0,
|
|
530
530
|
capture: r
|
|
531
531
|
}),
|
|
532
532
|
He(o, "pointerdown", (f) => {
|
|
533
|
-
const
|
|
534
|
-
u = !i(f) && !!(
|
|
533
|
+
const g = ye(e);
|
|
534
|
+
u = !i(f) && !!(g && !f.composedPath().includes(g));
|
|
535
535
|
}, { passive: !0 }),
|
|
536
536
|
s && He(o, "blur", (f) => {
|
|
537
537
|
setTimeout(() => {
|
|
538
|
-
var
|
|
539
|
-
const
|
|
540
|
-
((
|
|
538
|
+
var g;
|
|
539
|
+
const x = ye(e);
|
|
540
|
+
((g = o.document.activeElement) === null || g === void 0 ? void 0 : g.tagName) === "IFRAME" && !x?.contains(o.document.activeElement) && t(f);
|
|
541
541
|
}, 0);
|
|
542
542
|
}, { passive: !0 })
|
|
543
|
-
].filter(Boolean),
|
|
543
|
+
].filter(Boolean), k = () => y.forEach((f) => f());
|
|
544
544
|
return l ? {
|
|
545
|
-
stop:
|
|
545
|
+
stop: k,
|
|
546
546
|
cancel: () => {
|
|
547
547
|
u = !1;
|
|
548
548
|
},
|
|
549
549
|
trigger: (f) => {
|
|
550
|
-
u = !0,
|
|
550
|
+
u = !0, p(f), u = !1;
|
|
551
551
|
}
|
|
552
|
-
} :
|
|
552
|
+
} : k;
|
|
553
553
|
}
|
|
554
554
|
// @__NO_SIDE_EFFECTS__
|
|
555
555
|
function ro() {
|
|
556
|
-
const e =
|
|
556
|
+
const e = ue(!1), t = ht();
|
|
557
557
|
return t && Ee(() => {
|
|
558
558
|
e.value = !0;
|
|
559
559
|
}, t), e;
|
|
560
560
|
}
|
|
561
561
|
// @__NO_SIDE_EFFECTS__
|
|
562
|
-
function
|
|
562
|
+
function mn(e) {
|
|
563
563
|
const t = /* @__PURE__ */ ro();
|
|
564
|
-
return
|
|
564
|
+
return T(() => (t.value, !!e()));
|
|
565
565
|
}
|
|
566
|
-
function
|
|
567
|
-
const { window: o =
|
|
566
|
+
function pn(e, t, n = {}) {
|
|
567
|
+
const { window: o = et, ...a } = n;
|
|
568
568
|
let r;
|
|
569
|
-
const s = /* @__PURE__ */
|
|
569
|
+
const s = /* @__PURE__ */ mn(() => o && "MutationObserver" in o), l = () => {
|
|
570
570
|
r && (r.disconnect(), r = void 0);
|
|
571
|
-
}, u =
|
|
572
|
-
const
|
|
573
|
-
return new Set(
|
|
574
|
-
}), (
|
|
575
|
-
l(), s.value &&
|
|
571
|
+
}, u = ne(T(() => {
|
|
572
|
+
const m = rt(E(e)).map(ye).filter(jn);
|
|
573
|
+
return new Set(m);
|
|
574
|
+
}), (m) => {
|
|
575
|
+
l(), s.value && m.size && (r = new MutationObserver(t), m.forEach((p) => r.observe(p, a)));
|
|
576
576
|
}, {
|
|
577
577
|
immediate: !0,
|
|
578
578
|
flush: "post"
|
|
579
|
-
}), i = () => r?.takeRecords(),
|
|
579
|
+
}), i = () => r?.takeRecords(), d = () => {
|
|
580
580
|
u(), l();
|
|
581
581
|
};
|
|
582
|
-
return Ot(
|
|
582
|
+
return Ot(d), {
|
|
583
583
|
isSupported: s,
|
|
584
|
-
stop:
|
|
584
|
+
stop: d,
|
|
585
585
|
takeRecords: i
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
const
|
|
588
|
+
const ot = {
|
|
589
589
|
speed: 2,
|
|
590
590
|
margin: 30,
|
|
591
591
|
direction: "both"
|
|
@@ -595,21 +595,21 @@ function io(e) {
|
|
|
595
595
|
}
|
|
596
596
|
function yt(e, t = {}) {
|
|
597
597
|
var n, o, a, r;
|
|
598
|
-
const { pointerTypes: s, preventDefault: l, stopPropagation: u, exact: i, onMove:
|
|
598
|
+
const { pointerTypes: s, preventDefault: l, stopPropagation: u, exact: i, onMove: d, onEnd: m, onStart: p, initialValue: I, axis: y = "both", draggingElement: k = et, containerElement: f, handle: g = e, buttons: x = [0], restrictInView: C, autoScroll: $ = !1 } = t, R = L((n = E(I)) !== null && n !== void 0 ? n : {
|
|
599
599
|
x: 0,
|
|
600
600
|
y: 0
|
|
601
|
-
}), S = L(), O = (D) => s ? s.includes(D.pointerType) : !0,
|
|
601
|
+
}), S = L(), O = (D) => s ? s.includes(D.pointerType) : !0, W = (D) => {
|
|
602
602
|
E(l) && D.preventDefault(), E(u) && D.stopPropagation();
|
|
603
|
-
},
|
|
604
|
-
speed: (o = E(
|
|
605
|
-
margin: (a = E(
|
|
606
|
-
direction: (r =
|
|
607
|
-
} :
|
|
608
|
-
const { clientWidth:
|
|
609
|
-
let
|
|
610
|
-
(
|
|
611
|
-
left:
|
|
612
|
-
top:
|
|
603
|
+
}, me = E($), j = typeof me == "object" ? {
|
|
604
|
+
speed: (o = E(me.speed)) !== null && o !== void 0 ? o : ot.speed,
|
|
605
|
+
margin: (a = E(me.margin)) !== null && a !== void 0 ? a : ot.margin,
|
|
606
|
+
direction: (r = me.direction) !== null && r !== void 0 ? r : ot.direction
|
|
607
|
+
} : ot, J = (D) => typeof D == "number" ? [D, D] : [D.x, D.y], ge = (D, F, G) => {
|
|
608
|
+
const { clientWidth: Q, clientHeight: q, scrollLeft: re, scrollTop: ke, scrollWidth: Le, scrollHeight: P } = D, [B, z] = J(j.margin), [ee, le] = J(j.speed);
|
|
609
|
+
let te = 0, ie = 0;
|
|
610
|
+
(j.direction === "x" || j.direction === "both") && (G.x < B && re > 0 ? te = -ee : G.x + F.width > Q - B && re < Le - Q && (te = ee)), (j.direction === "y" || j.direction === "both") && (G.y < z && ke > 0 ? ie = -le : G.y + F.height > q - z && ke < P - q && (ie = le)), (te || ie) && D.scrollBy({
|
|
611
|
+
left: te,
|
|
612
|
+
top: ie,
|
|
613
613
|
behavior: "auto"
|
|
614
614
|
});
|
|
615
615
|
};
|
|
@@ -617,61 +617,61 @@ function yt(e, t = {}) {
|
|
|
617
617
|
const Oe = () => {
|
|
618
618
|
const D = E(f);
|
|
619
619
|
D && !de && (de = setInterval(() => {
|
|
620
|
-
const F = E(e).getBoundingClientRect(), { x:
|
|
621
|
-
x:
|
|
622
|
-
y:
|
|
620
|
+
const F = E(e).getBoundingClientRect(), { x: G, y: Q } = R.value, q = {
|
|
621
|
+
x: G - D.scrollLeft,
|
|
622
|
+
y: Q - D.scrollTop
|
|
623
623
|
};
|
|
624
|
-
|
|
624
|
+
q.x >= 0 && q.y >= 0 && (ge(D, F, q), q.x += D.scrollLeft, q.y += D.scrollTop, R.value = q);
|
|
625
625
|
}, 1e3 / 60));
|
|
626
626
|
}, Re = () => {
|
|
627
627
|
de && (clearInterval(de), de = null);
|
|
628
|
-
}, Ye = (D, F,
|
|
629
|
-
const [
|
|
630
|
-
return D.x <
|
|
628
|
+
}, Ye = (D, F, G, Q) => {
|
|
629
|
+
const [q, re] = typeof G == "number" ? [G, G] : [G.x, G.y], { clientWidth: ke, clientHeight: Le } = F;
|
|
630
|
+
return D.x < q || D.x + Q.width > ke - q || D.y < re || D.y + Q.height > Le - re;
|
|
631
631
|
}, Xe = () => {
|
|
632
632
|
if (E(t.disabled) || !S.value) return;
|
|
633
633
|
const D = E(f);
|
|
634
634
|
if (!D) return;
|
|
635
|
-
const F = E(e).getBoundingClientRect(), { x:
|
|
635
|
+
const F = E(e).getBoundingClientRect(), { x: G, y: Q } = R.value;
|
|
636
636
|
Ye({
|
|
637
|
-
x:
|
|
638
|
-
y:
|
|
639
|
-
}, D,
|
|
637
|
+
x: G - D.scrollLeft,
|
|
638
|
+
y: Q - D.scrollTop
|
|
639
|
+
}, D, j.margin, F) ? Oe() : Re();
|
|
640
640
|
};
|
|
641
|
-
E(
|
|
641
|
+
E($) && ne(R, Xe);
|
|
642
642
|
const Be = (D) => {
|
|
643
643
|
var F;
|
|
644
|
-
if (!E(
|
|
645
|
-
const
|
|
646
|
-
x: D.clientX - (
|
|
647
|
-
y: D.clientY - (
|
|
644
|
+
if (!E(x).includes(D.button) || E(t.disabled) || !O(D) || E(i) && D.target !== E(e)) return;
|
|
645
|
+
const G = E(f), Q = G == null || (F = G.getBoundingClientRect) === null || F === void 0 ? void 0 : F.call(G), q = E(e).getBoundingClientRect(), re = {
|
|
646
|
+
x: D.clientX - (G ? q.left - Q.left + ($ ? 0 : G.scrollLeft) : q.left),
|
|
647
|
+
y: D.clientY - (G ? q.top - Q.top + ($ ? 0 : G.scrollTop) : q.top)
|
|
648
648
|
};
|
|
649
|
-
|
|
649
|
+
p?.(re, D) !== !1 && (S.value = re, W(D));
|
|
650
650
|
}, je = (D) => {
|
|
651
651
|
if (E(t.disabled) || !O(D) || !S.value) return;
|
|
652
652
|
const F = E(f);
|
|
653
653
|
F instanceof HTMLElement && io(F);
|
|
654
|
-
const
|
|
655
|
-
let { x:
|
|
656
|
-
if ((
|
|
657
|
-
x:
|
|
658
|
-
y:
|
|
659
|
-
}),
|
|
660
|
-
if (
|
|
661
|
-
const
|
|
662
|
-
|
|
654
|
+
const G = E(e).getBoundingClientRect();
|
|
655
|
+
let { x: Q, y: q } = R.value;
|
|
656
|
+
if ((y === "x" || y === "both") && (Q = D.clientX - S.value.x, F && (Q = Math.min(Math.max(0, Q), F.scrollWidth - G.width))), (y === "y" || y === "both") && (q = D.clientY - S.value.y, F && (q = Math.min(Math.max(0, q), F.scrollHeight - G.height))), E($) && F && (de === null && ge(F, G, {
|
|
657
|
+
x: Q,
|
|
658
|
+
y: q
|
|
659
|
+
}), Q += F.scrollLeft, q += F.scrollTop), F && (C || $)) {
|
|
660
|
+
if (y !== "y") {
|
|
661
|
+
const re = Q - F.scrollLeft;
|
|
662
|
+
re < 0 ? Q = F.scrollLeft : re > F.clientWidth - G.width && (Q = F.clientWidth - G.width + F.scrollLeft);
|
|
663
663
|
}
|
|
664
|
-
if (
|
|
665
|
-
const
|
|
666
|
-
|
|
664
|
+
if (y !== "x") {
|
|
665
|
+
const re = q - F.scrollTop;
|
|
666
|
+
re < 0 ? q = F.scrollTop : re > F.clientHeight - G.height && (q = F.clientHeight - G.height + F.scrollTop);
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
669
|
R.value = {
|
|
670
|
-
x:
|
|
671
|
-
y:
|
|
672
|
-
},
|
|
670
|
+
x: Q,
|
|
671
|
+
y: q
|
|
672
|
+
}, d?.(R.value, D), W(D);
|
|
673
673
|
}, Fe = (D) => {
|
|
674
|
-
E(t.disabled) || !O(D) || S.value && (S.value = void 0,
|
|
674
|
+
E(t.disabled) || !O(D) || S.value && (S.value = void 0, $ && Re(), m?.(R.value, D), W(D));
|
|
675
675
|
};
|
|
676
676
|
if (vn) {
|
|
677
677
|
const D = () => {
|
|
@@ -681,31 +681,31 @@ function yt(e, t = {}) {
|
|
|
681
681
|
passive: !E(l)
|
|
682
682
|
};
|
|
683
683
|
};
|
|
684
|
-
He(
|
|
684
|
+
He(g, "pointerdown", Be, D), He(k, "pointermove", je, D), He(k, "pointerup", Fe, D);
|
|
685
685
|
}
|
|
686
686
|
return {
|
|
687
687
|
...lo(R),
|
|
688
688
|
position: R,
|
|
689
|
-
isDragging:
|
|
690
|
-
style:
|
|
689
|
+
isDragging: T(() => !!S.value),
|
|
690
|
+
style: T(() => `
|
|
691
691
|
left: ${R.value.x}px;
|
|
692
692
|
top: ${R.value.y}px;
|
|
693
|
-
${
|
|
693
|
+
${$ ? "text-wrap: nowrap;" : ""}
|
|
694
694
|
`)
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
|
-
function
|
|
698
|
-
const { window: o =
|
|
697
|
+
function dt(e, t, n = {}) {
|
|
698
|
+
const { window: o = et, ...a } = n;
|
|
699
699
|
let r;
|
|
700
|
-
const s = /* @__PURE__ */
|
|
700
|
+
const s = /* @__PURE__ */ mn(() => o && "ResizeObserver" in o), l = () => {
|
|
701
701
|
r && (r.disconnect(), r = void 0);
|
|
702
|
-
}, u =
|
|
703
|
-
const
|
|
704
|
-
return Array.isArray(
|
|
705
|
-
}), (
|
|
702
|
+
}, u = ne(T(() => {
|
|
703
|
+
const d = E(e);
|
|
704
|
+
return Array.isArray(d) ? d.map((m) => ye(m)) : [ye(d)];
|
|
705
|
+
}), (d) => {
|
|
706
706
|
if (l(), s.value && o) {
|
|
707
707
|
r = new ResizeObserver(t);
|
|
708
|
-
for (const
|
|
708
|
+
for (const m of d) m && r.observe(m, a);
|
|
709
709
|
}
|
|
710
710
|
}, {
|
|
711
711
|
immediate: !0,
|
|
@@ -718,21 +718,21 @@ function ft(e, t, n = {}) {
|
|
|
718
718
|
stop: i
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
const { reset: n = !0, windowResize: o = !0, windowScroll: a = !0, immediate: r = !0, updateTiming: s = "sync" } = t, l =
|
|
723
|
-
function
|
|
724
|
-
const
|
|
725
|
-
if (!
|
|
726
|
-
n && (l.value = 0, u.value = 0, i.value = 0,
|
|
721
|
+
function _e(e, t = {}) {
|
|
722
|
+
const { reset: n = !0, windowResize: o = !0, windowScroll: a = !0, immediate: r = !0, updateTiming: s = "sync" } = t, l = ue(0), u = ue(0), i = ue(0), d = ue(0), m = ue(0), p = ue(0), I = ue(0), y = ue(0);
|
|
723
|
+
function k() {
|
|
724
|
+
const g = ye(e);
|
|
725
|
+
if (!g) {
|
|
726
|
+
n && (l.value = 0, u.value = 0, i.value = 0, d.value = 0, m.value = 0, p.value = 0, I.value = 0, y.value = 0);
|
|
727
727
|
return;
|
|
728
728
|
}
|
|
729
|
-
const
|
|
730
|
-
l.value =
|
|
729
|
+
const x = g.getBoundingClientRect();
|
|
730
|
+
l.value = x.height, u.value = x.bottom, i.value = x.left, d.value = x.right, m.value = x.top, p.value = x.width, I.value = x.x, y.value = x.y;
|
|
731
731
|
}
|
|
732
732
|
function f() {
|
|
733
|
-
s === "sync" ?
|
|
733
|
+
s === "sync" ? k() : s === "next-frame" && requestAnimationFrame(() => k());
|
|
734
734
|
}
|
|
735
|
-
return
|
|
735
|
+
return dt(e, f), ne(() => ye(e), (g) => !g && f()), pn(e, f, { attributeFilter: ["style", "class"] }), a && He("scroll", f, {
|
|
736
736
|
capture: !0,
|
|
737
737
|
passive: !0
|
|
738
738
|
}), o && He("resize", f, { passive: !0 }), ao(() => {
|
|
@@ -741,37 +741,37 @@ function Pe(e, t = {}) {
|
|
|
741
741
|
height: l,
|
|
742
742
|
bottom: u,
|
|
743
743
|
left: i,
|
|
744
|
-
right:
|
|
745
|
-
top:
|
|
746
|
-
width:
|
|
744
|
+
right: d,
|
|
745
|
+
top: m,
|
|
746
|
+
width: p,
|
|
747
747
|
x: I,
|
|
748
|
-
y
|
|
748
|
+
y,
|
|
749
749
|
update: f
|
|
750
750
|
};
|
|
751
751
|
}
|
|
752
|
-
function
|
|
752
|
+
function bt(e) {
|
|
753
753
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
754
754
|
}
|
|
755
|
-
const
|
|
755
|
+
const xt = /* @__PURE__ */ new WeakMap();
|
|
756
756
|
function uo(e, t = !1) {
|
|
757
|
-
const n =
|
|
757
|
+
const n = ue(t);
|
|
758
758
|
let o = "";
|
|
759
|
-
|
|
760
|
-
const l =
|
|
759
|
+
ne(Kn(e), (s) => {
|
|
760
|
+
const l = bt(E(s));
|
|
761
761
|
if (l) {
|
|
762
762
|
const u = l;
|
|
763
|
-
if (
|
|
763
|
+
if (xt.get(u) || xt.set(u, u.style.overflow), u.style.overflow !== "hidden" && (o = u.style.overflow), u.style.overflow === "hidden") return n.value = !0;
|
|
764
764
|
if (n.value) return u.style.overflow = "hidden";
|
|
765
765
|
}
|
|
766
766
|
}, { immediate: !0 });
|
|
767
767
|
const a = () => {
|
|
768
|
-
const s =
|
|
768
|
+
const s = bt(E(e));
|
|
769
769
|
!s || n.value || (s.style.overflow = "hidden", n.value = !0);
|
|
770
770
|
}, r = () => {
|
|
771
|
-
const s =
|
|
772
|
-
!s || !n.value || (s.style.overflow = o,
|
|
771
|
+
const s = bt(E(e));
|
|
772
|
+
!s || !n.value || (s.style.overflow = o, xt.delete(s), n.value = !1);
|
|
773
773
|
};
|
|
774
|
-
return Ot(r),
|
|
774
|
+
return Ot(r), T({
|
|
775
775
|
get() {
|
|
776
776
|
return n.value;
|
|
777
777
|
},
|
|
@@ -783,7 +783,7 @@ function uo(e, t = !1) {
|
|
|
783
783
|
const co = (e) => {
|
|
784
784
|
const t = new DOMParser().parseFromString(e, "text/html");
|
|
785
785
|
return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
|
|
786
|
-
}, fo = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), vo = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"],
|
|
786
|
+
}, fo = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), vo = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], mo = ["innerHTML"], po = { key: 2 }, ho = /* @__PURE__ */ oe({
|
|
787
787
|
__name: "ACell",
|
|
788
788
|
props: {
|
|
789
789
|
colIndex: {},
|
|
@@ -795,35 +795,35 @@ const co = (e) => {
|
|
|
795
795
|
debounce: { default: 300 }
|
|
796
796
|
},
|
|
797
797
|
setup(e, { expose: t }) {
|
|
798
|
-
const n = fe("cell"), o = e.store.getCellData(e.colIndex, e.rowIndex), a = L(""), r = L(!1), s = e.store.columns[e.colIndex], l = e.store.rows[e.rowIndex], u = s.align || "center", i = s.width || "40ch",
|
|
798
|
+
const n = fe("cell"), o = e.store.getCellData(e.colIndex, e.rowIndex), a = L(""), r = L(!1), s = e.store.columns[e.colIndex], l = e.store.rows[e.rowIndex], u = s.align || "center", i = s.width || "40ch", d = T(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), m = T(() => typeof d.value == "string" ? co(d.value) : !1), p = T(() => ({
|
|
799
799
|
textAlign: u,
|
|
800
800
|
width: i,
|
|
801
801
|
fontWeight: r.value ? "bold" : "inherit",
|
|
802
802
|
paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
|
|
803
|
-
})), I =
|
|
803
|
+
})), I = T(() => ({
|
|
804
804
|
"sticky-column": e.pinned,
|
|
805
805
|
"cell-modified": r.value
|
|
806
|
-
})),
|
|
807
|
-
f(),
|
|
808
|
-
},
|
|
809
|
-
const { left: S, bottom: O, width:
|
|
810
|
-
s.mask, s.modalComponent && e.store.$patch((
|
|
811
|
-
|
|
806
|
+
})), y = () => {
|
|
807
|
+
f(), k();
|
|
808
|
+
}, k = () => {
|
|
809
|
+
const { left: S, bottom: O, width: W, height: me } = _e(n);
|
|
810
|
+
s.mask, s.modalComponent && e.store.$patch((j) => {
|
|
811
|
+
j.modal.visible = !0, j.modal.colIndex = e.colIndex, j.modal.rowIndex = e.rowIndex, j.modal.left = S, j.modal.bottom = O, j.modal.width = W, j.modal.height = me, j.modal.cell = n.value, typeof s.modalComponent == "function" ? j.modal.component = s.modalComponent({ table: j.table, row: l, column: s }) : j.modal.component = s.modalComponent, j.modal.componentProps = s.modalComponentExtraProps;
|
|
812
812
|
});
|
|
813
813
|
};
|
|
814
814
|
if (e.addNavigation) {
|
|
815
815
|
let S = {
|
|
816
816
|
...wt,
|
|
817
|
-
"keydown.f2":
|
|
818
|
-
"keydown.alt.up":
|
|
819
|
-
"keydown.alt.down":
|
|
820
|
-
"keydown.alt.left":
|
|
821
|
-
"keydown.alt.right":
|
|
817
|
+
"keydown.f2": k,
|
|
818
|
+
"keydown.alt.up": k,
|
|
819
|
+
"keydown.alt.down": k,
|
|
820
|
+
"keydown.alt.left": k,
|
|
821
|
+
"keydown.alt.right": k
|
|
822
822
|
};
|
|
823
823
|
typeof e.addNavigation == "object" && (S = {
|
|
824
824
|
...S,
|
|
825
825
|
...e.addNavigation
|
|
826
|
-
}),
|
|
826
|
+
}), Pt([
|
|
827
827
|
{
|
|
828
828
|
selectors: n,
|
|
829
829
|
handlers: S
|
|
@@ -840,15 +840,15 @@ const co = (e) => {
|
|
|
840
840
|
} catch {
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
|
-
}, h = () => {
|
|
844
|
-
n.value && (a.value = n.value.textContent, f());
|
|
845
843
|
}, g = () => {
|
|
844
|
+
n.value && (a.value = n.value.textContent, f());
|
|
845
|
+
}, x = () => {
|
|
846
846
|
try {
|
|
847
847
|
const S = window.getSelection();
|
|
848
848
|
if (S && S.rangeCount > 0 && n.value) {
|
|
849
|
-
const O = S.getRangeAt(0),
|
|
850
|
-
if (
|
|
851
|
-
return
|
|
849
|
+
const O = S.getRangeAt(0), W = O.cloneRange();
|
|
850
|
+
if (W.selectNodeContents && W.setEnd)
|
|
851
|
+
return W.selectNodeContents(n.value), W.setEnd(O.endContainer, O.endOffset), W.toString().length;
|
|
852
852
|
}
|
|
853
853
|
} catch {
|
|
854
854
|
}
|
|
@@ -858,34 +858,34 @@ const co = (e) => {
|
|
|
858
858
|
try {
|
|
859
859
|
const O = window.getSelection();
|
|
860
860
|
if (!O) return;
|
|
861
|
-
let
|
|
862
|
-
const
|
|
863
|
-
if (!
|
|
864
|
-
let
|
|
865
|
-
for (;
|
|
866
|
-
const ge =
|
|
867
|
-
if (S <= de && (
|
|
868
|
-
|
|
861
|
+
let W = 0;
|
|
862
|
+
const me = document.createTreeWalker ? document.createTreeWalker(n.value, NodeFilter.SHOW_TEXT, null) : null;
|
|
863
|
+
if (!me) return;
|
|
864
|
+
let j, J = null;
|
|
865
|
+
for (; j = me.nextNode(); ) {
|
|
866
|
+
const ge = j, de = W + ge.textContent.length;
|
|
867
|
+
if (S <= de && (J = document.createRange(), J.setStart && J.setEnd)) {
|
|
868
|
+
J.setStart(ge, S - W), J.setEnd(ge, S - W);
|
|
869
869
|
break;
|
|
870
870
|
}
|
|
871
|
-
|
|
871
|
+
W = de;
|
|
872
872
|
}
|
|
873
|
-
|
|
873
|
+
J && O.removeAllRanges && O.addRange && (O.removeAllRanges(), O.addRange(J));
|
|
874
874
|
} catch {
|
|
875
875
|
}
|
|
876
|
-
},
|
|
876
|
+
}, $ = (S) => {
|
|
877
877
|
if (!s.edit) return;
|
|
878
878
|
const O = S.target;
|
|
879
879
|
if (O.textContent === a.value)
|
|
880
880
|
return;
|
|
881
|
-
const
|
|
882
|
-
a.value = O.textContent, s.format ? (r.value = O.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, o), e.store.setCellText(e.colIndex, e.rowIndex, O.textContent)) : (r.value = O.textContent !== o, e.store.setCellData(e.colIndex, e.rowIndex, O.textContent)),
|
|
883
|
-
C(
|
|
881
|
+
const W = x();
|
|
882
|
+
a.value = O.textContent, s.format ? (r.value = O.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, o), e.store.setCellText(e.colIndex, e.rowIndex, O.textContent)) : (r.value = O.textContent !== o, e.store.setCellData(e.colIndex, e.rowIndex, O.textContent)), vt().then(() => {
|
|
883
|
+
C(W);
|
|
884
884
|
});
|
|
885
|
-
}, R = /* @__PURE__ */ oo(
|
|
885
|
+
}, R = /* @__PURE__ */ oo($, e.debounce);
|
|
886
886
|
return t({
|
|
887
887
|
currentData: a
|
|
888
|
-
}), (S, O) => (
|
|
888
|
+
}), (S, O) => (h(), b("td", {
|
|
889
889
|
ref: "cell",
|
|
890
890
|
"data-colindex": e.colIndex,
|
|
891
891
|
"data-rowindex": e.rowIndex,
|
|
@@ -893,24 +893,24 @@ const co = (e) => {
|
|
|
893
893
|
contenteditable: V(s).edit,
|
|
894
894
|
tabindex: e.tabIndex,
|
|
895
895
|
spellcheck: !1,
|
|
896
|
-
style:
|
|
897
|
-
class:
|
|
898
|
-
onFocus:
|
|
899
|
-
onPaste:
|
|
896
|
+
style: be(p.value),
|
|
897
|
+
class: se(["atable-cell", I.value]),
|
|
898
|
+
onFocus: g,
|
|
899
|
+
onPaste: $,
|
|
900
900
|
onInput: O[0] || (O[0] = //@ts-ignore
|
|
901
|
-
(...
|
|
902
|
-
onClick:
|
|
901
|
+
(...W) => V(R) && V(R)(...W)),
|
|
902
|
+
onClick: y
|
|
903
903
|
}, [
|
|
904
|
-
V(s).cellComponent ? (
|
|
904
|
+
V(s).cellComponent ? (h(), pe(Ue(V(s).cellComponent), ft({
|
|
905
905
|
key: 0,
|
|
906
|
-
value:
|
|
907
|
-
}, V(s).cellComponentProps), null, 16, ["value"])) :
|
|
906
|
+
value: d.value
|
|
907
|
+
}, V(s).cellComponentProps), null, 16, ["value"])) : m.value ? (h(), b("span", {
|
|
908
908
|
key: 1,
|
|
909
|
-
innerHTML:
|
|
910
|
-
}, null, 8,
|
|
909
|
+
innerHTML: d.value
|
|
910
|
+
}, null, 8, mo)) : (h(), b("span", po, N(d.value), 1))
|
|
911
911
|
], 46, vo));
|
|
912
912
|
}
|
|
913
|
-
}), go = ["tabindex"], wo = ["tabindex"], yo = ["colspan"],
|
|
913
|
+
}), go = ["tabindex"], wo = ["tabindex"], yo = ["colspan"], bo = /* @__PURE__ */ oe({
|
|
914
914
|
__name: "AExpansionRow",
|
|
915
915
|
props: {
|
|
916
916
|
rowIndex: {},
|
|
@@ -919,47 +919,47 @@ const co = (e) => {
|
|
|
919
919
|
addNavigation: { type: [Boolean, Object], default: () => wt }
|
|
920
920
|
},
|
|
921
921
|
setup(e) {
|
|
922
|
-
const t = fe("rowEl"), n =
|
|
922
|
+
const t = fe("rowEl"), n = T(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
|
|
923
923
|
if (e.addNavigation) {
|
|
924
924
|
const o = {
|
|
925
925
|
"keydown.control.g": (a) => {
|
|
926
926
|
a.stopPropagation(), a.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
|
|
927
927
|
}
|
|
928
928
|
};
|
|
929
|
-
typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation),
|
|
929
|
+
typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation), Pt([
|
|
930
930
|
{
|
|
931
931
|
selectors: t,
|
|
932
932
|
handlers: o
|
|
933
933
|
}
|
|
934
934
|
]);
|
|
935
935
|
}
|
|
936
|
-
return (o, a) => (
|
|
937
|
-
|
|
936
|
+
return (o, a) => (h(), b(X, null, [
|
|
937
|
+
w("tr", ft(o.$attrs, {
|
|
938
938
|
ref: "rowEl",
|
|
939
939
|
tabindex: e.tabIndex,
|
|
940
940
|
class: "expandable-row"
|
|
941
941
|
}), [
|
|
942
|
-
|
|
942
|
+
w("td", {
|
|
943
943
|
tabIndex: -1,
|
|
944
944
|
class: "row-index",
|
|
945
945
|
onClick: a[0] || (a[0] = (r) => e.store.toggleRowExpand(e.rowIndex))
|
|
946
|
-
},
|
|
946
|
+
}, N(n.value), 1),
|
|
947
947
|
he(o.$slots, "row", {}, void 0, !0)
|
|
948
948
|
], 16, go),
|
|
949
|
-
e.store.display[e.rowIndex].expanded ? (
|
|
949
|
+
e.store.display[e.rowIndex].expanded ? (h(), b("tr", {
|
|
950
950
|
key: 0,
|
|
951
951
|
ref: "rowExpanded",
|
|
952
952
|
tabindex: e.tabIndex,
|
|
953
953
|
class: "expanded-row"
|
|
954
954
|
}, [
|
|
955
|
-
|
|
955
|
+
w("td", {
|
|
956
956
|
tabIndex: -1,
|
|
957
957
|
colspan: e.store.columns.length + 1,
|
|
958
958
|
class: "expanded-row-content"
|
|
959
959
|
}, [
|
|
960
960
|
he(o.$slots, "content", {}, void 0, !0)
|
|
961
961
|
], 8, yo)
|
|
962
|
-
], 8, wo)) :
|
|
962
|
+
], 8, wo)) : Y("", !0)
|
|
963
963
|
], 64));
|
|
964
964
|
}
|
|
965
965
|
}), Ve = (e, t) => {
|
|
@@ -967,13 +967,13 @@ const co = (e) => {
|
|
|
967
967
|
for (const [o, a] of t)
|
|
968
968
|
n[o] = a;
|
|
969
969
|
return n;
|
|
970
|
-
},
|
|
970
|
+
}, xo = /* @__PURE__ */ Ve(bo, [["__scopeId", "data-v-a42297c7"]]), ko = ["colspan"], Io = {
|
|
971
971
|
ref: "container",
|
|
972
972
|
class: "gantt-container"
|
|
973
973
|
}, Mo = ["data-rowindex", "data-colindex"], Co = {
|
|
974
974
|
key: 2,
|
|
975
975
|
class: "gantt-label"
|
|
976
|
-
}, Eo = ["x1", "y1", "x2", "y2"], Ao = /* @__PURE__ */
|
|
976
|
+
}, Eo = ["x1", "y1", "x2", "y2"], Ao = /* @__PURE__ */ oe({
|
|
977
977
|
__name: "AGanttCell",
|
|
978
978
|
props: {
|
|
979
979
|
store: {},
|
|
@@ -988,18 +988,18 @@ const co = (e) => {
|
|
|
988
988
|
},
|
|
989
989
|
emits: ["connection:create"],
|
|
990
990
|
setup(e, { expose: t, emit: n }) {
|
|
991
|
-
En((
|
|
991
|
+
En((P) => ({
|
|
992
992
|
v6d722296: a.value,
|
|
993
|
-
v260b36f8:
|
|
993
|
+
v260b36f8: P.colspan
|
|
994
994
|
}));
|
|
995
|
-
const o = n, a = L(e.color.length >= 6 ? e.color : "#cccccc"), r = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, s = fe("container"), l = fe("bar"), u = fe("leftResizeHandle"), i = fe("rightResizeHandle"),
|
|
996
|
-
const
|
|
995
|
+
const o = n, a = L(e.color.length >= 6 ? e.color : "#cccccc"), r = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, s = fe("container"), l = fe("bar"), u = fe("leftResizeHandle"), i = fe("rightResizeHandle"), d = fe("leftConnectionHandle"), m = fe("rightConnectionHandle"), { width: p } = _e(s), { left: I, right: y } = _e(l), k = L(e.start), f = L(e.end || k.value + e.colspan), g = L(!1), x = L(!1), C = L(!1), $ = L(!1), R = L(!1), S = L({ startX: 0, startY: 0, endX: 0, endY: 0 }), O = T(() => Oe.value || ge.value || de.value), W = T(() => e.colspan > 0 ? p.value / e.colspan : 0), me = T(() => {
|
|
996
|
+
const P = k.value / e.colspan * 100, B = f.value / e.colspan * 100;
|
|
997
997
|
return {
|
|
998
|
-
left: `${
|
|
999
|
-
width: `${B -
|
|
998
|
+
left: `${P}%`,
|
|
999
|
+
width: `${B - P}%`,
|
|
1000
1000
|
backgroundColor: a.value
|
|
1001
1001
|
};
|
|
1002
|
-
}),
|
|
1002
|
+
}), j = T(
|
|
1003
1003
|
() => ({
|
|
1004
1004
|
position: "fixed",
|
|
1005
1005
|
top: 0,
|
|
@@ -1009,224 +1009,224 @@ const co = (e) => {
|
|
|
1009
1009
|
pointerEvents: "none",
|
|
1010
1010
|
zIndex: 1e3
|
|
1011
1011
|
})
|
|
1012
|
-
),
|
|
1012
|
+
), J = L({ startX: 0, startPos: 0 }), { isDragging: ge } = yt(u, {
|
|
1013
1013
|
axis: "x",
|
|
1014
|
-
onStart: () => Re(I.value,
|
|
1015
|
-
onMove: ({ x:
|
|
1016
|
-
onEnd: ({ x:
|
|
1014
|
+
onStart: () => Re(I.value, k.value),
|
|
1015
|
+
onMove: ({ x: P }) => Ye(P),
|
|
1016
|
+
onEnd: ({ x: P }) => Xe(P)
|
|
1017
1017
|
}), { isDragging: de } = yt(i, {
|
|
1018
1018
|
axis: "x",
|
|
1019
|
-
onStart: () => Re(
|
|
1020
|
-
onMove: ({ x:
|
|
1021
|
-
onEnd: ({ x:
|
|
1019
|
+
onStart: () => Re(y.value, f.value),
|
|
1020
|
+
onMove: ({ x: P }) => Be(P),
|
|
1021
|
+
onEnd: ({ x: P }) => je(P)
|
|
1022
1022
|
}), { isDragging: Oe } = yt(l, {
|
|
1023
1023
|
exact: !0,
|
|
1024
1024
|
axis: "x",
|
|
1025
|
-
onStart: () => Re(I.value,
|
|
1026
|
-
onMove: ({ x:
|
|
1027
|
-
onEnd: ({ x:
|
|
1025
|
+
onStart: () => Re(I.value, k.value),
|
|
1026
|
+
onMove: ({ x: P }) => Fe(P),
|
|
1027
|
+
onEnd: ({ x: P }) => D(P)
|
|
1028
1028
|
});
|
|
1029
1029
|
Ee(() => {
|
|
1030
1030
|
F();
|
|
1031
1031
|
}), An(() => {
|
|
1032
|
-
|
|
1032
|
+
G();
|
|
1033
1033
|
});
|
|
1034
|
-
function Re(
|
|
1035
|
-
l.value && (l.value.style.transition = "none"),
|
|
1034
|
+
function Re(P, B) {
|
|
1035
|
+
l.value && (l.value.style.transition = "none"), J.value = { startX: P, startPos: B };
|
|
1036
1036
|
}
|
|
1037
|
-
function Ye(
|
|
1037
|
+
function Ye(P) {
|
|
1038
1038
|
if (!ge.value || !l.value) return;
|
|
1039
|
-
const B = (
|
|
1040
|
-
l.value.style.left = `${
|
|
1039
|
+
const B = (P - J.value.startX) / W.value, z = Math.max(0, Math.min(f.value - 1, J.value.startPos + B));
|
|
1040
|
+
l.value.style.left = `${z / e.colspan * 100}%`, l.value.style.width = `${(f.value - z) / e.colspan * 100}%`;
|
|
1041
1041
|
}
|
|
1042
|
-
function Xe(
|
|
1042
|
+
function Xe(P) {
|
|
1043
1043
|
if (!l.value) return;
|
|
1044
|
-
const B =
|
|
1045
|
-
|
|
1044
|
+
const B = P - J.value.startX, z = Math.round(B / W.value), ee = k.value, le = Math.max(0, Math.min(f.value - 1, J.value.startPos + z));
|
|
1045
|
+
k.value = le, e.store.updateGanttBar({
|
|
1046
1046
|
rowIndex: e.rowIndex,
|
|
1047
1047
|
colIndex: e.colIndex,
|
|
1048
1048
|
type: "resize",
|
|
1049
1049
|
edge: "start",
|
|
1050
|
-
oldStart:
|
|
1051
|
-
newStart:
|
|
1050
|
+
oldStart: ee,
|
|
1051
|
+
newStart: le,
|
|
1052
1052
|
end: f.value,
|
|
1053
|
-
delta:
|
|
1054
|
-
oldColspan: f.value -
|
|
1055
|
-
newColspan: f.value -
|
|
1053
|
+
delta: z,
|
|
1054
|
+
oldColspan: f.value - ee,
|
|
1055
|
+
newColspan: f.value - le
|
|
1056
1056
|
});
|
|
1057
1057
|
}
|
|
1058
|
-
function Be(
|
|
1058
|
+
function Be(P) {
|
|
1059
1059
|
if (!de.value || !l.value) return;
|
|
1060
|
-
const B = (
|
|
1061
|
-
l.value.style.width = `${(
|
|
1060
|
+
const B = (P - J.value.startX) / W.value, z = Math.max(k.value + 1, Math.min(e.columnsCount, J.value.startPos + B));
|
|
1061
|
+
l.value.style.width = `${(z - k.value) / e.colspan * 100}%`;
|
|
1062
1062
|
}
|
|
1063
|
-
function je(
|
|
1063
|
+
function je(P) {
|
|
1064
1064
|
if (!l.value) return;
|
|
1065
|
-
const B =
|
|
1066
|
-
f.value =
|
|
1065
|
+
const B = P - J.value.startX, z = Math.round(B / W.value), ee = f.value, le = Math.max(k.value + 1, Math.min(e.columnsCount, J.value.startPos + z));
|
|
1066
|
+
f.value = le, e.store.updateGanttBar({
|
|
1067
1067
|
rowIndex: e.rowIndex,
|
|
1068
1068
|
colIndex: e.colIndex,
|
|
1069
1069
|
type: "resize",
|
|
1070
1070
|
edge: "end",
|
|
1071
|
-
oldEnd:
|
|
1072
|
-
newEnd:
|
|
1073
|
-
start:
|
|
1074
|
-
delta:
|
|
1075
|
-
oldColspan:
|
|
1076
|
-
newColspan:
|
|
1071
|
+
oldEnd: ee,
|
|
1072
|
+
newEnd: le,
|
|
1073
|
+
start: k.value,
|
|
1074
|
+
delta: z,
|
|
1075
|
+
oldColspan: ee - k.value,
|
|
1076
|
+
newColspan: le - k.value
|
|
1077
1077
|
});
|
|
1078
1078
|
}
|
|
1079
|
-
function Fe(
|
|
1079
|
+
function Fe(P) {
|
|
1080
1080
|
if (!Oe.value || !l.value) return;
|
|
1081
|
-
const B = (
|
|
1082
|
-
l.value.style.left = `${
|
|
1081
|
+
const B = (P - J.value.startX) / W.value, z = f.value - k.value, ee = Math.max(0, Math.min(J.value.startPos + B, e.columnsCount - z));
|
|
1082
|
+
l.value.style.left = `${ee / e.colspan * 100}%`;
|
|
1083
1083
|
}
|
|
1084
|
-
function D(
|
|
1084
|
+
function D(P) {
|
|
1085
1085
|
if (!l.value) return;
|
|
1086
|
-
const B =
|
|
1087
|
-
let
|
|
1088
|
-
|
|
1086
|
+
const B = P - J.value.startX, z = Math.round(B / W.value), ee = f.value - k.value, le = k.value, te = f.value;
|
|
1087
|
+
let ie = J.value.startPos + z, ce = ie + ee;
|
|
1088
|
+
ie < 0 ? (ie = 0, ce = ee) : ce > e.columnsCount && (ce = e.columnsCount, ie = ce - ee), k.value = ie, f.value = ce, e.store.updateGanttBar({
|
|
1089
1089
|
rowIndex: e.rowIndex,
|
|
1090
1090
|
colIndex: e.colIndex,
|
|
1091
1091
|
type: "bar",
|
|
1092
|
-
oldStart:
|
|
1093
|
-
oldEnd:
|
|
1094
|
-
newStart:
|
|
1092
|
+
oldStart: le,
|
|
1093
|
+
oldEnd: te,
|
|
1094
|
+
newStart: ie,
|
|
1095
1095
|
newEnd: ce,
|
|
1096
|
-
delta:
|
|
1097
|
-
colspan: ce -
|
|
1096
|
+
delta: z,
|
|
1097
|
+
colspan: ce - ie
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
1100
1100
|
function F() {
|
|
1101
|
-
const { x:
|
|
1101
|
+
const { x: P, y: B } = _e(l), { x: z, y: ee } = _e(d), { x: le, y: te } = _e(m);
|
|
1102
1102
|
e.store.registerGanttBar({
|
|
1103
1103
|
id: r,
|
|
1104
1104
|
rowIndex: e.rowIndex,
|
|
1105
1105
|
colIndex: e.colIndex,
|
|
1106
|
-
startIndex:
|
|
1106
|
+
startIndex: k,
|
|
1107
1107
|
endIndex: f,
|
|
1108
1108
|
color: a,
|
|
1109
1109
|
label: e.label,
|
|
1110
|
-
position: { x:
|
|
1110
|
+
position: { x: P, y: B }
|
|
1111
1111
|
}), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
|
|
1112
1112
|
id: `${r}-connection-left`,
|
|
1113
1113
|
rowIndex: e.rowIndex,
|
|
1114
1114
|
colIndex: e.colIndex,
|
|
1115
1115
|
side: "left",
|
|
1116
|
-
position: { x:
|
|
1117
|
-
visible:
|
|
1116
|
+
position: { x: z, y: ee },
|
|
1117
|
+
visible: g,
|
|
1118
1118
|
barId: r
|
|
1119
1119
|
}), e.store.registerConnectionHandle({
|
|
1120
1120
|
id: `${r}-connection-right`,
|
|
1121
1121
|
rowIndex: e.rowIndex,
|
|
1122
1122
|
colIndex: e.colIndex,
|
|
1123
1123
|
side: "right",
|
|
1124
|
-
position: { x:
|
|
1125
|
-
visible:
|
|
1124
|
+
position: { x: le, y: te },
|
|
1125
|
+
visible: x,
|
|
1126
1126
|
barId: r
|
|
1127
1127
|
}));
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1129
|
+
function G() {
|
|
1130
1130
|
e.store.unregisterGanttBar(r), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${r}-connection-left`), e.store.unregisterConnectionHandle(`${r}-connection-right`));
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1133
|
-
e.store.isDependencyGraphEnabled && (
|
|
1132
|
+
function Q() {
|
|
1133
|
+
e.store.isDependencyGraphEnabled && (g.value = !0, x.value = !0);
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1136
|
-
!C.value &&
|
|
1135
|
+
function q() {
|
|
1136
|
+
!C.value && !$.value && (g.value = !1, x.value = !1);
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1139
|
-
B.preventDefault(), B.stopPropagation(), R.value = !0,
|
|
1140
|
-
const
|
|
1141
|
-
if (
|
|
1142
|
-
const
|
|
1143
|
-
S.value = { startX:
|
|
1138
|
+
function re(P, B) {
|
|
1139
|
+
B.preventDefault(), B.stopPropagation(), R.value = !0, P === "left" ? C.value = !0 : $.value = !0;
|
|
1140
|
+
const z = P === "left" ? d.value : m.value;
|
|
1141
|
+
if (z) {
|
|
1142
|
+
const te = z.getBoundingClientRect(), ie = te.left + te.width / 2, ce = te.top + te.height / 2;
|
|
1143
|
+
S.value = { startX: ie, startY: ce, endX: ie, endY: ce };
|
|
1144
1144
|
}
|
|
1145
|
-
const
|
|
1146
|
-
S.value.endX =
|
|
1147
|
-
},
|
|
1148
|
-
|
|
1145
|
+
const ee = (te) => {
|
|
1146
|
+
S.value.endX = te.clientX, S.value.endY = te.clientY;
|
|
1147
|
+
}, le = (te) => {
|
|
1148
|
+
ke(te, P), Le(ee, le);
|
|
1149
1149
|
};
|
|
1150
|
-
document.addEventListener("mousemove",
|
|
1150
|
+
document.addEventListener("mousemove", ee), document.addEventListener("mouseup", le);
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1153
|
-
const
|
|
1154
|
-
if (
|
|
1155
|
-
const
|
|
1156
|
-
if (
|
|
1157
|
-
const
|
|
1152
|
+
function ke(P, B) {
|
|
1153
|
+
const z = document.elementFromPoint(P.clientX, P.clientY)?.closest(".connection-handle");
|
|
1154
|
+
if (z && z !== (B === "left" ? d.value : m.value)) {
|
|
1155
|
+
const ee = z.closest(".gantt-bar");
|
|
1156
|
+
if (ee) {
|
|
1157
|
+
const le = parseInt(ee.getAttribute("data-rowindex") || "0"), te = parseInt(ee.getAttribute("data-colindex") || "0"), ie = z.classList.contains("left-connection-handle") ? "left" : "right", ce = `gantt-bar-row-${le}-col-${te}`, c = e.store.createConnection(
|
|
1158
1158
|
`${r}-connection-${B}`,
|
|
1159
|
-
`${ce}-connection-${
|
|
1159
|
+
`${ce}-connection-${ie}`
|
|
1160
1160
|
);
|
|
1161
|
-
|
|
1161
|
+
c && o("connection:create", c);
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
|
-
function Le(
|
|
1166
|
-
R.value = !1, C.value = !1,
|
|
1165
|
+
function Le(P, B) {
|
|
1166
|
+
R.value = !1, C.value = !1, $.value = !1, document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", B), l.value?.matches(":hover") || q();
|
|
1167
1167
|
}
|
|
1168
1168
|
return t({
|
|
1169
|
-
barStyle:
|
|
1169
|
+
barStyle: me,
|
|
1170
1170
|
cleanupConnectionDrag: Le,
|
|
1171
1171
|
currentEnd: f,
|
|
1172
|
-
handleConnectionDrop:
|
|
1172
|
+
handleConnectionDrop: ke,
|
|
1173
1173
|
isLeftConnectionDragging: C,
|
|
1174
|
-
isLeftConnectionVisible:
|
|
1175
|
-
isRightConnectionDragging:
|
|
1176
|
-
isRightConnectionVisible:
|
|
1174
|
+
isLeftConnectionVisible: g,
|
|
1175
|
+
isRightConnectionDragging: $,
|
|
1176
|
+
isRightConnectionVisible: x,
|
|
1177
1177
|
showDragPreview: R
|
|
1178
|
-
}), (
|
|
1178
|
+
}), (P, B) => (h(), b("td", {
|
|
1179
1179
|
class: "aganttcell",
|
|
1180
1180
|
colspan: e.colspan
|
|
1181
1181
|
}, [
|
|
1182
|
-
|
|
1183
|
-
|
|
1182
|
+
w("div", Io, [
|
|
1183
|
+
w("div", {
|
|
1184
1184
|
ref: "bar",
|
|
1185
1185
|
"data-rowindex": e.rowIndex,
|
|
1186
1186
|
"data-colindex": e.colIndex,
|
|
1187
|
-
class:
|
|
1188
|
-
style:
|
|
1189
|
-
onMouseenter:
|
|
1190
|
-
onMouseleave:
|
|
1187
|
+
class: se(["gantt-bar", { "is-dragging": O.value }]),
|
|
1188
|
+
style: be(me.value),
|
|
1189
|
+
onMouseenter: Q,
|
|
1190
|
+
onMouseleave: q
|
|
1191
1191
|
}, [
|
|
1192
|
-
e.store.isDependencyGraphEnabled ? (
|
|
1192
|
+
e.store.isDependencyGraphEnabled ? (h(), b("div", {
|
|
1193
1193
|
key: 0,
|
|
1194
1194
|
ref: "leftConnectionHandle",
|
|
1195
|
-
class:
|
|
1196
|
-
onMousedown: B[0] || (B[0] = Ie((
|
|
1195
|
+
class: se(["connection-handle left-connection-handle", { visible: g.value, "is-dragging": C.value }]),
|
|
1196
|
+
onMousedown: B[0] || (B[0] = Ie((z) => re("left", z), ["stop"]))
|
|
1197
1197
|
}, [...B[2] || (B[2] = [
|
|
1198
|
-
|
|
1199
|
-
])], 34)) :
|
|
1200
|
-
e.store.isDependencyGraphEnabled ? (
|
|
1198
|
+
w("div", { class: "connection-dot" }, null, -1)
|
|
1199
|
+
])], 34)) : Y("", !0),
|
|
1200
|
+
e.store.isDependencyGraphEnabled ? (h(), b("div", {
|
|
1201
1201
|
key: 1,
|
|
1202
1202
|
ref: "rightConnectionHandle",
|
|
1203
|
-
class:
|
|
1204
|
-
onMousedown: B[1] || (B[1] = Ie((
|
|
1203
|
+
class: se(["connection-handle right-connection-handle", { visible: x.value, "is-dragging": $.value }]),
|
|
1204
|
+
onMousedown: B[1] || (B[1] = Ie((z) => re("right", z), ["stop"]))
|
|
1205
1205
|
}, [...B[3] || (B[3] = [
|
|
1206
|
-
|
|
1207
|
-
])], 34)) :
|
|
1208
|
-
|
|
1206
|
+
w("div", { class: "connection-dot" }, null, -1)
|
|
1207
|
+
])], 34)) : Y("", !0),
|
|
1208
|
+
w("div", {
|
|
1209
1209
|
ref: "leftResizeHandle",
|
|
1210
|
-
class:
|
|
1210
|
+
class: se(["resize-handle left-resize-handle", { "is-dragging": V(ge) }])
|
|
1211
1211
|
}, [...B[4] || (B[4] = [
|
|
1212
|
-
|
|
1213
|
-
|
|
1212
|
+
w("div", { class: "handle-grip" }, null, -1),
|
|
1213
|
+
w("div", { class: "vertical-indicator left-indicator" }, null, -1)
|
|
1214
1214
|
])], 2),
|
|
1215
|
-
e.label ? (
|
|
1216
|
-
|
|
1215
|
+
e.label ? (h(), b("label", Co, N(e.label), 1)) : Y("", !0),
|
|
1216
|
+
w("div", {
|
|
1217
1217
|
ref: "rightResizeHandle",
|
|
1218
|
-
class:
|
|
1218
|
+
class: se(["resize-handle right-resize-handle", { "is-dragging": V(de) }])
|
|
1219
1219
|
}, [...B[5] || (B[5] = [
|
|
1220
|
-
|
|
1221
|
-
|
|
1220
|
+
w("div", { class: "handle-grip" }, null, -1),
|
|
1221
|
+
w("div", { class: "vertical-indicator right-indicator" }, null, -1)
|
|
1222
1222
|
])], 2)
|
|
1223
1223
|
], 46, Mo)
|
|
1224
1224
|
], 512),
|
|
1225
|
-
e.store.isDependencyGraphEnabled && R.value ? (
|
|
1225
|
+
e.store.isDependencyGraphEnabled && R.value ? (h(), b("svg", {
|
|
1226
1226
|
key: 0,
|
|
1227
|
-
style:
|
|
1227
|
+
style: be(j.value)
|
|
1228
1228
|
}, [
|
|
1229
|
-
|
|
1229
|
+
w("line", {
|
|
1230
1230
|
x1: S.value.startX,
|
|
1231
1231
|
y1: S.value.startY,
|
|
1232
1232
|
x2: S.value.endX,
|
|
@@ -1235,10 +1235,10 @@ const co = (e) => {
|
|
|
1235
1235
|
"stroke-width": "2",
|
|
1236
1236
|
"stroke-dasharray": "5,5"
|
|
1237
1237
|
}, null, 8, Eo)
|
|
1238
|
-
], 4)) :
|
|
1239
|
-
], 8,
|
|
1238
|
+
], 4)) : Y("", !0)
|
|
1239
|
+
], 8, ko));
|
|
1240
1240
|
}
|
|
1241
|
-
}),
|
|
1241
|
+
}), $o = /* @__PURE__ */ Ve(Ao, [["__scopeId", "data-v-8917a8a3"]]), To = `<?xml version="1.0" encoding="UTF-8"?>
|
|
1242
1242
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
1243
1243
|
<path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
|
|
1244
1244
|
<polygon points="34 18 30 18 30 30 18 30 18 34 30 34 30 46 34 46 34 34 46 34 46 30 34 30 34 18" style="fill: #000; stroke-width: 0px;"/>
|
|
@@ -1283,19 +1283,19 @@ const co = (e) => {
|
|
|
1283
1283
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.64">
|
|
1284
1284
|
<path d="M70.08,33.9l-9.75-9.75-2.83,2.83,6.33,6.33h-26.51V6.81l6.33,6.33,2.83-2.83L36.75.56c-.75-.75-2.08-.75-2.83,0l-9.75,9.75,2.83,2.83,6.33-6.33v26.5H6.83l6.33-6.33-2.83-2.83L.59,33.9c-.38.38-.59.88-.59,1.41s.21,1.04.59,1.41l9.75,9.75,2.83-2.83-6.33-6.33h26.5v26.51l-6.33-6.33-2.83,2.83,9.75,9.75c.38.38.88.59,1.41.59s1.04-.21,1.41-.59l9.75-9.75-2.83-2.83-6.33,6.33v-26.51h26.51l-6.33,6.33,2.83,2.83,9.75-9.75c.38-.38.59-.88.59-1.41s-.21-1.04-.59-1.41Z" style="fill: #000; stroke-width: 0px;"/>
|
|
1285
1285
|
</svg>`, Vo = {
|
|
1286
|
-
add:
|
|
1286
|
+
add: To,
|
|
1287
1287
|
delete: Do,
|
|
1288
1288
|
duplicate: So,
|
|
1289
1289
|
insertAbove: Ro,
|
|
1290
1290
|
insertBelow: Lo,
|
|
1291
1291
|
move: Ho
|
|
1292
|
-
},
|
|
1292
|
+
}, _o = {
|
|
1293
1293
|
key: 0,
|
|
1294
1294
|
class: "row-actions-dropdown"
|
|
1295
|
-
},
|
|
1295
|
+
}, Po = ["aria-expanded"], Oo = ["onClick"], Bo = ["innerHTML"], Fo = { class: "action-label" }, Zo = {
|
|
1296
1296
|
key: 1,
|
|
1297
1297
|
class: "row-actions-icons"
|
|
1298
|
-
}, No = ["title", "aria-label", "onClick"], Uo = ["innerHTML"],
|
|
1298
|
+
}, No = ["title", "aria-label", "onClick"], Uo = ["innerHTML"], it = /* @__PURE__ */ oe({
|
|
1299
1299
|
__name: "ARowActions",
|
|
1300
1300
|
props: {
|
|
1301
1301
|
rowIndex: {},
|
|
@@ -1305,27 +1305,27 @@ const co = (e) => {
|
|
|
1305
1305
|
},
|
|
1306
1306
|
emits: ["action"],
|
|
1307
1307
|
setup(e, { emit: t }) {
|
|
1308
|
-
const n = e, o = t, a = fe("actionsCell"), r = fe("toggleButton"), s = L(0), l = L(!1), u = L(!1), i = L({ top: 0, left: 0 }),
|
|
1308
|
+
const n = e, o = t, a = fe("actionsCell"), r = fe("toggleButton"), s = L(0), l = L(!1), u = L(!1), i = L({ top: 0, left: 0 }), d = {
|
|
1309
1309
|
add: "Add Row",
|
|
1310
1310
|
delete: "Delete Row",
|
|
1311
1311
|
duplicate: "Duplicate Row",
|
|
1312
1312
|
insertAbove: "Insert Above",
|
|
1313
1313
|
insertBelow: "Insert Below",
|
|
1314
1314
|
move: "Move Row"
|
|
1315
|
-
},
|
|
1316
|
-
const
|
|
1317
|
-
for (const
|
|
1318
|
-
const R =
|
|
1315
|
+
}, m = T(() => {
|
|
1316
|
+
const g = [], x = n.config.actions || {}, C = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
|
|
1317
|
+
for (const $ of C) {
|
|
1318
|
+
const R = x[$];
|
|
1319
1319
|
if (R === !1 || R === void 0) continue;
|
|
1320
|
-
let S = !0, O =
|
|
1321
|
-
typeof R == "object" && (S = R.enabled !== !1, O = R.label || O,
|
|
1320
|
+
let S = !0, O = d[$], W = Vo[$];
|
|
1321
|
+
typeof R == "object" && (S = R.enabled !== !1, O = R.label || O, W = R.icon || W), S && g.push({ type: $, label: O, icon: W });
|
|
1322
1322
|
}
|
|
1323
|
-
return
|
|
1324
|
-
}),
|
|
1323
|
+
return g;
|
|
1324
|
+
}), p = T(() => {
|
|
1325
1325
|
if (n.config.forceDropdown) return !0;
|
|
1326
|
-
const
|
|
1327
|
-
return
|
|
1328
|
-
}), I =
|
|
1326
|
+
const g = n.config.dropdownThreshold ?? 150;
|
|
1327
|
+
return g === 0 ? !1 : s.value > 0 && s.value < g;
|
|
1328
|
+
}), I = T(() => l.value ? u.value ? {
|
|
1329
1329
|
position: "fixed",
|
|
1330
1330
|
bottom: `${window.innerHeight - i.value.top}px`,
|
|
1331
1331
|
left: `${i.value.left}px`,
|
|
@@ -1335,77 +1335,77 @@ const co = (e) => {
|
|
|
1335
1335
|
top: `${i.value.top}px`,
|
|
1336
1336
|
left: `${i.value.left}px`
|
|
1337
1337
|
} : {});
|
|
1338
|
-
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1338
|
+
dt(a, (g) => {
|
|
1339
|
+
const x = g[0];
|
|
1340
|
+
x && (s.value = x.contentRect.width);
|
|
1341
1341
|
});
|
|
1342
|
-
const
|
|
1343
|
-
l.value ||
|
|
1344
|
-
},
|
|
1342
|
+
const y = () => {
|
|
1343
|
+
l.value || k(), l.value = !l.value;
|
|
1344
|
+
}, k = () => {
|
|
1345
1345
|
if (!r.value) return;
|
|
1346
|
-
const
|
|
1347
|
-
u.value =
|
|
1348
|
-
top:
|
|
1349
|
-
left:
|
|
1346
|
+
const g = r.value.getBoundingClientRect(), x = window.innerHeight, C = m.value.length * 40 + 16, $ = x - g.bottom, R = g.top;
|
|
1347
|
+
u.value = $ < C && R > C, u.value ? i.value = {
|
|
1348
|
+
top: g.top,
|
|
1349
|
+
left: g.left
|
|
1350
1350
|
} : i.value = {
|
|
1351
|
-
top:
|
|
1352
|
-
left:
|
|
1351
|
+
top: g.bottom,
|
|
1352
|
+
left: g.left
|
|
1353
1353
|
};
|
|
1354
1354
|
};
|
|
1355
|
-
|
|
1355
|
+
Tt(a, () => {
|
|
1356
1356
|
l.value = !1;
|
|
1357
1357
|
});
|
|
1358
|
-
const f = (
|
|
1358
|
+
const f = (g) => {
|
|
1359
1359
|
l.value = !1;
|
|
1360
|
-
const
|
|
1361
|
-
typeof
|
|
1360
|
+
const x = n.config.actions?.[g];
|
|
1361
|
+
typeof x == "object" && x.handler && x.handler(n.rowIndex, n.store) === !1 || o("action", g, n.rowIndex);
|
|
1362
1362
|
};
|
|
1363
|
-
return (
|
|
1363
|
+
return (g, x) => (h(), b("td", {
|
|
1364
1364
|
ref: "actionsCell",
|
|
1365
|
-
class:
|
|
1365
|
+
class: se(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": l.value }])
|
|
1366
1366
|
}, [
|
|
1367
|
-
|
|
1368
|
-
|
|
1367
|
+
p.value ? (h(), b("div", _o, [
|
|
1368
|
+
w("button", {
|
|
1369
1369
|
ref: "toggleButton",
|
|
1370
1370
|
type: "button",
|
|
1371
1371
|
class: "row-actions-toggle",
|
|
1372
1372
|
"aria-expanded": l.value,
|
|
1373
1373
|
"aria-haspopup": "true",
|
|
1374
|
-
onClick: Ie(
|
|
1375
|
-
}, [...
|
|
1376
|
-
|
|
1377
|
-
])], 8,
|
|
1378
|
-
|
|
1379
|
-
class:
|
|
1380
|
-
style:
|
|
1374
|
+
onClick: Ie(y, ["stop"])
|
|
1375
|
+
}, [...x[0] || (x[0] = [
|
|
1376
|
+
w("span", { class: "dropdown-icon" }, "⋮", -1)
|
|
1377
|
+
])], 8, Po),
|
|
1378
|
+
K(w("div", {
|
|
1379
|
+
class: se(["row-actions-menu", { "menu-flipped": u.value }]),
|
|
1380
|
+
style: be(I.value),
|
|
1381
1381
|
role: "menu"
|
|
1382
1382
|
}, [
|
|
1383
|
-
(
|
|
1383
|
+
(h(!0), b(X, null, ve(m.value, (C) => (h(), b("button", {
|
|
1384
1384
|
key: C.type,
|
|
1385
1385
|
type: "button",
|
|
1386
1386
|
class: "row-action-menu-item",
|
|
1387
1387
|
role: "menuitem",
|
|
1388
|
-
onClick: Ie((
|
|
1388
|
+
onClick: Ie(($) => f(C.type), ["stop"])
|
|
1389
1389
|
}, [
|
|
1390
|
-
|
|
1390
|
+
w("span", {
|
|
1391
1391
|
class: "action-icon",
|
|
1392
1392
|
innerHTML: C.icon
|
|
1393
1393
|
}, null, 8, Bo),
|
|
1394
|
-
|
|
1394
|
+
w("span", Fo, N(C.label), 1)
|
|
1395
1395
|
], 8, Oo))), 128))
|
|
1396
1396
|
], 6), [
|
|
1397
1397
|
[Ce, l.value]
|
|
1398
1398
|
])
|
|
1399
|
-
])) : (
|
|
1400
|
-
(
|
|
1399
|
+
])) : (h(), b("div", Zo, [
|
|
1400
|
+
(h(!0), b(X, null, ve(m.value, (C) => (h(), b("button", {
|
|
1401
1401
|
key: C.type,
|
|
1402
1402
|
type: "button",
|
|
1403
1403
|
class: "row-action-btn",
|
|
1404
1404
|
title: C.label,
|
|
1405
1405
|
"aria-label": C.label,
|
|
1406
|
-
onClick: Ie((
|
|
1406
|
+
onClick: Ie(($) => f(C.type), ["stop"])
|
|
1407
1407
|
}, [
|
|
1408
|
-
|
|
1408
|
+
w("span", {
|
|
1409
1409
|
class: "action-icon",
|
|
1410
1410
|
innerHTML: C.icon
|
|
1411
1411
|
}, null, 8, Uo)
|
|
@@ -1413,7 +1413,7 @@ const co = (e) => {
|
|
|
1413
1413
|
]))
|
|
1414
1414
|
], 2));
|
|
1415
1415
|
}
|
|
1416
|
-
}), Wo = ["tabindex"], Go = /* @__PURE__ */
|
|
1416
|
+
}), Wo = ["tabindex"], Go = /* @__PURE__ */ oe({
|
|
1417
1417
|
__name: "ARow",
|
|
1418
1418
|
props: {
|
|
1419
1419
|
rowIndex: {},
|
|
@@ -1423,93 +1423,93 @@ const co = (e) => {
|
|
|
1423
1423
|
},
|
|
1424
1424
|
emits: ["row:action"],
|
|
1425
1425
|
setup(e, { emit: t }) {
|
|
1426
|
-
const n = t, o = fe("rowEl"), a =
|
|
1427
|
-
n("row:action",
|
|
1426
|
+
const n = t, o = fe("rowEl"), a = T(() => e.store.isRowVisible(e.rowIndex)), r = T(() => e.store.getRowExpandSymbol(e.rowIndex)), s = T(() => e.store.config.rowActions || { enabled: !1 }), l = T(() => s.value.enabled), u = T(() => s.value.position || "before-index"), i = (d, m) => {
|
|
1427
|
+
n("row:action", d, m);
|
|
1428
1428
|
};
|
|
1429
1429
|
if (e.addNavigation) {
|
|
1430
|
-
let
|
|
1431
|
-
typeof e.addNavigation == "object" && (
|
|
1432
|
-
...
|
|
1430
|
+
let d = wt;
|
|
1431
|
+
typeof e.addNavigation == "object" && (d = {
|
|
1432
|
+
...d,
|
|
1433
1433
|
...e.addNavigation
|
|
1434
|
-
}),
|
|
1434
|
+
}), Pt([
|
|
1435
1435
|
{
|
|
1436
1436
|
selectors: o,
|
|
1437
|
-
handlers:
|
|
1437
|
+
handlers: d
|
|
1438
1438
|
}
|
|
1439
1439
|
]);
|
|
1440
1440
|
}
|
|
1441
|
-
return (
|
|
1441
|
+
return (d, m) => K((h(), b("tr", {
|
|
1442
1442
|
ref: "rowEl",
|
|
1443
1443
|
tabindex: e.tabIndex,
|
|
1444
1444
|
class: "atable-row"
|
|
1445
1445
|
}, [
|
|
1446
|
-
l.value && u.value === "before-index" ? (
|
|
1446
|
+
l.value && u.value === "before-index" ? (h(), pe(it, {
|
|
1447
1447
|
key: 0,
|
|
1448
1448
|
"row-index": e.rowIndex,
|
|
1449
1449
|
store: e.store,
|
|
1450
1450
|
config: s.value,
|
|
1451
1451
|
position: u.value,
|
|
1452
1452
|
onAction: i
|
|
1453
|
-
}, null, 8, ["row-index", "store", "config", "position"])) :
|
|
1454
|
-
e.store.config.view !== "uncounted" ? he(
|
|
1455
|
-
e.store.config.view === "list" ? (
|
|
1453
|
+
}, null, 8, ["row-index", "store", "config", "position"])) : Y("", !0),
|
|
1454
|
+
e.store.config.view !== "uncounted" ? he(d.$slots, "index", { key: 1 }, () => [
|
|
1455
|
+
e.store.config.view === "list" ? (h(), b("td", {
|
|
1456
1456
|
key: 0,
|
|
1457
1457
|
tabIndex: -1,
|
|
1458
|
-
class:
|
|
1459
|
-
},
|
|
1458
|
+
class: se(["list-index", e.store.hasPinnedColumns ? "sticky-index" : ""])
|
|
1459
|
+
}, N(e.rowIndex + 1), 3)) : e.store.isTreeView ? (h(), b("td", {
|
|
1460
1460
|
key: 1,
|
|
1461
1461
|
tabIndex: -1,
|
|
1462
|
-
class:
|
|
1463
|
-
onClick:
|
|
1464
|
-
},
|
|
1465
|
-
], !0) :
|
|
1466
|
-
l.value && u.value === "after-index" ? (
|
|
1462
|
+
class: se(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
1463
|
+
onClick: m[0] || (m[0] = (p) => e.store.toggleRowExpand(e.rowIndex))
|
|
1464
|
+
}, N(r.value), 3)) : Y("", !0)
|
|
1465
|
+
], !0) : Y("", !0),
|
|
1466
|
+
l.value && u.value === "after-index" ? (h(), pe(it, {
|
|
1467
1467
|
key: 2,
|
|
1468
1468
|
"row-index": e.rowIndex,
|
|
1469
1469
|
store: e.store,
|
|
1470
1470
|
config: s.value,
|
|
1471
1471
|
position: u.value,
|
|
1472
1472
|
onAction: i
|
|
1473
|
-
}, null, 8, ["row-index", "store", "config", "position"])) :
|
|
1474
|
-
he(
|
|
1475
|
-
l.value && u.value === "end" ? (
|
|
1473
|
+
}, null, 8, ["row-index", "store", "config", "position"])) : Y("", !0),
|
|
1474
|
+
he(d.$slots, "default", {}, void 0, !0),
|
|
1475
|
+
l.value && u.value === "end" ? (h(), pe(it, {
|
|
1476
1476
|
key: 3,
|
|
1477
1477
|
"row-index": e.rowIndex,
|
|
1478
1478
|
store: e.store,
|
|
1479
1479
|
config: s.value,
|
|
1480
1480
|
position: u.value,
|
|
1481
1481
|
onAction: i
|
|
1482
|
-
}, null, 8, ["row-index", "store", "config", "position"])) :
|
|
1482
|
+
}, null, 8, ["row-index", "store", "config", "position"])) : Y("", !0)
|
|
1483
1483
|
], 8, Wo)), [
|
|
1484
1484
|
[Ce, a.value]
|
|
1485
1485
|
]);
|
|
1486
1486
|
}
|
|
1487
|
-
}), hn = /* @__PURE__ */ Ve(Go, [["__scopeId", "data-v-2e038a9c"]]),
|
|
1487
|
+
}), hn = /* @__PURE__ */ Ve(Go, [["__scopeId", "data-v-2e038a9c"]]), kt = /* @__PURE__ */ new WeakMap(), zo = {
|
|
1488
1488
|
mounted(e, t) {
|
|
1489
1489
|
const n = !t.modifiers.bubble;
|
|
1490
1490
|
let o;
|
|
1491
|
-
if (typeof t.value == "function") o =
|
|
1491
|
+
if (typeof t.value == "function") o = Tt(e, t.value, { capture: n });
|
|
1492
1492
|
else {
|
|
1493
1493
|
const [a, r] = t.value;
|
|
1494
|
-
o =
|
|
1494
|
+
o = Tt(e, a, Object.assign({ capture: n }, r));
|
|
1495
1495
|
}
|
|
1496
|
-
|
|
1496
|
+
kt.set(e, o);
|
|
1497
1497
|
},
|
|
1498
1498
|
unmounted(e) {
|
|
1499
|
-
const t =
|
|
1500
|
-
t && typeof t == "function" ? t() : t?.stop(),
|
|
1499
|
+
const t = kt.get(e);
|
|
1500
|
+
t && typeof t == "function" ? t() : t?.stop(), kt.delete(e);
|
|
1501
1501
|
}
|
|
1502
1502
|
}, qo = { mounted(e, t) {
|
|
1503
|
-
typeof t.value == "function" ?
|
|
1503
|
+
typeof t.value == "function" ? dt(e, t.value) : dt(e, ...t.value);
|
|
1504
1504
|
} };
|
|
1505
1505
|
function Yo() {
|
|
1506
1506
|
let e = !1;
|
|
1507
|
-
const t =
|
|
1507
|
+
const t = ue(!1);
|
|
1508
1508
|
return (n, o) => {
|
|
1509
1509
|
if (t.value = o.value, e) return;
|
|
1510
1510
|
e = !0;
|
|
1511
1511
|
const a = uo(n, o.value);
|
|
1512
|
-
|
|
1512
|
+
ne(t, (r) => a.value = r);
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
1515
1515
|
Yo();
|
|
@@ -1524,14 +1524,14 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
1524
1524
|
pointerEvents: "none",
|
|
1525
1525
|
zIndex: 1
|
|
1526
1526
|
}
|
|
1527
|
-
}, Jo = ["d", "stroke-width", "onDblclick"], Qo = ["id", "d", "stroke", "stroke-width", "onDblclick"], Ko = 0.25,
|
|
1527
|
+
}, Jo = ["d", "stroke-width", "onDblclick"], Qo = ["id", "d", "stroke", "stroke-width", "onDblclick"], Ko = 0.25, lt = 16, el = /* @__PURE__ */ oe({
|
|
1528
1528
|
__name: "AGanttConnection",
|
|
1529
1529
|
props: {
|
|
1530
1530
|
store: {}
|
|
1531
1531
|
},
|
|
1532
1532
|
emits: ["connection:delete"],
|
|
1533
1533
|
setup(e, { emit: t }) {
|
|
1534
|
-
const n = t, o =
|
|
1534
|
+
const n = t, o = T(() => e.store.connectionPaths.filter((s) => {
|
|
1535
1535
|
const l = e.store.ganttBars.find((i) => i.id === s.from.barId), u = e.store.ganttBars.find((i) => i.id === s.to.barId);
|
|
1536
1536
|
return l && u;
|
|
1537
1537
|
})), a = (s) => {
|
|
@@ -1541,22 +1541,22 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
1541
1541
|
(O) => O.barId === s.to.barId && O.side === s.to.side
|
|
1542
1542
|
);
|
|
1543
1543
|
if (!l || !u) return "";
|
|
1544
|
-
const i = l.position.x +
|
|
1545
|
-
return `M ${i} ${
|
|
1544
|
+
const i = l.position.x + lt / 2, d = l.position.y + lt / 2, m = u.position.x + lt / 2, p = u.position.y + lt / 2, I = Math.abs(m - i), y = Math.max(I * Ko, 50), k = i + (s.from.side === "left" ? -y : y), f = m + (s.to.side === "left" ? -y : y), g = { x: 0.5 * i + 0.5 * k, y: 0.5 * d + 0.5 * d }, x = { x: 0.5 * k + 0.5 * f, y: 0.5 * d + 0.5 * p }, C = { x: 0.5 * f + 0.5 * m, y: 0.5 * p + 0.5 * p }, $ = { x: 0.5 * g.x + 0.5 * x.x, y: 0.5 * g.y + 0.5 * x.y }, R = { x: 0.5 * x.x + 0.5 * C.x, y: 0.5 * x.y + 0.5 * C.y }, S = { x: 0.5 * $.x + 0.5 * R.x, y: 0.5 * $.y + 0.5 * R.y };
|
|
1545
|
+
return `M ${i} ${d} Q ${k} ${d}, ${S.x} ${S.y} Q ${f} ${p}, ${m} ${p}`;
|
|
1546
1546
|
}, r = (s) => {
|
|
1547
1547
|
e.store.deleteConnection(s.id) && n("connection:delete", s);
|
|
1548
1548
|
};
|
|
1549
|
-
return (s, l) => (
|
|
1550
|
-
(
|
|
1551
|
-
l[0] || (l[0] =
|
|
1552
|
-
|
|
1549
|
+
return (s, l) => (h(), b("div", Xo, [
|
|
1550
|
+
(h(), b("svg", jo, [
|
|
1551
|
+
l[0] || (l[0] = w("defs", null, [
|
|
1552
|
+
w("path", {
|
|
1553
1553
|
id: "arrowhead",
|
|
1554
1554
|
d: "M 0 -7 L 20 0 L 0 7Z",
|
|
1555
1555
|
stroke: "black",
|
|
1556
1556
|
"stroke-width": "1",
|
|
1557
1557
|
fill: "currentColor"
|
|
1558
1558
|
}),
|
|
1559
|
-
|
|
1559
|
+
w("marker", {
|
|
1560
1560
|
id: "arrowhead-marker",
|
|
1561
1561
|
markerWidth: "10",
|
|
1562
1562
|
markerHeight: "7",
|
|
@@ -1565,13 +1565,13 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
1565
1565
|
orient: "auto",
|
|
1566
1566
|
markerUnits: "strokeWidth"
|
|
1567
1567
|
}, [
|
|
1568
|
-
|
|
1568
|
+
w("polygon", {
|
|
1569
1569
|
points: "0 0, 10 3.5, 0 7",
|
|
1570
1570
|
fill: "currentColor"
|
|
1571
1571
|
})
|
|
1572
1572
|
])
|
|
1573
1573
|
], -1)),
|
|
1574
|
-
(
|
|
1574
|
+
(h(!0), b(X, null, ve(o.value, (u) => (h(), b("path", {
|
|
1575
1575
|
key: `${u.id}-hitbox`,
|
|
1576
1576
|
d: a(u),
|
|
1577
1577
|
stroke: "transparent",
|
|
@@ -1580,7 +1580,7 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
1580
1580
|
class: "connection-hitbox",
|
|
1581
1581
|
onDblclick: (i) => r(u)
|
|
1582
1582
|
}, null, 40, Jo))), 128)),
|
|
1583
|
-
(
|
|
1583
|
+
(h(!0), b(X, null, ve(o.value, (u) => (h(), b("path", {
|
|
1584
1584
|
id: u.id,
|
|
1585
1585
|
key: u.id,
|
|
1586
1586
|
d: a(u),
|
|
@@ -1600,7 +1600,7 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
1600
1600
|
}, ll = ["value"], al = {
|
|
1601
1601
|
key: 5,
|
|
1602
1602
|
class: "date-range-filter"
|
|
1603
|
-
}, sl = /* @__PURE__ */
|
|
1603
|
+
}, sl = /* @__PURE__ */ oe({
|
|
1604
1604
|
__name: "ATableColumnFilter",
|
|
1605
1605
|
props: {
|
|
1606
1606
|
column: {},
|
|
@@ -1614,14 +1614,14 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
1614
1614
|
}), o = (u) => {
|
|
1615
1615
|
if (u.filterOptions) return u.filterOptions;
|
|
1616
1616
|
const i = /* @__PURE__ */ new Set();
|
|
1617
|
-
return e.store.rows.forEach((
|
|
1618
|
-
const
|
|
1619
|
-
|
|
1620
|
-
}), Array.from(i).map((
|
|
1621
|
-
value:
|
|
1622
|
-
label: String(
|
|
1617
|
+
return e.store.rows.forEach((d) => {
|
|
1618
|
+
const m = d[u.name];
|
|
1619
|
+
m != null && m !== "" && i.add(m);
|
|
1620
|
+
}), Array.from(i).map((d) => ({
|
|
1621
|
+
value: d,
|
|
1622
|
+
label: String(d)
|
|
1623
1623
|
}));
|
|
1624
|
-
}, a =
|
|
1624
|
+
}, a = T(() => !!(t.value || n.startValue || n.endValue)), r = (u) => {
|
|
1625
1625
|
!u && e.column.filterType !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = u, e.store.setFilter(e.colIndex, { value: u }));
|
|
1626
1626
|
}, s = (u, i) => {
|
|
1627
1627
|
u === "start" ? n.startValue = i : n.endValue = i, !n.startValue && !n.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
|
|
@@ -1632,86 +1632,86 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
1632
1632
|
}, l = () => {
|
|
1633
1633
|
t.value = "", n.startValue = "", n.endValue = "", e.store.clearFilter(e.colIndex);
|
|
1634
1634
|
};
|
|
1635
|
-
return (u, i) => (
|
|
1636
|
-
(e.column.filterType || "text") === "text" ?
|
|
1635
|
+
return (u, i) => (h(), b("div", nl, [
|
|
1636
|
+
(e.column.filterType || "text") === "text" ? K((h(), b("input", {
|
|
1637
1637
|
key: 0,
|
|
1638
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1638
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
|
|
1639
1639
|
type: "text",
|
|
1640
1640
|
class: "filter-input",
|
|
1641
|
-
onInput: i[1] || (i[1] = (
|
|
1641
|
+
onInput: i[1] || (i[1] = (d) => r(t.value))
|
|
1642
1642
|
}, null, 544)), [
|
|
1643
1643
|
[we, t.value]
|
|
1644
|
-
]) : e.column.filterType === "number" ?
|
|
1644
|
+
]) : e.column.filterType === "number" ? K((h(), b("input", {
|
|
1645
1645
|
key: 1,
|
|
1646
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
1646
|
+
"onUpdate:modelValue": i[2] || (i[2] = (d) => t.value = d),
|
|
1647
1647
|
type: "number",
|
|
1648
1648
|
class: "filter-input",
|
|
1649
|
-
onInput: i[3] || (i[3] = (
|
|
1649
|
+
onInput: i[3] || (i[3] = (d) => r(t.value))
|
|
1650
1650
|
}, null, 544)), [
|
|
1651
1651
|
[we, t.value]
|
|
1652
|
-
]) : e.column.filterType === "checkbox" ? (
|
|
1653
|
-
|
|
1654
|
-
"onUpdate:modelValue": i[4] || (i[4] = (
|
|
1652
|
+
]) : e.column.filterType === "checkbox" ? (h(), b("label", ol, [
|
|
1653
|
+
K(w("input", {
|
|
1654
|
+
"onUpdate:modelValue": i[4] || (i[4] = (d) => t.value = d),
|
|
1655
1655
|
type: "checkbox",
|
|
1656
1656
|
class: "filter-checkbox",
|
|
1657
|
-
onChange: i[5] || (i[5] = (
|
|
1657
|
+
onChange: i[5] || (i[5] = (d) => r(t.value))
|
|
1658
1658
|
}, null, 544), [
|
|
1659
1659
|
[un, t.value]
|
|
1660
1660
|
]),
|
|
1661
|
-
|
|
1662
|
-
])) : e.column.filterType === "select" ?
|
|
1661
|
+
w("span", null, N(e.column.label), 1)
|
|
1662
|
+
])) : e.column.filterType === "select" ? K((h(), b("select", {
|
|
1663
1663
|
key: 3,
|
|
1664
|
-
"onUpdate:modelValue": i[6] || (i[6] = (
|
|
1664
|
+
"onUpdate:modelValue": i[6] || (i[6] = (d) => t.value = d),
|
|
1665
1665
|
class: "filter-select",
|
|
1666
|
-
onChange: i[7] || (i[7] = (
|
|
1666
|
+
onChange: i[7] || (i[7] = (d) => r(t.value))
|
|
1667
1667
|
}, [
|
|
1668
|
-
i[15] || (i[15] =
|
|
1669
|
-
(
|
|
1670
|
-
key:
|
|
1671
|
-
value:
|
|
1672
|
-
},
|
|
1668
|
+
i[15] || (i[15] = w("option", { value: "" }, "All", -1)),
|
|
1669
|
+
(h(!0), b(X, null, ve(o(e.column), (d) => (h(), b("option", {
|
|
1670
|
+
key: d.value || d,
|
|
1671
|
+
value: d.value || d
|
|
1672
|
+
}, N(d.label || d), 9, ll))), 128))
|
|
1673
1673
|
], 544)), [
|
|
1674
1674
|
[Cn, t.value]
|
|
1675
|
-
]) : e.column.filterType === "date" ?
|
|
1675
|
+
]) : e.column.filterType === "date" ? K((h(), b("input", {
|
|
1676
1676
|
key: 4,
|
|
1677
|
-
"onUpdate:modelValue": i[8] || (i[8] = (
|
|
1677
|
+
"onUpdate:modelValue": i[8] || (i[8] = (d) => t.value = d),
|
|
1678
1678
|
type: "date",
|
|
1679
1679
|
class: "filter-input",
|
|
1680
|
-
onChange: i[9] || (i[9] = (
|
|
1680
|
+
onChange: i[9] || (i[9] = (d) => r(t.value))
|
|
1681
1681
|
}, null, 544)), [
|
|
1682
1682
|
[we, t.value]
|
|
1683
|
-
]) : e.column.filterType === "dateRange" ? (
|
|
1684
|
-
|
|
1685
|
-
"onUpdate:modelValue": i[10] || (i[10] = (
|
|
1683
|
+
]) : e.column.filterType === "dateRange" ? (h(), b("div", al, [
|
|
1684
|
+
K(w("input", {
|
|
1685
|
+
"onUpdate:modelValue": i[10] || (i[10] = (d) => n.startValue = d),
|
|
1686
1686
|
type: "date",
|
|
1687
1687
|
class: "filter-input",
|
|
1688
|
-
onChange: i[11] || (i[11] = (
|
|
1688
|
+
onChange: i[11] || (i[11] = (d) => s("start", n.startValue))
|
|
1689
1689
|
}, null, 544), [
|
|
1690
1690
|
[we, n.startValue]
|
|
1691
1691
|
]),
|
|
1692
|
-
i[16] || (i[16] =
|
|
1693
|
-
|
|
1694
|
-
"onUpdate:modelValue": i[12] || (i[12] = (
|
|
1692
|
+
i[16] || (i[16] = w("span", { class: "date-separator" }, "-", -1)),
|
|
1693
|
+
K(w("input", {
|
|
1694
|
+
"onUpdate:modelValue": i[12] || (i[12] = (d) => n.endValue = d),
|
|
1695
1695
|
type: "date",
|
|
1696
1696
|
class: "filter-input",
|
|
1697
|
-
onChange: i[13] || (i[13] = (
|
|
1697
|
+
onChange: i[13] || (i[13] = (d) => s("end", n.endValue))
|
|
1698
1698
|
}, null, 544), [
|
|
1699
1699
|
[we, n.endValue]
|
|
1700
1700
|
])
|
|
1701
|
-
])) : e.column.filterType === "component" && e.column.filterComponent ? (
|
|
1701
|
+
])) : e.column.filterType === "component" && e.column.filterComponent ? (h(), pe(Ue(e.column.filterComponent), {
|
|
1702
1702
|
key: 6,
|
|
1703
1703
|
value: t.value,
|
|
1704
1704
|
column: e.column,
|
|
1705
1705
|
colIndex: e.colIndex,
|
|
1706
1706
|
store: e.store,
|
|
1707
|
-
"onUpdate:value": i[14] || (i[14] = (
|
|
1708
|
-
}, null, 40, ["value", "column", "colIndex", "store"])) :
|
|
1709
|
-
a.value ? (
|
|
1707
|
+
"onUpdate:value": i[14] || (i[14] = (d) => r(d))
|
|
1708
|
+
}, null, 40, ["value", "column", "colIndex", "store"])) : Y("", !0),
|
|
1709
|
+
a.value ? (h(), b("button", {
|
|
1710
1710
|
key: 7,
|
|
1711
1711
|
onClick: l,
|
|
1712
1712
|
class: "clear-btn",
|
|
1713
1713
|
title: "Clear"
|
|
1714
|
-
}, "×")) :
|
|
1714
|
+
}, "×")) : Y("", !0)
|
|
1715
1715
|
]));
|
|
1716
1716
|
}
|
|
1717
1717
|
}), rl = /* @__PURE__ */ Ve(sl, [["__scopeId", "data-v-8487462d"]]), il = { key: 0 }, ul = {
|
|
@@ -1726,95 +1726,95 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
1726
1726
|
}, vl = {
|
|
1727
1727
|
key: 0,
|
|
1728
1728
|
class: "atable-filters-row"
|
|
1729
|
-
},
|
|
1729
|
+
}, ml = {
|
|
1730
1730
|
key: 2,
|
|
1731
1731
|
class: "row-actions-header"
|
|
1732
|
-
},
|
|
1732
|
+
}, pl = {
|
|
1733
1733
|
key: 3,
|
|
1734
1734
|
class: "row-actions-header"
|
|
1735
|
-
}, gn = /* @__PURE__ */
|
|
1735
|
+
}, gn = /* @__PURE__ */ oe({
|
|
1736
1736
|
__name: "ATableHeader",
|
|
1737
1737
|
props: {
|
|
1738
1738
|
columns: {},
|
|
1739
1739
|
store: {}
|
|
1740
1740
|
},
|
|
1741
1741
|
setup(e) {
|
|
1742
|
-
const t = e, n =
|
|
1742
|
+
const t = e, n = T(() => t.columns.filter((l) => l.filterable)), o = T(() => t.store.config.value?.rowActions?.enabled ?? !1), a = T(() => t.store.config.value?.rowActions?.position ?? "before-index"), r = (l) => t.store.sortByColumn(l), s = (l) => {
|
|
1743
1743
|
for (const u of l) {
|
|
1744
1744
|
if (u.borderBoxSize.length === 0) continue;
|
|
1745
|
-
const i = u.borderBoxSize[0].inlineSize,
|
|
1746
|
-
typeof
|
|
1745
|
+
const i = u.borderBoxSize[0].inlineSize, d = Number(u.target.dataset.colindex), m = t.store.columns[d]?.width;
|
|
1746
|
+
typeof m == "number" && m !== i && t.store.resizeColumn(d, i);
|
|
1747
1747
|
}
|
|
1748
1748
|
};
|
|
1749
|
-
return (l, u) => t.columns.length ? (
|
|
1750
|
-
|
|
1751
|
-
o.value && a.value === "before-index" ? (
|
|
1749
|
+
return (l, u) => t.columns.length ? (h(), b("thead", il, [
|
|
1750
|
+
w("tr", ul, [
|
|
1751
|
+
o.value && a.value === "before-index" ? (h(), b("th", {
|
|
1752
1752
|
key: 0,
|
|
1753
|
-
class:
|
|
1754
|
-
}, null, 2)) :
|
|
1755
|
-
t.store.zeroColumn ? (
|
|
1753
|
+
class: se(["row-actions-header", { "sticky-column": a.value === "before-index" }])
|
|
1754
|
+
}, null, 2)) : Y("", !0),
|
|
1755
|
+
t.store.zeroColumn ? (h(), b("th", {
|
|
1756
1756
|
key: 1,
|
|
1757
1757
|
id: "header-index",
|
|
1758
|
-
class:
|
|
1758
|
+
class: se([[
|
|
1759
1759
|
t.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1760
1760
|
t.store.isTreeView ? "tree-index" : "",
|
|
1761
1761
|
t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1762
1762
|
], "list-index"])
|
|
1763
|
-
}, null, 2)) :
|
|
1764
|
-
o.value && a.value === "after-index" ? (
|
|
1765
|
-
(
|
|
1763
|
+
}, null, 2)) : Y("", !0),
|
|
1764
|
+
o.value && a.value === "after-index" ? (h(), b("th", cl)) : Y("", !0),
|
|
1765
|
+
(h(!0), b(X, null, ve(t.columns, (i, d) => K((h(), b("th", {
|
|
1766
1766
|
key: i.name,
|
|
1767
|
-
"data-colindex":
|
|
1767
|
+
"data-colindex": d,
|
|
1768
1768
|
tabindex: "-1",
|
|
1769
|
-
style:
|
|
1770
|
-
class:
|
|
1771
|
-
onClick: (
|
|
1769
|
+
style: be(t.store.getHeaderCellStyle(i)),
|
|
1770
|
+
class: se(`${i.pinned ? "sticky-column" : ""} ${i.sortable === !1 ? "" : "cursor-pointer"}`),
|
|
1771
|
+
onClick: (m) => i.sortable !== !1 ? r(d) : void 0
|
|
1772
1772
|
}, [
|
|
1773
1773
|
he(l.$slots, "default", {}, () => [
|
|
1774
|
-
Dt(
|
|
1774
|
+
Dt(N(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)
|
|
1775
1775
|
])
|
|
1776
1776
|
], 14, dl)), [
|
|
1777
1777
|
[V(qo), s]
|
|
1778
1778
|
])), 128)),
|
|
1779
|
-
o.value && a.value === "end" ? (
|
|
1779
|
+
o.value && a.value === "end" ? (h(), b("th", fl)) : Y("", !0)
|
|
1780
1780
|
]),
|
|
1781
|
-
n.value.length > 0 ? (
|
|
1782
|
-
o.value && a.value === "before-index" ? (
|
|
1781
|
+
n.value.length > 0 ? (h(), b("tr", vl, [
|
|
1782
|
+
o.value && a.value === "before-index" ? (h(), b("th", {
|
|
1783
1783
|
key: 0,
|
|
1784
|
-
class:
|
|
1785
|
-
}, null, 2)) :
|
|
1786
|
-
t.store.zeroColumn ? (
|
|
1784
|
+
class: se(["row-actions-header", { "sticky-column": a.value === "before-index" }])
|
|
1785
|
+
}, null, 2)) : Y("", !0),
|
|
1786
|
+
t.store.zeroColumn ? (h(), b("th", {
|
|
1787
1787
|
key: 1,
|
|
1788
|
-
class:
|
|
1788
|
+
class: se([[
|
|
1789
1789
|
t.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1790
1790
|
t.store.isTreeView ? "tree-index" : "",
|
|
1791
1791
|
t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1792
1792
|
], "list-index"])
|
|
1793
|
-
}, null, 2)) :
|
|
1794
|
-
o.value && a.value === "after-index" ? (
|
|
1795
|
-
(
|
|
1793
|
+
}, null, 2)) : Y("", !0),
|
|
1794
|
+
o.value && a.value === "after-index" ? (h(), b("th", ml)) : Y("", !0),
|
|
1795
|
+
(h(!0), b(X, null, ve(t.columns, (i, d) => (h(), b("th", {
|
|
1796
1796
|
key: `filter-${i.name}`,
|
|
1797
|
-
class:
|
|
1798
|
-
style:
|
|
1797
|
+
class: se(`${i.pinned ? "sticky-column" : ""}`),
|
|
1798
|
+
style: be(t.store.getHeaderCellStyle(i))
|
|
1799
1799
|
}, [
|
|
1800
|
-
i.filterable ? (
|
|
1800
|
+
i.filterable ? (h(), pe(rl, {
|
|
1801
1801
|
key: 0,
|
|
1802
1802
|
column: i,
|
|
1803
|
-
"col-index":
|
|
1803
|
+
"col-index": d,
|
|
1804
1804
|
store: t.store
|
|
1805
|
-
}, null, 8, ["column", "col-index", "store"])) :
|
|
1805
|
+
}, null, 8, ["column", "col-index", "store"])) : Y("", !0)
|
|
1806
1806
|
], 6))), 128)),
|
|
1807
|
-
o.value && a.value === "end" ? (
|
|
1808
|
-
])) :
|
|
1809
|
-
])) :
|
|
1807
|
+
o.value && a.value === "end" ? (h(), b("th", pl)) : Y("", !0)
|
|
1808
|
+
])) : Y("", !0)
|
|
1809
|
+
])) : Y("", !0);
|
|
1810
1810
|
}
|
|
1811
|
-
}), wn = /* @__PURE__ */
|
|
1811
|
+
}), wn = /* @__PURE__ */ oe({
|
|
1812
1812
|
__name: "ATableModal",
|
|
1813
1813
|
props: {
|
|
1814
1814
|
store: {}
|
|
1815
1815
|
},
|
|
1816
1816
|
setup(e) {
|
|
1817
|
-
const t = fe("amodal"), { width: n, height: o } =
|
|
1817
|
+
const t = fe("amodal"), { width: n, height: o } = _e(t), a = T(() => {
|
|
1818
1818
|
if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
|
|
1819
1819
|
const r = e.store.modal.cell?.closest("table");
|
|
1820
1820
|
if (!r) return {};
|
|
@@ -1822,17 +1822,17 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
1822
1822
|
let u = e.store.modal.cell?.offsetTop || 0;
|
|
1823
1823
|
const i = r.querySelector("thead")?.offsetHeight || 0;
|
|
1824
1824
|
u += i, u = u + o.value < s ? u : u - (o.value + e.store.modal.height);
|
|
1825
|
-
let
|
|
1826
|
-
return
|
|
1827
|
-
left: `${
|
|
1825
|
+
let d = e.store.modal.cell?.offsetLeft || 0;
|
|
1826
|
+
return d = d + n.value <= l ? d : d - (n.value - e.store.modal.width), {
|
|
1827
|
+
left: `${d}px`,
|
|
1828
1828
|
top: `${u}px`
|
|
1829
1829
|
};
|
|
1830
1830
|
});
|
|
1831
|
-
return (r, s) => (
|
|
1831
|
+
return (r, s) => (h(), b("div", {
|
|
1832
1832
|
ref: "amodal",
|
|
1833
1833
|
class: "amodal",
|
|
1834
1834
|
tabindex: "-1",
|
|
1835
|
-
style:
|
|
1835
|
+
style: be(a.value),
|
|
1836
1836
|
onClick: s[0] || (s[0] = Ie(() => {
|
|
1837
1837
|
}, ["stop"])),
|
|
1838
1838
|
onInput: s[1] || (s[1] = Ie(() => {
|
|
@@ -1845,25 +1845,25 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
1845
1845
|
const t = e.id || fo();
|
|
1846
1846
|
return Dn(`table-${t}`, () => {
|
|
1847
1847
|
const n = () => {
|
|
1848
|
-
const
|
|
1848
|
+
const c = [Object.assign({}, { rowModified: !1 })], v = /* @__PURE__ */ new Set();
|
|
1849
1849
|
for (let A = 0; A < a.value.length; A++) {
|
|
1850
1850
|
const H = a.value[A];
|
|
1851
1851
|
H.parent !== null && H.parent !== void 0 && v.add(H.parent);
|
|
1852
1852
|
}
|
|
1853
|
-
const M = (A) => a.value[A]?.gantt !== void 0,
|
|
1853
|
+
const M = (A) => a.value[A]?.gantt !== void 0, _ = (A) => {
|
|
1854
1854
|
for (let H = 0; H < a.value.length; H++)
|
|
1855
|
-
if (a.value[H].parent === A && (M(H) ||
|
|
1855
|
+
if (a.value[H].parent === A && (M(H) || _(H)))
|
|
1856
1856
|
return !0;
|
|
1857
1857
|
return !1;
|
|
1858
1858
|
}, Z = (A) => {
|
|
1859
|
-
const H = r.value,
|
|
1860
|
-
if (!
|
|
1861
|
-
switch (
|
|
1859
|
+
const H = r.value, U = H.view === "tree" || H.view === "tree-gantt" ? H.defaultTreeExpansion : void 0;
|
|
1860
|
+
if (!U) return !0;
|
|
1861
|
+
switch (U) {
|
|
1862
1862
|
case "root":
|
|
1863
1863
|
return !1;
|
|
1864
1864
|
// Only root nodes are visible, all children start collapsed
|
|
1865
1865
|
case "branch":
|
|
1866
|
-
return
|
|
1866
|
+
return _(A);
|
|
1867
1867
|
case "leaf":
|
|
1868
1868
|
return !0;
|
|
1869
1869
|
// All nodes should be expanded
|
|
@@ -1872,168 +1872,168 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
1872
1872
|
}
|
|
1873
1873
|
};
|
|
1874
1874
|
for (let A = 0; A < a.value.length; A++) {
|
|
1875
|
-
const H = a.value[A],
|
|
1876
|
-
|
|
1875
|
+
const H = a.value[A], U = H.parent === null || H.parent === void 0, ae = v.has(A);
|
|
1876
|
+
c[A] = {
|
|
1877
1877
|
childrenOpen: Z(A),
|
|
1878
1878
|
expanded: !1,
|
|
1879
1879
|
indent: H.indent || 0,
|
|
1880
|
-
isParent:
|
|
1881
|
-
isRoot:
|
|
1880
|
+
isParent: ae,
|
|
1881
|
+
isRoot: U,
|
|
1882
1882
|
rowModified: !1,
|
|
1883
|
-
open:
|
|
1883
|
+
open: U,
|
|
1884
1884
|
// This will be recalculated later for non-root nodes
|
|
1885
1885
|
parent: H.parent
|
|
1886
1886
|
};
|
|
1887
1887
|
}
|
|
1888
|
-
return
|
|
1889
|
-
}, o = L(e.columns), a = L(e.rows), r = L(e.config || {}), s = L({}), l = L({}), u =
|
|
1890
|
-
const
|
|
1888
|
+
return c;
|
|
1889
|
+
}, o = L(e.columns), a = L(e.rows), r = L(e.config || {}), s = L({}), l = L({}), u = T(() => {
|
|
1890
|
+
const c = {};
|
|
1891
1891
|
for (const [v, M] of o.value.entries())
|
|
1892
|
-
for (const [
|
|
1893
|
-
|
|
1894
|
-
return
|
|
1895
|
-
}), i =
|
|
1892
|
+
for (const [_, Z] of a.value.entries())
|
|
1893
|
+
c[`${v}:${_}`] = Z[M.name];
|
|
1894
|
+
return c;
|
|
1895
|
+
}), i = T({
|
|
1896
1896
|
get: () => {
|
|
1897
|
-
const
|
|
1898
|
-
for (let v = 0; v <
|
|
1899
|
-
s.value[v] && (
|
|
1897
|
+
const c = n();
|
|
1898
|
+
for (let v = 0; v < c.length; v++)
|
|
1899
|
+
s.value[v] && (c[v].rowModified = s.value[v]), l.value[v] && (l.value[v].childrenOpen !== void 0 && (c[v].childrenOpen = l.value[v].childrenOpen), l.value[v].expanded !== void 0 && (c[v].expanded = l.value[v].expanded));
|
|
1900
1900
|
if (C.value) {
|
|
1901
|
-
const v = (M,
|
|
1902
|
-
const Z =
|
|
1901
|
+
const v = (M, _) => {
|
|
1902
|
+
const Z = _[M];
|
|
1903
1903
|
if (Z.isRoot || Z.parent === null || Z.parent === void 0)
|
|
1904
1904
|
return !0;
|
|
1905
1905
|
const A = Z.parent;
|
|
1906
|
-
return A < 0 || A >=
|
|
1906
|
+
return A < 0 || A >= _.length ? !1 : (_[A].childrenOpen || !1) && v(A, _);
|
|
1907
1907
|
};
|
|
1908
|
-
for (let M = 0; M <
|
|
1909
|
-
|
|
1908
|
+
for (let M = 0; M < c.length; M++)
|
|
1909
|
+
c[M].isRoot || (c[M].open = v(M, c));
|
|
1910
1910
|
}
|
|
1911
|
-
return
|
|
1911
|
+
return c;
|
|
1912
1912
|
},
|
|
1913
|
-
set: (
|
|
1914
|
-
JSON.stringify(
|
|
1913
|
+
set: (c) => {
|
|
1914
|
+
JSON.stringify(c) !== JSON.stringify(i.value) && (i.value = c);
|
|
1915
1915
|
}
|
|
1916
|
-
}),
|
|
1916
|
+
}), d = L(e.modal || { visible: !1 }), m = L({}), p = L([]), I = L([]), y = L([]), k = L({
|
|
1917
1917
|
column: null,
|
|
1918
1918
|
direction: null
|
|
1919
|
-
}), f = L({}),
|
|
1920
|
-
const
|
|
1921
|
-
return
|
|
1922
|
-
}), R =
|
|
1919
|
+
}), f = L({}), g = T(() => o.value.some((c) => c.pinned)), x = T(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), C = T(() => r.value.view === "tree" || r.value.view === "tree-gantt"), $ = T(() => {
|
|
1920
|
+
const c = r.value;
|
|
1921
|
+
return c.view === "gantt" || c.view === "tree-gantt" ? c.dependencyGraph !== !1 : !0;
|
|
1922
|
+
}), R = T(() => `${Math.ceil(a.value.length / 100 + 1)}ch`), S = T(
|
|
1923
1923
|
() => r.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(r.value.view) : !1
|
|
1924
|
-
), O =
|
|
1925
|
-
let
|
|
1924
|
+
), O = T(() => {
|
|
1925
|
+
let c = a.value.map((v, M) => ({
|
|
1926
1926
|
...v,
|
|
1927
1927
|
originalIndex: M
|
|
1928
1928
|
}));
|
|
1929
1929
|
if (Object.entries(f.value).forEach(([v, M]) => {
|
|
1930
|
-
const
|
|
1931
|
-
!Z || !(M.value || M.startValue || M.endValue || Z.filterType === "checkbox" && M.value !== void 0) || (
|
|
1930
|
+
const _ = parseInt(v), Z = o.value[_];
|
|
1931
|
+
!Z || !(M.value || M.startValue || M.endValue || Z.filterType === "checkbox" && M.value !== void 0) || (c = c.filter((A) => {
|
|
1932
1932
|
const H = A[Z.name];
|
|
1933
|
-
return
|
|
1933
|
+
return le(H, M, Z);
|
|
1934
1934
|
}));
|
|
1935
|
-
}),
|
|
1936
|
-
const v = o.value[
|
|
1937
|
-
|
|
1938
|
-
let A =
|
|
1935
|
+
}), k.value.column !== null && k.value.direction) {
|
|
1936
|
+
const v = o.value[k.value.column], M = k.value.direction;
|
|
1937
|
+
c.sort((_, Z) => {
|
|
1938
|
+
let A = _[v.name], H = Z[v.name];
|
|
1939
1939
|
A == null && (A = ""), H == null && (H = "");
|
|
1940
|
-
const
|
|
1941
|
-
if (!isNaN(
|
|
1942
|
-
return M === "asc" ?
|
|
1940
|
+
const U = Number(A), ae = Number(H);
|
|
1941
|
+
if (!isNaN(U) && !isNaN(ae) && A !== "" && H !== "")
|
|
1942
|
+
return M === "asc" ? U - ae : ae - U;
|
|
1943
1943
|
{
|
|
1944
|
-
const
|
|
1945
|
-
return M === "asc" ?
|
|
1944
|
+
const tt = String(A).toLowerCase(), Ut = String(H).toLowerCase();
|
|
1945
|
+
return M === "asc" ? tt.localeCompare(Ut) : Ut.localeCompare(tt);
|
|
1946
1946
|
}
|
|
1947
1947
|
});
|
|
1948
1948
|
}
|
|
1949
|
-
return
|
|
1950
|
-
}),
|
|
1951
|
-
const
|
|
1952
|
-
u.value[
|
|
1949
|
+
return c;
|
|
1950
|
+
}), W = (c, v) => u.value[`${c}:${v}`], me = (c, v, M) => {
|
|
1951
|
+
const _ = `${c}:${v}`, Z = o.value[c];
|
|
1952
|
+
u.value[_] !== M && (s.value[v] = !0), u.value[_] = M, a.value[v] = {
|
|
1953
1953
|
...a.value[v],
|
|
1954
1954
|
[Z.name]: M
|
|
1955
1955
|
};
|
|
1956
|
-
},
|
|
1957
|
-
a.value =
|
|
1958
|
-
},
|
|
1959
|
-
const
|
|
1960
|
-
u.value[
|
|
1961
|
-
}, ge = (
|
|
1962
|
-
const v = o.value.indexOf(
|
|
1956
|
+
}, j = (c) => {
|
|
1957
|
+
a.value = c;
|
|
1958
|
+
}, J = (c, v, M) => {
|
|
1959
|
+
const _ = `${c}:${v}`;
|
|
1960
|
+
u.value[_] !== M && (s.value[v] = !0, m.value[_] = M);
|
|
1961
|
+
}, ge = (c) => {
|
|
1962
|
+
const v = o.value.indexOf(c) === o.value.length - 1, M = r.value.fullWidth ? c.resizable && !v : c.resizable;
|
|
1963
1963
|
return {
|
|
1964
|
-
width:
|
|
1965
|
-
textAlign:
|
|
1964
|
+
width: c.width || "40ch",
|
|
1965
|
+
textAlign: c.align || "center",
|
|
1966
1966
|
...M && {
|
|
1967
1967
|
resize: "horizontal",
|
|
1968
1968
|
overflow: "hidden",
|
|
1969
1969
|
whiteSpace: "nowrap"
|
|
1970
1970
|
}
|
|
1971
1971
|
};
|
|
1972
|
-
}, de = (
|
|
1973
|
-
if (
|
|
1972
|
+
}, de = (c, v) => {
|
|
1973
|
+
if (c < 0 || c >= o.value.length) return;
|
|
1974
1974
|
const M = Math.max(v, 40);
|
|
1975
|
-
o.value[
|
|
1976
|
-
...o.value[
|
|
1975
|
+
o.value[c] = {
|
|
1976
|
+
...o.value[c],
|
|
1977
1977
|
width: `${M}px`
|
|
1978
1978
|
};
|
|
1979
|
-
}, Oe = (
|
|
1980
|
-
const v = a.value[
|
|
1981
|
-
return
|
|
1982
|
-
}, Re = (
|
|
1979
|
+
}, Oe = (c) => {
|
|
1980
|
+
const v = a.value[c];
|
|
1981
|
+
return x.value && v.gantt !== void 0;
|
|
1982
|
+
}, Re = (c) => !C.value || i.value[c].isRoot || i.value[c].open, Ye = (c) => !C.value && r.value.view !== "list-expansion" ? "" : C.value && (i.value[c].isRoot || i.value[c].isParent) ? i.value[c].childrenOpen ? "▼" : "►" : r.value.view === "list-expansion" ? i.value[c].expanded ? "▼" : "►" : "", Xe = (c) => {
|
|
1983
1983
|
if (C.value) {
|
|
1984
|
-
const v = l.value[
|
|
1985
|
-
l.value[
|
|
1984
|
+
const v = l.value[c] || {}, M = !(v.childrenOpen ?? i.value[c].childrenOpen);
|
|
1985
|
+
l.value[c] = {
|
|
1986
1986
|
...v,
|
|
1987
1987
|
childrenOpen: M
|
|
1988
|
-
}, M || Be(
|
|
1988
|
+
}, M || Be(c);
|
|
1989
1989
|
} else if (r.value.view === "list-expansion") {
|
|
1990
|
-
const v = l.value[
|
|
1991
|
-
l.value[
|
|
1990
|
+
const v = l.value[c] || {}, M = v.expanded ?? i.value[c].expanded;
|
|
1991
|
+
l.value[c] = {
|
|
1992
1992
|
...v,
|
|
1993
1993
|
expanded: !M
|
|
1994
1994
|
};
|
|
1995
1995
|
}
|
|
1996
|
-
}, Be = (
|
|
1996
|
+
}, Be = (c) => {
|
|
1997
1997
|
for (let v = 0; v < a.value.length; v++)
|
|
1998
|
-
if (i.value[v].parent ===
|
|
1998
|
+
if (i.value[v].parent === c) {
|
|
1999
1999
|
const M = l.value[v] || {};
|
|
2000
2000
|
l.value[v] = {
|
|
2001
2001
|
...M,
|
|
2002
2002
|
childrenOpen: !1
|
|
2003
2003
|
}, Be(v);
|
|
2004
2004
|
}
|
|
2005
|
-
}, je = (
|
|
2006
|
-
const M =
|
|
2007
|
-
return Fe(
|
|
2008
|
-
}, Fe = (
|
|
2009
|
-
const
|
|
2010
|
-
return A ? typeof A == "function" ? A(M, { table: u.value, row: Z, column:
|
|
2011
|
-
}, D = (
|
|
2012
|
-
|
|
2013
|
-
}, F = (
|
|
2014
|
-
const v = a.value[
|
|
2015
|
-
v && (
|
|
2016
|
-
},
|
|
2017
|
-
const v =
|
|
2018
|
-
v >= 0 ?
|
|
2019
|
-
},
|
|
2020
|
-
const v =
|
|
2021
|
-
v >= 0 &&
|
|
2022
|
-
},
|
|
2023
|
-
const v = I.value.findIndex((M) => M.id ===
|
|
2024
|
-
v >= 0 ? I.value[v] =
|
|
2025
|
-
},
|
|
2026
|
-
const v = I.value.findIndex((M) => M.id ===
|
|
2005
|
+
}, je = (c, v) => {
|
|
2006
|
+
const M = W(c, v);
|
|
2007
|
+
return Fe(c, v, M);
|
|
2008
|
+
}, Fe = (c, v, M) => {
|
|
2009
|
+
const _ = o.value[c], Z = a.value[v], A = _.format;
|
|
2010
|
+
return A ? typeof A == "function" ? A(M, { table: u.value, row: Z, column: _ }) : typeof A == "string" ? Function(`"use strict";return (${A})`)()(M, { table: u.value, row: Z, column: _ }) : M : M;
|
|
2011
|
+
}, D = (c) => {
|
|
2012
|
+
c.target instanceof Node && d.value.parent?.contains(c.target) || d.value.visible && (d.value.visible = !1);
|
|
2013
|
+
}, F = (c, v) => v && c === 0 && v > 0 ? `${v}ch` : "inherit", G = (c) => {
|
|
2014
|
+
const v = a.value[c.rowIndex]?.gantt;
|
|
2015
|
+
v && (c.type === "resize" ? c.edge === "start" ? (v.startIndex = c.newStart, v.endIndex = c.end, v.colspan = v.endIndex - v.startIndex) : c.edge === "end" && (v.startIndex = c.start, v.endIndex = c.newEnd, v.colspan = v.endIndex - v.startIndex) : c.type === "bar" && (v.startIndex = c.newStart, v.endIndex = c.newEnd, v.colspan = v.endIndex - v.startIndex));
|
|
2016
|
+
}, Q = (c) => {
|
|
2017
|
+
const v = p.value.findIndex((M) => M.id === c.id);
|
|
2018
|
+
v >= 0 ? p.value[v] = c : p.value.push(c);
|
|
2019
|
+
}, q = (c) => {
|
|
2020
|
+
const v = p.value.findIndex((M) => M.id === c);
|
|
2021
|
+
v >= 0 && p.value.splice(v, 1);
|
|
2022
|
+
}, re = (c) => {
|
|
2023
|
+
const v = I.value.findIndex((M) => M.id === c.id);
|
|
2024
|
+
v >= 0 ? I.value[v] = c : I.value.push(c);
|
|
2025
|
+
}, ke = (c) => {
|
|
2026
|
+
const v = I.value.findIndex((M) => M.id === c);
|
|
2027
2027
|
v >= 0 && I.value.splice(v, 1);
|
|
2028
|
-
}, Le = (
|
|
2029
|
-
const
|
|
2030
|
-
if (!
|
|
2028
|
+
}, Le = (c, v, M) => {
|
|
2029
|
+
const _ = I.value.find((H) => H.id === c), Z = I.value.find((H) => H.id === v);
|
|
2030
|
+
if (!_ || !Z)
|
|
2031
2031
|
return console.warn("Cannot create connection: handle not found"), null;
|
|
2032
2032
|
const A = {
|
|
2033
|
-
id: `connection-${
|
|
2033
|
+
id: `connection-${c}-${v}`,
|
|
2034
2034
|
from: {
|
|
2035
|
-
barId:
|
|
2036
|
-
side:
|
|
2035
|
+
barId: _.barId,
|
|
2036
|
+
side: _.side
|
|
2037
2037
|
},
|
|
2038
2038
|
to: {
|
|
2039
2039
|
barId: Z.barId,
|
|
@@ -2042,172 +2042,172 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
2042
2042
|
style: M?.style,
|
|
2043
2043
|
label: M?.label
|
|
2044
2044
|
};
|
|
2045
|
-
return
|
|
2046
|
-
},
|
|
2047
|
-
const v =
|
|
2048
|
-
return v >= 0 ? (
|
|
2049
|
-
}, B = (
|
|
2050
|
-
if (o.value[
|
|
2045
|
+
return y.value.push(A), A;
|
|
2046
|
+
}, P = (c) => {
|
|
2047
|
+
const v = y.value.findIndex((M) => M.id === c);
|
|
2048
|
+
return v >= 0 ? (y.value.splice(v, 1), !0) : !1;
|
|
2049
|
+
}, B = (c) => y.value.filter((v) => v.from.barId === c || v.to.barId === c), z = (c) => I.value.filter((v) => v.barId === c), ee = (c) => {
|
|
2050
|
+
if (o.value[c].sortable === !1) return;
|
|
2051
2051
|
let v;
|
|
2052
|
-
|
|
2053
|
-
},
|
|
2054
|
-
const
|
|
2055
|
-
if (!Z &&
|
|
2056
|
-
switch (
|
|
2052
|
+
k.value.column === c && k.value.direction === "asc" ? v = "desc" : v = "asc", k.value.column = c, k.value.direction = v;
|
|
2053
|
+
}, le = (c, v, M) => {
|
|
2054
|
+
const _ = M.filterType || "text", Z = v.value;
|
|
2055
|
+
if (!Z && _ !== "dateRange" && _ !== "checkbox") return !0;
|
|
2056
|
+
switch (_) {
|
|
2057
2057
|
case "text": {
|
|
2058
2058
|
let A = "";
|
|
2059
|
-
return typeof
|
|
2059
|
+
return typeof c == "object" && c !== null ? A = Object.values(c).join(" ") : A = String(c || ""), A.toLowerCase().includes(String(Z).toLowerCase());
|
|
2060
2060
|
}
|
|
2061
2061
|
case "number": {
|
|
2062
|
-
const A = Number(
|
|
2062
|
+
const A = Number(c), H = Number(Z);
|
|
2063
2063
|
return !isNaN(A) && !isNaN(H) && A === H;
|
|
2064
2064
|
}
|
|
2065
2065
|
case "select":
|
|
2066
|
-
return
|
|
2066
|
+
return c === Z;
|
|
2067
2067
|
case "checkbox":
|
|
2068
|
-
return Z === !0 ? !!
|
|
2068
|
+
return Z === !0 ? !!c : !0;
|
|
2069
2069
|
case "date": {
|
|
2070
2070
|
let A;
|
|
2071
|
-
if (typeof
|
|
2072
|
-
const
|
|
2073
|
-
A = new Date(
|
|
2071
|
+
if (typeof c == "number") {
|
|
2072
|
+
const U = new Date(c), ae = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2073
|
+
A = new Date(ae, U.getMonth(), U.getDate());
|
|
2074
2074
|
} else
|
|
2075
|
-
A = new Date(String(
|
|
2075
|
+
A = new Date(String(c));
|
|
2076
2076
|
const H = new Date(String(Z));
|
|
2077
2077
|
return A.toDateString() === H.toDateString();
|
|
2078
2078
|
}
|
|
2079
2079
|
case "dateRange": {
|
|
2080
2080
|
const A = v.startValue, H = v.endValue;
|
|
2081
2081
|
if (!A && !H) return !0;
|
|
2082
|
-
let
|
|
2083
|
-
if (typeof
|
|
2084
|
-
const
|
|
2085
|
-
|
|
2082
|
+
let U;
|
|
2083
|
+
if (typeof c == "number") {
|
|
2084
|
+
const ae = new Date(c), tt = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2085
|
+
U = new Date(tt, ae.getMonth(), ae.getDate());
|
|
2086
2086
|
} else
|
|
2087
|
-
|
|
2088
|
-
return !(A &&
|
|
2087
|
+
U = new Date(String(c));
|
|
2088
|
+
return !(A && U < new Date(String(A)) || H && U > new Date(String(H)));
|
|
2089
2089
|
}
|
|
2090
2090
|
default:
|
|
2091
2091
|
return !0;
|
|
2092
2092
|
}
|
|
2093
|
-
},
|
|
2094
|
-
!v.value && !v.startValue && !v.endValue ? delete f.value[
|
|
2095
|
-
},
|
|
2096
|
-
delete f.value[
|
|
2097
|
-
}, ce = (
|
|
2093
|
+
}, te = (c, v) => {
|
|
2094
|
+
!v.value && !v.startValue && !v.endValue ? delete f.value[c] : f.value[c] = v;
|
|
2095
|
+
}, ie = (c) => {
|
|
2096
|
+
delete f.value[c];
|
|
2097
|
+
}, ce = (c, v = "end") => {
|
|
2098
2098
|
const M = {};
|
|
2099
2099
|
for (const Z of o.value)
|
|
2100
2100
|
M[Z.name] = "";
|
|
2101
|
-
|
|
2102
|
-
let
|
|
2103
|
-
return v === "start" ? (
|
|
2101
|
+
c && Object.assign(M, c);
|
|
2102
|
+
let _;
|
|
2103
|
+
return v === "start" ? (_ = 0, a.value.unshift(M)) : v === "end" ? (_ = a.value.length, a.value.push(M)) : (_ = Math.max(0, Math.min(v, a.value.length)), a.value.splice(_, 0, M)), _;
|
|
2104
2104
|
};
|
|
2105
2105
|
return {
|
|
2106
2106
|
// state
|
|
2107
2107
|
columns: o,
|
|
2108
2108
|
config: r,
|
|
2109
2109
|
connectionHandles: I,
|
|
2110
|
-
connectionPaths:
|
|
2110
|
+
connectionPaths: y,
|
|
2111
2111
|
display: i,
|
|
2112
2112
|
filterState: f,
|
|
2113
|
-
ganttBars:
|
|
2114
|
-
modal:
|
|
2113
|
+
ganttBars: p,
|
|
2114
|
+
modal: d,
|
|
2115
2115
|
rows: a,
|
|
2116
|
-
sortState:
|
|
2116
|
+
sortState: k,
|
|
2117
2117
|
table: u,
|
|
2118
|
-
updates:
|
|
2118
|
+
updates: m,
|
|
2119
2119
|
// getters
|
|
2120
2120
|
filteredRows: O,
|
|
2121
|
-
hasPinnedColumns:
|
|
2122
|
-
isGanttView:
|
|
2121
|
+
hasPinnedColumns: g,
|
|
2122
|
+
isGanttView: x,
|
|
2123
2123
|
isTreeView: C,
|
|
2124
|
-
isDependencyGraphEnabled:
|
|
2124
|
+
isDependencyGraphEnabled: $,
|
|
2125
2125
|
numberedRowWidth: R,
|
|
2126
2126
|
zeroColumn: S,
|
|
2127
2127
|
// actions
|
|
2128
2128
|
addRow: ce,
|
|
2129
|
-
clearFilter:
|
|
2129
|
+
clearFilter: ie,
|
|
2130
2130
|
closeModal: D,
|
|
2131
2131
|
createConnection: Le,
|
|
2132
|
-
deleteConnection:
|
|
2133
|
-
deleteRow: (
|
|
2134
|
-
if (
|
|
2132
|
+
deleteConnection: P,
|
|
2133
|
+
deleteRow: (c) => {
|
|
2134
|
+
if (c < 0 || c >= a.value.length)
|
|
2135
2135
|
return null;
|
|
2136
|
-
const [v] = a.value.splice(
|
|
2137
|
-
delete s.value[
|
|
2138
|
-
const M = {},
|
|
2136
|
+
const [v] = a.value.splice(c, 1);
|
|
2137
|
+
delete s.value[c], delete l.value[c];
|
|
2138
|
+
const M = {}, _ = {};
|
|
2139
2139
|
for (const [Z, A] of Object.entries(s.value)) {
|
|
2140
2140
|
const H = parseInt(Z);
|
|
2141
|
-
H >
|
|
2141
|
+
H > c ? M[H - 1] = A : M[H] = A;
|
|
2142
2142
|
}
|
|
2143
2143
|
for (const [Z, A] of Object.entries(l.value)) {
|
|
2144
2144
|
const H = parseInt(Z);
|
|
2145
|
-
H >
|
|
2145
|
+
H > c ? _[H - 1] = A : _[H] = A;
|
|
2146
2146
|
}
|
|
2147
|
-
return s.value = M, l.value =
|
|
2147
|
+
return s.value = M, l.value = _, v;
|
|
2148
2148
|
},
|
|
2149
|
-
duplicateRow: (
|
|
2150
|
-
if (
|
|
2149
|
+
duplicateRow: (c) => {
|
|
2150
|
+
if (c < 0 || c >= a.value.length)
|
|
2151
2151
|
return -1;
|
|
2152
|
-
const v = a.value[
|
|
2153
|
-
return a.value.splice(
|
|
2152
|
+
const v = a.value[c], M = JSON.parse(JSON.stringify(v)), _ = c + 1;
|
|
2153
|
+
return a.value.splice(_, 0, M), _;
|
|
2154
2154
|
},
|
|
2155
|
-
getCellData:
|
|
2155
|
+
getCellData: W,
|
|
2156
2156
|
getCellDisplayValue: je,
|
|
2157
2157
|
getConnectionsForBar: B,
|
|
2158
2158
|
getFormattedValue: Fe,
|
|
2159
|
-
getHandlesForBar:
|
|
2159
|
+
getHandlesForBar: z,
|
|
2160
2160
|
getHeaderCellStyle: ge,
|
|
2161
2161
|
getIndent: F,
|
|
2162
2162
|
getRowExpandSymbol: Ye,
|
|
2163
|
-
insertRowAbove: (
|
|
2164
|
-
const M = Math.max(0,
|
|
2163
|
+
insertRowAbove: (c, v) => {
|
|
2164
|
+
const M = Math.max(0, c);
|
|
2165
2165
|
return ce(v, M);
|
|
2166
2166
|
},
|
|
2167
|
-
insertRowBelow: (
|
|
2168
|
-
const M = Math.min(
|
|
2167
|
+
insertRowBelow: (c, v) => {
|
|
2168
|
+
const M = Math.min(c + 1, a.value.length);
|
|
2169
2169
|
return ce(v, M);
|
|
2170
2170
|
},
|
|
2171
2171
|
isRowGantt: Oe,
|
|
2172
2172
|
isRowVisible: Re,
|
|
2173
|
-
moveRow: (
|
|
2174
|
-
if (
|
|
2173
|
+
moveRow: (c, v) => {
|
|
2174
|
+
if (c < 0 || c >= a.value.length || v < 0 || v >= a.value.length || c === v)
|
|
2175
2175
|
return !1;
|
|
2176
|
-
const [M] = a.value.splice(
|
|
2176
|
+
const [M] = a.value.splice(c, 1);
|
|
2177
2177
|
a.value.splice(v, 0, M);
|
|
2178
|
-
const
|
|
2178
|
+
const _ = {}, Z = {};
|
|
2179
2179
|
for (const [A, H] of Object.entries(s.value)) {
|
|
2180
|
-
const
|
|
2181
|
-
let
|
|
2182
|
-
|
|
2180
|
+
const U = parseInt(A);
|
|
2181
|
+
let ae = U;
|
|
2182
|
+
U === c ? ae = v : c < v ? U > c && U <= v && (ae = U - 1) : U >= v && U < c && (ae = U + 1), _[ae] = H;
|
|
2183
2183
|
}
|
|
2184
2184
|
for (const [A, H] of Object.entries(l.value)) {
|
|
2185
|
-
const
|
|
2186
|
-
let
|
|
2187
|
-
|
|
2185
|
+
const U = parseInt(A);
|
|
2186
|
+
let ae = U;
|
|
2187
|
+
U === c ? ae = v : c < v ? U > c && U <= v && (ae = U - 1) : U >= v && U < c && (ae = U + 1), Z[ae] = H;
|
|
2188
2188
|
}
|
|
2189
|
-
return s.value =
|
|
2189
|
+
return s.value = _, l.value = Z, !0;
|
|
2190
2190
|
},
|
|
2191
|
-
registerConnectionHandle:
|
|
2192
|
-
registerGanttBar:
|
|
2191
|
+
registerConnectionHandle: re,
|
|
2192
|
+
registerGanttBar: Q,
|
|
2193
2193
|
resizeColumn: de,
|
|
2194
|
-
setCellData:
|
|
2195
|
-
setCellText:
|
|
2196
|
-
setFilter:
|
|
2197
|
-
sortByColumn:
|
|
2194
|
+
setCellData: me,
|
|
2195
|
+
setCellText: J,
|
|
2196
|
+
setFilter: te,
|
|
2197
|
+
sortByColumn: ee,
|
|
2198
2198
|
toggleRowExpand: Xe,
|
|
2199
|
-
unregisterConnectionHandle:
|
|
2200
|
-
unregisterGanttBar:
|
|
2201
|
-
updateGanttBar:
|
|
2202
|
-
updateRows:
|
|
2199
|
+
unregisterConnectionHandle: ke,
|
|
2200
|
+
unregisterGanttBar: q,
|
|
2201
|
+
updateGanttBar: G,
|
|
2202
|
+
updateRows: j
|
|
2203
2203
|
};
|
|
2204
2204
|
})();
|
|
2205
2205
|
}, gl = {
|
|
2206
2206
|
class: "atable-container",
|
|
2207
2207
|
style: { position: "relative" }
|
|
2208
|
-
}, wl = /* @__PURE__ */
|
|
2208
|
+
}, wl = /* @__PURE__ */ oe({
|
|
2209
2209
|
__name: "ATable",
|
|
2210
|
-
props: /* @__PURE__ */
|
|
2210
|
+
props: /* @__PURE__ */ xe({
|
|
2211
2211
|
id: { default: "" },
|
|
2212
2212
|
config: { default: () => new Object() }
|
|
2213
2213
|
}, {
|
|
@@ -2216,114 +2216,114 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
2216
2216
|
columns: { required: !0 },
|
|
2217
2217
|
columnsModifiers: {}
|
|
2218
2218
|
}),
|
|
2219
|
-
emits: /* @__PURE__ */
|
|
2219
|
+
emits: /* @__PURE__ */ xe(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move"], ["update:rows", "update:columns"]),
|
|
2220
2220
|
setup(e, { expose: t, emit: n }) {
|
|
2221
|
-
const o =
|
|
2222
|
-
l.$onAction(({ name:
|
|
2223
|
-
if (
|
|
2224
|
-
const [
|
|
2225
|
-
|
|
2226
|
-
o.value = [...
|
|
2221
|
+
const o = Me(e, "rows"), a = Me(e, "columns"), r = n, s = fe("table"), l = hl({ columns: a.value, rows: o.value, id: e.id, config: e.config });
|
|
2222
|
+
l.$onAction(({ name: y, store: k, args: f, after: g }) => {
|
|
2223
|
+
if (y === "setCellData" || y === "setCellText") {
|
|
2224
|
+
const [x, C, $] = f, R = k.getCellData(x, C);
|
|
2225
|
+
g(() => {
|
|
2226
|
+
o.value = [...k.rows], r("cellUpdate", { colIndex: x, rowIndex: C, newValue: $, oldValue: R });
|
|
2227
2227
|
});
|
|
2228
|
-
} else if (
|
|
2229
|
-
const [
|
|
2228
|
+
} else if (y === "updateGanttBar") {
|
|
2229
|
+
const [x] = f;
|
|
2230
2230
|
let C = !1;
|
|
2231
|
-
|
|
2232
|
-
r("gantt:drag",
|
|
2231
|
+
x.type === "resize" ? C = x.oldColspan !== x.newColspan : x.type === "bar" && (C = x.oldStart !== x.newStart || x.oldEnd !== x.newEnd), C && g(() => {
|
|
2232
|
+
r("gantt:drag", x);
|
|
2233
2233
|
});
|
|
2234
|
-
} else
|
|
2235
|
-
a.value = [...
|
|
2234
|
+
} else y === "resizeColumn" && g(() => {
|
|
2235
|
+
a.value = [...k.columns], r("columns:update", [...k.columns]);
|
|
2236
2236
|
});
|
|
2237
|
-
}),
|
|
2237
|
+
}), ne(
|
|
2238
2238
|
() => o.value,
|
|
2239
|
-
(
|
|
2240
|
-
JSON.stringify(
|
|
2239
|
+
(y) => {
|
|
2240
|
+
JSON.stringify(y) !== JSON.stringify(l.rows) && (l.rows = [...y]);
|
|
2241
2241
|
},
|
|
2242
2242
|
{ deep: !0 }
|
|
2243
|
-
),
|
|
2243
|
+
), ne(
|
|
2244
2244
|
a,
|
|
2245
|
-
(
|
|
2246
|
-
JSON.stringify(
|
|
2245
|
+
(y) => {
|
|
2246
|
+
JSON.stringify(y) !== JSON.stringify(l.columns) && (l.columns = [...y], r("columns:update", [...y]));
|
|
2247
2247
|
},
|
|
2248
2248
|
{ deep: !0 }
|
|
2249
2249
|
), Ee(() => {
|
|
2250
|
-
a.value.some((
|
|
2250
|
+
a.value.some((y) => y.pinned) && (i(), l.isTreeView && pn(s, i, { childList: !0, subtree: !0 }));
|
|
2251
2251
|
});
|
|
2252
|
-
const u =
|
|
2253
|
-
const
|
|
2254
|
-
for (const [
|
|
2255
|
-
const
|
|
2256
|
-
|
|
2252
|
+
const u = T(() => l.columns.filter((y) => y.pinned).length), i = () => {
|
|
2253
|
+
const y = s.value, k = y?.rows[0], f = y?.rows[1], g = k ? Array.from(k.cells) : [];
|
|
2254
|
+
for (const [x, C] of g.entries()) {
|
|
2255
|
+
const $ = f?.cells[x];
|
|
2256
|
+
$ && (C.style.width = `${$.offsetWidth}px`);
|
|
2257
2257
|
}
|
|
2258
|
-
for (const
|
|
2258
|
+
for (const x of y?.rows || []) {
|
|
2259
2259
|
let C = 0;
|
|
2260
|
-
const
|
|
2261
|
-
for (const R of
|
|
2262
|
-
(R.classList.contains("sticky-column") || R.classList.contains("sticky-index")) && (R.style.left = `${C}px`, C += R.offsetWidth,
|
|
2263
|
-
|
|
2260
|
+
const $ = [];
|
|
2261
|
+
for (const R of x.cells)
|
|
2262
|
+
(R.classList.contains("sticky-column") || R.classList.contains("sticky-index")) && (R.style.left = `${C}px`, C += R.offsetWidth, $.push(R));
|
|
2263
|
+
$.length > 0 && $[$.length - 1].classList.add("sticky-column-edge");
|
|
2264
2264
|
}
|
|
2265
2265
|
};
|
|
2266
|
-
window.addEventListener("keydown", (
|
|
2267
|
-
if (
|
|
2266
|
+
window.addEventListener("keydown", (y) => {
|
|
2267
|
+
if (y.key === "Escape" && l.modal.visible) {
|
|
2268
2268
|
l.modal.visible = !1;
|
|
2269
|
-
const
|
|
2270
|
-
|
|
2271
|
-
|
|
2269
|
+
const k = l.modal.parent;
|
|
2270
|
+
k && vt().then(() => {
|
|
2271
|
+
k.focus();
|
|
2272
2272
|
});
|
|
2273
2273
|
}
|
|
2274
2274
|
});
|
|
2275
|
-
const
|
|
2276
|
-
if (!
|
|
2275
|
+
const d = (y) => {
|
|
2276
|
+
if (!y.gantt || u.value === 0)
|
|
2277
2277
|
return l.columns;
|
|
2278
|
-
const
|
|
2278
|
+
const k = [];
|
|
2279
2279
|
for (let f = 0; f < u.value; f++) {
|
|
2280
|
-
const
|
|
2281
|
-
|
|
2280
|
+
const g = { ...l.columns[f] };
|
|
2281
|
+
g.originalIndex = f, k.push(g);
|
|
2282
2282
|
}
|
|
2283
|
-
return
|
|
2283
|
+
return k.push({
|
|
2284
2284
|
...l.columns[u.value],
|
|
2285
2285
|
isGantt: !0,
|
|
2286
|
-
colspan:
|
|
2286
|
+
colspan: y.gantt?.colspan || l.columns.length - u.value,
|
|
2287
2287
|
originalIndex: u.value,
|
|
2288
2288
|
width: "auto"
|
|
2289
2289
|
// TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
|
|
2290
|
-
}),
|
|
2291
|
-
},
|
|
2292
|
-
r("connection:event", { type: "create", connection:
|
|
2293
|
-
},
|
|
2294
|
-
r("connection:event", { type: "delete", connection:
|
|
2295
|
-
}, I = (
|
|
2296
|
-
switch (
|
|
2290
|
+
}), k;
|
|
2291
|
+
}, m = (y) => {
|
|
2292
|
+
r("connection:event", { type: "create", connection: y });
|
|
2293
|
+
}, p = (y) => {
|
|
2294
|
+
r("connection:event", { type: "delete", connection: y });
|
|
2295
|
+
}, I = (y, k) => {
|
|
2296
|
+
switch (y) {
|
|
2297
2297
|
case "add": {
|
|
2298
|
-
const f = l.addRow({},
|
|
2299
|
-
o.value = [...l.rows], r("row:add", { rowIndex: f, row:
|
|
2298
|
+
const f = l.addRow({}, k + 1), g = l.rows[f];
|
|
2299
|
+
o.value = [...l.rows], r("row:add", { rowIndex: f, row: g });
|
|
2300
2300
|
break;
|
|
2301
2301
|
}
|
|
2302
2302
|
case "delete": {
|
|
2303
|
-
const f = l.deleteRow(
|
|
2304
|
-
f && (o.value = [...l.rows], r("row:delete", { rowIndex:
|
|
2303
|
+
const f = l.deleteRow(k);
|
|
2304
|
+
f && (o.value = [...l.rows], r("row:delete", { rowIndex: k, row: f }));
|
|
2305
2305
|
break;
|
|
2306
2306
|
}
|
|
2307
2307
|
case "duplicate": {
|
|
2308
|
-
const f = l.duplicateRow(
|
|
2308
|
+
const f = l.duplicateRow(k);
|
|
2309
2309
|
if (f >= 0) {
|
|
2310
|
-
const
|
|
2311
|
-
o.value = [...l.rows], r("row:duplicate", { sourceIndex:
|
|
2310
|
+
const g = l.rows[f];
|
|
2311
|
+
o.value = [...l.rows], r("row:duplicate", { sourceIndex: k, newIndex: f, row: g });
|
|
2312
2312
|
}
|
|
2313
2313
|
break;
|
|
2314
2314
|
}
|
|
2315
2315
|
case "insertAbove": {
|
|
2316
|
-
const f = l.insertRowAbove(
|
|
2317
|
-
o.value = [...l.rows], r("row:insert-above", { targetIndex:
|
|
2316
|
+
const f = l.insertRowAbove(k), g = l.rows[f];
|
|
2317
|
+
o.value = [...l.rows], r("row:insert-above", { targetIndex: k, newIndex: f, row: g });
|
|
2318
2318
|
break;
|
|
2319
2319
|
}
|
|
2320
2320
|
case "insertBelow": {
|
|
2321
|
-
const f = l.insertRowBelow(
|
|
2322
|
-
o.value = [...l.rows], r("row:insert-below", { targetIndex:
|
|
2321
|
+
const f = l.insertRowBelow(k), g = l.rows[f];
|
|
2322
|
+
o.value = [...l.rows], r("row:insert-below", { targetIndex: k, newIndex: f, row: g });
|
|
2323
2323
|
break;
|
|
2324
2324
|
}
|
|
2325
2325
|
case "move": {
|
|
2326
|
-
r("row:move", { fromIndex:
|
|
2326
|
+
r("row:move", { fromIndex: k, toIndex: -1 });
|
|
2327
2327
|
break;
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
@@ -2341,58 +2341,58 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
2341
2341
|
insertRowAbove: l.insertRowAbove,
|
|
2342
2342
|
insertRowBelow: l.insertRowBelow,
|
|
2343
2343
|
moveRow: l.moveRow
|
|
2344
|
-
}), (
|
|
2345
|
-
|
|
2344
|
+
}), (y, k) => (h(), b("div", gl, [
|
|
2345
|
+
K((h(), b("table", {
|
|
2346
2346
|
ref: "table",
|
|
2347
2347
|
class: "atable",
|
|
2348
|
-
style:
|
|
2348
|
+
style: be({
|
|
2349
2349
|
width: V(l).config.fullWidth ? "100%" : "auto"
|
|
2350
2350
|
})
|
|
2351
2351
|
}, [
|
|
2352
|
-
he(
|
|
2353
|
-
|
|
2352
|
+
he(y.$slots, "header", { data: V(l) }, () => [
|
|
2353
|
+
ct(gn, {
|
|
2354
2354
|
columns: V(l).columns,
|
|
2355
2355
|
store: V(l)
|
|
2356
2356
|
}, null, 8, ["columns", "store"])
|
|
2357
2357
|
], !0),
|
|
2358
|
-
|
|
2359
|
-
he(
|
|
2360
|
-
(
|
|
2361
|
-
key: `${f.originalIndex}-${
|
|
2358
|
+
w("tbody", null, [
|
|
2359
|
+
he(y.$slots, "body", { data: V(l) }, () => [
|
|
2360
|
+
(h(!0), b(X, null, ve(V(l).filteredRows, (f, g) => (h(), pe(hn, {
|
|
2361
|
+
key: `${f.originalIndex}-${g}`,
|
|
2362
2362
|
row: f,
|
|
2363
2363
|
rowIndex: f.originalIndex,
|
|
2364
2364
|
store: V(l),
|
|
2365
2365
|
"onRow:action": I
|
|
2366
2366
|
}, {
|
|
2367
|
-
default:
|
|
2368
|
-
(
|
|
2369
|
-
key:
|
|
2367
|
+
default: $t(() => [
|
|
2368
|
+
(h(!0), b(X, null, ve(d(f), (x, C) => (h(), b(X, {
|
|
2369
|
+
key: x.name
|
|
2370
2370
|
}, [
|
|
2371
|
-
|
|
2371
|
+
x.isGantt ? (h(), pe(Ue(x.ganttComponent || "AGanttCell"), {
|
|
2372
2372
|
key: 0,
|
|
2373
2373
|
store: V(l),
|
|
2374
2374
|
"columns-count": V(l).columns.length - u.value,
|
|
2375
2375
|
color: f.gantt?.color,
|
|
2376
2376
|
start: f.gantt?.startIndex,
|
|
2377
2377
|
end: f.gantt?.endIndex,
|
|
2378
|
-
colspan:
|
|
2379
|
-
pinned:
|
|
2378
|
+
colspan: x.colspan,
|
|
2379
|
+
pinned: x.pinned,
|
|
2380
2380
|
rowIndex: f.originalIndex,
|
|
2381
|
-
colIndex:
|
|
2382
|
-
style:
|
|
2383
|
-
textAlign:
|
|
2384
|
-
minWidth:
|
|
2381
|
+
colIndex: x.originalIndex ?? C,
|
|
2382
|
+
style: be({
|
|
2383
|
+
textAlign: x?.align || "center",
|
|
2384
|
+
minWidth: x?.width || "40ch",
|
|
2385
2385
|
width: V(l).config.fullWidth ? "auto" : null
|
|
2386
2386
|
}),
|
|
2387
|
-
"onConnection:create":
|
|
2388
|
-
}, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (
|
|
2387
|
+
"onConnection:create": m
|
|
2388
|
+
}, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (h(), pe(Ue(x.cellComponent || "ACell"), {
|
|
2389
2389
|
key: 1,
|
|
2390
2390
|
store: V(l),
|
|
2391
|
-
pinned:
|
|
2391
|
+
pinned: x.pinned,
|
|
2392
2392
|
rowIndex: f.originalIndex,
|
|
2393
2393
|
colIndex: C,
|
|
2394
|
-
style:
|
|
2395
|
-
textAlign:
|
|
2394
|
+
style: be({
|
|
2395
|
+
textAlign: x?.align || "center",
|
|
2396
2396
|
width: V(l).config.fullWidth ? "auto" : null
|
|
2397
2397
|
}),
|
|
2398
2398
|
spellcheck: "false"
|
|
@@ -2403,11 +2403,11 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
2403
2403
|
}, 1032, ["row", "rowIndex", "store"]))), 128))
|
|
2404
2404
|
], !0)
|
|
2405
2405
|
]),
|
|
2406
|
-
he(
|
|
2407
|
-
he(
|
|
2408
|
-
|
|
2409
|
-
default:
|
|
2410
|
-
(
|
|
2406
|
+
he(y.$slots, "footer", { data: V(l) }, void 0, !0),
|
|
2407
|
+
he(y.$slots, "modal", { data: V(l) }, () => [
|
|
2408
|
+
K(ct(wn, { store: V(l) }, {
|
|
2409
|
+
default: $t(() => [
|
|
2410
|
+
(h(), pe(Ue(V(l).modal.component), ft({
|
|
2411
2411
|
key: `${V(l).modal.rowIndex}:${V(l).modal.colIndex}`,
|
|
2412
2412
|
"col-index": V(l).modal.colIndex,
|
|
2413
2413
|
"row-index": V(l).modal.rowIndex,
|
|
@@ -2422,43 +2422,43 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
|
2422
2422
|
], 4)), [
|
|
2423
2423
|
[V(zo), V(l).closeModal]
|
|
2424
2424
|
]),
|
|
2425
|
-
V(l).isGanttView && V(l).isDependencyGraphEnabled ? (
|
|
2425
|
+
V(l).isGanttView && V(l).isDependencyGraphEnabled ? (h(), pe(tl, {
|
|
2426
2426
|
key: 0,
|
|
2427
2427
|
store: V(l),
|
|
2428
|
-
"onConnection:delete":
|
|
2429
|
-
}, null, 8, ["store"])) :
|
|
2428
|
+
"onConnection:delete": p
|
|
2429
|
+
}, null, 8, ["store"])) : Y("", !0)
|
|
2430
2430
|
]));
|
|
2431
2431
|
}
|
|
2432
|
-
}), yl = /* @__PURE__ */ Ve(wl, [["__scopeId", "data-v-3d00d51b"]]),
|
|
2433
|
-
function
|
|
2434
|
-
return
|
|
2435
|
-
|
|
2432
|
+
}), yl = /* @__PURE__ */ Ve(wl, [["__scopeId", "data-v-3d00d51b"]]), bl = {}, xl = { class: "aloading" }, kl = { class: "aloading-header" };
|
|
2433
|
+
function Il(e, t) {
|
|
2434
|
+
return h(), b("div", xl, [
|
|
2435
|
+
w("h2", kl, [
|
|
2436
2436
|
he(e.$slots, "default", {}, void 0, !0)
|
|
2437
2437
|
]),
|
|
2438
|
-
t[0] || (t[0] =
|
|
2438
|
+
t[0] || (t[0] = w("div", { class: "aloading-bar" }, null, -1))
|
|
2439
2439
|
]);
|
|
2440
2440
|
}
|
|
2441
|
-
const Ml = /* @__PURE__ */ Ve(
|
|
2442
|
-
function
|
|
2443
|
-
return
|
|
2444
|
-
|
|
2441
|
+
const Ml = /* @__PURE__ */ Ve(bl, [["render", Il], ["__scopeId", "data-v-a930a25b"]]), Cl = {}, El = { class: "aloading" }, Al = { class: "aloading-header" };
|
|
2442
|
+
function $l(e, t) {
|
|
2443
|
+
return h(), b("div", El, [
|
|
2444
|
+
w("h2", Al, [
|
|
2445
2445
|
he(e.$slots, "default", {}, void 0, !0)
|
|
2446
2446
|
]),
|
|
2447
|
-
t[0] || (t[0] =
|
|
2447
|
+
t[0] || (t[0] = w("div", { class: "aloading-bar" }, null, -1))
|
|
2448
2448
|
]);
|
|
2449
2449
|
}
|
|
2450
|
-
const
|
|
2450
|
+
const Tl = /* @__PURE__ */ Ve(Cl, [["render", $l], ["__scopeId", "data-v-e1165876"]]);
|
|
2451
2451
|
function Dl(e) {
|
|
2452
|
-
e.component("ACell", ho), e.component("AExpansionRow",
|
|
2452
|
+
e.component("ACell", ho), e.component("AExpansionRow", xo), e.component("AGanttCell", $o), e.component("ARow", hn), e.component("ARowActions", it), e.component("ATable", yl), e.component("ATableHeader", gn), e.component("ATableLoading", Ml), e.component("ATableLoadingBar", Tl), e.component("ATableModal", wn);
|
|
2453
2453
|
}
|
|
2454
|
-
const Sl = { class: "aform_form-element" }, Rl = ["for"],
|
|
2454
|
+
const Sl = { class: "aform_form-element" }, Rl = { class: "aform_field-label" }, Ll = { class: "aform_display-value" }, Hl = ["for"], Vl = { class: "aform_checkbox-container aform_input-field" }, _l = ["id", "disabled", "required"], Pl = ["innerHTML"], Ol = /* @__PURE__ */ oe({
|
|
2455
2455
|
__name: "ACheckbox",
|
|
2456
|
-
props: /* @__PURE__ */
|
|
2456
|
+
props: /* @__PURE__ */ xe({
|
|
2457
2457
|
schema: {},
|
|
2458
2458
|
label: {},
|
|
2459
2459
|
mask: {},
|
|
2460
2460
|
required: { type: Boolean },
|
|
2461
|
-
|
|
2461
|
+
mode: {},
|
|
2462
2462
|
uuid: {},
|
|
2463
2463
|
validation: { default: () => ({ errorMessage: " " }) }
|
|
2464
2464
|
}, {
|
|
@@ -2467,67 +2467,83 @@ const Sl = { class: "aform_form-element" }, Rl = ["for"], Ll = { class: "aform_c
|
|
|
2467
2467
|
}),
|
|
2468
2468
|
emits: ["update:modelValue"],
|
|
2469
2469
|
setup(e) {
|
|
2470
|
-
const t =
|
|
2471
|
-
return (n, o) => (
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2470
|
+
const t = Me(e, "modelValue");
|
|
2471
|
+
return (n, o) => (h(), b("div", Sl, [
|
|
2472
|
+
e.mode === "display" ? (h(), b(X, { key: 0 }, [
|
|
2473
|
+
w("label", Rl, N(e.label), 1),
|
|
2474
|
+
w("span", Ll, N(t.value ? "✓" : "✗"), 1)
|
|
2475
|
+
], 64)) : (h(), b(X, { key: 1 }, [
|
|
2476
|
+
w("label", {
|
|
2477
|
+
class: "aform_field-label",
|
|
2478
|
+
for: e.uuid
|
|
2479
|
+
}, N(e.label), 9, Hl),
|
|
2480
|
+
w("span", Vl, [
|
|
2481
|
+
K(w("input", {
|
|
2482
|
+
id: e.uuid,
|
|
2483
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
|
|
2484
|
+
type: "checkbox",
|
|
2485
|
+
class: "aform_checkbox",
|
|
2486
|
+
disabled: e.mode === "read",
|
|
2487
|
+
required: e.required
|
|
2488
|
+
}, null, 8, _l), [
|
|
2489
|
+
[un, t.value]
|
|
2490
|
+
])
|
|
2491
|
+
]),
|
|
2492
|
+
K(w("p", {
|
|
2493
|
+
class: "aform_error",
|
|
2494
|
+
innerHTML: e.validation.errorMessage
|
|
2495
|
+
}, null, 8, Pl), [
|
|
2496
|
+
[Ce, e.validation.errorMessage]
|
|
2486
2497
|
])
|
|
2487
|
-
])
|
|
2488
|
-
J(y("p", {
|
|
2489
|
-
class: "aform_error",
|
|
2490
|
-
innerHTML: e.validation.errorMessage
|
|
2491
|
-
}, null, 8, Vl), [
|
|
2492
|
-
[Ce, e.validation.errorMessage]
|
|
2493
|
-
])
|
|
2498
|
+
], 64))
|
|
2494
2499
|
]));
|
|
2495
2500
|
}
|
|
2496
|
-
}),
|
|
2501
|
+
}), Te = (e, t) => {
|
|
2497
2502
|
const n = e.__vccOpts || e;
|
|
2498
2503
|
for (const [o, a] of t)
|
|
2499
2504
|
n[o] = a;
|
|
2500
2505
|
return n;
|
|
2501
|
-
},
|
|
2506
|
+
}, Bl = /* @__PURE__ */ Te(Ol, [["__scopeId", "data-v-cc185b72"]]), Fl = /* @__PURE__ */ oe({
|
|
2502
2507
|
__name: "AComboBox",
|
|
2503
|
-
props:
|
|
2508
|
+
props: {
|
|
2509
|
+
schema: {},
|
|
2510
|
+
label: {},
|
|
2511
|
+
mask: {},
|
|
2512
|
+
required: { type: Boolean },
|
|
2513
|
+
mode: {},
|
|
2514
|
+
uuid: {},
|
|
2515
|
+
validation: {},
|
|
2516
|
+
event: {},
|
|
2517
|
+
cellData: {},
|
|
2518
|
+
tableID: {}
|
|
2519
|
+
},
|
|
2504
2520
|
setup(e) {
|
|
2505
2521
|
return (t, n) => {
|
|
2506
2522
|
const o = dn("ATableModal");
|
|
2507
|
-
return
|
|
2523
|
+
return h(), pe(o, {
|
|
2508
2524
|
event: e.event,
|
|
2509
2525
|
"cell-data": e.cellData,
|
|
2510
2526
|
class: "amodal"
|
|
2511
2527
|
}, {
|
|
2512
|
-
default:
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2528
|
+
default: $t(() => [...n[0] || (n[0] = [
|
|
2529
|
+
w("div", null, [
|
|
2530
|
+
w("input", { type: "text" }),
|
|
2531
|
+
w("input", { type: "text" }),
|
|
2532
|
+
w("input", { type: "text" })
|
|
2517
2533
|
], -1)
|
|
2518
2534
|
])]),
|
|
2519
2535
|
_: 1
|
|
2520
2536
|
}, 8, ["event", "cell-data"]);
|
|
2521
2537
|
};
|
|
2522
2538
|
}
|
|
2523
|
-
}),
|
|
2539
|
+
}), Zl = { class: "aform_display-value" }, Nl = ["id", "disabled", "required"], Ul = ["for"], Wl = ["innerHTML"], Gl = /* @__PURE__ */ oe({
|
|
2524
2540
|
__name: "ADate",
|
|
2525
|
-
props: /* @__PURE__ */
|
|
2541
|
+
props: /* @__PURE__ */ xe({
|
|
2526
2542
|
schema: {},
|
|
2527
2543
|
label: { default: "Date" },
|
|
2528
2544
|
mask: {},
|
|
2529
2545
|
required: { type: Boolean },
|
|
2530
|
-
|
|
2546
|
+
mode: {},
|
|
2531
2547
|
uuid: {},
|
|
2532
2548
|
validation: { default: () => ({ errorMessage: " " }) }
|
|
2533
2549
|
}, {
|
|
@@ -2538,35 +2554,40 @@ const Sl = { class: "aform_form-element" }, Rl = ["for"], Ll = { class: "aform_c
|
|
|
2538
2554
|
}),
|
|
2539
2555
|
emits: ["update:modelValue"],
|
|
2540
2556
|
setup(e) {
|
|
2541
|
-
const t =
|
|
2557
|
+
const t = Me(e, "modelValue", {
|
|
2542
2558
|
// format the date to be compatible with the native input datepicker
|
|
2543
2559
|
set: (a) => new Date(a).toISOString().split("T")[0]
|
|
2544
2560
|
}), n = fe("date"), o = () => {
|
|
2545
2561
|
n.value && "showPicker" in HTMLInputElement.prototype && n.value.showPicker();
|
|
2546
2562
|
};
|
|
2547
|
-
return (a, r) => (
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2563
|
+
return (a, r) => (h(), b("div", null, [
|
|
2564
|
+
e.mode === "display" ? (h(), b(X, { key: 0 }, [
|
|
2565
|
+
w("span", Zl, N(t.value ? new Date(t.value).toLocaleDateString() : ""), 1),
|
|
2566
|
+
w("label", null, N(e.label), 1)
|
|
2567
|
+
], 64)) : (h(), b(X, { key: 1 }, [
|
|
2568
|
+
K(w("input", {
|
|
2569
|
+
id: e.uuid,
|
|
2570
|
+
ref: "date",
|
|
2571
|
+
"onUpdate:modelValue": r[0] || (r[0] = (s) => t.value = s),
|
|
2572
|
+
type: "date",
|
|
2573
|
+
disabled: e.mode === "read",
|
|
2574
|
+
required: e.required,
|
|
2575
|
+
onClick: o
|
|
2576
|
+
}, null, 8, Nl), [
|
|
2577
|
+
[we, t.value]
|
|
2578
|
+
]),
|
|
2579
|
+
w("label", { for: e.uuid }, N(e.label), 9, Ul),
|
|
2580
|
+
K(w("p", {
|
|
2581
|
+
innerHTML: e.validation.errorMessage
|
|
2582
|
+
}, null, 8, Wl), [
|
|
2583
|
+
[Ce, e.validation.errorMessage]
|
|
2584
|
+
])
|
|
2585
|
+
], 64))
|
|
2565
2586
|
]));
|
|
2566
2587
|
}
|
|
2567
|
-
}),
|
|
2588
|
+
}), zl = /* @__PURE__ */ Te(Gl, [["__scopeId", "data-v-425aef3c"]]);
|
|
2568
2589
|
function yn(e, t) {
|
|
2569
|
-
return mt() ? (
|
|
2590
|
+
return mt() ? (pt(e, t), !0) : !1;
|
|
2570
2591
|
}
|
|
2571
2592
|
// @__NO_SIDE_EFFECTS__
|
|
2572
2593
|
function jt() {
|
|
@@ -2586,11 +2607,11 @@ function jt() {
|
|
|
2586
2607
|
}
|
|
2587
2608
|
};
|
|
2588
2609
|
}
|
|
2589
|
-
const
|
|
2610
|
+
const bn = typeof window < "u" && typeof document < "u";
|
|
2590
2611
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2591
|
-
const
|
|
2592
|
-
},
|
|
2593
|
-
function
|
|
2612
|
+
const ql = Object.prototype.toString, Yl = (e) => ql.call(e) === "[object Object]", Je = () => {
|
|
2613
|
+
}, Xl = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
2614
|
+
function jl(...e) {
|
|
2594
2615
|
if (e.length !== 1) return cn(...e);
|
|
2595
2616
|
const t = e[0];
|
|
2596
2617
|
return typeof t == "function" ? Rt(St(() => ({
|
|
@@ -2598,68 +2619,68 @@ function ql(...e) {
|
|
|
2598
2619
|
set: Je
|
|
2599
2620
|
}))) : L(t);
|
|
2600
2621
|
}
|
|
2601
|
-
function
|
|
2622
|
+
function It(e) {
|
|
2602
2623
|
return Array.isArray(e) ? e : [e];
|
|
2603
2624
|
}
|
|
2604
|
-
function
|
|
2605
|
-
return
|
|
2625
|
+
function Jl(e, t, n) {
|
|
2626
|
+
return ne(e, t, {
|
|
2606
2627
|
...n,
|
|
2607
2628
|
immediate: !0
|
|
2608
2629
|
});
|
|
2609
2630
|
}
|
|
2610
|
-
const
|
|
2631
|
+
const xn = bn ? window : void 0, Ql = bn ? window.document : void 0;
|
|
2611
2632
|
function Ne(e) {
|
|
2612
2633
|
var t;
|
|
2613
2634
|
const n = E(e);
|
|
2614
2635
|
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
2615
2636
|
}
|
|
2616
2637
|
function Mt(...e) {
|
|
2617
|
-
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n =
|
|
2618
|
-
const o =
|
|
2638
|
+
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = T(() => {
|
|
2639
|
+
const o = It(E(e[0])).filter((a) => a != null);
|
|
2619
2640
|
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
2620
2641
|
});
|
|
2621
|
-
return
|
|
2642
|
+
return Jl(() => {
|
|
2622
2643
|
var o, a;
|
|
2623
2644
|
return [
|
|
2624
|
-
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => Ne(r))) !== null && o !== void 0 ? o : [
|
|
2625
|
-
|
|
2626
|
-
|
|
2645
|
+
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => Ne(r))) !== null && o !== void 0 ? o : [xn].filter((r) => r != null),
|
|
2646
|
+
It(E(n.value ? e[1] : e[0])),
|
|
2647
|
+
It(V(n.value ? e[2] : e[1])),
|
|
2627
2648
|
E(n.value ? e[3] : e[2])
|
|
2628
2649
|
];
|
|
2629
2650
|
}, ([o, a, r, s], l, u) => {
|
|
2630
2651
|
if (!o?.length || !a?.length || !r?.length) return;
|
|
2631
|
-
const i =
|
|
2652
|
+
const i = Yl(s) ? { ...s } : s, d = o.flatMap((m) => a.flatMap((p) => r.map((I) => t(m, p, I, i))));
|
|
2632
2653
|
u(() => {
|
|
2633
|
-
|
|
2654
|
+
d.forEach((m) => m());
|
|
2634
2655
|
});
|
|
2635
2656
|
}, { flush: "post" });
|
|
2636
2657
|
}
|
|
2637
2658
|
function Jt(e, t, n = {}) {
|
|
2638
|
-
const { window: o =
|
|
2659
|
+
const { window: o = xn, ignore: a = [], capture: r = !0, detectIframe: s = !1, controls: l = !1 } = n;
|
|
2639
2660
|
if (!o) return l ? {
|
|
2640
2661
|
stop: Je,
|
|
2641
2662
|
cancel: Je,
|
|
2642
2663
|
trigger: Je
|
|
2643
2664
|
} : Je;
|
|
2644
2665
|
let u = !0;
|
|
2645
|
-
const i = (f) => E(a).some((
|
|
2646
|
-
if (typeof
|
|
2666
|
+
const i = (f) => E(a).some((g) => {
|
|
2667
|
+
if (typeof g == "string") return Array.from(o.document.querySelectorAll(g)).some((x) => x === f.target || f.composedPath().includes(x));
|
|
2647
2668
|
{
|
|
2648
|
-
const
|
|
2649
|
-
return
|
|
2669
|
+
const x = Ne(g);
|
|
2670
|
+
return x && (f.target === x || f.composedPath().includes(x));
|
|
2650
2671
|
}
|
|
2651
2672
|
});
|
|
2652
|
-
function
|
|
2653
|
-
const
|
|
2654
|
-
return
|
|
2673
|
+
function d(f) {
|
|
2674
|
+
const g = E(f);
|
|
2675
|
+
return g && g.$.subTree.shapeFlag === 16;
|
|
2655
2676
|
}
|
|
2656
|
-
function
|
|
2657
|
-
const
|
|
2658
|
-
return C == null || !Array.isArray(C) ? !1 : C.some((
|
|
2677
|
+
function m(f, g) {
|
|
2678
|
+
const x = E(f), C = x.$.subTree && x.$.subTree.children;
|
|
2679
|
+
return C == null || !Array.isArray(C) ? !1 : C.some(($) => $.el === g.target || g.composedPath().includes($.el));
|
|
2659
2680
|
}
|
|
2660
|
-
const
|
|
2661
|
-
const
|
|
2662
|
-
if (f.target != null && !(!(
|
|
2681
|
+
const p = (f) => {
|
|
2682
|
+
const g = Ne(e);
|
|
2683
|
+
if (f.target != null && !(!(g instanceof Element) && d(e) && m(e, f)) && !(!g || g === f.target || f.composedPath().includes(g))) {
|
|
2663
2684
|
if ("detail" in f && f.detail === 0 && (u = !i(f)), !u) {
|
|
2664
2685
|
u = !0;
|
|
2665
2686
|
return;
|
|
@@ -2668,79 +2689,79 @@ function Jt(e, t, n = {}) {
|
|
|
2668
2689
|
}
|
|
2669
2690
|
};
|
|
2670
2691
|
let I = !1;
|
|
2671
|
-
const
|
|
2692
|
+
const y = [
|
|
2672
2693
|
Mt(o, "click", (f) => {
|
|
2673
2694
|
I || (I = !0, setTimeout(() => {
|
|
2674
2695
|
I = !1;
|
|
2675
|
-
}, 0),
|
|
2696
|
+
}, 0), p(f));
|
|
2676
2697
|
}, {
|
|
2677
2698
|
passive: !0,
|
|
2678
2699
|
capture: r
|
|
2679
2700
|
}),
|
|
2680
2701
|
Mt(o, "pointerdown", (f) => {
|
|
2681
|
-
const
|
|
2682
|
-
u = !i(f) && !!(
|
|
2702
|
+
const g = Ne(e);
|
|
2703
|
+
u = !i(f) && !!(g && !f.composedPath().includes(g));
|
|
2683
2704
|
}, { passive: !0 }),
|
|
2684
2705
|
s && Mt(o, "blur", (f) => {
|
|
2685
2706
|
setTimeout(() => {
|
|
2686
|
-
var
|
|
2687
|
-
const
|
|
2688
|
-
((
|
|
2707
|
+
var g;
|
|
2708
|
+
const x = Ne(e);
|
|
2709
|
+
((g = o.document.activeElement) === null || g === void 0 ? void 0 : g.tagName) === "IFRAME" && !x?.contains(o.document.activeElement) && t(f);
|
|
2689
2710
|
}, 0);
|
|
2690
2711
|
}, { passive: !0 })
|
|
2691
|
-
].filter(Boolean),
|
|
2712
|
+
].filter(Boolean), k = () => y.forEach((f) => f());
|
|
2692
2713
|
return l ? {
|
|
2693
|
-
stop:
|
|
2714
|
+
stop: k,
|
|
2694
2715
|
cancel: () => {
|
|
2695
2716
|
u = !1;
|
|
2696
2717
|
},
|
|
2697
2718
|
trigger: (f) => {
|
|
2698
|
-
u = !0,
|
|
2719
|
+
u = !0, p(f), u = !1;
|
|
2699
2720
|
}
|
|
2700
|
-
} :
|
|
2721
|
+
} : k;
|
|
2701
2722
|
}
|
|
2702
|
-
const
|
|
2723
|
+
const Kl = {
|
|
2703
2724
|
multiple: !0,
|
|
2704
2725
|
accept: "*",
|
|
2705
2726
|
reset: !1,
|
|
2706
2727
|
directory: !1
|
|
2707
2728
|
};
|
|
2708
|
-
function
|
|
2729
|
+
function ea(e) {
|
|
2709
2730
|
if (!e) return null;
|
|
2710
2731
|
if (e instanceof FileList) return e;
|
|
2711
2732
|
const t = new DataTransfer();
|
|
2712
2733
|
for (const n of e) t.items.add(n);
|
|
2713
2734
|
return t.files;
|
|
2714
2735
|
}
|
|
2715
|
-
function
|
|
2716
|
-
const { document: t =
|
|
2717
|
-
var
|
|
2718
|
-
const
|
|
2719
|
-
return
|
|
2736
|
+
function ta(e = {}) {
|
|
2737
|
+
const { document: t = Ql } = e, n = L(ea(e.initialFiles)), { on: o, trigger: a } = /* @__PURE__ */ jt(), { on: r, trigger: s } = /* @__PURE__ */ jt(), l = T(() => {
|
|
2738
|
+
var m;
|
|
2739
|
+
const p = (m = Ne(e.input)) !== null && m !== void 0 ? m : t ? t.createElement("input") : void 0;
|
|
2740
|
+
return p && (p.type = "file", p.onchange = (I) => {
|
|
2720
2741
|
n.value = I.target.files, a(n.value);
|
|
2721
|
-
},
|
|
2742
|
+
}, p.oncancel = () => {
|
|
2722
2743
|
s();
|
|
2723
|
-
}),
|
|
2744
|
+
}), p;
|
|
2724
2745
|
}), u = () => {
|
|
2725
2746
|
n.value = null, l.value && l.value.value && (l.value.value = "", a(null));
|
|
2726
|
-
}, i = (
|
|
2727
|
-
const
|
|
2728
|
-
|
|
2729
|
-
},
|
|
2730
|
-
const
|
|
2731
|
-
if (!
|
|
2747
|
+
}, i = (m) => {
|
|
2748
|
+
const p = l.value;
|
|
2749
|
+
p && (p.multiple = E(m.multiple), p.accept = E(m.accept), p.webkitdirectory = E(m.directory), Xl(m, "capture") && (p.capture = E(m.capture)));
|
|
2750
|
+
}, d = (m) => {
|
|
2751
|
+
const p = l.value;
|
|
2752
|
+
if (!p) return;
|
|
2732
2753
|
const I = {
|
|
2733
|
-
...
|
|
2754
|
+
...Kl,
|
|
2734
2755
|
...e,
|
|
2735
|
-
...
|
|
2756
|
+
...m
|
|
2736
2757
|
};
|
|
2737
|
-
i(I), E(I.reset) && u(),
|
|
2758
|
+
i(I), E(I.reset) && u(), p.click();
|
|
2738
2759
|
};
|
|
2739
|
-
return
|
|
2760
|
+
return gt(() => {
|
|
2740
2761
|
i(e);
|
|
2741
2762
|
}), {
|
|
2742
2763
|
files: Rt(n),
|
|
2743
|
-
open:
|
|
2764
|
+
open: d,
|
|
2744
2765
|
reset: u,
|
|
2745
2766
|
onCancel: r,
|
|
2746
2767
|
onChange: o
|
|
@@ -2750,10 +2771,10 @@ function Ct(e) {
|
|
|
2750
2771
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
2751
2772
|
}
|
|
2752
2773
|
const Et = /* @__PURE__ */ new WeakMap();
|
|
2753
|
-
function
|
|
2754
|
-
const n =
|
|
2774
|
+
function na(e, t = !1) {
|
|
2775
|
+
const n = ue(t);
|
|
2755
2776
|
let o = "";
|
|
2756
|
-
|
|
2777
|
+
ne(jl(e), (s) => {
|
|
2757
2778
|
const l = Ct(E(s));
|
|
2758
2779
|
if (l) {
|
|
2759
2780
|
const u = l;
|
|
@@ -2768,7 +2789,7 @@ function Kl(e, t = !1) {
|
|
|
2768
2789
|
const s = Ct(E(e));
|
|
2769
2790
|
!s || !n.value || (s.style.overflow = o, Et.delete(s), n.value = !1);
|
|
2770
2791
|
};
|
|
2771
|
-
return yn(r),
|
|
2792
|
+
return yn(r), T({
|
|
2772
2793
|
get() {
|
|
2773
2794
|
return n.value;
|
|
2774
2795
|
},
|
|
@@ -2777,7 +2798,7 @@ function Kl(e, t = !1) {
|
|
|
2777
2798
|
}
|
|
2778
2799
|
});
|
|
2779
2800
|
}
|
|
2780
|
-
const At = /* @__PURE__ */ new WeakMap(),
|
|
2801
|
+
const At = /* @__PURE__ */ new WeakMap(), oa = {
|
|
2781
2802
|
mounted(e, t) {
|
|
2782
2803
|
const n = !t.modifiers.bubble;
|
|
2783
2804
|
let o;
|
|
@@ -2793,27 +2814,36 @@ const At = /* @__PURE__ */ new WeakMap(), ea = {
|
|
|
2793
2814
|
t && typeof t == "function" ? t() : t?.stop(), At.delete(e);
|
|
2794
2815
|
}
|
|
2795
2816
|
};
|
|
2796
|
-
function
|
|
2817
|
+
function la() {
|
|
2797
2818
|
let e = !1;
|
|
2798
|
-
const t =
|
|
2819
|
+
const t = ue(!1);
|
|
2799
2820
|
return (n, o) => {
|
|
2800
2821
|
if (t.value = o.value, e) return;
|
|
2801
2822
|
e = !0;
|
|
2802
|
-
const a =
|
|
2803
|
-
|
|
2823
|
+
const a = na(n, o.value);
|
|
2824
|
+
ne(t, (r) => a.value = r);
|
|
2804
2825
|
};
|
|
2805
2826
|
}
|
|
2806
|
-
|
|
2807
|
-
const
|
|
2827
|
+
la();
|
|
2828
|
+
const aa = {
|
|
2829
|
+
key: 0,
|
|
2830
|
+
class: "input-wrapper"
|
|
2831
|
+
}, sa = { class: "aform_display-value" }, ra = { class: "input-wrapper" }, ia = ["disabled"], ua = {
|
|
2808
2832
|
id: "autocomplete-results",
|
|
2809
2833
|
class: "autocomplete-results"
|
|
2810
|
-
},
|
|
2834
|
+
}, ca = {
|
|
2811
2835
|
key: 0,
|
|
2812
2836
|
class: "loading autocomplete-result"
|
|
2813
|
-
},
|
|
2837
|
+
}, da = ["onClick"], fa = /* @__PURE__ */ oe({
|
|
2814
2838
|
__name: "ADropdown",
|
|
2815
|
-
props: /* @__PURE__ */
|
|
2839
|
+
props: /* @__PURE__ */ xe({
|
|
2840
|
+
schema: {},
|
|
2816
2841
|
label: {},
|
|
2842
|
+
mask: {},
|
|
2843
|
+
required: { type: Boolean },
|
|
2844
|
+
mode: {},
|
|
2845
|
+
uuid: {},
|
|
2846
|
+
validation: {},
|
|
2817
2847
|
items: { default: () => [] },
|
|
2818
2848
|
isAsync: { type: Boolean, default: !1 },
|
|
2819
2849
|
filterFunction: { type: Function, default: void 0 }
|
|
@@ -2823,7 +2853,7 @@ const na = { class: "input-wrapper" }, oa = {
|
|
|
2823
2853
|
}),
|
|
2824
2854
|
emits: ["update:modelValue"],
|
|
2825
2855
|
setup(e) {
|
|
2826
|
-
const t =
|
|
2856
|
+
const t = Me(e, "modelValue"), n = rn({
|
|
2827
2857
|
activeItemIndex: null,
|
|
2828
2858
|
open: !1,
|
|
2829
2859
|
loading: !1,
|
|
@@ -2832,8 +2862,8 @@ const na = { class: "input-wrapper" }, oa = {
|
|
|
2832
2862
|
if (n.open = !0, n.activeItemIndex = null, e.filterFunction) {
|
|
2833
2863
|
e.isAsync && (n.loading = !0);
|
|
2834
2864
|
try {
|
|
2835
|
-
const
|
|
2836
|
-
n.results =
|
|
2865
|
+
const p = await e.filterFunction(t.value || "");
|
|
2866
|
+
n.results = p || [];
|
|
2837
2867
|
} catch {
|
|
2838
2868
|
n.results = [];
|
|
2839
2869
|
} finally {
|
|
@@ -2841,179 +2871,184 @@ const na = { class: "input-wrapper" }, oa = {
|
|
|
2841
2871
|
}
|
|
2842
2872
|
} else
|
|
2843
2873
|
u();
|
|
2844
|
-
}, r = (
|
|
2845
|
-
t.value =
|
|
2874
|
+
}, r = (p) => {
|
|
2875
|
+
t.value = p, l(p);
|
|
2846
2876
|
}, s = () => {
|
|
2847
2877
|
n.activeItemIndex = e.isAsync ? null : t.value && e.items?.indexOf(t.value) || null, n.open = !0, n.results = e.isAsync ? [] : e.items;
|
|
2848
|
-
}, l = (
|
|
2849
|
-
n.activeItemIndex = null, n.open = !1, e.items?.includes(
|
|
2878
|
+
}, l = (p) => {
|
|
2879
|
+
n.activeItemIndex = null, n.open = !1, e.items?.includes(p || t.value || "") || (t.value = "");
|
|
2850
2880
|
}, u = () => {
|
|
2851
|
-
t.value ? n.results = e.items?.filter((
|
|
2881
|
+
t.value ? n.results = e.items?.filter((p) => p.toLowerCase().includes((t.value ?? "").toLowerCase())) : n.results = e.items;
|
|
2852
2882
|
}, i = () => {
|
|
2853
|
-
const
|
|
2883
|
+
const p = n.results?.length || 0;
|
|
2854
2884
|
if (n.activeItemIndex != null) {
|
|
2855
2885
|
const I = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
|
|
2856
|
-
n.activeItemIndex = (I + 1) %
|
|
2886
|
+
n.activeItemIndex = (I + 1) % p;
|
|
2857
2887
|
} else
|
|
2858
2888
|
n.activeItemIndex = 0;
|
|
2859
|
-
},
|
|
2860
|
-
const
|
|
2889
|
+
}, d = () => {
|
|
2890
|
+
const p = n.results?.length || 0;
|
|
2861
2891
|
if (n.activeItemIndex != null) {
|
|
2862
2892
|
const I = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
|
|
2863
2893
|
I === 0 ? n.activeItemIndex = null : n.activeItemIndex = I - 1;
|
|
2864
2894
|
} else
|
|
2865
|
-
n.activeItemIndex =
|
|
2866
|
-
},
|
|
2895
|
+
n.activeItemIndex = p - 1;
|
|
2896
|
+
}, m = () => {
|
|
2867
2897
|
if (n.results) {
|
|
2868
|
-
const
|
|
2898
|
+
const p = n.activeItemIndex || 0, I = n.results[p];
|
|
2869
2899
|
r(I);
|
|
2870
2900
|
}
|
|
2871
2901
|
n.activeItemIndex = 0;
|
|
2872
2902
|
};
|
|
2873
|
-
return (
|
|
2874
|
-
|
|
2903
|
+
return (p, I) => e.mode === "display" ? (h(), b("div", aa, [
|
|
2904
|
+
w("span", sa, N(t.value ?? ""), 1),
|
|
2905
|
+
w("label", null, N(e.label), 1)
|
|
2906
|
+
])) : K((h(), b("div", {
|
|
2907
|
+
key: 1,
|
|
2908
|
+
class: se(["autocomplete", { isOpen: n.open }])
|
|
2875
2909
|
}, [
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
"onUpdate:modelValue": I[0] || (I[0] = (
|
|
2910
|
+
w("div", ra, [
|
|
2911
|
+
K(w("input", {
|
|
2912
|
+
"onUpdate:modelValue": I[0] || (I[0] = (y) => t.value = y),
|
|
2879
2913
|
type: "text",
|
|
2914
|
+
disabled: e.mode === "read",
|
|
2880
2915
|
onInput: a,
|
|
2881
2916
|
onFocus: s,
|
|
2882
2917
|
onKeydown: [
|
|
2883
2918
|
Ze(i, ["down"]),
|
|
2884
|
-
Ze(
|
|
2885
|
-
Ze(
|
|
2919
|
+
Ze(d, ["up"]),
|
|
2920
|
+
Ze(m, ["enter"]),
|
|
2886
2921
|
Ze(o, ["esc"]),
|
|
2887
2922
|
Ze(o, ["tab"])
|
|
2888
2923
|
]
|
|
2889
|
-
}, null,
|
|
2924
|
+
}, null, 40, ia), [
|
|
2890
2925
|
[we, t.value]
|
|
2891
2926
|
]),
|
|
2892
|
-
|
|
2893
|
-
n.loading ? (
|
|
2894
|
-
key:
|
|
2895
|
-
class:
|
|
2896
|
-
onClick: Ie((f) => r(
|
|
2897
|
-
},
|
|
2927
|
+
K(w("ul", ua, [
|
|
2928
|
+
n.loading ? (h(), b("li", ca, "Loading results...")) : (h(!0), b(X, { key: 1 }, ve(n.results, (y, k) => (h(), b("li", {
|
|
2929
|
+
key: y,
|
|
2930
|
+
class: se(["autocomplete-result", { "is-active": k === n.activeItemIndex }]),
|
|
2931
|
+
onClick: Ie((f) => r(y), ["stop"])
|
|
2932
|
+
}, N(y), 11, da))), 128))
|
|
2898
2933
|
], 512), [
|
|
2899
2934
|
[Ce, n.open]
|
|
2900
2935
|
]),
|
|
2901
|
-
|
|
2936
|
+
w("label", null, N(e.label), 1)
|
|
2902
2937
|
])
|
|
2903
2938
|
], 2)), [
|
|
2904
|
-
[V(
|
|
2939
|
+
[V(oa), o]
|
|
2905
2940
|
]);
|
|
2906
2941
|
}
|
|
2907
|
-
}),
|
|
2908
|
-
function
|
|
2909
|
-
return mt() ? (
|
|
2942
|
+
}), va = /* @__PURE__ */ Te(fa, [["__scopeId", "data-v-8728dc72"]]);
|
|
2943
|
+
function kn(e, t) {
|
|
2944
|
+
return mt() ? (pt(e, t), !0) : !1;
|
|
2910
2945
|
}
|
|
2911
|
-
const
|
|
2946
|
+
const ma = typeof window < "u" && typeof document < "u";
|
|
2912
2947
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2913
|
-
const
|
|
2948
|
+
const pa = (e) => e != null, ha = Object.prototype.toString, ga = (e) => ha.call(e) === "[object Object]", wa = () => {
|
|
2914
2949
|
};
|
|
2915
|
-
function
|
|
2950
|
+
function ut(e) {
|
|
2916
2951
|
return Array.isArray(e) ? e : [e];
|
|
2917
2952
|
}
|
|
2918
|
-
function
|
|
2919
|
-
return
|
|
2953
|
+
function ya(e, t, n) {
|
|
2954
|
+
return ne(e, t, {
|
|
2920
2955
|
...n,
|
|
2921
2956
|
immediate: !0
|
|
2922
2957
|
});
|
|
2923
2958
|
}
|
|
2924
|
-
const qe =
|
|
2959
|
+
const qe = ma ? window : void 0;
|
|
2925
2960
|
function Ge(e) {
|
|
2926
2961
|
var t;
|
|
2927
2962
|
const n = E(e);
|
|
2928
2963
|
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
2929
2964
|
}
|
|
2930
|
-
function
|
|
2931
|
-
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n =
|
|
2932
|
-
const o =
|
|
2965
|
+
function Ke(...e) {
|
|
2966
|
+
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = T(() => {
|
|
2967
|
+
const o = ut(E(e[0])).filter((a) => a != null);
|
|
2933
2968
|
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
2934
2969
|
});
|
|
2935
|
-
return
|
|
2970
|
+
return ya(() => {
|
|
2936
2971
|
var o, a;
|
|
2937
2972
|
return [
|
|
2938
2973
|
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => Ge(r))) !== null && o !== void 0 ? o : [qe].filter((r) => r != null),
|
|
2939
|
-
|
|
2940
|
-
|
|
2974
|
+
ut(E(n.value ? e[1] : e[0])),
|
|
2975
|
+
ut(V(n.value ? e[2] : e[1])),
|
|
2941
2976
|
E(n.value ? e[3] : e[2])
|
|
2942
2977
|
];
|
|
2943
2978
|
}, ([o, a, r, s], l, u) => {
|
|
2944
2979
|
if (!o?.length || !a?.length || !r?.length) return;
|
|
2945
|
-
const i =
|
|
2980
|
+
const i = ga(s) ? { ...s } : s, d = o.flatMap((m) => a.flatMap((p) => r.map((I) => t(m, p, I, i))));
|
|
2946
2981
|
u(() => {
|
|
2947
|
-
|
|
2982
|
+
d.forEach((m) => m());
|
|
2948
2983
|
});
|
|
2949
2984
|
}, { flush: "post" });
|
|
2950
2985
|
}
|
|
2951
2986
|
// @__NO_SIDE_EFFECTS__
|
|
2952
|
-
function
|
|
2953
|
-
const e =
|
|
2987
|
+
function ba() {
|
|
2988
|
+
const e = ue(!1), t = ht();
|
|
2954
2989
|
return t && Ee(() => {
|
|
2955
2990
|
e.value = !0;
|
|
2956
2991
|
}, t), e;
|
|
2957
2992
|
}
|
|
2958
2993
|
// @__NO_SIDE_EFFECTS__
|
|
2959
|
-
function
|
|
2960
|
-
const t = /* @__PURE__ */
|
|
2961
|
-
return
|
|
2994
|
+
function xa(e) {
|
|
2995
|
+
const t = /* @__PURE__ */ ba();
|
|
2996
|
+
return T(() => (t.value, !!e()));
|
|
2962
2997
|
}
|
|
2963
|
-
function
|
|
2998
|
+
function ka(e, t, n = {}) {
|
|
2964
2999
|
const { window: o = qe, ...a } = n;
|
|
2965
3000
|
let r;
|
|
2966
|
-
const s = /* @__PURE__ */
|
|
3001
|
+
const s = /* @__PURE__ */ xa(() => o && "MutationObserver" in o), l = () => {
|
|
2967
3002
|
r && (r.disconnect(), r = void 0);
|
|
2968
|
-
}, u =
|
|
2969
|
-
const
|
|
2970
|
-
return new Set(
|
|
2971
|
-
}), (
|
|
2972
|
-
l(), s.value &&
|
|
3003
|
+
}, u = ne(T(() => {
|
|
3004
|
+
const m = ut(E(e)).map(Ge).filter(pa);
|
|
3005
|
+
return new Set(m);
|
|
3006
|
+
}), (m) => {
|
|
3007
|
+
l(), s.value && m.size && (r = new MutationObserver(t), m.forEach((p) => r.observe(p, a)));
|
|
2973
3008
|
}, {
|
|
2974
3009
|
immediate: !0,
|
|
2975
3010
|
flush: "post"
|
|
2976
|
-
}), i = () => r?.takeRecords(),
|
|
3011
|
+
}), i = () => r?.takeRecords(), d = () => {
|
|
2977
3012
|
u(), l();
|
|
2978
3013
|
};
|
|
2979
|
-
return
|
|
3014
|
+
return kn(d), {
|
|
2980
3015
|
isSupported: s,
|
|
2981
|
-
stop:
|
|
3016
|
+
stop: d,
|
|
2982
3017
|
takeRecords: i
|
|
2983
3018
|
};
|
|
2984
3019
|
}
|
|
2985
|
-
function
|
|
3020
|
+
function Ia(e, t, n = {}) {
|
|
2986
3021
|
const { window: o = qe, document: a = o?.document, flush: r = "sync" } = n;
|
|
2987
|
-
if (!o || !a) return
|
|
3022
|
+
if (!o || !a) return wa;
|
|
2988
3023
|
let s;
|
|
2989
|
-
const l = (
|
|
2990
|
-
s?.(), s =
|
|
2991
|
-
}, u =
|
|
2992
|
-
const
|
|
2993
|
-
if (
|
|
2994
|
-
const { stop:
|
|
2995
|
-
|
|
3024
|
+
const l = (d) => {
|
|
3025
|
+
s?.(), s = d;
|
|
3026
|
+
}, u = gt(() => {
|
|
3027
|
+
const d = Ge(e);
|
|
3028
|
+
if (d) {
|
|
3029
|
+
const { stop: m } = ka(a, (p) => {
|
|
3030
|
+
p.map((I) => [...I.removedNodes]).flat().some((I) => I === d || I.contains(d)) && t(p);
|
|
2996
3031
|
}, {
|
|
2997
3032
|
window: o,
|
|
2998
3033
|
childList: !0,
|
|
2999
3034
|
subtree: !0
|
|
3000
3035
|
});
|
|
3001
|
-
l(
|
|
3036
|
+
l(m);
|
|
3002
3037
|
}
|
|
3003
3038
|
}, { flush: r }), i = () => {
|
|
3004
3039
|
u(), l();
|
|
3005
3040
|
};
|
|
3006
|
-
return
|
|
3041
|
+
return kn(i), i;
|
|
3007
3042
|
}
|
|
3008
3043
|
// @__NO_SIDE_EFFECTS__
|
|
3009
|
-
function
|
|
3044
|
+
function Ma(e = {}) {
|
|
3010
3045
|
var t;
|
|
3011
3046
|
const { window: n = qe, deep: o = !0, triggerOnRemoval: a = !1 } = e, r = (t = e.document) !== null && t !== void 0 ? t : n?.document, s = () => {
|
|
3012
3047
|
let i = r?.activeElement;
|
|
3013
3048
|
if (o)
|
|
3014
|
-
for (var
|
|
3049
|
+
for (var d; i?.shadowRoot; ) i = i == null || (d = i.shadowRoot) === null || d === void 0 ? void 0 : d.activeElement;
|
|
3015
3050
|
return i;
|
|
3016
|
-
}, l =
|
|
3051
|
+
}, l = ue(), u = () => {
|
|
3017
3052
|
l.value = s();
|
|
3018
3053
|
};
|
|
3019
3054
|
if (n) {
|
|
@@ -3021,23 +3056,23 @@ function wa(e = {}) {
|
|
|
3021
3056
|
capture: !0,
|
|
3022
3057
|
passive: !0
|
|
3023
3058
|
};
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
}, i),
|
|
3059
|
+
Ke(n, "blur", (d) => {
|
|
3060
|
+
d.relatedTarget === null && u();
|
|
3061
|
+
}, i), Ke(n, "focus", u, i);
|
|
3027
3062
|
}
|
|
3028
|
-
return a &&
|
|
3063
|
+
return a && Ia(l, u, { document: r }), u(), l;
|
|
3029
3064
|
}
|
|
3030
|
-
const
|
|
3031
|
-
function
|
|
3032
|
-
const { window: n = qe } = t, o =
|
|
3033
|
-
if (!n || !(/* @__PURE__ */
|
|
3065
|
+
const Ca = "focusin", Ea = "focusout", Aa = ":focus-within";
|
|
3066
|
+
function $a(e, t = {}) {
|
|
3067
|
+
const { window: n = qe } = t, o = T(() => Ge(e)), a = ue(!1), r = T(() => a.value);
|
|
3068
|
+
if (!n || !(/* @__PURE__ */ Ma(t)).value) return { focused: r };
|
|
3034
3069
|
const s = { passive: !0 };
|
|
3035
|
-
return
|
|
3070
|
+
return Ke(o, Ca, () => a.value = !0, s), Ke(o, Ea, () => {
|
|
3036
3071
|
var l, u, i;
|
|
3037
|
-
return a.value = (l = (u = o.value) === null || u === void 0 || (i = u.matches) === null || i === void 0 ? void 0 : i.call(u,
|
|
3072
|
+
return a.value = (l = (u = o.value) === null || u === void 0 || (i = u.matches) === null || i === void 0 ? void 0 : i.call(u, Aa)) !== null && l !== void 0 ? l : !1;
|
|
3038
3073
|
}, s), { focused: r };
|
|
3039
3074
|
}
|
|
3040
|
-
function
|
|
3075
|
+
function Ta(e, { window: t = qe, scrollTarget: n } = {}) {
|
|
3041
3076
|
const o = L(!1), a = () => {
|
|
3042
3077
|
if (!t) return;
|
|
3043
3078
|
const r = t.document, s = Ge(e);
|
|
@@ -3048,17 +3083,17 @@ function ka(e, { window: t = qe, scrollTarget: n } = {}) {
|
|
|
3048
3083
|
o.value = l.top <= (t.innerHeight || r.documentElement.clientHeight) && l.left <= (t.innerWidth || r.documentElement.clientWidth) && l.bottom >= 0 && l.right >= 0;
|
|
3049
3084
|
}
|
|
3050
3085
|
};
|
|
3051
|
-
return
|
|
3086
|
+
return ne(
|
|
3052
3087
|
() => Ge(e),
|
|
3053
3088
|
() => a(),
|
|
3054
3089
|
{ immediate: !0, flush: "post" }
|
|
3055
|
-
), t &&
|
|
3090
|
+
), t && Ke(n || t, "scroll", a, {
|
|
3056
3091
|
capture: !1,
|
|
3057
3092
|
passive: !0
|
|
3058
3093
|
}), o;
|
|
3059
3094
|
}
|
|
3060
3095
|
const De = (e) => {
|
|
3061
|
-
let t =
|
|
3096
|
+
let t = Ta(e).value;
|
|
3062
3097
|
return t = t && e.offsetHeight > 0, t;
|
|
3063
3098
|
}, Se = (e) => e.tabIndex >= 0, Qt = (e) => {
|
|
3064
3099
|
const t = e.target;
|
|
@@ -3076,7 +3111,7 @@ const De = (e) => {
|
|
|
3076
3111
|
n && (t = n);
|
|
3077
3112
|
}
|
|
3078
3113
|
return t && (!Se(t) || !De(t)) ? Bt(t) : t;
|
|
3079
|
-
},
|
|
3114
|
+
}, Da = (e) => {
|
|
3080
3115
|
const t = e.target;
|
|
3081
3116
|
let n;
|
|
3082
3117
|
if (t instanceof HTMLTableCellElement) {
|
|
@@ -3109,7 +3144,7 @@ const De = (e) => {
|
|
|
3109
3144
|
n && (t = n);
|
|
3110
3145
|
}
|
|
3111
3146
|
return t && (!Se(t) || !De(t)) ? Ft(t) : t;
|
|
3112
|
-
},
|
|
3147
|
+
}, Sa = (e) => {
|
|
3113
3148
|
const t = e.target;
|
|
3114
3149
|
let n;
|
|
3115
3150
|
if (t instanceof HTMLTableCellElement) {
|
|
@@ -3144,12 +3179,12 @@ const De = (e) => {
|
|
|
3144
3179
|
}, on = (e) => {
|
|
3145
3180
|
const t = e.target.parentElement?.lastElementChild;
|
|
3146
3181
|
return t && (!Se(t) || !De(t)) ? Zt(t) : t;
|
|
3147
|
-
},
|
|
3182
|
+
}, at = ["alt", "control", "shift", "meta"], Ra = {
|
|
3148
3183
|
ArrowUp: "up",
|
|
3149
3184
|
ArrowDown: "down",
|
|
3150
3185
|
ArrowLeft: "left",
|
|
3151
3186
|
ArrowRight: "right"
|
|
3152
|
-
},
|
|
3187
|
+
}, In = {
|
|
3153
3188
|
"keydown.up": (e) => {
|
|
3154
3189
|
const t = Qt(e);
|
|
3155
3190
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
@@ -3167,11 +3202,11 @@ const De = (e) => {
|
|
|
3167
3202
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
3168
3203
|
},
|
|
3169
3204
|
"keydown.control.up": (e) => {
|
|
3170
|
-
const t =
|
|
3205
|
+
const t = Da(e);
|
|
3171
3206
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3172
3207
|
},
|
|
3173
3208
|
"keydown.control.down": (e) => {
|
|
3174
|
-
const t =
|
|
3209
|
+
const t = Sa(e);
|
|
3175
3210
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3176
3211
|
},
|
|
3177
3212
|
"keydown.control.left": (e) => {
|
|
@@ -3213,7 +3248,7 @@ const De = (e) => {
|
|
|
3213
3248
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3214
3249
|
}
|
|
3215
3250
|
};
|
|
3216
|
-
function
|
|
3251
|
+
function La(e) {
|
|
3217
3252
|
const t = (s) => {
|
|
3218
3253
|
let l = null;
|
|
3219
3254
|
return s.parent && (typeof s.parent == "string" ? l = document.querySelector(s.parent) : s.parent instanceof HTMLElement ? l = s.parent : l = s.parent.value), l;
|
|
@@ -3239,35 +3274,35 @@ function Aa(e) {
|
|
|
3239
3274
|
let u = [];
|
|
3240
3275
|
return s.selectors ? u = n(s) : l && (u = Array.from(l.children).filter((i) => Se(i) && De(i))), u;
|
|
3241
3276
|
}, a = (s) => (l) => {
|
|
3242
|
-
const u =
|
|
3243
|
-
if (
|
|
3244
|
-
const i = s.handlers ||
|
|
3245
|
-
for (const
|
|
3246
|
-
const [
|
|
3247
|
-
if (
|
|
3248
|
-
const I = i[
|
|
3249
|
-
const
|
|
3250
|
-
return l.getModifierState(
|
|
3277
|
+
const u = Ra[l.key] || l.key.toLowerCase();
|
|
3278
|
+
if (at.includes(u)) return;
|
|
3279
|
+
const i = s.handlers || In;
|
|
3280
|
+
for (const d of Object.keys(i)) {
|
|
3281
|
+
const [m, ...p] = d.split(".");
|
|
3282
|
+
if (m === "keydown" && p.includes(u)) {
|
|
3283
|
+
const I = i[d], y = p.filter((f) => at.includes(f)), k = at.some((f) => {
|
|
3284
|
+
const g = f.charAt(0).toUpperCase() + f.slice(1);
|
|
3285
|
+
return l.getModifierState(g);
|
|
3251
3286
|
});
|
|
3252
|
-
if (
|
|
3253
|
-
if (
|
|
3254
|
-
for (const f of
|
|
3255
|
-
if (
|
|
3256
|
-
const
|
|
3257
|
-
l.getModifierState(
|
|
3287
|
+
if (y.length > 0) {
|
|
3288
|
+
if (k) {
|
|
3289
|
+
for (const f of at)
|
|
3290
|
+
if (p.includes(f)) {
|
|
3291
|
+
const g = f.charAt(0).toUpperCase() + f.slice(1);
|
|
3292
|
+
l.getModifierState(g) && I(l);
|
|
3258
3293
|
}
|
|
3259
3294
|
}
|
|
3260
3295
|
} else
|
|
3261
|
-
|
|
3296
|
+
k || I(l);
|
|
3262
3297
|
}
|
|
3263
3298
|
}
|
|
3264
3299
|
}, r = [];
|
|
3265
3300
|
Ee(() => {
|
|
3266
3301
|
for (const s of e) {
|
|
3267
|
-
const l = t(s), u = o(s), i = a(s),
|
|
3268
|
-
for (const
|
|
3269
|
-
const { focused:
|
|
3270
|
-
|
|
3302
|
+
const l = t(s), u = o(s), i = a(s), d = l ? [l] : u;
|
|
3303
|
+
for (const m of d) {
|
|
3304
|
+
const { focused: p } = $a(L(m)), I = ne(p, (y) => {
|
|
3305
|
+
y ? m.addEventListener("keydown", i) : m.removeEventListener("keydown", i);
|
|
3271
3306
|
});
|
|
3272
3307
|
r.push(I);
|
|
3273
3308
|
}
|
|
@@ -3277,276 +3312,316 @@ function Aa(e) {
|
|
|
3277
3312
|
s();
|
|
3278
3313
|
});
|
|
3279
3314
|
}
|
|
3280
|
-
const
|
|
3315
|
+
const Ha = { class: "aform_display-value" }, Va = { key: 0 }, _a = {
|
|
3316
|
+
key: 1,
|
|
3281
3317
|
ref: "datepicker",
|
|
3282
3318
|
class: "adatepicker",
|
|
3283
3319
|
tabindex: "0"
|
|
3284
|
-
},
|
|
3320
|
+
}, Pa = {
|
|
3285
3321
|
colspan: "5",
|
|
3286
3322
|
tabindex: -1
|
|
3287
|
-
},
|
|
3323
|
+
}, Oa = ["onClick", "onKeydown"], Ba = 6, ln = 7, Fa = /* @__PURE__ */ oe({
|
|
3288
3324
|
__name: "ADatePicker",
|
|
3289
|
-
props: {
|
|
3325
|
+
props: /* @__PURE__ */ xe({
|
|
3326
|
+
schema: {},
|
|
3327
|
+
label: {},
|
|
3328
|
+
mask: {},
|
|
3329
|
+
required: { type: Boolean },
|
|
3330
|
+
mode: {},
|
|
3331
|
+
uuid: {},
|
|
3332
|
+
validation: {}
|
|
3333
|
+
}, {
|
|
3290
3334
|
modelValue: { default: /* @__PURE__ */ new Date() },
|
|
3291
3335
|
modelModifiers: {}
|
|
3292
|
-
},
|
|
3336
|
+
}),
|
|
3293
3337
|
emits: ["update:modelValue"],
|
|
3294
3338
|
setup(e, { expose: t }) {
|
|
3295
|
-
const n =
|
|
3339
|
+
const n = Me(e, "modelValue"), o = L(new Date(n.value)), a = L(o.value.getMonth()), r = L(o.value.getFullYear()), s = L([]), l = fe("datepicker");
|
|
3296
3340
|
Ee(async () => {
|
|
3297
|
-
u(), await
|
|
3341
|
+
u(), await vt();
|
|
3298
3342
|
const C = document.getElementsByClassName("selectedDate");
|
|
3299
3343
|
if (C.length > 0)
|
|
3300
3344
|
C[0].focus();
|
|
3301
3345
|
else {
|
|
3302
|
-
const
|
|
3303
|
-
|
|
3346
|
+
const $ = document.getElementsByClassName("todaysDate");
|
|
3347
|
+
$.length > 0 && $[0].focus();
|
|
3304
3348
|
}
|
|
3305
3349
|
});
|
|
3306
3350
|
const u = () => {
|
|
3307
3351
|
s.value = [];
|
|
3308
|
-
const C = new Date(r.value, a.value, 1),
|
|
3352
|
+
const C = new Date(r.value, a.value, 1), $ = C.getDay(), R = C.setDate(C.getDate() - $);
|
|
3309
3353
|
for (const S of Array(43).keys())
|
|
3310
3354
|
s.value.push(R + S * 864e5);
|
|
3311
3355
|
};
|
|
3312
|
-
|
|
3313
|
-
const i = () => r.value -= 1,
|
|
3356
|
+
ne([a, r], u);
|
|
3357
|
+
const i = () => r.value -= 1, d = () => r.value += 1, m = () => {
|
|
3314
3358
|
a.value == 0 ? (a.value = 11, i()) : a.value -= 1;
|
|
3315
|
-
},
|
|
3316
|
-
a.value == 11 ? (a.value = 0,
|
|
3359
|
+
}, p = () => {
|
|
3360
|
+
a.value == 11 ? (a.value = 0, d()) : a.value += 1;
|
|
3317
3361
|
}, I = (C) => {
|
|
3318
|
-
const
|
|
3319
|
-
if (a.value ===
|
|
3320
|
-
return
|
|
3321
|
-
},
|
|
3362
|
+
const $ = /* @__PURE__ */ new Date();
|
|
3363
|
+
if (a.value === $.getMonth())
|
|
3364
|
+
return $.toDateString() === new Date(C).toDateString();
|
|
3365
|
+
}, y = (C) => new Date(C).toDateString() === new Date(o.value).toDateString(), k = (C, $) => (C - 1) * ln + $, f = (C, $) => s.value[k(C, $)], g = (C) => {
|
|
3322
3366
|
n.value = o.value = new Date(s.value[C]);
|
|
3323
|
-
},
|
|
3367
|
+
}, x = T(() => new Date(r.value, a.value, 1).toLocaleDateString(void 0, {
|
|
3324
3368
|
year: "numeric",
|
|
3325
3369
|
month: "long"
|
|
3326
3370
|
}));
|
|
3327
|
-
return
|
|
3371
|
+
return La([
|
|
3328
3372
|
{
|
|
3329
3373
|
parent: l,
|
|
3330
3374
|
selectors: "td",
|
|
3331
3375
|
handlers: {
|
|
3332
|
-
...
|
|
3333
|
-
"keydown.pageup":
|
|
3376
|
+
...In,
|
|
3377
|
+
"keydown.pageup": m,
|
|
3334
3378
|
"keydown.shift.pageup": i,
|
|
3335
|
-
"keydown.pagedown":
|
|
3336
|
-
"keydown.shift.pagedown":
|
|
3379
|
+
"keydown.pagedown": p,
|
|
3380
|
+
"keydown.shift.pagedown": d,
|
|
3337
3381
|
// TODO: this is a hack to override the stonecrop enter handler;
|
|
3338
3382
|
// store context inside the component so that handlers can be setup consistently
|
|
3339
3383
|
"keydown.enter": () => {
|
|
3340
3384
|
}
|
|
3341
3385
|
}
|
|
3342
3386
|
}
|
|
3343
|
-
]), t({ currentMonth: a, currentYear: r, selectedDate: o }), (C,
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3387
|
+
]), t({ currentMonth: a, currentYear: r, selectedDate: o }), (C, $) => e.mode === "display" || e.mode === "read" ? (h(), b(X, { key: 0 }, [
|
|
3388
|
+
w("span", Ha, N(n.value ? new Date(n.value).toLocaleDateString() : ""), 1),
|
|
3389
|
+
e.label ? (h(), b("label", Va, N(e.label), 1)) : Y("", !0)
|
|
3390
|
+
], 64)) : (h(), b("div", _a, [
|
|
3391
|
+
w("table", null, [
|
|
3392
|
+
w("tbody", null, [
|
|
3393
|
+
w("tr", null, [
|
|
3394
|
+
w("td", {
|
|
3348
3395
|
id: "previous-month-btn",
|
|
3349
3396
|
tabindex: -1,
|
|
3350
|
-
onClick:
|
|
3397
|
+
onClick: m
|
|
3351
3398
|
}, "<"),
|
|
3352
|
-
|
|
3353
|
-
|
|
3399
|
+
w("th", Pa, N(x.value), 1),
|
|
3400
|
+
w("td", {
|
|
3354
3401
|
id: "next-month-btn",
|
|
3355
3402
|
tabindex: -1,
|
|
3356
|
-
onClick:
|
|
3403
|
+
onClick: p
|
|
3357
3404
|
}, ">")
|
|
3358
3405
|
]),
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3406
|
+
$[0] || ($[0] = w("tr", { class: "days-header" }, [
|
|
3407
|
+
w("td", null, "M"),
|
|
3408
|
+
w("td", null, "T"),
|
|
3409
|
+
w("td", null, "W"),
|
|
3410
|
+
w("td", null, "T"),
|
|
3411
|
+
w("td", null, "F"),
|
|
3412
|
+
w("td", null, "S"),
|
|
3413
|
+
w("td", null, "S")
|
|
3367
3414
|
], -1)),
|
|
3368
|
-
(
|
|
3369
|
-
(
|
|
3415
|
+
(h(), b(X, null, ve(Ba, (R) => w("tr", { key: R }, [
|
|
3416
|
+
(h(), b(X, null, ve(ln, (S) => w("td", {
|
|
3370
3417
|
ref_for: !0,
|
|
3371
3418
|
ref: "celldate",
|
|
3372
|
-
key:
|
|
3419
|
+
key: k(R, S),
|
|
3373
3420
|
contenteditable: !1,
|
|
3374
3421
|
spellcheck: !1,
|
|
3375
3422
|
tabindex: 0,
|
|
3376
|
-
class:
|
|
3423
|
+
class: se({
|
|
3377
3424
|
todaysDate: I(f(R, S)),
|
|
3378
|
-
selectedDate:
|
|
3425
|
+
selectedDate: y(f(R, S))
|
|
3379
3426
|
}),
|
|
3380
|
-
onClick: Ie((O) =>
|
|
3381
|
-
onKeydown: Ze((O) =>
|
|
3382
|
-
},
|
|
3427
|
+
onClick: Ie((O) => g(k(R, S)), ["prevent", "stop"]),
|
|
3428
|
+
onKeydown: Ze((O) => g(k(R, S)), ["enter"])
|
|
3429
|
+
}, N(new Date(f(R, S)).getDate()), 43, Oa)), 64))
|
|
3383
3430
|
])), 64))
|
|
3384
3431
|
])
|
|
3385
3432
|
])
|
|
3386
3433
|
], 512));
|
|
3387
3434
|
}
|
|
3388
|
-
}),
|
|
3435
|
+
}), Za = /* @__PURE__ */ Te(Fa, [["__scopeId", "data-v-9da05d06"]]), Na = /* @__PURE__ */ oe({
|
|
3389
3436
|
__name: "CollapseButton",
|
|
3390
3437
|
props: {
|
|
3391
3438
|
collapsed: { type: Boolean }
|
|
3392
3439
|
},
|
|
3393
3440
|
setup(e) {
|
|
3394
|
-
return (t, n) => (
|
|
3395
|
-
class:
|
|
3441
|
+
return (t, n) => (h(), b("button", {
|
|
3442
|
+
class: se(["collapse-button", e.collapsed ? "rotated" : "unrotated"])
|
|
3396
3443
|
}, "×", 2));
|
|
3397
3444
|
}
|
|
3398
|
-
}),
|
|
3445
|
+
}), Ua = /* @__PURE__ */ Te(Na, [["__scopeId", "data-v-6f1c1b45"]]), Wa = { class: "aform" }, Ga = {
|
|
3399
3446
|
key: 0,
|
|
3400
3447
|
class: "aform-nested-section"
|
|
3401
|
-
},
|
|
3448
|
+
}, za = {
|
|
3402
3449
|
key: 0,
|
|
3403
3450
|
class: "aform-nested-label"
|
|
3404
|
-
},
|
|
3451
|
+
}, qa = /* @__PURE__ */ oe({
|
|
3405
3452
|
__name: "AForm",
|
|
3406
|
-
props: /* @__PURE__ */
|
|
3453
|
+
props: /* @__PURE__ */ xe({
|
|
3407
3454
|
schema: {},
|
|
3408
|
-
|
|
3455
|
+
mode: { default: "edit" }
|
|
3409
3456
|
}, {
|
|
3410
3457
|
data: { required: !0 },
|
|
3411
3458
|
dataModifiers: {}
|
|
3412
3459
|
}),
|
|
3413
|
-
emits: /* @__PURE__ */
|
|
3460
|
+
emits: /* @__PURE__ */ xe(["update:schema", "update:data"], ["update:data"]),
|
|
3414
3461
|
setup(e, { emit: t }) {
|
|
3415
|
-
const n = t, o =
|
|
3416
|
-
|
|
3462
|
+
const n = t, o = Me(e, "data"), a = L({});
|
|
3463
|
+
ne(
|
|
3417
3464
|
() => o.value,
|
|
3418
|
-
(
|
|
3419
|
-
!e.schema || !
|
|
3420
|
-
"schema" in
|
|
3465
|
+
(m) => {
|
|
3466
|
+
!e.schema || !m || e.schema.forEach((p) => {
|
|
3467
|
+
"schema" in p && Array.isArray(p.schema) && p.schema.length > 0 && (a.value[p.fieldname] = m[p.fieldname] ?? {});
|
|
3421
3468
|
});
|
|
3422
3469
|
},
|
|
3423
3470
|
{ immediate: !0 }
|
|
3424
3471
|
);
|
|
3425
|
-
const r = (
|
|
3426
|
-
a.value[
|
|
3427
|
-
}
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
});
|
|
3433
|
-
|
|
3434
|
-
const
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
e.schema && l.value.length !== e.schema.length && (l.value = e.schema.map((i, c) => $({
|
|
3472
|
+
const r = (m, p) => {
|
|
3473
|
+
a.value[m] = p, o.value && (o.value[m] = p, n("update:data", { ...o.value }));
|
|
3474
|
+
}, s = (m) => {
|
|
3475
|
+
const p = {};
|
|
3476
|
+
for (const [I, y] of Object.entries(m))
|
|
3477
|
+
["component", "fieldtype", "mode"].includes(I) || (p[I] = y), I === "rows" && (!y || Array.isArray(y) && y.length === 0) && (p.rows = o.value[m.fieldname] || []);
|
|
3478
|
+
return p;
|
|
3479
|
+
}, l = T(() => e.mode ?? "edit");
|
|
3480
|
+
function u(m) {
|
|
3481
|
+
const p = m.mode;
|
|
3482
|
+
return p || l.value;
|
|
3483
|
+
}
|
|
3484
|
+
const i = L([]);
|
|
3485
|
+
gt(() => {
|
|
3486
|
+
e.schema && i.value.length !== e.schema.length && (i.value = e.schema.map((m, p) => T({
|
|
3441
3487
|
get() {
|
|
3442
|
-
return
|
|
3488
|
+
return o.value?.[e.schema[p].fieldname];
|
|
3443
3489
|
},
|
|
3444
|
-
set: (
|
|
3445
|
-
const
|
|
3446
|
-
|
|
3490
|
+
set: (I) => {
|
|
3491
|
+
const y = e.schema[p].fieldname;
|
|
3492
|
+
y && o.value && (o.value[y] = I, n("update:data", { ...o.value })), n("update:schema", e.schema);
|
|
3447
3493
|
}
|
|
3448
3494
|
})));
|
|
3449
3495
|
});
|
|
3450
|
-
const
|
|
3451
|
-
return (
|
|
3452
|
-
const
|
|
3453
|
-
return
|
|
3454
|
-
(
|
|
3455
|
-
"schema" in
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
data: a.value[
|
|
3459
|
-
|
|
3460
|
-
schema:
|
|
3461
|
-
"
|
|
3462
|
-
}, null, 8, ["data", "
|
|
3463
|
-
])) : (
|
|
3496
|
+
const d = T(() => i.value);
|
|
3497
|
+
return (m, p) => {
|
|
3498
|
+
const I = dn("AForm", !0);
|
|
3499
|
+
return h(), b("form", Wa, [
|
|
3500
|
+
(h(!0), b(X, null, ve(e.schema, (y, k) => (h(), b(X, { key: k }, [
|
|
3501
|
+
"schema" in y && Array.isArray(y.schema) && y.schema.length > 0 ? (h(), b("div", Ga, [
|
|
3502
|
+
y.label ? (h(), b("h4", za, N(y.label), 1)) : Y("", !0),
|
|
3503
|
+
ct(I, {
|
|
3504
|
+
data: a.value[y.fieldname],
|
|
3505
|
+
mode: u(y),
|
|
3506
|
+
schema: y.schema,
|
|
3507
|
+
"onUpdate:data": (f) => r(y.fieldname, f)
|
|
3508
|
+
}, null, 8, ["data", "mode", "schema", "onUpdate:data"])
|
|
3509
|
+
])) : (h(), pe(Ue(y.component), ft({
|
|
3464
3510
|
key: 1,
|
|
3465
|
-
modelValue:
|
|
3466
|
-
"onUpdate:modelValue": (
|
|
3467
|
-
schema:
|
|
3468
|
-
data: o.value[
|
|
3469
|
-
|
|
3470
|
-
}, { ref_for: !0 }, s(
|
|
3511
|
+
modelValue: d.value[k].value,
|
|
3512
|
+
"onUpdate:modelValue": (f) => d.value[k].value = f,
|
|
3513
|
+
schema: y,
|
|
3514
|
+
data: o.value[y.fieldname],
|
|
3515
|
+
mode: u(y)
|
|
3516
|
+
}, { ref_for: !0 }, s(y)), null, 16, ["modelValue", "onUpdate:modelValue", "schema", "data", "mode"]))
|
|
3471
3517
|
], 64))), 128))
|
|
3472
3518
|
]);
|
|
3473
3519
|
};
|
|
3474
3520
|
}
|
|
3475
|
-
}), Mn = /* @__PURE__ */
|
|
3521
|
+
}), Mn = /* @__PURE__ */ Te(qa, [["__scopeId", "data-v-5c01cea5"]]), Ya = /* @__PURE__ */ oe({
|
|
3476
3522
|
__name: "AFieldset",
|
|
3477
3523
|
props: {
|
|
3478
3524
|
schema: {},
|
|
3479
3525
|
label: {},
|
|
3480
3526
|
collapsible: { type: Boolean },
|
|
3481
|
-
data: { default: () => ({}) }
|
|
3527
|
+
data: { default: () => ({}) },
|
|
3528
|
+
mode: { default: "edit" }
|
|
3482
3529
|
},
|
|
3483
3530
|
setup(e, { expose: t }) {
|
|
3484
3531
|
const n = L(!1), o = L(e.data || []), a = L(e.schema), r = (s) => {
|
|
3485
3532
|
s.preventDefault(), e.collapsible && (n.value = !n.value);
|
|
3486
3533
|
};
|
|
3487
|
-
return t({ collapsed: n }), (s, l) => (
|
|
3488
|
-
|
|
3534
|
+
return t({ collapsed: n }), (s, l) => (h(), b("fieldset", null, [
|
|
3535
|
+
w("legend", {
|
|
3489
3536
|
onClick: r,
|
|
3490
3537
|
onSubmit: r
|
|
3491
3538
|
}, [
|
|
3492
|
-
Dt(
|
|
3493
|
-
e.collapsible ? (
|
|
3539
|
+
Dt(N(e.label) + " ", 1),
|
|
3540
|
+
e.collapsible ? (h(), pe(Ua, {
|
|
3494
3541
|
key: 0,
|
|
3495
3542
|
collapsed: n.value
|
|
3496
|
-
}, null, 8, ["collapsed"])) :
|
|
3543
|
+
}, null, 8, ["collapsed"])) : Y("", !0)
|
|
3497
3544
|
], 32),
|
|
3498
3545
|
he(s.$slots, "default", { collapsed: n.value }, () => [
|
|
3499
|
-
|
|
3500
|
-
schema: a.value,
|
|
3546
|
+
K(ct(Mn, {
|
|
3501
3547
|
data: o.value,
|
|
3502
|
-
"onUpdate:data": l[0] || (l[0] = (u) => o.value = u)
|
|
3503
|
-
|
|
3548
|
+
"onUpdate:data": l[0] || (l[0] = (u) => o.value = u),
|
|
3549
|
+
schema: a.value,
|
|
3550
|
+
mode: e.mode
|
|
3551
|
+
}, null, 8, ["data", "schema", "mode"]), [
|
|
3504
3552
|
[Ce, !n.value]
|
|
3505
3553
|
])
|
|
3506
3554
|
], !0)
|
|
3507
3555
|
]));
|
|
3508
3556
|
}
|
|
3509
|
-
}),
|
|
3557
|
+
}), Xa = /* @__PURE__ */ Te(Ya, [["__scopeId", "data-v-a3606386"]]), ja = { class: "aform_form-element aform_file-attach aform__grid--full" }, Ja = {
|
|
3510
3558
|
key: 0,
|
|
3511
3559
|
class: "aform_file-attach-feedback"
|
|
3512
|
-
},
|
|
3560
|
+
}, Qa = {
|
|
3561
|
+
key: 1,
|
|
3562
|
+
class: "aform_display-value"
|
|
3563
|
+
}, Ka = {
|
|
3564
|
+
key: 0,
|
|
3565
|
+
class: "aform_file-attach-feedback"
|
|
3566
|
+
}, es = ["disabled"], ts = ["disabled"], ns = /* @__PURE__ */ oe({
|
|
3513
3567
|
__name: "AFileAttach",
|
|
3514
3568
|
props: {
|
|
3515
|
-
|
|
3569
|
+
schema: {},
|
|
3570
|
+
label: {},
|
|
3571
|
+
mask: {},
|
|
3572
|
+
required: { type: Boolean },
|
|
3573
|
+
mode: {},
|
|
3574
|
+
uuid: {},
|
|
3575
|
+
validation: {}
|
|
3516
3576
|
},
|
|
3517
3577
|
setup(e) {
|
|
3518
|
-
const { files: t, open: n, reset: o, onChange: a } =
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3578
|
+
const { files: t, open: n, reset: o, onChange: a } = ta(), r = T(() => {
|
|
3579
|
+
const s = t.value?.length ?? 0;
|
|
3580
|
+
return `${s} ${s === 1 ? "file" : "files"}`;
|
|
3581
|
+
});
|
|
3582
|
+
return a((s) => s), (s, l) => (h(), b("div", ja, [
|
|
3583
|
+
e.mode === "display" ? (h(), b(X, { key: 0 }, [
|
|
3584
|
+
V(t) ? (h(), b("div", Ja, [
|
|
3585
|
+
w("p", null, [
|
|
3586
|
+
w("b", null, N(r.value), 1)
|
|
3587
|
+
]),
|
|
3588
|
+
(h(!0), b(X, null, ve(V(t), (u) => (h(), b("li", {
|
|
3589
|
+
key: u.name
|
|
3590
|
+
}, N(u.name), 1))), 128))
|
|
3591
|
+
])) : (h(), b("span", Qa, "No file selected"))
|
|
3592
|
+
], 64)) : (h(), b(X, { key: 1 }, [
|
|
3593
|
+
V(t) ? (h(), b("div", Ka, [
|
|
3594
|
+
w("p", null, [
|
|
3595
|
+
l[2] || (l[2] = Dt(" You have selected: ", -1)),
|
|
3596
|
+
w("b", null, N(r.value), 1)
|
|
3597
|
+
]),
|
|
3598
|
+
(h(!0), b(X, null, ve(V(t), (u) => (h(), b("li", {
|
|
3599
|
+
key: u.name
|
|
3600
|
+
}, N(u.name), 1))), 128))
|
|
3601
|
+
])) : Y("", !0),
|
|
3602
|
+
w("button", {
|
|
3603
|
+
type: "button",
|
|
3604
|
+
class: "aform_form-btn",
|
|
3605
|
+
disabled: e.mode === "read",
|
|
3606
|
+
onClick: l[0] || (l[0] = (u) => V(n)())
|
|
3607
|
+
}, N(e.label), 9, es),
|
|
3608
|
+
w("button", {
|
|
3609
|
+
type: "button",
|
|
3610
|
+
disabled: !V(t) || e.mode === "read",
|
|
3611
|
+
class: "aform_form-btn",
|
|
3612
|
+
onClick: l[1] || (l[1] = (u) => V(o)())
|
|
3613
|
+
}, "Reset", 8, ts)
|
|
3614
|
+
], 64))
|
|
3540
3615
|
]));
|
|
3541
3616
|
}
|
|
3542
|
-
}),
|
|
3617
|
+
}), os = /* @__PURE__ */ Te(ns, [["__scopeId", "data-v-6543d39a"]]), ls = { class: "aform_form-element" }, as = { class: "aform_display-value" }, ss = { class: "aform_field-label" }, rs = ["id", "disabled", "required"], is = ["for"], us = ["innerHTML"], cs = /* @__PURE__ */ oe({
|
|
3543
3618
|
__name: "ANumericInput",
|
|
3544
|
-
props: /* @__PURE__ */
|
|
3619
|
+
props: /* @__PURE__ */ xe({
|
|
3545
3620
|
schema: {},
|
|
3546
3621
|
label: {},
|
|
3547
3622
|
mask: {},
|
|
3548
3623
|
required: { type: Boolean },
|
|
3549
|
-
|
|
3624
|
+
mode: {},
|
|
3550
3625
|
uuid: {},
|
|
3551
3626
|
validation: { default: () => ({ errorMessage: " " }) }
|
|
3552
3627
|
}, {
|
|
@@ -3555,28 +3630,33 @@ const Ta = {
|
|
|
3555
3630
|
}),
|
|
3556
3631
|
emits: ["update:modelValue"],
|
|
3557
3632
|
setup(e) {
|
|
3558
|
-
const t =
|
|
3559
|
-
return (n, o) => (
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
"
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3633
|
+
const t = Me(e, "modelValue");
|
|
3634
|
+
return (n, o) => (h(), b("div", ls, [
|
|
3635
|
+
e.mode === "display" ? (h(), b(X, { key: 0 }, [
|
|
3636
|
+
w("span", as, N(t.value ?? ""), 1),
|
|
3637
|
+
w("label", ss, N(e.label), 1)
|
|
3638
|
+
], 64)) : (h(), b(X, { key: 1 }, [
|
|
3639
|
+
K(w("input", {
|
|
3640
|
+
id: e.uuid,
|
|
3641
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
|
|
3642
|
+
class: "aform_input-field",
|
|
3643
|
+
type: "number",
|
|
3644
|
+
disabled: e.mode === "read",
|
|
3645
|
+
required: e.required
|
|
3646
|
+
}, null, 8, rs), [
|
|
3647
|
+
[we, t.value]
|
|
3648
|
+
]),
|
|
3649
|
+
w("label", {
|
|
3650
|
+
class: "aform_field-label",
|
|
3651
|
+
for: e.uuid
|
|
3652
|
+
}, N(e.label), 9, is),
|
|
3653
|
+
K(w("p", {
|
|
3654
|
+
class: "aform_error",
|
|
3655
|
+
innerHTML: e.validation.errorMessage
|
|
3656
|
+
}, null, 8, us), [
|
|
3657
|
+
[Ce, e.validation.errorMessage]
|
|
3658
|
+
])
|
|
3659
|
+
], 64))
|
|
3580
3660
|
]));
|
|
3581
3661
|
}
|
|
3582
3662
|
}), an = {
|
|
@@ -3587,16 +3667,16 @@ const Ta = {
|
|
|
3587
3667
|
phone: "(###) ### - ####",
|
|
3588
3668
|
card: "#### #### #### ####"
|
|
3589
3669
|
};
|
|
3590
|
-
function
|
|
3670
|
+
function ds(e) {
|
|
3591
3671
|
try {
|
|
3592
3672
|
return Function(`"use strict";return (${e})`)();
|
|
3593
3673
|
} catch {
|
|
3594
3674
|
}
|
|
3595
3675
|
}
|
|
3596
|
-
function
|
|
3676
|
+
function fs(e) {
|
|
3597
3677
|
let t = e.value;
|
|
3598
3678
|
if (t) {
|
|
3599
|
-
const n =
|
|
3679
|
+
const n = ds(t);
|
|
3600
3680
|
if (n) {
|
|
3601
3681
|
const o = e.instance?.locale;
|
|
3602
3682
|
t = n(o);
|
|
@@ -3607,14 +3687,14 @@ function Ka(e) {
|
|
|
3607
3687
|
}
|
|
3608
3688
|
return t;
|
|
3609
3689
|
}
|
|
3610
|
-
function
|
|
3690
|
+
function vs(e, t) {
|
|
3611
3691
|
let n = e;
|
|
3612
3692
|
const o = [t, "/", "-", "(", ")", " "];
|
|
3613
3693
|
for (const a of o)
|
|
3614
3694
|
n = n.replaceAll(a, "");
|
|
3615
3695
|
return n;
|
|
3616
3696
|
}
|
|
3617
|
-
function
|
|
3697
|
+
function ms(e, t, n) {
|
|
3618
3698
|
let o = t;
|
|
3619
3699
|
for (const a of e) {
|
|
3620
3700
|
const r = o.indexOf(n);
|
|
@@ -3625,24 +3705,24 @@ function ts(e, t, n) {
|
|
|
3625
3705
|
}
|
|
3626
3706
|
return o.slice(0, t.length);
|
|
3627
3707
|
}
|
|
3628
|
-
function
|
|
3629
|
-
const n =
|
|
3708
|
+
function ps(e, t) {
|
|
3709
|
+
const n = fs(t);
|
|
3630
3710
|
if (!n) return;
|
|
3631
|
-
const o = "#", a = e.value, r =
|
|
3711
|
+
const o = "#", a = e.value, r = vs(a, o);
|
|
3632
3712
|
if (r) {
|
|
3633
|
-
const s =
|
|
3713
|
+
const s = ms(r, n, o);
|
|
3634
3714
|
t.instance?.maskFilled && (t.instance.maskFilled = !s.includes(o)), e.value = s;
|
|
3635
3715
|
} else
|
|
3636
3716
|
e.value = n;
|
|
3637
3717
|
}
|
|
3638
|
-
const
|
|
3718
|
+
const hs = { class: "aform_form-element" }, gs = { class: "aform_display-value" }, ws = { class: "aform_field-label" }, ys = ["id", "disabled", "maxlength", "required"], bs = ["for"], xs = ["innerHTML"], ks = /* @__PURE__ */ oe({
|
|
3639
3719
|
__name: "ATextInput",
|
|
3640
|
-
props: /* @__PURE__ */
|
|
3720
|
+
props: /* @__PURE__ */ xe({
|
|
3641
3721
|
schema: {},
|
|
3642
3722
|
label: {},
|
|
3643
3723
|
mask: {},
|
|
3644
3724
|
required: { type: Boolean },
|
|
3645
|
-
|
|
3725
|
+
mode: {},
|
|
3646
3726
|
uuid: {},
|
|
3647
3727
|
validation: { default: () => ({ errorMessage: " " }) }
|
|
3648
3728
|
}, {
|
|
@@ -3651,35 +3731,40 @@ const os = { class: "aform_form-element" }, ls = ["id", "disabled", "maxlength",
|
|
|
3651
3731
|
}),
|
|
3652
3732
|
emits: ["update:modelValue"],
|
|
3653
3733
|
setup(e) {
|
|
3654
|
-
const t = L(!0), n =
|
|
3655
|
-
return (o, a) => (
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
"
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3734
|
+
const t = L(!0), n = Me(e, "modelValue");
|
|
3735
|
+
return (o, a) => (h(), b("div", hs, [
|
|
3736
|
+
e.mode === "display" ? (h(), b(X, { key: 0 }, [
|
|
3737
|
+
w("span", gs, N(n.value ?? ""), 1),
|
|
3738
|
+
w("label", ws, N(e.label), 1)
|
|
3739
|
+
], 64)) : (h(), b(X, { key: 1 }, [
|
|
3740
|
+
K(w("input", {
|
|
3741
|
+
id: e.uuid,
|
|
3742
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
|
|
3743
|
+
class: "aform_input-field",
|
|
3744
|
+
disabled: e.mode === "read",
|
|
3745
|
+
maxlength: e.mask && t.value ? e.mask.length : void 0,
|
|
3746
|
+
required: e.required
|
|
3747
|
+
}, null, 8, ys), [
|
|
3748
|
+
[we, n.value],
|
|
3749
|
+
[V(ps), e.mask]
|
|
3750
|
+
]),
|
|
3751
|
+
w("label", {
|
|
3752
|
+
class: "aform_field-label",
|
|
3753
|
+
for: e.uuid
|
|
3754
|
+
}, N(e.label), 9, bs),
|
|
3755
|
+
K(w("p", {
|
|
3756
|
+
class: "aform_error",
|
|
3757
|
+
innerHTML: e.validation.errorMessage
|
|
3758
|
+
}, null, 8, xs), [
|
|
3759
|
+
[Ce, e.validation.errorMessage]
|
|
3760
|
+
])
|
|
3761
|
+
], 64))
|
|
3677
3762
|
]));
|
|
3678
3763
|
}
|
|
3679
|
-
}),
|
|
3764
|
+
}), Is = { class: "login-container" }, Ms = { class: "account-container" }, Cs = { class: "account-header" }, Es = { id: "account-title" }, As = { id: "account-subtitle" }, $s = { class: "login-form-container" }, Ts = { class: "login-form-email aform_form-element" }, Ds = ["disabled"], Ss = { class: "login-form-password aform_form-element" }, Rs = ["disabled"], Ls = ["disabled"], Hs = {
|
|
3680
3765
|
key: 0,
|
|
3681
3766
|
class: "material-symbols-outlined loading-icon"
|
|
3682
|
-
},
|
|
3767
|
+
}, Vs = /* @__PURE__ */ oe({
|
|
3683
3768
|
__name: "Login",
|
|
3684
3769
|
props: {
|
|
3685
3770
|
headerTitle: { default: "Login" },
|
|
@@ -3695,24 +3780,24 @@ const os = { class: "aform_form-element" }, ls = ["id", "disabled", "maxlength",
|
|
|
3695
3780
|
}
|
|
3696
3781
|
r.value = !1, n("loginSuccess");
|
|
3697
3782
|
}
|
|
3698
|
-
return (u, i) => (
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3783
|
+
return (u, i) => (h(), b("div", Is, [
|
|
3784
|
+
w("div", null, [
|
|
3785
|
+
w("div", Ms, [
|
|
3786
|
+
w("div", Cs, [
|
|
3787
|
+
w("h1", Es, N(e.headerTitle), 1),
|
|
3788
|
+
w("p", As, N(e.headerSubtitle), 1)
|
|
3704
3789
|
]),
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
i[2] || (i[2] =
|
|
3790
|
+
w("form", { onSubmit: l }, [
|
|
3791
|
+
w("div", $s, [
|
|
3792
|
+
w("div", Ts, [
|
|
3793
|
+
i[2] || (i[2] = w("label", {
|
|
3709
3794
|
id: "login-email",
|
|
3710
3795
|
for: "email",
|
|
3711
3796
|
class: "aform_field-label"
|
|
3712
3797
|
}, "Email", -1)),
|
|
3713
|
-
|
|
3798
|
+
K(w("input", {
|
|
3714
3799
|
id: "email",
|
|
3715
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
3800
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => o.value = d),
|
|
3716
3801
|
class: "aform_input-field",
|
|
3717
3802
|
name: "email",
|
|
3718
3803
|
placeholder: "name@example.com",
|
|
@@ -3721,60 +3806,60 @@ const os = { class: "aform_form-element" }, ls = ["id", "disabled", "maxlength",
|
|
|
3721
3806
|
"auto-complete": "email",
|
|
3722
3807
|
"auto-correct": "off",
|
|
3723
3808
|
disabled: r.value
|
|
3724
|
-
}, null, 8,
|
|
3809
|
+
}, null, 8, Ds), [
|
|
3725
3810
|
[we, o.value]
|
|
3726
3811
|
])
|
|
3727
3812
|
]),
|
|
3728
|
-
|
|
3729
|
-
i[3] || (i[3] =
|
|
3813
|
+
w("div", Ss, [
|
|
3814
|
+
i[3] || (i[3] = w("label", {
|
|
3730
3815
|
id: "login-password",
|
|
3731
3816
|
for: "password",
|
|
3732
3817
|
class: "aform_field-label"
|
|
3733
3818
|
}, "Password", -1)),
|
|
3734
|
-
|
|
3819
|
+
K(w("input", {
|
|
3735
3820
|
id: "password",
|
|
3736
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
3821
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => a.value = d),
|
|
3737
3822
|
class: "aform_input-field",
|
|
3738
3823
|
name: "password",
|
|
3739
3824
|
type: "password",
|
|
3740
3825
|
disabled: r.value
|
|
3741
|
-
}, null, 8,
|
|
3826
|
+
}, null, 8, Rs), [
|
|
3742
3827
|
[we, a.value]
|
|
3743
3828
|
])
|
|
3744
3829
|
]),
|
|
3745
|
-
|
|
3830
|
+
w("button", {
|
|
3746
3831
|
class: "btn",
|
|
3747
3832
|
disabled: r.value || !o.value || !a.value,
|
|
3748
3833
|
onClick: l
|
|
3749
3834
|
}, [
|
|
3750
|
-
r.value ? (
|
|
3751
|
-
i[4] || (i[4] =
|
|
3752
|
-
], 8,
|
|
3835
|
+
r.value ? (h(), b("span", Hs, "progress_activity")) : Y("", !0),
|
|
3836
|
+
i[4] || (i[4] = w("span", { id: "login-form-button" }, "Login", -1))
|
|
3837
|
+
], 8, Ls)
|
|
3753
3838
|
])
|
|
3754
3839
|
], 32),
|
|
3755
|
-
i[5] || (i[5] =
|
|
3756
|
-
|
|
3840
|
+
i[5] || (i[5] = w("button", { class: "btn" }, [
|
|
3841
|
+
w("span", { id: "forgot-password-button" }, "Forgot password?")
|
|
3757
3842
|
], -1))
|
|
3758
3843
|
])
|
|
3759
3844
|
])
|
|
3760
3845
|
]));
|
|
3761
3846
|
}
|
|
3762
|
-
}),
|
|
3763
|
-
function
|
|
3764
|
-
e.use(Dl), e.component("ACheckbox",
|
|
3847
|
+
}), Os = /* @__PURE__ */ Te(Vs, [["__scopeId", "data-v-d9ffd0a7"]]);
|
|
3848
|
+
function Bs(e) {
|
|
3849
|
+
e.use(Dl), e.component("ACheckbox", Bl), e.component("ACombobox", Fl), e.component("ADate", zl), e.component("ADropdown", va), e.component("ADatePicker", Za), e.component("AFieldset", Xa), e.component("AFileAttach", os), e.component("AForm", Mn), e.component("ANumericInput", cs), e.component("ATextInput", ks);
|
|
3765
3850
|
}
|
|
3766
3851
|
export {
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3852
|
+
Bl as ACheckbox,
|
|
3853
|
+
Fl as AComboBox,
|
|
3854
|
+
zl as ADate,
|
|
3855
|
+
Za as ADatePicker,
|
|
3856
|
+
va as ADropdown,
|
|
3857
|
+
Xa as AFieldset,
|
|
3858
|
+
os as AFileAttach,
|
|
3774
3859
|
Mn as AForm,
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3860
|
+
cs as ANumericInput,
|
|
3861
|
+
ks as ATextInput,
|
|
3862
|
+
Os as Login,
|
|
3863
|
+
Bs as install
|
|
3779
3864
|
};
|
|
3780
3865
|
//# sourceMappingURL=aform.js.map
|