@ninebone/table 0.0.441 β 0.0.442
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/nine-table.js +226 -226
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +2 -2
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -2,16 +2,16 @@ var xe = Object.defineProperty;
|
|
|
2
2
|
var ve = (S) => {
|
|
3
3
|
throw TypeError(S);
|
|
4
4
|
};
|
|
5
|
-
var Ee = (S,
|
|
6
|
-
var h = (S,
|
|
7
|
-
var E = (S,
|
|
8
|
-
var t = (S,
|
|
9
|
-
var Se = (S,
|
|
5
|
+
var Ee = (S, n, e) => n in S ? xe(S, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : S[n] = e;
|
|
6
|
+
var h = (S, n) => xe(S, "name", { value: n, configurable: !0 });
|
|
7
|
+
var E = (S, n, e) => Ee(S, typeof n != "symbol" ? n + "" : n, e), we = (S, n, e) => n.has(S) || ve("Cannot " + e);
|
|
8
|
+
var t = (S, n, e) => (we(S, n, "read from private field"), e ? e.call(S) : n.get(S)), d = (S, n, e) => n.has(S) ? ve("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(S) : n.set(S, e), u = (S, n, e, i) => (we(S, n, "write to private field"), i ? i.call(S, e) : n.set(S, e), e);
|
|
9
|
+
var Se = (S, n, e, i) => ({
|
|
10
10
|
set _(s) {
|
|
11
|
-
u(S,
|
|
11
|
+
u(S, n, s, e);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
|
-
return t(S,
|
|
14
|
+
return t(S, n, i);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
import { trace as Re } from "@ninebone/util";
|
|
@@ -22,7 +22,7 @@ const ce = class ce extends Re.constructor {
|
|
|
22
22
|
};
|
|
23
23
|
h(ce, "Trace");
|
|
24
24
|
let Gt = ce;
|
|
25
|
-
const
|
|
25
|
+
const dt = new Gt();
|
|
26
26
|
var I, B, m, Y, F, V, At, X, qt;
|
|
27
27
|
const he = class he extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
@@ -35,16 +35,16 @@ const he = class he extends HTMLElement {
|
|
|
35
35
|
d(this, V);
|
|
36
36
|
d(this, At, /* @__PURE__ */ h(() => {
|
|
37
37
|
if (!t(this, I)) return;
|
|
38
|
-
const e = t(this, I).querySelector(".ng-container-body");
|
|
38
|
+
const e = t(this, I).querySelector(".ng-container-body .ng-part-body");
|
|
39
39
|
e && (u(this, V, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
41
|
})), t(this, V).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
43
43
|
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
44
44
|
if (!t(this, I) || !t(this, m) || t(this, B)) return;
|
|
45
|
-
const e = t(this, m).container,
|
|
46
|
-
if (!
|
|
47
|
-
const s = t(this, m).track, r = t(this, m).thumb, o = t(this, I).querySelector(".ng-container-bottom"), l = e.clientWidth, c =
|
|
45
|
+
const e = t(this, m).container, i = e.querySelector("table");
|
|
46
|
+
if (!i) return;
|
|
47
|
+
const s = t(this, m).track, r = t(this, m).thumb, o = t(this, I).querySelector(".ng-container-bottom"), l = e.clientWidth, c = i.scrollWidth;
|
|
48
48
|
if (l !== 0 && c > l)
|
|
49
49
|
o && (o.style.display = "flex");
|
|
50
50
|
else {
|
|
@@ -59,19 +59,19 @@ const he = class he extends HTMLElement {
|
|
|
59
59
|
let b = 0;
|
|
60
60
|
y > 0 && (b = parseInt(g / y * (a - f), 10)), b < 0 && (b = 0);
|
|
61
61
|
const p = a - f;
|
|
62
|
-
b > p && (b = p), r.style.left = `${b}px`,
|
|
62
|
+
b > p && (b = p), r.style.left = `${b}px`, t(this, m).left.disabled = b === 0, t(this, m).right.disabled = b >= p - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
64
|
d(this, X, /* @__PURE__ */ h((e) => {
|
|
65
65
|
if (!t(this, m)) return !1;
|
|
66
|
-
const
|
|
66
|
+
const i = t(this, m).container, s = i.querySelector("table");
|
|
67
67
|
if (!s) return !1;
|
|
68
68
|
const r = t(this, m).track.getBoundingClientRect(), o = t(this, m).thumb.clientWidth;
|
|
69
69
|
let l = e;
|
|
70
70
|
l < 0 && (l = 0);
|
|
71
71
|
const c = r.width - o;
|
|
72
72
|
l > c && (l = c), l = parseInt(l, 10), t(this, m).thumb.style.left = `${l}px`, t(this, m).left.disabled = l === 0, t(this, m).right.disabled = l >= c - 1;
|
|
73
|
-
const a =
|
|
74
|
-
return c > 0 && g > 0 && (
|
|
73
|
+
const a = i.clientWidth, g = s.scrollWidth - a;
|
|
74
|
+
return c > 0 && g > 0 && (i.scrollLeft = l / c * g), l > 0 && l < c - 1;
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
76
|
d(this, qt, /* @__PURE__ */ h(() => {
|
|
77
77
|
const e = /* @__PURE__ */ h((s) => {
|
|
@@ -83,11 +83,11 @@ const he = class he extends HTMLElement {
|
|
|
83
83
|
t(this, X).call(this, o + s) || clearInterval(t(this, F));
|
|
84
84
|
}, 50));
|
|
85
85
|
}, 500));
|
|
86
|
-
}, "delayScroll"),
|
|
86
|
+
}, "delayScroll"), i = /* @__PURE__ */ h(() => {
|
|
87
87
|
clearInterval(t(this, Y)), clearInterval(t(this, F));
|
|
88
88
|
}, "clearTimer");
|
|
89
89
|
["mouseup", "mouseleave", "touchend"].forEach((s) => {
|
|
90
|
-
t(this, m).left.addEventListener(s,
|
|
90
|
+
t(this, m).left.addEventListener(s, i), t(this, m).right.addEventListener(s, i), t(this, m).track.addEventListener(s, i);
|
|
91
91
|
}), t(this, m).left.addEventListener("mousedown", (s) => {
|
|
92
92
|
s.button === 0 && e(-20);
|
|
93
93
|
}), t(this, m).right.addEventListener("mousedown", (s) => {
|
|
@@ -105,7 +105,7 @@ const he = class he extends HTMLElement {
|
|
|
105
105
|
const c = t(this, m).track.getBoundingClientRect();
|
|
106
106
|
t(this, X).call(this, l.clientX - c.left - this.shiftX);
|
|
107
107
|
}, "onMouseMove"), o = /* @__PURE__ */ h(() => {
|
|
108
|
-
u(this, B, !1),
|
|
108
|
+
u(this, B, !1), i(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
|
|
109
109
|
}, "onMouseUp");
|
|
110
110
|
document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
|
|
111
111
|
});
|
|
@@ -177,18 +177,18 @@ const he = class he extends HTMLElement {
|
|
|
177
177
|
<button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
|
|
178
178
|
`;
|
|
179
179
|
const e = /* @__PURE__ */ h(() => {
|
|
180
|
-
const
|
|
181
|
-
if (!
|
|
180
|
+
const i = t(this, I).querySelector(".ng-container-body .ng-part-body");
|
|
181
|
+
if (!i) {
|
|
182
182
|
setTimeout(e, 10);
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
185
|
u(this, m, {
|
|
186
|
-
container:
|
|
186
|
+
container: i,
|
|
187
187
|
track: this.querySelector(".ng-scroll-track"),
|
|
188
188
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
189
189
|
left: this.querySelector(".ng-scroll-left"),
|
|
190
190
|
right: this.querySelector(".ng-scroll-right")
|
|
191
|
-
}),
|
|
191
|
+
}), i.addEventListener("scroll", () => {
|
|
192
192
|
t(this, B) || this.refresh();
|
|
193
193
|
}), t(this, qt).call(this), t(this, At).call(this), this.refresh();
|
|
194
194
|
}, "initWhenReady");
|
|
@@ -213,13 +213,13 @@ const de = class de extends HTMLElement {
|
|
|
213
213
|
d(this, gt, 0);
|
|
214
214
|
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
215
215
|
if (!t(this, N) || !t(this, R)) return;
|
|
216
|
-
const e = t(this, R).container,
|
|
216
|
+
const e = t(this, R).container, i = t(this, R).track, s = t(this, R).thumb, r = e.clientHeight, l = (t(this, N).data.get() || []).length, c = t(this, et).getRowHeight(), a = l * c;
|
|
217
217
|
if (a <= r) {
|
|
218
218
|
s.style.display = "none", t(this, R).top.disabled = !0, t(this, R).bottom.disabled = !0;
|
|
219
219
|
return;
|
|
220
220
|
} else
|
|
221
221
|
s.style.display = "block";
|
|
222
|
-
const f =
|
|
222
|
+
const f = i.clientHeight;
|
|
223
223
|
if (f <= 0) return;
|
|
224
224
|
const g = Math.max(Math.min(f * (r / a), f), 20);
|
|
225
225
|
s.style.height = `${g}px`;
|
|
@@ -230,7 +230,7 @@ const de = class de extends HTMLElement {
|
|
|
230
230
|
p < 0 && (p = 0), p > v && (p = v), s.style.top = `${p}px`, t(this, R).top.disabled = y <= 0, t(this, R).bottom.disabled = y >= b - 1;
|
|
231
231
|
}, "refresh"));
|
|
232
232
|
d(this, Tt, /* @__PURE__ */ h(() => {
|
|
233
|
-
const e = t(this, R).container,
|
|
233
|
+
const e = t(this, R).container, i = /* @__PURE__ */ h(() => {
|
|
234
234
|
const r = (t(this, N).data.get() || []).length, o = t(this, et).getRowHeight();
|
|
235
235
|
return r * o;
|
|
236
236
|
}, "getContentHeight");
|
|
@@ -241,7 +241,7 @@ const de = class de extends HTMLElement {
|
|
|
241
241
|
s.stopPropagation(), s.preventDefault(), u(this, U, !0), u(this, ft, s.clientY), u(this, gt, e.scrollTop);
|
|
242
242
|
const r = /* @__PURE__ */ h((l) => {
|
|
243
243
|
if (!t(this, U)) return;
|
|
244
|
-
const c = t(this, R).track.getBoundingClientRect(), a = t(this, R).thumb.clientHeight, g = c.height - a, y = l.clientY - t(this, ft), b = e.clientHeight, p =
|
|
244
|
+
const c = t(this, R).track.getBoundingClientRect(), a = t(this, R).thumb.clientHeight, g = c.height - a, y = l.clientY - t(this, ft), b = e.clientHeight, p = i(), v = Math.max(p - b, 1);
|
|
245
245
|
if (g > 0 && v > 0) {
|
|
246
246
|
const M = y / g * v;
|
|
247
247
|
let x = t(this, gt) + M;
|
|
@@ -255,7 +255,7 @@ const de = class de extends HTMLElement {
|
|
|
255
255
|
document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
|
|
256
256
|
}), t(this, R).track.addEventListener("mousedown", (s) => {
|
|
257
257
|
if (s.button !== 0 || s.target === t(this, R).thumb) return;
|
|
258
|
-
const r = t(this, R).track.getBoundingClientRect(), o = t(this, R).thumb.clientHeight, l = s.clientY - r.top - o / 2, a = r.height - o, f = e.clientHeight, g =
|
|
258
|
+
const r = t(this, R).track.getBoundingClientRect(), o = t(this, R).thumb.clientHeight, l = s.clientY - r.top - o / 2, a = r.height - o, f = e.clientHeight, g = i(), y = Math.max(g - f, 1);
|
|
259
259
|
if (a > 0 && y > 0) {
|
|
260
260
|
const b = Math.max(0, Math.min(1, l / a));
|
|
261
261
|
e.scrollTop = b * y;
|
|
@@ -334,13 +334,13 @@ const de = class de extends HTMLElement {
|
|
|
334
334
|
<button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
|
|
335
335
|
`;
|
|
336
336
|
const e = /* @__PURE__ */ h(() => {
|
|
337
|
-
const
|
|
338
|
-
if (!
|
|
337
|
+
const i = t(this, N).shadowRoot.querySelector(".ng-container-body .ng-part-body");
|
|
338
|
+
if (!i) {
|
|
339
339
|
setTimeout(e, 10);
|
|
340
340
|
return;
|
|
341
341
|
}
|
|
342
342
|
u(this, R, {
|
|
343
|
-
container:
|
|
343
|
+
container: i,
|
|
344
344
|
track: this.querySelector(".ng-scroll-track"),
|
|
345
345
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
346
346
|
top: this.querySelector(".ng-scroll-top"),
|
|
@@ -353,9 +353,9 @@ const de = class de extends HTMLElement {
|
|
|
353
353
|
N = new WeakMap(), et = new WeakMap(), U = new WeakMap(), R = new WeakMap(), ft = new WeakMap(), gt = new WeakMap(), Tt = new WeakMap(), h(de, "NineTableVScrollBar");
|
|
354
354
|
let Qt = de;
|
|
355
355
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Qt);
|
|
356
|
-
var z, w, W, T, P, j, ut,
|
|
356
|
+
var z, w, W, T, P, j, ut, nt, kt, Lt, Ct, bt, yt, Ht, Mt, pt, _t, it, mt, $t;
|
|
357
357
|
const fe = class fe {
|
|
358
|
-
constructor(
|
|
358
|
+
constructor(n) {
|
|
359
359
|
d(this, z);
|
|
360
360
|
d(this, w);
|
|
361
361
|
d(this, W, /* @__PURE__ */ new Map());
|
|
@@ -363,12 +363,12 @@ const fe = class fe {
|
|
|
363
363
|
d(this, P, null);
|
|
364
364
|
d(this, j, 0);
|
|
365
365
|
d(this, ut, 40);
|
|
366
|
-
d(this,
|
|
366
|
+
d(this, nt, !1);
|
|
367
367
|
d(this, kt, 3);
|
|
368
368
|
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
369
369
|
var e;
|
|
370
|
-
const
|
|
371
|
-
|
|
370
|
+
const n = t(this, w).querySelector(".ng-container-body .ng-part-body");
|
|
371
|
+
n && (t(this, bt).call(this), t(this, it).call(this, n.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
372
372
|
}, "refresh"));
|
|
373
373
|
E(this, "initialize", /* @__PURE__ */ h(() => {
|
|
374
374
|
u(this, T, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
|
|
@@ -381,56 +381,56 @@ const fe = class fe {
|
|
|
381
381
|
const a = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
|
|
382
382
|
t(this, W).set(s, a);
|
|
383
383
|
});
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
386
|
-
t(this, Ct).call(this,
|
|
384
|
+
const n = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), i = t(this, w).querySelector(".ng-container-right .ng-part-body");
|
|
385
|
+
if (n) {
|
|
386
|
+
t(this, Ct).call(this, n), t(this, pt).call(this), t(this, bt).call(this), t(this, it).call(this, n.scrollTop);
|
|
387
387
|
let s = !1;
|
|
388
388
|
const r = /* @__PURE__ */ h((o, l) => {
|
|
389
389
|
var c;
|
|
390
|
-
s || (s = !0,
|
|
390
|
+
s || (s = !0, n && n.scrollTop !== o && (n.scrollTop = o), e && e.scrollTop !== o && (e.scrollTop = o), i && i.scrollTop !== o && (i.scrollTop = o), t(this, it).call(this, o), (c = t(this, w).querySelector("nine-table-vscrollbar")) == null || c.refresh(), s = !1);
|
|
391
391
|
}, "syncScroll");
|
|
392
|
-
[
|
|
392
|
+
[n, e, i].forEach((o) => {
|
|
393
393
|
o && o.addEventListener("scroll", () => {
|
|
394
394
|
r(o.scrollTop);
|
|
395
395
|
});
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
398
|
}, "initialize"));
|
|
399
|
-
d(this, Lt, /* @__PURE__ */ h((
|
|
400
|
-
const
|
|
401
|
-
if (!
|
|
402
|
-
const s =
|
|
399
|
+
d(this, Lt, /* @__PURE__ */ h((n, e) => {
|
|
400
|
+
const i = t(this, W).get(e);
|
|
401
|
+
if (!i || i.length === 0) return;
|
|
402
|
+
const s = n.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
403
403
|
if (!s) return;
|
|
404
404
|
s.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
|
|
405
405
|
const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
|
|
406
406
|
for (let l = 0; l < t(this, ut); l++)
|
|
407
|
-
|
|
407
|
+
i.forEach((c) => {
|
|
408
408
|
o.appendChild(c.cloneNode(!0));
|
|
409
409
|
});
|
|
410
410
|
r ? r.before(o) : s.appendChild(o);
|
|
411
411
|
}, "#renderRows"));
|
|
412
|
-
d(this, Ct, /* @__PURE__ */ h((
|
|
412
|
+
d(this, Ct, /* @__PURE__ */ h((n) => {
|
|
413
413
|
if (t(this, T) !== null && t(this, T) > 0)
|
|
414
414
|
return t(this, T);
|
|
415
415
|
const e = t(this, W).get(".ng-container-body");
|
|
416
416
|
if (!e || e.length === 0) return 24;
|
|
417
|
-
const
|
|
418
|
-
if (!
|
|
419
|
-
|
|
420
|
-
const s =
|
|
417
|
+
const i = n.querySelector("tbody.bindable-tbody");
|
|
418
|
+
if (!i) return 24;
|
|
419
|
+
i.querySelectorAll("tr:not(.nodata)").forEach((y) => y.remove());
|
|
420
|
+
const s = i.querySelector("tr.nodata"), r = document.createDocumentFragment();
|
|
421
421
|
e.forEach((y) => {
|
|
422
422
|
r.appendChild(y.cloneNode(!0));
|
|
423
|
-
}), s ? s.before(r) :
|
|
423
|
+
}), s ? s.before(r) : i.appendChild(r);
|
|
424
424
|
const o = t(this, w), l = o.style.display, c = o.style.visibility, a = o.style.position;
|
|
425
425
|
(l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
|
|
426
426
|
let f = 0;
|
|
427
|
-
const g =
|
|
427
|
+
const g = i.querySelectorAll("tr:not(.nodata)");
|
|
428
428
|
return g.forEach((y) => {
|
|
429
429
|
f += y.offsetHeight || y.getBoundingClientRect().height;
|
|
430
430
|
}), g.forEach((y) => y.remove()), o.style.display = l, o.style.visibility = c, o.style.position = a, u(this, T, f > 0 ? f : 24), t(this, yt).call(this), t(this, T);
|
|
431
431
|
}, "#measureAndCacheHeight"));
|
|
432
432
|
d(this, bt, /* @__PURE__ */ h(() => {
|
|
433
|
-
const e = (t(this, z).data.get() || []).length,
|
|
433
|
+
const e = (t(this, z).data.get() || []).length, i = t(this, T) || 24, s = e * i;
|
|
434
434
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
|
|
435
435
|
const o = t(this, w).querySelector(r);
|
|
436
436
|
if (!o) return;
|
|
@@ -440,15 +440,15 @@ const fe = class fe {
|
|
|
440
440
|
}, "#updateVirtualScrollHeight"));
|
|
441
441
|
d(this, yt, /* @__PURE__ */ h(() => {
|
|
442
442
|
if (t(this, j) > 0 && t(this, T) > 0) {
|
|
443
|
-
const
|
|
444
|
-
u(this, ut,
|
|
443
|
+
const n = Math.ceil(t(this, j) / t(this, T));
|
|
444
|
+
u(this, ut, n + t(this, kt));
|
|
445
445
|
}
|
|
446
446
|
}, "#updateRowCount"));
|
|
447
447
|
d(this, Ht, /* @__PURE__ */ h(() => {
|
|
448
448
|
var l, c, a, f, g, y;
|
|
449
|
-
const
|
|
449
|
+
const n = t(this, w).querySelector(".ng-container-left .ng-part-body table"), e = t(this, w).querySelector(".ng-container-body .ng-part-body table"), i = t(this, w).querySelector(".ng-container-right .ng-part-body table");
|
|
450
450
|
if (e) {
|
|
451
|
-
const b =
|
|
451
|
+
const b = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), v = i ? Array.from(i.querySelectorAll("tbody tr")) : [], M = Math.max(b.length, p.length, v.length);
|
|
452
452
|
for (let x = 0; x < M; x++) {
|
|
453
453
|
const tt = [
|
|
454
454
|
((l = b[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
|
|
@@ -472,14 +472,14 @@ const fe = class fe {
|
|
|
472
472
|
}
|
|
473
473
|
}, "#syncRowHeights"));
|
|
474
474
|
d(this, Mt, /* @__PURE__ */ h(() => {
|
|
475
|
-
!t(this, w) || !(t(this, w) instanceof HTMLElement) || (u(this, P, new ResizeObserver((
|
|
476
|
-
for (const e of
|
|
477
|
-
const
|
|
478
|
-
if (!
|
|
475
|
+
!t(this, w) || !(t(this, w) instanceof HTMLElement) || (u(this, P, new ResizeObserver((n) => {
|
|
476
|
+
for (const e of n) {
|
|
477
|
+
const i = e.target;
|
|
478
|
+
if (!i.classList.contains("active")) continue;
|
|
479
479
|
const s = e.contentRect.height;
|
|
480
480
|
if (s > 0) {
|
|
481
481
|
let r = 0;
|
|
482
|
-
const o =
|
|
482
|
+
const o = i.querySelector(".ng-part-header"), l = i.querySelector(".ng-part-footer");
|
|
483
483
|
o && (r += o.offsetHeight), l && (r += l.offsetHeight);
|
|
484
484
|
const c = Math.max(s - r, 100);
|
|
485
485
|
t(this, j) !== c && (u(this, j, c), t(this, yt).call(this), t(this, T) !== null && t(this, pt).call(this));
|
|
@@ -488,21 +488,21 @@ const fe = class fe {
|
|
|
488
488
|
})), t(this, P).observe(t(this, w)));
|
|
489
489
|
}, "#initResizeObserver"));
|
|
490
490
|
d(this, pt, /* @__PURE__ */ h(() => {
|
|
491
|
-
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((
|
|
492
|
-
const e = t(this, w).querySelector(
|
|
493
|
-
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Lt).call(this, e,
|
|
491
|
+
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
492
|
+
const e = t(this, w).querySelector(n);
|
|
493
|
+
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Lt).call(this, e, n);
|
|
494
494
|
}), t(this, $t).call(this), t(this, Ht).call(this);
|
|
495
495
|
}, "#renderAllContainers"));
|
|
496
|
-
d(this, _t, /* @__PURE__ */ h((
|
|
496
|
+
d(this, _t, /* @__PURE__ */ h((n) => {
|
|
497
497
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
|
|
498
498
|
var a;
|
|
499
|
-
const
|
|
500
|
-
if (!
|
|
501
|
-
const s =
|
|
499
|
+
const i = t(this, w).querySelector(e);
|
|
500
|
+
if (!i) return;
|
|
501
|
+
const s = i.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
502
502
|
if (!s) return;
|
|
503
503
|
const r = Array.from(s.querySelectorAll("tr:not(.nodata)")), o = ((a = t(this, W).get(e)) == null ? void 0 : a.length) || 1, c = (t(this, z).data.get() || []).length;
|
|
504
504
|
r.forEach((f, g) => {
|
|
505
|
-
const y =
|
|
505
|
+
const y = n + Math.floor(g / o);
|
|
506
506
|
if (y >= c) {
|
|
507
507
|
f.style.display = "none";
|
|
508
508
|
return;
|
|
@@ -512,11 +512,11 @@ const fe = class fe {
|
|
|
512
512
|
});
|
|
513
513
|
});
|
|
514
514
|
}, "#adjustBufferRows"));
|
|
515
|
-
d(this,
|
|
515
|
+
d(this, it, /* @__PURE__ */ h((n) => {
|
|
516
516
|
var c;
|
|
517
517
|
const e = t(this, T);
|
|
518
518
|
if (!e || e <= 0) return;
|
|
519
|
-
const s = (t(this, z).data.get() || []).length, r = Math.max(0, Math.floor(
|
|
519
|
+
const s = (t(this, z).data.get() || []).length, r = Math.max(0, Math.floor(n / e)), o = r * e, l = ((c = t(this, W).get(".ng-container-body")) == null ? void 0 : c.length) || 1;
|
|
520
520
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
|
|
521
521
|
const f = t(this, w).querySelector(a);
|
|
522
522
|
if (!f) return;
|
|
@@ -531,21 +531,21 @@ const fe = class fe {
|
|
|
531
531
|
const M = t(this, z).data.get(v);
|
|
532
532
|
b.style.display = "", t(this, mt).call(this, b, M, v);
|
|
533
533
|
});
|
|
534
|
-
}), t(this,
|
|
535
|
-
t(this, _t).call(this, r), u(this,
|
|
534
|
+
}), t(this, nt) || (u(this, nt, !0), setTimeout(() => {
|
|
535
|
+
t(this, _t).call(this, r), u(this, nt, !1);
|
|
536
536
|
}, 0));
|
|
537
537
|
}, "#handleScroll"));
|
|
538
|
-
d(this, mt, /* @__PURE__ */ h((
|
|
539
|
-
|
|
538
|
+
d(this, mt, /* @__PURE__ */ h((n, e, i) => {
|
|
539
|
+
n.dataset.row = i, Array.from(n.cells).forEach((s, r) => {
|
|
540
540
|
const o = s.dataset.bind;
|
|
541
|
-
o && e && e[o] !== void 0 ? s.textContent = e[o] : s.textContent = e ? e[Object.keys(e)[r]] ?? `R${
|
|
541
|
+
o && e && e[o] !== void 0 ? s.textContent = e[o] : s.textContent = e ? e[Object.keys(e)[r]] ?? `R${i}C${r}` : `ν ${i + 1}`, s.dataset.row = i;
|
|
542
542
|
});
|
|
543
543
|
}, "#bindRowData"));
|
|
544
544
|
d(this, $t, /* @__PURE__ */ h(() => {
|
|
545
545
|
var c, a, f;
|
|
546
|
-
const
|
|
546
|
+
const n = t(this, w).querySelector(".ng-container-left .ng-part-header table"), e = t(this, w).querySelector(".ng-container-body .ng-part-header table"), i = t(this, w).querySelector(".ng-container-right .ng-part-header table");
|
|
547
547
|
if (!e) return;
|
|
548
|
-
const s =
|
|
548
|
+
const s = n ? Array.from(n.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = i ? Array.from(i.querySelectorAll("tr")) : [], l = Math.max(s.length, r.length, o.length);
|
|
549
549
|
for (let g = 0; g < l; g++) {
|
|
550
550
|
const y = [
|
|
551
551
|
((c = s[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
|
|
@@ -558,33 +558,33 @@ const fe = class fe {
|
|
|
558
558
|
E(this, "destroy", /* @__PURE__ */ h(() => {
|
|
559
559
|
t(this, P) && (t(this, P).disconnect(), u(this, P, null));
|
|
560
560
|
}, "destroy"));
|
|
561
|
-
u(this, z,
|
|
561
|
+
u(this, z, n.getRootNode().host), u(this, w, n), t(this, Mt).call(this);
|
|
562
562
|
}
|
|
563
563
|
getRowHeight() {
|
|
564
564
|
return t(this, T);
|
|
565
565
|
}
|
|
566
|
-
templateLength(
|
|
566
|
+
templateLength(n = ".ng-container-body") {
|
|
567
567
|
var e;
|
|
568
|
-
return ((e = t(this, W).get(
|
|
568
|
+
return ((e = t(this, W).get(n)) == null ? void 0 : e.length) || 1;
|
|
569
569
|
}
|
|
570
570
|
};
|
|
571
|
-
z = new WeakMap(), w = new WeakMap(), W = new WeakMap(), T = new WeakMap(), P = new WeakMap(), j = new WeakMap(), ut = new WeakMap(),
|
|
571
|
+
z = new WeakMap(), w = new WeakMap(), W = new WeakMap(), T = new WeakMap(), P = new WeakMap(), j = new WeakMap(), ut = new WeakMap(), nt = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), yt = new WeakMap(), Ht = new WeakMap(), Mt = new WeakMap(), pt = new WeakMap(), _t = new WeakMap(), it = new WeakMap(), mt = new WeakMap(), $t = new WeakMap(), h(fe, "RowManager");
|
|
572
572
|
let te = fe;
|
|
573
573
|
var It, st;
|
|
574
574
|
const _ = class _ {
|
|
575
575
|
/**
|
|
576
576
|
* π― λ μ΄μμ λ΄μ μ¬λ¬ rawTables λ°°μ΄μ μΌκ΄λ‘ λ°μ λ¨μΌ λ§μ€ν° ν
νλ¦ΏμΌλ‘ μ¬μ μ»΄νμΌν©λλ€.
|
|
577
577
|
*/
|
|
578
|
-
static compileAll(
|
|
579
|
-
return Array.isArray(
|
|
578
|
+
static compileAll(n) {
|
|
579
|
+
return Array.isArray(n) ? n.map((e) => _.compile(e)) : [];
|
|
580
580
|
}
|
|
581
581
|
/**
|
|
582
582
|
* π― λ¨μΌ μλ³Έ ν
μ΄λΈμ λ°μ κΈ°λ³Έ ꡬ쑰 보μ λ° 2μ°¨μ 격μ μΈλ±μ€ μ¬μ λΆμ¬ μλ£λ λ§μ€ν° ν
μ΄λΈ λ°ν
|
|
583
583
|
*/
|
|
584
|
-
static compile(
|
|
584
|
+
static compile(n) {
|
|
585
585
|
var s, r, o, l;
|
|
586
|
-
if (!
|
|
587
|
-
const e =
|
|
586
|
+
if (!n) return null;
|
|
587
|
+
const e = n.cloneNode(!0);
|
|
588
588
|
return t(s = _, It).call(s, e), t(r = _, st).call(r, e, "thead"), t(o = _, st).call(o, e, "tbody"), t(l = _, st).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((c, a) => {
|
|
589
589
|
const f = c.getAttribute("fixed");
|
|
590
590
|
f && e.querySelectorAll(`thead [data-col="${a}"], tbody [data-col="${a}"], tfoot [data-col="${a}"]`).forEach((g) => {
|
|
@@ -593,29 +593,29 @@ const _ = class _ {
|
|
|
593
593
|
}), e;
|
|
594
594
|
}
|
|
595
595
|
};
|
|
596
|
-
It = new WeakMap(), st = new WeakMap(), h(_, "TableCompiler"), d(_, It, /* @__PURE__ */ h((
|
|
597
|
-
if (!
|
|
598
|
-
const e =
|
|
599
|
-
for (let o = 0; o <
|
|
596
|
+
It = new WeakMap(), st = new WeakMap(), h(_, "TableCompiler"), d(_, It, /* @__PURE__ */ h((n) => {
|
|
597
|
+
if (!n.querySelector("colgroup")) {
|
|
598
|
+
const e = n.querySelector("tbody tr") || n.querySelector("tr"), i = e ? e.querySelectorAll("th, td").length : 1, s = document.createElement("colgroup"), r = Math.max(Math.floor(n.clientWidth / i), 100);
|
|
599
|
+
for (let o = 0; o < i; o++) {
|
|
600
600
|
const l = document.createElement("col");
|
|
601
601
|
l.setAttribute("width", r), s.appendChild(l);
|
|
602
602
|
}
|
|
603
|
-
|
|
603
|
+
n.prepend(s);
|
|
604
604
|
}
|
|
605
|
-
if (!
|
|
606
|
-
const e = document.createElement("thead"),
|
|
607
|
-
|
|
605
|
+
if (!n.querySelector("thead")) {
|
|
606
|
+
const e = document.createElement("thead"), i = n.querySelector("colgroup");
|
|
607
|
+
i ? i.after(e) : n.prepend(e);
|
|
608
608
|
}
|
|
609
|
-
|
|
610
|
-
}, "#ensureTableStructure")), d(_, st, /* @__PURE__ */ h((
|
|
611
|
-
const
|
|
609
|
+
n.classList.add("nine-table-element"), n.style.display = "table";
|
|
610
|
+
}, "#ensureTableStructure")), d(_, st, /* @__PURE__ */ h((n, e) => {
|
|
611
|
+
const i = Array.from(n.querySelectorAll(e + " tr")), s = Array.from(n.querySelectorAll(e + " th," + e + " td")), r = i.length;
|
|
612
612
|
if (r === 0 || s.length === 0) return;
|
|
613
613
|
let o = 0;
|
|
614
614
|
s.forEach((c) => {
|
|
615
615
|
o += c.colSpan || 1;
|
|
616
616
|
});
|
|
617
617
|
const l = Array.from(Array(r), () => Array(o).fill(null));
|
|
618
|
-
|
|
618
|
+
i.forEach((c) => {
|
|
619
619
|
const a = c.sectionRowIndex;
|
|
620
620
|
let f = 0;
|
|
621
621
|
Array.from(c.querySelectorAll("th,td")).forEach((g) => {
|
|
@@ -629,7 +629,7 @@ It = new WeakMap(), st = new WeakMap(), h(_, "TableCompiler"), d(_, It, /* @__PU
|
|
|
629
629
|
for (let v = 0; v < b; v++)
|
|
630
630
|
a + p < r && f + v < o && (l[a + p][f + v] = p === 0 && v === 0 ? "1" : "0");
|
|
631
631
|
});
|
|
632
|
-
}),
|
|
632
|
+
}), i.forEach((c) => {
|
|
633
633
|
const a = c.sectionRowIndex;
|
|
634
634
|
Array.from(c.querySelectorAll("th,td")).forEach((f) => {
|
|
635
635
|
for (let g = 0; g < l[a].length; g++)
|
|
@@ -642,23 +642,23 @@ It = new WeakMap(), st = new WeakMap(), h(_, "TableCompiler"), d(_, It, /* @__PU
|
|
|
642
642
|
}, "#resetColIndex"));
|
|
643
643
|
let ee = _;
|
|
644
644
|
var Wt, K, Z, Ot, zt, ot, Bt, Nt;
|
|
645
|
-
const
|
|
645
|
+
const ht = class ht extends HTMLElement {
|
|
646
646
|
constructor() {
|
|
647
647
|
super();
|
|
648
648
|
d(this, Wt);
|
|
649
649
|
d(this, K, null);
|
|
650
650
|
d(this, Z);
|
|
651
651
|
E(this, "invalidate", /* @__PURE__ */ h(() => {
|
|
652
|
-
var e,
|
|
653
|
-
t(this, Z).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (
|
|
652
|
+
var e, i;
|
|
653
|
+
t(this, Z).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (i = this.querySelector("nine-table-vscrollbar")) == null || i.refresh();
|
|
654
654
|
}, "invalidate"));
|
|
655
655
|
d(this, Ot, /* @__PURE__ */ h(() => {
|
|
656
656
|
[
|
|
657
657
|
{ selector: ".ng-container-body", type: null },
|
|
658
658
|
{ selector: ".ng-container-left", type: "left" },
|
|
659
659
|
{ selector: ".ng-container-right", type: "right" }
|
|
660
|
-
].forEach(({ selector:
|
|
661
|
-
const r = this.querySelector(
|
|
660
|
+
].forEach(({ selector: i, type: s }) => {
|
|
661
|
+
const r = this.querySelector(i);
|
|
662
662
|
if (!r) return;
|
|
663
663
|
r.innerHTML = "";
|
|
664
664
|
const o = document.createElement("div");
|
|
@@ -675,22 +675,22 @@ const dt = class dt extends HTMLElement {
|
|
|
675
675
|
}, "#renderSplitContainers"));
|
|
676
676
|
d(this, zt, /* @__PURE__ */ h(() => {
|
|
677
677
|
["left", "right", "body"].forEach((e) => {
|
|
678
|
-
const
|
|
679
|
-
if (!
|
|
678
|
+
const i = this.querySelector(`.ng-container-${e}`), s = i == null ? void 0 : i.querySelectorAll("table");
|
|
679
|
+
if (!i || !s || s.length === 0) return;
|
|
680
680
|
let r = 0;
|
|
681
681
|
s[0].querySelectorAll("col").forEach((o) => {
|
|
682
682
|
const l = parseInt(o.getAttribute("width"), 10);
|
|
683
683
|
isNaN(r) || (r += l);
|
|
684
|
-
}), e === "body" ?
|
|
684
|
+
}), e === "body" ? i.style.flex = "1" : (i.style.flex = `0 0 ${r}px`, i.style.width = `${r}px`);
|
|
685
685
|
});
|
|
686
686
|
}, "#updateContainerWidths"));
|
|
687
687
|
E(this, "generate", /* @__PURE__ */ h((e) => {
|
|
688
688
|
e && (u(this, K, ee.compile(e)), t(this, Ot).call(this), t(this, zt).call(this), t(this, Z).initialize(), setTimeout(() => {
|
|
689
|
-
var
|
|
690
|
-
(
|
|
689
|
+
var i;
|
|
690
|
+
(i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
|
|
691
691
|
}, 0));
|
|
692
692
|
}, "generate"));
|
|
693
|
-
d(this, ot, /* @__PURE__ */ h((e,
|
|
693
|
+
d(this, ot, /* @__PURE__ */ h((e, i, s) => {
|
|
694
694
|
const r = e.cloneNode(!0), o = r.querySelector("thead"), l = r.querySelector("tbody"), c = r.querySelector("tfoot");
|
|
695
695
|
if (s === "header") {
|
|
696
696
|
if (l && l.remove(), c && c.remove(), e.querySelector("tbody")) {
|
|
@@ -698,9 +698,9 @@ const dt = class dt extends HTMLElement {
|
|
|
698
698
|
f.className = "fixed-tbody", r.appendChild(f);
|
|
699
699
|
}
|
|
700
700
|
} else s === "body" ? (o && o.remove(), c && c.remove(), l && (l.className = "bindable-tbody")) : s === "footer" && (o && o.remove(), l && l.remove());
|
|
701
|
-
return
|
|
701
|
+
return i === "left" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
|
|
702
702
|
a.getAttribute("fixed") !== "left" && a.remove();
|
|
703
|
-
}) :
|
|
703
|
+
}) : i === "right" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
|
|
704
704
|
a.getAttribute("fixed") !== "right" && a.remove();
|
|
705
705
|
}) : r.querySelectorAll("[fixed=left], [fixed=right]").forEach((a) => {
|
|
706
706
|
a.remove();
|
|
@@ -708,18 +708,18 @@ const dt = class dt extends HTMLElement {
|
|
|
708
708
|
}, "#createSplitTable"));
|
|
709
709
|
E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, Z).getRowHeight(), "getRowHeight"));
|
|
710
710
|
E(this, "scrollToX", /* @__PURE__ */ h((e) => {
|
|
711
|
-
const
|
|
712
|
-
|
|
711
|
+
const i = this.querySelector(".ng-container-body .ng-part-body");
|
|
712
|
+
i && (i.scrollLeft = e);
|
|
713
713
|
}, "scrollToX"));
|
|
714
714
|
E(this, "scrollToY", /* @__PURE__ */ h((e) => {
|
|
715
|
-
const
|
|
716
|
-
|
|
715
|
+
const i = this.querySelector(".ng-container-body .ng-part-body");
|
|
716
|
+
i && (i.scrollTop = e);
|
|
717
717
|
}, "scrollToY"));
|
|
718
718
|
d(this, Bt, /* @__PURE__ */ h(() => {
|
|
719
719
|
t(this, Nt).call(this);
|
|
720
720
|
}, "#init"));
|
|
721
721
|
d(this, Nt, /* @__PURE__ */ h(() => {
|
|
722
|
-
const e =
|
|
722
|
+
const e = ht.SCROLLBAR_SIZE;
|
|
723
723
|
this.innerHTML = `
|
|
724
724
|
<style>
|
|
725
725
|
nine-table-sheet {
|
|
@@ -866,11 +866,11 @@ const dt = class dt extends HTMLElement {
|
|
|
866
866
|
t(this, Bt).call(this);
|
|
867
867
|
}
|
|
868
868
|
disconnectedCallback() {
|
|
869
|
-
this.innerHTML = "",
|
|
869
|
+
this.innerHTML = "", dt.log("NineTableSheet destroyed.");
|
|
870
870
|
}
|
|
871
871
|
};
|
|
872
|
-
Wt = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), ot = new WeakMap(), Bt = new WeakMap(), Nt = new WeakMap(), h(
|
|
873
|
-
let Rt =
|
|
872
|
+
Wt = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), ot = new WeakMap(), Bt = new WeakMap(), Nt = new WeakMap(), h(ht, "NineTableSheet"), E(ht, "SCROLLBAR_SIZE", 16);
|
|
873
|
+
let Rt = ht;
|
|
874
874
|
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Rt);
|
|
875
875
|
var Pt, xt;
|
|
876
876
|
const ge = class ge extends HTMLElement {
|
|
@@ -878,13 +878,13 @@ const ge = class ge extends HTMLElement {
|
|
|
878
878
|
super();
|
|
879
879
|
d(this, Pt, /* @__PURE__ */ h(() => {
|
|
880
880
|
var e;
|
|
881
|
-
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (
|
|
881
|
+
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (i) => {
|
|
882
882
|
var o;
|
|
883
|
-
const s =
|
|
883
|
+
const s = i.ctrlKey || i.metaKey || i.shiftKey, r = parseInt((o = i.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
|
|
884
884
|
t(this, xt).call(this, r, s);
|
|
885
885
|
}), t(this, xt).call(this, 0, !1);
|
|
886
886
|
}, "#init"));
|
|
887
|
-
d(this, xt, /* @__PURE__ */ h((e,
|
|
887
|
+
d(this, xt, /* @__PURE__ */ h((e, i = !1) => {
|
|
888
888
|
const s = /* @__PURE__ */ h(() => {
|
|
889
889
|
const f = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
890
890
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
|
|
@@ -895,7 +895,7 @@ const ge = class ge extends HTMLElement {
|
|
|
895
895
|
});
|
|
896
896
|
}, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
|
|
897
897
|
if (!l[e]) return;
|
|
898
|
-
if (!
|
|
898
|
+
if (!i)
|
|
899
899
|
l.forEach((f, g) => {
|
|
900
900
|
f.classList.toggle("active", g === e);
|
|
901
901
|
}), c.forEach((f, g) => {
|
|
@@ -921,27 +921,27 @@ const ge = class ge extends HTMLElement {
|
|
|
921
921
|
}
|
|
922
922
|
};
|
|
923
923
|
Pt = new WeakMap(), xt = new WeakMap(), h(ge, "NineTableSheets");
|
|
924
|
-
let
|
|
925
|
-
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets",
|
|
924
|
+
let ne = ge;
|
|
925
|
+
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", ne);
|
|
926
926
|
var k, Dt, vt, Yt;
|
|
927
927
|
const ue = class ue {
|
|
928
|
-
constructor(
|
|
928
|
+
constructor(n) {
|
|
929
929
|
d(this, k);
|
|
930
930
|
d(this, Dt, /* @__PURE__ */ h(() => {
|
|
931
|
-
t(this, Yt).call(this), new ResizeObserver((
|
|
932
|
-
for (let e of
|
|
931
|
+
t(this, Yt).call(this), new ResizeObserver((n) => {
|
|
932
|
+
for (let e of n)
|
|
933
933
|
t(this, k).getAttribute("auto-height") === "true" && t(this, vt).call(this);
|
|
934
934
|
}).observe(t(this, k));
|
|
935
935
|
}, "#init"));
|
|
936
936
|
d(this, vt, /* @__PURE__ */ h(() => {
|
|
937
937
|
var c, a;
|
|
938
|
-
const
|
|
939
|
-
if (
|
|
940
|
-
const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10,
|
|
938
|
+
const n = Array.from(t(this, k).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
939
|
+
if (n.length === 0) return;
|
|
940
|
+
const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, i = Math.max(...n.map((f) => f.getRowHeight())), s = (c = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, r = (a = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : a.getBoundingClientRect().height, o = Rt.SCROLLBAR_SIZE, l = e * i + s + r + o;
|
|
941
941
|
t(this, k).style.height = `${l}px`;
|
|
942
942
|
}, "#applyAutoHeight"));
|
|
943
943
|
d(this, Yt, /* @__PURE__ */ h(() => {
|
|
944
|
-
const e = Array.from(t(this, k).children).filter((c) => c.tagName === "TABLE"),
|
|
944
|
+
const e = Array.from(t(this, k).children).filter((c) => c.tagName === "TABLE"), i = t(this, k).getAttribute("auto-height") === "true", s = e.length, r = e.map((c, a) => {
|
|
945
945
|
const g = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, y = a < s - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
|
|
946
946
|
return g + y;
|
|
947
947
|
}).join(""), o = e.map((c, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
|
|
@@ -952,7 +952,7 @@ const ue = class ue {
|
|
|
952
952
|
flex-direction: column;
|
|
953
953
|
position: relative;
|
|
954
954
|
overflow: hidden;
|
|
955
|
-
height: ${
|
|
955
|
+
height: ${i ? "auto" : "100%"};
|
|
956
956
|
background: #fff;
|
|
957
957
|
}
|
|
958
958
|
|
|
@@ -1039,28 +1039,28 @@ const ue = class ue {
|
|
|
1039
1039
|
const l = t(this, k).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
1040
1040
|
l == null || l.forEach((c, a) => {
|
|
1041
1041
|
e[a] && setTimeout(() => {
|
|
1042
|
-
c.generate(e[a]),
|
|
1042
|
+
c.generate(e[a]), i && t(this, vt).call(this);
|
|
1043
1043
|
});
|
|
1044
1044
|
});
|
|
1045
1045
|
}, "#render"));
|
|
1046
|
-
u(this, k,
|
|
1046
|
+
u(this, k, n), t(this, Dt).call(this);
|
|
1047
1047
|
}
|
|
1048
1048
|
};
|
|
1049
1049
|
k = new WeakMap(), Dt = new WeakMap(), vt = new WeakMap(), Yt = new WeakMap(), h(ue, "LayoutManager");
|
|
1050
|
-
let
|
|
1050
|
+
let ie = ue;
|
|
1051
1051
|
var wt, rt;
|
|
1052
1052
|
const be = class be {
|
|
1053
|
-
constructor(
|
|
1053
|
+
constructor(n) {
|
|
1054
1054
|
d(this, wt);
|
|
1055
1055
|
d(this, rt, -1);
|
|
1056
1056
|
E(this, "count", /* @__PURE__ */ h(() => t(this, wt).rawRecords.length, "count"));
|
|
1057
|
-
u(this, wt,
|
|
1057
|
+
u(this, wt, n);
|
|
1058
1058
|
}
|
|
1059
1059
|
get at() {
|
|
1060
1060
|
return t(this, rt);
|
|
1061
1061
|
}
|
|
1062
|
-
set at(
|
|
1063
|
-
u(this, rt, parseInt(
|
|
1062
|
+
set at(n) {
|
|
1063
|
+
u(this, rt, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, rt)}"]`) && setTimeout(() => {
|
|
1064
1064
|
});
|
|
1065
1065
|
}
|
|
1066
1066
|
};
|
|
@@ -1068,7 +1068,7 @@ wt = new WeakMap(), rt = new WeakMap(), h(be, "ngRow");
|
|
|
1068
1068
|
let se = be;
|
|
1069
1069
|
var L, A, C, lt, Ft, D, Vt, G, St, Xt, Ut, at;
|
|
1070
1070
|
const H = class H {
|
|
1071
|
-
constructor(
|
|
1071
|
+
constructor(n, e) {
|
|
1072
1072
|
d(this, L);
|
|
1073
1073
|
d(this, A);
|
|
1074
1074
|
d(this, C, []);
|
|
@@ -1077,34 +1077,34 @@ const H = class H {
|
|
|
1077
1077
|
d(this, D, []);
|
|
1078
1078
|
d(this, Vt, /* @__PURE__ */ h(() => {
|
|
1079
1079
|
u(this, D, []);
|
|
1080
|
-
const
|
|
1081
|
-
Array.from(
|
|
1082
|
-
var
|
|
1083
|
-
t(this, D).push(((
|
|
1080
|
+
const n = t(this, L).template || [];
|
|
1081
|
+
Array.from(n).forEach((e) => {
|
|
1082
|
+
var i;
|
|
1083
|
+
t(this, D).push(((i = e.getBoundingClientRect) == null ? void 0 : i.call(e).height) || 24);
|
|
1084
1084
|
}), (t(this, A).rawRecords || []).forEach((e) => {
|
|
1085
1085
|
e.__ng || (e.__ng = t(this, St).call(this)), e.__ng.height = t(this, D).slice();
|
|
1086
1086
|
});
|
|
1087
1087
|
}, "#initialize"));
|
|
1088
1088
|
d(this, G, /* @__PURE__ */ h(() => {
|
|
1089
|
-
t(this, L).shadowRoot.querySelectorAll("nine-table-sheet").forEach((
|
|
1090
|
-
|
|
1089
|
+
t(this, L).shadowRoot.querySelectorAll("nine-table-sheet").forEach((n) => {
|
|
1090
|
+
n.invalidate();
|
|
1091
1091
|
});
|
|
1092
1092
|
}, "#invalidate"));
|
|
1093
|
-
E(this, "get", /* @__PURE__ */ h((
|
|
1093
|
+
E(this, "get", /* @__PURE__ */ h((n, e) => {
|
|
1094
1094
|
var r;
|
|
1095
|
-
const
|
|
1096
|
-
if (!
|
|
1097
|
-
if (
|
|
1098
|
-
if (
|
|
1095
|
+
const i = this.getValidData();
|
|
1096
|
+
if (!i || i.length <= 0) return;
|
|
1097
|
+
if (n == null) return t(this, at).call(this, i);
|
|
1098
|
+
if (n < 0 || n >= i.length) return null;
|
|
1099
1099
|
const s = typeof ((r = t(this, L).fields) == null ? void 0 : r.get) == "function" ? t(this, L).fields.get() : [];
|
|
1100
1100
|
if (e != null) {
|
|
1101
1101
|
const o = s.indexOf(e);
|
|
1102
|
-
return o >= 0 ? n
|
|
1102
|
+
return o >= 0 ? i[n].v[o] : null;
|
|
1103
1103
|
}
|
|
1104
|
-
return t(this, at).call(this, n
|
|
1104
|
+
return t(this, at).call(this, i[n]);
|
|
1105
1105
|
}, "get"));
|
|
1106
|
-
E(this, "set", /* @__PURE__ */ h((
|
|
1107
|
-
this.clear(), this.add(
|
|
1106
|
+
E(this, "set", /* @__PURE__ */ h((n) => {
|
|
1107
|
+
this.clear(), this.add(n, !1), t(this, G).call(this);
|
|
1108
1108
|
}, "set"));
|
|
1109
1109
|
d(this, St, /* @__PURE__ */ h(() => ({
|
|
1110
1110
|
rowState: H.ROW_STATE.EMPTY,
|
|
@@ -1119,66 +1119,66 @@ const H = class H {
|
|
|
1119
1119
|
u(this, C, []), u(this, lt, []), t(this, G).call(this);
|
|
1120
1120
|
}, "reset"));
|
|
1121
1121
|
E(this, "clear", /* @__PURE__ */ h(() => {
|
|
1122
|
-
var
|
|
1123
|
-
t(this, A).rawRecords = [], u(this, C, []), u(this, lt, []), (
|
|
1122
|
+
var n;
|
|
1123
|
+
t(this, A).rawRecords = [], u(this, C, []), u(this, lt, []), (n = t(this, A).viewRecords) != null && n.reset && t(this, A).viewRecords.reset();
|
|
1124
1124
|
}, "clear"));
|
|
1125
|
-
d(this, Xt, /* @__PURE__ */ h((
|
|
1125
|
+
d(this, Xt, /* @__PURE__ */ h((n) => {
|
|
1126
1126
|
var s;
|
|
1127
|
-
Array.isArray(
|
|
1128
|
-
const e = typeof ((s = t(this, L).fields) == null ? void 0 : s.get) == "function" ? t(this, L).fields.get() : Object.keys(
|
|
1129
|
-
return
|
|
1127
|
+
Array.isArray(n) || (n = [n]);
|
|
1128
|
+
const e = typeof ((s = t(this, L).fields) == null ? void 0 : s.get) == "function" ? t(this, L).fields.get() : Object.keys(n[0] || {}), i = [];
|
|
1129
|
+
return n.forEach((r) => {
|
|
1130
1130
|
const o = { v: [] };
|
|
1131
1131
|
e.forEach((l) => {
|
|
1132
1132
|
o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
|
|
1133
|
-
}),
|
|
1134
|
-
}),
|
|
1133
|
+
}), i.push(o);
|
|
1134
|
+
}), i;
|
|
1135
1135
|
}, "#json2Array"));
|
|
1136
|
-
d(this, Ut, /* @__PURE__ */ h((
|
|
1136
|
+
d(this, Ut, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
|
|
1137
1137
|
e.__ng = t(this, St).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = H.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
|
|
1138
|
-
}),
|
|
1139
|
-
E(this, "add", /* @__PURE__ */ h((
|
|
1140
|
-
|
|
1141
|
-
const
|
|
1142
|
-
t(this, A).rawRecords = t(this, A).rawRecords.concat(t(this, Ut).call(this,
|
|
1138
|
+
}), n), "#defaultInsert"));
|
|
1139
|
+
E(this, "add", /* @__PURE__ */ h((n, e = !0) => {
|
|
1140
|
+
n === void 0 && (n = {});
|
|
1141
|
+
const i = t(this, Xt).call(this, n);
|
|
1142
|
+
t(this, A).rawRecords = t(this, A).rawRecords.concat(t(this, Ut).call(this, i)), this.resetRecords();
|
|
1143
1143
|
const s = this.count() - 1;
|
|
1144
|
-
return e ||
|
|
1144
|
+
return e || i.forEach((r, o) => {
|
|
1145
1145
|
const l = t(this, A).rawRecords[s - o];
|
|
1146
1146
|
l && (l.__ng.rowState = H.ROW_STATE.EMPTY);
|
|
1147
1147
|
}), t(this, G).call(this), s;
|
|
1148
1148
|
}, "add"));
|
|
1149
|
-
E(this, "delete", /* @__PURE__ */ h((
|
|
1149
|
+
E(this, "delete", /* @__PURE__ */ h((n) => {
|
|
1150
1150
|
let e = [];
|
|
1151
|
-
Array.isArray(
|
|
1152
|
-
if (t(this, C)[
|
|
1153
|
-
const s = t(this, C)[
|
|
1154
|
-
t(this, C)[
|
|
1151
|
+
Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, A).host.row.at] : e = [parseInt(n, 10)], e.sort((i, s) => s - i).forEach((i) => {
|
|
1152
|
+
if (t(this, C)[i]) {
|
|
1153
|
+
const s = t(this, C)[i].__ng.rowid;
|
|
1154
|
+
t(this, C)[i].__ng.rowState === H.ROW_STATE.INSERT ? t(this, A).rawRecords = t(this, A).rawRecords.filter((r) => r.__ng.rowid !== s) : t(this, A).rawRecords.forEach((r) => {
|
|
1155
1155
|
r.__ng.rowid === s && (r.__ng.deleted = !0, r.__ng.rowState = H.ROW_STATE.DELETE);
|
|
1156
1156
|
});
|
|
1157
1157
|
}
|
|
1158
1158
|
}), this.resetRecords(), t(this, G).call(this);
|
|
1159
1159
|
}, "delete"));
|
|
1160
|
-
E(this, "setValue", /* @__PURE__ */ h((
|
|
1160
|
+
E(this, "setValue", /* @__PURE__ */ h((n, e, i) => {
|
|
1161
1161
|
var c;
|
|
1162
|
-
|
|
1162
|
+
n = parseInt(n, 10);
|
|
1163
1163
|
const r = (typeof ((c = t(this, L).fields) == null ? void 0 : c.get) == "function" ? t(this, L).fields.get() : []).indexOf(e);
|
|
1164
1164
|
if (r < 0) return;
|
|
1165
|
-
const o = this.getValidData()[
|
|
1165
|
+
const o = this.getValidData()[n];
|
|
1166
1166
|
if (!o) return;
|
|
1167
1167
|
const l = o.v[r];
|
|
1168
|
-
l !==
|
|
1168
|
+
l !== i && o.__ng.rowState !== H.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = H.ROW_STATE.UPDATE), o.v[r] = i;
|
|
1169
1169
|
}, "setValue"));
|
|
1170
1170
|
E(this, "resetRecords", /* @__PURE__ */ h(() => {
|
|
1171
|
-
u(this, lt, t(this, A).rawRecords.filter((
|
|
1172
|
-
|
|
1173
|
-
}), t(this, C).forEach((
|
|
1174
|
-
|
|
1171
|
+
u(this, lt, t(this, A).rawRecords.filter((n) => !n.__ng.deleted)), u(this, C, t(this, A).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, A).rawRecords.forEach((n, e) => {
|
|
1172
|
+
n.__ng.rowidx = e;
|
|
1173
|
+
}), t(this, C).forEach((n, e) => {
|
|
1174
|
+
n.__ng.i = e;
|
|
1175
1175
|
});
|
|
1176
1176
|
}, "resetRecords"));
|
|
1177
1177
|
E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, C).length === 0 && t(this, A).rawRecords.length > 0 && this.resetRecords(), t(this, C)), "getValidData"));
|
|
1178
|
-
d(this, at, /* @__PURE__ */ h((
|
|
1178
|
+
d(this, at, /* @__PURE__ */ h((n) => {
|
|
1179
1179
|
var o;
|
|
1180
|
-
if (!
|
|
1181
|
-
const e = !Array.isArray(
|
|
1180
|
+
if (!n) return n;
|
|
1181
|
+
const e = !Array.isArray(n), i = e ? [n] : n, s = typeof ((o = t(this, L).fields) == null ? void 0 : o.get) == "function" ? t(this, L).fields.get() : [], r = i.filter((l) => !l.__ng.deleted).map((l) => {
|
|
1182
1182
|
const c = {};
|
|
1183
1183
|
return s.forEach((a, f) => {
|
|
1184
1184
|
c[a] = l.v ? l.v[f] : l[a];
|
|
@@ -1187,13 +1187,13 @@ const H = class H {
|
|
|
1187
1187
|
return e ? r[0] : r;
|
|
1188
1188
|
}, "#conv"));
|
|
1189
1189
|
E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
|
|
1190
|
-
u(this, L,
|
|
1190
|
+
u(this, L, n), u(this, A, e), t(this, Vt).call(this);
|
|
1191
1191
|
}
|
|
1192
1192
|
get source() {
|
|
1193
1193
|
return t(this, at).call(this, t(this, A).rawRecords);
|
|
1194
1194
|
}
|
|
1195
|
-
set source(
|
|
1196
|
-
this.clear(), this.add(
|
|
1195
|
+
set source(n) {
|
|
1196
|
+
this.clear(), this.add(n, !1);
|
|
1197
1197
|
}
|
|
1198
1198
|
get nextId() {
|
|
1199
1199
|
return ++Se(this, Ft)._;
|
|
@@ -1216,22 +1216,22 @@ E(H, "ROW_STATE", {
|
|
|
1216
1216
|
let oe = H;
|
|
1217
1217
|
var J;
|
|
1218
1218
|
const ye = class ye {
|
|
1219
|
-
constructor(
|
|
1219
|
+
constructor(n) {
|
|
1220
1220
|
d(this, J);
|
|
1221
|
-
u(this, J,
|
|
1221
|
+
u(this, J, n), this.row = new se(this), this.data = new oe(t(this, J), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
1222
1222
|
var e;
|
|
1223
1223
|
(e = t(this, J).view) != null && e.redraw && t(this, J).view.redraw();
|
|
1224
1224
|
}, this.setDataSource = (e) => {
|
|
1225
1225
|
this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
|
|
1226
1226
|
}, this.getRowState = (e) => {
|
|
1227
1227
|
var s, r;
|
|
1228
|
-
const
|
|
1229
|
-
if (!(
|
|
1230
|
-
return (r = (s = this.data.getValidData()[
|
|
1228
|
+
const i = parseInt(e, 10);
|
|
1229
|
+
if (!(i >= this.data.count()))
|
|
1230
|
+
return (r = (s = this.data.getValidData()[i]) == null ? void 0 : s.__ng) == null ? void 0 : r.rowState;
|
|
1231
1231
|
}, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
|
|
1232
1232
|
this.row.at = e;
|
|
1233
|
-
}, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e,
|
|
1234
|
-
e = parseInt(e, 10), this.data.setValue(e,
|
|
1233
|
+
}, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, i) => this.data.get(e, i), this.setColumn = (e, i, s) => {
|
|
1234
|
+
e = parseInt(e, 10), this.data.setValue(e, i, s);
|
|
1235
1235
|
}, this.setDataSource([]);
|
|
1236
1236
|
}
|
|
1237
1237
|
};
|
|
@@ -1240,31 +1240,31 @@ let re = ye;
|
|
|
1240
1240
|
var ct, q, Et, jt;
|
|
1241
1241
|
const pe = class pe {
|
|
1242
1242
|
// π― μ΄μ { name: string, type: string } κ°μ²΄λ€μ λ°°μ΄λ‘ κ΄λ¦¬ν©λλ€.
|
|
1243
|
-
constructor(
|
|
1243
|
+
constructor(n) {
|
|
1244
1244
|
d(this, ct);
|
|
1245
1245
|
d(this, q, []);
|
|
1246
|
-
E(this, "add", /* @__PURE__ */ h((
|
|
1247
|
-
|
|
1248
|
-
t(this, q).some((s) => s.name ===
|
|
1246
|
+
E(this, "add", /* @__PURE__ */ h((n, e = "string") => {
|
|
1247
|
+
n.forEach((i) => {
|
|
1248
|
+
t(this, q).some((s) => s.name === i) || t(this, q).push({ name: i, type: e });
|
|
1249
1249
|
}), t(this, Et).call(this);
|
|
1250
1250
|
}, "add"));
|
|
1251
1251
|
d(this, Et, /* @__PURE__ */ h(() => {
|
|
1252
|
-
const
|
|
1252
|
+
const n = /* @__PURE__ */ new Map();
|
|
1253
1253
|
t(this, q).forEach((e) => {
|
|
1254
|
-
|
|
1255
|
-
}), u(this, q, Array.from(
|
|
1254
|
+
n.set(e.name, e.type);
|
|
1255
|
+
}), u(this, q, Array.from(n, ([e, i]) => ({ name: e, type: i }))), u(this, q, t(this, q).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, q).sort((e, i) => e.name.length < i.name.length ? 1 : -1);
|
|
1256
1256
|
}, "#adjust"));
|
|
1257
1257
|
d(this, jt, /* @__PURE__ */ h(() => {
|
|
1258
|
-
u(this, q, []),
|
|
1259
|
-
const
|
|
1260
|
-
if (!(!
|
|
1261
|
-
for (const e of
|
|
1262
|
-
|
|
1258
|
+
u(this, q, []), dt.log(t(this, ct).querySelectorAll("table"));
|
|
1259
|
+
const n = Array.from(t(this, ct).querySelectorAll("table"));
|
|
1260
|
+
if (!(!n || n.length === 0)) {
|
|
1261
|
+
for (const e of n)
|
|
1262
|
+
dt.log(e), $("[data-bind]", e).each((i, s) => {
|
|
1263
1263
|
const r = s.dataset.bind, o = s.getAttribute("data-type") || "string";
|
|
1264
1264
|
r && t(this, q).push({ name: r, type: o });
|
|
1265
|
-
}), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((
|
|
1266
|
-
$(`[${
|
|
1267
|
-
var o = r.getAttribute(
|
|
1265
|
+
}), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((i) => {
|
|
1266
|
+
$(`[${i}]`, e).each((s, r) => {
|
|
1267
|
+
var o = r.getAttribute(i);
|
|
1268
1268
|
if (o.indexOf("data.") < 0) {
|
|
1269
1269
|
const l = o.search(/[(]/g);
|
|
1270
1270
|
if (l > 0)
|
|
@@ -1286,26 +1286,26 @@ const pe = class pe {
|
|
|
1286
1286
|
t(this, Et).call(this);
|
|
1287
1287
|
}
|
|
1288
1288
|
}, "#init"));
|
|
1289
|
-
u(this, ct,
|
|
1289
|
+
u(this, ct, n), t(this, jt).call(this);
|
|
1290
1290
|
}
|
|
1291
1291
|
// π― κΈ°μ‘΄μ νλ μ΄λ¦λ§ μ°λ κ³³λ€κ³Όμ νΈνμ μν΄ μ΄λ¦ λ°°μ΄λ§ 리ν΄νλ λ©μλ μ μ§
|
|
1292
1292
|
get() {
|
|
1293
|
-
return t(this, q).map((
|
|
1293
|
+
return t(this, q).map((n) => n.name);
|
|
1294
1294
|
}
|
|
1295
1295
|
// π― λ΄λΆ κ°μ²΄ ν΅μ§Έλ‘ μ»κΈ°
|
|
1296
1296
|
getFields() {
|
|
1297
1297
|
return t(this, q);
|
|
1298
1298
|
}
|
|
1299
1299
|
// π― νΉμ νλμ λ°μ΄ν° νμ
μ‘°ν
|
|
1300
|
-
getType(
|
|
1301
|
-
const e = t(this, q).find((
|
|
1300
|
+
getType(n) {
|
|
1301
|
+
const e = t(this, q).find((i) => i.name === n);
|
|
1302
1302
|
return e ? e.type : "string";
|
|
1303
1303
|
}
|
|
1304
|
-
indexOf(
|
|
1305
|
-
return t(this, q).findIndex((e) => e.name ===
|
|
1304
|
+
indexOf(n) {
|
|
1305
|
+
return t(this, q).findIndex((e) => e.name === n);
|
|
1306
1306
|
}
|
|
1307
|
-
includes(
|
|
1308
|
-
return t(this, q).some((e) => e.name ===
|
|
1307
|
+
includes(n) {
|
|
1308
|
+
return t(this, q).some((e) => e.name === n);
|
|
1309
1309
|
}
|
|
1310
1310
|
};
|
|
1311
1311
|
ct = new WeakMap(), q = new WeakMap(), Et = new WeakMap(), jt = new WeakMap(), h(pe, "ngFields");
|
|
@@ -1318,7 +1318,7 @@ const me = class me extends HTMLElement {
|
|
|
1318
1318
|
d(this, Q);
|
|
1319
1319
|
d(this, Kt);
|
|
1320
1320
|
d(this, Zt, /* @__PURE__ */ h(() => {
|
|
1321
|
-
this.fields = new le(this), u(this, Kt, new
|
|
1321
|
+
this.fields = new le(this), u(this, Kt, new ie(this)), dt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1322
1322
|
}, "#init"));
|
|
1323
1323
|
this.attachShadow({ mode: "open" }), u(this, Q, new re(this));
|
|
1324
1324
|
}
|
|
@@ -1326,7 +1326,7 @@ const me = class me extends HTMLElement {
|
|
|
1326
1326
|
t(this, Zt).call(this);
|
|
1327
1327
|
}
|
|
1328
1328
|
disconnectedCallback() {
|
|
1329
|
-
|
|
1329
|
+
dt.log("NineTable disconnected.");
|
|
1330
1330
|
}
|
|
1331
1331
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
1332
1332
|
get data() {
|