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