@stonecrop/atable 0.4.13 → 0.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/atable.d.ts +21 -6
- package/dist/atable.js +505 -476
- 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.map +1 -1
- package/dist/src/types/index.d.ts +21 -6
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/stores/table.js +9 -4
- package/package.json +3 -3
- package/src/components/AGanttCell.vue +39 -3
- package/src/components/ATable.vue +10 -18
- package/src/stores/table.ts +9 -4
- package/src/types/index.ts +32 -2
package/dist/atable.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { onMounted as ne, ref as
|
|
1
|
+
import { onMounted as ne, ref as P, watch as X, onBeforeUnmount as lt, computed as k, shallowRef as H, toValue as E, watchEffect as at, getCurrentScope as Fe, onScopeDispose as je, unref as b, getCurrentInstance as Ie, nextTick as Ue, isRef as st, toRefs as rt, customRef as Ye, toRef as it, readonly as ut, defineComponent as J, useTemplateRef as N, createElementBlock as R, openBlock as S, normalizeClass as j, normalizeStyle as Y, createBlock as se, resolveDynamicComponent as ve, mergeProps as ke, toDisplayString as K, Fragment as ie, createElementVNode as L, createCommentVNode as _, renderSlot as W, useCssVars as ct, withDirectives as xe, vShow as qe, renderList as Ce, createTextVNode as dt, withModifiers as Oe, createVNode as Le, withCtx as De } from "vue";
|
|
2
2
|
import { defineStore as ft } from "pinia";
|
|
3
3
|
import './assets/index.css';function Me(e) {
|
|
4
4
|
return Fe() ? (je(e), !0) : !1;
|
|
@@ -11,7 +11,7 @@ function me(e) {
|
|
|
11
11
|
return Array.isArray(e) ? e : [e];
|
|
12
12
|
}
|
|
13
13
|
function wt(e, t, n) {
|
|
14
|
-
return
|
|
14
|
+
return X(
|
|
15
15
|
e,
|
|
16
16
|
t,
|
|
17
17
|
{
|
|
@@ -23,41 +23,41 @@ function wt(e, t, n) {
|
|
|
23
23
|
const oe = vt ? window : void 0;
|
|
24
24
|
function ee(e) {
|
|
25
25
|
var t;
|
|
26
|
-
const n =
|
|
26
|
+
const n = E(e);
|
|
27
27
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
28
28
|
}
|
|
29
29
|
function ce(...e) {
|
|
30
30
|
const t = [], n = () => {
|
|
31
31
|
t.forEach((a) => a()), t.length = 0;
|
|
32
|
-
}, o = (a, i, r, s) => (a.addEventListener(i, r, s), () => a.removeEventListener(i, r, s)), u =
|
|
33
|
-
const a = me(
|
|
32
|
+
}, o = (a, i, r, s) => (a.addEventListener(i, r, s), () => a.removeEventListener(i, r, s)), u = k(() => {
|
|
33
|
+
const a = me(E(e[0])).filter((i) => i != null);
|
|
34
34
|
return a.every((i) => typeof i != "string") ? a : void 0;
|
|
35
|
-
}),
|
|
35
|
+
}), c = wt(
|
|
36
36
|
() => {
|
|
37
37
|
var a, i;
|
|
38
38
|
return [
|
|
39
39
|
(i = (a = u.value) == null ? void 0 : a.map((r) => ee(r))) != null ? i : [oe].filter((r) => r != null),
|
|
40
|
-
me(
|
|
41
|
-
me(
|
|
40
|
+
me(E(u.value ? e[1] : e[0])),
|
|
41
|
+
me(b(u.value ? e[2] : e[1])),
|
|
42
42
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
43
|
-
|
|
43
|
+
E(u.value ? e[3] : e[2])
|
|
44
44
|
];
|
|
45
45
|
},
|
|
46
46
|
([a, i, r, s]) => {
|
|
47
47
|
if (n(), !(a != null && a.length) || !(i != null && i.length) || !(r != null && r.length))
|
|
48
48
|
return;
|
|
49
|
-
const
|
|
49
|
+
const g = ht(s) ? { ...s } : s;
|
|
50
50
|
t.push(
|
|
51
51
|
...a.flatMap(
|
|
52
52
|
(m) => i.flatMap(
|
|
53
|
-
(w) => r.map((
|
|
53
|
+
(w) => r.map((v) => o(m, w, v, g))
|
|
54
54
|
)
|
|
55
55
|
)
|
|
56
56
|
);
|
|
57
57
|
},
|
|
58
58
|
{ flush: "post" }
|
|
59
59
|
), l = () => {
|
|
60
|
-
|
|
60
|
+
c(), n();
|
|
61
61
|
};
|
|
62
62
|
return Me(n), l;
|
|
63
63
|
}
|
|
@@ -69,28 +69,28 @@ function yt() {
|
|
|
69
69
|
}
|
|
70
70
|
function bt(e) {
|
|
71
71
|
const t = yt();
|
|
72
|
-
return
|
|
72
|
+
return k(() => (t.value, !!e()));
|
|
73
73
|
}
|
|
74
74
|
function xt(e, t, n = {}) {
|
|
75
75
|
const { window: o = oe, ...u } = n;
|
|
76
|
-
let
|
|
76
|
+
let c;
|
|
77
77
|
const l = bt(() => o && "MutationObserver" in o), a = () => {
|
|
78
|
-
|
|
79
|
-
}, i =
|
|
80
|
-
const m =
|
|
78
|
+
c && (c.disconnect(), c = void 0);
|
|
79
|
+
}, i = k(() => {
|
|
80
|
+
const m = E(e), w = me(m).map(ee).filter(mt);
|
|
81
81
|
return new Set(w);
|
|
82
|
-
}), r =
|
|
82
|
+
}), r = X(
|
|
83
83
|
() => i.value,
|
|
84
84
|
(m) => {
|
|
85
|
-
a(), l.value && m.size && (
|
|
85
|
+
a(), l.value && m.size && (c = new MutationObserver(t), m.forEach((w) => c.observe(w, u)));
|
|
86
86
|
},
|
|
87
87
|
{ immediate: !0, flush: "post" }
|
|
88
|
-
), s = () =>
|
|
88
|
+
), s = () => c == null ? void 0 : c.takeRecords(), g = () => {
|
|
89
89
|
r(), a();
|
|
90
90
|
};
|
|
91
|
-
return Me(
|
|
91
|
+
return Me(g), {
|
|
92
92
|
isSupported: l,
|
|
93
|
-
stop:
|
|
93
|
+
stop: g,
|
|
94
94
|
takeRecords: s
|
|
95
95
|
};
|
|
96
96
|
}
|
|
@@ -98,7 +98,7 @@ function Ct(e, t, n = {}) {
|
|
|
98
98
|
const {
|
|
99
99
|
window: o = oe,
|
|
100
100
|
document: u = o == null ? void 0 : o.document,
|
|
101
|
-
flush:
|
|
101
|
+
flush: c = "sync"
|
|
102
102
|
} = n;
|
|
103
103
|
if (!o || !u)
|
|
104
104
|
return pt;
|
|
@@ -108,7 +108,7 @@ function Ct(e, t, n = {}) {
|
|
|
108
108
|
}, i = at(() => {
|
|
109
109
|
const s = ee(e);
|
|
110
110
|
if (s) {
|
|
111
|
-
const { stop:
|
|
111
|
+
const { stop: g } = xt(
|
|
112
112
|
u,
|
|
113
113
|
(m) => {
|
|
114
114
|
m.map((w) => [...w.removedNodes]).flat().some((w) => w === s || w.contains(s)) && t(m);
|
|
@@ -119,9 +119,9 @@ function Ct(e, t, n = {}) {
|
|
|
119
119
|
subtree: !0
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
|
-
a(
|
|
122
|
+
a(g);
|
|
123
123
|
}
|
|
124
|
-
}, { flush:
|
|
124
|
+
}, { flush: c }), r = () => {
|
|
125
125
|
i(), a();
|
|
126
126
|
};
|
|
127
127
|
return Me(r), r;
|
|
@@ -132,14 +132,14 @@ function Et(e = {}) {
|
|
|
132
132
|
window: n = oe,
|
|
133
133
|
deep: o = !0,
|
|
134
134
|
triggerOnRemoval: u = !1
|
|
135
|
-
} = e,
|
|
135
|
+
} = e, c = (t = e.document) != null ? t : n == null ? void 0 : n.document, l = () => {
|
|
136
136
|
var r;
|
|
137
|
-
let s =
|
|
137
|
+
let s = c == null ? void 0 : c.activeElement;
|
|
138
138
|
if (o)
|
|
139
139
|
for (; s != null && s.shadowRoot; )
|
|
140
140
|
s = (r = s == null ? void 0 : s.shadowRoot) == null ? void 0 : r.activeElement;
|
|
141
141
|
return s;
|
|
142
|
-
}, a =
|
|
142
|
+
}, a = P(), i = () => {
|
|
143
143
|
a.value = l();
|
|
144
144
|
};
|
|
145
145
|
if (n) {
|
|
@@ -161,31 +161,31 @@ function Et(e = {}) {
|
|
|
161
161
|
r
|
|
162
162
|
);
|
|
163
163
|
}
|
|
164
|
-
return u && Ct(a, i, { document:
|
|
164
|
+
return u && Ct(a, i, { document: c }), i(), a;
|
|
165
165
|
}
|
|
166
166
|
const It = "focusin", kt = "focusout", Mt = ":focus-within";
|
|
167
|
-
function
|
|
168
|
-
const { window: n = oe } = t, o =
|
|
167
|
+
function St(e, t = {}) {
|
|
168
|
+
const { window: n = oe } = t, o = k(() => ee(e)), u = H(!1), c = k(() => u.value), l = Et(t);
|
|
169
169
|
if (!n || !l.value)
|
|
170
|
-
return { focused:
|
|
170
|
+
return { focused: c };
|
|
171
171
|
const a = { passive: !0 };
|
|
172
172
|
return ce(o, It, () => u.value = !0, a), ce(o, kt, () => {
|
|
173
173
|
var i, r, s;
|
|
174
174
|
return u.value = (s = (r = (i = o.value) == null ? void 0 : i.matches) == null ? void 0 : r.call(i, Mt)) != null ? s : !1;
|
|
175
|
-
}, a), { focused:
|
|
175
|
+
}, a), { focused: c };
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
const o =
|
|
177
|
+
function $t(e, { window: t = oe, scrollTarget: n } = {}) {
|
|
178
|
+
const o = P(!1), u = () => {
|
|
179
179
|
if (!t) return;
|
|
180
|
-
const
|
|
180
|
+
const c = t.document, l = ee(e);
|
|
181
181
|
if (!l)
|
|
182
182
|
o.value = !1;
|
|
183
183
|
else {
|
|
184
184
|
const a = l.getBoundingClientRect();
|
|
185
|
-
o.value = a.top <= (t.innerHeight ||
|
|
185
|
+
o.value = a.top <= (t.innerHeight || c.documentElement.clientHeight) && a.left <= (t.innerWidth || c.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
|
-
return
|
|
188
|
+
return X(
|
|
189
189
|
() => ee(e),
|
|
190
190
|
() => u(),
|
|
191
191
|
{ immediate: !0, flush: "post" }
|
|
@@ -194,13 +194,13 @@ function At(e, { window: t = oe, scrollTarget: n } = {}) {
|
|
|
194
194
|
passive: !0
|
|
195
195
|
}), o;
|
|
196
196
|
}
|
|
197
|
-
const
|
|
198
|
-
let t =
|
|
197
|
+
const G = (e) => {
|
|
198
|
+
let t = $t(e).value;
|
|
199
199
|
return t = t && e.offsetHeight > 0, t;
|
|
200
|
-
},
|
|
200
|
+
}, z = (e) => e.tabIndex >= 0, He = (e) => {
|
|
201
201
|
const t = e.target;
|
|
202
|
-
return
|
|
203
|
-
},
|
|
202
|
+
return Se(t);
|
|
203
|
+
}, Se = (e) => {
|
|
204
204
|
var t;
|
|
205
205
|
let n;
|
|
206
206
|
if (e instanceof HTMLTableCellElement) {
|
|
@@ -213,29 +213,29 @@ const z = (e) => {
|
|
|
213
213
|
const o = e.previousElementSibling;
|
|
214
214
|
o && (n = o);
|
|
215
215
|
}
|
|
216
|
-
return n && (!
|
|
217
|
-
},
|
|
216
|
+
return n && (!z(n) || !G(n)) ? Se(n) : n;
|
|
217
|
+
}, At = (e) => {
|
|
218
218
|
var t;
|
|
219
219
|
const n = e.target;
|
|
220
220
|
let o;
|
|
221
221
|
if (n instanceof HTMLTableCellElement) {
|
|
222
222
|
const u = (t = n.parentElement) == null ? void 0 : t.parentElement;
|
|
223
223
|
if (u) {
|
|
224
|
-
const
|
|
224
|
+
const c = u.firstElementChild, l = c == null ? void 0 : c.children[n.cellIndex];
|
|
225
225
|
l && (o = l);
|
|
226
226
|
}
|
|
227
227
|
} else if (n instanceof HTMLTableRowElement) {
|
|
228
228
|
const u = n.parentElement;
|
|
229
229
|
if (u) {
|
|
230
|
-
const
|
|
231
|
-
|
|
230
|
+
const c = u.firstElementChild;
|
|
231
|
+
c && (o = c);
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
return o && (!
|
|
234
|
+
return o && (!z(o) || !G(o)) ? $e(o) : o;
|
|
235
235
|
}, We = (e) => {
|
|
236
236
|
const t = e.target;
|
|
237
|
-
return
|
|
238
|
-
},
|
|
237
|
+
return $e(t);
|
|
238
|
+
}, $e = (e) => {
|
|
239
239
|
var t;
|
|
240
240
|
let n;
|
|
241
241
|
if (e instanceof HTMLTableCellElement) {
|
|
@@ -248,7 +248,7 @@ const z = (e) => {
|
|
|
248
248
|
const o = e.nextElementSibling;
|
|
249
249
|
o && (n = o);
|
|
250
250
|
}
|
|
251
|
-
return n && (!
|
|
251
|
+
return n && (!z(n) || !G(n)) ? $e(n) : n;
|
|
252
252
|
}, Tt = (e) => {
|
|
253
253
|
var t;
|
|
254
254
|
const n = e.target;
|
|
@@ -256,21 +256,21 @@ const z = (e) => {
|
|
|
256
256
|
if (n instanceof HTMLTableCellElement) {
|
|
257
257
|
const u = (t = n.parentElement) == null ? void 0 : t.parentElement;
|
|
258
258
|
if (u) {
|
|
259
|
-
const
|
|
259
|
+
const c = u.lastElementChild, l = c == null ? void 0 : c.children[n.cellIndex];
|
|
260
260
|
l && (o = l);
|
|
261
261
|
}
|
|
262
262
|
} else if (n instanceof HTMLTableRowElement) {
|
|
263
263
|
const u = n.parentElement;
|
|
264
264
|
if (u) {
|
|
265
|
-
const
|
|
266
|
-
|
|
265
|
+
const c = u.lastElementChild;
|
|
266
|
+
c && (o = c);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
return o && (!
|
|
269
|
+
return o && (!z(o) || !G(o)) ? Se(o) : o;
|
|
270
270
|
}, Be = (e) => {
|
|
271
271
|
const t = e.target;
|
|
272
|
-
return
|
|
273
|
-
},
|
|
272
|
+
return Ae(t);
|
|
273
|
+
}, Ae = (e) => {
|
|
274
274
|
var t;
|
|
275
275
|
let n;
|
|
276
276
|
if (e.previousElementSibling)
|
|
@@ -279,7 +279,7 @@ const z = (e) => {
|
|
|
279
279
|
const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
|
|
280
280
|
n = o == null ? void 0 : o.lastElementChild;
|
|
281
281
|
}
|
|
282
|
-
return n && (!
|
|
282
|
+
return n && (!z(n) || !G(n)) ? Ae(n) : n;
|
|
283
283
|
}, Xe = (e) => {
|
|
284
284
|
const t = e.target;
|
|
285
285
|
return Te(t);
|
|
@@ -292,13 +292,13 @@ const z = (e) => {
|
|
|
292
292
|
const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
|
|
293
293
|
n = o == null ? void 0 : o.firstElementChild;
|
|
294
294
|
}
|
|
295
|
-
return n && (!
|
|
295
|
+
return n && (!z(n) || !G(n)) ? Te(n) : n;
|
|
296
296
|
}, Ve = (e) => {
|
|
297
297
|
const t = e.target.parentElement, n = t == null ? void 0 : t.firstElementChild;
|
|
298
|
-
return n && (!
|
|
298
|
+
return n && (!z(n) || !G(n)) ? Te(n) : n;
|
|
299
299
|
}, Ne = (e) => {
|
|
300
300
|
const t = e.target.parentElement, n = t == null ? void 0 : t.lastElementChild;
|
|
301
|
-
return n && (!
|
|
301
|
+
return n && (!z(n) || !G(n)) ? Ae(n) : n;
|
|
302
302
|
}, fe = ["alt", "control", "shift", "meta"], Rt = {
|
|
303
303
|
ArrowUp: "up",
|
|
304
304
|
ArrowDown: "down",
|
|
@@ -322,7 +322,7 @@ const z = (e) => {
|
|
|
322
322
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
323
323
|
},
|
|
324
324
|
"keydown.control.up": (e) => {
|
|
325
|
-
const t =
|
|
325
|
+
const t = At(e);
|
|
326
326
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
327
327
|
},
|
|
328
328
|
"keydown.control.down": (e) => {
|
|
@@ -393,43 +393,43 @@ function Pe(e) {
|
|
|
393
393
|
}, o = (l) => {
|
|
394
394
|
const a = t(l);
|
|
395
395
|
let i = [];
|
|
396
|
-
return l.selectors ? i = n(l) : a && (i = Array.from(a.children).filter((r) =>
|
|
396
|
+
return l.selectors ? i = n(l) : a && (i = Array.from(a.children).filter((r) => z(r) && G(r))), i;
|
|
397
397
|
}, u = (l) => (a) => {
|
|
398
398
|
const i = Rt[a.key] || a.key.toLowerCase();
|
|
399
399
|
if (fe.includes(i)) return;
|
|
400
400
|
const r = l.handlers || Re;
|
|
401
401
|
for (const s of Object.keys(r)) {
|
|
402
|
-
const [
|
|
403
|
-
if (
|
|
404
|
-
const w = r[s],
|
|
405
|
-
const
|
|
406
|
-
return a.getModifierState(
|
|
402
|
+
const [g, ...m] = s.split(".");
|
|
403
|
+
if (g === "keydown" && m.includes(i)) {
|
|
404
|
+
const w = r[s], v = m.filter((f) => fe.includes(f)), x = fe.some((f) => {
|
|
405
|
+
const d = f.charAt(0).toUpperCase() + f.slice(1);
|
|
406
|
+
return a.getModifierState(d);
|
|
407
407
|
});
|
|
408
|
-
if (
|
|
409
|
-
if (
|
|
408
|
+
if (v.length > 0) {
|
|
409
|
+
if (x) {
|
|
410
410
|
for (const f of fe)
|
|
411
411
|
if (m.includes(f)) {
|
|
412
|
-
const
|
|
413
|
-
a.getModifierState(
|
|
412
|
+
const d = f.charAt(0).toUpperCase() + f.slice(1);
|
|
413
|
+
a.getModifierState(d) && w(a);
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
} else
|
|
417
|
-
|
|
417
|
+
x || w(a);
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
},
|
|
420
|
+
}, c = [];
|
|
421
421
|
ne(() => {
|
|
422
422
|
for (const l of e) {
|
|
423
423
|
const a = t(l), i = o(l), r = u(l), s = a ? [a] : i;
|
|
424
|
-
for (const
|
|
425
|
-
const { focused: m } =
|
|
426
|
-
|
|
424
|
+
for (const g of s) {
|
|
425
|
+
const { focused: m } = St(P(g)), w = X(m, (v) => {
|
|
426
|
+
v ? g.addEventListener("keydown", r) : g.removeEventListener("keydown", r);
|
|
427
427
|
});
|
|
428
|
-
|
|
428
|
+
c.push(w);
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
}), lt(() => {
|
|
432
|
-
for (const l of
|
|
432
|
+
for (const l of c)
|
|
433
433
|
l();
|
|
434
434
|
});
|
|
435
435
|
}
|
|
@@ -438,7 +438,7 @@ function de(e) {
|
|
|
438
438
|
}
|
|
439
439
|
const he = typeof window < "u" && typeof document < "u";
|
|
440
440
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
441
|
-
const Pt = (e) => e != null, Ot = Object.prototype.toString, Je = (e) => Ot.call(e) === "[object Object]",
|
|
441
|
+
const Pt = (e) => e != null, Ot = Object.prototype.toString, Je = (e) => Ot.call(e) === "[object Object]", U = () => {
|
|
442
442
|
}, Ee = /* @__PURE__ */ Lt();
|
|
443
443
|
function Lt() {
|
|
444
444
|
var e, t;
|
|
@@ -447,14 +447,14 @@ function Lt() {
|
|
|
447
447
|
function Dt(e) {
|
|
448
448
|
return Ie();
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function q(e) {
|
|
451
451
|
return Array.isArray(e) ? e : [e];
|
|
452
452
|
}
|
|
453
453
|
function Ht(...e) {
|
|
454
454
|
if (e.length !== 1)
|
|
455
455
|
return it(...e);
|
|
456
456
|
const t = e[0];
|
|
457
|
-
return typeof t == "function" ? ut(Ye(() => ({ get: t, set:
|
|
457
|
+
return typeof t == "function" ? ut(Ye(() => ({ get: t, set: U }))) : P(t);
|
|
458
458
|
}
|
|
459
459
|
function Wt(e, t = {}) {
|
|
460
460
|
if (!st(e))
|
|
@@ -466,8 +466,8 @@ function Wt(e, t = {}) {
|
|
|
466
466
|
return e.value[o];
|
|
467
467
|
},
|
|
468
468
|
set(u) {
|
|
469
|
-
var
|
|
470
|
-
if ((
|
|
469
|
+
var c;
|
|
470
|
+
if ((c = E(t.replaceRef)) != null ? c : !0)
|
|
471
471
|
if (Array.isArray(e.value)) {
|
|
472
472
|
const a = [...e.value];
|
|
473
473
|
a[o] = u, e.value = a;
|
|
@@ -485,7 +485,7 @@ function Bt(e, t = !0, n) {
|
|
|
485
485
|
Dt() ? ne(e, n) : t ? e() : Ue(e);
|
|
486
486
|
}
|
|
487
487
|
function Qe(e, t, n) {
|
|
488
|
-
return
|
|
488
|
+
return X(
|
|
489
489
|
e,
|
|
490
490
|
t,
|
|
491
491
|
{
|
|
@@ -497,41 +497,41 @@ function Qe(e, t, n) {
|
|
|
497
497
|
const pe = he ? window : void 0;
|
|
498
498
|
function te(e) {
|
|
499
499
|
var t;
|
|
500
|
-
const n =
|
|
500
|
+
const n = E(e);
|
|
501
501
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
502
502
|
}
|
|
503
503
|
function ue(...e) {
|
|
504
504
|
const t = [], n = () => {
|
|
505
505
|
t.forEach((a) => a()), t.length = 0;
|
|
506
|
-
}, o = (a, i, r, s) => (a.addEventListener(i, r, s), () => a.removeEventListener(i, r, s)), u =
|
|
507
|
-
const a =
|
|
506
|
+
}, o = (a, i, r, s) => (a.addEventListener(i, r, s), () => a.removeEventListener(i, r, s)), u = k(() => {
|
|
507
|
+
const a = q(E(e[0])).filter((i) => i != null);
|
|
508
508
|
return a.every((i) => typeof i != "string") ? a : void 0;
|
|
509
|
-
}),
|
|
509
|
+
}), c = Qe(
|
|
510
510
|
() => {
|
|
511
511
|
var a, i;
|
|
512
512
|
return [
|
|
513
513
|
(i = (a = u.value) == null ? void 0 : a.map((r) => te(r))) != null ? i : [pe].filter((r) => r != null),
|
|
514
|
-
|
|
515
|
-
|
|
514
|
+
q(E(u.value ? e[1] : e[0])),
|
|
515
|
+
q(b(u.value ? e[2] : e[1])),
|
|
516
516
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
517
|
-
|
|
517
|
+
E(u.value ? e[3] : e[2])
|
|
518
518
|
];
|
|
519
519
|
},
|
|
520
520
|
([a, i, r, s]) => {
|
|
521
521
|
if (n(), !(a != null && a.length) || !(i != null && i.length) || !(r != null && r.length))
|
|
522
522
|
return;
|
|
523
|
-
const
|
|
523
|
+
const g = Je(s) ? { ...s } : s;
|
|
524
524
|
t.push(
|
|
525
525
|
...a.flatMap(
|
|
526
526
|
(m) => i.flatMap(
|
|
527
|
-
(w) => r.map((
|
|
527
|
+
(w) => r.map((v) => o(m, w, v, g))
|
|
528
528
|
)
|
|
529
529
|
)
|
|
530
530
|
);
|
|
531
531
|
},
|
|
532
532
|
{ flush: "post" }
|
|
533
533
|
), l = () => {
|
|
534
|
-
|
|
534
|
+
c(), n();
|
|
535
535
|
};
|
|
536
536
|
return de(n), l;
|
|
537
537
|
}
|
|
@@ -543,28 +543,28 @@ function Xt() {
|
|
|
543
543
|
}
|
|
544
544
|
function Ze(e) {
|
|
545
545
|
const t = Xt();
|
|
546
|
-
return
|
|
546
|
+
return k(() => (t.value, !!e()));
|
|
547
547
|
}
|
|
548
548
|
function Ke(e, t, n = {}) {
|
|
549
549
|
const { window: o = pe, ...u } = n;
|
|
550
|
-
let
|
|
550
|
+
let c;
|
|
551
551
|
const l = Ze(() => o && "MutationObserver" in o), a = () => {
|
|
552
|
-
|
|
553
|
-
}, i =
|
|
554
|
-
const m =
|
|
552
|
+
c && (c.disconnect(), c = void 0);
|
|
553
|
+
}, i = k(() => {
|
|
554
|
+
const m = E(e), w = q(m).map(te).filter(Pt);
|
|
555
555
|
return new Set(w);
|
|
556
|
-
}), r =
|
|
556
|
+
}), r = X(
|
|
557
557
|
() => i.value,
|
|
558
558
|
(m) => {
|
|
559
|
-
a(), l.value && m.size && (
|
|
559
|
+
a(), l.value && m.size && (c = new MutationObserver(t), m.forEach((w) => c.observe(w, u)));
|
|
560
560
|
},
|
|
561
561
|
{ immediate: !0, flush: "post" }
|
|
562
|
-
), s = () =>
|
|
562
|
+
), s = () => c == null ? void 0 : c.takeRecords(), g = () => {
|
|
563
563
|
r(), a();
|
|
564
564
|
};
|
|
565
|
-
return de(
|
|
565
|
+
return de(g), {
|
|
566
566
|
isSupported: l,
|
|
567
|
-
stop:
|
|
567
|
+
stop: g,
|
|
568
568
|
takeRecords: s
|
|
569
569
|
};
|
|
570
570
|
}
|
|
@@ -573,76 +573,76 @@ function we(e, t = {}) {
|
|
|
573
573
|
const {
|
|
574
574
|
pointerTypes: o,
|
|
575
575
|
preventDefault: u,
|
|
576
|
-
stopPropagation:
|
|
576
|
+
stopPropagation: c,
|
|
577
577
|
exact: l,
|
|
578
578
|
onMove: a,
|
|
579
579
|
onEnd: i,
|
|
580
580
|
onStart: r,
|
|
581
581
|
initialValue: s,
|
|
582
|
-
axis:
|
|
582
|
+
axis: g = "both",
|
|
583
583
|
draggingElement: m = pe,
|
|
584
584
|
containerElement: w,
|
|
585
|
-
handle:
|
|
586
|
-
buttons:
|
|
587
|
-
} = t, f =
|
|
588
|
-
(n =
|
|
589
|
-
),
|
|
590
|
-
|
|
591
|
-
},
|
|
592
|
-
var
|
|
593
|
-
if (!
|
|
585
|
+
handle: v = e,
|
|
586
|
+
buttons: x = [0]
|
|
587
|
+
} = t, f = P(
|
|
588
|
+
(n = E(s)) != null ? n : { x: 0, y: 0 }
|
|
589
|
+
), d = P(), p = (C) => o ? o.includes(C.pointerType) : !0, M = (C) => {
|
|
590
|
+
E(u) && C.preventDefault(), E(c) && C.stopPropagation();
|
|
591
|
+
}, $ = (C) => {
|
|
592
|
+
var A;
|
|
593
|
+
if (!E(x).includes(C.button) || E(t.disabled) || !p(C) || E(l) && C.target !== E(e))
|
|
594
594
|
return;
|
|
595
|
-
const
|
|
596
|
-
x:
|
|
597
|
-
y:
|
|
595
|
+
const B = E(w), F = (A = B == null ? void 0 : B.getBoundingClientRect) == null ? void 0 : A.call(B), V = E(e).getBoundingClientRect(), h = {
|
|
596
|
+
x: C.clientX - (B ? V.left - F.left + B.scrollLeft : V.left),
|
|
597
|
+
y: C.clientY - (B ? V.top - F.top + B.scrollTop : V.top)
|
|
598
598
|
};
|
|
599
|
-
(r == null ? void 0 : r(
|
|
600
|
-
},
|
|
601
|
-
if (
|
|
599
|
+
(r == null ? void 0 : r(h, C)) !== !1 && (d.value = h, M(C));
|
|
600
|
+
}, I = (C) => {
|
|
601
|
+
if (E(t.disabled) || !p(C) || !d.value)
|
|
602
602
|
return;
|
|
603
|
-
const
|
|
604
|
-
let { x:
|
|
605
|
-
(
|
|
606
|
-
x:
|
|
607
|
-
y:
|
|
608
|
-
}, a == null || a(f.value,
|
|
609
|
-
},
|
|
610
|
-
|
|
603
|
+
const A = E(w), B = E(e).getBoundingClientRect();
|
|
604
|
+
let { x: F, y: V } = f.value;
|
|
605
|
+
(g === "x" || g === "both") && (F = C.clientX - d.value.x, A && (F = Math.min(Math.max(0, F), A.scrollWidth - B.width))), (g === "y" || g === "both") && (V = C.clientY - d.value.y, A && (V = Math.min(Math.max(0, V), A.scrollHeight - B.height))), f.value = {
|
|
606
|
+
x: F,
|
|
607
|
+
y: V
|
|
608
|
+
}, a == null || a(f.value, C), M(C);
|
|
609
|
+
}, Q = (C) => {
|
|
610
|
+
E(t.disabled) || !p(C) || d.value && (d.value = void 0, i == null || i(f.value, C), M(C));
|
|
611
611
|
};
|
|
612
612
|
if (he) {
|
|
613
|
-
const
|
|
614
|
-
var
|
|
613
|
+
const C = () => {
|
|
614
|
+
var A;
|
|
615
615
|
return {
|
|
616
|
-
capture: (
|
|
617
|
-
passive: !
|
|
616
|
+
capture: (A = t.capture) != null ? A : !0,
|
|
617
|
+
passive: !E(u)
|
|
618
618
|
};
|
|
619
619
|
};
|
|
620
|
-
ue(
|
|
620
|
+
ue(v, "pointerdown", $, C), ue(m, "pointermove", I, C), ue(m, "pointerup", Q, C);
|
|
621
621
|
}
|
|
622
622
|
return {
|
|
623
623
|
...Wt(f),
|
|
624
624
|
position: f,
|
|
625
|
-
isDragging:
|
|
626
|
-
style:
|
|
625
|
+
isDragging: k(() => !!d.value),
|
|
626
|
+
style: k(
|
|
627
627
|
() => `left:${f.value.x}px;top:${f.value.y}px;`
|
|
628
628
|
)
|
|
629
629
|
};
|
|
630
630
|
}
|
|
631
631
|
function Vt(e, t, n = {}) {
|
|
632
632
|
const { window: o = pe, ...u } = n;
|
|
633
|
-
let
|
|
633
|
+
let c;
|
|
634
634
|
const l = Ze(() => o && "ResizeObserver" in o), a = () => {
|
|
635
|
-
|
|
636
|
-
}, i =
|
|
637
|
-
const
|
|
638
|
-
return Array.isArray(
|
|
639
|
-
}), r =
|
|
635
|
+
c && (c.disconnect(), c = void 0);
|
|
636
|
+
}, i = k(() => {
|
|
637
|
+
const g = E(e);
|
|
638
|
+
return Array.isArray(g) ? g.map((m) => te(m)) : [te(g)];
|
|
639
|
+
}), r = X(
|
|
640
640
|
i,
|
|
641
|
-
(
|
|
641
|
+
(g) => {
|
|
642
642
|
if (a(), l.value && o) {
|
|
643
|
-
|
|
644
|
-
for (const m of
|
|
645
|
-
m &&
|
|
643
|
+
c = new ResizeObserver(t);
|
|
644
|
+
for (const m of g)
|
|
645
|
+
m && c.observe(m, u);
|
|
646
646
|
}
|
|
647
647
|
},
|
|
648
648
|
{ immediate: !0, flush: "post" }
|
|
@@ -659,41 +659,41 @@ function ge(e, t = {}) {
|
|
|
659
659
|
reset: n = !0,
|
|
660
660
|
windowResize: o = !0,
|
|
661
661
|
windowScroll: u = !0,
|
|
662
|
-
immediate:
|
|
662
|
+
immediate: c = !0,
|
|
663
663
|
updateTiming: l = "sync"
|
|
664
|
-
} = t, a = H(0), i = H(0), r = H(0), s = H(0),
|
|
665
|
-
function
|
|
666
|
-
const
|
|
667
|
-
if (!
|
|
668
|
-
n && (a.value = 0, i.value = 0, r.value = 0, s.value = 0,
|
|
664
|
+
} = t, a = H(0), i = H(0), r = H(0), s = H(0), g = H(0), m = H(0), w = H(0), v = H(0);
|
|
665
|
+
function x() {
|
|
666
|
+
const d = te(e);
|
|
667
|
+
if (!d) {
|
|
668
|
+
n && (a.value = 0, i.value = 0, r.value = 0, s.value = 0, g.value = 0, m.value = 0, w.value = 0, v.value = 0);
|
|
669
669
|
return;
|
|
670
670
|
}
|
|
671
|
-
const
|
|
672
|
-
a.value =
|
|
671
|
+
const p = d.getBoundingClientRect();
|
|
672
|
+
a.value = p.height, i.value = p.bottom, r.value = p.left, s.value = p.right, g.value = p.top, m.value = p.width, w.value = p.x, v.value = p.y;
|
|
673
673
|
}
|
|
674
674
|
function f() {
|
|
675
|
-
l === "sync" ?
|
|
675
|
+
l === "sync" ? x() : l === "next-frame" && requestAnimationFrame(() => x());
|
|
676
676
|
}
|
|
677
|
-
return Vt(e, f),
|
|
677
|
+
return Vt(e, f), X(() => te(e), (d) => !d && f()), Ke(e, f, {
|
|
678
678
|
attributeFilter: ["style", "class"]
|
|
679
679
|
}), u && ue("scroll", f, { capture: !0, passive: !0 }), o && ue("resize", f, { passive: !0 }), Bt(() => {
|
|
680
|
-
|
|
680
|
+
c && f();
|
|
681
681
|
}), {
|
|
682
682
|
height: a,
|
|
683
683
|
bottom: i,
|
|
684
684
|
left: r,
|
|
685
685
|
right: s,
|
|
686
|
-
top:
|
|
686
|
+
top: g,
|
|
687
687
|
width: m,
|
|
688
688
|
x: w,
|
|
689
|
-
y:
|
|
689
|
+
y: v,
|
|
690
690
|
update: f
|
|
691
691
|
};
|
|
692
692
|
}
|
|
693
693
|
const Nt = (e) => {
|
|
694
694
|
const t = new DOMParser().parseFromString(e, "text/html");
|
|
695
695
|
return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
|
|
696
|
-
}, Gt = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), zt = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Ft = ["innerHTML"], jt = { key: 2 }, Ut = /* @__PURE__ */
|
|
696
|
+
}, Gt = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), zt = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Ft = ["innerHTML"], jt = { key: 2 }, Ut = /* @__PURE__ */ J({
|
|
697
697
|
__name: "ACell",
|
|
698
698
|
props: {
|
|
699
699
|
colIndex: {},
|
|
@@ -704,75 +704,75 @@ const Nt = (e) => {
|
|
|
704
704
|
pinned: { type: Boolean, default: !1 }
|
|
705
705
|
},
|
|
706
706
|
setup(e, { expose: t }) {
|
|
707
|
-
const n =
|
|
708
|
-
var
|
|
707
|
+
const n = N("cell"), o = e.store.getCellData(e.colIndex, e.rowIndex), u = P(""), c = P(!1), l = e.store.columns[e.colIndex], a = e.store.rows[e.rowIndex], i = l.align || "center", r = l.width || "40ch", s = k(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), g = k(() => typeof s.value == "string" ? Nt(s.value) : !1), m = k(() => {
|
|
708
|
+
var d;
|
|
709
709
|
return {
|
|
710
710
|
textAlign: i,
|
|
711
711
|
width: r,
|
|
712
|
-
fontWeight:
|
|
713
|
-
paddingLeft: e.store.getIndent(e.colIndex, (
|
|
712
|
+
fontWeight: c.value ? "bold" : "inherit",
|
|
713
|
+
paddingLeft: e.store.getIndent(e.colIndex, (d = e.store.display[e.rowIndex]) == null ? void 0 : d.indent)
|
|
714
714
|
};
|
|
715
|
-
}), w =
|
|
715
|
+
}), w = k(() => ({
|
|
716
716
|
"sticky-column": e.pinned,
|
|
717
|
-
"cell-modified":
|
|
718
|
-
})),
|
|
719
|
-
const { left:
|
|
720
|
-
l.mask, l.modalComponent && e.store.$patch((
|
|
721
|
-
|
|
717
|
+
"cell-modified": c.value
|
|
718
|
+
})), v = () => {
|
|
719
|
+
const { left: d, bottom: p, width: M, height: $ } = ge(n);
|
|
720
|
+
l.mask, l.modalComponent && e.store.$patch((I) => {
|
|
721
|
+
I.modal.visible = !0, I.modal.colIndex = e.colIndex, I.modal.rowIndex = e.rowIndex, I.modal.left = d, I.modal.bottom = p, I.modal.width = M, I.modal.height = $, I.modal.cell = n.value, typeof l.modalComponent == "function" ? I.modal.component = l.modalComponent({ table: I.table, row: a, column: l }) : I.modal.component = l.modalComponent, I.modal.componentProps = l.modalComponentExtraProps;
|
|
722
722
|
});
|
|
723
723
|
};
|
|
724
724
|
if (e.addNavigation) {
|
|
725
|
-
let
|
|
725
|
+
let d = {
|
|
726
726
|
...Re,
|
|
727
|
-
"keydown.f2":
|
|
728
|
-
"keydown.alt.up":
|
|
729
|
-
"keydown.alt.down":
|
|
730
|
-
"keydown.alt.left":
|
|
731
|
-
"keydown.alt.right":
|
|
727
|
+
"keydown.f2": v,
|
|
728
|
+
"keydown.alt.up": v,
|
|
729
|
+
"keydown.alt.down": v,
|
|
730
|
+
"keydown.alt.left": v,
|
|
731
|
+
"keydown.alt.right": v
|
|
732
732
|
};
|
|
733
|
-
typeof e.addNavigation == "object" && (
|
|
734
|
-
...
|
|
733
|
+
typeof e.addNavigation == "object" && (d = {
|
|
734
|
+
...d,
|
|
735
735
|
...e.addNavigation
|
|
736
736
|
}), Pe([
|
|
737
737
|
{
|
|
738
738
|
selectors: n,
|
|
739
|
-
handlers:
|
|
739
|
+
handlers: d
|
|
740
740
|
}
|
|
741
741
|
]);
|
|
742
742
|
}
|
|
743
|
-
const
|
|
743
|
+
const x = () => {
|
|
744
744
|
n.value && (u.value = n.value.textContent);
|
|
745
|
-
}, f = (
|
|
746
|
-
const
|
|
747
|
-
|
|
745
|
+
}, f = (d) => {
|
|
746
|
+
const p = d.target;
|
|
747
|
+
p.textContent !== u.value && (u.value = p.textContent, l.format ? (c.value = p.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, o), e.store.setCellText(e.colIndex, e.rowIndex, p.textContent)) : (c.value = p.textContent !== o, e.store.setCellData(e.colIndex, e.rowIndex, p.textContent)));
|
|
748
748
|
};
|
|
749
749
|
return t({
|
|
750
750
|
currentData: u
|
|
751
|
-
}), (
|
|
751
|
+
}), (d, p) => (S(), R("td", {
|
|
752
752
|
ref: "cell",
|
|
753
|
-
"data-colindex":
|
|
754
|
-
"data-rowindex":
|
|
755
|
-
"data-editable":
|
|
756
|
-
contenteditable:
|
|
757
|
-
tabindex:
|
|
753
|
+
"data-colindex": d.colIndex,
|
|
754
|
+
"data-rowindex": d.rowIndex,
|
|
755
|
+
"data-editable": b(l).edit,
|
|
756
|
+
contenteditable: b(l).edit,
|
|
757
|
+
tabindex: d.tabIndex,
|
|
758
758
|
spellcheck: !1,
|
|
759
|
-
style:
|
|
760
|
-
onFocus:
|
|
759
|
+
style: Y(m.value),
|
|
760
|
+
onFocus: x,
|
|
761
761
|
onPaste: f,
|
|
762
762
|
onInput: f,
|
|
763
|
-
onClick:
|
|
764
|
-
class:
|
|
763
|
+
onClick: v,
|
|
764
|
+
class: j(["atable-cell", w.value])
|
|
765
765
|
}, [
|
|
766
|
-
|
|
766
|
+
b(l).cellComponent ? (S(), se(ve(b(l).cellComponent), ke({
|
|
767
767
|
key: 0,
|
|
768
768
|
value: s.value
|
|
769
|
-
},
|
|
769
|
+
}, b(l).cellComponentProps), null, 16, ["value"])) : g.value ? (S(), R("span", {
|
|
770
770
|
key: 1,
|
|
771
771
|
innerHTML: s.value
|
|
772
|
-
}, null, 8, Ft)) : (
|
|
772
|
+
}, null, 8, Ft)) : (S(), R("span", jt, K(s.value), 1))
|
|
773
773
|
], 46, zt));
|
|
774
774
|
}
|
|
775
|
-
}), Yt = ["tabindex"], qt = ["tabindex"], Jt = ["colspan"], Qt = /* @__PURE__ */
|
|
775
|
+
}), Yt = ["tabindex"], qt = ["tabindex"], Jt = ["colspan"], Qt = /* @__PURE__ */ J({
|
|
776
776
|
__name: "AExpansionRow",
|
|
777
777
|
props: {
|
|
778
778
|
rowIndex: {},
|
|
@@ -781,7 +781,7 @@ const Nt = (e) => {
|
|
|
781
781
|
addNavigation: { type: [Boolean, Object] }
|
|
782
782
|
},
|
|
783
783
|
setup(e) {
|
|
784
|
-
const t =
|
|
784
|
+
const t = N("rowEl"), n = k(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
|
|
785
785
|
if (e.addNavigation) {
|
|
786
786
|
const o = {
|
|
787
787
|
"keydown.control.g": (u) => {
|
|
@@ -795,26 +795,26 @@ const Nt = (e) => {
|
|
|
795
795
|
}
|
|
796
796
|
]);
|
|
797
797
|
}
|
|
798
|
-
return (o, u) => (
|
|
799
|
-
|
|
798
|
+
return (o, u) => (S(), R(ie, null, [
|
|
799
|
+
L("tr", ke(o.$attrs, {
|
|
800
800
|
ref: "rowEl",
|
|
801
801
|
tabindex: o.tabIndex,
|
|
802
802
|
class: "expandable-row"
|
|
803
803
|
}), [
|
|
804
|
-
|
|
804
|
+
L("td", {
|
|
805
805
|
tabIndex: -1,
|
|
806
|
-
onClick: u[0] || (u[0] = (
|
|
806
|
+
onClick: u[0] || (u[0] = (c) => o.store.toggleRowExpand(o.rowIndex)),
|
|
807
807
|
class: "row-index"
|
|
808
808
|
}, K(n.value), 1),
|
|
809
809
|
W(o.$slots, "row", {}, void 0, !0)
|
|
810
810
|
], 16, Yt),
|
|
811
|
-
o.store.display[o.rowIndex].expanded ? (
|
|
811
|
+
o.store.display[o.rowIndex].expanded ? (S(), R("tr", {
|
|
812
812
|
key: 0,
|
|
813
813
|
ref: "rowExpanded",
|
|
814
814
|
tabindex: o.tabIndex,
|
|
815
815
|
class: "expanded-row"
|
|
816
816
|
}, [
|
|
817
|
-
|
|
817
|
+
L("td", {
|
|
818
818
|
tabIndex: -1,
|
|
819
819
|
colspan: o.store.columns.length + 1,
|
|
820
820
|
class: "expanded-row-content"
|
|
@@ -835,7 +835,7 @@ const Nt = (e) => {
|
|
|
835
835
|
}, en = {
|
|
836
836
|
key: 0,
|
|
837
837
|
class: "gantt-label"
|
|
838
|
-
}, tn = /* @__PURE__ */
|
|
838
|
+
}, tn = /* @__PURE__ */ J({
|
|
839
839
|
__name: "AGanttCell",
|
|
840
840
|
props: {
|
|
841
841
|
store: {},
|
|
@@ -849,65 +849,87 @@ const Nt = (e) => {
|
|
|
849
849
|
color: {}
|
|
850
850
|
},
|
|
851
851
|
setup(e) {
|
|
852
|
-
ct((
|
|
853
|
-
|
|
854
|
-
"
|
|
852
|
+
ct((d) => ({
|
|
853
|
+
"78862e08": t.value,
|
|
854
|
+
"18ad7d98": d.colspan
|
|
855
855
|
}));
|
|
856
|
-
const t =
|
|
856
|
+
const t = P();
|
|
857
857
|
ne(() => {
|
|
858
858
|
!e.color || e.color == "" || e.color.length < 6 ? t.value = "#cccccc" : t.value = e.color;
|
|
859
859
|
});
|
|
860
|
-
const n =
|
|
861
|
-
const
|
|
860
|
+
const n = N("container"), o = N("bar"), u = N("leftHandle"), c = N("rightHandle"), { width: l } = ge(n), { left: a, right: i } = ge(o), r = P(e.start || 0), s = P(e.end || r.value + e.colspan), g = P({ startX: 0, startPos: 0 }), m = k(() => e.colspan > 0 ? l.value / e.colspan : 0), w = k(() => {
|
|
861
|
+
const d = r.value / e.colspan * 100, p = s.value / e.colspan * 100;
|
|
862
862
|
return {
|
|
863
|
-
left: `${
|
|
864
|
-
width: `${
|
|
863
|
+
left: `${d}%`,
|
|
864
|
+
width: `${p - d}%`,
|
|
865
865
|
backgroundColor: t.value
|
|
866
866
|
};
|
|
867
|
-
}), { isDragging:
|
|
867
|
+
}), { isDragging: v } = we(u, {
|
|
868
868
|
axis: "x",
|
|
869
869
|
onStart: () => {
|
|
870
|
-
o.value && (o.value.style.transition = "none"),
|
|
870
|
+
o.value && (o.value.style.transition = "none"), g.value = {
|
|
871
871
|
startX: a.value,
|
|
872
872
|
startPos: r.value
|
|
873
873
|
};
|
|
874
874
|
},
|
|
875
|
-
onMove: ({ x:
|
|
876
|
-
if (
|
|
877
|
-
const
|
|
878
|
-
o.value.style.left = `${
|
|
875
|
+
onMove: ({ x: d }) => {
|
|
876
|
+
if (v.value && o.value) {
|
|
877
|
+
const M = (d - g.value.startX) / m.value, $ = Math.max(0, Math.min(s.value - 1, g.value.startPos + M));
|
|
878
|
+
o.value.style.left = `${$ / e.colspan * 100}%`, o.value.style.width = `${(s.value - $) / e.colspan * 100}%`;
|
|
879
879
|
}
|
|
880
880
|
},
|
|
881
|
-
onEnd: ({ x:
|
|
881
|
+
onEnd: ({ x: d }) => {
|
|
882
882
|
if (o.value) {
|
|
883
|
-
const
|
|
884
|
-
r.value =
|
|
883
|
+
const p = d - g.value.startX, M = Math.round(p / m.value), $ = r.value, I = Math.max(0, Math.min(s.value - 1, g.value.startPos + M));
|
|
884
|
+
r.value = I, e.store.updateGanttBar({
|
|
885
|
+
rowIndex: e.rowIndex,
|
|
886
|
+
colIndex: e.colIndex,
|
|
887
|
+
type: "resize",
|
|
888
|
+
edge: "start",
|
|
889
|
+
oldStart: $,
|
|
890
|
+
newStart: I,
|
|
891
|
+
end: s.value,
|
|
892
|
+
delta: M,
|
|
893
|
+
oldColspan: s.value - $,
|
|
894
|
+
newColspan: s.value - I
|
|
895
|
+
});
|
|
885
896
|
}
|
|
886
897
|
}
|
|
887
|
-
}), { isDragging:
|
|
898
|
+
}), { isDragging: x } = we(c, {
|
|
888
899
|
axis: "x",
|
|
889
900
|
onStart: () => {
|
|
890
|
-
o.value && (o.value.style.transition = "none"),
|
|
901
|
+
o.value && (o.value.style.transition = "none"), g.value = {
|
|
891
902
|
startX: i.value,
|
|
892
903
|
startPos: s.value
|
|
893
904
|
};
|
|
894
905
|
},
|
|
895
|
-
onMove: ({ x:
|
|
896
|
-
if (
|
|
897
|
-
const
|
|
906
|
+
onMove: ({ x: d }) => {
|
|
907
|
+
if (x.value && o.value) {
|
|
908
|
+
const M = (d - g.value.startX) / m.value, $ = Math.max(
|
|
898
909
|
r.value + 1,
|
|
899
|
-
Math.min(e.columnsCount,
|
|
910
|
+
Math.min(e.columnsCount, g.value.startPos + M)
|
|
900
911
|
);
|
|
901
|
-
o.value.style.width = `${(
|
|
912
|
+
o.value.style.width = `${($ - r.value) / e.colspan * 100}%`;
|
|
902
913
|
}
|
|
903
914
|
},
|
|
904
|
-
onEnd: ({ x:
|
|
915
|
+
onEnd: ({ x: d }) => {
|
|
905
916
|
if (o.value) {
|
|
906
|
-
const
|
|
917
|
+
const p = d - g.value.startX, M = Math.round(p / m.value), $ = s.value, I = Math.max(
|
|
907
918
|
r.value + 1,
|
|
908
|
-
Math.min(e.columnsCount,
|
|
919
|
+
Math.min(e.columnsCount, g.value.startPos + M)
|
|
909
920
|
);
|
|
910
|
-
s.value =
|
|
921
|
+
s.value = I, e.store.updateGanttBar({
|
|
922
|
+
rowIndex: e.rowIndex,
|
|
923
|
+
colIndex: e.colIndex,
|
|
924
|
+
type: "resize",
|
|
925
|
+
edge: "end",
|
|
926
|
+
oldEnd: $,
|
|
927
|
+
newEnd: I,
|
|
928
|
+
start: r.value,
|
|
929
|
+
delta: M,
|
|
930
|
+
oldColspan: $ - r.value,
|
|
931
|
+
newColspan: I - r.value
|
|
932
|
+
});
|
|
911
933
|
}
|
|
912
934
|
}
|
|
913
935
|
}), { isDragging: f } = we(o, {
|
|
@@ -915,55 +937,65 @@ const Nt = (e) => {
|
|
|
915
937
|
// to avoid triggering when the left and right handles are being used
|
|
916
938
|
axis: "x",
|
|
917
939
|
onStart: () => {
|
|
918
|
-
o.value && (o.value.style.transition = "none"),
|
|
940
|
+
o.value && (o.value.style.transition = "none"), g.value = {
|
|
919
941
|
startX: a.value,
|
|
920
942
|
startPos: r.value
|
|
921
943
|
};
|
|
922
944
|
},
|
|
923
|
-
onMove: ({ x:
|
|
945
|
+
onMove: ({ x: d }) => {
|
|
924
946
|
if (f.value && o.value) {
|
|
925
|
-
const
|
|
926
|
-
o.value.style.left = `${
|
|
947
|
+
const M = (d - g.value.startX) / m.value, $ = s.value - r.value, I = Math.max(0, Math.min(g.value.startPos + M, e.columnsCount - $));
|
|
948
|
+
o.value.style.left = `${I / e.colspan * 100}%`;
|
|
927
949
|
}
|
|
928
950
|
},
|
|
929
|
-
onEnd: ({ x:
|
|
951
|
+
onEnd: ({ x: d }) => {
|
|
930
952
|
if (o.value) {
|
|
931
|
-
const
|
|
932
|
-
let
|
|
933
|
-
|
|
953
|
+
const p = d - g.value.startX, M = Math.round(p / m.value), $ = s.value - r.value, I = r.value, Q = s.value;
|
|
954
|
+
let C = g.value.startPos + M, A = C + $;
|
|
955
|
+
C < 0 ? (C = 0, A = $) : A > e.columnsCount && (A = e.columnsCount, C = A - $), r.value = C, s.value = A, e.store.updateGanttBar({
|
|
956
|
+
rowIndex: e.rowIndex,
|
|
957
|
+
colIndex: e.colIndex,
|
|
958
|
+
type: "bar",
|
|
959
|
+
oldStart: I,
|
|
960
|
+
oldEnd: Q,
|
|
961
|
+
newStart: C,
|
|
962
|
+
newEnd: A,
|
|
963
|
+
delta: M,
|
|
964
|
+
colspan: A - C
|
|
965
|
+
});
|
|
934
966
|
}
|
|
935
967
|
}
|
|
936
968
|
});
|
|
937
|
-
return (
|
|
969
|
+
return (d, p) => (S(), R("td", {
|
|
938
970
|
class: "aganttcell",
|
|
939
|
-
colspan:
|
|
971
|
+
colspan: d.colspan
|
|
940
972
|
}, [
|
|
941
|
-
|
|
942
|
-
|
|
973
|
+
L("div", _t, [
|
|
974
|
+
L("div", {
|
|
943
975
|
ref: "bar",
|
|
944
|
-
class:
|
|
945
|
-
style:
|
|
976
|
+
class: j(["gantt-bar", { "is-dragging": b(f) || b(v) || b(x) }]),
|
|
977
|
+
style: Y(w.value)
|
|
946
978
|
}, [
|
|
947
|
-
|
|
979
|
+
L("div", {
|
|
948
980
|
ref: "leftHandle",
|
|
949
|
-
class:
|
|
950
|
-
},
|
|
951
|
-
|
|
952
|
-
|
|
981
|
+
class: j(["gantt-handle left-handle", { "is-dragging": b(v) }])
|
|
982
|
+
}, p[0] || (p[0] = [
|
|
983
|
+
L("div", { class: "handle-grip" }, null, -1),
|
|
984
|
+
L("div", { class: "vertical-indicator left-indicator" }, null, -1)
|
|
953
985
|
]), 2),
|
|
954
|
-
|
|
955
|
-
|
|
986
|
+
d.label ? (S(), R("label", en, K(d.label), 1)) : _("", !0),
|
|
987
|
+
L("div", {
|
|
956
988
|
ref: "rightHandle",
|
|
957
|
-
class:
|
|
958
|
-
},
|
|
959
|
-
|
|
960
|
-
|
|
989
|
+
class: j(["gantt-handle right-handle", { "is-dragging": b(x) }])
|
|
990
|
+
}, p[1] || (p[1] = [
|
|
991
|
+
L("div", { class: "handle-grip" }, null, -1),
|
|
992
|
+
L("div", { class: "vertical-indicator right-indicator" }, null, -1)
|
|
961
993
|
]), 2)
|
|
962
994
|
], 6)
|
|
963
995
|
], 512)
|
|
964
996
|
], 8, Kt));
|
|
965
997
|
}
|
|
966
|
-
}), nn = /* @__PURE__ */ le(tn, [["__scopeId", "data-v-
|
|
998
|
+
}), nn = /* @__PURE__ */ le(tn, [["__scopeId", "data-v-a929e8e3"]]), on = ["tabindex"], ln = /* @__PURE__ */ J({
|
|
967
999
|
__name: "ARow",
|
|
968
1000
|
props: {
|
|
969
1001
|
rowIndex: {},
|
|
@@ -972,7 +1004,7 @@ const Nt = (e) => {
|
|
|
972
1004
|
addNavigation: { type: [Boolean, Object], default: !1 }
|
|
973
1005
|
},
|
|
974
1006
|
setup(e) {
|
|
975
|
-
const t =
|
|
1007
|
+
const t = N("rowEl"), n = k(() => e.store.isRowVisible(e.rowIndex)), o = k(() => e.store.getRowExpandSymbol(e.rowIndex));
|
|
976
1008
|
if (e.addNavigation) {
|
|
977
1009
|
let u = Re;
|
|
978
1010
|
typeof e.addNavigation == "object" && (u = {
|
|
@@ -985,21 +1017,21 @@ const Nt = (e) => {
|
|
|
985
1017
|
}
|
|
986
1018
|
]);
|
|
987
1019
|
}
|
|
988
|
-
return (u,
|
|
1020
|
+
return (u, c) => xe((S(), R("tr", {
|
|
989
1021
|
ref: "rowEl",
|
|
990
1022
|
tabindex: u.tabIndex,
|
|
991
1023
|
class: "atable-row"
|
|
992
1024
|
}, [
|
|
993
1025
|
u.store.config.view !== "uncounted" ? W(u.$slots, "index", { key: 0 }, () => [
|
|
994
|
-
u.store.config.view === "list" ? (
|
|
1026
|
+
u.store.config.view === "list" ? (S(), R("td", {
|
|
995
1027
|
key: 0,
|
|
996
1028
|
tabIndex: -1,
|
|
997
|
-
class:
|
|
998
|
-
}, K(u.rowIndex + 1), 3)) : u.store.config.view === "tree" ? (
|
|
1029
|
+
class: j(["list-index", u.store.hasPinnedColumns ? "sticky-index" : ""])
|
|
1030
|
+
}, K(u.rowIndex + 1), 3)) : u.store.config.view === "tree" ? (S(), R("td", {
|
|
999
1031
|
key: 1,
|
|
1000
1032
|
tabIndex: -1,
|
|
1001
|
-
class:
|
|
1002
|
-
onClick:
|
|
1033
|
+
class: j(["tree-index", u.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
1034
|
+
onClick: c[0] || (c[0] = (l) => u.store.toggleRowExpand(u.rowIndex))
|
|
1003
1035
|
}, K(o.value), 3)) : _("", !0)
|
|
1004
1036
|
], !0) : _("", !0),
|
|
1005
1037
|
W(u.$slots, "default", {}, void 0, !0)
|
|
@@ -1010,74 +1042,74 @@ const Nt = (e) => {
|
|
|
1010
1042
|
}), _e = /* @__PURE__ */ le(ln, [["__scopeId", "data-v-4cb4f254"]]), et = he ? window : void 0;
|
|
1011
1043
|
function re(e) {
|
|
1012
1044
|
var t;
|
|
1013
|
-
const n =
|
|
1045
|
+
const n = E(e);
|
|
1014
1046
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1015
1047
|
}
|
|
1016
1048
|
function Z(...e) {
|
|
1017
1049
|
const t = [], n = () => {
|
|
1018
1050
|
t.forEach((a) => a()), t.length = 0;
|
|
1019
|
-
}, o = (a, i, r, s) => (a.addEventListener(i, r, s), () => a.removeEventListener(i, r, s)), u =
|
|
1020
|
-
const a =
|
|
1051
|
+
}, o = (a, i, r, s) => (a.addEventListener(i, r, s), () => a.removeEventListener(i, r, s)), u = k(() => {
|
|
1052
|
+
const a = q(E(e[0])).filter((i) => i != null);
|
|
1021
1053
|
return a.every((i) => typeof i != "string") ? a : void 0;
|
|
1022
|
-
}),
|
|
1054
|
+
}), c = Qe(
|
|
1023
1055
|
() => {
|
|
1024
1056
|
var a, i;
|
|
1025
1057
|
return [
|
|
1026
1058
|
(i = (a = u.value) == null ? void 0 : a.map((r) => re(r))) != null ? i : [et].filter((r) => r != null),
|
|
1027
|
-
|
|
1028
|
-
|
|
1059
|
+
q(E(u.value ? e[1] : e[0])),
|
|
1060
|
+
q(b(u.value ? e[2] : e[1])),
|
|
1029
1061
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
1030
|
-
|
|
1062
|
+
E(u.value ? e[3] : e[2])
|
|
1031
1063
|
];
|
|
1032
1064
|
},
|
|
1033
1065
|
([a, i, r, s]) => {
|
|
1034
1066
|
if (n(), !(a != null && a.length) || !(i != null && i.length) || !(r != null && r.length))
|
|
1035
1067
|
return;
|
|
1036
|
-
const
|
|
1068
|
+
const g = Je(s) ? { ...s } : s;
|
|
1037
1069
|
t.push(
|
|
1038
1070
|
...a.flatMap(
|
|
1039
1071
|
(m) => i.flatMap(
|
|
1040
|
-
(w) => r.map((
|
|
1072
|
+
(w) => r.map((v) => o(m, w, v, g))
|
|
1041
1073
|
)
|
|
1042
1074
|
)
|
|
1043
1075
|
);
|
|
1044
1076
|
},
|
|
1045
1077
|
{ flush: "post" }
|
|
1046
1078
|
), l = () => {
|
|
1047
|
-
|
|
1079
|
+
c(), n();
|
|
1048
1080
|
};
|
|
1049
1081
|
return de(n), l;
|
|
1050
1082
|
}
|
|
1051
1083
|
let Ge = !1;
|
|
1052
1084
|
function ze(e, t, n = {}) {
|
|
1053
|
-
const { window: o = et, ignore: u = [], capture:
|
|
1085
|
+
const { window: o = et, ignore: u = [], capture: c = !0, detectIframe: l = !1, controls: a = !1 } = n;
|
|
1054
1086
|
if (!o)
|
|
1055
|
-
return a ? { stop:
|
|
1087
|
+
return a ? { stop: U, cancel: U, trigger: U } : U;
|
|
1056
1088
|
if (Ee && !Ge) {
|
|
1057
1089
|
Ge = !0;
|
|
1058
1090
|
const f = { passive: !0 };
|
|
1059
|
-
Array.from(o.document.body.children).forEach((
|
|
1091
|
+
Array.from(o.document.body.children).forEach((d) => Z(d, "click", U, f)), Z(o.document.documentElement, "click", U, f);
|
|
1060
1092
|
}
|
|
1061
1093
|
let i = !0;
|
|
1062
|
-
const r = (f) =>
|
|
1063
|
-
if (typeof
|
|
1064
|
-
return Array.from(o.document.querySelectorAll(
|
|
1094
|
+
const r = (f) => E(u).some((d) => {
|
|
1095
|
+
if (typeof d == "string")
|
|
1096
|
+
return Array.from(o.document.querySelectorAll(d)).some((p) => p === f.target || f.composedPath().includes(p));
|
|
1065
1097
|
{
|
|
1066
|
-
const
|
|
1067
|
-
return
|
|
1098
|
+
const p = re(d);
|
|
1099
|
+
return p && (f.target === p || f.composedPath().includes(p));
|
|
1068
1100
|
}
|
|
1069
1101
|
});
|
|
1070
1102
|
function s(f) {
|
|
1071
|
-
const
|
|
1072
|
-
return
|
|
1103
|
+
const d = E(f);
|
|
1104
|
+
return d && d.$.subTree.shapeFlag === 16;
|
|
1073
1105
|
}
|
|
1074
|
-
function
|
|
1075
|
-
const
|
|
1076
|
-
return
|
|
1106
|
+
function g(f, d) {
|
|
1107
|
+
const p = E(f), M = p.$.subTree && p.$.subTree.children;
|
|
1108
|
+
return M == null || !Array.isArray(M) ? !1 : M.some(($) => $.el === d.target || d.composedPath().includes($.el));
|
|
1077
1109
|
}
|
|
1078
1110
|
const m = (f) => {
|
|
1079
|
-
const
|
|
1080
|
-
if (f.target != null && !(!(
|
|
1111
|
+
const d = re(e);
|
|
1112
|
+
if (f.target != null && !(!(d instanceof Element) && s(e) && g(e, f)) && !(!d || d === f.target || f.composedPath().includes(d))) {
|
|
1081
1113
|
if ("detail" in f && f.detail === 0 && (i = !r(f)), !i) {
|
|
1082
1114
|
i = !0;
|
|
1083
1115
|
return;
|
|
@@ -1086,33 +1118,33 @@ function ze(e, t, n = {}) {
|
|
|
1086
1118
|
}
|
|
1087
1119
|
};
|
|
1088
1120
|
let w = !1;
|
|
1089
|
-
const
|
|
1121
|
+
const v = [
|
|
1090
1122
|
Z(o, "click", (f) => {
|
|
1091
1123
|
w || (w = !0, setTimeout(() => {
|
|
1092
1124
|
w = !1;
|
|
1093
1125
|
}, 0), m(f));
|
|
1094
|
-
}, { passive: !0, capture:
|
|
1126
|
+
}, { passive: !0, capture: c }),
|
|
1095
1127
|
Z(o, "pointerdown", (f) => {
|
|
1096
|
-
const
|
|
1097
|
-
i = !r(f) && !!(
|
|
1128
|
+
const d = re(e);
|
|
1129
|
+
i = !r(f) && !!(d && !f.composedPath().includes(d));
|
|
1098
1130
|
}, { passive: !0 }),
|
|
1099
1131
|
l && Z(o, "blur", (f) => {
|
|
1100
1132
|
setTimeout(() => {
|
|
1101
|
-
var
|
|
1102
|
-
const
|
|
1103
|
-
((
|
|
1133
|
+
var d;
|
|
1134
|
+
const p = re(e);
|
|
1135
|
+
((d = o.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(p != null && p.contains(o.document.activeElement)) && t(f);
|
|
1104
1136
|
}, 0);
|
|
1105
1137
|
}, { passive: !0 })
|
|
1106
|
-
].filter(Boolean),
|
|
1138
|
+
].filter(Boolean), x = () => v.forEach((f) => f());
|
|
1107
1139
|
return a ? {
|
|
1108
|
-
stop:
|
|
1140
|
+
stop: x,
|
|
1109
1141
|
cancel: () => {
|
|
1110
1142
|
i = !1;
|
|
1111
1143
|
},
|
|
1112
1144
|
trigger: (f) => {
|
|
1113
1145
|
i = !0, m(f), i = !1;
|
|
1114
1146
|
}
|
|
1115
|
-
} :
|
|
1147
|
+
} : x;
|
|
1116
1148
|
}
|
|
1117
1149
|
const an = {
|
|
1118
1150
|
mounted(e, t) {
|
|
@@ -1146,10 +1178,10 @@ function sn(e) {
|
|
|
1146
1178
|
}
|
|
1147
1179
|
const be = /* @__PURE__ */ new WeakMap();
|
|
1148
1180
|
function rn(e, t = !1) {
|
|
1149
|
-
const n =
|
|
1181
|
+
const n = P(t);
|
|
1150
1182
|
let o = null, u = "";
|
|
1151
|
-
|
|
1152
|
-
const i = ye(
|
|
1183
|
+
X(Ht(e), (a) => {
|
|
1184
|
+
const i = ye(E(a));
|
|
1153
1185
|
if (i) {
|
|
1154
1186
|
const r = i;
|
|
1155
1187
|
if (be.get(r) || be.set(r, r.style.overflow), r.style.overflow !== "hidden" && (u = r.style.overflow), r.style.overflow === "hidden")
|
|
@@ -1160,8 +1192,8 @@ function rn(e, t = !1) {
|
|
|
1160
1192
|
}, {
|
|
1161
1193
|
immediate: !0
|
|
1162
1194
|
});
|
|
1163
|
-
const
|
|
1164
|
-
const a = ye(
|
|
1195
|
+
const c = () => {
|
|
1196
|
+
const a = ye(E(e));
|
|
1165
1197
|
!a || n.value || (Ee && (o = Z(
|
|
1166
1198
|
a,
|
|
1167
1199
|
"touchmove",
|
|
@@ -1171,15 +1203,15 @@ function rn(e, t = !1) {
|
|
|
1171
1203
|
{ passive: !1 }
|
|
1172
1204
|
)), a.style.overflow = "hidden", n.value = !0);
|
|
1173
1205
|
}, l = () => {
|
|
1174
|
-
const a = ye(
|
|
1206
|
+
const a = ye(E(e));
|
|
1175
1207
|
!a || !n.value || (Ee && (o == null || o()), a.style.overflow = u, be.delete(a), n.value = !1);
|
|
1176
1208
|
};
|
|
1177
|
-
return de(l),
|
|
1209
|
+
return de(l), k({
|
|
1178
1210
|
get() {
|
|
1179
1211
|
return n.value;
|
|
1180
1212
|
},
|
|
1181
1213
|
set(a) {
|
|
1182
|
-
a ?
|
|
1214
|
+
a ? c() : l();
|
|
1183
1215
|
}
|
|
1184
1216
|
});
|
|
1185
1217
|
}
|
|
@@ -1191,7 +1223,7 @@ function un() {
|
|
|
1191
1223
|
return;
|
|
1192
1224
|
e = !0;
|
|
1193
1225
|
const u = rn(n, o.value);
|
|
1194
|
-
|
|
1226
|
+
X(t, (c) => u.value = c);
|
|
1195
1227
|
};
|
|
1196
1228
|
}
|
|
1197
1229
|
un();
|
|
@@ -1201,29 +1233,29 @@ const cn = {
|
|
|
1201
1233
|
}, dn = {
|
|
1202
1234
|
class: "atable-header-row",
|
|
1203
1235
|
tabindex: "-1"
|
|
1204
|
-
}, nt = /* @__PURE__ */
|
|
1236
|
+
}, nt = /* @__PURE__ */ J({
|
|
1205
1237
|
__name: "ATableHeader",
|
|
1206
1238
|
props: {
|
|
1207
1239
|
columns: {},
|
|
1208
1240
|
store: {}
|
|
1209
1241
|
},
|
|
1210
1242
|
setup(e) {
|
|
1211
|
-
return (t, n) => t.columns.length ? (
|
|
1212
|
-
|
|
1213
|
-
t.store.zeroColumn ? (
|
|
1243
|
+
return (t, n) => t.columns.length ? (S(), R("thead", cn, [
|
|
1244
|
+
L("tr", dn, [
|
|
1245
|
+
t.store.zeroColumn ? (S(), R("th", {
|
|
1214
1246
|
key: 0,
|
|
1215
1247
|
id: "header-index",
|
|
1216
|
-
class:
|
|
1248
|
+
class: j([[
|
|
1217
1249
|
t.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1218
1250
|
t.store.config.view === "tree" ? "tree-index" : "",
|
|
1219
1251
|
t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1220
1252
|
], "list-index"])
|
|
1221
1253
|
}, null, 2)) : _("", !0),
|
|
1222
|
-
(
|
|
1254
|
+
(S(!0), R(ie, null, Ce(t.columns, (o, u) => (S(), R("th", {
|
|
1223
1255
|
key: o.name,
|
|
1224
1256
|
tabindex: "-1",
|
|
1225
|
-
style:
|
|
1226
|
-
class:
|
|
1257
|
+
style: Y(t.store.getHeaderCellStyle(o)),
|
|
1258
|
+
class: j(o.pinned ? "sticky-column" : "")
|
|
1227
1259
|
}, [
|
|
1228
1260
|
W(t.$slots, "default", {}, () => [
|
|
1229
1261
|
dt(K(o.label || String.fromCharCode(u + 97).toUpperCase()), 1)
|
|
@@ -1232,26 +1264,26 @@ const cn = {
|
|
|
1232
1264
|
])
|
|
1233
1265
|
])) : _("", !0);
|
|
1234
1266
|
}
|
|
1235
|
-
}), ot = /* @__PURE__ */
|
|
1267
|
+
}), ot = /* @__PURE__ */ J({
|
|
1236
1268
|
__name: "ATableModal",
|
|
1237
1269
|
props: {
|
|
1238
1270
|
store: {}
|
|
1239
1271
|
},
|
|
1240
1272
|
setup(e) {
|
|
1241
|
-
const t =
|
|
1242
|
-
var
|
|
1273
|
+
const t = N("amodal"), { width: n, height: o } = ge(t), u = k(() => {
|
|
1274
|
+
var g, m, w, v;
|
|
1243
1275
|
if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
|
|
1244
|
-
const
|
|
1276
|
+
const c = (g = e.store.modal.cell) == null ? void 0 : g.closest("table"), l = c.offsetHeight || 0, a = c.offsetWidth || 0;
|
|
1245
1277
|
let i = ((m = e.store.modal.cell) == null ? void 0 : m.offsetTop) || 0;
|
|
1246
|
-
const r = ((w =
|
|
1278
|
+
const r = ((w = c.querySelector("thead")) == null ? void 0 : w.offsetHeight) || 0;
|
|
1247
1279
|
i += r, i = i + o.value < l ? i : i - (o.value + e.store.modal.height);
|
|
1248
|
-
let s = ((
|
|
1280
|
+
let s = ((v = e.store.modal.cell) == null ? void 0 : v.offsetLeft) || 0;
|
|
1249
1281
|
return s = s + n.value <= a ? s : s - (n.value - e.store.modal.width), {
|
|
1250
1282
|
left: `${s}px`,
|
|
1251
1283
|
top: `${i}px`
|
|
1252
1284
|
};
|
|
1253
1285
|
});
|
|
1254
|
-
return (
|
|
1286
|
+
return (c, l) => (S(), R("div", {
|
|
1255
1287
|
class: "amodal",
|
|
1256
1288
|
ref: "amodal",
|
|
1257
1289
|
tabindex: "-1",
|
|
@@ -1259,104 +1291,104 @@ const cn = {
|
|
|
1259
1291
|
}, ["stop"])),
|
|
1260
1292
|
onInput: l[1] || (l[1] = Oe(() => {
|
|
1261
1293
|
}, ["stop"])),
|
|
1262
|
-
style:
|
|
1294
|
+
style: Y(u.value)
|
|
1263
1295
|
}, [
|
|
1264
|
-
W(
|
|
1296
|
+
W(c.$slots, "default")
|
|
1265
1297
|
], 36));
|
|
1266
1298
|
}
|
|
1267
1299
|
}), fn = (e) => {
|
|
1268
1300
|
const t = e.id || Gt();
|
|
1269
1301
|
return ft(`table-${t}`, () => {
|
|
1270
1302
|
const o = () => {
|
|
1271
|
-
const
|
|
1272
|
-
for (const [
|
|
1273
|
-
for (const [
|
|
1274
|
-
|
|
1275
|
-
return
|
|
1276
|
-
}, u = (
|
|
1277
|
-
const
|
|
1278
|
-
if (
|
|
1279
|
-
return
|
|
1280
|
-
const
|
|
1281
|
-
for (let
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1303
|
+
const h = {};
|
|
1304
|
+
for (const [y, T] of c.value.entries())
|
|
1305
|
+
for (const [O, D] of l.value.entries())
|
|
1306
|
+
h[`${y}:${O}`] = D[T.name];
|
|
1307
|
+
return h;
|
|
1308
|
+
}, u = (h) => {
|
|
1309
|
+
const y = [Object.assign({}, { rowModified: !1 })];
|
|
1310
|
+
if (h && "0:0" in h)
|
|
1311
|
+
return h;
|
|
1312
|
+
const T = /* @__PURE__ */ new Set();
|
|
1313
|
+
for (let O = l.value.length - 1; O >= 0; O--) {
|
|
1314
|
+
const D = l.value[O];
|
|
1315
|
+
D.parent && T.add(D.parent), y[O] = {
|
|
1284
1316
|
childrenOpen: !1,
|
|
1285
1317
|
expanded: !1,
|
|
1286
|
-
indent:
|
|
1287
|
-
isParent:
|
|
1288
|
-
isRoot:
|
|
1318
|
+
indent: D.indent || 0,
|
|
1319
|
+
isParent: T.has(O),
|
|
1320
|
+
isRoot: D.parent === null || D.parent === void 0,
|
|
1289
1321
|
rowModified: !1,
|
|
1290
|
-
open:
|
|
1291
|
-
parent:
|
|
1322
|
+
open: D.parent === null || D.parent === void 0,
|
|
1323
|
+
parent: D.parent
|
|
1292
1324
|
};
|
|
1293
1325
|
}
|
|
1294
|
-
return
|
|
1295
|
-
},
|
|
1326
|
+
return y;
|
|
1327
|
+
}, c = P(e.columns), l = P(e.rows), a = P(e.config || {}), i = P(e.table || o()), r = P(u(e.display)), s = P(e.modal || { visible: !1 }), g = P({}), m = k(() => c.value.some((h) => h.pinned)), w = k(() => `${Math.ceil(l.value.length / 100 + 1)}ch`), v = k(
|
|
1296
1328
|
() => a.value.view ? ["list", "tree", "list-expansion"].includes(a.value.view) : !1
|
|
1297
|
-
),
|
|
1298
|
-
const
|
|
1299
|
-
i.value[
|
|
1300
|
-
},
|
|
1301
|
-
const
|
|
1302
|
-
i.value[
|
|
1303
|
-
},
|
|
1304
|
-
minWidth:
|
|
1305
|
-
textAlign:
|
|
1329
|
+
), x = (h, y) => i.value[`${h}:${y}`], f = (h, y, T) => {
|
|
1330
|
+
const O = `${h}:${y}`, D = c.value[h];
|
|
1331
|
+
i.value[O] !== T && (r.value[y].rowModified = !0), i.value[O] = T, l.value[y][D.name] = T;
|
|
1332
|
+
}, d = (h, y, T) => {
|
|
1333
|
+
const O = `${h}:${y}`;
|
|
1334
|
+
i.value[O] !== T && (r.value[y].rowModified = !0, g.value[O] = T);
|
|
1335
|
+
}, p = (h) => ({
|
|
1336
|
+
minWidth: h.width || "40ch",
|
|
1337
|
+
textAlign: h.align || "center",
|
|
1306
1338
|
width: a.value.fullWidth ? "auto" : void 0
|
|
1307
|
-
}),
|
|
1308
|
-
const
|
|
1309
|
-
return a.value.view === "gantt" &&
|
|
1310
|
-
},
|
|
1339
|
+
}), M = (h) => {
|
|
1340
|
+
const y = l.value[h];
|
|
1341
|
+
return a.value.view === "gantt" && y.indent === 0;
|
|
1342
|
+
}, $ = (h) => a.value.view !== "tree" || r.value[h].isRoot || r.value[h].open, I = (h) => a.value.view !== "tree" ? "" : r.value[h].isRoot || r.value[h].isParent ? r.value[h].childrenOpen ? "-" : "+" : "", Q = (h) => {
|
|
1311
1343
|
if (a.value.view === "tree") {
|
|
1312
|
-
r.value[
|
|
1313
|
-
for (let
|
|
1314
|
-
r.value[
|
|
1315
|
-
} else a.value.view === "list-expansion" && (r.value[
|
|
1316
|
-
},
|
|
1317
|
-
const
|
|
1318
|
-
return
|
|
1319
|
-
},
|
|
1320
|
-
const
|
|
1321
|
-
return ae ? typeof ae == "function" ? ae(
|
|
1344
|
+
r.value[h].childrenOpen = !r.value[h].childrenOpen;
|
|
1345
|
+
for (let y = l.value.length - 1; y >= 0; y--)
|
|
1346
|
+
r.value[y].parent === h && (r.value[y].open = !r.value[y].open, r.value[y].childrenOpen && Q(y));
|
|
1347
|
+
} else a.value.view === "list-expansion" && (r.value[h].expanded = !r.value[h].expanded);
|
|
1348
|
+
}, C = (h, y) => {
|
|
1349
|
+
const T = x(h, y);
|
|
1350
|
+
return A(h, y, T);
|
|
1351
|
+
}, A = (h, y, T) => {
|
|
1352
|
+
const O = c.value[h], D = l.value[y], ae = O.format;
|
|
1353
|
+
return ae ? typeof ae == "function" ? ae(T, { table: i.value, row: D, column: O }) : typeof ae == "string" ? Function(`"use strict";return (${ae})`)()(T, { table: i.value, row: D, column: O }) : T : T;
|
|
1322
1354
|
};
|
|
1323
1355
|
return {
|
|
1324
1356
|
// state
|
|
1325
|
-
columns:
|
|
1357
|
+
columns: c,
|
|
1326
1358
|
config: a,
|
|
1327
1359
|
display: r,
|
|
1328
1360
|
modal: s,
|
|
1329
1361
|
rows: l,
|
|
1330
1362
|
table: i,
|
|
1331
|
-
updates:
|
|
1363
|
+
updates: g,
|
|
1332
1364
|
// getters
|
|
1333
1365
|
hasPinnedColumns: m,
|
|
1334
1366
|
numberedRowWidth: w,
|
|
1335
|
-
zeroColumn:
|
|
1367
|
+
zeroColumn: v,
|
|
1336
1368
|
// actions
|
|
1337
|
-
closeModal: (
|
|
1338
|
-
var
|
|
1339
|
-
|
|
1369
|
+
closeModal: (h) => {
|
|
1370
|
+
var y;
|
|
1371
|
+
h.target instanceof Node && (y = s.value.parent) != null && y.contains(h.target) || s.value.visible && (s.value.visible = !1);
|
|
1340
1372
|
},
|
|
1341
|
-
getCellData:
|
|
1342
|
-
getCellDisplayValue:
|
|
1343
|
-
getFormattedValue:
|
|
1344
|
-
getHeaderCellStyle:
|
|
1345
|
-
getIndent: (
|
|
1346
|
-
getRowExpandSymbol:
|
|
1347
|
-
isRowGantt:
|
|
1348
|
-
isRowVisible:
|
|
1373
|
+
getCellData: x,
|
|
1374
|
+
getCellDisplayValue: C,
|
|
1375
|
+
getFormattedValue: A,
|
|
1376
|
+
getHeaderCellStyle: p,
|
|
1377
|
+
getIndent: (h, y) => y && h === 0 && y > 0 ? `${y}ch` : "inherit",
|
|
1378
|
+
getRowExpandSymbol: I,
|
|
1379
|
+
isRowGantt: M,
|
|
1380
|
+
isRowVisible: $,
|
|
1349
1381
|
setCellData: f,
|
|
1350
|
-
setCellText:
|
|
1351
|
-
toggleRowExpand:
|
|
1352
|
-
updateGanttBar: (
|
|
1353
|
-
var
|
|
1354
|
-
const
|
|
1355
|
-
|
|
1382
|
+
setCellText: d,
|
|
1383
|
+
toggleRowExpand: Q,
|
|
1384
|
+
updateGanttBar: (h) => {
|
|
1385
|
+
var T;
|
|
1386
|
+
const y = (T = l.value[h.rowIndex]) == null ? void 0 : T.gantt;
|
|
1387
|
+
y && (h.type === "resize" ? h.edge === "start" ? (y.startIndex = h.newStart, y.endIndex = h.end, y.colspan = y.endIndex - y.startIndex) : h.edge === "end" && (y.startIndex = h.start, y.endIndex = h.newEnd, y.colspan = y.endIndex - y.startIndex) : h.type === "bar" && (y.startIndex = h.newStart, y.endIndex = h.newEnd, y.colspan = y.endIndex - y.startIndex));
|
|
1356
1388
|
}
|
|
1357
1389
|
};
|
|
1358
1390
|
})();
|
|
1359
|
-
}, vn = /* @__PURE__ */
|
|
1391
|
+
}, vn = /* @__PURE__ */ J({
|
|
1360
1392
|
__name: "ATable",
|
|
1361
1393
|
props: {
|
|
1362
1394
|
id: {},
|
|
@@ -1367,24 +1399,21 @@ const cn = {
|
|
|
1367
1399
|
},
|
|
1368
1400
|
emits: ["update:modelValue", "cellUpdate", "gantt:drag"],
|
|
1369
1401
|
setup(e, { expose: t, emit: n }) {
|
|
1370
|
-
const o = n, u =
|
|
1371
|
-
l.$onAction(({ name: s, store:
|
|
1372
|
-
var g;
|
|
1402
|
+
const o = n, u = N("table"), c = e.modelValue ? e.modelValue : e.rows, l = fn({ columns: e.columns, rows: c, id: e.id, config: e.config });
|
|
1403
|
+
l.$onAction(({ name: s, store: g, args: m, after: w }) => {
|
|
1373
1404
|
if (s === "setCellData" || s === "setCellText") {
|
|
1374
|
-
const [
|
|
1405
|
+
const [v, x, f] = m, d = g.getCellData(v, x);
|
|
1375
1406
|
w(() => {
|
|
1376
|
-
o("cellUpdate", { colIndex:
|
|
1407
|
+
o("cellUpdate", { colIndex: v, rowIndex: x, newValue: f, oldValue: d });
|
|
1377
1408
|
});
|
|
1378
1409
|
} else if (s === "updateGanttBar") {
|
|
1379
|
-
const [
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
});
|
|
1385
|
-
}
|
|
1410
|
+
const [v] = m;
|
|
1411
|
+
let x = !1;
|
|
1412
|
+
v.type === "resize" ? x = v.oldColspan !== v.newColspan : v.type === "bar" && (x = v.oldStart !== v.newStart || v.oldEnd !== v.newEnd), x && w(() => {
|
|
1413
|
+
o("gantt:drag", v);
|
|
1414
|
+
});
|
|
1386
1415
|
}
|
|
1387
|
-
}),
|
|
1416
|
+
}), X(
|
|
1388
1417
|
() => l.rows,
|
|
1389
1418
|
(s) => {
|
|
1390
1419
|
o("update:modelValue", s);
|
|
@@ -1393,26 +1422,26 @@ const cn = {
|
|
|
1393
1422
|
), ne(() => {
|
|
1394
1423
|
e.columns.some((s) => s.pinned) && (i(), l.config.view === "tree" && Ke(u, i, { childList: !0, subtree: !0 }));
|
|
1395
1424
|
});
|
|
1396
|
-
const a =
|
|
1397
|
-
const s = u.value,
|
|
1398
|
-
for (const [
|
|
1399
|
-
const f = m == null ? void 0 : m.cells[
|
|
1400
|
-
f && (
|
|
1425
|
+
const a = k(() => l.columns.filter((s) => s.pinned).length), i = () => {
|
|
1426
|
+
const s = u.value, g = s == null ? void 0 : s.rows[0], m = s == null ? void 0 : s.rows[1], w = g ? Array.from(g.cells) : [];
|
|
1427
|
+
for (const [v, x] of w.entries()) {
|
|
1428
|
+
const f = m == null ? void 0 : m.cells[v];
|
|
1429
|
+
f && (x.style.width = `${f.offsetWidth}px`);
|
|
1401
1430
|
}
|
|
1402
|
-
for (const
|
|
1403
|
-
let
|
|
1431
|
+
for (const v of (s == null ? void 0 : s.rows) || []) {
|
|
1432
|
+
let x = 0;
|
|
1404
1433
|
const f = [];
|
|
1405
|
-
for (const
|
|
1406
|
-
(
|
|
1434
|
+
for (const d of v.cells)
|
|
1435
|
+
(d.classList.contains("sticky-column") || d.classList.contains("sticky-index")) && (d.style.left = `${x}px`, x += d.offsetWidth, f.push(d));
|
|
1407
1436
|
f.length > 0 && f[f.length - 1].classList.add("sticky-column-edge");
|
|
1408
1437
|
}
|
|
1409
1438
|
};
|
|
1410
1439
|
window.addEventListener("keydown", (s) => {
|
|
1411
1440
|
if (s.key === "Escape" && l.modal.visible) {
|
|
1412
1441
|
l.modal.visible = !1;
|
|
1413
|
-
const
|
|
1414
|
-
|
|
1415
|
-
|
|
1442
|
+
const g = l.modal.parent;
|
|
1443
|
+
g && Ue().then(() => {
|
|
1444
|
+
g.focus();
|
|
1416
1445
|
});
|
|
1417
1446
|
}
|
|
1418
1447
|
});
|
|
@@ -1421,9 +1450,9 @@ const cn = {
|
|
|
1421
1450
|
if (!(s.indent === 0) || a.value === 0)
|
|
1422
1451
|
return l.columns;
|
|
1423
1452
|
const m = [];
|
|
1424
|
-
for (let
|
|
1425
|
-
const
|
|
1426
|
-
|
|
1453
|
+
for (let v = 0; v < a.value; v++) {
|
|
1454
|
+
const x = { ...l.columns[v] };
|
|
1455
|
+
x.originalIndex = v, m.push(x);
|
|
1427
1456
|
}
|
|
1428
1457
|
return m.push({
|
|
1429
1458
|
...l.columns[a.value],
|
|
@@ -1434,59 +1463,59 @@ const cn = {
|
|
|
1434
1463
|
// TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
|
|
1435
1464
|
}), m;
|
|
1436
1465
|
};
|
|
1437
|
-
return t({ store: l }), (s,
|
|
1466
|
+
return t({ store: l }), (s, g) => xe((S(), R("table", {
|
|
1438
1467
|
ref: "table",
|
|
1439
1468
|
class: "atable",
|
|
1440
|
-
style:
|
|
1441
|
-
width:
|
|
1469
|
+
style: Y({
|
|
1470
|
+
width: b(l).config.fullWidth ? "100%" : "auto"
|
|
1442
1471
|
})
|
|
1443
1472
|
}, [
|
|
1444
|
-
W(s.$slots, "header", { data:
|
|
1473
|
+
W(s.$slots, "header", { data: b(l) }, () => [
|
|
1445
1474
|
Le(nt, {
|
|
1446
|
-
columns:
|
|
1447
|
-
store:
|
|
1475
|
+
columns: b(l).columns,
|
|
1476
|
+
store: b(l)
|
|
1448
1477
|
}, null, 8, ["columns", "store"])
|
|
1449
1478
|
], !0),
|
|
1450
|
-
|
|
1451
|
-
W(s.$slots, "body", { data:
|
|
1452
|
-
(
|
|
1479
|
+
L("tbody", null, [
|
|
1480
|
+
W(s.$slots, "body", { data: b(l) }, () => [
|
|
1481
|
+
(S(!0), R(ie, null, Ce(b(l).rows, (m, w) => (S(), se(_e, {
|
|
1453
1482
|
key: m.id,
|
|
1454
1483
|
row: m,
|
|
1455
1484
|
rowIndex: w,
|
|
1456
|
-
store:
|
|
1485
|
+
store: b(l)
|
|
1457
1486
|
}, {
|
|
1458
1487
|
default: De(() => [
|
|
1459
|
-
(
|
|
1460
|
-
var f,
|
|
1461
|
-
return
|
|
1462
|
-
key:
|
|
1488
|
+
(S(!0), R(ie, null, Ce(r(m), (v, x) => {
|
|
1489
|
+
var f, d, p;
|
|
1490
|
+
return S(), R(ie, {
|
|
1491
|
+
key: v.name
|
|
1463
1492
|
}, [
|
|
1464
|
-
|
|
1493
|
+
v.isGantt ? (S(), se(ve(v.ganttComponent || "AGanttCell"), {
|
|
1465
1494
|
key: 0,
|
|
1466
|
-
store:
|
|
1467
|
-
columnsCount:
|
|
1495
|
+
store: b(l),
|
|
1496
|
+
columnsCount: b(l).columns.length - a.value,
|
|
1468
1497
|
color: (f = m.gantt) == null ? void 0 : f.color,
|
|
1469
|
-
start: (
|
|
1470
|
-
end: (
|
|
1471
|
-
colspan:
|
|
1472
|
-
pinned:
|
|
1498
|
+
start: (d = m.gantt) == null ? void 0 : d.startIndex,
|
|
1499
|
+
end: (p = m.gantt) == null ? void 0 : p.endIndex,
|
|
1500
|
+
colspan: v.colspan,
|
|
1501
|
+
pinned: v.pinned,
|
|
1473
1502
|
rowIndex: w,
|
|
1474
|
-
colIndex:
|
|
1475
|
-
style:
|
|
1476
|
-
textAlign: (
|
|
1477
|
-
minWidth: (
|
|
1478
|
-
width:
|
|
1503
|
+
colIndex: v.originalIndex ?? x,
|
|
1504
|
+
style: Y({
|
|
1505
|
+
textAlign: (v == null ? void 0 : v.align) || "center",
|
|
1506
|
+
minWidth: (v == null ? void 0 : v.width) || "40ch",
|
|
1507
|
+
width: b(l).config.fullWidth ? "auto" : null
|
|
1479
1508
|
})
|
|
1480
|
-
}, null, 8, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (
|
|
1509
|
+
}, null, 8, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (S(), se(ve(v.cellComponent || "ACell"), {
|
|
1481
1510
|
key: 1,
|
|
1482
|
-
store:
|
|
1483
|
-
pinned:
|
|
1511
|
+
store: b(l),
|
|
1512
|
+
pinned: v.pinned,
|
|
1484
1513
|
rowIndex: w,
|
|
1485
|
-
colIndex:
|
|
1486
|
-
style:
|
|
1487
|
-
textAlign: (
|
|
1488
|
-
minWidth: (
|
|
1489
|
-
width:
|
|
1514
|
+
colIndex: x,
|
|
1515
|
+
style: Y({
|
|
1516
|
+
textAlign: (v == null ? void 0 : v.align) || "center",
|
|
1517
|
+
minWidth: (v == null ? void 0 : v.width) || "40ch",
|
|
1518
|
+
width: b(l).config.fullWidth ? "auto" : null
|
|
1490
1519
|
}),
|
|
1491
1520
|
spellcheck: "false"
|
|
1492
1521
|
}, null, 8, ["store", "pinned", "rowIndex", "colIndex", "style"]))
|
|
@@ -1497,46 +1526,46 @@ const cn = {
|
|
|
1497
1526
|
}, 1032, ["row", "rowIndex", "store"]))), 128))
|
|
1498
1527
|
], !0)
|
|
1499
1528
|
]),
|
|
1500
|
-
W(s.$slots, "footer", { data:
|
|
1501
|
-
W(s.$slots, "modal", { data:
|
|
1502
|
-
xe(Le(ot, { store:
|
|
1529
|
+
W(s.$slots, "footer", { data: b(l) }, void 0, !0),
|
|
1530
|
+
W(s.$slots, "modal", { data: b(l) }, () => [
|
|
1531
|
+
xe(Le(ot, { store: b(l) }, {
|
|
1503
1532
|
default: De(() => [
|
|
1504
|
-
(
|
|
1505
|
-
key: `${
|
|
1506
|
-
colIndex:
|
|
1507
|
-
rowIndex:
|
|
1508
|
-
store:
|
|
1509
|
-
},
|
|
1533
|
+
(S(), se(ve(b(l).modal.component), ke({
|
|
1534
|
+
key: `${b(l).modal.rowIndex}:${b(l).modal.colIndex}`,
|
|
1535
|
+
colIndex: b(l).modal.colIndex,
|
|
1536
|
+
rowIndex: b(l).modal.rowIndex,
|
|
1537
|
+
store: b(l)
|
|
1538
|
+
}, b(l).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
|
|
1510
1539
|
]),
|
|
1511
1540
|
_: 1
|
|
1512
1541
|
}, 8, ["store"]), [
|
|
1513
|
-
[qe,
|
|
1542
|
+
[qe, b(l).modal.visible]
|
|
1514
1543
|
])
|
|
1515
1544
|
], !0)
|
|
1516
1545
|
], 4)), [
|
|
1517
|
-
[
|
|
1546
|
+
[b(an), b(l).closeModal]
|
|
1518
1547
|
]);
|
|
1519
1548
|
}
|
|
1520
|
-
}), mn = /* @__PURE__ */ le(vn, [["__scopeId", "data-v-
|
|
1549
|
+
}), mn = /* @__PURE__ */ le(vn, [["__scopeId", "data-v-fcb81c06"]]), gn = {}, hn = { class: "aloading" }, pn = { class: "aloading-header" };
|
|
1521
1550
|
function wn(e, t) {
|
|
1522
|
-
return
|
|
1523
|
-
|
|
1551
|
+
return S(), R("div", hn, [
|
|
1552
|
+
L("h2", pn, [
|
|
1524
1553
|
W(e.$slots, "default", {}, void 0, !0)
|
|
1525
1554
|
]),
|
|
1526
|
-
t[0] || (t[0] =
|
|
1555
|
+
t[0] || (t[0] = L("div", { class: "aloading-bar" }, null, -1))
|
|
1527
1556
|
]);
|
|
1528
1557
|
}
|
|
1529
1558
|
const yn = /* @__PURE__ */ le(gn, [["render", wn], ["__scopeId", "data-v-a930a25b"]]), bn = {}, xn = { class: "aloading" }, Cn = { class: "aloading-header" };
|
|
1530
1559
|
function En(e, t) {
|
|
1531
|
-
return
|
|
1532
|
-
|
|
1560
|
+
return S(), R("div", xn, [
|
|
1561
|
+
L("h2", Cn, [
|
|
1533
1562
|
W(e.$slots, "default", {}, void 0, !0)
|
|
1534
1563
|
]),
|
|
1535
|
-
t[0] || (t[0] =
|
|
1564
|
+
t[0] || (t[0] = L("div", { class: "aloading-bar" }, null, -1))
|
|
1536
1565
|
]);
|
|
1537
1566
|
}
|
|
1538
1567
|
const In = /* @__PURE__ */ le(bn, [["render", En], ["__scopeId", "data-v-e1165876"]]);
|
|
1539
|
-
function
|
|
1568
|
+
function $n(e) {
|
|
1540
1569
|
e.component("ACell", Ut), e.component("AExpansionRow", Zt), e.component("AGanttCell", nn), e.component("ARow", _e), e.component("ATable", mn), e.component("ATableHeader", nt), e.component("ATableLoading", yn), e.component("ATableLoadingBar", In), e.component("ATableModal", ot);
|
|
1541
1570
|
}
|
|
1542
1571
|
export {
|
|
@@ -1550,6 +1579,6 @@ export {
|
|
|
1550
1579
|
In as ATableLoadingBar,
|
|
1551
1580
|
ot as ATableModal,
|
|
1552
1581
|
fn as createTableStore,
|
|
1553
|
-
|
|
1582
|
+
$n as install
|
|
1554
1583
|
};
|
|
1555
1584
|
//# sourceMappingURL=atable.js.map
|