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