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