@ninebone/table 0.0.680 β 0.0.682
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 +61 -60
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +5 -5
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -22,7 +22,7 @@ const He = class He extends Ke.constructor {
|
|
|
22
22
|
};
|
|
23
23
|
h(He, "Trace");
|
|
24
24
|
let oe = He;
|
|
25
|
-
const
|
|
25
|
+
const R = new oe();
|
|
26
26
|
var z, j, S, X, K, Z, _t, G, Nt;
|
|
27
27
|
const $e = class $e extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
@@ -230,7 +230,7 @@ const Me = class Me extends HTMLElement {
|
|
|
230
230
|
g < 0 && (g = 0), g > v && (g = v), r.style.top = `${g}px`, t(this, k).top.disabled = u <= 0, t(this, k).bottom.disabled = u >= b - 1;
|
|
231
231
|
}, "refresh"));
|
|
232
232
|
d(this, Wt, /* @__PURE__ */ h(() => {
|
|
233
|
-
|
|
233
|
+
R.log("nine-table-vscrollbar.#init");
|
|
234
234
|
const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
|
|
235
235
|
const n = (t(this, F).data.get() || []).length, o = t(this, at).getRowHeight();
|
|
236
236
|
return n * o;
|
|
@@ -354,14 +354,14 @@ const Me = class Me extends HTMLElement {
|
|
|
354
354
|
F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), k = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(), Wt = new WeakMap(), h(Me, "NineTableVScrollBar");
|
|
355
355
|
let le = Me;
|
|
356
356
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
|
|
357
|
-
var P, x, Q, D,
|
|
357
|
+
var P, x, Q, D, M, V, tt, wt, Se, Ee, Ot, Bt, St, Et, At, zt, Dt, qt, Ae, lt, Rt, Pt;
|
|
358
358
|
const Ie = class Ie {
|
|
359
359
|
constructor(i) {
|
|
360
360
|
d(this, P);
|
|
361
361
|
d(this, x);
|
|
362
362
|
d(this, Q);
|
|
363
363
|
d(this, D, /* @__PURE__ */ new Map());
|
|
364
|
-
d(this,
|
|
364
|
+
d(this, M, null);
|
|
365
365
|
d(this, V, null);
|
|
366
366
|
d(this, tt, 0);
|
|
367
367
|
d(this, wt, 40);
|
|
@@ -371,15 +371,15 @@ const Ie = class Ie {
|
|
|
371
371
|
d(this, Ot, 3);
|
|
372
372
|
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
373
373
|
var e;
|
|
374
|
-
|
|
374
|
+
R.log("rowManager.refresh");
|
|
375
375
|
const i = t(this, x).querySelector(".ng-container-body .ng-part-body");
|
|
376
376
|
i && (t(this, St).call(this), t(this, Et).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, x).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
377
377
|
}, "refresh"));
|
|
378
378
|
E(this, "initialize", /* @__PURE__ */ h(() => {
|
|
379
|
-
|
|
379
|
+
R.log("rowManager.initialize"), y(this, Q, {
|
|
380
380
|
scrollTables: t(this, x).querySelectorAll(".ng-part-body table"),
|
|
381
381
|
firstTr: t(this, x).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
|
|
382
|
-
}), y(this,
|
|
382
|
+
}), y(this, M, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
|
|
383
383
|
const a = t(this, x).querySelector(o);
|
|
384
384
|
if (!a) return;
|
|
385
385
|
const c = a.querySelector(".ng-part-body table");
|
|
@@ -401,13 +401,13 @@ const Ie = class Ie {
|
|
|
401
401
|
}, "handleContainerScroll");
|
|
402
402
|
[i, e, s].forEach((c) => {
|
|
403
403
|
c && c.addEventListener("scroll", () => {
|
|
404
|
-
a(c);
|
|
404
|
+
R.log("scroll"), a(c);
|
|
405
405
|
}, { passive: !0 });
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
408
|
}, "initialize"));
|
|
409
409
|
d(this, Bt, /* @__PURE__ */ h((i, e) => {
|
|
410
|
-
|
|
410
|
+
R.log("rowManager.#renderRows");
|
|
411
411
|
const s = t(this, D).get(e);
|
|
412
412
|
if (!s || s.length === 0) return;
|
|
413
413
|
const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
@@ -421,14 +421,14 @@ const Ie = class Ie {
|
|
|
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
423
|
d(this, St, /* @__PURE__ */ h(() => {
|
|
424
|
-
if (t(this,
|
|
425
|
-
return t(this,
|
|
424
|
+
if (t(this, M) !== null && t(this, M) > 0)
|
|
425
|
+
return t(this, M);
|
|
426
426
|
const i = t(this, x).querySelector(".ng-container-body .ng-part-body");
|
|
427
|
-
|
|
427
|
+
R.log("rowManager.#measureAndCacheHeight");
|
|
428
428
|
const e = t(this, D).get(".ng-container-body");
|
|
429
429
|
if (!e || e.length === 0) throw new Error("invalid dom");
|
|
430
430
|
const s = i.querySelector("tbody.bindable-tbody");
|
|
431
|
-
if (
|
|
431
|
+
if (R.log(s), !s) throw new Error("invalid dom");
|
|
432
432
|
s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
|
|
433
433
|
const r = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
|
|
434
434
|
e.forEach((b) => {
|
|
@@ -446,12 +446,12 @@ const Ie = class Ie {
|
|
|
446
446
|
}
|
|
447
447
|
f += g;
|
|
448
448
|
}), u.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, f <= 0) throw new Error("#measureAndCacheHeight() invalid dom");
|
|
449
|
-
return y(this,
|
|
449
|
+
return y(this, M, f), t(this, At).call(this), t(this, M);
|
|
450
450
|
}, "#measureAndCacheHeight"));
|
|
451
451
|
d(this, Et, /* @__PURE__ */ h(() => {
|
|
452
|
-
|
|
453
|
-
const e = (t(this, P).data.get() || []).length, s = t(this,
|
|
454
|
-
|
|
452
|
+
R.log("rowManager.#updateVirtualScrollHeight");
|
|
453
|
+
const e = (t(this, P).data.get() || []).length, s = t(this, M), r = e * s;
|
|
454
|
+
R.log("π [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
455
455
|
const o = t(this, x).querySelector(n);
|
|
456
456
|
if (!o) return;
|
|
457
457
|
const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
|
|
@@ -459,8 +459,8 @@ const Ie = class Ie {
|
|
|
459
459
|
});
|
|
460
460
|
}, "#updateVirtualScrollHeight"));
|
|
461
461
|
d(this, At, /* @__PURE__ */ h(() => {
|
|
462
|
-
if (t(this, tt) > 0 && t(this,
|
|
463
|
-
const i = Math.ceil(t(this, tt) / t(this,
|
|
462
|
+
if (t(this, tt) > 0 && t(this, M) > 0) {
|
|
463
|
+
const i = Math.ceil(t(this, tt) / t(this, M));
|
|
464
464
|
y(this, wt, i + t(this, Ot));
|
|
465
465
|
}
|
|
466
466
|
}, "#updateRowCount"));
|
|
@@ -474,8 +474,8 @@ const Ie = class Ie {
|
|
|
474
474
|
((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
|
|
475
475
|
((c = v[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
|
|
476
476
|
((l = w[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
|
|
477
|
-
],
|
|
478
|
-
|
|
477
|
+
], T = Math.max(...W);
|
|
478
|
+
T > 0 && (g[m] && (g[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`), w[m] && (w[m].style.height = `${T}px`));
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
const r = t(this, x).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, x).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, x).querySelector(".ng-container-right .ng-part-footer table");
|
|
@@ -486,8 +486,8 @@ const Ie = class Ie {
|
|
|
486
486
|
((f = g[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
|
|
487
487
|
((u = v[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
|
|
488
488
|
((b = w[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
|
|
489
|
-
],
|
|
490
|
-
|
|
489
|
+
], T = Math.max(...W);
|
|
490
|
+
T > 0 && (g[m] && (g[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`), w[m] && (w[m].style.height = `${T}px`));
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
493
|
}, "#syncRowHeights"));
|
|
@@ -502,13 +502,13 @@ const Ie = class Ie {
|
|
|
502
502
|
const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
|
|
503
503
|
o && (n += o.offsetHeight), a && (n += a.offsetHeight);
|
|
504
504
|
const c = Math.max(r - n, 100);
|
|
505
|
-
t(this, tt) !== c && (y(this, tt, c), t(this, At).call(this), t(this,
|
|
505
|
+
t(this, tt) !== c && (y(this, tt, c), t(this, At).call(this), t(this, M) !== null && (t(this, qt).call(this), this.refresh()));
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
508
|
})), t(this, V).observe(t(this, x)));
|
|
509
509
|
}, "#initResizeObserver"));
|
|
510
510
|
d(this, qt, /* @__PURE__ */ h(() => {
|
|
511
|
-
|
|
511
|
+
R.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
|
|
512
512
|
const e = t(this, x).querySelector(i);
|
|
513
513
|
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Bt).call(this, e, i);
|
|
514
514
|
}), t(this, Pt).call(this), t(this, zt).call(this);
|
|
@@ -534,31 +534,32 @@ const Ie = class Ie {
|
|
|
534
534
|
}, "#adjustBufferRows"));
|
|
535
535
|
d(this, lt, /* @__PURE__ */ h((i) => {
|
|
536
536
|
var u, b;
|
|
537
|
-
|
|
537
|
+
R.log("rowManager.#handleScroll()", t(this, M));
|
|
538
|
+
const e = t(this, M);
|
|
538
539
|
if (!e || e <= 0) return;
|
|
539
540
|
const s = t(this, P).data.length;
|
|
540
541
|
if (s === 0) return;
|
|
541
542
|
const r = ((u = t(this, D).get(".ng-container-body")) == null ? void 0 : u.length) || 1, n = t(this, x).querySelector(".ng-container-body .ng-part-body");
|
|
542
|
-
|
|
543
|
+
R.log("bodyContainer.clientHeight", n.clientHeight);
|
|
543
544
|
const o = Math.max(0, s - Math.floor(n.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(i / e)));
|
|
544
545
|
let c = Math.floor(a * e);
|
|
545
|
-
|
|
546
|
+
R.log(`π [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && R.log(`π [Scroll Inspect] scrollTop: ${i}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
|
|
546
547
|
const l = t(this, Q).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
|
|
547
548
|
(b = t(this, Q)) == null || b.scrollTables.forEach((g) => {
|
|
548
549
|
g.style.transform = `translate3d(0, ${c}px, 0)`;
|
|
549
|
-
}), f !== a && (
|
|
550
|
+
}), f !== a && (R.log(`π [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
|
|
550
551
|
const v = t(this, x).querySelector(g);
|
|
551
552
|
if (!v) return;
|
|
552
553
|
const w = v.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
553
554
|
if (!w) return;
|
|
554
555
|
Array.from(w.querySelectorAll("tr:not(.nodata)")).forEach((m, W) => {
|
|
555
|
-
const
|
|
556
|
-
if (
|
|
556
|
+
const T = a + Math.floor(W / r);
|
|
557
|
+
if (T >= s) {
|
|
557
558
|
m.style.display = "none";
|
|
558
559
|
return;
|
|
559
560
|
}
|
|
560
|
-
const O = t(this, P).data.get(
|
|
561
|
-
m.style.display = "", t(this, Rt).call(this, m, O,
|
|
561
|
+
const O = t(this, P).data.get(T);
|
|
562
|
+
m.style.display = "", t(this, Rt).call(this, m, O, T);
|
|
562
563
|
});
|
|
563
564
|
}));
|
|
564
565
|
}, "#handleScroll"));
|
|
@@ -585,7 +586,7 @@ const Ie = class Ie {
|
|
|
585
586
|
}, "#bindRowData"));
|
|
586
587
|
d(this, Pt, /* @__PURE__ */ h(() => {
|
|
587
588
|
var c, l, f;
|
|
588
|
-
|
|
589
|
+
R.log("rowManager.#syncHeaderHeights");
|
|
589
590
|
const i = t(this, x).querySelector(".ng-container-left .ng-part-header table"), e = t(this, x).querySelector(".ng-container-body .ng-part-header table"), s = t(this, x).querySelector(".ng-container-right .ng-part-header table");
|
|
590
591
|
if (!e) return;
|
|
591
592
|
const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, n.length, o.length);
|
|
@@ -604,14 +605,14 @@ const Ie = class Ie {
|
|
|
604
605
|
y(this, P, i.getRootNode().host), y(this, x, i), t(this, Dt).call(this);
|
|
605
606
|
}
|
|
606
607
|
getRowHeight() {
|
|
607
|
-
return t(this,
|
|
608
|
+
return t(this, M);
|
|
608
609
|
}
|
|
609
610
|
templateLength(i = ".ng-container-body") {
|
|
610
611
|
var e;
|
|
611
612
|
return ((e = t(this, D).get(i)) == null ? void 0 : e.length) || 1;
|
|
612
613
|
}
|
|
613
614
|
};
|
|
614
|
-
P = new WeakMap(), x = new WeakMap(), Q = new WeakMap(), D = new WeakMap(),
|
|
615
|
+
P = new WeakMap(), x = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), M = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), zt = new WeakMap(), Dt = new WeakMap(), qt = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Pt = new WeakMap(), h(Ie, "RowManager");
|
|
615
616
|
let ce = Ie;
|
|
616
617
|
const jt = class jt {
|
|
617
618
|
/**
|
|
@@ -665,9 +666,9 @@ const jt = class jt {
|
|
|
665
666
|
A = O;
|
|
666
667
|
break;
|
|
667
668
|
}
|
|
668
|
-
const W = m.rowSpan || 1,
|
|
669
|
+
const W = m.rowSpan || 1, T = m.colSpan || 1;
|
|
669
670
|
for (let O = 0; O < W; O++)
|
|
670
|
-
for (let yt = 0; yt <
|
|
671
|
+
for (let yt = 0; yt < T; yt++)
|
|
671
672
|
w + O < u && A + yt < b && (g[w + O][A + yt] = O === 0 && yt === 0 ? "1" : "0");
|
|
672
673
|
});
|
|
673
674
|
}), l.forEach((v) => {
|
|
@@ -700,10 +701,10 @@ const pt = class pt extends HTMLElement {
|
|
|
700
701
|
d(this, et, null);
|
|
701
702
|
d(this, st);
|
|
702
703
|
E(this, "invalidate", /* @__PURE__ */ h(() => {
|
|
703
|
-
|
|
704
|
+
R.log("sheet.invalidate()"), t(this, st).refresh();
|
|
704
705
|
}, "invalidate"));
|
|
705
706
|
E(this, "generate", /* @__PURE__ */ h((e) => {
|
|
706
|
-
if (
|
|
707
|
+
if (R.log("sheet.generate()"), !e) return;
|
|
707
708
|
y(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this);
|
|
708
709
|
const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), n = this.querySelector(".ng-nodata-overlay");
|
|
709
710
|
s && n && (n.style.top = `${s.offsetHeight}px`), r && n && (n.style.bottom = `${r.offsetHeight}px`), t(this, st).initialize(), setTimeout(() => {
|
|
@@ -957,7 +958,7 @@ const pt = class pt extends HTMLElement {
|
|
|
957
958
|
t(this, Ut).call(this);
|
|
958
959
|
}
|
|
959
960
|
disconnectedCallback() {
|
|
960
|
-
this.innerHTML = "",
|
|
961
|
+
this.innerHTML = "", R.log("NineTableSheet destroyed.");
|
|
961
962
|
}
|
|
962
963
|
};
|
|
963
964
|
Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), h(pt, "NineTableSheet"), E(pt, "SCROLLBAR_SIZE", 16);
|
|
@@ -1014,29 +1015,29 @@ const _e = class _e extends HTMLElement {
|
|
|
1014
1015
|
Kt = new WeakMap(), Tt = new WeakMap(), h(_e, "NineTableSheets");
|
|
1015
1016
|
let de = _e;
|
|
1016
1017
|
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
|
|
1017
|
-
var
|
|
1018
|
+
var I, Zt, kt, Gt;
|
|
1018
1019
|
const Ne = class Ne {
|
|
1019
1020
|
constructor(i) {
|
|
1020
|
-
d(this,
|
|
1021
|
+
d(this, I);
|
|
1021
1022
|
d(this, Zt, /* @__PURE__ */ h(() => {
|
|
1022
1023
|
t(this, Gt).call(this), new ResizeObserver((i) => {
|
|
1023
1024
|
for (let e of i)
|
|
1024
|
-
t(this,
|
|
1025
|
-
}).observe(t(this,
|
|
1025
|
+
t(this, I).getAttribute("auto-height") === "true" && t(this, kt).call(this);
|
|
1026
|
+
}).observe(t(this, I));
|
|
1026
1027
|
}, "#init"));
|
|
1027
1028
|
d(this, kt, /* @__PURE__ */ h(() => {
|
|
1028
1029
|
var c, l;
|
|
1029
|
-
const i = Array.from(t(this,
|
|
1030
|
+
const i = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
1030
1031
|
if (i.length === 0) return;
|
|
1031
|
-
const e = parseInt(t(this,
|
|
1032
|
-
t(this,
|
|
1032
|
+
const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = It.SCROLLBAR_SIZE, a = e * s + r + n + o;
|
|
1033
|
+
t(this, I).style.height = `${a}px`;
|
|
1033
1034
|
}, "#applyAutoHeight"));
|
|
1034
1035
|
d(this, Gt, /* @__PURE__ */ h(() => {
|
|
1035
|
-
const e = Array.from(t(this,
|
|
1036
|
+
const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), s = t(this, I).getAttribute("auto-height") === "true", r = e.length, n = e.map((c, l) => {
|
|
1036
1037
|
const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
|
|
1037
1038
|
return u + b;
|
|
1038
1039
|
}).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
|
|
1039
|
-
t(this,
|
|
1040
|
+
t(this, I).shadowRoot.innerHTML = `
|
|
1040
1041
|
<style>
|
|
1041
1042
|
:host {
|
|
1042
1043
|
display: flex;
|
|
@@ -1156,18 +1157,18 @@ const Ne = class Ne {
|
|
|
1156
1157
|
<nine-table-analysis></nine-table-analysis>
|
|
1157
1158
|
</nine-table-body>
|
|
1158
1159
|
<nine-table-footer></nine-table-footer>
|
|
1159
|
-
`, t(this,
|
|
1160
|
-
const a = t(this,
|
|
1160
|
+
`, t(this, I).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
|
|
1161
|
+
const a = t(this, I).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
1161
1162
|
a == null || a.forEach((c, l) => {
|
|
1162
1163
|
e[l] && setTimeout(() => {
|
|
1163
1164
|
c.generate(e[l]), s && t(this, kt).call(this);
|
|
1164
1165
|
});
|
|
1165
1166
|
});
|
|
1166
1167
|
}, "#render"));
|
|
1167
|
-
y(this,
|
|
1168
|
+
y(this, I, i), t(this, Zt).call(this);
|
|
1168
1169
|
}
|
|
1169
1170
|
};
|
|
1170
|
-
|
|
1171
|
+
I = new WeakMap(), Zt = new WeakMap(), kt = new WeakMap(), Gt = new WeakMap(), h(Ne, "LayoutManager");
|
|
1171
1172
|
let fe = Ne;
|
|
1172
1173
|
var Ct, ht;
|
|
1173
1174
|
const We = class We {
|
|
@@ -1380,11 +1381,11 @@ const Be = class Be {
|
|
|
1380
1381
|
}), y(this, H, Array.from(i, ([e, s]) => ({ name: e, type: s }))), y(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
|
|
1381
1382
|
}, "#adjust"));
|
|
1382
1383
|
d(this, se, /* @__PURE__ */ h(() => {
|
|
1383
|
-
y(this, H, []),
|
|
1384
|
+
y(this, H, []), R.log(t(this, gt).querySelectorAll("table"));
|
|
1384
1385
|
const i = Array.from(t(this, gt).querySelectorAll("table"));
|
|
1385
1386
|
if (!(!i || i.length === 0)) {
|
|
1386
1387
|
for (const e of i)
|
|
1387
|
-
|
|
1388
|
+
R.log(e), $("[data-bind]", e).each((s, r) => {
|
|
1388
1389
|
const n = r.dataset.bind, o = r.getAttribute("data-type") || "string";
|
|
1389
1390
|
n && t(this, H).push({ name: n, type: o });
|
|
1390
1391
|
}), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
|
|
@@ -1443,7 +1444,7 @@ const ze = class ze extends HTMLElement {
|
|
|
1443
1444
|
d(this, nt);
|
|
1444
1445
|
d(this, ie);
|
|
1445
1446
|
d(this, re, /* @__PURE__ */ h(() => {
|
|
1446
|
-
this.fields = new ye(this), y(this, ie, new fe(this)),
|
|
1447
|
+
this.fields = new ye(this), y(this, ie, new fe(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1447
1448
|
}, "#init"));
|
|
1448
1449
|
this.attachShadow({ mode: "open" }), y(this, nt, new be(this));
|
|
1449
1450
|
}
|
|
@@ -1451,7 +1452,7 @@ const ze = class ze extends HTMLElement {
|
|
|
1451
1452
|
t(this, re).call(this);
|
|
1452
1453
|
}
|
|
1453
1454
|
disconnectedCallback() {
|
|
1454
|
-
|
|
1455
|
+
R.log("NineTable disconnected.");
|
|
1455
1456
|
}
|
|
1456
1457
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
1457
1458
|
get data() {
|
|
@@ -1519,8 +1520,8 @@ const De = class De extends me {
|
|
|
1519
1520
|
if (e && (e = parseInt(e)), e && !isNaN(e)) {
|
|
1520
1521
|
var s = t(this, p).closest("tr"), r = [];
|
|
1521
1522
|
$("th,td", s).each((m, W) => {
|
|
1522
|
-
var
|
|
1523
|
-
|
|
1523
|
+
var T = ninegrid.j.querySelectorAll(W).attr("suppress");
|
|
1524
|
+
T && W.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && r.push(T));
|
|
1524
1525
|
}), r.sort();
|
|
1525
1526
|
var n = !1;
|
|
1526
1527
|
if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
|