@ninebone/table 0.0.627 β 0.0.629
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 +33 -28
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +6 -6
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -23,28 +23,28 @@ const He = class He extends Ke.constructor {
|
|
|
23
23
|
c(He, "Trace");
|
|
24
24
|
let oe = He;
|
|
25
25
|
const H = new oe();
|
|
26
|
-
var
|
|
26
|
+
var z, j, w, X, K, Z, It, G, _t;
|
|
27
27
|
const Me = class Me extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
|
-
d(this,
|
|
30
|
+
d(this, z);
|
|
31
31
|
d(this, j, !1);
|
|
32
32
|
d(this, w);
|
|
33
33
|
d(this, X);
|
|
34
34
|
d(this, K);
|
|
35
35
|
d(this, Z);
|
|
36
36
|
d(this, It, /* @__PURE__ */ c(() => {
|
|
37
|
-
if (!t(this,
|
|
38
|
-
const e = t(this,
|
|
37
|
+
if (!t(this, z)) return;
|
|
38
|
+
const e = t(this, z).querySelector(".ng-container-body .ng-part-body");
|
|
39
39
|
e && (y(this, Z, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
41
|
})), t(this, Z).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
43
43
|
A(this, "refresh", /* @__PURE__ */ c(() => {
|
|
44
|
-
if (!t(this,
|
|
44
|
+
if (!t(this, z) || !t(this, w) || t(this, j)) return;
|
|
45
45
|
const e = t(this, w).container, s = e.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
|
-
const r = t(this, w).track, n = t(this, w).thumb, o = t(this,
|
|
47
|
+
const r = t(this, w).track, n = t(this, w).thumb, o = t(this, z).querySelector(".ng-container-bottom"), a = e.clientWidth, h = s.scrollWidth;
|
|
48
48
|
if (a !== 0 && h > a)
|
|
49
49
|
o && (o.style.display = "flex");
|
|
50
50
|
else {
|
|
@@ -112,7 +112,7 @@ const Me = class Me extends HTMLElement {
|
|
|
112
112
|
}, "#init"));
|
|
113
113
|
}
|
|
114
114
|
connectedCallback() {
|
|
115
|
-
if (y(this,
|
|
115
|
+
if (y(this, z, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, z)) return;
|
|
116
116
|
this.innerHTML = `
|
|
117
117
|
<style>
|
|
118
118
|
nine-table-hscrollbar {
|
|
@@ -177,7 +177,7 @@ const Me = class Me extends HTMLElement {
|
|
|
177
177
|
<button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
|
|
178
178
|
`;
|
|
179
179
|
const e = /* @__PURE__ */ c(() => {
|
|
180
|
-
const s = t(this,
|
|
180
|
+
const s = t(this, z).querySelector(".ng-container-body .ng-part-body");
|
|
181
181
|
if (!s) {
|
|
182
182
|
setTimeout(e, 10);
|
|
183
183
|
return;
|
|
@@ -198,7 +198,7 @@ const Me = class Me extends HTMLElement {
|
|
|
198
198
|
t(this, Z) && t(this, Z).disconnect();
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
|
|
201
|
+
z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), c(Me, "NineTableHScrollBar");
|
|
202
202
|
let ae = Me;
|
|
203
203
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
|
|
204
204
|
var F, at, J, T, vt, xt, Nt;
|
|
@@ -354,7 +354,7 @@ const $e = class $e extends HTMLElement {
|
|
|
354
354
|
F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), T = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(), Nt = new WeakMap(), c($e, "NineTableVScrollBar");
|
|
355
355
|
let le = $e;
|
|
356
356
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
|
|
357
|
-
var P, S, Q, D, _, V, tt, wt, Se, Ee, Wt, Ot,
|
|
357
|
+
var P, S, Q, D, _, V, tt, wt, Se, Ee, Wt, Ot, Bt, St, Et, zt, Dt, At, Ae, lt, qt, Pt;
|
|
358
358
|
const Ie = class Ie {
|
|
359
359
|
constructor(i) {
|
|
360
360
|
d(this, P);
|
|
@@ -391,7 +391,7 @@ const Ie = class Ie {
|
|
|
391
391
|
});
|
|
392
392
|
const i = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
|
|
393
393
|
if (i) {
|
|
394
|
-
t(this,
|
|
394
|
+
t(this, Bt).call(this, i), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop);
|
|
395
395
|
let o = !1;
|
|
396
396
|
const a = /* @__PURE__ */ c((h) => {
|
|
397
397
|
if (o) return;
|
|
@@ -420,7 +420,7 @@ const Ie = class Ie {
|
|
|
420
420
|
});
|
|
421
421
|
n ? n.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
|
|
422
422
|
}, "#renderRows"));
|
|
423
|
-
d(this,
|
|
423
|
+
d(this, Bt, /* @__PURE__ */ c((i) => {
|
|
424
424
|
if (H.log("rowManager.#measureAndCacheHeight"), t(this, _) !== null && t(this, _) > 0)
|
|
425
425
|
return t(this, _);
|
|
426
426
|
H.log("#measureAndCacheHeight");
|
|
@@ -436,9 +436,14 @@ const Ie = class Ie {
|
|
|
436
436
|
const o = t(this, S), a = o.style.display, h = o.style.visibility, l = o.style.position;
|
|
437
437
|
(a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
|
|
438
438
|
let f = 0;
|
|
439
|
-
const u = s.querySelectorAll("tr
|
|
439
|
+
const u = s.querySelectorAll("tr");
|
|
440
440
|
return u.forEach((g) => {
|
|
441
|
-
|
|
441
|
+
let b = g.offsetHeight || g.getBoundingClientRect().height;
|
|
442
|
+
if (b === 0) {
|
|
443
|
+
const m = window.getComputedStyle(g);
|
|
444
|
+
b = parseFloat(m.height) || parseFloat(m.minHeight) || 0;
|
|
445
|
+
}
|
|
446
|
+
H.log(g.offsetHeight, g.getBoundingClientRect().height, b), f += b;
|
|
442
447
|
}), u.forEach((g) => g.remove()), o.style.display = a, o.style.visibility = h, o.style.position = l, H.log("totalHeight", f), y(this, _, f > 0 ? f : 24), t(this, Et).call(this), t(this, _);
|
|
443
448
|
}, "#measureAndCacheHeight"));
|
|
444
449
|
d(this, St, /* @__PURE__ */ c(() => {
|
|
@@ -457,7 +462,7 @@ const Ie = class Ie {
|
|
|
457
462
|
y(this, wt, i + t(this, Wt));
|
|
458
463
|
}
|
|
459
464
|
}, "#updateRowCount"));
|
|
460
|
-
d(this,
|
|
465
|
+
d(this, zt, /* @__PURE__ */ c(() => {
|
|
461
466
|
var a, h, l, f, u, g;
|
|
462
467
|
const i = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
|
|
463
468
|
if (e) {
|
|
@@ -504,7 +509,7 @@ const Ie = class Ie {
|
|
|
504
509
|
H.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
|
|
505
510
|
const e = t(this, S).querySelector(i);
|
|
506
511
|
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, i);
|
|
507
|
-
}), t(this, Pt).call(this), t(this,
|
|
512
|
+
}), t(this, Pt).call(this), t(this, zt).call(this);
|
|
508
513
|
}, "#renderAllContainers"));
|
|
509
514
|
d(this, Ae, /* @__PURE__ */ c((i) => {
|
|
510
515
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
|
|
@@ -599,7 +604,7 @@ const Ie = class Ie {
|
|
|
599
604
|
return ((e = t(this, D).get(i)) == null ? void 0 : e.length) || 1;
|
|
600
605
|
}
|
|
601
606
|
};
|
|
602
|
-
P = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), _ = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(),
|
|
607
|
+
P = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), _ = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), Dt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), qt = new WeakMap(), Pt = new WeakMap(), c(Ie, "RowManager");
|
|
603
608
|
let ce = Ie;
|
|
604
609
|
const jt = class jt {
|
|
605
610
|
/**
|
|
@@ -648,15 +653,15 @@ const jt = class jt {
|
|
|
648
653
|
const x = m.sectionRowIndex;
|
|
649
654
|
let E = 0;
|
|
650
655
|
Array.from(m.querySelectorAll("th,td")).forEach((v) => {
|
|
651
|
-
for (let
|
|
652
|
-
if (b[x][
|
|
653
|
-
E =
|
|
656
|
+
for (let B = 0; B < b[x].length; B++)
|
|
657
|
+
if (b[x][B] === null) {
|
|
658
|
+
E = B;
|
|
654
659
|
break;
|
|
655
660
|
}
|
|
656
661
|
const I = v.rowSpan || 1, R = v.colSpan || 1;
|
|
657
|
-
for (let
|
|
662
|
+
for (let B = 0; B < I; B++)
|
|
658
663
|
for (let yt = 0; yt < R; yt++)
|
|
659
|
-
x +
|
|
664
|
+
x + B < u && E + yt < g && (b[x + B][E + yt] = B === 0 && yt === 0 ? "1" : "0");
|
|
660
665
|
});
|
|
661
666
|
}), l.forEach((m) => {
|
|
662
667
|
const x = m.sectionRowIndex;
|
|
@@ -1349,7 +1354,7 @@ const Oe = class Oe {
|
|
|
1349
1354
|
rt = new WeakMap(), c(Oe, "ngDataManager");
|
|
1350
1355
|
let be = Oe;
|
|
1351
1356
|
var ut, L, Lt, se;
|
|
1352
|
-
const
|
|
1357
|
+
const Be = class Be {
|
|
1353
1358
|
// π― μ΄μ { name: string, type: string } κ°μ²΄λ€μ λ°°μ΄λ‘ κ΄λ¦¬ν©λλ€.
|
|
1354
1359
|
constructor(i) {
|
|
1355
1360
|
d(this, ut);
|
|
@@ -1419,10 +1424,10 @@ const ze = class ze {
|
|
|
1419
1424
|
return t(this, L).some((e) => e.name === i);
|
|
1420
1425
|
}
|
|
1421
1426
|
};
|
|
1422
|
-
ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), c(
|
|
1423
|
-
let ye =
|
|
1427
|
+
ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), c(Be, "ngFields");
|
|
1428
|
+
let ye = Be;
|
|
1424
1429
|
var nt, ie, re;
|
|
1425
|
-
const
|
|
1430
|
+
const ze = class ze extends HTMLElement {
|
|
1426
1431
|
constructor() {
|
|
1427
1432
|
super();
|
|
1428
1433
|
//#created = false;
|
|
@@ -1452,8 +1457,8 @@ const Be = class Be extends HTMLElement {
|
|
|
1452
1457
|
return t(this, nt);
|
|
1453
1458
|
}
|
|
1454
1459
|
};
|
|
1455
|
-
nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), c(
|
|
1456
|
-
let pe =
|
|
1460
|
+
nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), c(ze, "NineTable");
|
|
1461
|
+
let pe = ze;
|
|
1457
1462
|
customElements.get("nine-table") || customElements.define("nine-table", pe);
|
|
1458
1463
|
const mt = class mt extends HTMLElement {
|
|
1459
1464
|
// π 컀μ€ν
μ€νμΌμ© μΊμ μΆκ°
|