@ninebone/table 0.0.795 → 0.0.797

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.
@@ -53,13 +53,13 @@ const es = class es extends HTMLElement {
53
53
  }
54
54
  const l = r.clientWidth;
55
55
  if (l <= 0) return;
56
- const g = Math.max(Math.min(l * (a / c), l), 20);
57
- i.style.width = `${g}px`;
56
+ const u = Math.max(Math.min(l * (a / c), l), 20);
57
+ i.style.width = `${u}px`;
58
58
  const f = e.scrollLeft, b = c - a;
59
- let u = 0;
60
- b > 0 && (u = parseInt(f / b * (l - g), 10)), u < 0 && (u = 0);
61
- const p = l - g;
62
- u > p && (u = p), i.style.left = `${u}px`, t(this, E).left.disabled = u === 0, t(this, E).right.disabled = u >= p - 1;
59
+ let g = 0;
60
+ b > 0 && (g = parseInt(f / b * (l - u), 10)), g < 0 && (g = 0);
61
+ const p = l - u;
62
+ g > p && (g = p), i.style.left = `${g}px`, t(this, E).left.disabled = g === 0, t(this, E).right.disabled = g >= p - 1;
63
63
  }, "refresh"));
64
64
  d(this, nt, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, E)) return !1;
@@ -221,14 +221,14 @@ const ss = class ss extends HTMLElement {
221
221
  this.style.display = "flex";
222
222
  const l = s.clientHeight;
223
223
  if (l <= 0) return;
224
- const g = Math.max(Math.min(l * (i / c), l), 20);
225
- r.style.height = `${g}px`;
224
+ const u = Math.max(Math.min(l * (i / c), l), 20);
225
+ r.style.height = `${u}px`;
226
226
  const f = e.scrollTop, b = Math.max(c - i, 1);
227
227
  S.log(e, f, b);
228
- let u = 0;
229
- b > 0 && (u = f / b * (l - g));
230
- const p = l - g;
231
- u < 0 && (u = 0), u > p && (u = p), r.style.top = `${u}px`, t(this, k).top.disabled = f <= 0, t(this, k).bottom.disabled = f >= b - 1;
228
+ let g = 0;
229
+ b > 0 && (g = f / b * (l - u));
230
+ const p = l - u;
231
+ g < 0 && (g = 0), g > p && (g = p), r.style.top = `${g}px`, t(this, k).top.disabled = f <= 0, t(this, k).bottom.disabled = f >= b - 1;
232
232
  }, "refresh"));
233
233
  d(this, te, /* @__PURE__ */ h(() => {
234
234
  S.log("nine-table-vscrollbar.#init");
@@ -241,11 +241,11 @@ const ss = class ss extends HTMLElement {
241
241
  r.stopPropagation(), r.preventDefault(), y(this, yt, !0), y(this, kt, r.clientY), y(this, It, e.scrollTop);
242
242
  const i = /* @__PURE__ */ h((a) => {
243
243
  if (!t(this, yt)) return;
244
- const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, f = c.height - l, b = a.clientY - t(this, kt), u = e.clientHeight, p = s(), x = Math.max(p - u, 1);
244
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, f = c.height - l, b = a.clientY - t(this, kt), g = e.clientHeight, p = s(), x = Math.max(p - g, 1);
245
245
  if (f > 0 && x > 0) {
246
246
  const w = b / f * x;
247
247
  let m = t(this, It) + w;
248
- const T = Math.max(0, p - u);
248
+ const T = Math.max(0, p - g);
249
249
  m < 0 && (m = 0), m > T && (m = T), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
@@ -255,10 +255,10 @@ const ss = class ss extends HTMLElement {
255
255
  document.addEventListener("mousemove", i), document.addEventListener("mouseup", o);
256
256
  }), t(this, k).track.addEventListener("mousedown", (r) => {
257
257
  if (r.button !== 0 || r.target === t(this, k).thumb) return;
258
- const i = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, a = r.clientY - i.top - o / 2, l = i.height - o, g = e.clientHeight, f = s(), b = Math.max(f - g, 1);
258
+ const i = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, a = r.clientY - i.top - o / 2, l = i.height - o, u = e.clientHeight, f = s(), b = Math.max(f - u, 1);
259
259
  if (l > 0 && b > 0) {
260
- const u = Math.max(0, Math.min(1, a / l));
261
- e.scrollTop = u * b;
260
+ const g = Math.max(0, Math.min(1, a / l));
261
+ e.scrollTop = g * b;
262
262
  }
263
263
  this.refresh();
264
264
  }), t(this, k).top.addEventListener("click", () => {
@@ -378,31 +378,31 @@ const ns = class ns {
378
378
  S.log("rowManager.initialize"), y(this, it, {
379
379
  scrollTables: t(this, A).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, A).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
- }), y(this, O, null), t(this, Y).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
382
- const a = t(this, A).querySelector(o);
381
+ }), y(this, O, null), t(this, Y).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
382
+ const i = t(this, A).querySelector(r);
383
+ if (!i) return;
384
+ const o = i.querySelector(".ng-part-body table");
385
+ if (!o) return;
386
+ const a = o.querySelector("tbody.bindable-tbody");
383
387
  if (!a) return;
384
- const c = a.querySelector(".ng-part-body table");
385
- if (!c) return;
386
- const l = c.querySelector("tbody.bindable-tbody");
387
- if (!l) return;
388
- const f = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
- t(this, Y).set(o, f);
388
+ const l = Array.from(a.querySelectorAll("tr")).map((u) => u.cloneNode(!0));
389
+ t(this, Y).set(r, l);
390
390
  });
391
- const n = t(this, A).querySelector(".ng-container-body .ng-part-body"), e = t(this, A).querySelector(".ng-container-left .ng-part-body"), s = t(this, A).querySelector(".ng-container-right .ng-part-body"), r = t(this, A).querySelector(".ng-container-body .ng-part-header"), i = t(this, A).querySelector(".ng-container-body .ng-part-footer");
392
- if (n) {
391
+ const n = t(this, A).querySelector(".ng-container-body .ng-part-body"), e = t(this, A).querySelector(".ng-container-left .ng-part-body"), s = t(this, A).querySelector(".ng-container-right .ng-part-body");
392
+ if (t(this, A).querySelector(".ng-container-body .ng-part-header"), t(this, A).querySelector(".ng-container-body .ng-part-footer"), n) {
393
393
  t(this, Mt).call(this), t(this, Nt).call(this), t(this, Ht).call(this), t(this, mt).call(this, n.scrollTop);
394
- let o = !1;
394
+ let r = !1;
395
395
  n.scrollTop, n.scrollLeft;
396
- const a = /* @__PURE__ */ h((c) => {
397
- var f;
398
- if (o) return;
399
- o = !0;
400
- const l = c.scrollTop, g = c.scrollLeft;
401
- n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), g != 0 && r && r.scrollLeft !== g && (r.scrollLeft = g), S.log("======", r.scrollLeft, g), i && i.scrollLeft !== g && (i.scrollLeft = g), t(this, mt).call(this, l), (f = t(this, A).querySelector("nine-table-vscrollbar")) == null || f.refresh(), o = !1;
396
+ const i = /* @__PURE__ */ h((o) => {
397
+ var c;
398
+ if (r) return;
399
+ r = !0;
400
+ const a = o.scrollTop;
401
+ o.scrollLeft, S.log("======", o, o.scrollLeft), n && n.scrollTop !== a && (n.scrollTop = a), e && e.scrollTop !== a && (e.scrollTop = a), s && s.scrollTop !== a && (s.scrollTop = a), t(this, mt).call(this, a), (c = t(this, A).querySelector("nine-table-vscrollbar")) == null || c.refresh(), r = !1;
402
402
  }, "handleContainerScroll");
403
- [n, e, s].forEach((c) => {
404
- c == null || c.addEventListener("scroll", (l) => {
405
- S.log(l), S.log("rowManager.scroll event"), a(c);
403
+ [n, e, s].forEach((o) => {
404
+ o == null || o.addEventListener("scroll", (a) => {
405
+ S.log(a), S.log("rowManager.scroll event"), i(o);
406
406
  });
407
407
  });
408
408
  }
@@ -437,16 +437,16 @@ const ns = class ns {
437
437
  }), r ? r.before(i) : s.appendChild(i);
438
438
  const o = t(this, A), a = o.style.display, c = o.style.visibility, l = o.style.position;
439
439
  (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
440
- let g = 0;
440
+ let u = 0;
441
441
  const f = s.querySelectorAll("tr");
442
442
  return f.forEach((b) => {
443
- let u = b.offsetHeight || b.getBoundingClientRect().height;
444
- if (u === 0) {
443
+ let g = b.offsetHeight || b.getBoundingClientRect().height;
444
+ if (g === 0) {
445
445
  const p = window.getComputedStyle(b);
446
- u = parseFloat(p.height) || parseFloat(p.minHeight) || 0;
446
+ g = parseFloat(p.height) || parseFloat(p.minHeight) || 0;
447
447
  }
448
- g += u;
449
- }), f.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, g <= 0 ? -1 : (y(this, O, g), t(this, $t).call(this), t(this, O));
448
+ u += g;
449
+ }), f.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, u <= 0 ? -1 : (y(this, O, u), t(this, $t).call(this), t(this, O));
450
450
  }, "#measureAndCacheHeight"));
451
451
  d(this, Ht, /* @__PURE__ */ h(() => {
452
452
  S.log("rowManager.#updateVirtualScrollHeight");
@@ -465,29 +465,29 @@ const ns = class ns {
465
465
  }
466
466
  }, "#updateRowCount"));
467
467
  d(this, ne, /* @__PURE__ */ h(() => {
468
- var a, c, l, g, f, b;
468
+ var a, c, l, u, f, b;
469
469
  const n = t(this, A).querySelector(".ng-container-left .ng-part-body table"), e = t(this, A).querySelector(".ng-container-body .ng-part-body table"), s = t(this, A).querySelector(".ng-container-right .ng-part-body table");
470
470
  if (e) {
471
- const u = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(u.length, p.length, x.length);
471
+ const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, p.length, x.length);
472
472
  for (let m = 0; m < w; m++) {
473
473
  const T = [
474
- ((a = u[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
+ ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
475
475
  ((c = p[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
476
476
  ((l = x[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
477
477
  ], R = Math.max(...T);
478
- R > 0 && (u[m] && (u[m].style.height = `${R}px`), p[m] && (p[m].style.height = `${R}px`), x[m] && (x[m].style.height = `${R}px`));
478
+ R > 0 && (g[m] && (g[m].style.height = `${R}px`), p[m] && (p[m].style.height = `${R}px`), x[m] && (x[m].style.height = `${R}px`));
479
479
  }
480
480
  }
481
481
  const r = t(this, A).querySelector(".ng-container-left .ng-part-footer table"), i = t(this, A).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, A).querySelector(".ng-container-right .ng-part-footer table");
482
482
  if (i) {
483
- const u = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(i.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], w = Math.max(u.length, p.length, x.length);
483
+ const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(i.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, p.length, x.length);
484
484
  for (let m = 0; m < w; m++) {
485
485
  const T = [
486
- ((g = u[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
486
+ ((u = g[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
487
487
  ((f = p[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
488
488
  ((b = x[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
489
489
  ], R = Math.max(...T);
490
- R > 0 && (u[m] && (u[m].style.height = `${R}px`), p[m] && (p[m].style.height = `${R}px`), x[m] && (x[m].style.height = `${R}px`));
490
+ R > 0 && (g[m] && (g[m].style.height = `${R}px`), p[m] && (p[m].style.height = `${R}px`), x[m] && (x[m].style.height = `${R}px`));
491
491
  }
492
492
  }
493
493
  }, "#syncRowHeights"));
@@ -521,14 +521,14 @@ const ns = class ns {
521
521
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
522
522
  if (!r) return;
523
523
  const i = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, Y).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, U).data.get() || []).length;
524
- i.forEach((g, f) => {
524
+ i.forEach((u, f) => {
525
525
  const b = n + Math.floor(f / o);
526
526
  if (b >= c) {
527
- g.style.visibility = "hidden";
527
+ u.style.visibility = "hidden";
528
528
  return;
529
529
  }
530
- const u = t(this, U).data.get(b);
531
- g.style.display = "", t(this, _t).call(this, g, u, b);
530
+ const g = t(this, U).data.get(b);
531
+ u.style.display = "", t(this, _t).call(this, u, g, b);
532
532
  });
533
533
  });
534
534
  }, "#adjustBufferRows"));
@@ -543,11 +543,11 @@ const ns = class ns {
543
543
  const o = Math.max(0, s - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(n / e)));
544
544
  let c = Math.floor(a * e);
545
545
  S.log(`📜 [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && S.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
546
- const l = t(this, it).firstTr, g = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
547
- (b = t(this, it)) == null || b.scrollTables.forEach((u) => {
548
- u.style.transform = `translate3d(0, ${c}px, 0)`;
549
- }), g !== a && (S.log(`🔄 [Row Bind Trigger] currentStartIndex(${g}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
550
- const p = t(this, A).querySelector(u);
546
+ const l = t(this, it).firstTr, u = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
547
+ (b = t(this, it)) == null || b.scrollTables.forEach((g) => {
548
+ g.style.transform = `translate3d(0, ${c}px, 0)`;
549
+ }), u !== a && (S.log(`🔄 [Row Bind Trigger] currentStartIndex(${u}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
550
+ const p = t(this, A).querySelector(g);
551
551
  if (!p) return;
552
552
  const x = p.querySelector(".ng-part-body tbody.bindable-tbody");
553
553
  if (!x) return;
@@ -584,7 +584,7 @@ const ns = class ns {
584
584
  });
585
585
  }, "#bindRowData"));
586
586
  d(this, oe, /* @__PURE__ */ h(() => {
587
- var c, l, g;
587
+ var c, l, u;
588
588
  S.log("rowManager.#syncHeaderHeights");
589
589
  const n = t(this, A).querySelector(".ng-container-left .ng-part-header table"), e = t(this, A).querySelector(".ng-container-body .ng-part-header table"), s = t(this, A).querySelector(".ng-container-right .ng-part-header table");
590
590
  if (!e) return;
@@ -593,9 +593,9 @@ const ns = class ns {
593
593
  const b = [
594
594
  ((c = r[f]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
595
595
  ((l = i[f]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
596
- ((g = o[f]) == null ? void 0 : g.getBoundingClientRect().height) || 0
597
- ], u = Math.max(...b);
598
- u > 0 && (r[f] && (r[f].style.height = `${u}px`), i[f] && (i[f].style.height = `${u}px`), o[f] && (o[f].style.height = `${u}px`));
596
+ ((u = o[f]) == null ? void 0 : u.getBoundingClientRect().height) || 0
597
+ ], g = Math.max(...b);
598
+ g > 0 && (r[f] && (r[f].style.height = `${g}px`), i[f] && (i[f].style.height = `${g}px`), o[f] && (o[f].style.height = `${g}px`));
599
599
  }
600
600
  }, "#syncHeaderHeights"));
601
601
  q(this, "destroy", /* @__PURE__ */ h(() => {
@@ -627,23 +627,23 @@ const ie = class ie {
627
627
  if (!n) return null;
628
628
  const e = /* @__PURE__ */ h((a) => {
629
629
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
630
- const g = l.getAttribute("cell-type") || "renderer";
630
+ const u = l.getAttribute("cell-type") || "renderer";
631
631
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
632
- let f = `cell-${g}`;
633
- const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), p = l.getAttribute("maxbyte"), x = l.getAttribute("type");
632
+ let f = `cell-${u}`;
633
+ const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), p = l.getAttribute("maxbyte"), x = l.getAttribute("type");
634
634
  let w = [];
635
- b && w.push(`data-bind="${b}"`), u && w.push(`data-expr="${u}"`), p && w.push(`maxbyte="${p}"`), x && w.push(`type="${x}"`), l.innerHTML = `<${f} ${w.join(" ")}></${f}>`;
635
+ b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), p && w.push(`maxbyte="${p}"`), x && w.push(`type="${x}"`), l.innerHTML = `<${f} ${w.join(" ")}></${f}>`;
636
636
  }), a.querySelectorAll("tbody td, tfoot td").forEach((l) => {
637
637
  l.setAttribute("tabindex", "0");
638
638
  });
639
639
  }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
640
640
  if (!a.querySelector("colgroup")) {
641
- const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, g = document.createElement("colgroup"), f = Math.max(Math.floor(a.clientWidth / l), 100);
641
+ const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, u = document.createElement("colgroup"), f = Math.max(Math.floor(a.clientWidth / l), 100);
642
642
  for (let b = 0; b < l; b++) {
643
- const u = document.createElement("col");
644
- u.setAttribute("width", f), g.appendChild(u);
643
+ const g = document.createElement("col");
644
+ g.setAttribute("width", f), u.appendChild(g);
645
645
  }
646
- a.prepend(g);
646
+ a.prepend(u);
647
647
  }
648
648
  if (!a.querySelector("thead")) {
649
649
  const c = document.createElement("thead"), l = a.querySelector("colgroup");
@@ -651,33 +651,33 @@ const ie = class ie {
651
651
  }
652
652
  a.classList.add("nine-table-element");
653
653
  }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
654
- const l = Array.from(a.querySelectorAll(c + " tr")), g = Array.from(a.querySelectorAll(c + " th," + c + " td")), f = l.length;
655
- if (f === 0 || g.length === 0) return;
654
+ const l = Array.from(a.querySelectorAll(c + " tr")), u = Array.from(a.querySelectorAll(c + " th," + c + " td")), f = l.length;
655
+ if (f === 0 || u.length === 0) return;
656
656
  let b = 0;
657
- g.forEach((p) => {
657
+ u.forEach((p) => {
658
658
  b += p.colSpan || 1;
659
659
  });
660
- const u = Array.from(Array(f), () => Array(b).fill(null));
660
+ const g = Array.from(Array(f), () => Array(b).fill(null));
661
661
  l.forEach((p) => {
662
662
  const x = p.sectionRowIndex;
663
663
  let w = 0;
664
664
  Array.from(p.querySelectorAll("th,td")).forEach((m) => {
665
- for (let M = 0; M < u[x].length; M++)
666
- if (u[x][M] === null) {
665
+ for (let M = 0; M < g[x].length; M++)
666
+ if (g[x][M] === null) {
667
667
  w = M;
668
668
  break;
669
669
  }
670
670
  const T = m.rowSpan || 1, R = m.colSpan || 1;
671
671
  for (let M = 0; M < T; M++)
672
672
  for (let B = 0; B < R; B++)
673
- x + M < f && w + B < b && (u[x + M][w + B] = M === 0 && B === 0 ? "1" : "0");
673
+ x + M < f && w + B < b && (g[x + M][w + B] = M === 0 && B === 0 ? "1" : "0");
674
674
  });
675
675
  }), l.forEach((p) => {
676
676
  const x = p.sectionRowIndex;
677
677
  Array.from(p.querySelectorAll("th,td")).forEach((w) => {
678
- for (let m = 0; m < u[x].length; m++)
679
- if (u[x][m] === "1") {
680
- w.dataset.col = m, u[x][m] = "0";
678
+ for (let m = 0; m < g[x].length; m++)
679
+ if (g[x][m] === "1") {
680
+ w.dataset.col = m, g[x][m] = "0";
681
681
  break;
682
682
  }
683
683
  });
@@ -685,8 +685,8 @@ const ie = class ie {
685
685
  }, "resetColIndex"), i = n.cloneNode(!0);
686
686
  return s(i), e(i), r(i, "thead"), r(i, "tbody"), r(i, "tfoot"), Array.from(i.querySelectorAll("colgroup col")).forEach((a, c) => {
687
687
  const l = a.getAttribute("fixed");
688
- l && i.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((g) => {
689
- g.setAttribute("fixed", l);
688
+ l && i.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((u) => {
689
+ u.setAttribute("fixed", l);
690
690
  });
691
691
  }), i;
692
692
  }
@@ -718,11 +718,11 @@ const rs = class rs {
718
718
  i.forEach((a) => {
719
719
  a.querySelectorAll("tbody tr").forEach((c) => {
720
720
  const { matrixRow: l } = V(this, K, qt).call(this, c);
721
- l < 0 || c.querySelectorAll("td, th").forEach((g) => {
722
- const f = parseInt(g.dataset.col, 10);
721
+ l < 0 || c.querySelectorAll("td, th").forEach((u) => {
722
+ const f = parseInt(u.dataset.col, 10);
723
723
  if (isNaN(f)) return;
724
- const b = parseInt(g.rowSpan || 1, 10), u = parseInt(g.colSpan || 1, 10), p = l + b - 1, x = f + u - 1;
725
- p >= n && l <= s && x >= e && f <= r && (o++, g.classList.add("selected"), S.log(g, n, e, s, r), l <= n && g.classList.add("selected-top"), p >= s && g.classList.add("selected-bottom"), f <= e && g.classList.add("selected-left"), x >= r && g.classList.add("selected-right"));
724
+ const b = parseInt(u.rowSpan || 1, 10), g = parseInt(u.colSpan || 1, 10), p = l + b - 1, x = f + g - 1;
725
+ p >= n && l <= s && x >= e && f <= r && (o++, u.classList.add("selected"), S.log(u, n, e, s, r), l <= n && u.classList.add("selected-top"), p >= s && u.classList.add("selected-bottom"), f <= e && u.classList.add("selected-left"), x >= r && u.classList.add("selected-right"));
726
726
  });
727
727
  });
728
728
  }), S.log(`✨ [CellSelection.render] Total rendered cells marked: ${o}`);
@@ -741,19 +741,19 @@ const rs = class rs {
741
741
  const l = t(this, N).querySelectorAll(
742
742
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
743
743
  );
744
- let g = !0, f = 0;
745
- for (; g && f < 5; )
746
- g = !1, f++, l.forEach((b) => {
747
- b.querySelectorAll("tbody tr").forEach((u) => {
748
- if (u.classList.contains("nodata")) return;
749
- const { matrixRow: p } = V(this, K, qt).call(this, u);
750
- p < 0 || u.querySelectorAll("td, th").forEach((x) => {
744
+ let u = !0, f = 0;
745
+ for (; u && f < 5; )
746
+ u = !1, f++, l.forEach((b) => {
747
+ b.querySelectorAll("tbody tr").forEach((g) => {
748
+ if (g.classList.contains("nodata")) return;
749
+ const { matrixRow: p } = V(this, K, qt).call(this, g);
750
+ p < 0 || g.querySelectorAll("td, th").forEach((x) => {
751
751
  const w = parseInt(x.dataset.col, 10);
752
752
  if (isNaN(w)) return;
753
753
  const m = parseInt(x.rowSpan || 1, 10), T = parseInt(x.colSpan || 1, 10), R = p + m - 1, M = w + T - 1;
754
754
  if (R >= i && p <= o && M >= a && w <= c) {
755
755
  const z = Math.min(i, p), Gt = Math.max(o, R), bs = Math.min(a, w), ps = Math.max(c, M);
756
- (z !== i || Gt !== o || bs !== a || ps !== c) && (i = z, o = Gt, a = bs, c = ps, g = !0);
756
+ (z !== i || Gt !== o || bs !== a || ps !== c) && (i = z, o = Gt, a = bs, c = ps, u = !0);
757
757
  }
758
758
  });
759
759
  });
@@ -787,24 +787,24 @@ N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(
787
787
  let a = i, c = o;
788
788
  const l = /* @__PURE__ */ h((f) => {
789
789
  const b = document.elementFromPoint(f.clientX, f.clientY);
790
- let u = b == null ? void 0 : b.closest("td, th");
791
- if (!u || !t(this, N).contains(u)) {
790
+ let g = b == null ? void 0 : b.closest("td, th");
791
+ if (!g || !t(this, N).contains(g)) {
792
792
  const m = t(this, N).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
793
793
  for (const T of m) {
794
794
  const R = T.getBoundingClientRect();
795
795
  if (f.clientX >= R.left && f.clientX <= R.right && f.clientY >= R.top && f.clientY <= R.bottom) {
796
- u = T;
796
+ g = T;
797
797
  break;
798
798
  }
799
799
  }
800
800
  }
801
- if (!u || u.dataset.row === void 0 || u.dataset.col === void 0 || u.closest("tr").classList.contains("nodata")) return;
802
- const p = u.closest("tr"), { matrixRow: x } = V(this, K, qt).call(this, p), w = parseInt(u.dataset.col, 10);
801
+ if (!g || g.dataset.row === void 0 || g.dataset.col === void 0 || g.closest("tr").classList.contains("nodata")) return;
802
+ const p = g.closest("tr"), { matrixRow: x } = V(this, K, qt).call(this, p), w = parseInt(g.dataset.col, 10);
803
803
  x < 0 || a === x && c === w || (a = x, c = w, this.setRange(i, o, x, w));
804
- }, "onMouseMove"), g = /* @__PURE__ */ h(() => {
805
- S.log("🖱️ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", g);
804
+ }, "onMouseMove"), u = /* @__PURE__ */ h(() => {
805
+ S.log("🖱️ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", u);
806
806
  }, "onMouseUp");
807
- document.addEventListener("mousemove", l), document.addEventListener("mouseup", g);
807
+ document.addEventListener("mousemove", l), document.addEventListener("mouseup", u);
808
808
  });
809
809
  }, "#initEvents"), h(rs, "CellSelection");
810
810
  let Le = rs;
@@ -858,21 +858,21 @@ const os = class os {
858
858
  return e.forEach((r) => {
859
859
  const i = Array.from(r.querySelectorAll("tbody tr:not(.nodata)"));
860
860
  for (const o of i) {
861
- const a = parseInt(o.dataset.row, 10), c = i.filter((p) => parseInt(p.dataset.row, 10) === a), l = c.length > 0 ? c.length : 1, g = c.indexOf(o), f = a * l + (g >= 0 ? g : 0);
861
+ const a = parseInt(o.dataset.row, 10), c = i.filter((p) => parseInt(p.dataset.row, 10) === a), l = c.length > 0 ? c.length : 1, u = c.indexOf(o), f = a * l + (u >= 0 ? u : 0);
862
862
  if (f === n) {
863
863
  s.push(o);
864
864
  break;
865
865
  }
866
866
  const b = Array.from(o.querySelectorAll("td"));
867
- let u = !1;
867
+ let g = !1;
868
868
  for (const p of b) {
869
869
  const x = parseInt(p.rowSpan || 1, 10);
870
870
  if (x > 1 && n >= f && n < f + x) {
871
- s.push(o), u = !0;
871
+ s.push(o), g = !0;
872
872
  break;
873
873
  }
874
874
  }
875
- if (u) break;
875
+ if (g) break;
876
876
  }
877
877
  }), s;
878
878
  }, "#findTargetTrsByMatrix"));
@@ -884,7 +884,7 @@ const os = class os {
884
884
  for (const a of i) {
885
885
  const c = Array.from(a.querySelectorAll("tbody tr:not(.nodata)"));
886
886
  for (const l of c) {
887
- const g = parseInt(l.dataset.row, 10), f = c.filter((w) => parseInt(w.dataset.row, 10) === g), b = f.length > 0 ? f.length : 1, u = f.indexOf(l), p = g * b + (u >= 0 ? u : 0), x = Array.from(l.querySelectorAll("td"));
887
+ const u = parseInt(l.dataset.row, 10), f = c.filter((w) => parseInt(w.dataset.row, 10) === u), b = f.length > 0 ? f.length : 1, g = f.indexOf(l), p = u * b + (g >= 0 ? g : 0), x = Array.from(l.querySelectorAll("td"));
888
888
  for (const w of x) {
889
889
  const m = parseInt(w.dataset.col, 10), T = parseInt(w.colSpan || 1, 10), R = parseInt(w.rowSpan || 1, 10);
890
890
  if (!isNaN(m) && s >= m && s < m + T && o >= p && o < p + R && window.getComputedStyle(w).display !== "none")
@@ -907,8 +907,8 @@ const os = class os {
907
907
  y(this, ae, e), y(this, le, s);
908
908
  const r = n.closest("tr"), i = r == null ? void 0 : r.closest("tbody");
909
909
  if (i) {
910
- const a = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((f) => parseInt(f.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), g = e * c + (l >= 0 ? l : 0);
911
- t(this, F).selection.setRange(g, s, g, s);
910
+ const a = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((f) => parseInt(f.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), u = e * c + (l >= 0 ? l : 0);
911
+ t(this, F).selection.setRange(u, s, u, s);
912
912
  }
913
913
  }
914
914
  }
@@ -917,27 +917,27 @@ const os = class os {
917
917
  if (!t(this, lt)) return;
918
918
  const e = t(this, lt), s = e.closest("tr"), r = parseInt(e.dataset.row, 10), i = parseInt(e.dataset.col, 10), o = s == null ? void 0 : s.closest("tbody");
919
919
  if (!o) return;
920
- const c = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((B) => parseInt(B.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, g = c.indexOf(s), f = r * l + (g >= 0 ? g : 0);
921
- let b = f, u = i;
920
+ const c = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((B) => parseInt(B.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, u = c.indexOf(s), f = r * l + (u >= 0 ? u : 0);
921
+ let b = f, g = i;
922
922
  switch (n.code) {
923
923
  case "Tab":
924
924
  if (n.preventDefault(), n.shiftKey) {
925
- if (u = t(this, Bt).call(this, f, i), u < 0 && f > 0) {
925
+ if (g = t(this, Bt).call(this, f, i), g < 0 && f > 0) {
926
926
  b = f - 1;
927
927
  const B = t(this, ct).call(this, b), z = t(this, Ot).call(this, B);
928
- u = z ? parseInt(z.dataset.col, 10) : 0;
928
+ g = z ? parseInt(z.dataset.col, 10) : 0;
929
929
  }
930
930
  } else {
931
- u = t(this, Dt).call(this, f, i);
931
+ g = t(this, Dt).call(this, f, i);
932
932
  const B = t(this, ct).call(this, f), z = t(this, Ot).call(this, B), Gt = z ? parseInt(z.dataset.col, 10) + parseInt(z.colSpan || 1, 10) : 0;
933
- u >= Gt && (b = f + 1, u = 0);
933
+ g >= Gt && (b = f + 1, g = 0);
934
934
  }
935
935
  break;
936
936
  case "ArrowRight":
937
- u = t(this, Dt).call(this, f, i);
937
+ g = t(this, Dt).call(this, f, i);
938
938
  break;
939
939
  case "ArrowLeft":
940
- u = t(this, Bt).call(this, f, i);
940
+ g = t(this, Bt).call(this, f, i);
941
941
  break;
942
942
  case "ArrowDown":
943
943
  n.preventDefault(), b = f + (e.rowSpan || 1);
@@ -947,13 +947,13 @@ const os = class os {
947
947
  break;
948
948
  }
949
949
  const p = Math.floor(b / l), x = b % l;
950
- let w = t(this, Wt).call(this, p, x, u, b);
950
+ let w = t(this, Wt).call(this, p, x, g, b);
951
951
  if (w)
952
952
  this.currentCell = w, V(this, pt, He).call(this, w);
953
953
  else if (p !== r && p >= 0) {
954
954
  const B = ((T = (m = t(this, F)).getRowHeight) == null ? void 0 : T.call(m)) || 40;
955
955
  (M = (R = t(this, F)).scrollToY) == null || M.call(R, p * B), setTimeout(() => {
956
- const z = t(this, Wt).call(this, p, x, u, b);
956
+ const z = t(this, Wt).call(this, p, x, g, b);
957
957
  z && (this.currentCell = z, V(this, pt, He).call(this, z));
958
958
  }, 0);
959
959
  }
@@ -1021,8 +1021,8 @@ const Ct = class Ct extends HTMLElement {
1021
1021
  const i = e.cloneNode(!0), o = i.querySelector("thead"), a = i.querySelector("tbody"), c = i.querySelector("tfoot");
1022
1022
  if (r === "header") {
1023
1023
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
1024
- const g = document.createElement("tbody");
1025
- g.className = "fixed-tbody", i.appendChild(g);
1024
+ const u = document.createElement("tbody");
1025
+ u.className = "fixed-tbody", i.appendChild(u);
1026
1026
  }
1027
1027
  } else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
1028
1028
  return s === "left" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -1279,33 +1279,33 @@ const is = class is extends HTMLElement {
1279
1279
  }, "#init"));
1280
1280
  d(this, Ft, /* @__PURE__ */ h((e, s = !1) => {
1281
1281
  const r = /* @__PURE__ */ h(() => {
1282
- const g = Array.from(this.querySelectorAll("nine-table-sheet"));
1283
- Array.from(this.querySelectorAll("nine-splitter")).forEach((u) => u.style.setProperty("display", "none"));
1284
- const b = g.filter((u) => u.classList.contains("active"));
1285
- b.length < 2 || b.forEach((u) => {
1286
- const p = parseInt(u.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${p}"]`), w = g[p + 1];
1282
+ const u = Array.from(this.querySelectorAll("nine-table-sheet"));
1283
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1284
+ const b = u.filter((g) => g.classList.contains("active"));
1285
+ b.length < 2 || b.forEach((g) => {
1286
+ const p = parseInt(g.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${p}"]`), w = u[p + 1];
1287
1287
  x && w && w.classList.contains("active") && x.style.setProperty("display", "flex");
1288
1288
  });
1289
1289
  }, "updateSplitters"), i = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = i.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
1290
1290
  if (!a[e]) return;
1291
1291
  if (!s)
1292
- a.forEach((g, f) => {
1293
- g.classList.toggle("active", f === e);
1294
- }), c.forEach((g, f) => {
1292
+ a.forEach((u, f) => {
1293
+ u.classList.toggle("active", f === e);
1294
+ }), c.forEach((u, f) => {
1295
1295
  const b = f === e;
1296
- g.classList.toggle("active", b), g.style.flex = b ? "1 1 100%" : "";
1296
+ u.classList.toggle("active", b), u.style.flex = b ? "1 1 100%" : "";
1297
1297
  });
1298
1298
  else {
1299
- const g = a[e], f = i.querySelectorAll(".nine-tab-item.active");
1300
- if (g.classList.contains("active") && f.length <= 1)
1299
+ const u = a[e], f = i.querySelectorAll(".nine-tab-item.active");
1300
+ if (u.classList.contains("active") && f.length <= 1)
1301
1301
  return;
1302
- g.classList.toggle("active");
1302
+ u.classList.toggle("active");
1303
1303
  const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
1304
1304
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
1305
1305
  }
1306
1306
  const l = o.querySelectorAll("nine-table-sheet.active");
1307
- l == null || l.forEach((g) => {
1308
- g.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1307
+ l == null || l.forEach((u) => {
1308
+ u.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1309
1309
  }), r();
1310
1310
  }, "#switchSheet"));
1311
1311
  }
@@ -1330,7 +1330,7 @@ const as = class as {
1330
1330
  var c, l;
1331
1331
  const n = Array.from(t(this, _).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1332
1332
  if (n.length === 0) return;
1333
- const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((g) => g.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, i = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Zt.SCROLLBAR_SIZE, a = e * s + r + i + o;
1333
+ const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((u) => u.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, i = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Zt.SCROLLBAR_SIZE, a = e * s + r + i + o;
1334
1334
  t(this, _).style.height = `${a}px`;
1335
1335
  }, "#applyAutoHeight"));
1336
1336
  d(this, pe, /* @__PURE__ */ h(() => {
@@ -1604,8 +1604,8 @@ const P = class P {
1604
1604
  if (!n) return n;
1605
1605
  const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((o = t(this, D).fields) == null ? void 0 : o.get) == "function" ? t(this, D).fields.get() : [], i = s.filter((a) => !a.__ng.deleted).map((a) => {
1606
1606
  const c = {};
1607
- return r.forEach((l, g) => {
1608
- c[l] = a.v ? a.v[g] : a[l];
1607
+ return r.forEach((l, u) => {
1608
+ c[l] = a.v ? a.v[u] : a[l];
1609
1609
  }), c.__ng = a.__ng, c;
1610
1610
  });
1611
1611
  return e ? i[0] : i;
@@ -1828,10 +1828,10 @@ const fs = class fs extends ze {
1828
1828
  if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1829
1829
  for (var o of r) {
1830
1830
  if (o > e) break;
1831
- var a = parseInt(t(this, v).dataset.row), c = a - 1, l = t(this, v).closest("tr").data, g = t(this, L).data.get(c);
1831
+ var a = parseInt(t(this, v).dataset.row), c = a - 1, l = t(this, v).closest("tr").data, u = t(this, L).data.get(c);
1832
1832
  t(this, v).dataset.matrixRow;
1833
- var f = t(this, L).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, v).dataset.matrixRow}"]`), b = f.dataset.expr ? this.getExprValue(f.dataset.expr, l, a) : l[f.dataset.bind], u = f.dataset.expr ? this.getExprValue(f.dataset.expr, g, c) : g[f.dataset.bind];
1834
- if (b != u) {
1833
+ var f = t(this, L).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, v).dataset.matrixRow}"]`), b = f.dataset.expr ? this.getExprValue(f.dataset.expr, l, a) : l[f.dataset.bind], g = f.dataset.expr ? this.getExprValue(f.dataset.expr, u, c) : u[f.dataset.bind];
1834
+ if (b != g) {
1835
1835
  i = !0;
1836
1836
  break;
1837
1837
  }