@ninebone/table 0.0.786 โ†’ 0.0.788

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.
@@ -23,28 +23,28 @@ const ts = class ts extends Rs.constructor {
23
23
  d(ts, "Trace");
24
24
  let qe = ts;
25
25
  const S = new qe();
26
- var Y, G, E, tt, et, st, Jt, nt, Qt;
26
+ var j, G, E, tt, et, st, Jt, nt, Qt;
27
27
  const es = class es extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- f(this, Y);
30
+ f(this, j);
31
31
  f(this, G, !1);
32
32
  f(this, E);
33
33
  f(this, tt);
34
34
  f(this, et);
35
35
  f(this, st);
36
36
  f(this, Jt, /* @__PURE__ */ d(() => {
37
- if (!t(this, Y)) return;
38
- const e = t(this, Y).querySelector(".ng-container-body .ng-part-body");
37
+ if (!t(this, j)) return;
38
+ const e = t(this, j).querySelector(".ng-container-body .ng-part-body");
39
39
  e && (y(this, st, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, st).observe(e));
42
42
  }, "#observeResize"));
43
43
  q(this, "refresh", /* @__PURE__ */ d(() => {
44
- if (!t(this, Y) || !t(this, E) || t(this, G)) return;
44
+ if (!t(this, j) || !t(this, E) || t(this, G)) return;
45
45
  const e = t(this, E).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const r = t(this, E).track, i = t(this, E).thumb, o = t(this, Y).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
47
+ const r = t(this, E).track, i = t(this, E).thumb, o = t(this, j).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
48
48
  if (a !== 0 && c > a)
49
49
  o && (o.style.display = "flex");
50
50
  else {
@@ -112,7 +112,7 @@ const es = class es extends HTMLElement {
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (y(this, Y, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, Y)) return;
115
+ if (y(this, j, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, j)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -177,7 +177,7 @@ const es = class es extends HTMLElement {
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
179
  const e = /* @__PURE__ */ d(() => {
180
- const s = t(this, Y).querySelector(".ng-container-body .ng-part-body");
180
+ const s = t(this, j).querySelector(".ng-container-body .ng-part-body");
181
181
  if (!s) {
182
182
  setTimeout(e, 10);
183
183
  return;
@@ -198,7 +198,7 @@ const es = class es extends HTMLElement {
198
198
  t(this, st) && t(this, st).disconnect();
199
199
  }
200
200
  };
201
- Y = new WeakMap(), G = new WeakMap(), E = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Jt = new WeakMap(), nt = new WeakMap(), Qt = new WeakMap(), d(es, "NineTableHScrollBar");
201
+ j = new WeakMap(), G = new WeakMap(), E = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Jt = new WeakMap(), nt = new WeakMap(), Qt = new WeakMap(), d(es, "NineTableHScrollBar");
202
202
  let Ce = es;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ce);
204
204
  var rt, ot, yt, k, kt, It, te;
@@ -241,12 +241,12 @@ 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__ */ d((a) => {
243
243
  if (!t(this, yt)) return;
244
- const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, h = c.height - l, b = a.clientY - t(this, kt), g = e.clientHeight, p = s(), m = Math.max(p - g, 1);
245
- if (h > 0 && m > 0) {
246
- const w = b / h * m;
247
- let x = t(this, It) + w;
244
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, h = c.height - l, b = a.clientY - t(this, kt), g = e.clientHeight, p = s(), x = Math.max(p - g, 1);
245
+ if (h > 0 && x > 0) {
246
+ const w = b / h * x;
247
+ let m = t(this, It) + w;
248
248
  const T = Math.max(0, p - g);
249
- x < 0 && (x = 0), x > T && (x = T), e.scrollTop = x;
249
+ m < 0 && (m = 0), m > T && (m = T), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
252
252
  }, "onMouseMove"), o = /* @__PURE__ */ d(() => {
@@ -353,18 +353,18 @@ const ss = class ss extends HTMLElement {
353
353
  rt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), k = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), te = new WeakMap(), d(ss, "NineTableVScrollBar");
354
354
  let Te = ss;
355
355
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Te);
356
- var U, A, it, j, O, Z, at, Lt, je, Ve, ee, se, Mt, Ht, $t, ne, re, Nt, Ue, mt, _t, oe;
356
+ var U, A, it, Y, O, Z, at, Lt, Ye, Ve, ee, se, Mt, Ht, $t, ne, re, Nt, Ue, mt, _t, oe;
357
357
  const ns = class ns {
358
358
  constructor(n) {
359
359
  f(this, U);
360
360
  f(this, A);
361
361
  f(this, it);
362
- f(this, j, /* @__PURE__ */ new Map());
362
+ f(this, Y, /* @__PURE__ */ new Map());
363
363
  f(this, O, null);
364
364
  f(this, Z, null);
365
365
  f(this, at, 0);
366
366
  f(this, Lt, 40);
367
- f(this, je, !1);
367
+ f(this, Ye, !1);
368
368
  f(this, Ve, !1);
369
369
  //#ticking = false; // ๐ŸŽฏ ๊ณ ์† ์Šคํฌ๋กค ์Šค๋กœํ‹€๋ง์šฉ ํ”Œ๋ž˜๊ทธ
370
370
  f(this, ee, 3);
@@ -378,7 +378,7 @@ 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, j).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
381
+ }), y(this, O, null), t(this, Y).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
382
382
  const a = t(this, A).querySelector(o);
383
383
  if (!a) return;
384
384
  const c = a.querySelector(".ng-part-body table");
@@ -386,29 +386,31 @@ const ns = class ns {
386
386
  const l = c.querySelector("tbody.bindable-tbody");
387
387
  if (!l) return;
388
388
  const h = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
- t(this, j).set(o, h);
389
+ t(this, Y).set(o, h);
390
390
  });
391
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
392
  if (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, a = n.scrollTop, c = n.scrollLeft;
395
- const l = /* @__PURE__ */ d((u) => {
396
- var m;
394
+ let o = !1;
395
+ n.scrollTop;
396
+ let a = n.scrollLeft;
397
+ const c = /* @__PURE__ */ d((l) => {
398
+ var g;
397
399
  if (o) return;
398
400
  o = !0;
399
- const h = u.scrollTop, b = u.scrollLeft, g = Math.abs(b - c), p = Math.abs(h - a);
400
- a = h, c = b, g > p && (r && r.scrollLeft !== b && (r.scrollLeft = b), i && i.scrollLeft !== b && (i.scrollLeft = b)), n && n.scrollTop !== h && (n.scrollTop = h), e && e.scrollTop !== h && (e.scrollTop = h), s && s.scrollTop !== h && (s.scrollTop = h), t(this, mt).call(this, h), (m = t(this, A).querySelector("nine-table-vscrollbar")) == null || m.refresh(), o = !1;
401
+ const u = l.scrollTop, h = l.scrollLeft, b = Math.abs(h - a);
402
+ a = h, (b > 0 || r && r.scrollLeft !== h) && (r && (r.scrollLeft = h), i && (i.scrollLeft = h)), n && n.scrollTop !== u && (n.scrollTop = u), e && e.scrollTop !== u && (e.scrollTop = u), s && s.scrollTop !== u && (s.scrollTop = u), t(this, mt).call(this, u), (g = t(this, A).querySelector("nine-table-vscrollbar")) == null || g.refresh(), o = !1;
401
403
  }, "handleContainerScroll");
402
- [n, e, s].forEach((u) => {
403
- u == null || u.addEventListener("scroll", (h) => {
404
- S.log(h), S.log("rowManager.scroll event"), l(u);
404
+ [n, e, s].forEach((l) => {
405
+ l == null || l.addEventListener("scroll", (u) => {
406
+ S.log(u), S.log("rowManager.scroll event"), c(l);
405
407
  });
406
408
  });
407
409
  }
408
410
  }, "initialize"));
409
411
  f(this, se, /* @__PURE__ */ d((n, e) => {
410
412
  S.log("rowManager.#renderRows");
411
- const s = t(this, j).get(e);
413
+ const s = t(this, Y).get(e);
412
414
  if (!s || s.length === 0) return;
413
415
  const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
414
416
  if (!r) return;
@@ -425,7 +427,7 @@ const ns = class ns {
425
427
  return t(this, O);
426
428
  const n = t(this, A).querySelector(".ng-container-body .ng-part-body");
427
429
  S.log("rowManager.#measureAndCacheHeight");
428
- const e = t(this, j).get(".ng-container-body");
430
+ const e = t(this, Y).get(".ng-container-body");
429
431
  if (!e || e.length === 0) throw new Error("invalid dom");
430
432
  const s = n.querySelector("tbody.bindable-tbody");
431
433
  if (S.log(s), !s) throw new Error("invalid dom");
@@ -467,26 +469,26 @@ const ns = class ns {
467
469
  var a, c, l, u, h, b;
468
470
  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");
469
471
  if (e) {
470
- const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), m = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, p.length, m.length);
471
- for (let x = 0; x < w; x++) {
472
+ 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);
473
+ for (let m = 0; m < w; m++) {
472
474
  const T = [
473
- ((a = g[x]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
- ((c = p[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
- ((l = m[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0
475
+ ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
476
+ ((c = p[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
477
+ ((l = x[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
478
  ], R = Math.max(...T);
477
- R > 0 && (g[x] && (g[x].style.height = `${R}px`), p[x] && (p[x].style.height = `${R}px`), m[x] && (m[x].style.height = `${R}px`));
479
+ 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`));
478
480
  }
479
481
  }
480
482
  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");
481
483
  if (i) {
482
- const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(i.querySelectorAll("tfoot tr")), m = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, p.length, m.length);
483
- for (let x = 0; x < w; x++) {
484
+ 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);
485
+ for (let m = 0; m < w; m++) {
484
486
  const T = [
485
- ((u = g[x]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
486
- ((h = p[x]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
487
- ((b = m[x]) == null ? void 0 : b.getBoundingClientRect().height) || 0
487
+ ((u = g[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
488
+ ((h = p[m]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
489
+ ((b = x[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
490
  ], R = Math.max(...T);
489
- R > 0 && (g[x] && (g[x].style.height = `${R}px`), p[x] && (p[x].style.height = `${R}px`), m[x] && (m[x].style.height = `${R}px`));
491
+ 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`));
490
492
  }
491
493
  }
492
494
  }, "#syncRowHeights"));
@@ -519,7 +521,7 @@ const ns = class ns {
519
521
  if (!s) return;
520
522
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
523
  if (!r) return;
522
- const i = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, j).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, U).data.get() || []).length;
524
+ 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;
523
525
  i.forEach((u, h) => {
524
526
  const b = n + Math.floor(h / o);
525
527
  if (b >= c) {
@@ -537,7 +539,7 @@ const ns = class ns {
537
539
  if (!e || e <= 0) return;
538
540
  const s = t(this, U).data.length;
539
541
  if (s === 0) return;
540
- const r = ((h = t(this, j).get(".ng-container-body")) == null ? void 0 : h.length) || 1, i = t(this, A).querySelector(".ng-container-body .ng-part-body");
542
+ const r = ((h = t(this, Y).get(".ng-container-body")) == null ? void 0 : h.length) || 1, i = t(this, A).querySelector(".ng-container-body .ng-part-body");
541
543
  S.log("bodyContainer.clientHeight", i.clientHeight);
542
544
  const o = Math.max(0, s - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(n / e)));
543
545
  let c = Math.floor(a * e);
@@ -548,16 +550,16 @@ const ns = class ns {
548
550
  }), u !== a && (S.log(`๐Ÿ”„ [Row Bind Trigger] currentStartIndex(${u}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
549
551
  const p = t(this, A).querySelector(g);
550
552
  if (!p) return;
551
- const m = p.querySelector(".ng-part-body tbody.bindable-tbody");
552
- if (!m) return;
553
- Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((x, T) => {
553
+ const x = p.querySelector(".ng-part-body tbody.bindable-tbody");
554
+ if (!x) return;
555
+ Array.from(x.querySelectorAll("tr:not(.nodata)")).forEach((m, T) => {
554
556
  const R = a + Math.floor(T / r);
555
557
  if (R >= s) {
556
- x.style.display = "none";
558
+ m.style.display = "none";
557
559
  return;
558
560
  }
559
561
  const M = t(this, U).data.get(R);
560
- x.style.display = "", t(this, _t).call(this, x, M, R);
562
+ m.style.display = "", t(this, _t).call(this, m, M, R);
561
563
  });
562
564
  }));
563
565
  }, "#handleScroll"));
@@ -607,10 +609,10 @@ const ns = class ns {
607
609
  }
608
610
  templateLength(n = ".ng-container-body") {
609
611
  var e;
610
- return ((e = t(this, j).get(n)) == null ? void 0 : e.length) || 1;
612
+ return ((e = t(this, Y).get(n)) == null ? void 0 : e.length) || 1;
611
613
  }
612
614
  };
613
- U = new WeakMap(), A = new WeakMap(), it = new WeakMap(), j = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), at = new WeakMap(), Lt = new WeakMap(), je = new WeakMap(), Ve = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), $t = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), Nt = new WeakMap(), Ue = new WeakMap(), mt = new WeakMap(), _t = new WeakMap(), oe = new WeakMap(), d(ns, "RowManager");
615
+ U = new WeakMap(), A = new WeakMap(), it = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), at = new WeakMap(), Lt = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), $t = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), Nt = new WeakMap(), Ue = new WeakMap(), mt = new WeakMap(), _t = new WeakMap(), oe = new WeakMap(), d(ns, "RowManager");
614
616
  let ke = ns;
615
617
  const ie = class ie {
616
618
  /**
@@ -629,9 +631,9 @@ const ie = class ie {
629
631
  const u = l.getAttribute("cell-type") || "renderer";
630
632
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
633
  let h = `cell-${u}`;
632
- const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), p = l.getAttribute("maxbyte"), m = l.getAttribute("type");
634
+ const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), p = l.getAttribute("maxbyte"), x = l.getAttribute("type");
633
635
  let w = [];
634
- b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), p && w.push(`maxbyte="${p}"`), m && w.push(`type="${m}"`), l.innerHTML = `<${h} ${w.join(" ")}></${h}>`;
636
+ b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), p && w.push(`maxbyte="${p}"`), x && w.push(`type="${x}"`), l.innerHTML = `<${h} ${w.join(" ")}></${h}>`;
635
637
  }), a.querySelectorAll("tbody td, tfoot td").forEach((l) => {
636
638
  l.setAttribute("tabindex", "0");
637
639
  });
@@ -658,25 +660,25 @@ const ie = class ie {
658
660
  });
659
661
  const g = Array.from(Array(h), () => Array(b).fill(null));
660
662
  l.forEach((p) => {
661
- const m = p.sectionRowIndex;
663
+ const x = p.sectionRowIndex;
662
664
  let w = 0;
663
- Array.from(p.querySelectorAll("th,td")).forEach((x) => {
664
- for (let M = 0; M < g[m].length; M++)
665
- if (g[m][M] === null) {
665
+ Array.from(p.querySelectorAll("th,td")).forEach((m) => {
666
+ for (let M = 0; M < g[x].length; M++)
667
+ if (g[x][M] === null) {
666
668
  w = M;
667
669
  break;
668
670
  }
669
- const T = x.rowSpan || 1, R = x.colSpan || 1;
671
+ const T = m.rowSpan || 1, R = m.colSpan || 1;
670
672
  for (let M = 0; M < T; M++)
671
673
  for (let B = 0; B < R; B++)
672
- m + M < h && w + B < b && (g[m + M][w + B] = M === 0 && B === 0 ? "1" : "0");
674
+ x + M < h && w + B < b && (g[x + M][w + B] = M === 0 && B === 0 ? "1" : "0");
673
675
  });
674
676
  }), l.forEach((p) => {
675
- const m = p.sectionRowIndex;
677
+ const x = p.sectionRowIndex;
676
678
  Array.from(p.querySelectorAll("th,td")).forEach((w) => {
677
- for (let x = 0; x < g[m].length; x++)
678
- if (g[m][x] === "1") {
679
- w.dataset.col = x, g[m][x] = "0";
679
+ for (let m = 0; m < g[x].length; m++)
680
+ if (g[x][m] === "1") {
681
+ w.dataset.col = m, g[x][m] = "0";
680
682
  break;
681
683
  }
682
684
  });
@@ -720,8 +722,8 @@ const rs = class rs {
720
722
  l < 0 || c.querySelectorAll("td, th").forEach((u) => {
721
723
  const h = parseInt(u.dataset.col, 10);
722
724
  if (isNaN(h)) return;
723
- const b = parseInt(u.rowSpan || 1, 10), g = parseInt(u.colSpan || 1, 10), p = l + b - 1, m = h + g - 1;
724
- p >= n && l <= s && m >= e && h <= 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"), h <= e && u.classList.add("selected-left"), m >= r && u.classList.add("selected-right"));
725
+ const b = parseInt(u.rowSpan || 1, 10), g = parseInt(u.colSpan || 1, 10), p = l + b - 1, x = h + g - 1;
726
+ p >= n && l <= s && x >= e && h <= 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"), h <= e && u.classList.add("selected-left"), x >= r && u.classList.add("selected-right"));
725
727
  });
726
728
  });
727
729
  }), S.log(`โœจ [CellSelection.render] Total rendered cells marked: ${o}`);
@@ -746,10 +748,10 @@ const rs = class rs {
746
748
  b.querySelectorAll("tbody tr").forEach((g) => {
747
749
  if (g.classList.contains("nodata")) return;
748
750
  const { matrixRow: p } = V(this, K, qt).call(this, g);
749
- p < 0 || g.querySelectorAll("td, th").forEach((m) => {
750
- const w = parseInt(m.dataset.col, 10);
751
+ p < 0 || g.querySelectorAll("td, th").forEach((x) => {
752
+ const w = parseInt(x.dataset.col, 10);
751
753
  if (isNaN(w)) return;
752
- const x = parseInt(m.rowSpan || 1, 10), T = parseInt(m.colSpan || 1, 10), R = p + x - 1, M = w + T - 1;
754
+ const m = parseInt(x.rowSpan || 1, 10), T = parseInt(x.colSpan || 1, 10), R = p + m - 1, M = w + T - 1;
753
755
  if (R >= i && p <= o && M >= a && w <= c) {
754
756
  const z = Math.min(i, p), Gt = Math.max(o, R), bs = Math.min(a, w), ps = Math.max(c, M);
755
757
  (z !== i || Gt !== o || bs !== a || ps !== c) && (i = z, o = Gt, a = bs, c = ps, u = !0);
@@ -788,8 +790,8 @@ N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ d(
788
790
  const b = document.elementFromPoint(h.clientX, h.clientY);
789
791
  let g = b == null ? void 0 : b.closest("td, th");
790
792
  if (!g || !t(this, N).contains(g)) {
791
- const x = t(this, N).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
792
- for (const T of x) {
793
+ const m = t(this, N).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
794
+ for (const T of m) {
793
795
  const R = T.getBoundingClientRect();
794
796
  if (h.clientX >= R.left && h.clientX <= R.right && h.clientY >= R.top && h.clientY <= R.bottom) {
795
797
  g = T;
@@ -798,8 +800,8 @@ N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ d(
798
800
  }
799
801
  }
800
802
  if (!g || g.dataset.row === void 0 || g.dataset.col === void 0 || g.closest("tr").classList.contains("nodata")) return;
801
- const p = g.closest("tr"), { matrixRow: m } = V(this, K, qt).call(this, p), w = parseInt(g.dataset.col, 10);
802
- m < 0 || a === m && c === w || (a = m, c = w, this.setRange(i, o, m, w));
803
+ const p = g.closest("tr"), { matrixRow: x } = V(this, K, qt).call(this, p), w = parseInt(g.dataset.col, 10);
804
+ x < 0 || a === x && c === w || (a = x, c = w, this.setRange(i, o, x, w));
803
805
  }, "onMouseMove"), u = /* @__PURE__ */ d(() => {
804
806
  S.log("๐Ÿ–ฑ๏ธ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", u);
805
807
  }, "onMouseUp");
@@ -865,8 +867,8 @@ const os = class os {
865
867
  const b = Array.from(o.querySelectorAll("td"));
866
868
  let g = !1;
867
869
  for (const p of b) {
868
- const m = parseInt(p.rowSpan || 1, 10);
869
- if (m > 1 && n >= h && n < h + m) {
870
+ const x = parseInt(p.rowSpan || 1, 10);
871
+ if (x > 1 && n >= h && n < h + x) {
870
872
  s.push(o), g = !0;
871
873
  break;
872
874
  }
@@ -883,10 +885,10 @@ const os = class os {
883
885
  for (const a of i) {
884
886
  const c = Array.from(a.querySelectorAll("tbody tr:not(.nodata)"));
885
887
  for (const l of c) {
886
- const u = parseInt(l.dataset.row, 10), h = c.filter((w) => parseInt(w.dataset.row, 10) === u), b = h.length > 0 ? h.length : 1, g = h.indexOf(l), p = u * b + (g >= 0 ? g : 0), m = Array.from(l.querySelectorAll("td"));
887
- for (const w of m) {
888
- const x = parseInt(w.dataset.col, 10), T = parseInt(w.colSpan || 1, 10), R = parseInt(w.rowSpan || 1, 10);
889
- if (!isNaN(x) && s >= x && s < x + T && o >= p && o < p + R && window.getComputedStyle(w).display !== "none")
888
+ const u = parseInt(l.dataset.row, 10), h = c.filter((w) => parseInt(w.dataset.row, 10) === u), b = h.length > 0 ? h.length : 1, g = h.indexOf(l), p = u * b + (g >= 0 ? g : 0), x = Array.from(l.querySelectorAll("td"));
889
+ for (const w of x) {
890
+ const m = parseInt(w.dataset.col, 10), T = parseInt(w.colSpan || 1, 10), R = parseInt(w.rowSpan || 1, 10);
891
+ if (!isNaN(m) && s >= m && s < m + T && o >= p && o < p + R && window.getComputedStyle(w).display !== "none")
890
892
  return w;
891
893
  }
892
894
  }
@@ -912,7 +914,7 @@ const os = class os {
912
914
  }
913
915
  }
914
916
  moveCell(n) {
915
- var x, T, R, M;
917
+ var m, T, R, M;
916
918
  if (!t(this, lt)) return;
917
919
  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");
918
920
  if (!o) return;
@@ -945,14 +947,14 @@ const os = class os {
945
947
  n.preventDefault(), b = Math.max(0, h - (e.rowSpan || 1));
946
948
  break;
947
949
  }
948
- const p = Math.floor(b / l), m = b % l;
949
- let w = t(this, Wt).call(this, p, m, g, b);
950
+ const p = Math.floor(b / l), x = b % l;
951
+ let w = t(this, Wt).call(this, p, x, g, b);
950
952
  if (w)
951
953
  this.currentCell = w, V(this, pt, He).call(this, w);
952
954
  else if (p !== r && p >= 0) {
953
- const B = ((T = (x = t(this, F)).getRowHeight) == null ? void 0 : T.call(x)) || 40;
955
+ const B = ((T = (m = t(this, F)).getRowHeight) == null ? void 0 : T.call(m)) || 40;
954
956
  (M = (R = t(this, F)).scrollToY) == null || M.call(R, p * B), setTimeout(() => {
955
- const z = t(this, Wt).call(this, p, m, g, b);
957
+ const z = t(this, Wt).call(this, p, x, g, b);
956
958
  z && (this.currentCell = z, V(this, pt, He).call(this, z));
957
959
  }, 0);
958
960
  }
@@ -1282,8 +1284,8 @@ const is = class is extends HTMLElement {
1282
1284
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1283
1285
  const b = u.filter((g) => g.classList.contains("active"));
1284
1286
  b.length < 2 || b.forEach((g) => {
1285
- const p = parseInt(g.getAttribute("data-index"), 10), m = this.querySelector(`nine-splitter[data-split-index="${p}"]`), w = u[p + 1];
1286
- m && w && w.classList.contains("active") && m.style.setProperty("display", "flex");
1287
+ const p = parseInt(g.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${p}"]`), w = u[p + 1];
1288
+ x && w && w.classList.contains("active") && x.style.setProperty("display", "flex");
1287
1289
  });
1288
1290
  }, "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");
1289
1291
  if (!a[e]) return;
@@ -1315,17 +1317,17 @@ const is = class is extends HTMLElement {
1315
1317
  ge = new WeakMap(), Ft = new WeakMap(), d(is, "NineTableSheets");
1316
1318
  let $e = is;
1317
1319
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", $e);
1318
- var _, be, Yt, pe;
1320
+ var _, be, jt, pe;
1319
1321
  const as = class as {
1320
1322
  constructor(n) {
1321
1323
  f(this, _);
1322
1324
  f(this, be, /* @__PURE__ */ d(() => {
1323
1325
  t(this, pe).call(this), new ResizeObserver((n) => {
1324
1326
  for (let e of n)
1325
- t(this, _).getAttribute("auto-height") === "true" && t(this, Yt).call(this);
1327
+ t(this, _).getAttribute("auto-height") === "true" && t(this, jt).call(this);
1326
1328
  }).observe(t(this, _));
1327
1329
  }, "#init"));
1328
- f(this, Yt, /* @__PURE__ */ d(() => {
1330
+ f(this, jt, /* @__PURE__ */ d(() => {
1329
1331
  var c, l;
1330
1332
  const n = Array.from(t(this, _).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1331
1333
  if (n.length === 0) return;
@@ -1461,22 +1463,22 @@ const as = class as {
1461
1463
  const a = t(this, _).shadowRoot.querySelectorAll("nine-table-sheet");
1462
1464
  a == null || a.forEach((c, l) => {
1463
1465
  e[l] && setTimeout(() => {
1464
- c.generate(e[l]), s && t(this, Yt).call(this);
1466
+ c.generate(e[l]), s && t(this, jt).call(this);
1465
1467
  });
1466
1468
  });
1467
1469
  }, "#render"));
1468
1470
  y(this, _, n), t(this, be).call(this);
1469
1471
  }
1470
1472
  };
1471
- _ = new WeakMap(), be = new WeakMap(), Yt = new WeakMap(), pe = new WeakMap(), d(as, "LayoutManager");
1473
+ _ = new WeakMap(), be = new WeakMap(), jt = new WeakMap(), pe = new WeakMap(), d(as, "LayoutManager");
1472
1474
  let Ne = as;
1473
- var jt, wt;
1475
+ var Yt, wt;
1474
1476
  const ls = class ls {
1475
1477
  constructor(n) {
1476
- f(this, jt);
1478
+ f(this, Yt);
1477
1479
  f(this, wt, -1);
1478
- q(this, "count", /* @__PURE__ */ d(() => t(this, jt).rawRecords.length, "count"));
1479
- y(this, jt, n);
1480
+ q(this, "count", /* @__PURE__ */ d(() => t(this, Yt).rawRecords.length, "count"));
1481
+ y(this, Yt, n);
1480
1482
  }
1481
1483
  get at() {
1482
1484
  return t(this, wt);
@@ -1486,7 +1488,7 @@ const ls = class ls {
1486
1488
  });
1487
1489
  }
1488
1490
  };
1489
- jt = new WeakMap(), wt = new WeakMap(), d(ls, "ngRow");
1491
+ Yt = new WeakMap(), wt = new WeakMap(), d(ls, "ngRow");
1490
1492
  let _e = ls;
1491
1493
  var D, I, W, vt, ye, J, me, ft, Vt, xe, we, St;
1492
1494
  const P = class P {
@@ -1819,7 +1821,7 @@ const fs = class fs extends ze {
1819
1821
  var e = ninegrid.j.querySelectorAll(t(this, v)).attr("suppress");
1820
1822
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1821
1823
  var s = t(this, v).closest("tr"), r = [];
1822
- $("th,td", s).each((x, T) => {
1824
+ $("th,td", s).each((m, T) => {
1823
1825
  var R = ninegrid.j.querySelectorAll(T).attr("suppress");
1824
1826
  R && T.dataset.row && (R = parseInt(R), !isNaN(R) && R <= e && r.push(R));
1825
1827
  }), r.sort();
@@ -1838,7 +1840,7 @@ const fs = class fs extends ze {
1838
1840
  else
1839
1841
  i = !0;
1840
1842
  i ? ninegrid.j.querySelectorAll(t(this, v)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, v)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, v)).hasClass("hidden") || (i ? ninegrid.j.querySelectorAll(t(this, v)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, v)).addClass("hidden"));
1841
- var p = parseInt(t(this, v).dataset.matrixRow), m = p - 1, w = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, v).dataset.col}"][data-matrix-row="${m}"]`);
1843
+ var p = parseInt(t(this, v).dataset.matrixRow), x = p - 1, w = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, v).dataset.col}"][data-matrix-row="${x}"]`);
1842
1844
  $(w).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, v)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").addClass("last-suppress") : !$(w).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, v)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").removeClass("last-suppress");
1843
1845
  }
1844
1846
  }
@@ -1967,7 +1969,7 @@ const gs = class gs extends Fe {
1967
1969
  }
1968
1970
  };
1969
1971
  Kt = new WeakMap(), bt = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), Ae = new WeakMap(), Q = new WeakMap(), Qe = new WeakMap(), d(gs, "CellInputText");
1970
- let Ye = gs;
1972
+ let je = gs;
1971
1973
  customElements.get("cell-input-text");
1972
- customElements.get("cell-input") || customElements.define("cell-input", Ye);
1974
+ customElements.get("cell-input") || customElements.define("cell-input", je);
1973
1975
  //# sourceMappingURL=nine-table.js.map