@stonecrop/atable 0.4.33 → 0.4.35
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 +44 -0
- package/dist/atable.d.ts +169 -32
- package/dist/atable.js +551 -525
- package/dist/atable.js.map +1 -1
- package/dist/atable.umd.cjs +2 -2
- package/dist/atable.umd.cjs.map +1 -1
- package/dist/src/stores/table.d.ts +78 -6
- package/dist/src/stores/table.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +72 -12
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/stores/table.js +47 -5
- package/package.json +3 -3
- package/src/components/ACell.vue +2 -0
- package/src/stores/table.ts +53 -5
- package/src/types/index.ts +80 -13
package/dist/atable.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { onMounted as
|
|
1
|
+
import { onMounted as re, ref as z, watch as V, onBeforeUnmount as At, computed as D, shallowRef as G, toValue as M, watchEffect as Tt, getCurrentScope as wt, onScopeDispose as yt, unref as R, getCurrentInstance as Ae, nextTick as Fe, isRef as Dt, toRefs as Ot, customRef as xt, toRef as Ht, readonly as Pt, defineComponent as te, useTemplateRef as U, createElementBlock as L, openBlock as T, normalizeClass as q, normalizeStyle as ee, createBlock as ce, resolveDynamicComponent as ke, mergeProps as Ve, toDisplayString as ue, Fragment as ae, createElementVNode as N, createCommentVNode as J, renderSlot as j, useCssVars as Lt, onUnmounted as Bt, withModifiers as Se, withDirectives as Me, vShow as bt, renderList as pe, createTextVNode as Wt, mergeModels as at, useModel as st, createVNode as rt, withCtx as it } from "vue";
|
|
2
2
|
import { defineStore as zt } from "pinia";
|
|
3
|
-
import './assets/index.css';function
|
|
4
|
-
return
|
|
3
|
+
import './assets/index.css';function Ye(e) {
|
|
4
|
+
return wt() ? (yt(e), !0) : !1;
|
|
5
5
|
}
|
|
6
6
|
const Nt = typeof window < "u" && typeof document < "u";
|
|
7
7
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
8
8
|
const Xt = (e) => e != null, Gt = Object.prototype.toString, Ft = (e) => Gt.call(e) === "[object Object]", Vt = () => {
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function $e(e) {
|
|
11
11
|
return Array.isArray(e) ? e : [e];
|
|
12
12
|
}
|
|
13
13
|
function Yt(e, t, o) {
|
|
@@ -20,27 +20,27 @@ function Yt(e, t, o) {
|
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
function
|
|
23
|
+
const ve = Nt ? window : void 0;
|
|
24
|
+
function de(e) {
|
|
25
25
|
var t;
|
|
26
|
-
const o =
|
|
26
|
+
const o = M(e);
|
|
27
27
|
return (t = o?.$el) != null ? t : o;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function we(...e) {
|
|
30
30
|
const t = [], o = () => {
|
|
31
31
|
t.forEach((n) => n()), t.length = 0;
|
|
32
|
-
}, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i =
|
|
33
|
-
const n =
|
|
32
|
+
}, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i = D(() => {
|
|
33
|
+
const n = $e(M(e[0])).filter((l) => l != null);
|
|
34
34
|
return n.every((l) => typeof l != "string") ? n : void 0;
|
|
35
35
|
}), c = Yt(
|
|
36
36
|
() => {
|
|
37
37
|
var n, l;
|
|
38
38
|
return [
|
|
39
|
-
(l = (n = i.value) == null ? void 0 : n.map((d) =>
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
(l = (n = i.value) == null ? void 0 : n.map((d) => de(d))) != null ? l : [ve].filter((d) => d != null),
|
|
40
|
+
$e(M(i.value ? e[1] : e[0])),
|
|
41
|
+
$e(R(i.value ? e[2] : e[1])),
|
|
42
42
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
43
|
-
|
|
43
|
+
M(i.value ? e[3] : e[2])
|
|
44
44
|
];
|
|
45
45
|
},
|
|
46
46
|
([n, l, d, f]) => {
|
|
@@ -59,27 +59,27 @@ function pe(...e) {
|
|
|
59
59
|
), r = () => {
|
|
60
60
|
c(), o();
|
|
61
61
|
};
|
|
62
|
-
return
|
|
62
|
+
return Ye(o), r;
|
|
63
63
|
}
|
|
64
64
|
// @__NO_SIDE_EFFECTS__
|
|
65
65
|
function jt() {
|
|
66
|
-
const e = G(!1), t =
|
|
67
|
-
return t &&
|
|
66
|
+
const e = G(!1), t = Ae();
|
|
67
|
+
return t && re(() => {
|
|
68
68
|
e.value = !0;
|
|
69
69
|
}, t), e;
|
|
70
70
|
}
|
|
71
71
|
// @__NO_SIDE_EFFECTS__
|
|
72
72
|
function Ut(e) {
|
|
73
73
|
const t = /* @__PURE__ */ jt();
|
|
74
|
-
return
|
|
74
|
+
return D(() => (t.value, !!e()));
|
|
75
75
|
}
|
|
76
76
|
function qt(e, t, o = {}) {
|
|
77
|
-
const { window: s =
|
|
77
|
+
const { window: s = ve, ...i } = o;
|
|
78
78
|
let c;
|
|
79
79
|
const r = /* @__PURE__ */ Ut(() => s && "MutationObserver" in s), n = () => {
|
|
80
80
|
c && (c.disconnect(), c = void 0);
|
|
81
|
-
}, l =
|
|
82
|
-
const x =
|
|
81
|
+
}, l = D(() => {
|
|
82
|
+
const x = M(e), m = $e(x).map(de).filter(Xt);
|
|
83
83
|
return new Set(m);
|
|
84
84
|
}), d = V(
|
|
85
85
|
() => l.value,
|
|
@@ -90,7 +90,7 @@ function qt(e, t, o = {}) {
|
|
|
90
90
|
), f = () => c?.takeRecords(), p = () => {
|
|
91
91
|
d(), n();
|
|
92
92
|
};
|
|
93
|
-
return
|
|
93
|
+
return Ye(p), {
|
|
94
94
|
isSupported: r,
|
|
95
95
|
stop: p,
|
|
96
96
|
takeRecords: f
|
|
@@ -98,7 +98,7 @@ function qt(e, t, o = {}) {
|
|
|
98
98
|
}
|
|
99
99
|
function Jt(e, t, o = {}) {
|
|
100
100
|
const {
|
|
101
|
-
window: s =
|
|
101
|
+
window: s = ve,
|
|
102
102
|
document: i = s?.document,
|
|
103
103
|
flush: c = "sync"
|
|
104
104
|
} = o;
|
|
@@ -108,7 +108,7 @@ function Jt(e, t, o = {}) {
|
|
|
108
108
|
const n = (f) => {
|
|
109
109
|
r?.(), r = f;
|
|
110
110
|
}, l = Tt(() => {
|
|
111
|
-
const f =
|
|
111
|
+
const f = de(e);
|
|
112
112
|
if (f) {
|
|
113
113
|
const { stop: p } = qt(
|
|
114
114
|
i,
|
|
@@ -126,13 +126,13 @@ function Jt(e, t, o = {}) {
|
|
|
126
126
|
}, { flush: c }), d = () => {
|
|
127
127
|
l(), n();
|
|
128
128
|
};
|
|
129
|
-
return
|
|
129
|
+
return Ye(d), d;
|
|
130
130
|
}
|
|
131
131
|
// @__NO_SIDE_EFFECTS__
|
|
132
132
|
function Zt(e = {}) {
|
|
133
133
|
var t;
|
|
134
134
|
const {
|
|
135
|
-
window: o =
|
|
135
|
+
window: o = ve,
|
|
136
136
|
deep: s = !0,
|
|
137
137
|
triggerOnRemoval: i = !1
|
|
138
138
|
} = e, c = (t = e.document) != null ? t : o?.document, r = () => {
|
|
@@ -150,14 +150,14 @@ function Zt(e = {}) {
|
|
|
150
150
|
capture: !0,
|
|
151
151
|
passive: !0
|
|
152
152
|
};
|
|
153
|
-
|
|
153
|
+
we(
|
|
154
154
|
o,
|
|
155
155
|
"blur",
|
|
156
156
|
(f) => {
|
|
157
157
|
f.relatedTarget === null && l();
|
|
158
158
|
},
|
|
159
159
|
d
|
|
160
|
-
),
|
|
160
|
+
), we(
|
|
161
161
|
o,
|
|
162
162
|
"focus",
|
|
163
163
|
l,
|
|
@@ -168,19 +168,19 @@ function Zt(e = {}) {
|
|
|
168
168
|
}
|
|
169
169
|
const Qt = "focusin", Kt = "focusout", _t = ":focus-within";
|
|
170
170
|
function en(e, t = {}) {
|
|
171
|
-
const { window: o =
|
|
171
|
+
const { window: o = ve } = t, s = D(() => de(e)), i = G(!1), c = D(() => i.value);
|
|
172
172
|
if (!o || !(/* @__PURE__ */ Zt(t)).value)
|
|
173
173
|
return { focused: c };
|
|
174
174
|
const r = { passive: !0 };
|
|
175
|
-
return
|
|
175
|
+
return we(s, Qt, () => i.value = !0, r), we(s, Kt, () => {
|
|
176
176
|
var n, l, d;
|
|
177
177
|
return i.value = (d = (l = (n = s.value) == null ? void 0 : n.matches) == null ? void 0 : l.call(n, _t)) != null ? d : !1;
|
|
178
178
|
}, r), { focused: c };
|
|
179
179
|
}
|
|
180
|
-
function tn(e, { window: t =
|
|
181
|
-
const s =
|
|
180
|
+
function tn(e, { window: t = ve, scrollTarget: o } = {}) {
|
|
181
|
+
const s = z(!1), i = () => {
|
|
182
182
|
if (!t) return;
|
|
183
|
-
const c = t.document, r =
|
|
183
|
+
const c = t.document, r = de(e);
|
|
184
184
|
if (!r)
|
|
185
185
|
s.value = !1;
|
|
186
186
|
else {
|
|
@@ -189,10 +189,10 @@ function tn(e, { window: t = fe, scrollTarget: o } = {}) {
|
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
return V(
|
|
192
|
-
() =>
|
|
192
|
+
() => de(e),
|
|
193
193
|
() => i(),
|
|
194
194
|
{ immediate: !0, flush: "post" }
|
|
195
|
-
), t &&
|
|
195
|
+
), t && we(o || t, "scroll", i, {
|
|
196
196
|
capture: !1,
|
|
197
197
|
passive: !0
|
|
198
198
|
}), s;
|
|
@@ -200,10 +200,10 @@ function tn(e, { window: t = fe, scrollTarget: o } = {}) {
|
|
|
200
200
|
const Q = (e) => {
|
|
201
201
|
let t = tn(e).value;
|
|
202
202
|
return t = t && e.offsetHeight > 0, t;
|
|
203
|
-
}, K = (e) => e.tabIndex >= 0,
|
|
203
|
+
}, K = (e) => e.tabIndex >= 0, ct = (e) => {
|
|
204
204
|
const t = e.target;
|
|
205
|
-
return
|
|
206
|
-
},
|
|
205
|
+
return je(t);
|
|
206
|
+
}, je = (e) => {
|
|
207
207
|
let t;
|
|
208
208
|
if (e instanceof HTMLTableCellElement) {
|
|
209
209
|
const o = e.parentElement?.previousElementSibling;
|
|
@@ -215,7 +215,7 @@ const Q = (e) => {
|
|
|
215
215
|
const o = e.previousElementSibling;
|
|
216
216
|
o && (t = o);
|
|
217
217
|
}
|
|
218
|
-
return t && (!K(t) || !Q(t)) ?
|
|
218
|
+
return t && (!K(t) || !Q(t)) ? je(t) : t;
|
|
219
219
|
}, nn = (e) => {
|
|
220
220
|
const t = e.target;
|
|
221
221
|
let o;
|
|
@@ -232,11 +232,11 @@ const Q = (e) => {
|
|
|
232
232
|
i && (o = i);
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
return o && (!K(o) || !Q(o)) ?
|
|
236
|
-
},
|
|
235
|
+
return o && (!K(o) || !Q(o)) ? Ue(o) : o;
|
|
236
|
+
}, ut = (e) => {
|
|
237
237
|
const t = e.target;
|
|
238
|
-
return
|
|
239
|
-
},
|
|
238
|
+
return Ue(t);
|
|
239
|
+
}, Ue = (e) => {
|
|
240
240
|
let t;
|
|
241
241
|
if (e instanceof HTMLTableCellElement) {
|
|
242
242
|
const o = e.parentElement?.nextElementSibling;
|
|
@@ -248,7 +248,7 @@ const Q = (e) => {
|
|
|
248
248
|
const o = e.nextElementSibling;
|
|
249
249
|
o && (t = o);
|
|
250
250
|
}
|
|
251
|
-
return t && (!K(t) || !Q(t)) ?
|
|
251
|
+
return t && (!K(t) || !Q(t)) ? Ue(t) : t;
|
|
252
252
|
}, on = (e) => {
|
|
253
253
|
const t = e.target;
|
|
254
254
|
let o;
|
|
@@ -265,45 +265,45 @@ const Q = (e) => {
|
|
|
265
265
|
i && (o = i);
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
return o && (!K(o) || !Q(o)) ?
|
|
269
|
-
}, ut = (e) => {
|
|
270
|
-
const t = e.target;
|
|
271
|
-
return je(t);
|
|
272
|
-
}, je = (e) => {
|
|
273
|
-
let t;
|
|
274
|
-
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!K(t) || !Q(t)) ? je(t) : t;
|
|
268
|
+
return o && (!K(o) || !Q(o)) ? je(o) : o;
|
|
275
269
|
}, dt = (e) => {
|
|
276
270
|
const t = e.target;
|
|
277
|
-
return
|
|
278
|
-
},
|
|
271
|
+
return qe(t);
|
|
272
|
+
}, qe = (e) => {
|
|
279
273
|
let t;
|
|
280
|
-
return e.
|
|
274
|
+
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!K(t) || !Q(t)) ? qe(t) : t;
|
|
281
275
|
}, ft = (e) => {
|
|
282
|
-
const t = e.target
|
|
283
|
-
return
|
|
276
|
+
const t = e.target;
|
|
277
|
+
return Je(t);
|
|
278
|
+
}, Je = (e) => {
|
|
279
|
+
let t;
|
|
280
|
+
return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!K(t) || !Q(t)) ? Je(t) : t;
|
|
284
281
|
}, vt = (e) => {
|
|
282
|
+
const t = e.target.parentElement?.firstElementChild;
|
|
283
|
+
return t && (!K(t) || !Q(t)) ? Je(t) : t;
|
|
284
|
+
}, mt = (e) => {
|
|
285
285
|
const t = e.target.parentElement?.lastElementChild;
|
|
286
|
-
return t && (!K(t) || !Q(t)) ?
|
|
287
|
-
},
|
|
286
|
+
return t && (!K(t) || !Q(t)) ? qe(t) : t;
|
|
287
|
+
}, Ee = ["alt", "control", "shift", "meta"], ln = {
|
|
288
288
|
ArrowUp: "up",
|
|
289
289
|
ArrowDown: "down",
|
|
290
290
|
ArrowLeft: "left",
|
|
291
291
|
ArrowRight: "right"
|
|
292
|
-
},
|
|
292
|
+
}, Ze = {
|
|
293
293
|
"keydown.up": (e) => {
|
|
294
|
-
const t =
|
|
294
|
+
const t = ct(e);
|
|
295
295
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
296
296
|
},
|
|
297
297
|
"keydown.down": (e) => {
|
|
298
|
-
const t =
|
|
298
|
+
const t = ut(e);
|
|
299
299
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
300
300
|
},
|
|
301
301
|
"keydown.left": (e) => {
|
|
302
|
-
const t =
|
|
302
|
+
const t = dt(e);
|
|
303
303
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
304
304
|
},
|
|
305
305
|
"keydown.right": (e) => {
|
|
306
|
-
const t =
|
|
306
|
+
const t = ft(e);
|
|
307
307
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
308
308
|
},
|
|
309
309
|
"keydown.control.up": (e) => {
|
|
@@ -315,45 +315,45 @@ const Q = (e) => {
|
|
|
315
315
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
316
316
|
},
|
|
317
317
|
"keydown.control.left": (e) => {
|
|
318
|
-
const t =
|
|
318
|
+
const t = vt(e);
|
|
319
319
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
320
320
|
},
|
|
321
321
|
"keydown.control.right": (e) => {
|
|
322
|
-
const t =
|
|
322
|
+
const t = mt(e);
|
|
323
323
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
324
324
|
},
|
|
325
325
|
"keydown.end": (e) => {
|
|
326
|
-
const t =
|
|
326
|
+
const t = mt(e);
|
|
327
327
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
328
328
|
},
|
|
329
329
|
"keydown.enter": (e) => {
|
|
330
330
|
if (e.target instanceof HTMLTableCellElement) {
|
|
331
331
|
e.preventDefault(), e.stopPropagation();
|
|
332
|
-
const t =
|
|
332
|
+
const t = ut(e);
|
|
333
333
|
t && t.focus();
|
|
334
334
|
}
|
|
335
335
|
},
|
|
336
336
|
"keydown.shift.enter": (e) => {
|
|
337
337
|
if (e.target instanceof HTMLTableCellElement) {
|
|
338
338
|
e.preventDefault(), e.stopPropagation();
|
|
339
|
-
const t =
|
|
339
|
+
const t = ct(e);
|
|
340
340
|
t && t.focus();
|
|
341
341
|
}
|
|
342
342
|
},
|
|
343
343
|
"keydown.home": (e) => {
|
|
344
|
-
const t =
|
|
344
|
+
const t = vt(e);
|
|
345
345
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
346
346
|
},
|
|
347
347
|
"keydown.tab": (e) => {
|
|
348
|
-
const t =
|
|
348
|
+
const t = ft(e);
|
|
349
349
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
350
350
|
},
|
|
351
351
|
"keydown.shift.tab": (e) => {
|
|
352
|
-
const t =
|
|
352
|
+
const t = dt(e);
|
|
353
353
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
|
-
function
|
|
356
|
+
function Qe(e) {
|
|
357
357
|
const t = (r) => {
|
|
358
358
|
let n = null;
|
|
359
359
|
return r.parent && (typeof r.parent == "string" ? n = document.querySelector(r.parent) : r.parent instanceof HTMLElement ? n = r.parent : n = r.parent.value), n;
|
|
@@ -380,18 +380,18 @@ function Je(e) {
|
|
|
380
380
|
return r.selectors ? l = o(r) : n && (l = Array.from(n.children).filter((d) => K(d) && Q(d))), l;
|
|
381
381
|
}, i = (r) => (n) => {
|
|
382
382
|
const l = ln[n.key] || n.key.toLowerCase();
|
|
383
|
-
if (
|
|
384
|
-
const d = r.handlers ||
|
|
383
|
+
if (Ee.includes(l)) return;
|
|
384
|
+
const d = r.handlers || Ze;
|
|
385
385
|
for (const f of Object.keys(d)) {
|
|
386
386
|
const [p, ...x] = f.split(".");
|
|
387
387
|
if (p === "keydown" && x.includes(l)) {
|
|
388
|
-
const m = d[f], I = x.filter((v) =>
|
|
388
|
+
const m = d[f], I = x.filter((v) => Ee.includes(v)), w = Ee.some((v) => {
|
|
389
389
|
const g = v.charAt(0).toUpperCase() + v.slice(1);
|
|
390
390
|
return n.getModifierState(g);
|
|
391
391
|
});
|
|
392
392
|
if (I.length > 0) {
|
|
393
393
|
if (w) {
|
|
394
|
-
for (const v of
|
|
394
|
+
for (const v of Ee)
|
|
395
395
|
if (x.includes(v)) {
|
|
396
396
|
const g = v.charAt(0).toUpperCase() + v.slice(1);
|
|
397
397
|
n.getModifierState(g) && m(n);
|
|
@@ -402,11 +402,11 @@ function Je(e) {
|
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
}, c = [];
|
|
405
|
-
|
|
405
|
+
re(() => {
|
|
406
406
|
for (const r of e) {
|
|
407
407
|
const n = t(r), l = s(r), d = i(r), f = n ? [n] : l;
|
|
408
408
|
for (const p of f) {
|
|
409
|
-
const { focused: x } = en(
|
|
409
|
+
const { focused: x } = en(z(p)), m = V(x, (I) => {
|
|
410
410
|
I ? p.addEventListener("keydown", d) : p.removeEventListener("keydown", d);
|
|
411
411
|
});
|
|
412
412
|
c.push(m);
|
|
@@ -417,22 +417,22 @@ function Je(e) {
|
|
|
417
417
|
r();
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
return
|
|
420
|
+
function me(e) {
|
|
421
|
+
return wt() ? (yt(e), !0) : !1;
|
|
422
422
|
}
|
|
423
|
-
const
|
|
423
|
+
const Te = typeof window < "u" && typeof document < "u";
|
|
424
424
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
425
|
-
const an = (e) => e != null, sn = Object.prototype.toString,
|
|
426
|
-
},
|
|
425
|
+
const an = (e) => e != null, sn = Object.prototype.toString, Ct = (e) => sn.call(e) === "[object Object]", Z = () => {
|
|
426
|
+
}, Ge = /* @__PURE__ */ rn();
|
|
427
427
|
function rn() {
|
|
428
428
|
var e, t;
|
|
429
|
-
return
|
|
429
|
+
return Te && ((e = window?.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window?.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
430
430
|
}
|
|
431
431
|
function cn(...e) {
|
|
432
432
|
if (e.length !== 1)
|
|
433
433
|
return Ht(...e);
|
|
434
434
|
const t = e[0];
|
|
435
|
-
return typeof t == "function" ? Pt(
|
|
435
|
+
return typeof t == "function" ? Pt(xt(() => ({ get: t, set: Z }))) : z(t);
|
|
436
436
|
}
|
|
437
437
|
function un(e, t) {
|
|
438
438
|
function o(...s) {
|
|
@@ -449,7 +449,7 @@ function dn(e, t = {}) {
|
|
|
449
449
|
};
|
|
450
450
|
let r;
|
|
451
451
|
return (l) => {
|
|
452
|
-
const d =
|
|
452
|
+
const d = M(e), f = M(t.maxWait);
|
|
453
453
|
return o && c(o), d <= 0 || f !== void 0 && f <= 0 ? (s && (c(s), s = void 0), Promise.resolve(l())) : new Promise((p, x) => {
|
|
454
454
|
i = t.rejectOnCancel ? x : p, r = l, f && !s && (s = setTimeout(() => {
|
|
455
455
|
o && c(o), s = void 0, p(r());
|
|
@@ -459,11 +459,11 @@ function dn(e, t = {}) {
|
|
|
459
459
|
});
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function se(e) {
|
|
463
463
|
return Array.isArray(e) ? e : [e];
|
|
464
464
|
}
|
|
465
465
|
function fn(e) {
|
|
466
|
-
return
|
|
466
|
+
return Ae();
|
|
467
467
|
}
|
|
468
468
|
// @__NO_SIDE_EFFECTS__
|
|
469
469
|
function vn(e, t = 200, o = {}) {
|
|
@@ -477,13 +477,13 @@ function mn(e, t = {}) {
|
|
|
477
477
|
return Ot(e);
|
|
478
478
|
const o = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
479
479
|
for (const s in e.value)
|
|
480
|
-
o[s] =
|
|
480
|
+
o[s] = xt(() => ({
|
|
481
481
|
get() {
|
|
482
482
|
return e.value[s];
|
|
483
483
|
},
|
|
484
484
|
set(i) {
|
|
485
485
|
var c;
|
|
486
|
-
if ((c =
|
|
486
|
+
if ((c = M(t.replaceRef)) != null ? c : !0)
|
|
487
487
|
if (Array.isArray(e.value)) {
|
|
488
488
|
const n = [...e.value];
|
|
489
489
|
n[s] = i, e.value = n;
|
|
@@ -498,9 +498,9 @@ function mn(e, t = {}) {
|
|
|
498
498
|
return o;
|
|
499
499
|
}
|
|
500
500
|
function gn(e, t = !0, o) {
|
|
501
|
-
fn() ?
|
|
501
|
+
fn() ? re(e, o) : t ? e() : Fe(e);
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Et(e, t, o) {
|
|
504
504
|
return V(
|
|
505
505
|
e,
|
|
506
506
|
t,
|
|
@@ -510,33 +510,33 @@ function Ct(e, t, o) {
|
|
|
510
510
|
}
|
|
511
511
|
);
|
|
512
512
|
}
|
|
513
|
-
const
|
|
514
|
-
function
|
|
513
|
+
const De = Te ? window : void 0;
|
|
514
|
+
function fe(e) {
|
|
515
515
|
var t;
|
|
516
|
-
const o =
|
|
516
|
+
const o = M(e);
|
|
517
517
|
return (t = o?.$el) != null ? t : o;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function he(...e) {
|
|
520
520
|
const t = [], o = () => {
|
|
521
521
|
t.forEach((n) => n()), t.length = 0;
|
|
522
|
-
}, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i =
|
|
523
|
-
const n =
|
|
522
|
+
}, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i = D(() => {
|
|
523
|
+
const n = se(M(e[0])).filter((l) => l != null);
|
|
524
524
|
return n.every((l) => typeof l != "string") ? n : void 0;
|
|
525
|
-
}), c =
|
|
525
|
+
}), c = Et(
|
|
526
526
|
() => {
|
|
527
527
|
var n, l;
|
|
528
528
|
return [
|
|
529
|
-
(l = (n = i.value) == null ? void 0 : n.map((d) =>
|
|
530
|
-
|
|
531
|
-
|
|
529
|
+
(l = (n = i.value) == null ? void 0 : n.map((d) => fe(d))) != null ? l : [De].filter((d) => d != null),
|
|
530
|
+
se(M(i.value ? e[1] : e[0])),
|
|
531
|
+
se(R(i.value ? e[2] : e[1])),
|
|
532
532
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
533
|
-
|
|
533
|
+
M(i.value ? e[3] : e[2])
|
|
534
534
|
];
|
|
535
535
|
},
|
|
536
536
|
([n, l, d, f]) => {
|
|
537
537
|
if (o(), !n?.length || !l?.length || !d?.length)
|
|
538
538
|
return;
|
|
539
|
-
const p =
|
|
539
|
+
const p = Ct(f) ? { ...f } : f;
|
|
540
540
|
t.push(
|
|
541
541
|
...n.flatMap(
|
|
542
542
|
(x) => l.flatMap(
|
|
@@ -549,27 +549,27 @@ function ge(...e) {
|
|
|
549
549
|
), r = () => {
|
|
550
550
|
c(), o();
|
|
551
551
|
};
|
|
552
|
-
return
|
|
552
|
+
return me(o), r;
|
|
553
553
|
}
|
|
554
554
|
// @__NO_SIDE_EFFECTS__
|
|
555
555
|
function hn() {
|
|
556
|
-
const e = G(!1), t =
|
|
557
|
-
return t &&
|
|
556
|
+
const e = G(!1), t = Ae();
|
|
557
|
+
return t && re(() => {
|
|
558
558
|
e.value = !0;
|
|
559
559
|
}, t), e;
|
|
560
560
|
}
|
|
561
561
|
// @__NO_SIDE_EFFECTS__
|
|
562
|
-
function
|
|
562
|
+
function It(e) {
|
|
563
563
|
const t = /* @__PURE__ */ hn();
|
|
564
|
-
return
|
|
564
|
+
return D(() => (t.value, !!e()));
|
|
565
565
|
}
|
|
566
|
-
function
|
|
567
|
-
const { window: s =
|
|
566
|
+
function kt(e, t, o = {}) {
|
|
567
|
+
const { window: s = De, ...i } = o;
|
|
568
568
|
let c;
|
|
569
|
-
const r = /* @__PURE__ */
|
|
569
|
+
const r = /* @__PURE__ */ It(() => s && "MutationObserver" in s), n = () => {
|
|
570
570
|
c && (c.disconnect(), c = void 0);
|
|
571
|
-
}, l =
|
|
572
|
-
const x =
|
|
571
|
+
}, l = D(() => {
|
|
572
|
+
const x = M(e), m = se(x).map(fe).filter(an);
|
|
573
573
|
return new Set(m);
|
|
574
574
|
}), d = V(
|
|
575
575
|
() => l.value,
|
|
@@ -580,13 +580,13 @@ function It(e, t, o = {}) {
|
|
|
580
580
|
), f = () => c?.takeRecords(), p = () => {
|
|
581
581
|
d(), n();
|
|
582
582
|
};
|
|
583
|
-
return
|
|
583
|
+
return me(p), {
|
|
584
584
|
isSupported: r,
|
|
585
585
|
stop: p,
|
|
586
586
|
takeRecords: f
|
|
587
587
|
};
|
|
588
588
|
}
|
|
589
|
-
function
|
|
589
|
+
function We(e, t = {}) {
|
|
590
590
|
var o;
|
|
591
591
|
const {
|
|
592
592
|
pointerTypes: s,
|
|
@@ -598,62 +598,62 @@ function Le(e, t = {}) {
|
|
|
598
598
|
onStart: d,
|
|
599
599
|
initialValue: f,
|
|
600
600
|
axis: p = "both",
|
|
601
|
-
draggingElement: x =
|
|
601
|
+
draggingElement: x = De,
|
|
602
602
|
containerElement: m,
|
|
603
603
|
handle: I = e,
|
|
604
604
|
buttons: w = [0]
|
|
605
|
-
} = t, v =
|
|
606
|
-
(o =
|
|
607
|
-
), g =
|
|
608
|
-
|
|
609
|
-
},
|
|
610
|
-
var
|
|
611
|
-
if (!
|
|
605
|
+
} = t, v = z(
|
|
606
|
+
(o = M(f)) != null ? o : { x: 0, y: 0 }
|
|
607
|
+
), g = z(), b = (y) => s ? s.includes(y.pointerType) : !0, P = (y) => {
|
|
608
|
+
M(i) && y.preventDefault(), M(c) && y.stopPropagation();
|
|
609
|
+
}, B = (y) => {
|
|
610
|
+
var $;
|
|
611
|
+
if (!M(w).includes(y.button) || M(t.disabled) || !b(y) || M(r) && y.target !== M(e))
|
|
612
612
|
return;
|
|
613
|
-
const
|
|
614
|
-
x: y.clientX - (
|
|
615
|
-
y: y.clientY - (
|
|
613
|
+
const X = M(m), W = ($ = X?.getBoundingClientRect) == null ? void 0 : $.call(X), O = M(e).getBoundingClientRect(), Y = {
|
|
614
|
+
x: y.clientX - (X ? O.left - W.left + X.scrollLeft : O.left),
|
|
615
|
+
y: y.clientY - (X ? O.top - W.top + X.scrollTop : O.top)
|
|
616
616
|
};
|
|
617
|
-
d?.(Y, y) !== !1 && (g.value = Y,
|
|
617
|
+
d?.(Y, y) !== !1 && (g.value = Y, P(y));
|
|
618
618
|
}, F = (y) => {
|
|
619
|
-
if (
|
|
619
|
+
if (M(t.disabled) || !b(y) || !g.value)
|
|
620
620
|
return;
|
|
621
|
-
const
|
|
622
|
-
let { x:
|
|
623
|
-
(p === "x" || p === "both") && (
|
|
624
|
-
x:
|
|
625
|
-
y:
|
|
626
|
-
}, n?.(v.value, y),
|
|
621
|
+
const $ = M(m), X = M(e).getBoundingClientRect();
|
|
622
|
+
let { x: W, y: O } = v.value;
|
|
623
|
+
(p === "x" || p === "both") && (W = y.clientX - g.value.x, $ && (W = Math.min(Math.max(0, W), $.scrollWidth - X.width))), (p === "y" || p === "both") && (O = y.clientY - g.value.y, $ && (O = Math.min(Math.max(0, O), $.scrollHeight - X.height))), v.value = {
|
|
624
|
+
x: W,
|
|
625
|
+
y: O
|
|
626
|
+
}, n?.(v.value, y), P(y);
|
|
627
627
|
}, S = (y) => {
|
|
628
|
-
|
|
628
|
+
M(t.disabled) || !b(y) || g.value && (g.value = void 0, l?.(v.value, y), P(y));
|
|
629
629
|
};
|
|
630
|
-
if (
|
|
630
|
+
if (Te) {
|
|
631
631
|
const y = () => {
|
|
632
|
-
var
|
|
632
|
+
var $;
|
|
633
633
|
return {
|
|
634
|
-
capture: (
|
|
635
|
-
passive: !
|
|
634
|
+
capture: ($ = t.capture) != null ? $ : !0,
|
|
635
|
+
passive: !M(i)
|
|
636
636
|
};
|
|
637
637
|
};
|
|
638
|
-
|
|
638
|
+
he(I, "pointerdown", B, y), he(x, "pointermove", F, y), he(x, "pointerup", S, y);
|
|
639
639
|
}
|
|
640
640
|
return {
|
|
641
641
|
...mn(v),
|
|
642
642
|
position: v,
|
|
643
|
-
isDragging:
|
|
644
|
-
style:
|
|
643
|
+
isDragging: D(() => !!g.value),
|
|
644
|
+
style: D(
|
|
645
645
|
() => `left:${v.value.x}px;top:${v.value.y}px;`
|
|
646
646
|
)
|
|
647
647
|
};
|
|
648
648
|
}
|
|
649
649
|
function pn(e, t, o = {}) {
|
|
650
|
-
const { window: s =
|
|
650
|
+
const { window: s = De, ...i } = o;
|
|
651
651
|
let c;
|
|
652
|
-
const r = /* @__PURE__ */
|
|
652
|
+
const r = /* @__PURE__ */ It(() => s && "ResizeObserver" in s), n = () => {
|
|
653
653
|
c && (c.disconnect(), c = void 0);
|
|
654
|
-
}, l =
|
|
655
|
-
const p =
|
|
656
|
-
return Array.isArray(p) ? p.map((x) =>
|
|
654
|
+
}, l = D(() => {
|
|
655
|
+
const p = M(e);
|
|
656
|
+
return Array.isArray(p) ? p.map((x) => fe(x)) : [fe(p)];
|
|
657
657
|
}), d = V(
|
|
658
658
|
l,
|
|
659
659
|
(p) => {
|
|
@@ -667,12 +667,12 @@ function pn(e, t, o = {}) {
|
|
|
667
667
|
), f = () => {
|
|
668
668
|
n(), d();
|
|
669
669
|
};
|
|
670
|
-
return
|
|
670
|
+
return me(f), {
|
|
671
671
|
isSupported: r,
|
|
672
672
|
stop: f
|
|
673
673
|
};
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function oe(e, t = {}) {
|
|
676
676
|
const {
|
|
677
677
|
reset: o = !0,
|
|
678
678
|
windowResize: s = !0,
|
|
@@ -681,7 +681,7 @@ function ne(e, t = {}) {
|
|
|
681
681
|
updateTiming: r = "sync"
|
|
682
682
|
} = t, n = G(0), l = G(0), d = G(0), f = G(0), p = G(0), x = G(0), m = G(0), I = G(0);
|
|
683
683
|
function w() {
|
|
684
|
-
const g =
|
|
684
|
+
const g = fe(e);
|
|
685
685
|
if (!g) {
|
|
686
686
|
o && (n.value = 0, l.value = 0, d.value = 0, f.value = 0, p.value = 0, x.value = 0, m.value = 0, I.value = 0);
|
|
687
687
|
return;
|
|
@@ -692,9 +692,9 @@ function ne(e, t = {}) {
|
|
|
692
692
|
function v() {
|
|
693
693
|
r === "sync" ? w() : r === "next-frame" && requestAnimationFrame(() => w());
|
|
694
694
|
}
|
|
695
|
-
return pn(e, v), V(() =>
|
|
695
|
+
return pn(e, v), V(() => fe(e), (g) => !g && v()), kt(e, v, {
|
|
696
696
|
attributeFilter: ["style", "class"]
|
|
697
|
-
}), i &&
|
|
697
|
+
}), i && he("scroll", v, { capture: !0, passive: !0 }), s && he("resize", v, { passive: !0 }), gn(() => {
|
|
698
698
|
c && v();
|
|
699
699
|
}), {
|
|
700
700
|
height: n,
|
|
@@ -723,25 +723,25 @@ const wn = (e) => {
|
|
|
723
723
|
debounce: { default: 300 }
|
|
724
724
|
},
|
|
725
725
|
setup(e, { expose: t }) {
|
|
726
|
-
const o = U("cell"), s = e.store.getCellData(e.colIndex, e.rowIndex), i =
|
|
726
|
+
const o = U("cell"), s = e.store.getCellData(e.colIndex, e.rowIndex), i = z(""), c = z(!1), r = e.store.columns[e.colIndex], n = e.store.rows[e.rowIndex], l = r.align || "center", d = r.width || "40ch", f = D(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), p = D(() => typeof f.value == "string" ? wn(f.value) : !1), x = D(() => ({
|
|
727
727
|
textAlign: l,
|
|
728
728
|
width: d,
|
|
729
729
|
fontWeight: c.value ? "bold" : "inherit",
|
|
730
730
|
paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
|
|
731
|
-
})), m =
|
|
731
|
+
})), m = D(() => ({
|
|
732
732
|
"sticky-column": e.pinned,
|
|
733
733
|
"cell-modified": c.value
|
|
734
734
|
})), I = () => {
|
|
735
735
|
v(), w();
|
|
736
736
|
}, w = () => {
|
|
737
|
-
const { left: S, bottom: y, width:
|
|
738
|
-
r.mask, r.modalComponent && e.store.$patch((
|
|
739
|
-
|
|
737
|
+
const { left: S, bottom: y, width: $, height: X } = oe(o);
|
|
738
|
+
r.mask, r.modalComponent && e.store.$patch((W) => {
|
|
739
|
+
W.modal.visible = !0, W.modal.colIndex = e.colIndex, W.modal.rowIndex = e.rowIndex, W.modal.left = S, W.modal.bottom = y, W.modal.width = $, W.modal.height = X, W.modal.cell = o.value, typeof r.modalComponent == "function" ? W.modal.component = r.modalComponent({ table: W.table, row: n, column: r }) : W.modal.component = r.modalComponent, W.modal.componentProps = r.modalComponentExtraProps;
|
|
740
740
|
});
|
|
741
741
|
};
|
|
742
742
|
if (e.addNavigation) {
|
|
743
743
|
let S = {
|
|
744
|
-
...
|
|
744
|
+
...Ze,
|
|
745
745
|
"keydown.f2": w,
|
|
746
746
|
"keydown.alt.up": w,
|
|
747
747
|
"keydown.alt.down": w,
|
|
@@ -751,7 +751,7 @@ const wn = (e) => {
|
|
|
751
751
|
typeof e.addNavigation == "object" && (S = {
|
|
752
752
|
...S,
|
|
753
753
|
...e.addNavigation
|
|
754
|
-
}),
|
|
754
|
+
}), Qe([
|
|
755
755
|
{
|
|
756
756
|
selectors: o,
|
|
757
757
|
handlers: S
|
|
@@ -774,70 +774,71 @@ const wn = (e) => {
|
|
|
774
774
|
try {
|
|
775
775
|
const S = window.getSelection();
|
|
776
776
|
if (S && S.rangeCount > 0 && o.value) {
|
|
777
|
-
const y = S.getRangeAt(0),
|
|
778
|
-
if (
|
|
779
|
-
return
|
|
777
|
+
const y = S.getRangeAt(0), $ = y.cloneRange();
|
|
778
|
+
if ($.selectNodeContents && $.setEnd)
|
|
779
|
+
return $.selectNodeContents(o.value), $.setEnd(y.endContainer, y.endOffset), $.toString().length;
|
|
780
780
|
}
|
|
781
781
|
} catch {
|
|
782
782
|
}
|
|
783
783
|
return 0;
|
|
784
|
-
},
|
|
784
|
+
}, P = (S) => {
|
|
785
785
|
if (o.value)
|
|
786
786
|
try {
|
|
787
787
|
const y = window.getSelection();
|
|
788
788
|
if (!y) return;
|
|
789
|
-
let
|
|
790
|
-
const
|
|
791
|
-
if (!
|
|
792
|
-
let
|
|
793
|
-
for (;
|
|
794
|
-
const Y =
|
|
795
|
-
if (S <= _ && (
|
|
796
|
-
|
|
789
|
+
let $ = 0;
|
|
790
|
+
const X = document.createTreeWalker ? document.createTreeWalker(o.value, NodeFilter.SHOW_TEXT, null) : null;
|
|
791
|
+
if (!X) return;
|
|
792
|
+
let W, O = null;
|
|
793
|
+
for (; W = X.nextNode(); ) {
|
|
794
|
+
const Y = W, _ = $ + Y.textContent.length;
|
|
795
|
+
if (S <= _ && (O = document.createRange(), O.setStart && O.setEnd)) {
|
|
796
|
+
O.setStart(Y, S - $), O.setEnd(Y, S - $);
|
|
797
797
|
break;
|
|
798
798
|
}
|
|
799
|
-
|
|
799
|
+
$ = _;
|
|
800
800
|
}
|
|
801
|
-
|
|
801
|
+
O && y.removeAllRanges && y.addRange && (y.removeAllRanges(), y.addRange(O));
|
|
802
802
|
} catch {
|
|
803
803
|
}
|
|
804
|
-
},
|
|
804
|
+
}, B = (S) => {
|
|
805
|
+
if (!r.edit) return;
|
|
805
806
|
const y = S.target;
|
|
806
807
|
if (y.textContent === i.value)
|
|
807
808
|
return;
|
|
808
|
-
const
|
|
809
|
-
i.value = y.textContent, r.format ? (c.value = y.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, s), e.store.setCellText(e.colIndex, e.rowIndex, y.textContent)) : (c.value = y.textContent !== s, e.store.setCellData(e.colIndex, e.rowIndex, y.textContent)),
|
|
810
|
-
|
|
809
|
+
const $ = b();
|
|
810
|
+
i.value = y.textContent, r.format ? (c.value = y.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, s), e.store.setCellText(e.colIndex, e.rowIndex, y.textContent)) : (c.value = y.textContent !== s, e.store.setCellData(e.colIndex, e.rowIndex, y.textContent)), Fe().then(() => {
|
|
811
|
+
P($);
|
|
811
812
|
});
|
|
812
|
-
}, F = /* @__PURE__ */ vn(
|
|
813
|
+
}, F = /* @__PURE__ */ vn(B, e.debounce);
|
|
813
814
|
return t({
|
|
814
815
|
currentData: i
|
|
815
|
-
}), (S, y) => (
|
|
816
|
+
}), (S, y) => (T(), L("td", {
|
|
816
817
|
ref: "cell",
|
|
817
818
|
"data-colindex": S.colIndex,
|
|
818
819
|
"data-rowindex": S.rowIndex,
|
|
819
|
-
"data-editable":
|
|
820
|
-
contenteditable:
|
|
820
|
+
"data-editable": R(r).edit,
|
|
821
|
+
contenteditable: R(r).edit,
|
|
821
822
|
tabindex: S.tabIndex,
|
|
822
823
|
spellcheck: !1,
|
|
823
824
|
style: ee(x.value),
|
|
824
825
|
onFocus: g,
|
|
825
|
-
onPaste:
|
|
826
|
+
onPaste: B,
|
|
826
827
|
onInput: y[0] || (y[0] = //@ts-ignore
|
|
827
|
-
(
|
|
828
|
+
(...$) => R(F) && R(F)(...$)),
|
|
828
829
|
onClick: I,
|
|
829
830
|
class: q(["atable-cell", m.value])
|
|
830
831
|
}, [
|
|
831
|
-
|
|
832
|
+
R(r).cellComponent ? (T(), ce(ke(R(r).cellComponent), Ve({
|
|
832
833
|
key: 0,
|
|
833
834
|
value: f.value
|
|
834
|
-
},
|
|
835
|
+
}, R(r).cellComponentProps), null, 16, ["value"])) : p.value ? (T(), L("span", {
|
|
835
836
|
key: 1,
|
|
836
837
|
innerHTML: f.value
|
|
837
|
-
}, null, 8, bn)) : (
|
|
838
|
+
}, null, 8, bn)) : (T(), L("span", Cn, ue(f.value), 1))
|
|
838
839
|
], 46, xn));
|
|
839
840
|
}
|
|
840
|
-
}), In = ["tabindex"], kn = ["tabindex"], $n = ["colspan"],
|
|
841
|
+
}), In = ["tabindex"], kn = ["tabindex"], $n = ["colspan"], Rn = /* @__PURE__ */ te({
|
|
841
842
|
__name: "AExpansionRow",
|
|
842
843
|
props: {
|
|
843
844
|
rowIndex: {},
|
|
@@ -846,40 +847,40 @@ const wn = (e) => {
|
|
|
846
847
|
addNavigation: { type: [Boolean, Object] }
|
|
847
848
|
},
|
|
848
849
|
setup(e) {
|
|
849
|
-
const t = U("rowEl"), o =
|
|
850
|
+
const t = U("rowEl"), o = D(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
|
|
850
851
|
if (e.addNavigation) {
|
|
851
852
|
const s = {
|
|
852
853
|
"keydown.control.g": (i) => {
|
|
853
854
|
i.stopPropagation(), i.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
|
|
854
855
|
}
|
|
855
856
|
};
|
|
856
|
-
typeof e.addNavigation == "object" && Object.assign(s, e.addNavigation),
|
|
857
|
+
typeof e.addNavigation == "object" && Object.assign(s, e.addNavigation), Qe([
|
|
857
858
|
{
|
|
858
859
|
selectors: t,
|
|
859
860
|
handlers: s
|
|
860
861
|
}
|
|
861
862
|
]);
|
|
862
863
|
}
|
|
863
|
-
return (s, i) => (
|
|
864
|
-
|
|
864
|
+
return (s, i) => (T(), L(ae, null, [
|
|
865
|
+
N("tr", Ve(s.$attrs, {
|
|
865
866
|
ref: "rowEl",
|
|
866
867
|
tabindex: s.tabIndex,
|
|
867
868
|
class: "expandable-row"
|
|
868
869
|
}), [
|
|
869
|
-
|
|
870
|
+
N("td", {
|
|
870
871
|
tabIndex: -1,
|
|
871
872
|
onClick: i[0] || (i[0] = (c) => s.store.toggleRowExpand(s.rowIndex)),
|
|
872
873
|
class: "row-index"
|
|
873
|
-
},
|
|
874
|
+
}, ue(o.value), 1),
|
|
874
875
|
j(s.$slots, "row", {}, void 0, !0)
|
|
875
876
|
], 16, In),
|
|
876
|
-
s.store.display[s.rowIndex].expanded ? (
|
|
877
|
+
s.store.display[s.rowIndex].expanded ? (T(), L("tr", {
|
|
877
878
|
key: 0,
|
|
878
879
|
ref: "rowExpanded",
|
|
879
880
|
tabindex: s.tabIndex,
|
|
880
881
|
class: "expanded-row"
|
|
881
882
|
}, [
|
|
882
|
-
|
|
883
|
+
N("td", {
|
|
883
884
|
tabIndex: -1,
|
|
884
885
|
colspan: s.store.columns.length + 1,
|
|
885
886
|
class: "expanded-row-content"
|
|
@@ -889,12 +890,12 @@ const wn = (e) => {
|
|
|
889
890
|
], 8, kn)) : J("", !0)
|
|
890
891
|
], 64));
|
|
891
892
|
}
|
|
892
|
-
}),
|
|
893
|
+
}), ie = (e, t) => {
|
|
893
894
|
const o = e.__vccOpts || e;
|
|
894
895
|
for (const [s, i] of t)
|
|
895
896
|
o[s] = i;
|
|
896
897
|
return o;
|
|
897
|
-
},
|
|
898
|
+
}, Sn = /* @__PURE__ */ ie(Rn, [["__scopeId", "data-v-5ad4bb41"]]), Mn = ["colspan"], An = {
|
|
898
899
|
ref: "container",
|
|
899
900
|
class: "gantt-container"
|
|
900
901
|
}, Tn = ["data-rowindex", "data-colindex"], Dn = {
|
|
@@ -915,18 +916,18 @@ const wn = (e) => {
|
|
|
915
916
|
},
|
|
916
917
|
emits: ["connection:create"],
|
|
917
918
|
setup(e, { expose: t, emit: o }) {
|
|
918
|
-
Lt((
|
|
919
|
+
Lt((C) => ({
|
|
919
920
|
"17bc2643": i.value,
|
|
920
|
-
"0a8a9192":
|
|
921
|
+
"0a8a9192": C.colspan
|
|
921
922
|
}));
|
|
922
|
-
const s = o, i =
|
|
923
|
-
const
|
|
923
|
+
const s = o, i = z(e.color.length >= 6 ? e.color : "#cccccc"), c = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, r = U("container"), n = U("bar"), l = U("leftResizeHandle"), d = U("rightResizeHandle"), f = U("leftConnectionHandle"), p = U("rightConnectionHandle"), { width: x } = oe(r), { left: m, right: I } = oe(n), w = z(e.start), v = z(e.end || w.value + e.colspan), g = z(!1), b = z(!1), P = z(!1), B = z(!1), F = z(!1), S = z({ startX: 0, startY: 0, endX: 0, endY: 0 }), y = D(() => ye.value || Y.value || _.value), $ = D(() => e.colspan > 0 ? x.value / e.colspan : 0), X = D(() => {
|
|
924
|
+
const C = w.value / e.colspan * 100, a = v.value / e.colspan * 100;
|
|
924
925
|
return {
|
|
925
|
-
left: `${
|
|
926
|
-
width: `${a -
|
|
926
|
+
left: `${C}%`,
|
|
927
|
+
width: `${a - C}%`,
|
|
927
928
|
backgroundColor: i.value
|
|
928
929
|
};
|
|
929
|
-
}),
|
|
930
|
+
}), W = D(
|
|
930
931
|
() => ({
|
|
931
932
|
position: "fixed",
|
|
932
933
|
top: 0,
|
|
@@ -936,96 +937,96 @@ const wn = (e) => {
|
|
|
936
937
|
pointerEvents: "none",
|
|
937
938
|
zIndex: 1e3
|
|
938
939
|
})
|
|
939
|
-
),
|
|
940
|
+
), O = z({ startX: 0, startPos: 0 }), { isDragging: Y } = We(l, {
|
|
940
941
|
axis: "x",
|
|
941
|
-
onStart: () =>
|
|
942
|
-
onMove: ({ x:
|
|
943
|
-
onEnd: ({ x:
|
|
944
|
-
}), { isDragging: _ } =
|
|
942
|
+
onStart: () => ge(m.value, w.value),
|
|
943
|
+
onMove: ({ x: C }) => xe(C),
|
|
944
|
+
onEnd: ({ x: C }) => Oe(C)
|
|
945
|
+
}), { isDragging: _ } = We(d, {
|
|
945
946
|
axis: "x",
|
|
946
|
-
onStart: () =>
|
|
947
|
-
onMove: ({ x:
|
|
948
|
-
onEnd: ({ x:
|
|
949
|
-
}), { isDragging:
|
|
947
|
+
onStart: () => ge(I.value, v.value),
|
|
948
|
+
onMove: ({ x: C }) => be(C),
|
|
949
|
+
onEnd: ({ x: C }) => _e(C)
|
|
950
|
+
}), { isDragging: ye } = We(n, {
|
|
950
951
|
exact: !0,
|
|
951
952
|
axis: "x",
|
|
952
|
-
onStart: () =>
|
|
953
|
-
onMove: ({ x:
|
|
954
|
-
onEnd: ({ x:
|
|
953
|
+
onStart: () => ge(m.value, w.value),
|
|
954
|
+
onMove: ({ x: C }) => et(C),
|
|
955
|
+
onEnd: ({ x: C }) => tt(C)
|
|
955
956
|
});
|
|
956
|
-
|
|
957
|
-
|
|
957
|
+
re(() => {
|
|
958
|
+
nt();
|
|
958
959
|
}), Bt(() => {
|
|
959
|
-
|
|
960
|
+
ot();
|
|
960
961
|
});
|
|
961
|
-
function
|
|
962
|
-
n.value && (n.value.style.transition = "none"),
|
|
962
|
+
function ge(C, a) {
|
|
963
|
+
n.value && (n.value.style.transition = "none"), O.value = { startX: C, startPos: a };
|
|
963
964
|
}
|
|
964
|
-
function
|
|
965
|
+
function xe(C) {
|
|
965
966
|
if (!Y.value || !n.value) return;
|
|
966
|
-
const u = (
|
|
967
|
+
const u = (C - O.value.startX) / $.value, h = Math.max(0, Math.min(v.value - 1, O.value.startPos + u));
|
|
967
968
|
n.value.style.left = `${h / e.colspan * 100}%`, n.value.style.width = `${(v.value - h) / e.colspan * 100}%`;
|
|
968
969
|
}
|
|
969
|
-
function
|
|
970
|
+
function Oe(C) {
|
|
970
971
|
if (!n.value) return;
|
|
971
|
-
const a =
|
|
972
|
-
w.value =
|
|
972
|
+
const a = C - O.value.startX, u = Math.round(a / $.value), h = w.value, E = Math.max(0, Math.min(v.value - 1, O.value.startPos + u));
|
|
973
|
+
w.value = E, e.store.updateGanttBar({
|
|
973
974
|
rowIndex: e.rowIndex,
|
|
974
975
|
colIndex: e.colIndex,
|
|
975
976
|
type: "resize",
|
|
976
977
|
edge: "start",
|
|
977
978
|
oldStart: h,
|
|
978
|
-
newStart:
|
|
979
|
+
newStart: E,
|
|
979
980
|
end: v.value,
|
|
980
981
|
delta: u,
|
|
981
982
|
oldColspan: v.value - h,
|
|
982
|
-
newColspan: v.value -
|
|
983
|
+
newColspan: v.value - E
|
|
983
984
|
});
|
|
984
985
|
}
|
|
985
|
-
function
|
|
986
|
+
function be(C) {
|
|
986
987
|
if (!_.value || !n.value) return;
|
|
987
|
-
const u = (
|
|
988
|
+
const u = (C - O.value.startX) / $.value, h = Math.max(w.value + 1, Math.min(e.columnsCount, O.value.startPos + u));
|
|
988
989
|
n.value.style.width = `${(h - w.value) / e.colspan * 100}%`;
|
|
989
990
|
}
|
|
990
|
-
function
|
|
991
|
+
function _e(C) {
|
|
991
992
|
if (!n.value) return;
|
|
992
|
-
const a =
|
|
993
|
-
v.value =
|
|
993
|
+
const a = C - O.value.startX, u = Math.round(a / $.value), h = v.value, E = Math.max(w.value + 1, Math.min(e.columnsCount, O.value.startPos + u));
|
|
994
|
+
v.value = E, e.store.updateGanttBar({
|
|
994
995
|
rowIndex: e.rowIndex,
|
|
995
996
|
colIndex: e.colIndex,
|
|
996
997
|
type: "resize",
|
|
997
998
|
edge: "end",
|
|
998
999
|
oldEnd: h,
|
|
999
|
-
newEnd:
|
|
1000
|
+
newEnd: E,
|
|
1000
1001
|
start: w.value,
|
|
1001
1002
|
delta: u,
|
|
1002
1003
|
oldColspan: h - w.value,
|
|
1003
|
-
newColspan:
|
|
1004
|
+
newColspan: E - w.value
|
|
1004
1005
|
});
|
|
1005
1006
|
}
|
|
1006
|
-
function
|
|
1007
|
-
if (!
|
|
1008
|
-
const u = (
|
|
1009
|
-
n.value.style.left = `${
|
|
1007
|
+
function et(C) {
|
|
1008
|
+
if (!ye.value || !n.value) return;
|
|
1009
|
+
const u = (C - O.value.startX) / $.value, h = v.value - w.value, E = Math.max(0, Math.min(O.value.startPos + u, e.columnsCount - h));
|
|
1010
|
+
n.value.style.left = `${E / e.colspan * 100}%`;
|
|
1010
1011
|
}
|
|
1011
|
-
function
|
|
1012
|
+
function tt(C) {
|
|
1012
1013
|
if (!n.value) return;
|
|
1013
|
-
const a =
|
|
1014
|
-
let
|
|
1015
|
-
|
|
1014
|
+
const a = C - O.value.startX, u = Math.round(a / $.value), h = v.value - w.value, E = w.value, H = v.value;
|
|
1015
|
+
let k = O.value.startPos + u, A = k + h;
|
|
1016
|
+
k < 0 ? (k = 0, A = h) : A > e.columnsCount && (A = e.columnsCount, k = A - h), w.value = k, v.value = A, e.store.updateGanttBar({
|
|
1016
1017
|
rowIndex: e.rowIndex,
|
|
1017
1018
|
colIndex: e.colIndex,
|
|
1018
1019
|
type: "bar",
|
|
1019
|
-
oldStart:
|
|
1020
|
-
oldEnd:
|
|
1021
|
-
newStart:
|
|
1022
|
-
newEnd:
|
|
1020
|
+
oldStart: E,
|
|
1021
|
+
oldEnd: H,
|
|
1022
|
+
newStart: k,
|
|
1023
|
+
newEnd: A,
|
|
1023
1024
|
delta: u,
|
|
1024
|
-
colspan:
|
|
1025
|
+
colspan: A - k
|
|
1025
1026
|
});
|
|
1026
1027
|
}
|
|
1027
|
-
function
|
|
1028
|
-
const { x:
|
|
1028
|
+
function nt() {
|
|
1029
|
+
const { x: C, y: a } = oe(n), { x: u, y: h } = oe(f), { x: E, y: H } = oe(p);
|
|
1029
1030
|
e.store.registerGanttBar({
|
|
1030
1031
|
id: c,
|
|
1031
1032
|
rowIndex: e.rowIndex,
|
|
@@ -1034,7 +1035,7 @@ const wn = (e) => {
|
|
|
1034
1035
|
endIndex: v,
|
|
1035
1036
|
color: i,
|
|
1036
1037
|
label: e.label,
|
|
1037
|
-
position: { x:
|
|
1038
|
+
position: { x: C, y: a }
|
|
1038
1039
|
}), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
|
|
1039
1040
|
id: `${c}-connection-left`,
|
|
1040
1041
|
rowIndex: e.rowIndex,
|
|
@@ -1048,112 +1049,112 @@ const wn = (e) => {
|
|
|
1048
1049
|
rowIndex: e.rowIndex,
|
|
1049
1050
|
colIndex: e.colIndex,
|
|
1050
1051
|
side: "right",
|
|
1051
|
-
position: { x:
|
|
1052
|
+
position: { x: E, y: H },
|
|
1052
1053
|
visible: b,
|
|
1053
1054
|
barId: c
|
|
1054
1055
|
}));
|
|
1055
1056
|
}
|
|
1056
|
-
function
|
|
1057
|
+
function ot() {
|
|
1057
1058
|
e.store.unregisterGanttBar(c), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${c}-connection-left`), e.store.unregisterConnectionHandle(`${c}-connection-right`));
|
|
1058
1059
|
}
|
|
1059
|
-
function
|
|
1060
|
+
function lt() {
|
|
1060
1061
|
e.store.isDependencyGraphEnabled && (g.value = !0, b.value = !0);
|
|
1061
1062
|
}
|
|
1062
|
-
function
|
|
1063
|
-
!
|
|
1063
|
+
function He() {
|
|
1064
|
+
!P.value && !B.value && (g.value = !1, b.value = !1);
|
|
1064
1065
|
}
|
|
1065
|
-
function
|
|
1066
|
-
a.preventDefault(), a.stopPropagation(), F.value = !0,
|
|
1067
|
-
const u =
|
|
1066
|
+
function Pe(C, a) {
|
|
1067
|
+
a.preventDefault(), a.stopPropagation(), F.value = !0, C === "left" ? P.value = !0 : B.value = !0;
|
|
1068
|
+
const u = C === "left" ? f.value : p.value;
|
|
1068
1069
|
if (u) {
|
|
1069
|
-
const
|
|
1070
|
-
S.value = { startX:
|
|
1070
|
+
const H = u.getBoundingClientRect(), k = H.left + H.width / 2, A = H.top + H.height / 2;
|
|
1071
|
+
S.value = { startX: k, startY: A, endX: k, endY: A };
|
|
1071
1072
|
}
|
|
1072
|
-
const h = (
|
|
1073
|
-
S.value.endX =
|
|
1074
|
-
},
|
|
1075
|
-
|
|
1073
|
+
const h = (H) => {
|
|
1074
|
+
S.value.endX = H.clientX, S.value.endY = H.clientY;
|
|
1075
|
+
}, E = (H) => {
|
|
1076
|
+
Le(H, C), Be(h, E);
|
|
1076
1077
|
};
|
|
1077
|
-
document.addEventListener("mousemove", h), document.addEventListener("mouseup",
|
|
1078
|
+
document.addEventListener("mousemove", h), document.addEventListener("mouseup", E);
|
|
1078
1079
|
}
|
|
1079
|
-
function
|
|
1080
|
-
const h = document.elementFromPoint(
|
|
1080
|
+
function Le(C, a) {
|
|
1081
|
+
const h = document.elementFromPoint(C.clientX, C.clientY)?.closest(".connection-handle");
|
|
1081
1082
|
if (h && h !== (a === "left" ? f.value : p.value)) {
|
|
1082
|
-
const
|
|
1083
|
-
if (
|
|
1084
|
-
const
|
|
1083
|
+
const E = h.closest(".gantt-bar");
|
|
1084
|
+
if (E) {
|
|
1085
|
+
const H = parseInt(E.getAttribute("data-rowindex") || "0"), k = parseInt(E.getAttribute("data-colindex") || "0"), A = h.classList.contains("left-connection-handle") ? "left" : "right", ne = `gantt-bar-row-${H}-col-${k}`, Ce = e.store.createConnection(
|
|
1085
1086
|
`${c}-connection-${a}`,
|
|
1086
|
-
`${
|
|
1087
|
+
`${ne}-connection-${A}`
|
|
1087
1088
|
);
|
|
1088
|
-
|
|
1089
|
+
Ce && s("connection:create", Ce);
|
|
1089
1090
|
}
|
|
1090
1091
|
}
|
|
1091
1092
|
}
|
|
1092
|
-
function
|
|
1093
|
-
F.value = !1,
|
|
1093
|
+
function Be(C, a) {
|
|
1094
|
+
F.value = !1, P.value = !1, B.value = !1, document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", a), n.value?.matches(":hover") || He();
|
|
1094
1095
|
}
|
|
1095
1096
|
return t({
|
|
1096
|
-
barStyle:
|
|
1097
|
-
cleanupConnectionDrag:
|
|
1097
|
+
barStyle: X,
|
|
1098
|
+
cleanupConnectionDrag: Be,
|
|
1098
1099
|
currentEnd: v,
|
|
1099
|
-
handleConnectionDrop:
|
|
1100
|
-
isLeftConnectionDragging:
|
|
1100
|
+
handleConnectionDrop: Le,
|
|
1101
|
+
isLeftConnectionDragging: P,
|
|
1101
1102
|
isLeftConnectionVisible: g,
|
|
1102
|
-
isRightConnectionDragging:
|
|
1103
|
+
isRightConnectionDragging: B,
|
|
1103
1104
|
isRightConnectionVisible: b,
|
|
1104
1105
|
showDragPreview: F
|
|
1105
|
-
}), (
|
|
1106
|
+
}), (C, a) => (T(), L("td", {
|
|
1106
1107
|
class: "aganttcell",
|
|
1107
|
-
colspan:
|
|
1108
|
+
colspan: C.colspan
|
|
1108
1109
|
}, [
|
|
1109
|
-
|
|
1110
|
-
|
|
1110
|
+
N("div", An, [
|
|
1111
|
+
N("div", {
|
|
1111
1112
|
ref: "bar",
|
|
1112
|
-
"data-rowindex":
|
|
1113
|
-
"data-colindex":
|
|
1113
|
+
"data-rowindex": C.rowIndex,
|
|
1114
|
+
"data-colindex": C.colIndex,
|
|
1114
1115
|
class: q(["gantt-bar", { "is-dragging": y.value }]),
|
|
1115
|
-
style: ee(
|
|
1116
|
-
onMouseenter:
|
|
1117
|
-
onMouseleave:
|
|
1116
|
+
style: ee(X.value),
|
|
1117
|
+
onMouseenter: lt,
|
|
1118
|
+
onMouseleave: He
|
|
1118
1119
|
}, [
|
|
1119
|
-
|
|
1120
|
+
C.store.isDependencyGraphEnabled ? (T(), L("div", {
|
|
1120
1121
|
key: 0,
|
|
1121
1122
|
ref: "leftConnectionHandle",
|
|
1122
|
-
class: q(["connection-handle left-connection-handle", { visible: g.value, "is-dragging":
|
|
1123
|
-
onMousedown: a[0] || (a[0] =
|
|
1123
|
+
class: q(["connection-handle left-connection-handle", { visible: g.value, "is-dragging": P.value }]),
|
|
1124
|
+
onMousedown: a[0] || (a[0] = Se((u) => Pe("left", u), ["stop"]))
|
|
1124
1125
|
}, a[2] || (a[2] = [
|
|
1125
|
-
|
|
1126
|
+
N("div", { class: "connection-dot" }, null, -1)
|
|
1126
1127
|
]), 34)) : J("", !0),
|
|
1127
|
-
|
|
1128
|
+
C.store.isDependencyGraphEnabled ? (T(), L("div", {
|
|
1128
1129
|
key: 1,
|
|
1129
1130
|
ref: "rightConnectionHandle",
|
|
1130
|
-
class: q(["connection-handle right-connection-handle", { visible: b.value, "is-dragging":
|
|
1131
|
-
onMousedown: a[1] || (a[1] =
|
|
1131
|
+
class: q(["connection-handle right-connection-handle", { visible: b.value, "is-dragging": B.value }]),
|
|
1132
|
+
onMousedown: a[1] || (a[1] = Se((u) => Pe("right", u), ["stop"]))
|
|
1132
1133
|
}, a[3] || (a[3] = [
|
|
1133
|
-
|
|
1134
|
+
N("div", { class: "connection-dot" }, null, -1)
|
|
1134
1135
|
]), 34)) : J("", !0),
|
|
1135
|
-
|
|
1136
|
+
N("div", {
|
|
1136
1137
|
ref: "leftResizeHandle",
|
|
1137
|
-
class: q(["resize-handle left-resize-handle", { "is-dragging":
|
|
1138
|
+
class: q(["resize-handle left-resize-handle", { "is-dragging": R(Y) }])
|
|
1138
1139
|
}, a[4] || (a[4] = [
|
|
1139
|
-
|
|
1140
|
-
|
|
1140
|
+
N("div", { class: "handle-grip" }, null, -1),
|
|
1141
|
+
N("div", { class: "vertical-indicator left-indicator" }, null, -1)
|
|
1141
1142
|
]), 2),
|
|
1142
|
-
|
|
1143
|
-
|
|
1143
|
+
C.label ? (T(), L("label", Dn, ue(C.label), 1)) : J("", !0),
|
|
1144
|
+
N("div", {
|
|
1144
1145
|
ref: "rightResizeHandle",
|
|
1145
|
-
class: q(["resize-handle right-resize-handle", { "is-dragging":
|
|
1146
|
+
class: q(["resize-handle right-resize-handle", { "is-dragging": R(_) }])
|
|
1146
1147
|
}, a[5] || (a[5] = [
|
|
1147
|
-
|
|
1148
|
-
|
|
1148
|
+
N("div", { class: "handle-grip" }, null, -1),
|
|
1149
|
+
N("div", { class: "vertical-indicator right-indicator" }, null, -1)
|
|
1149
1150
|
]), 2)
|
|
1150
1151
|
], 46, Tn)
|
|
1151
1152
|
], 512),
|
|
1152
|
-
|
|
1153
|
+
C.store.isDependencyGraphEnabled && F.value ? (T(), L("svg", {
|
|
1153
1154
|
key: 0,
|
|
1154
|
-
style: ee(
|
|
1155
|
+
style: ee(W.value)
|
|
1155
1156
|
}, [
|
|
1156
|
-
|
|
1157
|
+
N("line", {
|
|
1157
1158
|
x1: S.value.startX,
|
|
1158
1159
|
y1: S.value.startY,
|
|
1159
1160
|
x2: S.value.endX,
|
|
@@ -1165,7 +1166,7 @@ const wn = (e) => {
|
|
|
1165
1166
|
], 4)) : J("", !0)
|
|
1166
1167
|
], 8, Mn));
|
|
1167
1168
|
}
|
|
1168
|
-
}), Pn = /* @__PURE__ */
|
|
1169
|
+
}), Pn = /* @__PURE__ */ ie(Hn, [["__scopeId", "data-v-52febd32"]]), Ln = ["tabindex"], Bn = /* @__PURE__ */ te({
|
|
1169
1170
|
__name: "ARow",
|
|
1170
1171
|
props: {
|
|
1171
1172
|
rowIndex: {},
|
|
@@ -1174,68 +1175,68 @@ const wn = (e) => {
|
|
|
1174
1175
|
addNavigation: { type: [Boolean, Object], default: !1 }
|
|
1175
1176
|
},
|
|
1176
1177
|
setup(e) {
|
|
1177
|
-
const t = U("rowEl"), o =
|
|
1178
|
+
const t = U("rowEl"), o = D(() => e.store.isRowVisible(e.rowIndex)), s = D(() => e.store.getRowExpandSymbol(e.rowIndex));
|
|
1178
1179
|
if (e.addNavigation) {
|
|
1179
|
-
let i =
|
|
1180
|
+
let i = Ze;
|
|
1180
1181
|
typeof e.addNavigation == "object" && (i = {
|
|
1181
1182
|
...i,
|
|
1182
1183
|
...e.addNavigation
|
|
1183
|
-
}),
|
|
1184
|
+
}), Qe([
|
|
1184
1185
|
{
|
|
1185
1186
|
selectors: t,
|
|
1186
1187
|
handlers: i
|
|
1187
1188
|
}
|
|
1188
1189
|
]);
|
|
1189
1190
|
}
|
|
1190
|
-
return (i, c) =>
|
|
1191
|
+
return (i, c) => Me((T(), L("tr", {
|
|
1191
1192
|
ref: "rowEl",
|
|
1192
1193
|
tabindex: i.tabIndex,
|
|
1193
1194
|
class: "atable-row"
|
|
1194
1195
|
}, [
|
|
1195
1196
|
i.store.config.view !== "uncounted" ? j(i.$slots, "index", { key: 0 }, () => [
|
|
1196
|
-
i.store.config.view === "list" ? (
|
|
1197
|
+
i.store.config.view === "list" ? (T(), L("td", {
|
|
1197
1198
|
key: 0,
|
|
1198
1199
|
tabIndex: -1,
|
|
1199
1200
|
class: q(["list-index", i.store.hasPinnedColumns ? "sticky-index" : ""])
|
|
1200
|
-
},
|
|
1201
|
+
}, ue(i.rowIndex + 1), 3)) : i.store.isTreeView ? (T(), L("td", {
|
|
1201
1202
|
key: 1,
|
|
1202
1203
|
tabIndex: -1,
|
|
1203
1204
|
class: q(["tree-index", i.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
1204
1205
|
onClick: c[0] || (c[0] = (r) => i.store.toggleRowExpand(i.rowIndex))
|
|
1205
|
-
},
|
|
1206
|
+
}, ue(s.value), 3)) : J("", !0)
|
|
1206
1207
|
], !0) : J("", !0),
|
|
1207
1208
|
j(i.$slots, "default", {}, void 0, !0)
|
|
1208
1209
|
], 8, Ln)), [
|
|
1209
|
-
[
|
|
1210
|
+
[bt, o.value]
|
|
1210
1211
|
]);
|
|
1211
1212
|
}
|
|
1212
|
-
}),
|
|
1213
|
-
function
|
|
1213
|
+
}), $t = /* @__PURE__ */ ie(Bn, [["__scopeId", "data-v-c554ee0f"]]), Ke = Te ? window : void 0;
|
|
1214
|
+
function le(e) {
|
|
1214
1215
|
var t;
|
|
1215
|
-
const o =
|
|
1216
|
+
const o = M(e);
|
|
1216
1217
|
return (t = o?.$el) != null ? t : o;
|
|
1217
1218
|
}
|
|
1218
|
-
function
|
|
1219
|
+
function Re(...e) {
|
|
1219
1220
|
const t = [], o = () => {
|
|
1220
1221
|
t.forEach((n) => n()), t.length = 0;
|
|
1221
|
-
}, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i =
|
|
1222
|
-
const n =
|
|
1222
|
+
}, s = (n, l, d, f) => (n.addEventListener(l, d, f), () => n.removeEventListener(l, d, f)), i = D(() => {
|
|
1223
|
+
const n = se(M(e[0])).filter((l) => l != null);
|
|
1223
1224
|
return n.every((l) => typeof l != "string") ? n : void 0;
|
|
1224
|
-
}), c =
|
|
1225
|
+
}), c = Et(
|
|
1225
1226
|
() => {
|
|
1226
1227
|
var n, l;
|
|
1227
1228
|
return [
|
|
1228
|
-
(l = (n = i.value) == null ? void 0 : n.map((d) =>
|
|
1229
|
-
|
|
1230
|
-
|
|
1229
|
+
(l = (n = i.value) == null ? void 0 : n.map((d) => le(d))) != null ? l : [Ke].filter((d) => d != null),
|
|
1230
|
+
se(M(i.value ? e[1] : e[0])),
|
|
1231
|
+
se(R(i.value ? e[2] : e[1])),
|
|
1231
1232
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
1232
|
-
|
|
1233
|
+
M(i.value ? e[3] : e[2])
|
|
1233
1234
|
];
|
|
1234
1235
|
},
|
|
1235
1236
|
([n, l, d, f]) => {
|
|
1236
1237
|
if (o(), !n?.length || !l?.length || !d?.length)
|
|
1237
1238
|
return;
|
|
1238
|
-
const p =
|
|
1239
|
+
const p = Ct(f) ? { ...f } : f;
|
|
1239
1240
|
t.push(
|
|
1240
1241
|
...n.flatMap(
|
|
1241
1242
|
(x) => l.flatMap(
|
|
@@ -1248,37 +1249,37 @@ function ke(...e) {
|
|
|
1248
1249
|
), r = () => {
|
|
1249
1250
|
c(), o();
|
|
1250
1251
|
};
|
|
1251
|
-
return
|
|
1252
|
+
return me(o), r;
|
|
1252
1253
|
}
|
|
1253
|
-
let
|
|
1254
|
-
function
|
|
1255
|
-
const { window: s =
|
|
1254
|
+
let gt = !1;
|
|
1255
|
+
function ht(e, t, o = {}) {
|
|
1256
|
+
const { window: s = Ke, ignore: i = [], capture: c = !0, detectIframe: r = !1, controls: n = !1 } = o;
|
|
1256
1257
|
if (!s)
|
|
1257
1258
|
return n ? { stop: Z, cancel: Z, trigger: Z } : Z;
|
|
1258
|
-
if (
|
|
1259
|
-
|
|
1259
|
+
if (Ge && !gt) {
|
|
1260
|
+
gt = !0;
|
|
1260
1261
|
const v = { passive: !0 };
|
|
1261
1262
|
Array.from(s.document.body.children).forEach((g) => g.addEventListener("click", Z, v)), s.document.documentElement.addEventListener("click", Z, v);
|
|
1262
1263
|
}
|
|
1263
1264
|
let l = !0;
|
|
1264
|
-
const d = (v) =>
|
|
1265
|
+
const d = (v) => M(i).some((g) => {
|
|
1265
1266
|
if (typeof g == "string")
|
|
1266
1267
|
return Array.from(s.document.querySelectorAll(g)).some((b) => b === v.target || v.composedPath().includes(b));
|
|
1267
1268
|
{
|
|
1268
|
-
const b =
|
|
1269
|
+
const b = le(g);
|
|
1269
1270
|
return b && (v.target === b || v.composedPath().includes(b));
|
|
1270
1271
|
}
|
|
1271
1272
|
});
|
|
1272
1273
|
function f(v) {
|
|
1273
|
-
const g =
|
|
1274
|
+
const g = M(v);
|
|
1274
1275
|
return g && g.$.subTree.shapeFlag === 16;
|
|
1275
1276
|
}
|
|
1276
1277
|
function p(v, g) {
|
|
1277
|
-
const b =
|
|
1278
|
-
return
|
|
1278
|
+
const b = M(v), P = b.$.subTree && b.$.subTree.children;
|
|
1279
|
+
return P == null || !Array.isArray(P) ? !1 : P.some((B) => B.el === g.target || g.composedPath().includes(B.el));
|
|
1279
1280
|
}
|
|
1280
1281
|
const x = (v) => {
|
|
1281
|
-
const g =
|
|
1282
|
+
const g = le(e);
|
|
1282
1283
|
if (v.target != null && !(!(g instanceof Element) && f(e) && p(e, v)) && !(!g || g === v.target || v.composedPath().includes(g))) {
|
|
1283
1284
|
if ("detail" in v && v.detail === 0 && (l = !d(v)), !l) {
|
|
1284
1285
|
l = !0;
|
|
@@ -1289,19 +1290,19 @@ function gt(e, t, o = {}) {
|
|
|
1289
1290
|
};
|
|
1290
1291
|
let m = !1;
|
|
1291
1292
|
const I = [
|
|
1292
|
-
|
|
1293
|
+
Re(s, "click", (v) => {
|
|
1293
1294
|
m || (m = !0, setTimeout(() => {
|
|
1294
1295
|
m = !1;
|
|
1295
1296
|
}, 0), x(v));
|
|
1296
1297
|
}, { passive: !0, capture: c }),
|
|
1297
|
-
|
|
1298
|
-
const g =
|
|
1298
|
+
Re(s, "pointerdown", (v) => {
|
|
1299
|
+
const g = le(e);
|
|
1299
1300
|
l = !d(v) && !!(g && !v.composedPath().includes(g));
|
|
1300
1301
|
}, { passive: !0 }),
|
|
1301
|
-
r &&
|
|
1302
|
+
r && Re(s, "blur", (v) => {
|
|
1302
1303
|
setTimeout(() => {
|
|
1303
1304
|
var g;
|
|
1304
|
-
const b =
|
|
1305
|
+
const b = le(e);
|
|
1305
1306
|
((g = s.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !b?.contains(s.document.activeElement) && t(v);
|
|
1306
1307
|
}, 0);
|
|
1307
1308
|
}, { passive: !0 })
|
|
@@ -1316,43 +1317,43 @@ function gt(e, t, o = {}) {
|
|
|
1316
1317
|
}
|
|
1317
1318
|
} : w;
|
|
1318
1319
|
}
|
|
1319
|
-
const
|
|
1320
|
+
const ze = /* @__PURE__ */ new WeakMap(), Wn = {
|
|
1320
1321
|
mounted(e, t) {
|
|
1321
1322
|
const o = !t.modifiers.bubble;
|
|
1322
1323
|
let s;
|
|
1323
1324
|
if (typeof t.value == "function")
|
|
1324
|
-
s =
|
|
1325
|
+
s = ht(e, t.value, { capture: o });
|
|
1325
1326
|
else {
|
|
1326
1327
|
const [i, c] = t.value;
|
|
1327
|
-
s =
|
|
1328
|
+
s = ht(e, i, Object.assign({ capture: o }, c));
|
|
1328
1329
|
}
|
|
1329
|
-
|
|
1330
|
+
ze.set(e, s);
|
|
1330
1331
|
},
|
|
1331
1332
|
unmounted(e) {
|
|
1332
|
-
const t =
|
|
1333
|
-
t && typeof t == "function" ? t() : t?.stop(),
|
|
1333
|
+
const t = ze.get(e);
|
|
1334
|
+
t && typeof t == "function" ? t() : t?.stop(), ze.delete(e);
|
|
1334
1335
|
}
|
|
1335
1336
|
};
|
|
1336
1337
|
// @__NO_SIDE_EFFECTS__
|
|
1337
1338
|
function zn() {
|
|
1338
|
-
const e = G(!1), t =
|
|
1339
|
-
return t &&
|
|
1339
|
+
const e = G(!1), t = Ae();
|
|
1340
|
+
return t && re(() => {
|
|
1340
1341
|
e.value = !0;
|
|
1341
1342
|
}, t), e;
|
|
1342
1343
|
}
|
|
1343
1344
|
// @__NO_SIDE_EFFECTS__
|
|
1344
1345
|
function Nn(e) {
|
|
1345
1346
|
const t = /* @__PURE__ */ zn();
|
|
1346
|
-
return
|
|
1347
|
+
return D(() => (t.value, !!e()));
|
|
1347
1348
|
}
|
|
1348
|
-
function
|
|
1349
|
-
const { window: s =
|
|
1349
|
+
function pt(e, t, o = {}) {
|
|
1350
|
+
const { window: s = Ke, ...i } = o;
|
|
1350
1351
|
let c;
|
|
1351
1352
|
const r = /* @__PURE__ */ Nn(() => s && "ResizeObserver" in s), n = () => {
|
|
1352
1353
|
c && (c.disconnect(), c = void 0);
|
|
1353
|
-
}, l =
|
|
1354
|
-
const p =
|
|
1355
|
-
return Array.isArray(p) ? p.map((x) =>
|
|
1354
|
+
}, l = D(() => {
|
|
1355
|
+
const p = M(e);
|
|
1356
|
+
return Array.isArray(p) ? p.map((x) => le(x)) : [le(p)];
|
|
1356
1357
|
}), d = V(
|
|
1357
1358
|
l,
|
|
1358
1359
|
(p) => {
|
|
@@ -1366,41 +1367,41 @@ function ht(e, t, o = {}) {
|
|
|
1366
1367
|
), f = () => {
|
|
1367
1368
|
n(), d();
|
|
1368
1369
|
};
|
|
1369
|
-
return
|
|
1370
|
+
return me(f), {
|
|
1370
1371
|
isSupported: r,
|
|
1371
1372
|
stop: f
|
|
1372
1373
|
};
|
|
1373
1374
|
}
|
|
1374
|
-
function
|
|
1375
|
+
function Ne(e) {
|
|
1375
1376
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
1376
1377
|
}
|
|
1377
1378
|
const Xn = {
|
|
1378
1379
|
mounted(e, t) {
|
|
1379
|
-
typeof t.value == "function" ?
|
|
1380
|
+
typeof t.value == "function" ? pt(e, t.value) : pt(e, ...t.value);
|
|
1380
1381
|
}
|
|
1381
1382
|
};
|
|
1382
|
-
function
|
|
1383
|
+
function Rt(e) {
|
|
1383
1384
|
const t = window.getComputedStyle(e);
|
|
1384
1385
|
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
|
|
1385
1386
|
return !0;
|
|
1386
1387
|
{
|
|
1387
1388
|
const o = e.parentNode;
|
|
1388
|
-
return !o || o.tagName === "BODY" ? !1 :
|
|
1389
|
+
return !o || o.tagName === "BODY" ? !1 : Rt(o);
|
|
1389
1390
|
}
|
|
1390
1391
|
}
|
|
1391
1392
|
function Gn(e) {
|
|
1392
1393
|
const t = e || window.event, o = t.target;
|
|
1393
|
-
return
|
|
1394
|
+
return Rt(o) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
1394
1395
|
}
|
|
1395
|
-
const
|
|
1396
|
+
const Xe = /* @__PURE__ */ new WeakMap();
|
|
1396
1397
|
function Fn(e, t = !1) {
|
|
1397
1398
|
const o = G(t);
|
|
1398
1399
|
let s = null, i = "";
|
|
1399
1400
|
V(cn(e), (n) => {
|
|
1400
|
-
const l =
|
|
1401
|
+
const l = Ne(M(n));
|
|
1401
1402
|
if (l) {
|
|
1402
1403
|
const d = l;
|
|
1403
|
-
if (
|
|
1404
|
+
if (Xe.get(d) || Xe.set(d, d.style.overflow), d.style.overflow !== "hidden" && (i = d.style.overflow), d.style.overflow === "hidden")
|
|
1404
1405
|
return o.value = !0;
|
|
1405
1406
|
if (o.value)
|
|
1406
1407
|
return d.style.overflow = "hidden";
|
|
@@ -1409,8 +1410,8 @@ function Fn(e, t = !1) {
|
|
|
1409
1410
|
immediate: !0
|
|
1410
1411
|
});
|
|
1411
1412
|
const c = () => {
|
|
1412
|
-
const n =
|
|
1413
|
-
!n || o.value || (
|
|
1413
|
+
const n = Ne(M(e));
|
|
1414
|
+
!n || o.value || (Ge && (s = Re(
|
|
1414
1415
|
n,
|
|
1415
1416
|
"touchmove",
|
|
1416
1417
|
(l) => {
|
|
@@ -1419,10 +1420,10 @@ function Fn(e, t = !1) {
|
|
|
1419
1420
|
{ passive: !1 }
|
|
1420
1421
|
)), n.style.overflow = "hidden", o.value = !0);
|
|
1421
1422
|
}, r = () => {
|
|
1422
|
-
const n =
|
|
1423
|
-
!n || !o.value || (
|
|
1423
|
+
const n = Ne(M(e));
|
|
1424
|
+
!n || !o.value || (Ge && s?.(), n.style.overflow = i, Xe.delete(n), o.value = !1);
|
|
1424
1425
|
};
|
|
1425
|
-
return
|
|
1426
|
+
return me(r), D({
|
|
1426
1427
|
get() {
|
|
1427
1428
|
return o.value;
|
|
1428
1429
|
},
|
|
@@ -1454,39 +1455,39 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1454
1455
|
pointerEvents: "none",
|
|
1455
1456
|
zIndex: 1
|
|
1456
1457
|
}
|
|
1457
|
-
}, Un = ["d", "stroke-width", "onDblclick"], qn = ["d", "stroke", "stroke-width", "id", "onDblclick"], Jn = 0.25,
|
|
1458
|
+
}, Un = ["d", "stroke-width", "onDblclick"], qn = ["d", "stroke", "stroke-width", "id", "onDblclick"], Jn = 0.25, Ie = 16, Zn = /* @__PURE__ */ te({
|
|
1458
1459
|
__name: "AGanttConnection",
|
|
1459
1460
|
props: {
|
|
1460
1461
|
store: {}
|
|
1461
1462
|
},
|
|
1462
1463
|
emits: ["connection:delete"],
|
|
1463
1464
|
setup(e, { emit: t }) {
|
|
1464
|
-
const o = t, s =
|
|
1465
|
+
const o = t, s = D(() => e.store.connectionPaths.filter((r) => {
|
|
1465
1466
|
const n = e.store.ganttBars.find((d) => d.id === r.from.barId), l = e.store.ganttBars.find((d) => d.id === r.to.barId);
|
|
1466
1467
|
return n && l;
|
|
1467
1468
|
})), i = (r, n = !1) => {
|
|
1468
1469
|
const l = e.store.connectionHandles.find(
|
|
1469
|
-
(
|
|
1470
|
+
($) => $.barId === r.from.barId && $.side === r.from.side
|
|
1470
1471
|
), d = e.store.connectionHandles.find(
|
|
1471
|
-
(
|
|
1472
|
+
($) => $.barId === r.to.barId && $.side === r.to.side
|
|
1472
1473
|
);
|
|
1473
1474
|
if (!l || !d) return "";
|
|
1474
|
-
const f = l.position.x +
|
|
1475
|
+
const f = l.position.x + Ie / 2, p = l.position.y + Ie / 2, x = d.position.x + Ie / 2, m = d.position.y + Ie / 2, I = Math.abs(x - f), w = Math.max(I * Jn, 50), v = f + (r.from.side === "left" ? -w : w), g = x + (r.to.side === "left" ? -w : w), b = { x: 0.5 * f + 0.5 * v, y: 0.5 * p + 0.5 * p }, P = { x: 0.5 * v + 0.5 * g, y: 0.5 * p + 0.5 * m }, B = { x: 0.5 * g + 0.5 * x, y: 0.5 * m + 0.5 * m }, F = { x: 0.5 * b.x + 0.5 * P.x, y: 0.5 * b.y + 0.5 * P.y }, S = { x: 0.5 * P.x + 0.5 * B.x, y: 0.5 * P.y + 0.5 * B.y }, y = { x: 0.5 * F.x + 0.5 * S.x, y: 0.5 * F.y + 0.5 * S.y };
|
|
1475
1476
|
return `M ${f} ${p} Q ${v} ${p}, ${y.x} ${y.y} Q ${g} ${m}, ${x} ${m}`;
|
|
1476
1477
|
}, c = (r) => {
|
|
1477
1478
|
e.store.deleteConnection(r.id) && o("connection:delete", r);
|
|
1478
1479
|
};
|
|
1479
|
-
return (r, n) => (
|
|
1480
|
-
(
|
|
1481
|
-
n[0] || (n[0] =
|
|
1482
|
-
|
|
1480
|
+
return (r, n) => (T(), L("div", Yn, [
|
|
1481
|
+
(T(), L("svg", jn, [
|
|
1482
|
+
n[0] || (n[0] = N("defs", null, [
|
|
1483
|
+
N("path", {
|
|
1483
1484
|
id: "arrowhead",
|
|
1484
1485
|
d: "M 0 -7 L 20 0 L 0 7Z",
|
|
1485
1486
|
stroke: "black",
|
|
1486
1487
|
"stroke-width": "1",
|
|
1487
1488
|
fill: "currentColor"
|
|
1488
1489
|
}),
|
|
1489
|
-
|
|
1490
|
+
N("marker", {
|
|
1490
1491
|
id: "arrowhead-marker",
|
|
1491
1492
|
markerWidth: "10",
|
|
1492
1493
|
markerHeight: "7",
|
|
@@ -1495,13 +1496,13 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1495
1496
|
orient: "auto",
|
|
1496
1497
|
markerUnits: "strokeWidth"
|
|
1497
1498
|
}, [
|
|
1498
|
-
|
|
1499
|
+
N("polygon", {
|
|
1499
1500
|
points: "0 0, 10 3.5, 0 7",
|
|
1500
1501
|
fill: "currentColor"
|
|
1501
1502
|
})
|
|
1502
1503
|
])
|
|
1503
1504
|
], -1)),
|
|
1504
|
-
(
|
|
1505
|
+
(T(!0), L(ae, null, pe(s.value, (l) => (T(), L("path", {
|
|
1505
1506
|
key: `${l.id}-hitbox`,
|
|
1506
1507
|
d: i(l),
|
|
1507
1508
|
stroke: "transparent",
|
|
@@ -1510,7 +1511,7 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1510
1511
|
class: "connection-hitbox",
|
|
1511
1512
|
onDblclick: (d) => c(l)
|
|
1512
1513
|
}, null, 40, Un))), 128)),
|
|
1513
|
-
(
|
|
1514
|
+
(T(!0), L(ae, null, pe(s.value, (l) => (T(), L("path", {
|
|
1514
1515
|
key: l.id,
|
|
1515
1516
|
d: i(l),
|
|
1516
1517
|
stroke: l.style?.color || "#666",
|
|
@@ -1524,7 +1525,7 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1524
1525
|
]))
|
|
1525
1526
|
]));
|
|
1526
1527
|
}
|
|
1527
|
-
}), Qn = /* @__PURE__ */
|
|
1528
|
+
}), Qn = /* @__PURE__ */ ie(Zn, [["__scopeId", "data-v-955111b6"]]), Kn = { key: 0 }, _n = {
|
|
1528
1529
|
class: "atable-header-row",
|
|
1529
1530
|
tabindex: "-1"
|
|
1530
1531
|
}, eo = ["data-colindex"], St = /* @__PURE__ */ te({
|
|
@@ -1541,9 +1542,9 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1541
1542
|
typeof n == "number" && n !== c && e.store.resizeColumn(r, c);
|
|
1542
1543
|
}
|
|
1543
1544
|
};
|
|
1544
|
-
return (o, s) => o.columns.length ? (
|
|
1545
|
-
|
|
1546
|
-
o.store.zeroColumn ? (
|
|
1545
|
+
return (o, s) => o.columns.length ? (T(), L("thead", Kn, [
|
|
1546
|
+
N("tr", _n, [
|
|
1547
|
+
o.store.zeroColumn ? (T(), L("th", {
|
|
1547
1548
|
key: 0,
|
|
1548
1549
|
id: "header-index",
|
|
1549
1550
|
class: q([[
|
|
@@ -1552,7 +1553,7 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1552
1553
|
o.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1553
1554
|
], "list-index"])
|
|
1554
1555
|
}, null, 2)) : J("", !0),
|
|
1555
|
-
(
|
|
1556
|
+
(T(!0), L(ae, null, pe(o.columns, (i, c) => Me((T(), L("th", {
|
|
1556
1557
|
key: i.name,
|
|
1557
1558
|
"data-colindex": c,
|
|
1558
1559
|
tabindex: "-1",
|
|
@@ -1560,21 +1561,21 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1560
1561
|
class: q(i.pinned ? "sticky-column" : "")
|
|
1561
1562
|
}, [
|
|
1562
1563
|
j(o.$slots, "default", {}, () => [
|
|
1563
|
-
Wt(
|
|
1564
|
+
Wt(ue(i.label || String.fromCharCode(c + 97).toUpperCase()), 1)
|
|
1564
1565
|
])
|
|
1565
1566
|
], 14, eo)), [
|
|
1566
|
-
[
|
|
1567
|
+
[R(Xn), t]
|
|
1567
1568
|
])), 128))
|
|
1568
1569
|
])
|
|
1569
1570
|
])) : J("", !0);
|
|
1570
1571
|
}
|
|
1571
|
-
}),
|
|
1572
|
+
}), Mt = /* @__PURE__ */ te({
|
|
1572
1573
|
__name: "ATableModal",
|
|
1573
1574
|
props: {
|
|
1574
1575
|
store: {}
|
|
1575
1576
|
},
|
|
1576
1577
|
setup(e) {
|
|
1577
|
-
const t = U("amodal"), { width: o, height: s } =
|
|
1578
|
+
const t = U("amodal"), { width: o, height: s } = oe(t), i = D(() => {
|
|
1578
1579
|
if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
|
|
1579
1580
|
const c = e.store.modal.cell?.closest("table"), r = c.offsetHeight || 0, n = c.offsetWidth || 0;
|
|
1580
1581
|
let l = e.store.modal.cell?.offsetTop || 0;
|
|
@@ -1586,13 +1587,13 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1586
1587
|
top: `${l}px`
|
|
1587
1588
|
};
|
|
1588
1589
|
});
|
|
1589
|
-
return (c, r) => (
|
|
1590
|
+
return (c, r) => (T(), L("div", {
|
|
1590
1591
|
class: "amodal",
|
|
1591
1592
|
ref: "amodal",
|
|
1592
1593
|
tabindex: "-1",
|
|
1593
|
-
onClick: r[0] || (r[0] =
|
|
1594
|
+
onClick: r[0] || (r[0] = Se(() => {
|
|
1594
1595
|
}, ["stop"])),
|
|
1595
|
-
onInput: r[1] || (r[1] =
|
|
1596
|
+
onInput: r[1] || (r[1] = Se(() => {
|
|
1596
1597
|
}, ["stop"])),
|
|
1597
1598
|
style: ee(i.value)
|
|
1598
1599
|
}, [
|
|
@@ -1604,42 +1605,64 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1604
1605
|
return zt(`table-${t}`, () => {
|
|
1605
1606
|
const s = () => {
|
|
1606
1607
|
const a = [Object.assign({}, { rowModified: !1 })], u = /* @__PURE__ */ new Set();
|
|
1607
|
-
for (let
|
|
1608
|
-
const
|
|
1609
|
-
|
|
1608
|
+
for (let k = 0; k < c.value.length; k++) {
|
|
1609
|
+
const A = c.value[k];
|
|
1610
|
+
A.parent !== null && A.parent !== void 0 && u.add(A.parent);
|
|
1610
1611
|
}
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1612
|
+
const h = (k) => c.value[k]?.gantt !== void 0, E = (k) => {
|
|
1613
|
+
for (let A = 0; A < c.value.length; A++)
|
|
1614
|
+
if (c.value[A].parent === k && (h(A) || E(A)))
|
|
1615
|
+
return !0;
|
|
1616
|
+
return !1;
|
|
1617
|
+
}, H = (k) => {
|
|
1618
|
+
const A = r.value, ne = A.view === "tree" || A.view === "tree-gantt" ? A.defaultTreeExpansion : void 0;
|
|
1619
|
+
if (!ne) return !0;
|
|
1620
|
+
switch (ne) {
|
|
1621
|
+
case "root":
|
|
1622
|
+
return !1;
|
|
1623
|
+
// Only root nodes are visible, all children start collapsed
|
|
1624
|
+
case "branch":
|
|
1625
|
+
return E(k);
|
|
1626
|
+
case "leaf":
|
|
1627
|
+
return !0;
|
|
1628
|
+
// All nodes should be expanded
|
|
1629
|
+
default:
|
|
1630
|
+
return !0;
|
|
1631
|
+
}
|
|
1632
|
+
};
|
|
1633
|
+
for (let k = 0; k < c.value.length; k++) {
|
|
1634
|
+
const A = c.value[k], ne = A.parent === null || A.parent === void 0, Ce = u.has(k);
|
|
1635
|
+
a[k] = {
|
|
1636
|
+
childrenOpen: H(k),
|
|
1615
1637
|
expanded: !1,
|
|
1616
|
-
indent:
|
|
1617
|
-
isParent:
|
|
1618
|
-
isRoot:
|
|
1638
|
+
indent: A.indent || 0,
|
|
1639
|
+
isParent: Ce,
|
|
1640
|
+
isRoot: ne,
|
|
1619
1641
|
rowModified: !1,
|
|
1620
|
-
open:
|
|
1621
|
-
|
|
1642
|
+
open: ne,
|
|
1643
|
+
// This will be recalculated later for non-root nodes
|
|
1644
|
+
parent: A.parent
|
|
1622
1645
|
};
|
|
1623
1646
|
}
|
|
1624
1647
|
return a;
|
|
1625
|
-
}, i =
|
|
1648
|
+
}, i = z(e.columns), c = z(e.rows), r = z(e.config || {}), n = z({}), l = z({}), d = D(() => {
|
|
1626
1649
|
const a = {};
|
|
1627
1650
|
for (const [u, h] of i.value.entries())
|
|
1628
|
-
for (const [
|
|
1629
|
-
a[`${u}:${
|
|
1651
|
+
for (const [E, H] of c.value.entries())
|
|
1652
|
+
a[`${u}:${E}`] = H[h.name];
|
|
1630
1653
|
return a;
|
|
1631
|
-
}), f =
|
|
1654
|
+
}), f = D({
|
|
1632
1655
|
get: () => {
|
|
1633
1656
|
const a = s();
|
|
1634
1657
|
for (let u = 0; u < a.length; u++)
|
|
1635
1658
|
n.value[u] && (a[u].rowModified = n.value[u]), l.value[u] && (l.value[u].childrenOpen !== void 0 && (a[u].childrenOpen = l.value[u].childrenOpen), l.value[u].expanded !== void 0 && (a[u].expanded = l.value[u].expanded));
|
|
1636
1659
|
if (b.value) {
|
|
1637
|
-
const u = (h,
|
|
1638
|
-
const
|
|
1639
|
-
if (
|
|
1660
|
+
const u = (h, E) => {
|
|
1661
|
+
const H = E[h];
|
|
1662
|
+
if (H.isRoot || H.parent === null || H.parent === void 0)
|
|
1640
1663
|
return !0;
|
|
1641
|
-
const
|
|
1642
|
-
return
|
|
1664
|
+
const k = H.parent;
|
|
1665
|
+
return k < 0 || k >= E.length ? !1 : (E[k].childrenOpen || !1) && u(k, E);
|
|
1643
1666
|
};
|
|
1644
1667
|
for (let h = 0; h < a.length; h++)
|
|
1645
1668
|
a[h].isRoot || (a[h].open = u(h, a));
|
|
@@ -1649,20 +1672,23 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1649
1672
|
set: (a) => {
|
|
1650
1673
|
JSON.stringify(a) !== JSON.stringify(f.value) && (f.value = a);
|
|
1651
1674
|
}
|
|
1652
|
-
}), p =
|
|
1675
|
+
}), p = z(e.modal || { visible: !1 }), x = z({}), m = z([]), I = z([]), w = z([]), v = D(() => i.value.some((a) => a.pinned)), g = D(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), b = D(() => r.value.view === "tree" || r.value.view === "tree-gantt"), P = D(() => {
|
|
1676
|
+
const a = r.value;
|
|
1677
|
+
return a.view === "gantt" || a.view === "tree-gantt" ? a.dependencyGraph !== !1 : !0;
|
|
1678
|
+
}), B = D(() => `${Math.ceil(c.value.length / 100 + 1)}ch`), F = D(
|
|
1653
1679
|
() => r.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(r.value.view) : !1
|
|
1654
1680
|
), S = (a, u) => d.value[`${a}:${u}`], y = (a, u, h) => {
|
|
1655
|
-
const
|
|
1656
|
-
d.value[
|
|
1681
|
+
const E = `${a}:${u}`, H = i.value[a];
|
|
1682
|
+
d.value[E] !== h && (n.value[u] = !0), d.value[E] = h, c.value[u] = {
|
|
1657
1683
|
...c.value[u],
|
|
1658
|
-
[
|
|
1684
|
+
[H.name]: h
|
|
1659
1685
|
};
|
|
1660
|
-
},
|
|
1686
|
+
}, $ = (a) => {
|
|
1661
1687
|
c.value = a;
|
|
1662
|
-
},
|
|
1663
|
-
const
|
|
1664
|
-
d.value[
|
|
1665
|
-
},
|
|
1688
|
+
}, X = (a, u, h) => {
|
|
1689
|
+
const E = `${a}:${u}`;
|
|
1690
|
+
d.value[E] !== h && (n.value[u] = !0, x.value[E] = h);
|
|
1691
|
+
}, W = (a) => {
|
|
1666
1692
|
const u = i.value.indexOf(a) === i.value.length - 1, h = r.value.fullWidth ? a.resizable && !u : a.resizable;
|
|
1667
1693
|
return {
|
|
1668
1694
|
width: a.width || "40ch",
|
|
@@ -1673,23 +1699,23 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1673
1699
|
whiteSpace: "nowrap"
|
|
1674
1700
|
}
|
|
1675
1701
|
};
|
|
1676
|
-
},
|
|
1702
|
+
}, O = (a, u) => {
|
|
1677
1703
|
if (a < 0 || a >= i.value.length) return;
|
|
1678
|
-
const
|
|
1704
|
+
const E = Math.max(u, 40);
|
|
1679
1705
|
i.value[a] = {
|
|
1680
1706
|
...i.value[a],
|
|
1681
|
-
width: `${
|
|
1707
|
+
width: `${E}px`
|
|
1682
1708
|
};
|
|
1683
1709
|
}, Y = (a) => {
|
|
1684
1710
|
const u = c.value[a];
|
|
1685
1711
|
return g.value && u.gantt !== void 0;
|
|
1686
|
-
}, _ = (a) => !b.value || f.value[a].isRoot || f.value[a].open,
|
|
1712
|
+
}, _ = (a) => !b.value || f.value[a].isRoot || f.value[a].open, ye = (a) => !b.value && r.value.view !== "list-expansion" ? "" : b.value && (f.value[a].isRoot || f.value[a].isParent) ? f.value[a].childrenOpen ? "▼" : "►" : r.value.view === "list-expansion" ? f.value[a].expanded ? "▼" : "►" : "", ge = (a) => {
|
|
1687
1713
|
if (b.value) {
|
|
1688
|
-
const u = l.value[a] || {},
|
|
1714
|
+
const u = l.value[a] || {}, E = !(u.childrenOpen ?? f.value[a].childrenOpen);
|
|
1689
1715
|
l.value[a] = {
|
|
1690
1716
|
...u,
|
|
1691
|
-
childrenOpen:
|
|
1692
|
-
},
|
|
1717
|
+
childrenOpen: E
|
|
1718
|
+
}, E || xe(a);
|
|
1693
1719
|
} else if (r.value.view === "list-expansion") {
|
|
1694
1720
|
const u = l.value[a] || {}, h = u.expanded ?? f.value[a].expanded;
|
|
1695
1721
|
l.value[a] = {
|
|
@@ -1697,21 +1723,21 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1697
1723
|
expanded: !h
|
|
1698
1724
|
};
|
|
1699
1725
|
}
|
|
1700
|
-
},
|
|
1726
|
+
}, xe = (a) => {
|
|
1701
1727
|
for (let u = 0; u < c.value.length; u++)
|
|
1702
1728
|
if (f.value[u].parent === a) {
|
|
1703
1729
|
const h = l.value[u] || {};
|
|
1704
1730
|
l.value[u] = {
|
|
1705
1731
|
...h,
|
|
1706
1732
|
childrenOpen: !1
|
|
1707
|
-
},
|
|
1733
|
+
}, xe(u);
|
|
1708
1734
|
}
|
|
1709
|
-
},
|
|
1735
|
+
}, Oe = (a, u) => {
|
|
1710
1736
|
const h = S(a, u);
|
|
1711
|
-
return
|
|
1712
|
-
},
|
|
1713
|
-
const
|
|
1714
|
-
return
|
|
1737
|
+
return be(a, u, h);
|
|
1738
|
+
}, be = (a, u, h) => {
|
|
1739
|
+
const E = i.value[a], H = c.value[u], k = E.format;
|
|
1740
|
+
return k ? typeof k == "function" ? k(h, { table: d.value, row: H, column: E }) : typeof k == "string" ? Function(`"use strict";return (${k})`)()(h, { table: d.value, row: H, column: E }) : h : h;
|
|
1715
1741
|
};
|
|
1716
1742
|
return {
|
|
1717
1743
|
// state
|
|
@@ -1729,44 +1755,44 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1729
1755
|
hasPinnedColumns: v,
|
|
1730
1756
|
isGanttView: g,
|
|
1731
1757
|
isTreeView: b,
|
|
1732
|
-
isDependencyGraphEnabled:
|
|
1733
|
-
numberedRowWidth:
|
|
1758
|
+
isDependencyGraphEnabled: P,
|
|
1759
|
+
numberedRowWidth: B,
|
|
1734
1760
|
zeroColumn: F,
|
|
1735
1761
|
// actions
|
|
1736
1762
|
closeModal: (a) => {
|
|
1737
1763
|
a.target instanceof Node && p.value.parent?.contains(a.target) || p.value.visible && (p.value.visible = !1);
|
|
1738
1764
|
},
|
|
1739
1765
|
createConnection: (a, u, h) => {
|
|
1740
|
-
const
|
|
1741
|
-
if (!
|
|
1766
|
+
const E = I.value.find((A) => A.id === a), H = I.value.find((A) => A.id === u);
|
|
1767
|
+
if (!E || !H)
|
|
1742
1768
|
return console.warn("Cannot create connection: handle not found"), null;
|
|
1743
|
-
const
|
|
1769
|
+
const k = {
|
|
1744
1770
|
id: `connection-${a}-${u}`,
|
|
1745
1771
|
from: {
|
|
1746
|
-
barId:
|
|
1747
|
-
side:
|
|
1772
|
+
barId: E.barId,
|
|
1773
|
+
side: E.side
|
|
1748
1774
|
},
|
|
1749
1775
|
to: {
|
|
1750
|
-
barId:
|
|
1751
|
-
side:
|
|
1776
|
+
barId: H.barId,
|
|
1777
|
+
side: H.side
|
|
1752
1778
|
},
|
|
1753
1779
|
style: h?.style,
|
|
1754
1780
|
label: h?.label
|
|
1755
1781
|
};
|
|
1756
|
-
return w.value.push(
|
|
1782
|
+
return w.value.push(k), k;
|
|
1757
1783
|
},
|
|
1758
1784
|
deleteConnection: (a) => {
|
|
1759
1785
|
const u = w.value.findIndex((h) => h.id === a);
|
|
1760
1786
|
return u >= 0 ? (w.value.splice(u, 1), !0) : !1;
|
|
1761
1787
|
},
|
|
1762
1788
|
getCellData: S,
|
|
1763
|
-
getCellDisplayValue:
|
|
1789
|
+
getCellDisplayValue: Oe,
|
|
1764
1790
|
getConnectionsForBar: (a) => w.value.filter((u) => u.from.barId === a || u.to.barId === a),
|
|
1765
|
-
getFormattedValue:
|
|
1791
|
+
getFormattedValue: be,
|
|
1766
1792
|
getHandlesForBar: (a) => I.value.filter((u) => u.barId === a),
|
|
1767
|
-
getHeaderCellStyle:
|
|
1793
|
+
getHeaderCellStyle: W,
|
|
1768
1794
|
getIndent: (a, u) => u && a === 0 && u > 0 ? `${u}ch` : "inherit",
|
|
1769
|
-
getRowExpandSymbol:
|
|
1795
|
+
getRowExpandSymbol: ye,
|
|
1770
1796
|
isRowGantt: Y,
|
|
1771
1797
|
isRowVisible: _,
|
|
1772
1798
|
registerConnectionHandle: (a) => {
|
|
@@ -1777,10 +1803,10 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1777
1803
|
const u = m.value.findIndex((h) => h.id === a.id);
|
|
1778
1804
|
u >= 0 ? m.value[u] = a : m.value.push(a);
|
|
1779
1805
|
},
|
|
1780
|
-
resizeColumn:
|
|
1806
|
+
resizeColumn: O,
|
|
1781
1807
|
setCellData: y,
|
|
1782
|
-
setCellText:
|
|
1783
|
-
toggleRowExpand:
|
|
1808
|
+
setCellText: X,
|
|
1809
|
+
toggleRowExpand: ge,
|
|
1784
1810
|
unregisterConnectionHandle: (a) => {
|
|
1785
1811
|
const u = I.value.findIndex((h) => h.id === a);
|
|
1786
1812
|
u >= 0 && I.value.splice(u, 1);
|
|
@@ -1793,7 +1819,7 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1793
1819
|
const u = c.value[a.rowIndex]?.gantt;
|
|
1794
1820
|
u && (a.type === "resize" ? a.edge === "start" ? (u.startIndex = a.newStart, u.endIndex = a.end, u.colspan = u.endIndex - u.startIndex) : a.edge === "end" && (u.startIndex = a.start, u.endIndex = a.newEnd, u.colspan = u.endIndex - u.startIndex) : a.type === "bar" && (u.startIndex = a.newStart, u.endIndex = a.newEnd, u.colspan = u.endIndex - u.startIndex));
|
|
1795
1821
|
},
|
|
1796
|
-
updateRows:
|
|
1822
|
+
updateRows: $
|
|
1797
1823
|
};
|
|
1798
1824
|
})();
|
|
1799
1825
|
}, no = {
|
|
@@ -1801,7 +1827,7 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1801
1827
|
style: { position: "relative" }
|
|
1802
1828
|
}, oo = /* @__PURE__ */ te({
|
|
1803
1829
|
__name: "ATable",
|
|
1804
|
-
props: /* @__PURE__ */
|
|
1830
|
+
props: /* @__PURE__ */ at({
|
|
1805
1831
|
id: {},
|
|
1806
1832
|
config: { default: () => new Object() }
|
|
1807
1833
|
}, {
|
|
@@ -1810,14 +1836,14 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1810
1836
|
columns: { required: !0 },
|
|
1811
1837
|
columnsModifiers: {}
|
|
1812
1838
|
}),
|
|
1813
|
-
emits: /* @__PURE__ */
|
|
1839
|
+
emits: /* @__PURE__ */ at(["cellUpdate", "gantt:drag", "connection:event", "columns:update"], ["update:rows", "update:columns"]),
|
|
1814
1840
|
setup(e, { expose: t, emit: o }) {
|
|
1815
|
-
const s =
|
|
1841
|
+
const s = st(e, "rows"), i = st(e, "columns"), c = o, r = U("table"), n = to({ columns: i.value, rows: s.value, id: e.id, config: e.config });
|
|
1816
1842
|
n.$onAction(({ name: m, store: I, args: w, after: v }) => {
|
|
1817
1843
|
if (m === "setCellData" || m === "setCellText") {
|
|
1818
|
-
const [g, b,
|
|
1844
|
+
const [g, b, P] = w, B = I.getCellData(g, b);
|
|
1819
1845
|
v(() => {
|
|
1820
|
-
s.value = [...I.rows], c("cellUpdate", { colIndex: g, rowIndex: b, newValue:
|
|
1846
|
+
s.value = [...I.rows], c("cellUpdate", { colIndex: g, rowIndex: b, newValue: P, oldValue: B });
|
|
1821
1847
|
});
|
|
1822
1848
|
} else if (m === "updateGanttBar") {
|
|
1823
1849
|
const [g] = w;
|
|
@@ -1840,28 +1866,28 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1840
1866
|
JSON.stringify(m) !== JSON.stringify(n.columns) && (n.columns = [...m], c("columns:update", [...m]));
|
|
1841
1867
|
},
|
|
1842
1868
|
{ deep: !0 }
|
|
1843
|
-
),
|
|
1844
|
-
i.value.some((m) => m.pinned) && (d(), n.isTreeView &&
|
|
1869
|
+
), re(() => {
|
|
1870
|
+
i.value.some((m) => m.pinned) && (d(), n.isTreeView && kt(r, d, { childList: !0, subtree: !0 }));
|
|
1845
1871
|
});
|
|
1846
|
-
const l =
|
|
1872
|
+
const l = D(() => n.columns.filter((m) => m.pinned).length), d = () => {
|
|
1847
1873
|
const m = r.value, I = m?.rows[0], w = m?.rows[1], v = I ? Array.from(I.cells) : [];
|
|
1848
1874
|
for (const [g, b] of v.entries()) {
|
|
1849
|
-
const
|
|
1850
|
-
|
|
1875
|
+
const P = w?.cells[g];
|
|
1876
|
+
P && (b.style.width = `${P.offsetWidth}px`);
|
|
1851
1877
|
}
|
|
1852
1878
|
for (const g of m?.rows || []) {
|
|
1853
1879
|
let b = 0;
|
|
1854
|
-
const
|
|
1855
|
-
for (const
|
|
1856
|
-
(
|
|
1857
|
-
|
|
1880
|
+
const P = [];
|
|
1881
|
+
for (const B of g.cells)
|
|
1882
|
+
(B.classList.contains("sticky-column") || B.classList.contains("sticky-index")) && (B.style.left = `${b}px`, b += B.offsetWidth, P.push(B));
|
|
1883
|
+
P.length > 0 && P[P.length - 1].classList.add("sticky-column-edge");
|
|
1858
1884
|
}
|
|
1859
1885
|
};
|
|
1860
1886
|
window.addEventListener("keydown", (m) => {
|
|
1861
1887
|
if (m.key === "Escape" && n.modal.visible) {
|
|
1862
1888
|
n.modal.visible = !1;
|
|
1863
1889
|
const I = n.modal.parent;
|
|
1864
|
-
I &&
|
|
1890
|
+
I && Fe().then(() => {
|
|
1865
1891
|
I.focus();
|
|
1866
1892
|
});
|
|
1867
1893
|
}
|
|
@@ -1893,36 +1919,36 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1893
1919
|
deleteConnection: n.deleteConnection,
|
|
1894
1920
|
getConnectionsForBar: n.getConnectionsForBar,
|
|
1895
1921
|
getHandlesForBar: n.getHandlesForBar
|
|
1896
|
-
}), (m, I) => (
|
|
1897
|
-
|
|
1922
|
+
}), (m, I) => (T(), L("div", no, [
|
|
1923
|
+
Me((T(), L("table", {
|
|
1898
1924
|
ref: "table",
|
|
1899
1925
|
class: "atable",
|
|
1900
1926
|
style: ee({
|
|
1901
|
-
width:
|
|
1927
|
+
width: R(n).config.fullWidth ? "100%" : "auto"
|
|
1902
1928
|
})
|
|
1903
1929
|
}, [
|
|
1904
|
-
j(m.$slots, "header", { data:
|
|
1905
|
-
|
|
1906
|
-
columns:
|
|
1907
|
-
store:
|
|
1930
|
+
j(m.$slots, "header", { data: R(n) }, () => [
|
|
1931
|
+
rt(St, {
|
|
1932
|
+
columns: R(n).columns,
|
|
1933
|
+
store: R(n)
|
|
1908
1934
|
}, null, 8, ["columns", "store"])
|
|
1909
1935
|
], !0),
|
|
1910
|
-
|
|
1911
|
-
j(m.$slots, "body", { data:
|
|
1912
|
-
(
|
|
1936
|
+
N("tbody", null, [
|
|
1937
|
+
j(m.$slots, "body", { data: R(n) }, () => [
|
|
1938
|
+
(T(!0), L(ae, null, pe(R(n).rows, (w, v) => (T(), ce($t, {
|
|
1913
1939
|
key: w.id,
|
|
1914
1940
|
row: w,
|
|
1915
1941
|
rowIndex: v,
|
|
1916
|
-
store:
|
|
1942
|
+
store: R(n)
|
|
1917
1943
|
}, {
|
|
1918
|
-
default:
|
|
1919
|
-
(
|
|
1944
|
+
default: it(() => [
|
|
1945
|
+
(T(!0), L(ae, null, pe(f(w), (g, b) => (T(), L(ae, {
|
|
1920
1946
|
key: g.name
|
|
1921
1947
|
}, [
|
|
1922
|
-
g.isGantt ? (
|
|
1948
|
+
g.isGantt ? (T(), ce(ke(g.ganttComponent || "AGanttCell"), {
|
|
1923
1949
|
key: 0,
|
|
1924
|
-
store:
|
|
1925
|
-
columnsCount:
|
|
1950
|
+
store: R(n),
|
|
1951
|
+
columnsCount: R(n).columns.length - l.value,
|
|
1926
1952
|
color: w.gantt?.color,
|
|
1927
1953
|
start: w.gantt?.startIndex,
|
|
1928
1954
|
end: w.gantt?.endIndex,
|
|
@@ -1933,18 +1959,18 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1933
1959
|
style: ee({
|
|
1934
1960
|
textAlign: g?.align || "center",
|
|
1935
1961
|
minWidth: g?.width || "40ch",
|
|
1936
|
-
width:
|
|
1962
|
+
width: R(n).config.fullWidth ? "auto" : null
|
|
1937
1963
|
}),
|
|
1938
1964
|
"onConnection:create": p
|
|
1939
|
-
}, null, 40, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (
|
|
1965
|
+
}, null, 40, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (T(), ce(ke(g.cellComponent || "ACell"), {
|
|
1940
1966
|
key: 1,
|
|
1941
|
-
store:
|
|
1967
|
+
store: R(n),
|
|
1942
1968
|
pinned: g.pinned,
|
|
1943
1969
|
rowIndex: v,
|
|
1944
1970
|
colIndex: b,
|
|
1945
1971
|
style: ee({
|
|
1946
1972
|
textAlign: g?.align || "center",
|
|
1947
|
-
width:
|
|
1973
|
+
width: R(n).config.fullWidth ? "auto" : null
|
|
1948
1974
|
}),
|
|
1949
1975
|
spellcheck: "false"
|
|
1950
1976
|
}, null, 8, ["store", "pinned", "rowIndex", "colIndex", "style"]))
|
|
@@ -1954,64 +1980,64 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
|
|
|
1954
1980
|
}, 1032, ["row", "rowIndex", "store"]))), 128))
|
|
1955
1981
|
], !0)
|
|
1956
1982
|
]),
|
|
1957
|
-
j(m.$slots, "footer", { data:
|
|
1958
|
-
j(m.$slots, "modal", { data:
|
|
1959
|
-
|
|
1960
|
-
default:
|
|
1961
|
-
(
|
|
1962
|
-
key: `${
|
|
1963
|
-
colIndex:
|
|
1964
|
-
rowIndex:
|
|
1965
|
-
store:
|
|
1966
|
-
},
|
|
1983
|
+
j(m.$slots, "footer", { data: R(n) }, void 0, !0),
|
|
1984
|
+
j(m.$slots, "modal", { data: R(n) }, () => [
|
|
1985
|
+
Me(rt(Mt, { store: R(n) }, {
|
|
1986
|
+
default: it(() => [
|
|
1987
|
+
(T(), ce(ke(R(n).modal.component), Ve({
|
|
1988
|
+
key: `${R(n).modal.rowIndex}:${R(n).modal.colIndex}`,
|
|
1989
|
+
colIndex: R(n).modal.colIndex,
|
|
1990
|
+
rowIndex: R(n).modal.rowIndex,
|
|
1991
|
+
store: R(n)
|
|
1992
|
+
}, R(n).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
|
|
1967
1993
|
]),
|
|
1968
1994
|
_: 1
|
|
1969
1995
|
}, 8, ["store"]), [
|
|
1970
|
-
[
|
|
1996
|
+
[bt, R(n).modal.visible]
|
|
1971
1997
|
])
|
|
1972
1998
|
], !0)
|
|
1973
1999
|
], 4)), [
|
|
1974
|
-
[
|
|
2000
|
+
[R(Wn), R(n).closeModal]
|
|
1975
2001
|
]),
|
|
1976
|
-
|
|
2002
|
+
R(n).isGanttView && R(n).isDependencyGraphEnabled ? (T(), ce(Qn, {
|
|
1977
2003
|
key: 0,
|
|
1978
|
-
store:
|
|
2004
|
+
store: R(n),
|
|
1979
2005
|
"onConnection:delete": x
|
|
1980
2006
|
}, null, 8, ["store"])) : J("", !0)
|
|
1981
2007
|
]));
|
|
1982
2008
|
}
|
|
1983
|
-
}), lo = /* @__PURE__ */
|
|
2009
|
+
}), lo = /* @__PURE__ */ ie(oo, [["__scopeId", "data-v-51a03d16"]]), ao = {}, so = { class: "aloading" }, ro = { class: "aloading-header" };
|
|
1984
2010
|
function io(e, t) {
|
|
1985
|
-
return
|
|
1986
|
-
|
|
2011
|
+
return T(), L("div", so, [
|
|
2012
|
+
N("h2", ro, [
|
|
1987
2013
|
j(e.$slots, "default", {}, void 0, !0)
|
|
1988
2014
|
]),
|
|
1989
|
-
t[0] || (t[0] =
|
|
2015
|
+
t[0] || (t[0] = N("div", { class: "aloading-bar" }, null, -1))
|
|
1990
2016
|
]);
|
|
1991
2017
|
}
|
|
1992
|
-
const co = /* @__PURE__ */
|
|
2018
|
+
const co = /* @__PURE__ */ ie(ao, [["render", io], ["__scopeId", "data-v-a930a25b"]]), uo = {}, fo = { class: "aloading" }, vo = { class: "aloading-header" };
|
|
1993
2019
|
function mo(e, t) {
|
|
1994
|
-
return
|
|
1995
|
-
|
|
2020
|
+
return T(), L("div", fo, [
|
|
2021
|
+
N("h2", vo, [
|
|
1996
2022
|
j(e.$slots, "default", {}, void 0, !0)
|
|
1997
2023
|
]),
|
|
1998
|
-
t[0] || (t[0] =
|
|
2024
|
+
t[0] || (t[0] = N("div", { class: "aloading-bar" }, null, -1))
|
|
1999
2025
|
]);
|
|
2000
2026
|
}
|
|
2001
|
-
const go = /* @__PURE__ */
|
|
2027
|
+
const go = /* @__PURE__ */ ie(uo, [["render", mo], ["__scopeId", "data-v-e1165876"]]);
|
|
2002
2028
|
function wo(e) {
|
|
2003
|
-
e.component("ACell", En), e.component("AExpansionRow",
|
|
2029
|
+
e.component("ACell", En), e.component("AExpansionRow", Sn), e.component("AGanttCell", Pn), e.component("ARow", $t), e.component("ATable", lo), e.component("ATableHeader", St), e.component("ATableLoading", co), e.component("ATableLoadingBar", go), e.component("ATableModal", Mt);
|
|
2004
2030
|
}
|
|
2005
2031
|
export {
|
|
2006
2032
|
En as ACell,
|
|
2007
|
-
|
|
2033
|
+
Sn as AExpansionRow,
|
|
2008
2034
|
Pn as AGanttCell,
|
|
2009
|
-
|
|
2035
|
+
$t as ARow,
|
|
2010
2036
|
lo as ATable,
|
|
2011
2037
|
St as ATableHeader,
|
|
2012
2038
|
co as ATableLoading,
|
|
2013
2039
|
go as ATableLoadingBar,
|
|
2014
|
-
|
|
2040
|
+
Mt as ATableModal,
|
|
2015
2041
|
to as createTableStore,
|
|
2016
2042
|
wo as install
|
|
2017
2043
|
};
|