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