@ninebone/table 0.0.749 β†’ 0.0.751

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.
@@ -22,7 +22,7 @@ const Xe = class Xe extends ms.constructor {
22
22
  };
23
23
  h(Xe, "Trace");
24
24
  let we = Xe;
25
- const S = new we();
25
+ const w = new we();
26
26
  var B, K, A, tt, et, st, Vt, nt, Ut;
27
27
  const Ke = class Ke extends HTMLElement {
28
28
  constructor() {
@@ -212,7 +212,7 @@ const Ge = class Ge extends HTMLElement {
212
212
  d(this, Tt, 0);
213
213
  d(this, Ct, 0);
214
214
  E(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (S.log("vscrollbar.refresh"), !t(this, rt) || !t(this, C)) return;
215
+ if (w.log("vscrollbar.refresh"), !t(this, rt) || !t(this, C)) return;
216
216
  const e = t(this, C).container, n = t(this, C).track, r = t(this, C).thumb, o = e.clientHeight, i = t(this, rt).data.length, a = t(this, ot).getRowHeight(), c = i * a;
217
217
  if (c <= o || i === 0) {
218
218
  this.style.display = "none";
@@ -224,14 +224,14 @@ const Ge = class Ge extends HTMLElement {
224
224
  const f = Math.max(Math.min(l * (o / c), l), 20);
225
225
  r.style.height = `${f}px`;
226
226
  const u = e.scrollTop, b = Math.max(c - o, 1);
227
- S.log(e, u, b);
227
+ w.log(e, u, b);
228
228
  let g = 0;
229
229
  b > 0 && (g = u / b * (l - f));
230
230
  const y = l - f;
231
231
  g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, C).top.disabled = u <= 0, t(this, C).bottom.disabled = u >= b - 1;
232
232
  }, "refresh"));
233
233
  d(this, Xt, /* @__PURE__ */ h(() => {
234
- S.log("nine-table-vscrollbar.#init");
234
+ w.log("nine-table-vscrollbar.#init");
235
235
  const e = t(this, C).container, n = /* @__PURE__ */ h(() => {
236
236
  const o = (t(this, rt).data.get() || []).length, i = t(this, ot).getRowHeight();
237
237
  return o * i;
@@ -243,8 +243,8 @@ const Ge = class Ge extends HTMLElement {
243
243
  if (!t(this, bt)) return;
244
244
  const c = t(this, C).track.getBoundingClientRect(), l = t(this, C).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, Tt), g = e.clientHeight, y = n(), v = Math.max(y - g, 1);
245
245
  if (u > 0 && v > 0) {
246
- const w = b / u * v;
247
- let m = t(this, Ct) + w;
246
+ const S = b / u * v;
247
+ let m = t(this, Ct) + S;
248
248
  const I = Math.max(0, y - g);
249
249
  m < 0 && (m = 0), m > I && (m = I), e.scrollTop = m;
250
250
  }
@@ -370,12 +370,12 @@ const Ze = class Ze {
370
370
  d(this, Kt, 3);
371
371
  E(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
- S.log("rowManager.refresh");
373
+ w.log("rowManager.refresh");
374
374
  const s = t(this, R).querySelector(".ng-container-body .ng-part-body");
375
375
  s && (t(this, Lt).call(this), t(this, It).call(this), t(this, pt).call(this, s.scrollTop), (e = t(this, R).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
377
  E(this, "initialize", /* @__PURE__ */ h(() => {
378
- S.log("rowManager.initialize"), p(this, it, {
378
+ w.log("rowManager.initialize"), p(this, it, {
379
379
  scrollTables: t(this, R).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, R).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
381
  }), p(this, D, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
@@ -401,13 +401,13 @@ const Ze = class Ze {
401
401
  }, "handleContainerScroll");
402
402
  [s, e, n].forEach((c) => {
403
403
  c == null || c.addEventListener("scroll", (l) => {
404
- S.log(l), S.log("rowManager.scroll event"), a(c);
404
+ w.log(l), w.log("rowManager.scroll event"), a(c);
405
405
  });
406
406
  });
407
407
  }
408
408
  }, "initialize"));
409
409
  d(this, Gt, /* @__PURE__ */ h((s, e) => {
410
- S.log("rowManager.#renderRows");
410
+ w.log("rowManager.#renderRows");
411
411
  const n = t(this, P).get(e);
412
412
  if (!n || n.length === 0) return;
413
413
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
@@ -424,11 +424,11 @@ const Ze = class Ze {
424
424
  if (t(this, D) !== null && t(this, D) > 0)
425
425
  return t(this, D);
426
426
  const s = t(this, R).querySelector(".ng-container-body .ng-part-body");
427
- S.log("rowManager.#measureAndCacheHeight");
427
+ w.log("rowManager.#measureAndCacheHeight");
428
428
  const e = t(this, P).get(".ng-container-body");
429
429
  if (!e || e.length === 0) throw new Error("invalid dom");
430
430
  const n = s.querySelector("tbody.bindable-tbody");
431
- if (S.log(n), !n) throw new Error("invalid dom");
431
+ if (w.log(n), !n) throw new Error("invalid dom");
432
432
  n.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
433
433
  const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
434
434
  e.forEach((b) => {
@@ -448,9 +448,9 @@ const Ze = class Ze {
448
448
  }), u.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, D, f), t(this, Ht).call(this), t(this, D));
449
449
  }, "#measureAndCacheHeight"));
450
450
  d(this, It, /* @__PURE__ */ h(() => {
451
- S.log("rowManager.#updateVirtualScrollHeight");
451
+ w.log("rowManager.#updateVirtualScrollHeight");
452
452
  const e = (t(this, j).data.get() || []).length, n = t(this, D), r = e * n;
453
- S.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: n, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
453
+ w.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: n, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
454
454
  const i = t(this, R).querySelector(o);
455
455
  if (!i) return;
456
456
  const a = i.querySelector(".ng-part-body .ng-virtual-spacer");
@@ -467,8 +467,8 @@ const Ze = class Ze {
467
467
  var a, c, l, f, u, b;
468
468
  const s = t(this, R).querySelector(".ng-container-left .ng-part-body table"), e = t(this, R).querySelector(".ng-container-body .ng-part-body table"), n = t(this, R).querySelector(".ng-container-right .ng-part-body table");
469
469
  if (e) {
470
- const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), v = n ? Array.from(n.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, y.length, v.length);
471
- for (let m = 0; m < w; m++) {
470
+ const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), v = n ? Array.from(n.querySelectorAll("tbody tr")) : [], S = Math.max(g.length, y.length, v.length);
471
+ for (let m = 0; m < S; m++) {
472
472
  const I = [
473
473
  ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
474
  ((c = y[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
@@ -479,8 +479,8 @@ const Ze = class Ze {
479
479
  }
480
480
  const r = t(this, R).querySelector(".ng-container-left .ng-part-footer table"), o = t(this, R).querySelector(".ng-container-body .ng-part-footer table"), i = t(this, R).querySelector(".ng-container-right .ng-part-footer table");
481
481
  if (o) {
482
- const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, y.length, v.length);
483
- for (let m = 0; m < w; m++) {
482
+ const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], S = Math.max(g.length, y.length, v.length);
483
+ for (let m = 0; m < S; m++) {
484
484
  const I = [
485
485
  ((f = g[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
486
  ((u = y[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
@@ -507,7 +507,7 @@ const Ze = class Ze {
507
507
  })), t(this, G).observe(t(this, R)));
508
508
  }, "#initResizeObserver"));
509
509
  d(this, Mt, /* @__PURE__ */ h(() => {
510
- S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
510
+ w.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
511
511
  const e = t(this, R).querySelector(s);
512
512
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Gt).call(this, e, s);
513
513
  }), t(this, Qt).call(this), t(this, Zt).call(this);
@@ -538,14 +538,14 @@ const Ze = class Ze {
538
538
  const n = t(this, j).data.length;
539
539
  if (n === 0) return;
540
540
  const r = ((u = t(this, P).get(".ng-container-body")) == null ? void 0 : u.length) || 1, o = t(this, R).querySelector(".ng-container-body .ng-part-body");
541
- S.log("bodyContainer.clientHeight", o.clientHeight);
541
+ w.log("bodyContainer.clientHeight", o.clientHeight);
542
542
  const i = Math.max(0, n - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(s / e)));
543
543
  let c = Math.floor(a * e);
544
- S.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && S.log(`πŸ“œ [Scroll Inspect] scrollTop: ${s}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
544
+ w.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && w.log(`πŸ“œ [Scroll Inspect] scrollTop: ${s}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
545
  const l = t(this, it).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
546
  (b = t(this, it)) == null || b.scrollTables.forEach((g) => {
547
547
  g.style.transform = `translate3d(0, ${c}px, 0)`;
548
- }), f !== a && (S.log(`πŸ”„ [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
548
+ }), f !== a && (w.log(`πŸ”„ [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
549
549
  const y = t(this, R).querySelector(g);
550
550
  if (!y) return;
551
551
  const v = y.querySelector(".ng-part-body tbody.bindable-tbody");
@@ -584,7 +584,7 @@ const Ze = class Ze {
584
584
  }, "#bindRowData"));
585
585
  d(this, Qt, /* @__PURE__ */ h(() => {
586
586
  var c, l, f;
587
- S.log("rowManager.#syncHeaderHeights");
587
+ w.log("rowManager.#syncHeaderHeights");
588
588
  const s = t(this, R).querySelector(".ng-container-left .ng-part-header table"), e = t(this, R).querySelector(".ng-container-body .ng-part-header table"), n = t(this, R).querySelector(".ng-container-right .ng-part-header table");
589
589
  if (!e) return;
590
590
  const r = s ? Array.from(s.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = n ? Array.from(n.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
@@ -630,8 +630,10 @@ const te = class te {
630
630
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
631
  let u = `cell-${f}`;
632
632
  const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), v = l.getAttribute("type");
633
- let w = [];
634
- b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), y && w.push(`maxbyte="${y}"`), v && w.push(`type="${v}"`), l.innerHTML = `<${u} ${w.join(" ")}></${u}>`;
633
+ let S = [];
634
+ b && S.push(`data-bind="${b}"`), g && S.push(`data-expr="${g}"`), y && S.push(`maxbyte="${y}"`), v && S.push(`type="${v}"`), l.innerHTML = `<${u} ${S.join(" ")}></${u}>`;
635
+ }), a.querySelectorAll("tbody td, tfoot td").forEach((l) => {
636
+ l.setAttribute("tabindex", "0");
635
637
  });
636
638
  }, "processCellTypes"), n = /* @__PURE__ */ h((a) => {
637
639
  if (!a.querySelector("colgroup")) {
@@ -657,24 +659,24 @@ const te = class te {
657
659
  const g = Array.from(Array(u), () => Array(b).fill(null));
658
660
  l.forEach((y) => {
659
661
  const v = y.sectionRowIndex;
660
- let w = 0;
662
+ let S = 0;
661
663
  Array.from(y.querySelectorAll("th,td")).forEach((m) => {
662
664
  for (let H = 0; H < g[v].length; H++)
663
665
  if (g[v][H] === null) {
664
- w = H;
666
+ S = H;
665
667
  break;
666
668
  }
667
669
  const I = m.rowSpan || 1, T = m.colSpan || 1;
668
670
  for (let H = 0; H < I; H++)
669
671
  for (let F = 0; F < T; F++)
670
- v + H < u && w + F < b && (g[v + H][w + F] = H === 0 && F === 0 ? "1" : "0");
672
+ v + H < u && S + F < b && (g[v + H][S + F] = H === 0 && F === 0 ? "1" : "0");
671
673
  });
672
674
  }), l.forEach((y) => {
673
675
  const v = y.sectionRowIndex;
674
- Array.from(y.querySelectorAll("th,td")).forEach((w) => {
676
+ Array.from(y.querySelectorAll("th,td")).forEach((S) => {
675
677
  for (let m = 0; m < g[v].length; m++)
676
678
  if (g[v][m] === "1") {
677
- w.dataset.col = m, g[v][m] = "0";
679
+ S.dataset.col = m, g[v][m] = "0";
678
680
  break;
679
681
  }
680
682
  });
@@ -699,7 +701,7 @@ const Je = class Je {
699
701
  d(this, Y, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
700
702
  E(this, "render", /* @__PURE__ */ h(() => {
701
703
  const { startRow: s, startCol: e, endRow: n, endCol: r } = t(this, Y);
702
- S.log("🎨 [CellSelection.render] Rendering range ->", t(this, Y));
704
+ w.log("🎨 [CellSelection.render] Rendering range ->", t(this, Y));
703
705
  const o = t(this, _).querySelectorAll(
704
706
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
705
707
  );
@@ -708,22 +710,24 @@ const Je = class Je {
708
710
  c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
709
711
  });
710
712
  }), s < 0 || e < 0) {
711
- S.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
713
+ w.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
712
714
  return;
713
715
  }
714
716
  let i = 0;
715
717
  o.forEach((a) => {
716
718
  a.querySelectorAll("tbody tr").forEach((c) => {
717
- if (c.classList.contains("nodata")) return;
718
719
  const { matrixRow: l } = Q(this, U, At).call(this, c);
719
720
  l < 0 || c.querySelectorAll("td, th").forEach((f) => {
720
721
  const u = parseInt(f.dataset.col, 10);
721
722
  if (isNaN(u)) return;
722
723
  const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), y = l + b - 1, v = u + g - 1;
723
- y >= s && l <= n && v >= e && u <= r && (i++, f.classList.add("selected"), l <= s && f.classList.add("selected-top"), y >= n && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), v >= r && f.classList.add("selected-right"));
724
+ if (!(y >= s && l <= n && v >= e && u <= r)) return;
725
+ i++, f.classList.add("selected");
726
+ const m = s === n && e === r;
727
+ w.log(f, s, e, n, r), m ? f.classList.add("selected-top", "selected-bottom", "selected-left", "selected-right") : (l <= s && f.classList.add("selected-top"), y >= n && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), v >= r && f.classList.add("selected-right"));
724
728
  });
725
729
  });
726
- }), S.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
730
+ }), w.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
727
731
  }, "render"));
728
732
  p(this, _, s), Q(this, U, bs).call(this), t(this, _).querySelectorAll(
729
733
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
@@ -731,10 +735,10 @@ const Je = class Je {
731
735
  n.addEventListener("scroll", () => {
732
736
  t(this, Y).startRow >= 0 && t(this, Y).startCol >= 0 && this.render();
733
737
  });
734
- }), S.log("🎯 [CellSelection] Initialized");
738
+ }), w.log("🎯 [CellSelection] Initialized");
735
739
  }
736
740
  setRange(s, e, n, r) {
737
- S.log(`πŸ” [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${n}, endCol: ${r}`);
741
+ w.log(`πŸ” [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${n}, endCol: ${r}`);
738
742
  let o = Math.min(s, n), i = Math.max(s, n), a = Math.min(e, r), c = Math.max(e, r);
739
743
  const l = t(this, _).querySelectorAll(
740
744
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
@@ -746,17 +750,17 @@ const Je = class Je {
746
750
  if (g.classList.contains("nodata")) return;
747
751
  const { matrixRow: y } = Q(this, U, At).call(this, g);
748
752
  y < 0 || g.querySelectorAll("td, th").forEach((v) => {
749
- const w = parseInt(v.dataset.col, 10);
750
- if (isNaN(w)) return;
751
- const m = parseInt(v.rowSpan || 1, 10), I = parseInt(v.colSpan || 1, 10), T = y + m - 1, H = w + I - 1;
752
- if (T >= o && y <= i && H >= a && w <= c) {
753
- const X = Math.min(o, y), cs = Math.max(i, T), hs = Math.min(a, w), ds = Math.max(c, H);
753
+ const S = parseInt(v.dataset.col, 10);
754
+ if (isNaN(S)) return;
755
+ const m = parseInt(v.rowSpan || 1, 10), I = parseInt(v.colSpan || 1, 10), T = y + m - 1, H = S + I - 1;
756
+ if (T >= o && y <= i && H >= a && S <= c) {
757
+ const X = Math.min(o, y), cs = Math.max(i, T), hs = Math.min(a, S), ds = Math.max(c, H);
754
758
  (X !== o || cs !== i || hs !== a || ds !== c) && (o = X, i = cs, a = hs, c = ds, f = !0);
755
759
  }
756
760
  });
757
761
  });
758
762
  });
759
- p(this, Y, { startRow: o, startCol: a, endRow: i, endCol: c }), S.log("πŸ“¦ [CellSelection.setRange] Final Range ->", t(this, Y)), this.render();
763
+ p(this, Y, { startRow: o, startCol: a, endRow: i, endCol: c }), w.log("πŸ“¦ [CellSelection.setRange] Final Range ->", t(this, Y)), this.render();
760
764
  }
761
765
  };
762
766
  _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(function(s) {
@@ -768,7 +772,7 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
768
772
  }, "#getMatrixRow"), bs = /* @__PURE__ */ h(function() {
769
773
  const s = t(this, _).querySelector(".ng-container-top");
770
774
  if (!s) {
771
- S.log("❌ [CellSelection] .ng-container-top not found!");
775
+ w.log("❌ [CellSelection] .ng-container-top not found!");
772
776
  return;
773
777
  }
774
778
  s.addEventListener("mousedown", (e) => {
@@ -781,16 +785,16 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
781
785
  t(this, _).style.userSelect = "", t(this, _).style.webkitUserSelect = "";
782
786
  return;
783
787
  }
784
- S.log(`πŸ–±οΈ [MouseDown Success] startRow: ${o}, startCol: ${i}`), this.setRange(o, i, o, i);
788
+ w.log(`πŸ–±οΈ [MouseDown Success] startRow: ${o}, startCol: ${i}`), this.setRange(o, i, o, i);
785
789
  const a = /* @__PURE__ */ h((l) => {
786
790
  const f = document.elementFromPoint(l.clientX, l.clientY);
787
791
  let u = f == null ? void 0 : f.closest("td, th");
788
792
  if (!u || !t(this, _).contains(u)) {
789
793
  const v = t(this, _).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
790
- for (const w of v) {
791
- const m = w.getBoundingClientRect();
794
+ for (const S of v) {
795
+ const m = S.getBoundingClientRect();
792
796
  if (l.clientX >= m.left && l.clientX <= m.right && l.clientY >= m.top && l.clientY <= m.bottom) {
793
- u = w;
797
+ u = S;
794
798
  break;
795
799
  }
796
800
  }
@@ -799,7 +803,7 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
799
803
  const b = u.closest("tr"), { matrixRow: g } = Q(this, U, At).call(this, b), y = parseInt(u.dataset.col, 10);
800
804
  g < 0 || this.setRange(o, i, g, y);
801
805
  }, "onMouseMove"), c = /* @__PURE__ */ h(() => {
802
- S.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, _).style.userSelect = "", t(this, _).style.webkitUserSelect = "", document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c);
806
+ w.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, _).style.userSelect = "", t(this, _).style.webkitUserSelect = "", document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c);
803
807
  }, "onMouseUp");
804
808
  document.addEventListener("mousemove", a), document.addEventListener("mouseup", c);
805
809
  });
@@ -815,7 +819,7 @@ const Qe = class Qe {
815
819
  d(this, ee, -1);
816
820
  d(this, se, -1);
817
821
  d(this, _t, !1);
818
- p(this, V, s), Q(this, ne, ps).call(this), S.log("🎯 [CellNavigation] Initialized");
822
+ p(this, V, s), Q(this, ne, ps).call(this), w.log("🎯 [CellNavigation] Initialized");
819
823
  }
820
824
  get currentCell() {
821
825
  return t(this, lt);
@@ -869,11 +873,11 @@ const Qe = class Qe {
869
873
  };
870
874
  V = new WeakMap(), lt = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), _t = new WeakMap(), ne = new WeakSet(), ps = /* @__PURE__ */ h(function() {
871
875
  t(this, V).addEventListener("mousedown", (s) => {
872
- S.log(s);
876
+ w.log(s);
873
877
  const e = s.target.closest("td, th");
874
878
  !e || e.dataset.row === void 0 || e.dataset.col === void 0 || e.closest("tr").classList.contains("nodata") || (this.currentCell = e);
875
879
  }), t(this, V).addEventListener("keydown", (s) => {
876
- S.log(s), ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(s.code) && this.moveCell(s);
880
+ w.log(s), ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(s.code) && this.moveCell(s);
877
881
  });
878
882
  }, "#initEvents"), h(Qe, "CellNavigation");
879
883
  let Te = Qe;
@@ -887,10 +891,10 @@ const Et = class Et extends HTMLElement {
887
891
  d(this, Nt);
888
892
  d(this, Dt);
889
893
  E(this, "invalidate", /* @__PURE__ */ h(() => {
890
- S.log("sheet.invalidate()"), t(this, ht).refresh();
894
+ w.log("sheet.invalidate()"), t(this, ht).refresh();
891
895
  }, "invalidate"));
892
896
  E(this, "generate", /* @__PURE__ */ h((e) => {
893
- if (S.log("sheet.generate()"), !e) return;
897
+ if (w.log("sheet.generate()"), !e) return;
894
898
  p(this, ct, Ee.compile(e)), t(this, oe).call(this), t(this, ie).call(this);
895
899
  const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
896
900
  n && o && (o.style.top = `${n.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ht).initialize(), setTimeout(() => {
@@ -1161,7 +1165,7 @@ const Et = class Et extends HTMLElement {
1161
1165
  return t(this, Dt);
1162
1166
  }
1163
1167
  disconnectedCallback() {
1164
- this.innerHTML = "", S.log("NineTableSheet destroyed.");
1168
+ this.innerHTML = "", w.log("NineTableSheet destroyed.");
1165
1169
  }
1166
1170
  };
1167
1171
  re = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), Nt = new WeakMap(), Dt = new WeakMap(), oe = new WeakMap(), ie = new WeakMap(), yt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), h(Et, "NineTableSheet"), E(Et, "SCROLLBAR_SIZE", 16);
@@ -1185,8 +1189,8 @@ const ts = class ts extends HTMLElement {
1185
1189
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1186
1190
  const b = f.filter((g) => g.classList.contains("active"));
1187
1191
  b.length < 2 || b.forEach((g) => {
1188
- const y = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${y}"]`), w = f[y + 1];
1189
- v && w && w.classList.contains("active") && v.style.setProperty("display", "flex");
1192
+ const y = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${y}"]`), S = f[y + 1];
1193
+ v && S && S.classList.contains("active") && v.style.setProperty("display", "flex");
1190
1194
  });
1191
1195
  }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), c = i.querySelectorAll("nine-table-sheet");
1192
1196
  if (!a[e]) return;
@@ -1584,11 +1588,11 @@ const rs = class rs {
1584
1588
  }), p(this, M, Array.from(s, ([e, n]) => ({ name: e, type: n }))), p(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
1585
1589
  }, "#adjust"));
1586
1590
  d(this, pe, /* @__PURE__ */ h(() => {
1587
- p(this, M, []), S.log(t(this, wt).querySelectorAll("table"));
1591
+ p(this, M, []), w.log(t(this, wt).querySelectorAll("table"));
1588
1592
  const s = Array.from(t(this, wt).querySelectorAll("table"));
1589
1593
  if (!(!s || s.length === 0)) {
1590
1594
  for (const e of s)
1591
- S.log(e), $("[data-bind]", e).each((n, r) => {
1595
+ w.log(e), $("[data-bind]", e).each((n, r) => {
1592
1596
  const o = r.dataset.bind, i = r.getAttribute("data-type") || "string";
1593
1597
  o && t(this, M).push({ name: o, type: i });
1594
1598
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
@@ -1647,7 +1651,7 @@ const os = class os extends HTMLElement {
1647
1651
  d(this, ut);
1648
1652
  d(this, ye);
1649
1653
  d(this, me, /* @__PURE__ */ h(() => {
1650
- this.fields = new Me(this), p(this, ye, new ke(this)), S.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1654
+ this.fields = new Me(this), p(this, ye, new ke(this)), w.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1651
1655
  }, "#init"));
1652
1656
  this.attachShadow({ mode: "open" }), p(this, ut, new He(this));
1653
1657
  }
@@ -1655,7 +1659,7 @@ const os = class os extends HTMLElement {
1655
1659
  t(this, me).call(this);
1656
1660
  }
1657
1661
  disconnectedCallback() {
1658
- S.log("NineTable disconnected.");
1662
+ w.log("NineTable disconnected.");
1659
1663
  }
1660
1664
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1661
1665
  get data() {
@@ -1741,8 +1745,8 @@ const is = class is extends _e {
1741
1745
  else
1742
1746
  o = !0;
1743
1747
  o ? ninegrid.j.querySelectorAll(t(this, x)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, x)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, x)).hasClass("hidden") || (o ? ninegrid.j.querySelectorAll(t(this, x)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, x)).addClass("hidden"));
1744
- var y = parseInt(t(this, x).dataset.matrixRow), v = y - 1, w = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, x).dataset.col}"][data-matrix-row="${v}"]`);
1745
- $(w).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").addClass("last-suppress") : !$(w).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").removeClass("last-suppress");
1748
+ var y = parseInt(t(this, x).dataset.matrixRow), v = y - 1, S = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, x).dataset.col}"][data-matrix-row="${v}"]`);
1749
+ $(S).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(S).removeClass("last-none-suppress").addClass("last-suppress") : !$(S).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(S).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(S).removeClass("last-none-suppress").removeClass("last-suppress");
1746
1750
  }
1747
1751
  }
1748
1752
  }, "#resetSuppress"));