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