@stonecrop/atable 0.11.9 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -52
- package/dist/assets/index.css +1 -1
- package/dist/atable.d.ts +83 -188
- package/dist/atable.js +1087 -1047
- package/dist/atable.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/schemaToColumns.d.ts +16 -0
- package/dist/src/schemaToColumns.d.ts.map +1 -0
- package/dist/src/schemaToColumns.js +20 -0
- package/dist/src/stores/table.d.ts +42 -42
- package/dist/src/stores/table.d.ts.map +1 -1
- package/dist/src/stores/table.js +10 -1
- package/dist/src/types/index.d.ts +27 -146
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/components/ATable.vue +15 -5
- package/src/components/ATableColumnFilter.vue +30 -8
- package/src/index.ts +1 -0
- package/src/schemaToColumns.ts +24 -0
- package/src/stores/table.ts +10 -1
- package/src/types/index.ts +28 -165
package/dist/atable.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { onMounted as He, ref as z, watch as ce, onBeforeUnmount as Bt, computed as
|
|
2
|
-
import { defineStore as
|
|
1
|
+
import { onMounted as He, ref as z, watch as ce, onBeforeUnmount as Bt, computed as A, shallowRef as ie, toValue as D, watchEffect as Pt, getCurrentScope as It, onScopeDispose as Et, getCurrentInstance as lt, unref as P, nextTick as at, isRef as Zt, toRefs as Nt, customRef as St, toRef as Wt, readonly as Ft, defineComponent as we, useTemplateRef as re, openBlock as x, createElementBlock as C, normalizeClass as oe, normalizeStyle as me, createBlock as ve, resolveDynamicComponent as We, mergeProps as st, toDisplayString as xe, Fragment as he, createElementVNode as W, renderSlot as fe, createCommentVNode as K, useCssVars as zt, onUnmounted as Xt, withModifiers as Se, withDirectives as de, renderList as ye, vShow as it, reactive as Gt, vModelText as Ne, vModelCheckbox as Yt, vModelSelect as Ut, createTextVNode as jt, useModel as wt, createVNode as pt, withCtx as xt, mergeModels as yt } from "vue";
|
|
2
|
+
import { defineStore as Jt } from "pinia";
|
|
3
3
|
import './assets/index.css';function At(e, t) {
|
|
4
4
|
return It() ? (Et(e, t), !0) : !1;
|
|
5
5
|
}
|
|
6
|
-
const
|
|
6
|
+
const qt = typeof window < "u" && typeof document < "u";
|
|
7
7
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
8
8
|
const Qt = (e) => e != null, Kt = Object.prototype.toString, _t = (e) => Kt.call(e) === "[object Object]", en = () => {
|
|
9
9
|
};
|
|
@@ -16,30 +16,30 @@ function tn(e, t, s) {
|
|
|
16
16
|
immediate: !0
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
const Le =
|
|
19
|
+
const Le = qt ? window : void 0;
|
|
20
20
|
function De(e) {
|
|
21
21
|
var t;
|
|
22
22
|
const s = D(e);
|
|
23
23
|
return (t = s?.$el) !== null && t !== void 0 ? t : s;
|
|
24
24
|
}
|
|
25
25
|
function Fe(...e) {
|
|
26
|
-
const t = (
|
|
27
|
-
const
|
|
28
|
-
return
|
|
26
|
+
const t = (a, u, i, o) => (a.addEventListener(u, i, o), () => a.removeEventListener(u, i, o)), s = A(() => {
|
|
27
|
+
const a = Ue(D(e[0])).filter((u) => u != null);
|
|
28
|
+
return a.every((u) => typeof u != "string") ? a : void 0;
|
|
29
29
|
});
|
|
30
30
|
return tn(() => {
|
|
31
|
-
var
|
|
31
|
+
var a, u;
|
|
32
32
|
return [
|
|
33
|
-
(
|
|
33
|
+
(a = (u = s.value) === null || u === void 0 ? void 0 : u.map((i) => De(i))) !== null && a !== void 0 ? a : [Le].filter((i) => i != null),
|
|
34
34
|
Ue(D(s.value ? e[1] : e[0])),
|
|
35
|
-
Ue(
|
|
35
|
+
Ue(P(s.value ? e[2] : e[1])),
|
|
36
36
|
D(s.value ? e[3] : e[2])
|
|
37
37
|
];
|
|
38
|
-
}, ([
|
|
39
|
-
if (!
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
}, ([a, u, i, o], d, n) => {
|
|
39
|
+
if (!a?.length || !u?.length || !i?.length) return;
|
|
40
|
+
const f = _t(o) ? { ...o } : o, r = a.flatMap((h) => u.flatMap((E) => i.map((O) => t(h, E, O, f))));
|
|
41
|
+
n(() => {
|
|
42
|
+
r.forEach((h) => h());
|
|
43
43
|
});
|
|
44
44
|
}, { flush: "post" });
|
|
45
45
|
}
|
|
@@ -53,104 +53,104 @@ function nn() {
|
|
|
53
53
|
// @__NO_SIDE_EFFECTS__
|
|
54
54
|
function on(e) {
|
|
55
55
|
const t = /* @__PURE__ */ nn();
|
|
56
|
-
return
|
|
56
|
+
return A(() => (t.value, !!e()));
|
|
57
57
|
}
|
|
58
58
|
function ln(e, t, s = {}) {
|
|
59
|
-
const { window:
|
|
60
|
-
let
|
|
61
|
-
const o = /* @__PURE__ */ on(() =>
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
const
|
|
65
|
-
return new Set(
|
|
66
|
-
}), (
|
|
67
|
-
|
|
59
|
+
const { window: a = Le, ...u } = s;
|
|
60
|
+
let i;
|
|
61
|
+
const o = /* @__PURE__ */ on(() => a && "MutationObserver" in a), d = () => {
|
|
62
|
+
i && (i.disconnect(), i = void 0);
|
|
63
|
+
}, n = ce(A(() => {
|
|
64
|
+
const h = Ue(D(e)).map(De).filter(Qt);
|
|
65
|
+
return new Set(h);
|
|
66
|
+
}), (h) => {
|
|
67
|
+
d(), o.value && h.size && (i = new MutationObserver(t), h.forEach((E) => i.observe(E, u)));
|
|
68
68
|
}, {
|
|
69
69
|
immediate: !0,
|
|
70
70
|
flush: "post"
|
|
71
|
-
}),
|
|
72
|
-
|
|
71
|
+
}), f = () => i?.takeRecords(), r = () => {
|
|
72
|
+
n(), d();
|
|
73
73
|
};
|
|
74
|
-
return At(
|
|
74
|
+
return At(r), {
|
|
75
75
|
isSupported: o,
|
|
76
|
-
stop:
|
|
77
|
-
takeRecords:
|
|
76
|
+
stop: r,
|
|
77
|
+
takeRecords: f
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
function an(e, t, s = {}) {
|
|
81
|
-
const { window:
|
|
82
|
-
if (!
|
|
81
|
+
const { window: a = Le, document: u = a?.document, flush: i = "sync" } = s;
|
|
82
|
+
if (!a || !u) return en;
|
|
83
83
|
let o;
|
|
84
|
-
const
|
|
85
|
-
o?.(), o =
|
|
86
|
-
},
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
const { stop:
|
|
90
|
-
E.map((
|
|
84
|
+
const d = (r) => {
|
|
85
|
+
o?.(), o = r;
|
|
86
|
+
}, n = Pt(() => {
|
|
87
|
+
const r = De(e);
|
|
88
|
+
if (r) {
|
|
89
|
+
const { stop: h } = ln(u, (E) => {
|
|
90
|
+
E.map((O) => [...O.removedNodes]).flat().some((O) => O === r || O.contains(r)) && t(E);
|
|
91
91
|
}, {
|
|
92
|
-
window:
|
|
92
|
+
window: a,
|
|
93
93
|
childList: !0,
|
|
94
94
|
subtree: !0
|
|
95
95
|
});
|
|
96
|
-
|
|
96
|
+
d(h);
|
|
97
97
|
}
|
|
98
|
-
}, { flush:
|
|
99
|
-
|
|
98
|
+
}, { flush: i }), f = () => {
|
|
99
|
+
n(), d();
|
|
100
100
|
};
|
|
101
|
-
return At(
|
|
101
|
+
return At(f), f;
|
|
102
102
|
}
|
|
103
103
|
// @__NO_SIDE_EFFECTS__
|
|
104
104
|
function sn(e = {}) {
|
|
105
105
|
var t;
|
|
106
|
-
const { window: s = Le, deep:
|
|
107
|
-
let
|
|
108
|
-
if (
|
|
109
|
-
for (var
|
|
110
|
-
return
|
|
111
|
-
},
|
|
112
|
-
|
|
106
|
+
const { window: s = Le, deep: a = !0, triggerOnRemoval: u = !1 } = e, i = (t = e.document) !== null && t !== void 0 ? t : s?.document, o = () => {
|
|
107
|
+
let f = i?.activeElement;
|
|
108
|
+
if (a)
|
|
109
|
+
for (var r; f?.shadowRoot; ) f = f == null || (r = f.shadowRoot) === null || r === void 0 ? void 0 : r.activeElement;
|
|
110
|
+
return f;
|
|
111
|
+
}, d = ie(), n = () => {
|
|
112
|
+
d.value = o();
|
|
113
113
|
};
|
|
114
114
|
if (s) {
|
|
115
|
-
const
|
|
115
|
+
const f = {
|
|
116
116
|
capture: !0,
|
|
117
117
|
passive: !0
|
|
118
118
|
};
|
|
119
|
-
Fe(s, "blur", (
|
|
120
|
-
|
|
121
|
-
},
|
|
119
|
+
Fe(s, "blur", (r) => {
|
|
120
|
+
r.relatedTarget === null && n();
|
|
121
|
+
}, f), Fe(s, "focus", n, f);
|
|
122
122
|
}
|
|
123
|
-
return
|
|
123
|
+
return u && an(d, n, { document: i }), n(), d;
|
|
124
124
|
}
|
|
125
125
|
const rn = "focusin", cn = "focusout", un = ":focus-within";
|
|
126
126
|
function dn(e, t = {}) {
|
|
127
|
-
const { window: s = Le } = t,
|
|
128
|
-
if (!s || !(/* @__PURE__ */ sn(t)).value) return { focused:
|
|
127
|
+
const { window: s = Le } = t, a = A(() => De(e)), u = ie(!1), i = A(() => u.value);
|
|
128
|
+
if (!s || !(/* @__PURE__ */ sn(t)).value) return { focused: i };
|
|
129
129
|
const o = { passive: !0 };
|
|
130
|
-
return Fe(
|
|
131
|
-
var
|
|
132
|
-
return
|
|
133
|
-
}, o), { focused:
|
|
130
|
+
return Fe(a, rn, () => u.value = !0, o), Fe(a, cn, () => {
|
|
131
|
+
var d, n, f;
|
|
132
|
+
return u.value = (d = (n = a.value) === null || n === void 0 || (f = n.matches) === null || f === void 0 ? void 0 : f.call(n, un)) !== null && d !== void 0 ? d : !1;
|
|
133
|
+
}, o), { focused: i };
|
|
134
134
|
}
|
|
135
135
|
function fn(e, { window: t = Le, scrollTarget: s } = {}) {
|
|
136
|
-
const
|
|
136
|
+
const a = z(!1), u = () => {
|
|
137
137
|
if (!t) return;
|
|
138
|
-
const
|
|
138
|
+
const i = t.document, o = De(e);
|
|
139
139
|
if (!o)
|
|
140
|
-
|
|
140
|
+
a.value = !1;
|
|
141
141
|
else {
|
|
142
|
-
const
|
|
143
|
-
|
|
142
|
+
const d = o.getBoundingClientRect();
|
|
143
|
+
a.value = d.top <= (t.innerHeight || i.documentElement.clientHeight) && d.left <= (t.innerWidth || i.documentElement.clientWidth) && d.bottom >= 0 && d.right >= 0;
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
return ce(
|
|
147
147
|
() => De(e),
|
|
148
|
-
() =>
|
|
148
|
+
() => u(),
|
|
149
149
|
{ immediate: !0, flush: "post" }
|
|
150
|
-
), t && Fe(s || t, "scroll",
|
|
150
|
+
), t && Fe(s || t, "scroll", u, {
|
|
151
151
|
capture: !1,
|
|
152
152
|
passive: !0
|
|
153
|
-
}),
|
|
153
|
+
}), a;
|
|
154
154
|
}
|
|
155
155
|
const be = (e) => {
|
|
156
156
|
let t = fn(e).value;
|
|
@@ -163,8 +163,8 @@ const be = (e) => {
|
|
|
163
163
|
if (e instanceof HTMLTableCellElement) {
|
|
164
164
|
const s = e.parentElement?.previousElementSibling;
|
|
165
165
|
if (s) {
|
|
166
|
-
const
|
|
167
|
-
|
|
166
|
+
const a = Array.from(s.children)[e.cellIndex];
|
|
167
|
+
a && (t = a);
|
|
168
168
|
}
|
|
169
169
|
} else if (e instanceof HTMLTableRowElement) {
|
|
170
170
|
const s = e.previousElementSibling;
|
|
@@ -175,16 +175,16 @@ const be = (e) => {
|
|
|
175
175
|
const t = e.target;
|
|
176
176
|
let s;
|
|
177
177
|
if (t instanceof HTMLTableCellElement) {
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
180
|
-
const
|
|
181
|
-
|
|
178
|
+
const a = t.parentElement?.parentElement;
|
|
179
|
+
if (a) {
|
|
180
|
+
const u = a.firstElementChild?.children[t.cellIndex];
|
|
181
|
+
u && (s = u);
|
|
182
182
|
}
|
|
183
183
|
} else if (t instanceof HTMLTableRowElement) {
|
|
184
|
-
const
|
|
185
|
-
if (
|
|
186
|
-
const
|
|
187
|
-
|
|
184
|
+
const a = t.parentElement;
|
|
185
|
+
if (a) {
|
|
186
|
+
const u = a.firstElementChild;
|
|
187
|
+
u && (s = u);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
return s && (!Ce(s) || !be(s)) ? ct(s) : s;
|
|
@@ -196,8 +196,8 @@ const be = (e) => {
|
|
|
196
196
|
if (e instanceof HTMLTableCellElement) {
|
|
197
197
|
const s = e.parentElement?.nextElementSibling;
|
|
198
198
|
if (s) {
|
|
199
|
-
const
|
|
200
|
-
|
|
199
|
+
const a = Array.from(s.children)[e.cellIndex];
|
|
200
|
+
a && (t = a);
|
|
201
201
|
}
|
|
202
202
|
} else if (e instanceof HTMLTableRowElement) {
|
|
203
203
|
const s = e.nextElementSibling;
|
|
@@ -208,16 +208,16 @@ const be = (e) => {
|
|
|
208
208
|
const t = e.target;
|
|
209
209
|
let s;
|
|
210
210
|
if (t instanceof HTMLTableCellElement) {
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
213
|
-
const
|
|
214
|
-
|
|
211
|
+
const a = t.parentElement?.parentElement;
|
|
212
|
+
if (a) {
|
|
213
|
+
const u = a.lastElementChild?.children[t.cellIndex];
|
|
214
|
+
u && (s = u);
|
|
215
215
|
}
|
|
216
216
|
} else if (t instanceof HTMLTableRowElement) {
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
const
|
|
220
|
-
|
|
217
|
+
const a = t.parentElement;
|
|
218
|
+
if (a) {
|
|
219
|
+
const u = a.lastElementChild;
|
|
220
|
+
u && (s = u);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
return s && (!Ce(s) || !be(s)) ? rt(s) : s;
|
|
@@ -310,65 +310,65 @@ const be = (e) => {
|
|
|
310
310
|
};
|
|
311
311
|
function ft(e) {
|
|
312
312
|
const t = (o) => {
|
|
313
|
-
let
|
|
314
|
-
return o.parent && (typeof o.parent == "string" ?
|
|
313
|
+
let d = null;
|
|
314
|
+
return o.parent && (typeof o.parent == "string" ? d = document.querySelector(o.parent) : o.parent instanceof HTMLElement ? d = o.parent : d = o.parent.value), d;
|
|
315
315
|
}, s = (o) => {
|
|
316
|
-
const
|
|
317
|
-
let
|
|
316
|
+
const d = t(o);
|
|
317
|
+
let n = [];
|
|
318
318
|
if (typeof o.selectors == "string")
|
|
319
|
-
|
|
319
|
+
n = Array.from(d ? d.querySelectorAll(o.selectors) : document.querySelectorAll(o.selectors));
|
|
320
320
|
else if (Array.isArray(o.selectors))
|
|
321
|
-
for (const
|
|
322
|
-
|
|
321
|
+
for (const f of o.selectors)
|
|
322
|
+
f instanceof HTMLElement ? n.push(f) : n.push(f.$el);
|
|
323
323
|
else if (o.selectors instanceof HTMLElement)
|
|
324
|
-
|
|
324
|
+
n.push(o.selectors);
|
|
325
325
|
else if (o.selectors?.value)
|
|
326
326
|
if (Array.isArray(o.selectors.value))
|
|
327
|
-
for (const
|
|
328
|
-
|
|
327
|
+
for (const f of o.selectors.value)
|
|
328
|
+
f instanceof HTMLElement ? n.push(f) : n.push(f.$el);
|
|
329
329
|
else
|
|
330
|
-
|
|
331
|
-
return
|
|
332
|
-
},
|
|
333
|
-
const
|
|
334
|
-
let
|
|
335
|
-
return o.selectors ?
|
|
336
|
-
},
|
|
337
|
-
const
|
|
338
|
-
if (Xe.includes(
|
|
339
|
-
const
|
|
340
|
-
for (const
|
|
341
|
-
const [
|
|
342
|
-
if (
|
|
343
|
-
const
|
|
344
|
-
const
|
|
345
|
-
return
|
|
330
|
+
n.push(o.selectors.value);
|
|
331
|
+
return n;
|
|
332
|
+
}, a = (o) => {
|
|
333
|
+
const d = t(o);
|
|
334
|
+
let n = [];
|
|
335
|
+
return o.selectors ? n = s(o) : d && (n = Array.from(d.children).filter((f) => Ce(f) && be(f))), n;
|
|
336
|
+
}, u = (o) => (d) => {
|
|
337
|
+
const n = gn[d.key] || d.key.toLowerCase();
|
|
338
|
+
if (Xe.includes(n)) return;
|
|
339
|
+
const f = o.handlers || Qe;
|
|
340
|
+
for (const r of Object.keys(f)) {
|
|
341
|
+
const [h, ...E] = r.split(".");
|
|
342
|
+
if (h === "keydown" && E.includes(n)) {
|
|
343
|
+
const O = f[r], Z = E.filter((v) => Xe.includes(v)), w = Xe.some((v) => {
|
|
344
|
+
const g = v.charAt(0).toUpperCase() + v.slice(1);
|
|
345
|
+
return d.getModifierState(g);
|
|
346
346
|
});
|
|
347
|
-
if (
|
|
348
|
-
if (
|
|
347
|
+
if (Z.length > 0) {
|
|
348
|
+
if (w) {
|
|
349
349
|
for (const v of Xe)
|
|
350
350
|
if (E.includes(v)) {
|
|
351
|
-
const
|
|
352
|
-
|
|
351
|
+
const g = v.charAt(0).toUpperCase() + v.slice(1);
|
|
352
|
+
d.getModifierState(g) && O(d);
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
} else
|
|
356
|
-
|
|
356
|
+
w || O(d);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
},
|
|
359
|
+
}, i = [];
|
|
360
360
|
He(() => {
|
|
361
361
|
for (const o of e) {
|
|
362
|
-
const
|
|
363
|
-
for (const
|
|
364
|
-
const { focused: E } = dn(z(
|
|
365
|
-
|
|
362
|
+
const d = t(o), n = a(o), f = u(o), r = d ? [d] : n;
|
|
363
|
+
for (const h of r) {
|
|
364
|
+
const { focused: E } = dn(z(h)), O = ce(E, (Z) => {
|
|
365
|
+
Z ? h.addEventListener("keydown", f) : h.removeEventListener("keydown", f);
|
|
366
366
|
});
|
|
367
|
-
|
|
367
|
+
i.push(O);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
}), Bt(() => {
|
|
371
|
-
for (const o of
|
|
371
|
+
for (const o of i)
|
|
372
372
|
o();
|
|
373
373
|
});
|
|
374
374
|
}
|
|
@@ -388,31 +388,31 @@ function xn(...e) {
|
|
|
388
388
|
}))) : z(t);
|
|
389
389
|
}
|
|
390
390
|
function yn(e, t) {
|
|
391
|
-
function s(...
|
|
392
|
-
return new Promise((
|
|
393
|
-
Promise.resolve(e(() => t.apply(this,
|
|
391
|
+
function s(...a) {
|
|
392
|
+
return new Promise((u, i) => {
|
|
393
|
+
Promise.resolve(e(() => t.apply(this, a), {
|
|
394
394
|
fn: t,
|
|
395
395
|
thisArg: this,
|
|
396
|
-
args:
|
|
397
|
-
})).then(
|
|
396
|
+
args: a
|
|
397
|
+
})).then(u).catch(i);
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
400
|
return s;
|
|
401
401
|
}
|
|
402
402
|
function bn(e, t = {}) {
|
|
403
|
-
let s,
|
|
404
|
-
const
|
|
405
|
-
clearTimeout(
|
|
403
|
+
let s, a, u = Ee;
|
|
404
|
+
const i = (n) => {
|
|
405
|
+
clearTimeout(n), u(), u = Ee;
|
|
406
406
|
};
|
|
407
407
|
let o;
|
|
408
|
-
return (
|
|
409
|
-
const
|
|
410
|
-
return s &&
|
|
411
|
-
|
|
412
|
-
s &&
|
|
413
|
-
},
|
|
414
|
-
|
|
415
|
-
},
|
|
408
|
+
return (n) => {
|
|
409
|
+
const f = D(e), r = D(t.maxWait);
|
|
410
|
+
return s && i(s), f <= 0 || r !== void 0 && r <= 0 ? (a && (i(a), a = void 0), Promise.resolve(n())) : new Promise((h, E) => {
|
|
411
|
+
u = t.rejectOnCancel ? E : h, o = n, r && !a && (a = setTimeout(() => {
|
|
412
|
+
s && i(s), a = void 0, h(o());
|
|
413
|
+
}, r)), s = setTimeout(() => {
|
|
414
|
+
a && i(a), a = void 0, h(n());
|
|
415
|
+
}, f);
|
|
416
416
|
});
|
|
417
417
|
};
|
|
418
418
|
}
|
|
@@ -429,23 +429,23 @@ function kn(e, t = 200, s = {}) {
|
|
|
429
429
|
function Mn(e, t = {}) {
|
|
430
430
|
if (!Zt(e)) return Nt(e);
|
|
431
431
|
const s = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
432
|
-
for (const
|
|
432
|
+
for (const a in e.value) s[a] = St(() => ({
|
|
433
433
|
get() {
|
|
434
|
-
return e.value[
|
|
434
|
+
return e.value[a];
|
|
435
435
|
},
|
|
436
|
-
set(
|
|
437
|
-
var
|
|
438
|
-
if (!((
|
|
436
|
+
set(u) {
|
|
437
|
+
var i;
|
|
438
|
+
if (!((i = D(t.replaceRef)) !== null && i !== void 0) || i) if (Array.isArray(e.value)) {
|
|
439
439
|
const o = [...e.value];
|
|
440
|
-
o[
|
|
440
|
+
o[a] = u, e.value = o;
|
|
441
441
|
} else {
|
|
442
442
|
const o = {
|
|
443
443
|
...e.value,
|
|
444
|
-
[
|
|
444
|
+
[a]: u
|
|
445
445
|
};
|
|
446
446
|
Object.setPrototypeOf(o, Object.getPrototypeOf(e.value)), e.value = o;
|
|
447
447
|
}
|
|
448
|
-
else e.value[
|
|
448
|
+
else e.value[a] = u;
|
|
449
449
|
}
|
|
450
450
|
}));
|
|
451
451
|
return s;
|
|
@@ -466,90 +466,90 @@ function ge(e) {
|
|
|
466
466
|
return (t = s?.$el) !== null && t !== void 0 ? t : s;
|
|
467
467
|
}
|
|
468
468
|
function Re(...e) {
|
|
469
|
-
const t = (
|
|
470
|
-
const
|
|
471
|
-
return
|
|
469
|
+
const t = (a, u, i, o) => (a.addEventListener(u, i, o), () => a.removeEventListener(u, i, o)), s = A(() => {
|
|
470
|
+
const a = je(D(e[0])).filter((u) => u != null);
|
|
471
|
+
return a.every((u) => typeof u != "string") ? a : void 0;
|
|
472
472
|
});
|
|
473
473
|
return $n(() => {
|
|
474
|
-
var
|
|
474
|
+
var a, u;
|
|
475
475
|
return [
|
|
476
|
-
(
|
|
476
|
+
(a = (u = s.value) === null || u === void 0 ? void 0 : u.map((i) => ge(i))) !== null && a !== void 0 ? a : [ze].filter((i) => i != null),
|
|
477
477
|
je(D(s.value ? e[1] : e[0])),
|
|
478
|
-
je(
|
|
478
|
+
je(P(s.value ? e[2] : e[1])),
|
|
479
479
|
D(s.value ? e[3] : e[2])
|
|
480
480
|
];
|
|
481
|
-
}, ([
|
|
482
|
-
if (!
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
|
|
481
|
+
}, ([a, u, i, o], d, n) => {
|
|
482
|
+
if (!a?.length || !u?.length || !i?.length) return;
|
|
483
|
+
const f = pn(o) ? { ...o } : o, r = a.flatMap((h) => u.flatMap((E) => i.map((O) => t(h, E, O, f))));
|
|
484
|
+
n(() => {
|
|
485
|
+
r.forEach((h) => h());
|
|
486
486
|
});
|
|
487
487
|
}, { flush: "post" });
|
|
488
488
|
}
|
|
489
489
|
function ot(e, t, s = {}) {
|
|
490
|
-
const { window:
|
|
491
|
-
if (!
|
|
490
|
+
const { window: a = ze, ignore: u = [], capture: i = !0, detectIframe: o = !1, controls: d = !1 } = s;
|
|
491
|
+
if (!a) return d ? {
|
|
492
492
|
stop: Ee,
|
|
493
493
|
cancel: Ee,
|
|
494
494
|
trigger: Ee
|
|
495
495
|
} : Ee;
|
|
496
|
-
let
|
|
497
|
-
const
|
|
498
|
-
if (typeof
|
|
496
|
+
let n = !0;
|
|
497
|
+
const f = (v) => D(u).some((g) => {
|
|
498
|
+
if (typeof g == "string") return Array.from(a.document.querySelectorAll(g)).some((p) => p === v.target || v.composedPath().includes(p));
|
|
499
499
|
{
|
|
500
|
-
const
|
|
501
|
-
return
|
|
500
|
+
const p = ge(g);
|
|
501
|
+
return p && (v.target === p || v.composedPath().includes(p));
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
|
-
function
|
|
505
|
-
const
|
|
506
|
-
return
|
|
504
|
+
function r(v) {
|
|
505
|
+
const g = D(v);
|
|
506
|
+
return g && g.$.subTree.shapeFlag === 16;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
const
|
|
510
|
-
return
|
|
508
|
+
function h(v, g) {
|
|
509
|
+
const p = D(v), y = p.$.subTree && p.$.subTree.children;
|
|
510
|
+
return y == null || !Array.isArray(y) ? !1 : y.some((M) => M.el === g.target || g.composedPath().includes(M.el));
|
|
511
511
|
}
|
|
512
512
|
const E = (v) => {
|
|
513
|
-
const
|
|
514
|
-
if (v.target != null && !(!(
|
|
515
|
-
if ("detail" in v && v.detail === 0 && (
|
|
516
|
-
|
|
513
|
+
const g = ge(e);
|
|
514
|
+
if (v.target != null && !(!(g instanceof Element) && r(e) && h(e, v)) && !(!g || g === v.target || v.composedPath().includes(g))) {
|
|
515
|
+
if ("detail" in v && v.detail === 0 && (n = !f(v)), !n) {
|
|
516
|
+
n = !0;
|
|
517
517
|
return;
|
|
518
518
|
}
|
|
519
519
|
t(v);
|
|
520
520
|
}
|
|
521
521
|
};
|
|
522
|
-
let
|
|
523
|
-
const
|
|
524
|
-
Re(
|
|
525
|
-
|
|
526
|
-
|
|
522
|
+
let O = !1;
|
|
523
|
+
const Z = [
|
|
524
|
+
Re(a, "click", (v) => {
|
|
525
|
+
O || (O = !0, setTimeout(() => {
|
|
526
|
+
O = !1;
|
|
527
527
|
}, 0), E(v));
|
|
528
528
|
}, {
|
|
529
529
|
passive: !0,
|
|
530
|
-
capture:
|
|
530
|
+
capture: i
|
|
531
531
|
}),
|
|
532
|
-
Re(
|
|
533
|
-
const
|
|
534
|
-
|
|
532
|
+
Re(a, "pointerdown", (v) => {
|
|
533
|
+
const g = ge(e);
|
|
534
|
+
n = !f(v) && !!(g && !v.composedPath().includes(g));
|
|
535
535
|
}, { passive: !0 }),
|
|
536
|
-
o && Re(
|
|
536
|
+
o && Re(a, "blur", (v) => {
|
|
537
537
|
setTimeout(() => {
|
|
538
|
-
var
|
|
539
|
-
const
|
|
540
|
-
((
|
|
538
|
+
var g;
|
|
539
|
+
const p = ge(e);
|
|
540
|
+
((g = a.document.activeElement) === null || g === void 0 ? void 0 : g.tagName) === "IFRAME" && !p?.contains(a.document.activeElement) && t(v);
|
|
541
541
|
}, 0);
|
|
542
542
|
}, { passive: !0 })
|
|
543
|
-
].filter(Boolean),
|
|
544
|
-
return
|
|
545
|
-
stop:
|
|
543
|
+
].filter(Boolean), w = () => Z.forEach((v) => v());
|
|
544
|
+
return d ? {
|
|
545
|
+
stop: w,
|
|
546
546
|
cancel: () => {
|
|
547
|
-
|
|
547
|
+
n = !1;
|
|
548
548
|
},
|
|
549
549
|
trigger: (v) => {
|
|
550
|
-
|
|
550
|
+
n = !0, E(v), n = !1;
|
|
551
551
|
}
|
|
552
|
-
} :
|
|
552
|
+
} : w;
|
|
553
553
|
}
|
|
554
554
|
// @__NO_SIDE_EFFECTS__
|
|
555
555
|
function In() {
|
|
@@ -561,28 +561,28 @@ function In() {
|
|
|
561
561
|
// @__NO_SIDE_EFFECTS__
|
|
562
562
|
function Dt(e) {
|
|
563
563
|
const t = /* @__PURE__ */ In();
|
|
564
|
-
return
|
|
564
|
+
return A(() => (t.value, !!e()));
|
|
565
565
|
}
|
|
566
566
|
function Ht(e, t, s = {}) {
|
|
567
|
-
const { window:
|
|
568
|
-
let
|
|
569
|
-
const o = /* @__PURE__ */ Dt(() =>
|
|
570
|
-
|
|
571
|
-
},
|
|
572
|
-
const
|
|
573
|
-
return new Set(
|
|
574
|
-
}), (
|
|
575
|
-
|
|
567
|
+
const { window: a = ze, ...u } = s;
|
|
568
|
+
let i;
|
|
569
|
+
const o = /* @__PURE__ */ Dt(() => a && "MutationObserver" in a), d = () => {
|
|
570
|
+
i && (i.disconnect(), i = void 0);
|
|
571
|
+
}, n = ce(A(() => {
|
|
572
|
+
const h = je(D(e)).map(ge).filter(mn);
|
|
573
|
+
return new Set(h);
|
|
574
|
+
}), (h) => {
|
|
575
|
+
d(), o.value && h.size && (i = new MutationObserver(t), h.forEach((E) => i.observe(E, u)));
|
|
576
576
|
}, {
|
|
577
577
|
immediate: !0,
|
|
578
578
|
flush: "post"
|
|
579
|
-
}),
|
|
580
|
-
|
|
579
|
+
}), f = () => i?.takeRecords(), r = () => {
|
|
580
|
+
n(), d();
|
|
581
581
|
};
|
|
582
|
-
return vt(
|
|
582
|
+
return vt(r), {
|
|
583
583
|
isSupported: o,
|
|
584
|
-
stop:
|
|
585
|
-
takeRecords:
|
|
584
|
+
stop: r,
|
|
585
|
+
takeRecords: f
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
588
|
const Ge = {
|
|
@@ -594,20 +594,20 @@ function En(e) {
|
|
|
594
594
|
e.scrollLeft > e.scrollWidth - e.clientWidth && (e.scrollLeft = Math.max(0, e.scrollWidth - e.clientWidth)), e.scrollTop > e.scrollHeight - e.clientHeight && (e.scrollTop = Math.max(0, e.scrollHeight - e.clientHeight));
|
|
595
595
|
}
|
|
596
596
|
function _e(e, t = {}) {
|
|
597
|
-
var s,
|
|
598
|
-
const { pointerTypes: o, preventDefault:
|
|
597
|
+
var s, a, u, i;
|
|
598
|
+
const { pointerTypes: o, preventDefault: d, stopPropagation: n, exact: f, onMove: r, onEnd: h, onStart: E, initialValue: O, axis: Z = "both", draggingElement: w = ze, containerElement: v, handle: g = e, buttons: p = [0], restrictInView: y, autoScroll: M = !1 } = t, T = z((s = D(O)) !== null && s !== void 0 ? s : {
|
|
599
599
|
x: 0,
|
|
600
600
|
y: 0
|
|
601
|
-
}),
|
|
602
|
-
D(
|
|
603
|
-
}, le = D(
|
|
604
|
-
speed: (
|
|
605
|
-
margin: (
|
|
606
|
-
direction: (
|
|
607
|
-
} : Ge,
|
|
608
|
-
const { clientWidth:
|
|
601
|
+
}), R = z(), H = (k) => o ? o.includes(k.pointerType) : !0, X = (k) => {
|
|
602
|
+
D(d) && k.preventDefault(), D(n) && k.stopPropagation();
|
|
603
|
+
}, le = D(M), j = typeof le == "object" ? {
|
|
604
|
+
speed: (a = D(le.speed)) !== null && a !== void 0 ? a : Ge.speed,
|
|
605
|
+
margin: (u = D(le.margin)) !== null && u !== void 0 ? u : Ge.margin,
|
|
606
|
+
direction: (i = le.direction) !== null && i !== void 0 ? i : Ge.direction
|
|
607
|
+
} : Ge, J = (k) => typeof k == "number" ? [k, k] : [k.x, k.y], ue = (k, L, F) => {
|
|
608
|
+
const { clientWidth: q, clientHeight: G, scrollLeft: te, scrollTop: pe, scrollWidth: Me, scrollHeight: S } = k, [V, U] = J(j.margin), [Y, Q] = J(j.speed);
|
|
609
609
|
let _ = 0, ne = 0;
|
|
610
|
-
(j.direction === "x" || j.direction === "both") && (F.x <
|
|
610
|
+
(j.direction === "x" || j.direction === "both") && (F.x < V && te > 0 ? _ = -Y : F.x + L.width > q - V && te < Me - q && (_ = Y)), (j.direction === "y" || j.direction === "both") && (F.y < U && pe > 0 ? ne = -Q : F.y + L.height > G - U && pe < S - G && (ne = Q)), (_ || ne) && k.scrollBy({
|
|
611
611
|
left: _,
|
|
612
612
|
top: ne,
|
|
613
613
|
behavior: "auto"
|
|
@@ -617,135 +617,135 @@ function _e(e, t = {}) {
|
|
|
617
617
|
const Ae = () => {
|
|
618
618
|
const k = D(v);
|
|
619
619
|
k && !ae && (ae = setInterval(() => {
|
|
620
|
-
const
|
|
620
|
+
const L = D(e).getBoundingClientRect(), { x: F, y: q } = T.value, G = {
|
|
621
621
|
x: F - k.scrollLeft,
|
|
622
|
-
y:
|
|
622
|
+
y: q - k.scrollTop
|
|
623
623
|
};
|
|
624
|
-
G.x >= 0 && G.y >= 0 && (ue(k,
|
|
624
|
+
G.x >= 0 && G.y >= 0 && (ue(k, L, G), G.x += k.scrollLeft, G.y += k.scrollTop, T.value = G);
|
|
625
625
|
}, 1e3 / 60));
|
|
626
626
|
}, ke = () => {
|
|
627
627
|
ae && (clearInterval(ae), ae = null);
|
|
628
|
-
}, Oe = (k,
|
|
629
|
-
const [G, te] = typeof F == "number" ? [F, F] : [F.x, F.y], { clientWidth: pe, clientHeight: Me } =
|
|
630
|
-
return k.x < G || k.x +
|
|
628
|
+
}, Oe = (k, L, F, q) => {
|
|
629
|
+
const [G, te] = typeof F == "number" ? [F, F] : [F.x, F.y], { clientWidth: pe, clientHeight: Me } = L;
|
|
630
|
+
return k.x < G || k.x + q.width > pe - G || k.y < te || k.y + q.height > Me - te;
|
|
631
631
|
}, Ve = () => {
|
|
632
|
-
if (D(t.disabled) || !
|
|
632
|
+
if (D(t.disabled) || !R.value) return;
|
|
633
633
|
const k = D(v);
|
|
634
634
|
if (!k) return;
|
|
635
|
-
const
|
|
635
|
+
const L = D(e).getBoundingClientRect(), { x: F, y: q } = T.value;
|
|
636
636
|
Oe({
|
|
637
637
|
x: F - k.scrollLeft,
|
|
638
|
-
y:
|
|
639
|
-
}, k, j.margin,
|
|
638
|
+
y: q - k.scrollTop
|
|
639
|
+
}, k, j.margin, L) ? Ae() : ke();
|
|
640
640
|
};
|
|
641
|
-
D(
|
|
641
|
+
D(M) && ce(T, Ve);
|
|
642
642
|
const Be = (k) => {
|
|
643
|
-
var
|
|
644
|
-
if (!D(
|
|
645
|
-
const F = D(v),
|
|
646
|
-
x: k.clientX - (F ? G.left -
|
|
647
|
-
y: k.clientY - (F ? G.top -
|
|
643
|
+
var L;
|
|
644
|
+
if (!D(p).includes(k.button) || D(t.disabled) || !H(k) || D(f) && k.target !== D(e)) return;
|
|
645
|
+
const F = D(v), q = F == null || (L = F.getBoundingClientRect) === null || L === void 0 ? void 0 : L.call(F), G = D(e).getBoundingClientRect(), te = {
|
|
646
|
+
x: k.clientX - (F ? G.left - q.left + (M ? 0 : F.scrollLeft) : G.left),
|
|
647
|
+
y: k.clientY - (F ? G.top - q.top + (M ? 0 : F.scrollTop) : G.top)
|
|
648
648
|
};
|
|
649
|
-
E?.(te, k) !== !1 && (
|
|
649
|
+
E?.(te, k) !== !1 && (R.value = te, X(k));
|
|
650
650
|
}, Te = (k) => {
|
|
651
|
-
if (D(t.disabled) || !
|
|
652
|
-
const
|
|
653
|
-
|
|
651
|
+
if (D(t.disabled) || !H(k) || !R.value) return;
|
|
652
|
+
const L = D(v);
|
|
653
|
+
L instanceof HTMLElement && En(L);
|
|
654
654
|
const F = D(e).getBoundingClientRect();
|
|
655
|
-
let { x:
|
|
656
|
-
if ((
|
|
657
|
-
x:
|
|
655
|
+
let { x: q, y: G } = T.value;
|
|
656
|
+
if ((Z === "x" || Z === "both") && (q = k.clientX - R.value.x, L && (q = Math.min(Math.max(0, q), L.scrollWidth - F.width))), (Z === "y" || Z === "both") && (G = k.clientY - R.value.y, L && (G = Math.min(Math.max(0, G), L.scrollHeight - F.height))), D(M) && L && (ae === null && ue(L, F, {
|
|
657
|
+
x: q,
|
|
658
658
|
y: G
|
|
659
|
-
}),
|
|
660
|
-
if (
|
|
661
|
-
const te =
|
|
662
|
-
te < 0 ?
|
|
659
|
+
}), q += L.scrollLeft, G += L.scrollTop), L && (y || M)) {
|
|
660
|
+
if (Z !== "y") {
|
|
661
|
+
const te = q - L.scrollLeft;
|
|
662
|
+
te < 0 ? q = L.scrollLeft : te > L.clientWidth - F.width && (q = L.clientWidth - F.width + L.scrollLeft);
|
|
663
663
|
}
|
|
664
|
-
if (
|
|
665
|
-
const te = G -
|
|
666
|
-
te < 0 ? G =
|
|
664
|
+
if (Z !== "x") {
|
|
665
|
+
const te = G - L.scrollTop;
|
|
666
|
+
te < 0 ? G = L.scrollTop : te > L.clientHeight - F.height && (G = L.clientHeight - F.height + L.scrollTop);
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
|
-
|
|
670
|
-
x:
|
|
669
|
+
T.value = {
|
|
670
|
+
x: q,
|
|
671
671
|
y: G
|
|
672
|
-
},
|
|
672
|
+
}, r?.(T.value, k), X(k);
|
|
673
673
|
}, Pe = (k) => {
|
|
674
|
-
D(t.disabled) || !
|
|
674
|
+
D(t.disabled) || !H(k) || R.value && (R.value = void 0, M && ke(), h?.(T.value, k), X(k));
|
|
675
675
|
};
|
|
676
676
|
if (Tt) {
|
|
677
677
|
const k = () => {
|
|
678
|
-
var
|
|
678
|
+
var L;
|
|
679
679
|
return {
|
|
680
|
-
capture: (
|
|
681
|
-
passive: !D(
|
|
680
|
+
capture: (L = t.capture) !== null && L !== void 0 ? L : !0,
|
|
681
|
+
passive: !D(d)
|
|
682
682
|
};
|
|
683
683
|
};
|
|
684
|
-
Re(
|
|
684
|
+
Re(g, "pointerdown", Be, k), Re(w, "pointermove", Te, k), Re(w, "pointerup", Pe, k);
|
|
685
685
|
}
|
|
686
686
|
return {
|
|
687
|
-
...Mn(
|
|
688
|
-
position:
|
|
689
|
-
isDragging:
|
|
690
|
-
style:
|
|
691
|
-
left: ${
|
|
692
|
-
top: ${
|
|
693
|
-
${
|
|
687
|
+
...Mn(T),
|
|
688
|
+
position: T,
|
|
689
|
+
isDragging: A(() => !!R.value),
|
|
690
|
+
style: A(() => `
|
|
691
|
+
left: ${T.value.x}px;
|
|
692
|
+
top: ${T.value.y}px;
|
|
693
|
+
${M ? "text-wrap: nowrap;" : ""}
|
|
694
694
|
`)
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
|
-
function
|
|
698
|
-
const { window:
|
|
699
|
-
let
|
|
700
|
-
const o = /* @__PURE__ */ Dt(() =>
|
|
701
|
-
|
|
702
|
-
},
|
|
703
|
-
const
|
|
704
|
-
return Array.isArray(
|
|
705
|
-
}), (
|
|
706
|
-
if (
|
|
707
|
-
|
|
708
|
-
for (const
|
|
697
|
+
function qe(e, t, s = {}) {
|
|
698
|
+
const { window: a = ze, ...u } = s;
|
|
699
|
+
let i;
|
|
700
|
+
const o = /* @__PURE__ */ Dt(() => a && "ResizeObserver" in a), d = () => {
|
|
701
|
+
i && (i.disconnect(), i = void 0);
|
|
702
|
+
}, n = ce(A(() => {
|
|
703
|
+
const r = D(e);
|
|
704
|
+
return Array.isArray(r) ? r.map((h) => ge(h)) : [ge(r)];
|
|
705
|
+
}), (r) => {
|
|
706
|
+
if (d(), o.value && a) {
|
|
707
|
+
i = new ResizeObserver(t);
|
|
708
|
+
for (const h of r) h && i.observe(h, u);
|
|
709
709
|
}
|
|
710
710
|
}, {
|
|
711
711
|
immediate: !0,
|
|
712
712
|
flush: "post"
|
|
713
|
-
}),
|
|
714
|
-
|
|
713
|
+
}), f = () => {
|
|
714
|
+
d(), n();
|
|
715
715
|
};
|
|
716
|
-
return vt(
|
|
716
|
+
return vt(f), {
|
|
717
717
|
isSupported: o,
|
|
718
|
-
stop:
|
|
718
|
+
stop: f
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
721
|
function Ie(e, t = {}) {
|
|
722
|
-
const { reset: s = !0, windowResize:
|
|
723
|
-
function
|
|
724
|
-
const
|
|
725
|
-
if (!
|
|
726
|
-
s && (
|
|
722
|
+
const { reset: s = !0, windowResize: a = !0, windowScroll: u = !0, immediate: i = !0, updateTiming: o = "sync" } = t, d = ie(0), n = ie(0), f = ie(0), r = ie(0), h = ie(0), E = ie(0), O = ie(0), Z = ie(0);
|
|
723
|
+
function w() {
|
|
724
|
+
const g = ge(e);
|
|
725
|
+
if (!g) {
|
|
726
|
+
s && (d.value = 0, n.value = 0, f.value = 0, r.value = 0, h.value = 0, E.value = 0, O.value = 0, Z.value = 0);
|
|
727
727
|
return;
|
|
728
728
|
}
|
|
729
|
-
const
|
|
730
|
-
|
|
729
|
+
const p = g.getBoundingClientRect();
|
|
730
|
+
d.value = p.height, n.value = p.bottom, f.value = p.left, r.value = p.right, h.value = p.top, E.value = p.width, O.value = p.x, Z.value = p.y;
|
|
731
731
|
}
|
|
732
732
|
function v() {
|
|
733
|
-
o === "sync" ?
|
|
733
|
+
o === "sync" ? w() : o === "next-frame" && requestAnimationFrame(() => w());
|
|
734
734
|
}
|
|
735
|
-
return
|
|
735
|
+
return qe(e, v), ce(() => ge(e), (g) => !g && v()), Ht(e, v, { attributeFilter: ["style", "class"] }), u && Re("scroll", v, {
|
|
736
736
|
capture: !0,
|
|
737
737
|
passive: !0
|
|
738
|
-
}),
|
|
739
|
-
|
|
738
|
+
}), a && Re("resize", v, { passive: !0 }), Rn(() => {
|
|
739
|
+
i && v();
|
|
740
740
|
}), {
|
|
741
|
-
height:
|
|
742
|
-
bottom:
|
|
743
|
-
left:
|
|
744
|
-
right:
|
|
745
|
-
top:
|
|
741
|
+
height: d,
|
|
742
|
+
bottom: n,
|
|
743
|
+
left: f,
|
|
744
|
+
right: r,
|
|
745
|
+
top: h,
|
|
746
746
|
width: E,
|
|
747
|
-
x:
|
|
748
|
-
y:
|
|
747
|
+
x: O,
|
|
748
|
+
y: Z,
|
|
749
749
|
update: v
|
|
750
750
|
};
|
|
751
751
|
}
|
|
@@ -755,28 +755,28 @@ function et(e) {
|
|
|
755
755
|
const tt = /* @__PURE__ */ new WeakMap();
|
|
756
756
|
function Sn(e, t = !1) {
|
|
757
757
|
const s = ie(t);
|
|
758
|
-
let
|
|
758
|
+
let a = "";
|
|
759
759
|
ce(xn(e), (o) => {
|
|
760
|
-
const
|
|
761
|
-
if (
|
|
762
|
-
const
|
|
763
|
-
if (tt.get(
|
|
764
|
-
if (s.value) return
|
|
760
|
+
const d = et(D(o));
|
|
761
|
+
if (d) {
|
|
762
|
+
const n = d;
|
|
763
|
+
if (tt.get(n) || tt.set(n, n.style.overflow), n.style.overflow !== "hidden" && (a = n.style.overflow), n.style.overflow === "hidden") return s.value = !0;
|
|
764
|
+
if (s.value) return n.style.overflow = "hidden";
|
|
765
765
|
}
|
|
766
766
|
}, { immediate: !0 });
|
|
767
|
-
const
|
|
767
|
+
const u = () => {
|
|
768
768
|
const o = et(D(e));
|
|
769
769
|
!o || s.value || (o.style.overflow = "hidden", s.value = !0);
|
|
770
|
-
},
|
|
770
|
+
}, i = () => {
|
|
771
771
|
const o = et(D(e));
|
|
772
|
-
!o || !s.value || (o.style.overflow =
|
|
772
|
+
!o || !s.value || (o.style.overflow = a, tt.delete(o), s.value = !1);
|
|
773
773
|
};
|
|
774
|
-
return vt(
|
|
774
|
+
return vt(i), A({
|
|
775
775
|
get() {
|
|
776
776
|
return s.value;
|
|
777
777
|
},
|
|
778
778
|
set(o) {
|
|
779
|
-
o ?
|
|
779
|
+
o ? u() : i();
|
|
780
780
|
}
|
|
781
781
|
});
|
|
782
782
|
}
|
|
@@ -795,119 +795,119 @@ const An = (e) => {
|
|
|
795
795
|
debounce: { default: 300 }
|
|
796
796
|
},
|
|
797
797
|
setup(e, { expose: t }) {
|
|
798
|
-
const s = re("cell"),
|
|
799
|
-
textAlign:
|
|
800
|
-
width:
|
|
801
|
-
fontWeight:
|
|
798
|
+
const s = re("cell"), a = e.store.getCellData(e.colIndex, e.rowIndex), u = z(""), i = z(!1), o = e.store.columns[e.colIndex], d = e.store.rows[e.rowIndex], n = o.align || "center", f = o.width || "40ch", r = A(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), h = A(() => typeof r.value == "string" ? An(r.value) : !1), E = A(() => ({
|
|
799
|
+
textAlign: n,
|
|
800
|
+
width: f,
|
|
801
|
+
fontWeight: i.value ? "bold" : "inherit",
|
|
802
802
|
paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
|
|
803
|
-
})),
|
|
803
|
+
})), O = A(() => ({
|
|
804
804
|
"sticky-column": e.pinned,
|
|
805
|
-
"cell-modified":
|
|
806
|
-
})),
|
|
807
|
-
v(),
|
|
808
|
-
},
|
|
809
|
-
const { left:
|
|
805
|
+
"cell-modified": i.value
|
|
806
|
+
})), Z = () => {
|
|
807
|
+
v(), w();
|
|
808
|
+
}, w = () => {
|
|
809
|
+
const { left: R, bottom: H, width: X, height: le } = Ie(s);
|
|
810
810
|
o.mask, o.modalComponent && e.store.$patch((j) => {
|
|
811
|
-
j.modal.visible = !0, j.modal.colIndex = e.colIndex, j.modal.rowIndex = e.rowIndex, j.modal.left =
|
|
811
|
+
j.modal.visible = !0, j.modal.colIndex = e.colIndex, j.modal.rowIndex = e.rowIndex, j.modal.left = R, j.modal.bottom = H, j.modal.width = X, j.modal.height = le, j.modal.cell = s.value, typeof o.modalComponent == "function" ? j.modal.component = o.modalComponent({ table: j.table, row: d, column: o }) : j.modal.component = o.modalComponent, j.modal.componentProps = o.modalComponentExtraProps;
|
|
812
812
|
});
|
|
813
813
|
};
|
|
814
814
|
if (e.addNavigation) {
|
|
815
|
-
let
|
|
815
|
+
let R = {
|
|
816
816
|
...Qe,
|
|
817
|
-
"keydown.f2":
|
|
818
|
-
"keydown.alt.up":
|
|
819
|
-
"keydown.alt.down":
|
|
820
|
-
"keydown.alt.left":
|
|
821
|
-
"keydown.alt.right":
|
|
817
|
+
"keydown.f2": w,
|
|
818
|
+
"keydown.alt.up": w,
|
|
819
|
+
"keydown.alt.down": w,
|
|
820
|
+
"keydown.alt.left": w,
|
|
821
|
+
"keydown.alt.right": w
|
|
822
822
|
};
|
|
823
|
-
typeof e.addNavigation == "object" && (
|
|
824
|
-
...
|
|
823
|
+
typeof e.addNavigation == "object" && (R = {
|
|
824
|
+
...R,
|
|
825
825
|
...e.addNavigation
|
|
826
826
|
}), ft([
|
|
827
827
|
{
|
|
828
828
|
selectors: s,
|
|
829
|
-
handlers:
|
|
829
|
+
handlers: R
|
|
830
830
|
}
|
|
831
831
|
]);
|
|
832
832
|
}
|
|
833
833
|
const v = () => {
|
|
834
834
|
if (s.value && o.edit) {
|
|
835
|
-
const
|
|
836
|
-
if (
|
|
835
|
+
const R = window.getSelection();
|
|
836
|
+
if (R)
|
|
837
837
|
try {
|
|
838
|
-
const
|
|
839
|
-
|
|
838
|
+
const H = document.createRange();
|
|
839
|
+
H.selectNodeContents && (H.selectNodeContents(s.value), R.removeAllRanges(), R.addRange(H));
|
|
840
840
|
} catch {
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
|
-
}, h = () => {
|
|
844
|
-
s.value && (d.value = s.value.textContent, v());
|
|
845
843
|
}, g = () => {
|
|
844
|
+
s.value && (u.value = s.value.textContent, v());
|
|
845
|
+
}, p = () => {
|
|
846
846
|
try {
|
|
847
|
-
const
|
|
848
|
-
if (
|
|
849
|
-
const
|
|
847
|
+
const R = window.getSelection();
|
|
848
|
+
if (R && R.rangeCount > 0 && s.value) {
|
|
849
|
+
const H = R.getRangeAt(0), X = H.cloneRange();
|
|
850
850
|
if (X.selectNodeContents && X.setEnd)
|
|
851
|
-
return X.selectNodeContents(s.value), X.setEnd(
|
|
851
|
+
return X.selectNodeContents(s.value), X.setEnd(H.endContainer, H.endOffset), X.toString().length;
|
|
852
852
|
}
|
|
853
853
|
} catch {
|
|
854
854
|
}
|
|
855
855
|
return 0;
|
|
856
|
-
},
|
|
856
|
+
}, y = (R) => {
|
|
857
857
|
if (s.value)
|
|
858
858
|
try {
|
|
859
|
-
const
|
|
860
|
-
if (!
|
|
859
|
+
const H = window.getSelection();
|
|
860
|
+
if (!H) return;
|
|
861
861
|
let X = 0;
|
|
862
862
|
const le = document.createTreeWalker ? document.createTreeWalker(s.value, NodeFilter.SHOW_TEXT, null) : null;
|
|
863
863
|
if (!le) return;
|
|
864
|
-
let j,
|
|
864
|
+
let j, J = null;
|
|
865
865
|
for (; j = le.nextNode(); ) {
|
|
866
866
|
const ue = j, ae = X + ue.textContent.length;
|
|
867
|
-
if (
|
|
868
|
-
|
|
867
|
+
if (R <= ae && (J = document.createRange(), J.setStart && J.setEnd)) {
|
|
868
|
+
J.setStart(ue, R - X), J.setEnd(ue, R - X);
|
|
869
869
|
break;
|
|
870
870
|
}
|
|
871
871
|
X = ae;
|
|
872
872
|
}
|
|
873
|
-
|
|
873
|
+
J && H.removeAllRanges && H.addRange && (H.removeAllRanges(), H.addRange(J));
|
|
874
874
|
} catch {
|
|
875
875
|
}
|
|
876
|
-
},
|
|
876
|
+
}, M = (R) => {
|
|
877
877
|
if (!o.edit) return;
|
|
878
|
-
const
|
|
879
|
-
if (
|
|
878
|
+
const H = R.target;
|
|
879
|
+
if (H.textContent === u.value)
|
|
880
880
|
return;
|
|
881
|
-
const X =
|
|
882
|
-
|
|
883
|
-
|
|
881
|
+
const X = p();
|
|
882
|
+
u.value = H.textContent, o.format ? (i.value = H.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, a), e.store.setCellText(e.colIndex, e.rowIndex, H.textContent)) : (i.value = H.textContent !== a, e.store.setCellData(e.colIndex, e.rowIndex, H.textContent)), at().then(() => {
|
|
883
|
+
y(X);
|
|
884
884
|
});
|
|
885
|
-
},
|
|
885
|
+
}, T = /* @__PURE__ */ kn(M, e.debounce);
|
|
886
886
|
return t({
|
|
887
|
-
currentData:
|
|
888
|
-
}), (
|
|
887
|
+
currentData: u
|
|
888
|
+
}), (R, H) => (x(), C("td", {
|
|
889
889
|
ref: "cell",
|
|
890
890
|
"data-colindex": e.colIndex,
|
|
891
891
|
"data-rowindex": e.rowIndex,
|
|
892
|
-
"data-editable":
|
|
893
|
-
contenteditable:
|
|
892
|
+
"data-editable": P(o).edit,
|
|
893
|
+
contenteditable: P(o).edit,
|
|
894
894
|
tabindex: e.tabIndex,
|
|
895
895
|
spellcheck: !1,
|
|
896
896
|
style: me(E.value),
|
|
897
|
-
class: oe(["atable-cell",
|
|
898
|
-
onFocus:
|
|
899
|
-
onPaste:
|
|
900
|
-
onInput:
|
|
901
|
-
(...X) =>
|
|
902
|
-
onClick:
|
|
897
|
+
class: oe(["atable-cell", O.value]),
|
|
898
|
+
onFocus: g,
|
|
899
|
+
onPaste: M,
|
|
900
|
+
onInput: H[0] || (H[0] = //@ts-ignore
|
|
901
|
+
(...X) => P(T) && P(T)(...X)),
|
|
902
|
+
onClick: Z
|
|
903
903
|
}, [
|
|
904
|
-
|
|
904
|
+
P(o).cellComponent ? (x(), ve(We(P(o).cellComponent), st({
|
|
905
905
|
key: 0,
|
|
906
|
-
value:
|
|
907
|
-
},
|
|
906
|
+
value: r.value
|
|
907
|
+
}, P(o).cellComponentProps), null, 16, ["value"])) : h.value ? (x(), C("span", {
|
|
908
908
|
key: 1,
|
|
909
|
-
innerHTML:
|
|
910
|
-
}, null, 8, Hn)) : (
|
|
909
|
+
innerHTML: r.value
|
|
910
|
+
}, null, 8, Hn)) : (x(), C("span", Ln, xe(r.value), 1))
|
|
911
911
|
], 46, Dn));
|
|
912
912
|
}
|
|
913
913
|
}), Vn = ["tabindex"], Bn = ["tabindex"], Pn = ["colspan"], Zn = /* @__PURE__ */ we({
|
|
@@ -919,22 +919,22 @@ const An = (e) => {
|
|
|
919
919
|
addNavigation: { type: [Boolean, Object], default: () => Qe }
|
|
920
920
|
},
|
|
921
921
|
setup(e) {
|
|
922
|
-
const t = re("rowEl"), s =
|
|
922
|
+
const t = re("rowEl"), s = A(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
|
|
923
923
|
if (e.addNavigation) {
|
|
924
|
-
const
|
|
925
|
-
"keydown.control.g": (
|
|
926
|
-
|
|
924
|
+
const a = {
|
|
925
|
+
"keydown.control.g": (u) => {
|
|
926
|
+
u.stopPropagation(), u.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
|
|
927
927
|
}
|
|
928
928
|
};
|
|
929
|
-
typeof e.addNavigation == "object" && Object.assign(
|
|
929
|
+
typeof e.addNavigation == "object" && Object.assign(a, e.addNavigation), ft([
|
|
930
930
|
{
|
|
931
931
|
selectors: t,
|
|
932
|
-
handlers:
|
|
932
|
+
handlers: a
|
|
933
933
|
}
|
|
934
934
|
]);
|
|
935
935
|
}
|
|
936
|
-
return (
|
|
937
|
-
W("tr", st(
|
|
936
|
+
return (a, u) => (x(), C(he, null, [
|
|
937
|
+
W("tr", st(a.$attrs, {
|
|
938
938
|
ref: "rowEl",
|
|
939
939
|
tabindex: e.tabIndex,
|
|
940
940
|
class: "expandable-row"
|
|
@@ -942,11 +942,11 @@ const An = (e) => {
|
|
|
942
942
|
W("td", {
|
|
943
943
|
tabIndex: -1,
|
|
944
944
|
class: "row-index",
|
|
945
|
-
onClick:
|
|
945
|
+
onClick: u[0] || (u[0] = (i) => e.store.toggleRowExpand(e.rowIndex))
|
|
946
946
|
}, xe(s.value), 1),
|
|
947
|
-
fe(
|
|
947
|
+
fe(a.$slots, "row", {}, void 0, !0)
|
|
948
948
|
], 16, Vn),
|
|
949
|
-
e.store.display[e.rowIndex].expanded ? (
|
|
949
|
+
e.store.display[e.rowIndex].expanded ? (x(), C("tr", {
|
|
950
950
|
key: 0,
|
|
951
951
|
ref: "rowExpanded",
|
|
952
952
|
tabindex: e.tabIndex,
|
|
@@ -957,15 +957,15 @@ const An = (e) => {
|
|
|
957
957
|
colspan: e.store.columns.length + 1,
|
|
958
958
|
class: "expanded-row-content"
|
|
959
959
|
}, [
|
|
960
|
-
fe(
|
|
960
|
+
fe(a.$slots, "content", {}, void 0, !0)
|
|
961
961
|
], 8, Pn)
|
|
962
962
|
], 8, Bn)) : K("", !0)
|
|
963
963
|
], 64));
|
|
964
964
|
}
|
|
965
965
|
}), $e = (e, t) => {
|
|
966
966
|
const s = e.__vccOpts || e;
|
|
967
|
-
for (const [
|
|
968
|
-
s[
|
|
967
|
+
for (const [a, u] of t)
|
|
968
|
+
s[a] = u;
|
|
969
969
|
return s;
|
|
970
970
|
}, Nn = /* @__PURE__ */ $e(Zn, [["__scopeId", "data-v-a42297c7"]]), Wn = ["colspan"], Fn = {
|
|
971
971
|
ref: "container",
|
|
@@ -989,17 +989,17 @@ const An = (e) => {
|
|
|
989
989
|
emits: ["connection:create"],
|
|
990
990
|
setup(e, { expose: t, emit: s }) {
|
|
991
991
|
zt((S) => ({
|
|
992
|
-
v737862e7:
|
|
992
|
+
v737862e7: u.value,
|
|
993
993
|
v05f25613: S.colspan
|
|
994
994
|
}));
|
|
995
|
-
const
|
|
996
|
-
const S =
|
|
995
|
+
const a = s, u = z(e.color.length >= 6 ? e.color : "#cccccc"), i = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, o = re("container"), d = re("bar"), n = re("leftResizeHandle"), f = re("rightResizeHandle"), r = re("leftConnectionHandle"), h = re("rightConnectionHandle"), { width: E } = Ie(o), { left: O, right: Z } = Ie(d), w = z(e.start), v = z(e.end || w.value + e.colspan), g = z(!1), p = z(!1), y = z(!1), M = z(!1), T = z(!1), R = z({ startX: 0, startY: 0, endX: 0, endY: 0 }), H = A(() => Ae.value || ue.value || ae.value), X = A(() => e.colspan > 0 ? E.value / e.colspan : 0), le = A(() => {
|
|
996
|
+
const S = w.value / e.colspan * 100, V = v.value / e.colspan * 100;
|
|
997
997
|
return {
|
|
998
998
|
left: `${S}%`,
|
|
999
|
-
width: `${
|
|
1000
|
-
backgroundColor:
|
|
999
|
+
width: `${V - S}%`,
|
|
1000
|
+
backgroundColor: u.value
|
|
1001
1001
|
};
|
|
1002
|
-
}), j =
|
|
1002
|
+
}), j = A(
|
|
1003
1003
|
() => ({
|
|
1004
1004
|
position: "fixed",
|
|
1005
1005
|
top: 0,
|
|
@@ -1009,40 +1009,40 @@ const An = (e) => {
|
|
|
1009
1009
|
pointerEvents: "none",
|
|
1010
1010
|
zIndex: 1e3
|
|
1011
1011
|
})
|
|
1012
|
-
),
|
|
1012
|
+
), J = z({ startX: 0, startPos: 0 }), { isDragging: ue } = _e(n, {
|
|
1013
1013
|
axis: "x",
|
|
1014
|
-
onStart: () => ke(
|
|
1014
|
+
onStart: () => ke(O.value, w.value),
|
|
1015
1015
|
onMove: ({ x: S }) => Oe(S),
|
|
1016
1016
|
onEnd: ({ x: S }) => Ve(S)
|
|
1017
|
-
}), { isDragging: ae } = _e(
|
|
1017
|
+
}), { isDragging: ae } = _e(f, {
|
|
1018
1018
|
axis: "x",
|
|
1019
|
-
onStart: () => ke(
|
|
1019
|
+
onStart: () => ke(Z.value, v.value),
|
|
1020
1020
|
onMove: ({ x: S }) => Be(S),
|
|
1021
1021
|
onEnd: ({ x: S }) => Te(S)
|
|
1022
|
-
}), { isDragging: Ae } = _e(
|
|
1022
|
+
}), { isDragging: Ae } = _e(d, {
|
|
1023
1023
|
exact: !0,
|
|
1024
1024
|
axis: "x",
|
|
1025
|
-
onStart: () => ke(
|
|
1025
|
+
onStart: () => ke(O.value, w.value),
|
|
1026
1026
|
onMove: ({ x: S }) => Pe(S),
|
|
1027
1027
|
onEnd: ({ x: S }) => k(S)
|
|
1028
1028
|
});
|
|
1029
1029
|
He(() => {
|
|
1030
|
-
|
|
1030
|
+
L();
|
|
1031
1031
|
}), Xt(() => {
|
|
1032
1032
|
F();
|
|
1033
1033
|
});
|
|
1034
|
-
function ke(S,
|
|
1035
|
-
|
|
1034
|
+
function ke(S, V) {
|
|
1035
|
+
d.value && (d.value.style.transition = "none"), J.value = { startX: S, startPos: V };
|
|
1036
1036
|
}
|
|
1037
1037
|
function Oe(S) {
|
|
1038
|
-
if (!ue.value || !
|
|
1039
|
-
const U = (S -
|
|
1040
|
-
|
|
1038
|
+
if (!ue.value || !d.value) return;
|
|
1039
|
+
const U = (S - J.value.startX) / X.value, Y = Math.max(0, Math.min(v.value - 1, J.value.startPos + U));
|
|
1040
|
+
d.value.style.left = `${Y / e.colspan * 100}%`, d.value.style.width = `${(v.value - Y) / e.colspan * 100}%`;
|
|
1041
1041
|
}
|
|
1042
1042
|
function Ve(S) {
|
|
1043
|
-
if (!
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1043
|
+
if (!d.value) return;
|
|
1044
|
+
const V = S - J.value.startX, U = Math.round(V / X.value), Y = w.value, Q = Math.max(0, Math.min(v.value - 1, J.value.startPos + U));
|
|
1045
|
+
w.value = Q, e.store.updateGanttBar({
|
|
1046
1046
|
rowIndex: e.rowIndex,
|
|
1047
1047
|
colIndex: e.colIndex,
|
|
1048
1048
|
type: "resize",
|
|
@@ -1056,13 +1056,13 @@ const An = (e) => {
|
|
|
1056
1056
|
});
|
|
1057
1057
|
}
|
|
1058
1058
|
function Be(S) {
|
|
1059
|
-
if (!ae.value || !
|
|
1060
|
-
const U = (S -
|
|
1061
|
-
|
|
1059
|
+
if (!ae.value || !d.value) return;
|
|
1060
|
+
const U = (S - J.value.startX) / X.value, Y = Math.max(w.value + 1, Math.min(e.columnsCount, J.value.startPos + U));
|
|
1061
|
+
d.value.style.width = `${(Y - w.value) / e.colspan * 100}%`;
|
|
1062
1062
|
}
|
|
1063
1063
|
function Te(S) {
|
|
1064
|
-
if (!
|
|
1065
|
-
const
|
|
1064
|
+
if (!d.value) return;
|
|
1065
|
+
const V = S - J.value.startX, U = Math.round(V / X.value), Y = v.value, Q = Math.max(w.value + 1, Math.min(e.columnsCount, J.value.startPos + U));
|
|
1066
1066
|
v.value = Q, e.store.updateGanttBar({
|
|
1067
1067
|
rowIndex: e.rowIndex,
|
|
1068
1068
|
colIndex: e.colIndex,
|
|
@@ -1070,22 +1070,22 @@ const An = (e) => {
|
|
|
1070
1070
|
edge: "end",
|
|
1071
1071
|
oldEnd: Y,
|
|
1072
1072
|
newEnd: Q,
|
|
1073
|
-
start:
|
|
1073
|
+
start: w.value,
|
|
1074
1074
|
delta: U,
|
|
1075
|
-
oldColspan: Y -
|
|
1076
|
-
newColspan: Q -
|
|
1075
|
+
oldColspan: Y - w.value,
|
|
1076
|
+
newColspan: Q - w.value
|
|
1077
1077
|
});
|
|
1078
1078
|
}
|
|
1079
1079
|
function Pe(S) {
|
|
1080
|
-
if (!Ae.value || !
|
|
1081
|
-
const U = (S -
|
|
1082
|
-
|
|
1080
|
+
if (!Ae.value || !d.value) return;
|
|
1081
|
+
const U = (S - J.value.startX) / X.value, Y = v.value - w.value, Q = Math.max(0, Math.min(J.value.startPos + U, e.columnsCount - Y));
|
|
1082
|
+
d.value.style.left = `${Q / e.colspan * 100}%`;
|
|
1083
1083
|
}
|
|
1084
1084
|
function k(S) {
|
|
1085
|
-
if (!
|
|
1086
|
-
const
|
|
1087
|
-
let ne =
|
|
1088
|
-
ne < 0 ? (ne = 0, se = Y) : se > e.columnsCount && (se = e.columnsCount, ne = se - Y),
|
|
1085
|
+
if (!d.value) return;
|
|
1086
|
+
const V = S - J.value.startX, U = Math.round(V / X.value), Y = v.value - w.value, Q = w.value, _ = v.value;
|
|
1087
|
+
let ne = J.value.startPos + U, se = ne + Y;
|
|
1088
|
+
ne < 0 ? (ne = 0, se = Y) : se > e.columnsCount && (se = e.columnsCount, ne = se - Y), w.value = ne, v.value = se, e.store.updateGanttBar({
|
|
1089
1089
|
rowIndex: e.rowIndex,
|
|
1090
1090
|
colIndex: e.colIndex,
|
|
1091
1091
|
type: "bar",
|
|
@@ -1097,85 +1097,85 @@ const An = (e) => {
|
|
|
1097
1097
|
colspan: se - ne
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1101
|
-
const { x: S, y:
|
|
1100
|
+
function L() {
|
|
1101
|
+
const { x: S, y: V } = Ie(d), { x: U, y: Y } = Ie(r), { x: Q, y: _ } = Ie(h);
|
|
1102
1102
|
e.store.registerGanttBar({
|
|
1103
|
-
id:
|
|
1103
|
+
id: i,
|
|
1104
1104
|
rowIndex: e.rowIndex,
|
|
1105
1105
|
colIndex: e.colIndex,
|
|
1106
|
-
startIndex:
|
|
1106
|
+
startIndex: w,
|
|
1107
1107
|
endIndex: v,
|
|
1108
|
-
color:
|
|
1108
|
+
color: u,
|
|
1109
1109
|
label: e.label,
|
|
1110
|
-
position: { x: S, y:
|
|
1110
|
+
position: { x: S, y: V }
|
|
1111
1111
|
}), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
|
|
1112
|
-
id: `${
|
|
1112
|
+
id: `${i}-connection-left`,
|
|
1113
1113
|
rowIndex: e.rowIndex,
|
|
1114
1114
|
colIndex: e.colIndex,
|
|
1115
1115
|
side: "left",
|
|
1116
1116
|
position: { x: U, y: Y },
|
|
1117
|
-
visible:
|
|
1118
|
-
barId:
|
|
1117
|
+
visible: g,
|
|
1118
|
+
barId: i
|
|
1119
1119
|
}), e.store.registerConnectionHandle({
|
|
1120
|
-
id: `${
|
|
1120
|
+
id: `${i}-connection-right`,
|
|
1121
1121
|
rowIndex: e.rowIndex,
|
|
1122
1122
|
colIndex: e.colIndex,
|
|
1123
1123
|
side: "right",
|
|
1124
1124
|
position: { x: Q, y: _ },
|
|
1125
|
-
visible:
|
|
1126
|
-
barId:
|
|
1125
|
+
visible: p,
|
|
1126
|
+
barId: i
|
|
1127
1127
|
}));
|
|
1128
1128
|
}
|
|
1129
1129
|
function F() {
|
|
1130
|
-
e.store.unregisterGanttBar(
|
|
1130
|
+
e.store.unregisterGanttBar(i), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${i}-connection-left`), e.store.unregisterConnectionHandle(`${i}-connection-right`));
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1133
|
-
e.store.isDependencyGraphEnabled && (
|
|
1132
|
+
function q() {
|
|
1133
|
+
e.store.isDependencyGraphEnabled && (g.value = !0, p.value = !0);
|
|
1134
1134
|
}
|
|
1135
1135
|
function G() {
|
|
1136
|
-
|
|
1136
|
+
!y.value && !M.value && (g.value = !1, p.value = !1);
|
|
1137
1137
|
}
|
|
1138
|
-
function te(S,
|
|
1139
|
-
|
|
1140
|
-
const U = S === "left" ?
|
|
1138
|
+
function te(S, V) {
|
|
1139
|
+
V.preventDefault(), V.stopPropagation(), T.value = !0, S === "left" ? y.value = !0 : M.value = !0;
|
|
1140
|
+
const U = S === "left" ? r.value : h.value;
|
|
1141
1141
|
if (U) {
|
|
1142
1142
|
const _ = U.getBoundingClientRect(), ne = _.left + _.width / 2, se = _.top + _.height / 2;
|
|
1143
|
-
|
|
1143
|
+
R.value = { startX: ne, startY: se, endX: ne, endY: se };
|
|
1144
1144
|
}
|
|
1145
1145
|
const Y = (_) => {
|
|
1146
|
-
|
|
1146
|
+
R.value.endX = _.clientX, R.value.endY = _.clientY;
|
|
1147
1147
|
}, Q = (_) => {
|
|
1148
1148
|
pe(_, S), Me(Y, Q);
|
|
1149
1149
|
};
|
|
1150
1150
|
document.addEventListener("mousemove", Y), document.addEventListener("mouseup", Q);
|
|
1151
1151
|
}
|
|
1152
|
-
function pe(S,
|
|
1152
|
+
function pe(S, V) {
|
|
1153
1153
|
const Y = document.elementFromPoint(S.clientX, S.clientY)?.closest(".connection-handle");
|
|
1154
|
-
if (Y && Y !== (
|
|
1154
|
+
if (Y && Y !== (V === "left" ? r.value : h.value)) {
|
|
1155
1155
|
const Q = Y.closest(".gantt-bar");
|
|
1156
1156
|
if (Q) {
|
|
1157
1157
|
const _ = parseInt(Q.getAttribute("data-rowindex") || "0"), ne = parseInt(Q.getAttribute("data-colindex") || "0"), se = Y.classList.contains("left-connection-handle") ? "left" : "right", Ze = `gantt-bar-row-${_}-col-${ne}`, Ke = e.store.createConnection(
|
|
1158
|
-
`${
|
|
1158
|
+
`${i}-connection-${V}`,
|
|
1159
1159
|
`${Ze}-connection-${se}`
|
|
1160
1160
|
);
|
|
1161
|
-
Ke &&
|
|
1161
|
+
Ke && a("connection:create", Ke);
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
|
-
function Me(S,
|
|
1166
|
-
|
|
1165
|
+
function Me(S, V) {
|
|
1166
|
+
T.value = !1, y.value = !1, M.value = !1, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", V), d.value?.matches(":hover") || G();
|
|
1167
1167
|
}
|
|
1168
1168
|
return t({
|
|
1169
1169
|
barStyle: le,
|
|
1170
1170
|
cleanupConnectionDrag: Me,
|
|
1171
1171
|
currentEnd: v,
|
|
1172
1172
|
handleConnectionDrop: pe,
|
|
1173
|
-
isLeftConnectionDragging:
|
|
1174
|
-
isLeftConnectionVisible:
|
|
1175
|
-
isRightConnectionDragging:
|
|
1176
|
-
isRightConnectionVisible:
|
|
1177
|
-
showDragPreview:
|
|
1178
|
-
}), (S,
|
|
1173
|
+
isLeftConnectionDragging: y,
|
|
1174
|
+
isLeftConnectionVisible: g,
|
|
1175
|
+
isRightConnectionDragging: M,
|
|
1176
|
+
isRightConnectionVisible: p,
|
|
1177
|
+
showDragPreview: T
|
|
1178
|
+
}), (S, V) => (x(), C("td", {
|
|
1179
1179
|
class: "aganttcell",
|
|
1180
1180
|
colspan: e.colspan
|
|
1181
1181
|
}, [
|
|
@@ -1184,53 +1184,53 @@ const An = (e) => {
|
|
|
1184
1184
|
ref: "bar",
|
|
1185
1185
|
"data-rowindex": e.rowIndex,
|
|
1186
1186
|
"data-colindex": e.colIndex,
|
|
1187
|
-
class: oe(["gantt-bar", { "is-dragging":
|
|
1187
|
+
class: oe(["gantt-bar", { "is-dragging": H.value }]),
|
|
1188
1188
|
style: me(le.value),
|
|
1189
|
-
onMouseenter:
|
|
1189
|
+
onMouseenter: q,
|
|
1190
1190
|
onMouseleave: G
|
|
1191
1191
|
}, [
|
|
1192
|
-
e.store.isDependencyGraphEnabled ? (
|
|
1192
|
+
e.store.isDependencyGraphEnabled ? (x(), C("div", {
|
|
1193
1193
|
key: 0,
|
|
1194
1194
|
ref: "leftConnectionHandle",
|
|
1195
|
-
class: oe(["connection-handle left-connection-handle", { visible:
|
|
1196
|
-
onMousedown:
|
|
1197
|
-
}, [...
|
|
1195
|
+
class: oe(["connection-handle left-connection-handle", { visible: g.value, "is-dragging": y.value }]),
|
|
1196
|
+
onMousedown: V[0] || (V[0] = Se((U) => te("left", U), ["stop"]))
|
|
1197
|
+
}, [...V[2] || (V[2] = [
|
|
1198
1198
|
W("div", { class: "connection-dot" }, null, -1)
|
|
1199
1199
|
])], 34)) : K("", !0),
|
|
1200
|
-
e.store.isDependencyGraphEnabled ? (
|
|
1200
|
+
e.store.isDependencyGraphEnabled ? (x(), C("div", {
|
|
1201
1201
|
key: 1,
|
|
1202
1202
|
ref: "rightConnectionHandle",
|
|
1203
|
-
class: oe(["connection-handle right-connection-handle", { visible:
|
|
1204
|
-
onMousedown:
|
|
1205
|
-
}, [...
|
|
1203
|
+
class: oe(["connection-handle right-connection-handle", { visible: p.value, "is-dragging": M.value }]),
|
|
1204
|
+
onMousedown: V[1] || (V[1] = Se((U) => te("right", U), ["stop"]))
|
|
1205
|
+
}, [...V[3] || (V[3] = [
|
|
1206
1206
|
W("div", { class: "connection-dot" }, null, -1)
|
|
1207
1207
|
])], 34)) : K("", !0),
|
|
1208
1208
|
W("div", {
|
|
1209
1209
|
ref: "leftResizeHandle",
|
|
1210
|
-
class: oe(["resize-handle left-resize-handle", { "is-dragging":
|
|
1211
|
-
}, [...
|
|
1210
|
+
class: oe(["resize-handle left-resize-handle", { "is-dragging": P(ue) }])
|
|
1211
|
+
}, [...V[4] || (V[4] = [
|
|
1212
1212
|
W("div", { class: "handle-grip" }, null, -1),
|
|
1213
1213
|
W("div", { class: "vertical-indicator left-indicator" }, null, -1)
|
|
1214
1214
|
])], 2),
|
|
1215
|
-
e.label ? (
|
|
1215
|
+
e.label ? (x(), C("label", Xn, xe(e.label), 1)) : K("", !0),
|
|
1216
1216
|
W("div", {
|
|
1217
1217
|
ref: "rightResizeHandle",
|
|
1218
|
-
class: oe(["resize-handle right-resize-handle", { "is-dragging":
|
|
1219
|
-
}, [...
|
|
1218
|
+
class: oe(["resize-handle right-resize-handle", { "is-dragging": P(ae) }])
|
|
1219
|
+
}, [...V[5] || (V[5] = [
|
|
1220
1220
|
W("div", { class: "handle-grip" }, null, -1),
|
|
1221
1221
|
W("div", { class: "vertical-indicator right-indicator" }, null, -1)
|
|
1222
1222
|
])], 2)
|
|
1223
1223
|
], 46, zn)
|
|
1224
1224
|
], 512),
|
|
1225
|
-
e.store.isDependencyGraphEnabled &&
|
|
1225
|
+
e.store.isDependencyGraphEnabled && T.value ? (x(), C("svg", {
|
|
1226
1226
|
key: 0,
|
|
1227
1227
|
style: me(j.value)
|
|
1228
1228
|
}, [
|
|
1229
1229
|
W("line", {
|
|
1230
|
-
x1:
|
|
1231
|
-
y1:
|
|
1232
|
-
x2:
|
|
1233
|
-
y2:
|
|
1230
|
+
x1: R.value.startX,
|
|
1231
|
+
y1: R.value.startY,
|
|
1232
|
+
x2: R.value.endX,
|
|
1233
|
+
y2: R.value.endY,
|
|
1234
1234
|
stroke: "#2196f3",
|
|
1235
1235
|
"stroke-width": "2",
|
|
1236
1236
|
"stroke-dasharray": "5,5"
|
|
@@ -1243,11 +1243,11 @@ const An = (e) => {
|
|
|
1243
1243
|
<path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
|
|
1244
1244
|
<polygon points="34 18 30 18 30 30 18 30 18 34 30 34 30 46 34 46 34 34 46 34 46 30 34 30 34 18" style="fill: #000; stroke-width: 0px;"/>
|
|
1245
1245
|
</svg>
|
|
1246
|
-
`,
|
|
1246
|
+
`, Jn = `<?xml version="1.0" encoding="UTF-8"?>
|
|
1247
1247
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
1248
1248
|
<path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
|
|
1249
1249
|
<polygon points="46.84 19.99 44.01 17.16 32 29.17 19.99 17.16 17.16 19.99 29.17 32 17.16 44.01 19.99 46.84 32 34.83 44.01 46.84 46.84 44.01 34.83 32 46.84 19.99" style="fill: #000; stroke-width: 0px;"/>
|
|
1250
|
-
</svg>`,
|
|
1250
|
+
</svg>`, qn = `<?xml version="1.0" encoding="UTF-8"?>
|
|
1251
1251
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.67">
|
|
1252
1252
|
<path d="M68.67,16.67h-14.67V2c0-1.1-.9-2-2-2H2C.9,0,0,.9,0,2v50c0,1.1.9,2,2,2h14.67v14.67c0,1.1.9,2,2,2h50c1.1,0,2-.9,2-2V18.67c0-1.1-.9-2-2-2ZM4,4h46v46H4V4ZM66.67,66.67H20.67v-12.67h31.33c1.1,0,2-.9,2-2v-31.33h12.67v46Z" style="fill: #000; stroke-width: 0px;"/>
|
|
1253
1253
|
<polygon points="41 25 29 25 29 13 25 13 25 25 13 25 13 29 25 29 25 41 29 41 29 29 41 29 41 25" style="fill: #000; stroke-width: 0px;"/>
|
|
@@ -1284,8 +1284,8 @@ const An = (e) => {
|
|
|
1284
1284
|
<path d="M70.08,33.9l-9.75-9.75-2.83,2.83,6.33,6.33h-26.51V6.81l6.33,6.33,2.83-2.83L36.75.56c-.75-.75-2.08-.75-2.83,0l-9.75,9.75,2.83,2.83,6.33-6.33v26.5H6.83l6.33-6.33-2.83-2.83L.59,33.9c-.38.38-.59.88-.59,1.41s.21,1.04.59,1.41l9.75,9.75,2.83-2.83-6.33-6.33h26.5v26.51l-6.33-6.33-2.83,2.83,9.75,9.75c.38.38.88.59,1.41.59s1.04-.21,1.41-.59l9.75-9.75-2.83-2.83-6.33,6.33v-26.51h26.51l-6.33,6.33,2.83,2.83,9.75-9.75c.38-.38.59-.88.59-1.41s-.21-1.04-.59-1.41Z" style="fill: #000; stroke-width: 0px;"/>
|
|
1285
1285
|
</svg>`, eo = {
|
|
1286
1286
|
add: jn,
|
|
1287
|
-
delete:
|
|
1288
|
-
duplicate:
|
|
1287
|
+
delete: Jn,
|
|
1288
|
+
duplicate: qn,
|
|
1289
1289
|
insertAbove: Qn,
|
|
1290
1290
|
insertBelow: Kn,
|
|
1291
1291
|
move: _n
|
|
@@ -1295,7 +1295,7 @@ const An = (e) => {
|
|
|
1295
1295
|
}, no = ["aria-expanded"], oo = ["onClick"], lo = ["innerHTML"], ao = { class: "action-label" }, so = {
|
|
1296
1296
|
key: 1,
|
|
1297
1297
|
class: "row-actions-icons"
|
|
1298
|
-
}, io = ["title", "aria-label", "onClick"], ro = ["innerHTML"],
|
|
1298
|
+
}, io = ["title", "aria-label", "onClick"], ro = ["innerHTML"], Je = /* @__PURE__ */ we({
|
|
1299
1299
|
__name: "ARowActions",
|
|
1300
1300
|
props: {
|
|
1301
1301
|
rowIndex: {},
|
|
@@ -1305,109 +1305,109 @@ const An = (e) => {
|
|
|
1305
1305
|
},
|
|
1306
1306
|
emits: ["action"],
|
|
1307
1307
|
setup(e, { emit: t }) {
|
|
1308
|
-
const s = e,
|
|
1308
|
+
const s = e, a = t, u = re("actionsCell"), i = re("toggleButton"), o = z(0), d = z(!1), n = z(!1), f = z({ top: 0, left: 0 }), r = {
|
|
1309
1309
|
add: "Add Row",
|
|
1310
1310
|
delete: "Delete Row",
|
|
1311
1311
|
duplicate: "Duplicate Row",
|
|
1312
1312
|
insertAbove: "Insert Above",
|
|
1313
1313
|
insertBelow: "Insert Below",
|
|
1314
1314
|
move: "Move Row"
|
|
1315
|
-
},
|
|
1316
|
-
const
|
|
1317
|
-
for (const
|
|
1318
|
-
const
|
|
1319
|
-
if (
|
|
1320
|
-
let
|
|
1321
|
-
typeof
|
|
1315
|
+
}, h = A(() => {
|
|
1316
|
+
const g = [], p = s.config.actions || {}, y = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
|
|
1317
|
+
for (const M of y) {
|
|
1318
|
+
const T = p[M];
|
|
1319
|
+
if (T === !1 || T === void 0) continue;
|
|
1320
|
+
let R = !0, H = r[M], X = eo[M];
|
|
1321
|
+
typeof T == "object" && (R = T.enabled !== !1, H = T.label || H, X = T.icon || X), R && g.push({ type: M, label: H, icon: X });
|
|
1322
1322
|
}
|
|
1323
|
-
return
|
|
1324
|
-
}), E =
|
|
1323
|
+
return g;
|
|
1324
|
+
}), E = A(() => {
|
|
1325
1325
|
if (s.config.forceDropdown) return !0;
|
|
1326
|
-
const
|
|
1327
|
-
return
|
|
1328
|
-
}),
|
|
1326
|
+
const g = s.config.dropdownThreshold ?? 150;
|
|
1327
|
+
return g === 0 ? !1 : o.value > 0 && o.value < g;
|
|
1328
|
+
}), O = A(() => d.value ? n.value ? {
|
|
1329
1329
|
position: "fixed",
|
|
1330
|
-
bottom: `${window.innerHeight -
|
|
1331
|
-
left: `${
|
|
1330
|
+
bottom: `${window.innerHeight - f.value.top}px`,
|
|
1331
|
+
left: `${f.value.left}px`,
|
|
1332
1332
|
top: "auto"
|
|
1333
1333
|
} : {
|
|
1334
1334
|
position: "fixed",
|
|
1335
|
-
top: `${
|
|
1336
|
-
left: `${
|
|
1335
|
+
top: `${f.value.top}px`,
|
|
1336
|
+
left: `${f.value.left}px`
|
|
1337
1337
|
} : {});
|
|
1338
|
-
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1338
|
+
qe(u, (g) => {
|
|
1339
|
+
const p = g[0];
|
|
1340
|
+
p && (o.value = p.contentRect.width);
|
|
1341
1341
|
});
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1344
|
-
},
|
|
1345
|
-
if (!
|
|
1346
|
-
const
|
|
1347
|
-
|
|
1348
|
-
top:
|
|
1349
|
-
left:
|
|
1350
|
-
} :
|
|
1351
|
-
top:
|
|
1352
|
-
left:
|
|
1342
|
+
const Z = () => {
|
|
1343
|
+
d.value || w(), d.value = !d.value;
|
|
1344
|
+
}, w = () => {
|
|
1345
|
+
if (!i.value) return;
|
|
1346
|
+
const g = i.value.getBoundingClientRect(), p = window.innerHeight, y = h.value.length * 40 + 16, M = p - g.bottom, T = g.top;
|
|
1347
|
+
n.value = M < y && T > y, n.value ? f.value = {
|
|
1348
|
+
top: g.top,
|
|
1349
|
+
left: g.left
|
|
1350
|
+
} : f.value = {
|
|
1351
|
+
top: g.bottom,
|
|
1352
|
+
left: g.left
|
|
1353
1353
|
};
|
|
1354
1354
|
};
|
|
1355
|
-
ot(
|
|
1356
|
-
|
|
1355
|
+
ot(u, () => {
|
|
1356
|
+
d.value = !1;
|
|
1357
1357
|
});
|
|
1358
|
-
const v = (
|
|
1359
|
-
|
|
1360
|
-
const
|
|
1361
|
-
typeof
|
|
1358
|
+
const v = (g) => {
|
|
1359
|
+
d.value = !1;
|
|
1360
|
+
const p = s.config.actions?.[g];
|
|
1361
|
+
typeof p == "object" && p.handler && p.handler(s.rowIndex, s.store) === !1 || a("action", g, s.rowIndex);
|
|
1362
1362
|
};
|
|
1363
|
-
return (
|
|
1363
|
+
return (g, p) => (x(), C("td", {
|
|
1364
1364
|
ref: "actionsCell",
|
|
1365
|
-
class: oe(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active":
|
|
1365
|
+
class: oe(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": d.value }])
|
|
1366
1366
|
}, [
|
|
1367
|
-
E.value ? (
|
|
1367
|
+
E.value ? (x(), C("div", to, [
|
|
1368
1368
|
W("button", {
|
|
1369
1369
|
ref: "toggleButton",
|
|
1370
1370
|
type: "button",
|
|
1371
1371
|
class: "row-actions-toggle",
|
|
1372
|
-
"aria-expanded":
|
|
1372
|
+
"aria-expanded": d.value,
|
|
1373
1373
|
"aria-haspopup": "true",
|
|
1374
|
-
onClick: Se(
|
|
1375
|
-
}, [...
|
|
1374
|
+
onClick: Se(Z, ["stop"])
|
|
1375
|
+
}, [...p[0] || (p[0] = [
|
|
1376
1376
|
W("span", { class: "dropdown-icon" }, "⋮", -1)
|
|
1377
1377
|
])], 8, no),
|
|
1378
1378
|
de(W("div", {
|
|
1379
|
-
class: oe(["row-actions-menu", { "menu-flipped":
|
|
1380
|
-
style: me(
|
|
1379
|
+
class: oe(["row-actions-menu", { "menu-flipped": n.value }]),
|
|
1380
|
+
style: me(O.value),
|
|
1381
1381
|
role: "menu"
|
|
1382
1382
|
}, [
|
|
1383
|
-
(
|
|
1384
|
-
key:
|
|
1383
|
+
(x(!0), C(he, null, ye(h.value, (y) => (x(), C("button", {
|
|
1384
|
+
key: y.type,
|
|
1385
1385
|
type: "button",
|
|
1386
1386
|
class: "row-action-menu-item",
|
|
1387
1387
|
role: "menuitem",
|
|
1388
|
-
onClick: Se((
|
|
1388
|
+
onClick: Se((M) => v(y.type), ["stop"])
|
|
1389
1389
|
}, [
|
|
1390
1390
|
W("span", {
|
|
1391
1391
|
class: "action-icon",
|
|
1392
|
-
innerHTML:
|
|
1392
|
+
innerHTML: y.icon
|
|
1393
1393
|
}, null, 8, lo),
|
|
1394
|
-
W("span", ao, xe(
|
|
1394
|
+
W("span", ao, xe(y.label), 1)
|
|
1395
1395
|
], 8, oo))), 128))
|
|
1396
1396
|
], 6), [
|
|
1397
|
-
[it,
|
|
1397
|
+
[it, d.value]
|
|
1398
1398
|
])
|
|
1399
|
-
])) : (
|
|
1400
|
-
(
|
|
1401
|
-
key:
|
|
1399
|
+
])) : (x(), C("div", so, [
|
|
1400
|
+
(x(!0), C(he, null, ye(h.value, (y) => (x(), C("button", {
|
|
1401
|
+
key: y.type,
|
|
1402
1402
|
type: "button",
|
|
1403
1403
|
class: "row-action-btn",
|
|
1404
|
-
title:
|
|
1405
|
-
"aria-label":
|
|
1406
|
-
onClick: Se((
|
|
1404
|
+
title: y.label,
|
|
1405
|
+
"aria-label": y.label,
|
|
1406
|
+
onClick: Se((M) => v(y.type), ["stop"])
|
|
1407
1407
|
}, [
|
|
1408
1408
|
W("span", {
|
|
1409
1409
|
class: "action-icon",
|
|
1410
|
-
innerHTML:
|
|
1410
|
+
innerHTML: y.icon
|
|
1411
1411
|
}, null, 8, ro)
|
|
1412
1412
|
], 8, io))), 128))
|
|
1413
1413
|
]))
|
|
@@ -1423,93 +1423,93 @@ const An = (e) => {
|
|
|
1423
1423
|
},
|
|
1424
1424
|
emits: ["row:action"],
|
|
1425
1425
|
setup(e, { emit: t }) {
|
|
1426
|
-
const s = t,
|
|
1427
|
-
s("row:action",
|
|
1426
|
+
const s = t, a = re("rowEl"), u = A(() => e.store.isRowVisible(e.rowIndex)), i = A(() => e.store.getRowExpandSymbol(e.rowIndex)), o = A(() => e.store.config.rowActions || { enabled: !1 }), d = A(() => o.value.enabled), n = A(() => o.value.position || "before-index"), f = (r, h) => {
|
|
1427
|
+
s("row:action", r, h);
|
|
1428
1428
|
};
|
|
1429
1429
|
if (e.addNavigation) {
|
|
1430
|
-
let
|
|
1431
|
-
typeof e.addNavigation == "object" && (
|
|
1432
|
-
...
|
|
1430
|
+
let r = Qe;
|
|
1431
|
+
typeof e.addNavigation == "object" && (r = {
|
|
1432
|
+
...r,
|
|
1433
1433
|
...e.addNavigation
|
|
1434
1434
|
}), ft([
|
|
1435
1435
|
{
|
|
1436
|
-
selectors:
|
|
1437
|
-
handlers:
|
|
1436
|
+
selectors: a,
|
|
1437
|
+
handlers: r
|
|
1438
1438
|
}
|
|
1439
1439
|
]);
|
|
1440
1440
|
}
|
|
1441
|
-
return (
|
|
1441
|
+
return (r, h) => de((x(), C("tr", {
|
|
1442
1442
|
ref: "rowEl",
|
|
1443
1443
|
tabindex: e.tabIndex,
|
|
1444
1444
|
class: "atable-row"
|
|
1445
1445
|
}, [
|
|
1446
|
-
|
|
1446
|
+
d.value && n.value === "before-index" ? (x(), ve(Je, {
|
|
1447
1447
|
key: 0,
|
|
1448
1448
|
"row-index": e.rowIndex,
|
|
1449
1449
|
store: e.store,
|
|
1450
1450
|
config: o.value,
|
|
1451
|
-
position:
|
|
1452
|
-
onAction:
|
|
1451
|
+
position: n.value,
|
|
1452
|
+
onAction: f
|
|
1453
1453
|
}, null, 8, ["row-index", "store", "config", "position"])) : K("", !0),
|
|
1454
|
-
e.store.config.view !== "uncounted" ? fe(
|
|
1455
|
-
e.store.config.view === "list" ? (
|
|
1454
|
+
e.store.config.view !== "uncounted" ? fe(r.$slots, "index", { key: 1 }, () => [
|
|
1455
|
+
e.store.config.view === "list" ? (x(), C("td", {
|
|
1456
1456
|
key: 0,
|
|
1457
1457
|
tabIndex: -1,
|
|
1458
1458
|
class: oe(["list-index", e.store.hasPinnedColumns ? "sticky-index" : ""])
|
|
1459
|
-
}, xe(e.rowIndex + 1), 3)) : e.store.isTreeView ? (
|
|
1459
|
+
}, xe(e.rowIndex + 1), 3)) : e.store.isTreeView ? (x(), C("td", {
|
|
1460
1460
|
key: 1,
|
|
1461
1461
|
tabIndex: -1,
|
|
1462
1462
|
class: oe(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
1463
|
-
onClick:
|
|
1464
|
-
}, xe(
|
|
1463
|
+
onClick: h[0] || (h[0] = (E) => e.store.toggleRowExpand(e.rowIndex))
|
|
1464
|
+
}, xe(i.value), 3)) : K("", !0)
|
|
1465
1465
|
], !0) : K("", !0),
|
|
1466
|
-
|
|
1466
|
+
d.value && n.value === "after-index" ? (x(), ve(Je, {
|
|
1467
1467
|
key: 2,
|
|
1468
1468
|
"row-index": e.rowIndex,
|
|
1469
1469
|
store: e.store,
|
|
1470
1470
|
config: o.value,
|
|
1471
|
-
position:
|
|
1472
|
-
onAction:
|
|
1471
|
+
position: n.value,
|
|
1472
|
+
onAction: f
|
|
1473
1473
|
}, null, 8, ["row-index", "store", "config", "position"])) : K("", !0),
|
|
1474
|
-
fe(
|
|
1475
|
-
|
|
1474
|
+
fe(r.$slots, "default", {}, void 0, !0),
|
|
1475
|
+
d.value && n.value === "end" ? (x(), ve(Je, {
|
|
1476
1476
|
key: 3,
|
|
1477
1477
|
"row-index": e.rowIndex,
|
|
1478
1478
|
store: e.store,
|
|
1479
1479
|
config: o.value,
|
|
1480
|
-
position:
|
|
1481
|
-
onAction:
|
|
1480
|
+
position: n.value,
|
|
1481
|
+
onAction: f
|
|
1482
1482
|
}, null, 8, ["row-index", "store", "config", "position"])) : K("", !0)
|
|
1483
1483
|
], 8, co)), [
|
|
1484
|
-
[it,
|
|
1484
|
+
[it, u.value]
|
|
1485
1485
|
]);
|
|
1486
1486
|
}
|
|
1487
1487
|
}), Lt = /* @__PURE__ */ $e(uo, [["__scopeId", "data-v-e7ca13d1"]]), nt = /* @__PURE__ */ new WeakMap(), fo = {
|
|
1488
1488
|
mounted(e, t) {
|
|
1489
1489
|
const s = !t.modifiers.bubble;
|
|
1490
|
-
let
|
|
1491
|
-
if (typeof t.value == "function")
|
|
1490
|
+
let a;
|
|
1491
|
+
if (typeof t.value == "function") a = ot(e, t.value, { capture: s });
|
|
1492
1492
|
else {
|
|
1493
|
-
const [
|
|
1494
|
-
|
|
1493
|
+
const [u, i] = t.value;
|
|
1494
|
+
a = ot(e, u, Object.assign({ capture: s }, i));
|
|
1495
1495
|
}
|
|
1496
|
-
nt.set(e,
|
|
1496
|
+
nt.set(e, a);
|
|
1497
1497
|
},
|
|
1498
1498
|
unmounted(e) {
|
|
1499
1499
|
const t = nt.get(e);
|
|
1500
1500
|
t && typeof t == "function" ? t() : t?.stop(), nt.delete(e);
|
|
1501
1501
|
}
|
|
1502
1502
|
}, vo = { mounted(e, t) {
|
|
1503
|
-
typeof t.value == "function" ?
|
|
1503
|
+
typeof t.value == "function" ? qe(e, t.value) : qe(e, ...t.value);
|
|
1504
1504
|
} };
|
|
1505
1505
|
function ho() {
|
|
1506
1506
|
let e = !1;
|
|
1507
1507
|
const t = ie(!1);
|
|
1508
|
-
return (s,
|
|
1509
|
-
if (t.value =
|
|
1508
|
+
return (s, a) => {
|
|
1509
|
+
if (t.value = a.value, e) return;
|
|
1510
1510
|
e = !0;
|
|
1511
|
-
const
|
|
1512
|
-
ce(t, (
|
|
1511
|
+
const u = Sn(s, a.value);
|
|
1512
|
+
ce(t, (i) => u.value = i);
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
1515
1515
|
ho();
|
|
@@ -1531,24 +1531,24 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
1531
1531
|
},
|
|
1532
1532
|
emits: ["connection:delete"],
|
|
1533
1533
|
setup(e, { emit: t }) {
|
|
1534
|
-
const s = t,
|
|
1535
|
-
const
|
|
1536
|
-
return
|
|
1537
|
-
})),
|
|
1538
|
-
const
|
|
1539
|
-
(
|
|
1540
|
-
),
|
|
1541
|
-
(
|
|
1534
|
+
const s = t, a = A(() => e.store.connectionPaths.filter((o) => {
|
|
1535
|
+
const d = e.store.ganttBars.find((f) => f.id === o.from.barId), n = e.store.ganttBars.find((f) => f.id === o.to.barId);
|
|
1536
|
+
return d && n;
|
|
1537
|
+
})), u = (o) => {
|
|
1538
|
+
const d = e.store.connectionHandles.find(
|
|
1539
|
+
(H) => H.barId === o.from.barId && H.side === o.from.side
|
|
1540
|
+
), n = e.store.connectionHandles.find(
|
|
1541
|
+
(H) => H.barId === o.to.barId && H.side === o.to.side
|
|
1542
1542
|
);
|
|
1543
|
-
if (!
|
|
1544
|
-
const
|
|
1545
|
-
return `M ${
|
|
1546
|
-
},
|
|
1543
|
+
if (!d || !n) return "";
|
|
1544
|
+
const f = d.position.x + Ye / 2, r = d.position.y + Ye / 2, h = n.position.x + Ye / 2, E = n.position.y + Ye / 2, O = Math.abs(h - f), Z = Math.max(O * xo, 50), w = f + (o.from.side === "left" ? -Z : Z), v = h + (o.to.side === "left" ? -Z : Z), g = { x: 0.5 * f + 0.5 * w, y: 0.5 * r + 0.5 * r }, p = { x: 0.5 * w + 0.5 * v, y: 0.5 * r + 0.5 * E }, y = { x: 0.5 * v + 0.5 * h, y: 0.5 * E + 0.5 * E }, M = { x: 0.5 * g.x + 0.5 * p.x, y: 0.5 * g.y + 0.5 * p.y }, T = { x: 0.5 * p.x + 0.5 * y.x, y: 0.5 * p.y + 0.5 * y.y }, R = { x: 0.5 * M.x + 0.5 * T.x, y: 0.5 * M.y + 0.5 * T.y };
|
|
1545
|
+
return `M ${f} ${r} Q ${w} ${r}, ${R.x} ${R.y} Q ${v} ${E}, ${h} ${E}`;
|
|
1546
|
+
}, i = (o) => {
|
|
1547
1547
|
e.store.deleteConnection(o.id) && s("connection:delete", o);
|
|
1548
1548
|
};
|
|
1549
|
-
return (o,
|
|
1550
|
-
(
|
|
1551
|
-
|
|
1549
|
+
return (o, d) => (x(), C("div", go, [
|
|
1550
|
+
(x(), C("svg", mo, [
|
|
1551
|
+
d[0] || (d[0] = W("defs", null, [
|
|
1552
1552
|
W("path", {
|
|
1553
1553
|
id: "arrowhead",
|
|
1554
1554
|
d: "M 0 -7 L 20 0 L 0 7Z",
|
|
@@ -1571,25 +1571,25 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
1571
1571
|
})
|
|
1572
1572
|
])
|
|
1573
1573
|
], -1)),
|
|
1574
|
-
(
|
|
1575
|
-
key: `${
|
|
1576
|
-
d:
|
|
1574
|
+
(x(!0), C(he, null, ye(a.value, (n) => (x(), C("path", {
|
|
1575
|
+
key: `${n.id}-hitbox`,
|
|
1576
|
+
d: u(n),
|
|
1577
1577
|
stroke: "transparent",
|
|
1578
|
-
"stroke-width": (
|
|
1578
|
+
"stroke-width": (n.style?.width || 2) + 10,
|
|
1579
1579
|
fill: "none",
|
|
1580
1580
|
class: "connection-hitbox",
|
|
1581
|
-
onDblclick: (
|
|
1581
|
+
onDblclick: (f) => i(n)
|
|
1582
1582
|
}, null, 40, wo))), 128)),
|
|
1583
|
-
(
|
|
1584
|
-
id:
|
|
1585
|
-
key:
|
|
1586
|
-
d:
|
|
1587
|
-
stroke:
|
|
1588
|
-
"stroke-width":
|
|
1583
|
+
(x(!0), C(he, null, ye(a.value, (n) => (x(), C("path", {
|
|
1584
|
+
id: n.id,
|
|
1585
|
+
key: n.id,
|
|
1586
|
+
d: u(n),
|
|
1587
|
+
stroke: n.style?.color || "#666",
|
|
1588
|
+
"stroke-width": n.style?.width || 2,
|
|
1589
1589
|
fill: "none",
|
|
1590
1590
|
"marker-mid": "url(#arrowhead-marker)",
|
|
1591
1591
|
class: "connection-path animated-path",
|
|
1592
|
-
onDblclick: (
|
|
1592
|
+
onDblclick: (f) => i(n)
|
|
1593
1593
|
}, null, 40, po))), 128))
|
|
1594
1594
|
]))
|
|
1595
1595
|
]));
|
|
@@ -1611,20 +1611,40 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
1611
1611
|
const t = z(""), s = Gt({
|
|
1612
1612
|
startValue: "",
|
|
1613
1613
|
endValue: ""
|
|
1614
|
-
}),
|
|
1615
|
-
if (
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1614
|
+
}), a = A(() => {
|
|
1615
|
+
if (e.column.filterType) return e.column.filterType;
|
|
1616
|
+
switch (e.column.fieldtype) {
|
|
1617
|
+
case "Check":
|
|
1618
|
+
return "checkbox";
|
|
1619
|
+
case "Date":
|
|
1620
|
+
return "date";
|
|
1621
|
+
case "Datetime":
|
|
1622
|
+
return "dateRange";
|
|
1623
|
+
case "Select":
|
|
1624
|
+
return "select";
|
|
1625
|
+
case "Int":
|
|
1626
|
+
case "Float":
|
|
1627
|
+
case "Currency":
|
|
1628
|
+
case "Decimal":
|
|
1629
|
+
case "Quantity":
|
|
1630
|
+
return "number";
|
|
1631
|
+
default:
|
|
1632
|
+
return "text";
|
|
1633
|
+
}
|
|
1634
|
+
}), u = (f) => {
|
|
1635
|
+
if (f.filterOptions) return f.filterOptions;
|
|
1636
|
+
const r = /* @__PURE__ */ new Set();
|
|
1637
|
+
return e.store.rows.forEach((h) => {
|
|
1638
|
+
const E = h[f.name];
|
|
1639
|
+
E != null && E !== "" && r.add(E);
|
|
1640
|
+
}), Array.from(r).map((h) => ({
|
|
1641
|
+
value: h,
|
|
1642
|
+
label: String(h)
|
|
1623
1643
|
}));
|
|
1624
|
-
},
|
|
1625
|
-
!
|
|
1626
|
-
},
|
|
1627
|
-
|
|
1644
|
+
}, i = A(() => !!(t.value || s.startValue || s.endValue)), o = (f) => {
|
|
1645
|
+
!f && a.value !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = f, e.store.setFilter(e.colIndex, { value: f }));
|
|
1646
|
+
}, d = (f, r) => {
|
|
1647
|
+
f === "start" ? s.startValue = r : s.endValue = r, !s.startValue && !s.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
|
|
1628
1648
|
value: null,
|
|
1629
1649
|
startValue: s.startValue,
|
|
1630
1650
|
endValue: s.endValue
|
|
@@ -1632,81 +1652,81 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
1632
1652
|
}, n = () => {
|
|
1633
1653
|
t.value = "", s.startValue = "", s.endValue = "", e.store.clearFilter(e.colIndex);
|
|
1634
1654
|
};
|
|
1635
|
-
return (
|
|
1636
|
-
|
|
1655
|
+
return (f, r) => (x(), C("div", Co, [
|
|
1656
|
+
a.value === "text" ? de((x(), C("input", {
|
|
1637
1657
|
key: 0,
|
|
1638
|
-
"onUpdate:modelValue":
|
|
1658
|
+
"onUpdate:modelValue": r[0] || (r[0] = (h) => t.value = h),
|
|
1639
1659
|
type: "text",
|
|
1640
1660
|
class: "filter-input",
|
|
1641
|
-
onInput:
|
|
1661
|
+
onInput: r[1] || (r[1] = (h) => o(t.value))
|
|
1642
1662
|
}, null, 544)), [
|
|
1643
1663
|
[Ne, t.value]
|
|
1644
|
-
]) :
|
|
1664
|
+
]) : a.value === "number" ? de((x(), C("input", {
|
|
1645
1665
|
key: 1,
|
|
1646
|
-
"onUpdate:modelValue":
|
|
1666
|
+
"onUpdate:modelValue": r[2] || (r[2] = (h) => t.value = h),
|
|
1647
1667
|
type: "number",
|
|
1648
1668
|
class: "filter-input",
|
|
1649
|
-
onInput:
|
|
1669
|
+
onInput: r[3] || (r[3] = (h) => o(t.value))
|
|
1650
1670
|
}, null, 544)), [
|
|
1651
1671
|
[Ne, t.value]
|
|
1652
|
-
]) :
|
|
1672
|
+
]) : a.value === "checkbox" ? (x(), C("label", ko, [
|
|
1653
1673
|
de(W("input", {
|
|
1654
|
-
"onUpdate:modelValue":
|
|
1674
|
+
"onUpdate:modelValue": r[4] || (r[4] = (h) => t.value = h),
|
|
1655
1675
|
type: "checkbox",
|
|
1656
1676
|
class: "filter-checkbox",
|
|
1657
|
-
onChange:
|
|
1677
|
+
onChange: r[5] || (r[5] = (h) => o(t.value))
|
|
1658
1678
|
}, null, 544), [
|
|
1659
1679
|
[Yt, t.value]
|
|
1660
1680
|
]),
|
|
1661
1681
|
W("span", null, xe(e.column.label), 1)
|
|
1662
|
-
])) :
|
|
1682
|
+
])) : a.value === "select" ? de((x(), C("select", {
|
|
1663
1683
|
key: 3,
|
|
1664
|
-
"onUpdate:modelValue":
|
|
1684
|
+
"onUpdate:modelValue": r[6] || (r[6] = (h) => t.value = h),
|
|
1665
1685
|
class: "filter-select",
|
|
1666
|
-
onChange:
|
|
1686
|
+
onChange: r[7] || (r[7] = (h) => o(t.value))
|
|
1667
1687
|
}, [
|
|
1668
|
-
|
|
1669
|
-
(
|
|
1670
|
-
key:
|
|
1671
|
-
value:
|
|
1672
|
-
}, xe(
|
|
1688
|
+
r[15] || (r[15] = W("option", { value: "" }, "All", -1)),
|
|
1689
|
+
(x(!0), C(he, null, ye(u(e.column), (h) => (x(), C("option", {
|
|
1690
|
+
key: h.value || h,
|
|
1691
|
+
value: h.value || h
|
|
1692
|
+
}, xe(h.label || h), 9, Mo))), 128))
|
|
1673
1693
|
], 544)), [
|
|
1674
1694
|
[Ut, t.value]
|
|
1675
|
-
]) :
|
|
1695
|
+
]) : a.value === "date" ? de((x(), C("input", {
|
|
1676
1696
|
key: 4,
|
|
1677
|
-
"onUpdate:modelValue":
|
|
1697
|
+
"onUpdate:modelValue": r[8] || (r[8] = (h) => t.value = h),
|
|
1678
1698
|
type: "date",
|
|
1679
1699
|
class: "filter-input",
|
|
1680
|
-
onChange:
|
|
1700
|
+
onChange: r[9] || (r[9] = (h) => o(t.value))
|
|
1681
1701
|
}, null, 544)), [
|
|
1682
1702
|
[Ne, t.value]
|
|
1683
|
-
]) :
|
|
1703
|
+
]) : a.value === "dateRange" ? (x(), C("div", Ro, [
|
|
1684
1704
|
de(W("input", {
|
|
1685
|
-
"onUpdate:modelValue":
|
|
1705
|
+
"onUpdate:modelValue": r[10] || (r[10] = (h) => s.startValue = h),
|
|
1686
1706
|
type: "date",
|
|
1687
1707
|
class: "filter-input",
|
|
1688
|
-
onChange:
|
|
1708
|
+
onChange: r[11] || (r[11] = (h) => d("start", s.startValue))
|
|
1689
1709
|
}, null, 544), [
|
|
1690
1710
|
[Ne, s.startValue]
|
|
1691
1711
|
]),
|
|
1692
|
-
|
|
1712
|
+
r[16] || (r[16] = W("span", { class: "date-separator" }, "-", -1)),
|
|
1693
1713
|
de(W("input", {
|
|
1694
|
-
"onUpdate:modelValue":
|
|
1714
|
+
"onUpdate:modelValue": r[12] || (r[12] = (h) => s.endValue = h),
|
|
1695
1715
|
type: "date",
|
|
1696
1716
|
class: "filter-input",
|
|
1697
|
-
onChange:
|
|
1717
|
+
onChange: r[13] || (r[13] = (h) => d("end", s.endValue))
|
|
1698
1718
|
}, null, 544), [
|
|
1699
1719
|
[Ne, s.endValue]
|
|
1700
1720
|
])
|
|
1701
|
-
])) :
|
|
1721
|
+
])) : a.value === "component" && e.column.filterComponent ? (x(), ve(We(e.column.filterComponent), {
|
|
1702
1722
|
key: 6,
|
|
1703
1723
|
value: t.value,
|
|
1704
1724
|
column: e.column,
|
|
1705
1725
|
"col-index": e.colIndex,
|
|
1706
1726
|
store: e.store,
|
|
1707
|
-
"onUpdate:value":
|
|
1727
|
+
"onUpdate:value": r[14] || (r[14] = (h) => o(h))
|
|
1708
1728
|
}, null, 40, ["value", "column", "col-index", "store"])) : K("", !0),
|
|
1709
|
-
|
|
1729
|
+
i.value ? (x(), C("button", {
|
|
1710
1730
|
key: 7,
|
|
1711
1731
|
class: "clear-btn",
|
|
1712
1732
|
title: "Clear",
|
|
@@ -1714,7 +1734,7 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
1714
1734
|
}, "×")) : K("", !0)
|
|
1715
1735
|
]));
|
|
1716
1736
|
}
|
|
1717
|
-
}), Io = /* @__PURE__ */ $e($o, [["__scopeId", "data-v-
|
|
1737
|
+
}), Io = /* @__PURE__ */ $e($o, [["__scopeId", "data-v-f56c7674"]]), Eo = { key: 0 }, So = {
|
|
1718
1738
|
class: "atable-header-row",
|
|
1719
1739
|
tabindex: "-1"
|
|
1720
1740
|
}, Ao = {
|
|
@@ -1739,20 +1759,20 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
1739
1759
|
store: {}
|
|
1740
1760
|
},
|
|
1741
1761
|
setup(e) {
|
|
1742
|
-
const t =
|
|
1743
|
-
for (const
|
|
1744
|
-
if (
|
|
1745
|
-
const
|
|
1746
|
-
typeof
|
|
1762
|
+
const t = A(() => e.columns.filter((o) => o.filterable)), s = A(() => e.store.config.rowActions?.enabled ?? !1), a = A(() => e.store.config.rowActions?.position ?? "before-index"), u = (o) => e.store.sortByColumn(o), i = (o) => {
|
|
1763
|
+
for (const d of o) {
|
|
1764
|
+
if (d.borderBoxSize.length === 0) continue;
|
|
1765
|
+
const f = d.borderBoxSize[0].inlineSize, r = Number(d.target.dataset.colindex), h = e.store.columns[r]?.width;
|
|
1766
|
+
typeof h == "number" && h !== f && e.store.resizeColumn(r, f);
|
|
1747
1767
|
}
|
|
1748
1768
|
};
|
|
1749
|
-
return (o,
|
|
1769
|
+
return (o, d) => e.columns.length ? (x(), C("thead", Eo, [
|
|
1750
1770
|
W("tr", So, [
|
|
1751
|
-
s.value &&
|
|
1771
|
+
s.value && a.value === "before-index" ? (x(), C("th", {
|
|
1752
1772
|
key: 0,
|
|
1753
|
-
class: oe(["row-actions-header", { "sticky-column":
|
|
1773
|
+
class: oe(["row-actions-header", { "sticky-column": a.value === "before-index" }])
|
|
1754
1774
|
}, null, 2)) : K("", !0),
|
|
1755
|
-
e.store.zeroColumn ? (
|
|
1775
|
+
e.store.zeroColumn ? (x(), C("th", {
|
|
1756
1776
|
key: 1,
|
|
1757
1777
|
id: "header-index",
|
|
1758
1778
|
class: oe([[
|
|
@@ -1761,29 +1781,29 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
1761
1781
|
e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1762
1782
|
], "list-index"])
|
|
1763
1783
|
}, null, 2)) : K("", !0),
|
|
1764
|
-
s.value &&
|
|
1765
|
-
(
|
|
1766
|
-
key:
|
|
1767
|
-
"data-colindex":
|
|
1784
|
+
s.value && a.value === "after-index" ? (x(), C("th", Ao)) : K("", !0),
|
|
1785
|
+
(x(!0), C(he, null, ye(e.columns, (n, f) => de((x(), C("th", {
|
|
1786
|
+
key: n.name,
|
|
1787
|
+
"data-colindex": f,
|
|
1768
1788
|
tabindex: "-1",
|
|
1769
|
-
style: me(e.store.getHeaderCellStyle(
|
|
1770
|
-
class: oe(`${
|
|
1771
|
-
onClick: (
|
|
1789
|
+
style: me(e.store.getHeaderCellStyle(n)),
|
|
1790
|
+
class: oe(`${n.pinned ? "sticky-column" : ""} ${n.sortable === !1 ? "" : "cursor-pointer"}`),
|
|
1791
|
+
onClick: (r) => n.sortable !== !1 ? u(f) : void 0
|
|
1772
1792
|
}, [
|
|
1773
1793
|
fe(o.$slots, "default", {}, () => [
|
|
1774
|
-
jt(xe(
|
|
1794
|
+
jt(xe(n.label || String.fromCharCode(f + 97).toUpperCase()), 1)
|
|
1775
1795
|
])
|
|
1776
1796
|
], 14, To)), [
|
|
1777
|
-
[
|
|
1797
|
+
[P(vo), i]
|
|
1778
1798
|
])), 128)),
|
|
1779
|
-
s.value &&
|
|
1799
|
+
s.value && a.value === "end" ? (x(), C("th", Do)) : K("", !0)
|
|
1780
1800
|
]),
|
|
1781
|
-
t.value.length > 0 ? (
|
|
1782
|
-
s.value &&
|
|
1801
|
+
t.value.length > 0 ? (x(), C("tr", Ho, [
|
|
1802
|
+
s.value && a.value === "before-index" ? (x(), C("th", {
|
|
1783
1803
|
key: 0,
|
|
1784
|
-
class: oe(["row-actions-header", { "sticky-column":
|
|
1804
|
+
class: oe(["row-actions-header", { "sticky-column": a.value === "before-index" }])
|
|
1785
1805
|
}, null, 2)) : K("", !0),
|
|
1786
|
-
e.store.zeroColumn ? (
|
|
1806
|
+
e.store.zeroColumn ? (x(), C("th", {
|
|
1787
1807
|
key: 1,
|
|
1788
1808
|
class: oe([[
|
|
1789
1809
|
e.store.hasPinnedColumns ? "sticky-index" : "",
|
|
@@ -1791,20 +1811,20 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
1791
1811
|
e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1792
1812
|
], "list-index"])
|
|
1793
1813
|
}, null, 2)) : K("", !0),
|
|
1794
|
-
s.value &&
|
|
1795
|
-
(
|
|
1796
|
-
key: `filter-${
|
|
1797
|
-
class: oe(`${
|
|
1798
|
-
style: me(e.store.getHeaderCellStyle(
|
|
1814
|
+
s.value && a.value === "after-index" ? (x(), C("th", Lo)) : K("", !0),
|
|
1815
|
+
(x(!0), C(he, null, ye(e.columns, (n, f) => (x(), C("th", {
|
|
1816
|
+
key: `filter-${n.name}`,
|
|
1817
|
+
class: oe(`${n.pinned ? "sticky-column" : ""}`),
|
|
1818
|
+
style: me(e.store.getHeaderCellStyle(n))
|
|
1799
1819
|
}, [
|
|
1800
|
-
|
|
1820
|
+
n.filterable ? (x(), ve(Io, {
|
|
1801
1821
|
key: 0,
|
|
1802
|
-
column:
|
|
1803
|
-
"col-index":
|
|
1822
|
+
column: n,
|
|
1823
|
+
"col-index": f,
|
|
1804
1824
|
store: e.store
|
|
1805
1825
|
}, null, 8, ["column", "col-index", "store"])) : K("", !0)
|
|
1806
1826
|
], 6))), 128)),
|
|
1807
|
-
s.value &&
|
|
1827
|
+
s.value && a.value === "end" ? (x(), C("th", Oo)) : K("", !0)
|
|
1808
1828
|
])) : K("", !0)
|
|
1809
1829
|
])) : K("", !0);
|
|
1810
1830
|
}
|
|
@@ -1814,56 +1834,56 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
1814
1834
|
store: {}
|
|
1815
1835
|
},
|
|
1816
1836
|
setup(e) {
|
|
1817
|
-
const t = re("amodal"), { width: s, height:
|
|
1837
|
+
const t = re("amodal"), { width: s, height: a } = Ie(t), u = A(() => {
|
|
1818
1838
|
if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
|
|
1819
|
-
const
|
|
1820
|
-
if (!
|
|
1821
|
-
const o =
|
|
1822
|
-
let
|
|
1823
|
-
const
|
|
1824
|
-
|
|
1825
|
-
let
|
|
1826
|
-
return
|
|
1827
|
-
left: `${
|
|
1828
|
-
top: `${
|
|
1839
|
+
const i = e.store.modal.cell?.closest("table");
|
|
1840
|
+
if (!i) return {};
|
|
1841
|
+
const o = i.offsetHeight || 0, d = i.offsetWidth || 0;
|
|
1842
|
+
let n = e.store.modal.cell?.offsetTop || 0;
|
|
1843
|
+
const f = i.querySelector("thead")?.offsetHeight || 0;
|
|
1844
|
+
n += f, n = n + a.value < o ? n : n - (a.value + e.store.modal.height);
|
|
1845
|
+
let r = e.store.modal.cell?.offsetLeft || 0;
|
|
1846
|
+
return r = r + s.value <= d ? r : r - (s.value - e.store.modal.width), {
|
|
1847
|
+
left: `${r}px`,
|
|
1848
|
+
top: `${n}px`
|
|
1829
1849
|
};
|
|
1830
1850
|
});
|
|
1831
|
-
return (
|
|
1851
|
+
return (i, o) => (x(), C("div", {
|
|
1832
1852
|
ref: "amodal",
|
|
1833
1853
|
class: "amodal",
|
|
1834
1854
|
tabindex: "-1",
|
|
1835
|
-
style: me(
|
|
1855
|
+
style: me(u.value),
|
|
1836
1856
|
onClick: o[0] || (o[0] = Se(() => {
|
|
1837
1857
|
}, ["stop"])),
|
|
1838
1858
|
onInput: o[1] || (o[1] = Se(() => {
|
|
1839
1859
|
}, ["stop"]))
|
|
1840
1860
|
}, [
|
|
1841
|
-
fe(
|
|
1861
|
+
fe(i.$slots, "default")
|
|
1842
1862
|
], 36));
|
|
1843
1863
|
}
|
|
1844
1864
|
}), Vo = (e) => {
|
|
1845
1865
|
const t = e.id || Tn();
|
|
1846
|
-
return
|
|
1847
|
-
const
|
|
1848
|
-
const
|
|
1849
|
-
for (let b = 0; b <
|
|
1850
|
-
const
|
|
1851
|
-
|
|
1866
|
+
return Jt(`table-${t}`, () => {
|
|
1867
|
+
const a = () => {
|
|
1868
|
+
const l = [Object.assign({}, { rowModified: !1 })], c = /* @__PURE__ */ new Set();
|
|
1869
|
+
for (let b = 0; b < i.value.length; b++) {
|
|
1870
|
+
const I = i.value[b];
|
|
1871
|
+
I.parent !== null && I.parent !== void 0 && c.add(I.parent);
|
|
1852
1872
|
}
|
|
1853
|
-
const m = (b) =>
|
|
1854
|
-
for (let
|
|
1855
|
-
if (
|
|
1873
|
+
const m = (b) => i.value[b]?.gantt !== void 0, $ = (b) => {
|
|
1874
|
+
for (let I = 0; I < i.value.length; I++)
|
|
1875
|
+
if (i.value[I].parent === b && (m(I) || $(I)))
|
|
1856
1876
|
return !0;
|
|
1857
1877
|
return !1;
|
|
1858
|
-
},
|
|
1859
|
-
const
|
|
1878
|
+
}, B = (b) => {
|
|
1879
|
+
const I = o.value, N = I.view === "tree" || I.view === "tree-gantt" ? I.defaultTreeExpansion : void 0;
|
|
1860
1880
|
if (!N) return !0;
|
|
1861
1881
|
switch (N) {
|
|
1862
1882
|
case "root":
|
|
1863
1883
|
return !1;
|
|
1864
1884
|
// Only root nodes are visible, all children start collapsed
|
|
1865
1885
|
case "branch":
|
|
1866
|
-
return
|
|
1886
|
+
return $(b);
|
|
1867
1887
|
case "leaf":
|
|
1868
1888
|
return !0;
|
|
1869
1889
|
// All nodes should be expanded
|
|
@@ -1871,284 +1891,295 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
1871
1891
|
return !0;
|
|
1872
1892
|
}
|
|
1873
1893
|
};
|
|
1874
|
-
for (let b = 0; b <
|
|
1875
|
-
const
|
|
1876
|
-
|
|
1877
|
-
childrenOpen:
|
|
1894
|
+
for (let b = 0; b < i.value.length; b++) {
|
|
1895
|
+
const I = i.value[b], N = I.parent === null || I.parent === void 0, ee = c.has(b);
|
|
1896
|
+
l[b] = {
|
|
1897
|
+
childrenOpen: B(b),
|
|
1878
1898
|
expanded: !1,
|
|
1879
|
-
indent:
|
|
1899
|
+
indent: I.indent || 0,
|
|
1880
1900
|
isParent: ee,
|
|
1881
1901
|
isRoot: N,
|
|
1882
1902
|
rowModified: !1,
|
|
1883
1903
|
open: N,
|
|
1884
1904
|
// This will be recalculated later for non-root nodes
|
|
1885
|
-
parent:
|
|
1905
|
+
parent: I.parent
|
|
1886
1906
|
};
|
|
1887
1907
|
}
|
|
1888
|
-
return
|
|
1889
|
-
},
|
|
1890
|
-
const
|
|
1891
|
-
for (const [
|
|
1892
|
-
for (const [
|
|
1893
|
-
|
|
1894
|
-
return
|
|
1895
|
-
}),
|
|
1908
|
+
return l;
|
|
1909
|
+
}, u = z(e.columns), i = z(e.rows), o = z(e.config || {}), d = z({}), n = z({}), f = A(() => {
|
|
1910
|
+
const l = {};
|
|
1911
|
+
for (const [c, m] of u.value.entries())
|
|
1912
|
+
for (const [$, B] of i.value.entries())
|
|
1913
|
+
l[`${c}:${$}`] = B[m.name];
|
|
1914
|
+
return l;
|
|
1915
|
+
}), r = A({
|
|
1896
1916
|
get: () => {
|
|
1897
|
-
const
|
|
1898
|
-
for (let
|
|
1899
|
-
|
|
1900
|
-
if (
|
|
1901
|
-
const
|
|
1902
|
-
const
|
|
1903
|
-
if (
|
|
1917
|
+
const l = a();
|
|
1918
|
+
for (let c = 0; c < l.length; c++)
|
|
1919
|
+
d.value[c] && (l[c].rowModified = d.value[c]), n.value[c] && (n.value[c].childrenOpen !== void 0 && (l[c].childrenOpen = n.value[c].childrenOpen), n.value[c].expanded !== void 0 && (l[c].expanded = n.value[c].expanded));
|
|
1920
|
+
if (M.value) {
|
|
1921
|
+
const c = (m, $) => {
|
|
1922
|
+
const B = $[m];
|
|
1923
|
+
if (B.isRoot || B.parent === null || B.parent === void 0)
|
|
1904
1924
|
return !0;
|
|
1905
|
-
const b =
|
|
1906
|
-
return b < 0 || b >=
|
|
1925
|
+
const b = B.parent;
|
|
1926
|
+
return b < 0 || b >= $.length ? !1 : ($[b].childrenOpen || !1) && c(b, $);
|
|
1907
1927
|
};
|
|
1908
|
-
for (let m = 0; m <
|
|
1909
|
-
|
|
1928
|
+
for (let m = 0; m < l.length; m++)
|
|
1929
|
+
l[m].isRoot || (l[m].open = c(m, l));
|
|
1910
1930
|
}
|
|
1911
|
-
return
|
|
1931
|
+
return l;
|
|
1912
1932
|
},
|
|
1913
|
-
set: (
|
|
1914
|
-
JSON.stringify(
|
|
1933
|
+
set: (l) => {
|
|
1934
|
+
JSON.stringify(l) !== JSON.stringify(r.value) && (r.value = l);
|
|
1915
1935
|
}
|
|
1916
|
-
}),
|
|
1936
|
+
}), h = z(e.modal || { visible: !1 }), E = z({}), O = z([]), Z = z([]), w = z([]), v = z({
|
|
1917
1937
|
column: null,
|
|
1918
1938
|
direction: null
|
|
1919
|
-
}),
|
|
1920
|
-
const
|
|
1921
|
-
return
|
|
1922
|
-
}),
|
|
1939
|
+
}), g = z({}), p = A(() => u.value.some((l) => l.pinned)), y = A(() => o.value.view === "gantt" || o.value.view === "tree-gantt"), M = A(() => o.value.view === "tree" || o.value.view === "tree-gantt"), T = A(() => {
|
|
1940
|
+
const l = o.value;
|
|
1941
|
+
return l.view === "gantt" || l.view === "tree-gantt" ? l.dependencyGraph !== !1 : !0;
|
|
1942
|
+
}), R = A(() => `${Math.ceil(i.value.length / 100 + 1)}ch`), H = A(
|
|
1923
1943
|
() => o.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(o.value.view) : !1
|
|
1924
|
-
), X =
|
|
1925
|
-
let
|
|
1926
|
-
...
|
|
1944
|
+
), X = A(() => {
|
|
1945
|
+
let l = i.value.map((c, m) => ({
|
|
1946
|
+
...c,
|
|
1927
1947
|
originalIndex: m
|
|
1928
1948
|
}));
|
|
1929
|
-
if (Object.entries(
|
|
1930
|
-
const
|
|
1931
|
-
!
|
|
1932
|
-
const N =
|
|
1933
|
-
return _(N, m,
|
|
1949
|
+
if (Object.entries(g.value).forEach(([c, m]) => {
|
|
1950
|
+
const $ = parseInt(c), B = u.value[$];
|
|
1951
|
+
!B || !(m.value || m.startValue || m.endValue || B.filterType === "checkbox" && m.value !== void 0) || (l = l.filter((I) => {
|
|
1952
|
+
const N = I[B.name];
|
|
1953
|
+
return _(N, m, B);
|
|
1934
1954
|
}));
|
|
1935
1955
|
}), v.value.column !== null && v.value.direction) {
|
|
1936
|
-
const
|
|
1937
|
-
|
|
1938
|
-
let b =
|
|
1939
|
-
b == null && (b = ""),
|
|
1940
|
-
const N = Number(b), ee = Number(
|
|
1941
|
-
if (!isNaN(N) && !isNaN(ee) && b !== "" &&
|
|
1956
|
+
const c = u.value[v.value.column], m = v.value.direction;
|
|
1957
|
+
l.sort(($, B) => {
|
|
1958
|
+
let b = $[c.name], I = B[c.name];
|
|
1959
|
+
b == null && (b = ""), I == null && (I = "");
|
|
1960
|
+
const N = Number(b), ee = Number(I);
|
|
1961
|
+
if (!isNaN(N) && !isNaN(ee) && b !== "" && I !== "")
|
|
1942
1962
|
return m === "asc" ? N - ee : ee - N;
|
|
1943
1963
|
{
|
|
1944
|
-
const gt = String(b).toLowerCase(), mt = String(
|
|
1964
|
+
const gt = String(b).toLowerCase(), mt = String(I).toLowerCase();
|
|
1945
1965
|
return m === "asc" ? gt.localeCompare(mt) : mt.localeCompare(gt);
|
|
1946
1966
|
}
|
|
1947
1967
|
});
|
|
1948
1968
|
}
|
|
1949
|
-
return
|
|
1950
|
-
}), le = (
|
|
1951
|
-
const
|
|
1952
|
-
|
|
1953
|
-
...
|
|
1954
|
-
[
|
|
1969
|
+
return l;
|
|
1970
|
+
}), le = (l, c) => f.value[`${l}:${c}`], j = (l, c, m) => {
|
|
1971
|
+
const $ = `${l}:${c}`, B = u.value[l];
|
|
1972
|
+
f.value[$] !== m && (d.value[c] = !0), f.value[$] = m, i.value[c] = {
|
|
1973
|
+
...i.value[c],
|
|
1974
|
+
[B.name]: m
|
|
1955
1975
|
};
|
|
1956
|
-
},
|
|
1957
|
-
|
|
1958
|
-
}, ue = (
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1961
|
-
}, ae = (
|
|
1962
|
-
const
|
|
1976
|
+
}, J = (l) => {
|
|
1977
|
+
i.value = l;
|
|
1978
|
+
}, ue = (l, c, m) => {
|
|
1979
|
+
const $ = `${l}:${c}`;
|
|
1980
|
+
f.value[$] !== m && (d.value[c] = !0, E.value[$] = m);
|
|
1981
|
+
}, ae = (l) => {
|
|
1982
|
+
const c = u.value.indexOf(l) === u.value.length - 1, m = o.value.fullWidth ? l.resizable && !c : l.resizable;
|
|
1963
1983
|
return {
|
|
1964
|
-
width:
|
|
1965
|
-
textAlign:
|
|
1984
|
+
width: l.width || "40ch",
|
|
1985
|
+
textAlign: l.align || "center",
|
|
1966
1986
|
...m && {
|
|
1967
1987
|
resize: "horizontal",
|
|
1968
1988
|
overflow: "hidden",
|
|
1969
1989
|
whiteSpace: "nowrap"
|
|
1970
1990
|
}
|
|
1971
1991
|
};
|
|
1972
|
-
}, Ae = (
|
|
1973
|
-
if (
|
|
1974
|
-
const
|
|
1975
|
-
|
|
1976
|
-
...
|
|
1977
|
-
width: `${
|
|
1992
|
+
}, Ae = (l, c) => {
|
|
1993
|
+
if (l < 0 || l >= u.value.length) return;
|
|
1994
|
+
const $ = Math.max(c, 40);
|
|
1995
|
+
u.value[l] = {
|
|
1996
|
+
...u.value[l],
|
|
1997
|
+
width: `${$}px`
|
|
1978
1998
|
};
|
|
1979
|
-
}, ke = (
|
|
1980
|
-
const
|
|
1981
|
-
return
|
|
1982
|
-
}, Oe = (
|
|
1983
|
-
if (
|
|
1984
|
-
const
|
|
1985
|
-
|
|
1986
|
-
...
|
|
1987
|
-
childrenOpen:
|
|
1988
|
-
},
|
|
1999
|
+
}, ke = (l) => {
|
|
2000
|
+
const c = i.value[l];
|
|
2001
|
+
return y.value && c.gantt !== void 0;
|
|
2002
|
+
}, Oe = (l) => !M.value || r.value[l].isRoot || r.value[l].open, Ve = (l) => !M.value && o.value.view !== "list-expansion" ? "" : M.value && (r.value[l].isRoot || r.value[l].isParent) ? r.value[l].childrenOpen ? "▼" : "►" : o.value.view === "list-expansion" ? r.value[l].expanded ? "▼" : "►" : "", Be = (l) => {
|
|
2003
|
+
if (M.value) {
|
|
2004
|
+
const c = n.value[l] || {}, $ = !(c.childrenOpen ?? r.value[l].childrenOpen);
|
|
2005
|
+
n.value[l] = {
|
|
2006
|
+
...c,
|
|
2007
|
+
childrenOpen: $
|
|
2008
|
+
}, $ || Te(l);
|
|
1989
2009
|
} else if (o.value.view === "list-expansion") {
|
|
1990
|
-
const
|
|
1991
|
-
|
|
1992
|
-
...
|
|
2010
|
+
const c = n.value[l] || {}, m = c.expanded ?? r.value[l].expanded;
|
|
2011
|
+
n.value[l] = {
|
|
2012
|
+
...c,
|
|
1993
2013
|
expanded: !m
|
|
1994
2014
|
};
|
|
1995
2015
|
}
|
|
1996
|
-
}, Te = (
|
|
1997
|
-
for (let
|
|
1998
|
-
if (
|
|
1999
|
-
const m =
|
|
2000
|
-
|
|
2016
|
+
}, Te = (l) => {
|
|
2017
|
+
for (let c = 0; c < i.value.length; c++)
|
|
2018
|
+
if (r.value[c].parent === l) {
|
|
2019
|
+
const m = n.value[c] || {};
|
|
2020
|
+
n.value[c] = {
|
|
2001
2021
|
...m,
|
|
2002
2022
|
childrenOpen: !1
|
|
2003
|
-
}, Te(
|
|
2023
|
+
}, Te(c);
|
|
2024
|
+
}
|
|
2025
|
+
}, Pe = (l, c) => {
|
|
2026
|
+
const m = le(l, c);
|
|
2027
|
+
return k(l, c, m);
|
|
2028
|
+
}, k = (l, c, m) => {
|
|
2029
|
+
const $ = u.value[l], B = i.value[c], b = $.format;
|
|
2030
|
+
if (!b)
|
|
2031
|
+
switch ($.fieldtype) {
|
|
2032
|
+
case "Check":
|
|
2033
|
+
return m ? "✓" : "✗";
|
|
2034
|
+
case "Date":
|
|
2035
|
+
return m != null ? new Date(m).toLocaleDateString() : m;
|
|
2036
|
+
case "Datetime":
|
|
2037
|
+
return m != null ? new Date(m).toLocaleString() : m;
|
|
2038
|
+
default:
|
|
2039
|
+
return m;
|
|
2004
2040
|
}
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
},
|
|
2009
|
-
const
|
|
2010
|
-
|
|
2011
|
-
},
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
const u = x.value.findIndex((m) => m.id === a);
|
|
2027
|
-
u >= 0 && x.value.splice(u, 1);
|
|
2028
|
-
}, S = (a, u, m) => {
|
|
2029
|
-
const R = x.value.find((M) => M.id === a), P = x.value.find((M) => M.id === u);
|
|
2030
|
-
if (!R || !P)
|
|
2041
|
+
return typeof b == "function" ? b(m, { table: f.value, row: B, column: $ }) : typeof b == "string" ? Function(`"use strict";return (${b})`)()(m, { table: f.value, row: B, column: $ }) : m;
|
|
2042
|
+
}, L = (l) => {
|
|
2043
|
+
l.target instanceof Node && h.value.parent?.contains(l.target) || h.value.visible && (h.value.visible = !1);
|
|
2044
|
+
}, F = (l, c) => c && l === 0 && c > 0 ? `${c}ch` : "inherit", q = (l) => {
|
|
2045
|
+
const c = i.value[l.rowIndex]?.gantt;
|
|
2046
|
+
c && (l.type === "resize" ? l.edge === "start" ? (c.startIndex = l.newStart, c.endIndex = l.end, c.colspan = c.endIndex - c.startIndex) : l.edge === "end" && (c.startIndex = l.start, c.endIndex = l.newEnd, c.colspan = c.endIndex - c.startIndex) : l.type === "bar" && (c.startIndex = l.newStart, c.endIndex = l.newEnd, c.colspan = c.endIndex - c.startIndex));
|
|
2047
|
+
}, G = (l) => {
|
|
2048
|
+
const c = O.value.findIndex((m) => m.id === l.id);
|
|
2049
|
+
c >= 0 ? O.value[c] = l : O.value.push(l);
|
|
2050
|
+
}, te = (l) => {
|
|
2051
|
+
const c = O.value.findIndex((m) => m.id === l);
|
|
2052
|
+
c >= 0 && O.value.splice(c, 1);
|
|
2053
|
+
}, pe = (l) => {
|
|
2054
|
+
const c = Z.value.findIndex((m) => m.id === l.id);
|
|
2055
|
+
c >= 0 ? Z.value[c] = l : Z.value.push(l);
|
|
2056
|
+
}, Me = (l) => {
|
|
2057
|
+
const c = Z.value.findIndex((m) => m.id === l);
|
|
2058
|
+
c >= 0 && Z.value.splice(c, 1);
|
|
2059
|
+
}, S = (l, c, m) => {
|
|
2060
|
+
const $ = Z.value.find((I) => I.id === l), B = Z.value.find((I) => I.id === c);
|
|
2061
|
+
if (!$ || !B)
|
|
2031
2062
|
return console.warn("Cannot create connection: handle not found"), null;
|
|
2032
2063
|
const b = {
|
|
2033
|
-
id: `connection-${
|
|
2064
|
+
id: `connection-${l}-${c}`,
|
|
2034
2065
|
from: {
|
|
2035
|
-
barId:
|
|
2036
|
-
side:
|
|
2066
|
+
barId: $.barId,
|
|
2067
|
+
side: $.side
|
|
2037
2068
|
},
|
|
2038
2069
|
to: {
|
|
2039
|
-
barId:
|
|
2040
|
-
side:
|
|
2070
|
+
barId: B.barId,
|
|
2071
|
+
side: B.side
|
|
2041
2072
|
},
|
|
2042
2073
|
style: m?.style,
|
|
2043
2074
|
label: m?.label
|
|
2044
2075
|
};
|
|
2045
|
-
return
|
|
2046
|
-
},
|
|
2047
|
-
const
|
|
2048
|
-
return
|
|
2049
|
-
}, U = (
|
|
2050
|
-
if (
|
|
2076
|
+
return w.value.push(b), b;
|
|
2077
|
+
}, V = (l) => {
|
|
2078
|
+
const c = w.value.findIndex((m) => m.id === l);
|
|
2079
|
+
return c >= 0 ? (w.value.splice(c, 1), !0) : !1;
|
|
2080
|
+
}, U = (l) => w.value.filter((c) => c.from.barId === l || c.to.barId === l), Y = (l) => Z.value.filter((c) => c.barId === l), Q = (l) => {
|
|
2081
|
+
if (u.value[l].sortable === !1) return;
|
|
2051
2082
|
let m;
|
|
2052
|
-
v.value.column ===
|
|
2053
|
-
}, _ = (
|
|
2054
|
-
const
|
|
2055
|
-
if (!
|
|
2056
|
-
switch (
|
|
2083
|
+
v.value.column === l && v.value.direction === "asc" ? m = "desc" : m = "asc", v.value.column = l, v.value.direction = m;
|
|
2084
|
+
}, _ = (l, c, m) => {
|
|
2085
|
+
const $ = m.filterType || "text", B = c.value;
|
|
2086
|
+
if (!B && $ !== "dateRange" && $ !== "checkbox") return !0;
|
|
2087
|
+
switch ($) {
|
|
2057
2088
|
case "text":
|
|
2058
|
-
return (typeof
|
|
2089
|
+
return (typeof l == "object" && l !== null ? Object.values(l).join(" ") : String(l || "")).toLowerCase().includes(String(B).toLowerCase());
|
|
2059
2090
|
case "number": {
|
|
2060
|
-
const b = Number(
|
|
2061
|
-
return !isNaN(b) && !isNaN(
|
|
2091
|
+
const b = Number(l), I = Number(B);
|
|
2092
|
+
return !isNaN(b) && !isNaN(I) && b === I;
|
|
2062
2093
|
}
|
|
2063
2094
|
case "select":
|
|
2064
|
-
return
|
|
2095
|
+
return l === B;
|
|
2065
2096
|
case "checkbox":
|
|
2066
|
-
return
|
|
2097
|
+
return B === !0 ? !!l : !0;
|
|
2067
2098
|
case "date": {
|
|
2068
2099
|
let b;
|
|
2069
|
-
if (typeof
|
|
2070
|
-
const N = new Date(
|
|
2100
|
+
if (typeof l == "number") {
|
|
2101
|
+
const N = new Date(l), ee = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2071
2102
|
b = new Date(ee, N.getMonth(), N.getDate());
|
|
2072
2103
|
} else
|
|
2073
|
-
b = new Date(String(
|
|
2074
|
-
const
|
|
2075
|
-
return b.toDateString() ===
|
|
2104
|
+
b = new Date(String(l));
|
|
2105
|
+
const I = new Date(String(B));
|
|
2106
|
+
return b.toDateString() === I.toDateString();
|
|
2076
2107
|
}
|
|
2077
2108
|
case "dateRange": {
|
|
2078
|
-
const b =
|
|
2079
|
-
if (!b && !
|
|
2109
|
+
const b = c.startValue, I = c.endValue;
|
|
2110
|
+
if (!b && !I) return !0;
|
|
2080
2111
|
let N;
|
|
2081
|
-
if (typeof
|
|
2082
|
-
const ee = new Date(
|
|
2112
|
+
if (typeof l == "number") {
|
|
2113
|
+
const ee = new Date(l), ht = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2083
2114
|
N = new Date(ht, ee.getMonth(), ee.getDate());
|
|
2084
2115
|
} else
|
|
2085
|
-
N = new Date(String(
|
|
2086
|
-
return !(b && N < new Date(String(b)) ||
|
|
2116
|
+
N = new Date(String(l));
|
|
2117
|
+
return !(b && N < new Date(String(b)) || I && N > new Date(String(I)));
|
|
2087
2118
|
}
|
|
2088
2119
|
default:
|
|
2089
2120
|
return !0;
|
|
2090
2121
|
}
|
|
2091
|
-
}, ne = (
|
|
2092
|
-
!
|
|
2093
|
-
}, se = (
|
|
2094
|
-
delete
|
|
2095
|
-
}, Ze = (
|
|
2122
|
+
}, ne = (l, c) => {
|
|
2123
|
+
!c.value && !c.startValue && !c.endValue ? delete g.value[l] : g.value[l] = c;
|
|
2124
|
+
}, se = (l) => {
|
|
2125
|
+
delete g.value[l];
|
|
2126
|
+
}, Ze = (l, c = "end") => {
|
|
2096
2127
|
const m = {};
|
|
2097
|
-
for (const
|
|
2098
|
-
m[
|
|
2099
|
-
|
|
2100
|
-
let
|
|
2101
|
-
return
|
|
2128
|
+
for (const B of u.value)
|
|
2129
|
+
m[B.name] = "";
|
|
2130
|
+
l && Object.assign(m, l);
|
|
2131
|
+
let $;
|
|
2132
|
+
return c === "start" ? ($ = 0, i.value.unshift(m)) : c === "end" ? ($ = i.value.length, i.value.push(m)) : ($ = Math.max(0, Math.min(c, i.value.length)), i.value.splice($, 0, m)), $;
|
|
2102
2133
|
};
|
|
2103
2134
|
return {
|
|
2104
2135
|
// state
|
|
2105
|
-
columns:
|
|
2136
|
+
columns: u,
|
|
2106
2137
|
config: o,
|
|
2107
|
-
connectionHandles:
|
|
2108
|
-
connectionPaths:
|
|
2109
|
-
display:
|
|
2110
|
-
filterState:
|
|
2111
|
-
ganttBars:
|
|
2112
|
-
modal:
|
|
2113
|
-
rows:
|
|
2138
|
+
connectionHandles: Z,
|
|
2139
|
+
connectionPaths: w,
|
|
2140
|
+
display: r,
|
|
2141
|
+
filterState: g,
|
|
2142
|
+
ganttBars: O,
|
|
2143
|
+
modal: h,
|
|
2144
|
+
rows: i,
|
|
2114
2145
|
sortState: v,
|
|
2115
|
-
table:
|
|
2146
|
+
table: f,
|
|
2116
2147
|
updates: E,
|
|
2117
2148
|
// getters
|
|
2118
2149
|
filteredRows: X,
|
|
2119
|
-
hasPinnedColumns:
|
|
2120
|
-
isGanttView:
|
|
2121
|
-
isTreeView:
|
|
2122
|
-
isDependencyGraphEnabled:
|
|
2123
|
-
numberedRowWidth:
|
|
2124
|
-
zeroColumn:
|
|
2150
|
+
hasPinnedColumns: p,
|
|
2151
|
+
isGanttView: y,
|
|
2152
|
+
isTreeView: M,
|
|
2153
|
+
isDependencyGraphEnabled: T,
|
|
2154
|
+
numberedRowWidth: R,
|
|
2155
|
+
zeroColumn: H,
|
|
2125
2156
|
// actions
|
|
2126
2157
|
addRow: Ze,
|
|
2127
2158
|
clearFilter: se,
|
|
2128
|
-
closeModal:
|
|
2159
|
+
closeModal: L,
|
|
2129
2160
|
createConnection: S,
|
|
2130
|
-
deleteConnection:
|
|
2131
|
-
deleteRow: (
|
|
2132
|
-
if (
|
|
2161
|
+
deleteConnection: V,
|
|
2162
|
+
deleteRow: (l) => {
|
|
2163
|
+
if (l < 0 || l >= i.value.length)
|
|
2133
2164
|
return null;
|
|
2134
|
-
const [
|
|
2135
|
-
delete
|
|
2136
|
-
const m = {},
|
|
2137
|
-
for (const [
|
|
2138
|
-
const
|
|
2139
|
-
|
|
2165
|
+
const [c] = i.value.splice(l, 1);
|
|
2166
|
+
delete d.value[l], delete n.value[l];
|
|
2167
|
+
const m = {}, $ = {};
|
|
2168
|
+
for (const [B, b] of Object.entries(d.value)) {
|
|
2169
|
+
const I = parseInt(B);
|
|
2170
|
+
I > l ? m[I - 1] = b : m[I] = b;
|
|
2140
2171
|
}
|
|
2141
|
-
for (const [
|
|
2142
|
-
const
|
|
2143
|
-
|
|
2172
|
+
for (const [B, b] of Object.entries(n.value)) {
|
|
2173
|
+
const I = parseInt(B);
|
|
2174
|
+
I > l ? $[I - 1] = b : $[I] = b;
|
|
2144
2175
|
}
|
|
2145
|
-
return
|
|
2176
|
+
return d.value = m, n.value = $, c;
|
|
2146
2177
|
},
|
|
2147
|
-
duplicateRow: (
|
|
2148
|
-
if (
|
|
2178
|
+
duplicateRow: (l) => {
|
|
2179
|
+
if (l < 0 || l >= i.value.length)
|
|
2149
2180
|
return -1;
|
|
2150
|
-
const
|
|
2151
|
-
return
|
|
2181
|
+
const c = i.value[l], m = JSON.parse(JSON.stringify(c)), $ = l + 1;
|
|
2182
|
+
return i.value.splice($, 0, m), $;
|
|
2152
2183
|
},
|
|
2153
2184
|
getCellData: le,
|
|
2154
2185
|
getCellDisplayValue: Pe,
|
|
@@ -2158,33 +2189,33 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
2158
2189
|
getHeaderCellStyle: ae,
|
|
2159
2190
|
getIndent: F,
|
|
2160
2191
|
getRowExpandSymbol: Ve,
|
|
2161
|
-
insertRowAbove: (
|
|
2162
|
-
const m = Math.max(0,
|
|
2163
|
-
return Ze(
|
|
2192
|
+
insertRowAbove: (l, c) => {
|
|
2193
|
+
const m = Math.max(0, l);
|
|
2194
|
+
return Ze(c, m);
|
|
2164
2195
|
},
|
|
2165
|
-
insertRowBelow: (
|
|
2166
|
-
const m = Math.min(
|
|
2167
|
-
return Ze(
|
|
2196
|
+
insertRowBelow: (l, c) => {
|
|
2197
|
+
const m = Math.min(l + 1, i.value.length);
|
|
2198
|
+
return Ze(c, m);
|
|
2168
2199
|
},
|
|
2169
2200
|
isRowGantt: ke,
|
|
2170
2201
|
isRowVisible: Oe,
|
|
2171
|
-
moveRow: (
|
|
2172
|
-
if (
|
|
2202
|
+
moveRow: (l, c) => {
|
|
2203
|
+
if (l < 0 || l >= i.value.length || c < 0 || c >= i.value.length || l === c)
|
|
2173
2204
|
return !1;
|
|
2174
|
-
const [m] =
|
|
2175
|
-
|
|
2176
|
-
const
|
|
2177
|
-
for (const [b,
|
|
2205
|
+
const [m] = i.value.splice(l, 1);
|
|
2206
|
+
i.value.splice(c, 0, m);
|
|
2207
|
+
const $ = {}, B = {};
|
|
2208
|
+
for (const [b, I] of Object.entries(d.value)) {
|
|
2178
2209
|
const N = parseInt(b);
|
|
2179
2210
|
let ee = N;
|
|
2180
|
-
N ===
|
|
2211
|
+
N === l ? ee = c : l < c ? N > l && N <= c && (ee = N - 1) : N >= c && N < l && (ee = N + 1), $[ee] = I;
|
|
2181
2212
|
}
|
|
2182
|
-
for (const [b,
|
|
2213
|
+
for (const [b, I] of Object.entries(n.value)) {
|
|
2183
2214
|
const N = parseInt(b);
|
|
2184
2215
|
let ee = N;
|
|
2185
|
-
N ===
|
|
2216
|
+
N === l ? ee = c : l < c ? N > l && N <= c && (ee = N - 1) : N >= c && N < l && (ee = N + 1), B[ee] = I;
|
|
2186
2217
|
}
|
|
2187
|
-
return
|
|
2218
|
+
return d.value = $, n.value = B, !0;
|
|
2188
2219
|
},
|
|
2189
2220
|
registerConnectionHandle: pe,
|
|
2190
2221
|
registerGanttBar: G,
|
|
@@ -2196,132 +2227,140 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
2196
2227
|
toggleRowExpand: Be,
|
|
2197
2228
|
unregisterConnectionHandle: Me,
|
|
2198
2229
|
unregisterGanttBar: te,
|
|
2199
|
-
updateGanttBar:
|
|
2200
|
-
updateRows:
|
|
2230
|
+
updateGanttBar: q,
|
|
2231
|
+
updateRows: J
|
|
2201
2232
|
};
|
|
2202
2233
|
})();
|
|
2203
|
-
}
|
|
2234
|
+
};
|
|
2235
|
+
function Bo(e) {
|
|
2236
|
+
return e.filter((t) => !t.hidden && t.fieldtype).map(({ fieldname: t, hidden: s, ...a }) => ({
|
|
2237
|
+
name: t,
|
|
2238
|
+
...a
|
|
2239
|
+
}));
|
|
2240
|
+
}
|
|
2241
|
+
const Po = {
|
|
2204
2242
|
class: "atable-container",
|
|
2205
2243
|
style: { position: "relative" }
|
|
2206
|
-
},
|
|
2244
|
+
}, Zo = /* @__PURE__ */ we({
|
|
2207
2245
|
__name: "ATable",
|
|
2208
2246
|
props: /* @__PURE__ */ yt({
|
|
2209
2247
|
id: { default: "" },
|
|
2210
|
-
config: { default: () => new Object() }
|
|
2248
|
+
config: { default: () => new Object() },
|
|
2249
|
+
schema: { default: () => [] }
|
|
2211
2250
|
}, {
|
|
2212
2251
|
rows: { required: !0 },
|
|
2213
2252
|
rowsModifiers: {},
|
|
2214
|
-
columns: {
|
|
2253
|
+
columns: {},
|
|
2215
2254
|
columnsModifiers: {}
|
|
2216
2255
|
}),
|
|
2217
2256
|
emits: /* @__PURE__ */ yt(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move"], ["update:rows", "update:columns"]),
|
|
2218
2257
|
setup(e, { expose: t, emit: s }) {
|
|
2219
|
-
const
|
|
2220
|
-
n.$onAction(({ name:
|
|
2221
|
-
if (
|
|
2222
|
-
const [
|
|
2223
|
-
|
|
2224
|
-
|
|
2258
|
+
const a = wt(e, "rows"), u = wt(e, "columns"), i = s, o = re("table"), d = u.value?.length ? u.value : Bo(e.schema ?? []), n = Vo({ columns: d, rows: a.value, id: e.id, config: e.config });
|
|
2259
|
+
n.$onAction(({ name: w, store: v, args: g, after: p }) => {
|
|
2260
|
+
if (w === "setCellData" || w === "setCellText") {
|
|
2261
|
+
const [y, M, T] = g, R = v.getCellData(y, M);
|
|
2262
|
+
p(() => {
|
|
2263
|
+
a.value = [...v.rows], i("cellUpdate", { colIndex: y, rowIndex: M, newValue: T, oldValue: R });
|
|
2225
2264
|
});
|
|
2226
|
-
} else if (
|
|
2227
|
-
const [
|
|
2228
|
-
let
|
|
2229
|
-
|
|
2230
|
-
|
|
2265
|
+
} else if (w === "updateGanttBar") {
|
|
2266
|
+
const [y] = g;
|
|
2267
|
+
let M = !1;
|
|
2268
|
+
y.type === "resize" ? M = y.oldColspan !== y.newColspan : y.type === "bar" && (M = y.oldStart !== y.newStart || y.oldEnd !== y.newEnd), M && p(() => {
|
|
2269
|
+
i("gantt:drag", y);
|
|
2231
2270
|
});
|
|
2232
|
-
} else
|
|
2233
|
-
|
|
2271
|
+
} else w === "resizeColumn" && p(() => {
|
|
2272
|
+
u.value = [...v.columns], i("columns:update", [...v.columns]);
|
|
2234
2273
|
});
|
|
2235
2274
|
}), ce(
|
|
2236
|
-
() =>
|
|
2237
|
-
(
|
|
2238
|
-
JSON.stringify(
|
|
2275
|
+
() => a.value,
|
|
2276
|
+
(w) => {
|
|
2277
|
+
JSON.stringify(w) !== JSON.stringify(n.rows) && (n.rows = [...w]);
|
|
2239
2278
|
},
|
|
2240
2279
|
{ deep: !0 }
|
|
2241
2280
|
), ce(
|
|
2242
|
-
|
|
2243
|
-
(
|
|
2244
|
-
JSON.stringify(
|
|
2281
|
+
u,
|
|
2282
|
+
(w) => {
|
|
2283
|
+
JSON.stringify(w) !== JSON.stringify(n.columns) && (n.columns = [...w], i("columns:update", [...w]));
|
|
2245
2284
|
},
|
|
2246
2285
|
{ deep: !0 }
|
|
2247
2286
|
), He(() => {
|
|
2248
|
-
|
|
2287
|
+
u.value?.some((w) => w.pinned) && (r(), n.isTreeView && Ht(o, r, { childList: !0, subtree: !0 }));
|
|
2249
2288
|
});
|
|
2250
|
-
const
|
|
2251
|
-
const
|
|
2252
|
-
for (const [
|
|
2253
|
-
const
|
|
2254
|
-
|
|
2289
|
+
const f = A(() => n.columns.filter((w) => w.pinned).length), r = () => {
|
|
2290
|
+
const w = o.value, v = w?.rows[0], g = w?.rows[1], p = v ? Array.from(v.cells) : [];
|
|
2291
|
+
for (const [y, M] of p.entries()) {
|
|
2292
|
+
const T = g?.cells[y];
|
|
2293
|
+
T && (M.style.width = `${T.offsetWidth}px`);
|
|
2255
2294
|
}
|
|
2256
|
-
for (const
|
|
2257
|
-
let
|
|
2258
|
-
const
|
|
2259
|
-
for (const
|
|
2260
|
-
(
|
|
2261
|
-
|
|
2295
|
+
for (const y of w?.rows || []) {
|
|
2296
|
+
let M = 0;
|
|
2297
|
+
const T = [];
|
|
2298
|
+
for (const R of y.cells)
|
|
2299
|
+
(R.classList.contains("sticky-column") || R.classList.contains("sticky-index")) && (R.style.left = `${M}px`, M += R.offsetWidth, T.push(R));
|
|
2300
|
+
T.length > 0 && T[T.length - 1].classList.add("sticky-column-edge");
|
|
2262
2301
|
}
|
|
2263
2302
|
};
|
|
2264
|
-
window.addEventListener("keydown", (
|
|
2265
|
-
if (
|
|
2303
|
+
window.addEventListener("keydown", (w) => {
|
|
2304
|
+
if (w.key === "Escape" && n.modal.visible) {
|
|
2266
2305
|
n.modal.visible = !1;
|
|
2267
|
-
const
|
|
2268
|
-
|
|
2269
|
-
|
|
2306
|
+
const v = n.modal.parent;
|
|
2307
|
+
v && at().then(() => {
|
|
2308
|
+
v.focus();
|
|
2270
2309
|
});
|
|
2271
2310
|
}
|
|
2272
2311
|
});
|
|
2273
|
-
const
|
|
2274
|
-
if (!
|
|
2312
|
+
const h = (w) => {
|
|
2313
|
+
if (!w.gantt || f.value === 0)
|
|
2275
2314
|
return n.columns;
|
|
2276
|
-
const
|
|
2277
|
-
for (let
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2315
|
+
const v = [];
|
|
2316
|
+
for (let g = 0; g < f.value; g++) {
|
|
2317
|
+
const p = { ...n.columns[g] };
|
|
2318
|
+
p.originalIndex = g, v.push(p);
|
|
2280
2319
|
}
|
|
2281
|
-
return
|
|
2282
|
-
...n.columns[
|
|
2320
|
+
return v.push({
|
|
2321
|
+
...n.columns[f.value],
|
|
2283
2322
|
isGantt: !0,
|
|
2284
|
-
colspan:
|
|
2285
|
-
originalIndex:
|
|
2323
|
+
colspan: w.gantt?.colspan || n.columns.length - f.value,
|
|
2324
|
+
originalIndex: f.value,
|
|
2286
2325
|
width: "auto"
|
|
2287
2326
|
// TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
|
|
2288
|
-
}),
|
|
2289
|
-
},
|
|
2290
|
-
|
|
2291
|
-
},
|
|
2292
|
-
|
|
2293
|
-
},
|
|
2294
|
-
switch (
|
|
2327
|
+
}), v;
|
|
2328
|
+
}, E = (w) => {
|
|
2329
|
+
i("connection:event", { type: "create", connection: w });
|
|
2330
|
+
}, O = (w) => {
|
|
2331
|
+
i("connection:event", { type: "delete", connection: w });
|
|
2332
|
+
}, Z = (w, v) => {
|
|
2333
|
+
switch (w) {
|
|
2295
2334
|
case "add": {
|
|
2296
|
-
const
|
|
2297
|
-
|
|
2335
|
+
const g = n.addRow({}, v + 1), p = n.rows[g];
|
|
2336
|
+
a.value = [...n.rows], i("row:add", { rowIndex: g, row: p });
|
|
2298
2337
|
break;
|
|
2299
2338
|
}
|
|
2300
2339
|
case "delete": {
|
|
2301
|
-
const
|
|
2302
|
-
|
|
2340
|
+
const g = n.deleteRow(v);
|
|
2341
|
+
g && (a.value = [...n.rows], i("row:delete", { rowIndex: v, row: g }));
|
|
2303
2342
|
break;
|
|
2304
2343
|
}
|
|
2305
2344
|
case "duplicate": {
|
|
2306
|
-
const
|
|
2307
|
-
if (
|
|
2308
|
-
const
|
|
2309
|
-
|
|
2345
|
+
const g = n.duplicateRow(v);
|
|
2346
|
+
if (g >= 0) {
|
|
2347
|
+
const p = n.rows[g];
|
|
2348
|
+
a.value = [...n.rows], i("row:duplicate", { sourceIndex: v, newIndex: g, row: p });
|
|
2310
2349
|
}
|
|
2311
2350
|
break;
|
|
2312
2351
|
}
|
|
2313
2352
|
case "insertAbove": {
|
|
2314
|
-
const
|
|
2315
|
-
|
|
2353
|
+
const g = n.insertRowAbove(v), p = n.rows[g];
|
|
2354
|
+
a.value = [...n.rows], i("row:insert-above", { targetIndex: v, newIndex: g, row: p });
|
|
2316
2355
|
break;
|
|
2317
2356
|
}
|
|
2318
2357
|
case "insertBelow": {
|
|
2319
|
-
const
|
|
2320
|
-
|
|
2358
|
+
const g = n.insertRowBelow(v), p = n.rows[g];
|
|
2359
|
+
a.value = [...n.rows], i("row:insert-below", { targetIndex: v, newIndex: g, row: p });
|
|
2321
2360
|
break;
|
|
2322
2361
|
}
|
|
2323
2362
|
case "move": {
|
|
2324
|
-
|
|
2363
|
+
i("row:move", { fromIndex: v, toIndex: -1 });
|
|
2325
2364
|
break;
|
|
2326
2365
|
}
|
|
2327
2366
|
}
|
|
@@ -2339,59 +2378,59 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
2339
2378
|
insertRowAbove: n.insertRowAbove,
|
|
2340
2379
|
insertRowBelow: n.insertRowBelow,
|
|
2341
2380
|
moveRow: n.moveRow
|
|
2342
|
-
}), (
|
|
2343
|
-
de((
|
|
2381
|
+
}), (w, v) => (x(), C("div", Po, [
|
|
2382
|
+
de((x(), C("table", {
|
|
2344
2383
|
ref: "table",
|
|
2345
2384
|
class: "atable",
|
|
2346
2385
|
style: me({
|
|
2347
|
-
width:
|
|
2386
|
+
width: P(n).config.fullWidth ? "100%" : "auto"
|
|
2348
2387
|
})
|
|
2349
2388
|
}, [
|
|
2350
|
-
fe(
|
|
2389
|
+
fe(w.$slots, "header", { data: P(n) }, () => [
|
|
2351
2390
|
pt(Ot, {
|
|
2352
|
-
columns:
|
|
2353
|
-
store:
|
|
2391
|
+
columns: P(n).columns,
|
|
2392
|
+
store: P(n)
|
|
2354
2393
|
}, null, 8, ["columns", "store"])
|
|
2355
2394
|
], !0),
|
|
2356
2395
|
W("tbody", null, [
|
|
2357
|
-
fe(
|
|
2358
|
-
(
|
|
2359
|
-
key: `${
|
|
2360
|
-
row:
|
|
2361
|
-
"row-index":
|
|
2362
|
-
store:
|
|
2363
|
-
"onRow:action":
|
|
2396
|
+
fe(w.$slots, "body", { data: P(n) }, () => [
|
|
2397
|
+
(x(!0), C(he, null, ye(P(n).filteredRows, (g, p) => (x(), ve(Lt, {
|
|
2398
|
+
key: `${g.originalIndex}-${p}`,
|
|
2399
|
+
row: g,
|
|
2400
|
+
"row-index": g.originalIndex,
|
|
2401
|
+
store: P(n),
|
|
2402
|
+
"onRow:action": Z
|
|
2364
2403
|
}, {
|
|
2365
2404
|
default: xt(() => [
|
|
2366
|
-
(
|
|
2367
|
-
key:
|
|
2405
|
+
(x(!0), C(he, null, ye(h(g), (y, M) => (x(), C(he, {
|
|
2406
|
+
key: y.name
|
|
2368
2407
|
}, [
|
|
2369
|
-
|
|
2408
|
+
y.isGantt ? (x(), ve(We(y.ganttComponent || "AGanttCell"), {
|
|
2370
2409
|
key: 0,
|
|
2371
|
-
store:
|
|
2372
|
-
"columns-count":
|
|
2373
|
-
color:
|
|
2374
|
-
start:
|
|
2375
|
-
end:
|
|
2376
|
-
colspan:
|
|
2377
|
-
pinned:
|
|
2378
|
-
"row-index":
|
|
2379
|
-
"col-index":
|
|
2410
|
+
store: P(n),
|
|
2411
|
+
"columns-count": P(n).columns.length - f.value,
|
|
2412
|
+
color: g.gantt?.color,
|
|
2413
|
+
start: g.gantt?.startIndex,
|
|
2414
|
+
end: g.gantt?.endIndex,
|
|
2415
|
+
colspan: y.colspan,
|
|
2416
|
+
pinned: y.pinned,
|
|
2417
|
+
"row-index": g.originalIndex,
|
|
2418
|
+
"col-index": y.originalIndex ?? M,
|
|
2380
2419
|
style: me({
|
|
2381
|
-
textAlign:
|
|
2382
|
-
minWidth:
|
|
2383
|
-
width:
|
|
2420
|
+
textAlign: y?.align || "center",
|
|
2421
|
+
minWidth: y?.width || "40ch",
|
|
2422
|
+
width: P(n).config.fullWidth ? "auto" : null
|
|
2384
2423
|
}),
|
|
2385
|
-
"onConnection:create":
|
|
2386
|
-
}, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "row-index", "col-index", "style"])) : (
|
|
2424
|
+
"onConnection:create": E
|
|
2425
|
+
}, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "row-index", "col-index", "style"])) : (x(), ve(We(y.cellComponent || "ACell"), {
|
|
2387
2426
|
key: 1,
|
|
2388
|
-
store:
|
|
2389
|
-
pinned:
|
|
2390
|
-
"row-index":
|
|
2391
|
-
"col-index":
|
|
2427
|
+
store: P(n),
|
|
2428
|
+
pinned: y.pinned,
|
|
2429
|
+
"row-index": g.originalIndex,
|
|
2430
|
+
"col-index": M,
|
|
2392
2431
|
style: me({
|
|
2393
|
-
textAlign:
|
|
2394
|
-
width:
|
|
2432
|
+
textAlign: y?.align || "center",
|
|
2433
|
+
width: P(n).config.fullWidth ? "auto" : null
|
|
2395
2434
|
}),
|
|
2396
2435
|
spellcheck: "false"
|
|
2397
2436
|
}, null, 8, ["store", "pinned", "row-index", "col-index", "style"]))
|
|
@@ -2401,73 +2440,74 @@ const go = { class: "gantt-connection-overlay" }, mo = {
|
|
|
2401
2440
|
}, 1032, ["row", "row-index", "store"]))), 128))
|
|
2402
2441
|
], !0)
|
|
2403
2442
|
]),
|
|
2404
|
-
fe(
|
|
2405
|
-
fe(
|
|
2406
|
-
de(pt(Vt, { store:
|
|
2443
|
+
fe(w.$slots, "footer", { data: P(n) }, void 0, !0),
|
|
2444
|
+
fe(w.$slots, "modal", { data: P(n) }, () => [
|
|
2445
|
+
de(pt(Vt, { store: P(n) }, {
|
|
2407
2446
|
default: xt(() => [
|
|
2408
|
-
(
|
|
2409
|
-
key: `${
|
|
2410
|
-
"col-index":
|
|
2411
|
-
"row-index":
|
|
2412
|
-
store:
|
|
2413
|
-
},
|
|
2447
|
+
(x(), ve(We(P(n).modal.component), st({
|
|
2448
|
+
key: `${P(n).modal.rowIndex}:${P(n).modal.colIndex}`,
|
|
2449
|
+
"col-index": P(n).modal.colIndex,
|
|
2450
|
+
"row-index": P(n).modal.rowIndex,
|
|
2451
|
+
store: P(n)
|
|
2452
|
+
}, P(n).modal.componentProps), null, 16, ["col-index", "row-index", "store"]))
|
|
2414
2453
|
]),
|
|
2415
2454
|
_: 1
|
|
2416
2455
|
}, 8, ["store"]), [
|
|
2417
|
-
[it,
|
|
2456
|
+
[it, P(n).modal.visible]
|
|
2418
2457
|
])
|
|
2419
2458
|
], !0)
|
|
2420
2459
|
], 4)), [
|
|
2421
|
-
[
|
|
2460
|
+
[P(fo), P(n).closeModal]
|
|
2422
2461
|
]),
|
|
2423
|
-
|
|
2462
|
+
P(n).isGanttView && P(n).isDependencyGraphEnabled ? (x(), ve(bo, {
|
|
2424
2463
|
key: 0,
|
|
2425
|
-
store:
|
|
2426
|
-
"onConnection:delete":
|
|
2464
|
+
store: P(n),
|
|
2465
|
+
"onConnection:delete": O
|
|
2427
2466
|
}, null, 8, ["store"])) : K("", !0)
|
|
2428
2467
|
]));
|
|
2429
2468
|
}
|
|
2430
|
-
}),
|
|
2431
|
-
function
|
|
2432
|
-
return
|
|
2433
|
-
W("h2",
|
|
2469
|
+
}), No = /* @__PURE__ */ $e(Zo, [["__scopeId", "data-v-423f43d7"]]), Wo = {}, Fo = { class: "aloading" }, zo = { class: "aloading-header" };
|
|
2470
|
+
function Xo(e, t) {
|
|
2471
|
+
return x(), C("div", Fo, [
|
|
2472
|
+
W("h2", zo, [
|
|
2434
2473
|
fe(e.$slots, "default", {}, void 0, !0)
|
|
2435
2474
|
]),
|
|
2436
2475
|
t[0] || (t[0] = W("div", { class: "aloading-bar" }, null, -1))
|
|
2437
2476
|
]);
|
|
2438
2477
|
}
|
|
2439
|
-
const
|
|
2440
|
-
function
|
|
2441
|
-
return
|
|
2442
|
-
W("h2",
|
|
2478
|
+
const Go = /* @__PURE__ */ $e(Wo, [["render", Xo], ["__scopeId", "data-v-a930a25b"]]), Yo = {}, Uo = { class: "aloading" }, jo = { class: "aloading-header" };
|
|
2479
|
+
function Jo(e, t) {
|
|
2480
|
+
return x(), C("div", Uo, [
|
|
2481
|
+
W("h2", jo, [
|
|
2443
2482
|
fe(e.$slots, "default", {}, void 0, !0)
|
|
2444
2483
|
]),
|
|
2445
2484
|
t[0] || (t[0] = W("div", { class: "aloading-bar" }, null, -1))
|
|
2446
2485
|
]);
|
|
2447
2486
|
}
|
|
2448
|
-
const qo = /* @__PURE__ */ $e(
|
|
2449
|
-
function
|
|
2450
|
-
e.component("ACell", On), e.component("AExpansionRow", Nn), e.component("AGanttCell", Un), e.component("ARow", Lt), e.component("ARowActions",
|
|
2487
|
+
const qo = /* @__PURE__ */ $e(Yo, [["render", Jo], ["__scopeId", "data-v-e1165876"]]);
|
|
2488
|
+
function ol(e) {
|
|
2489
|
+
e.component("ACell", On), e.component("AExpansionRow", Nn), e.component("AGanttCell", Un), e.component("ARow", Lt), e.component("ARowActions", Je), e.component("ATable", No), e.component("ATableHeader", Ot), e.component("ATableLoading", Go), e.component("ATableLoadingBar", qo), e.component("ATableModal", Vt);
|
|
2451
2490
|
}
|
|
2452
2491
|
export {
|
|
2453
2492
|
On as ACell,
|
|
2454
2493
|
Nn as AExpansionRow,
|
|
2455
2494
|
Un as AGanttCell,
|
|
2456
2495
|
Lt as ARow,
|
|
2457
|
-
|
|
2458
|
-
|
|
2496
|
+
Je as ARowActions,
|
|
2497
|
+
No as ATable,
|
|
2459
2498
|
Ot as ATableHeader,
|
|
2460
|
-
|
|
2499
|
+
Go as ATableLoading,
|
|
2461
2500
|
qo as ATableLoadingBar,
|
|
2462
2501
|
Vt as ATableModal,
|
|
2463
2502
|
jn as AddIcon,
|
|
2464
|
-
|
|
2465
|
-
|
|
2503
|
+
Jn as DeleteIcon,
|
|
2504
|
+
qn as DuplicateIcon,
|
|
2466
2505
|
Qn as InsertAboveIcon,
|
|
2467
2506
|
Kn as InsertBelowIcon,
|
|
2468
2507
|
_n as MoveIcon,
|
|
2469
2508
|
eo as actionIcons,
|
|
2470
2509
|
Vo as createTableStore,
|
|
2471
|
-
|
|
2510
|
+
ol as install,
|
|
2511
|
+
Bo as schemaToColumns
|
|
2472
2512
|
};
|
|
2473
2513
|
//# sourceMappingURL=atable.js.map
|