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