@ninebone/table 0.0.325 β†’ 0.0.326

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,23 +22,23 @@ const Ut = class Ut extends le.constructor {
22
22
  };
23
23
  c(Ut, "Trace");
24
24
  let $t = Ut;
25
- const O = new $t();
26
- var C, M, y, N, B, P, ft, Y, ut;
25
+ const tt = new $t();
26
+ var C, M, y, D, N, B, ft, P, ut;
27
27
  const Ft = class Ft extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  h(this, C);
31
31
  h(this, M, !1);
32
32
  h(this, y);
33
+ h(this, D);
33
34
  h(this, N);
34
35
  h(this, B);
35
- h(this, P);
36
36
  h(this, ft, /* @__PURE__ */ c(() => {
37
37
  if (!t(this, C)) return;
38
38
  const e = t(this, C).querySelector(".ng-container-body");
39
- e && (g(this, P, new ResizeObserver(() => {
39
+ e && (g(this, B, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, P).observe(e));
41
+ })), t(this, B).observe(e));
42
42
  }, "#observeResize"));
43
43
  w(this, "refresh", /* @__PURE__ */ c(() => {
44
44
  if (!t(this, C) || !t(this, y) || t(this, M)) return;
@@ -56,12 +56,12 @@ const Ft = class Ft extends HTMLElement {
56
56
  const f = Math.max(Math.min(d * (l / a), d), 20);
57
57
  r.style.width = `${f}px`;
58
58
  const u = e.scrollLeft, b = a - l;
59
- let m = 0;
60
- b > 0 && (m = parseInt(u / b * (d - f), 10)), m < 0 && (m = 0);
59
+ let p = 0;
60
+ b > 0 && (p = parseInt(u / b * (d - f), 10)), p < 0 && (p = 0);
61
61
  const E = d - f;
62
- m > E && (m = E), r.style.left = `${m}px`, O.log(m), t(this, y).left.disabled = m === 0, t(this, y).right.disabled = m >= E - 1;
62
+ p > E && (p = E), r.style.left = `${p}px`, tt.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= E - 1;
63
63
  }, "refresh"));
64
- h(this, Y, /* @__PURE__ */ c((e) => {
64
+ h(this, P, /* @__PURE__ */ c((e) => {
65
65
  if (!t(this, y)) return !1;
66
66
  const s = t(this, y).container, o = s.querySelector("table");
67
67
  if (!o) return !1;
@@ -75,16 +75,16 @@ const Ft = class Ft extends HTMLElement {
75
75
  }, "#thumbMoveTo"));
76
76
  h(this, ut, /* @__PURE__ */ c(() => {
77
77
  const e = /* @__PURE__ */ c((o) => {
78
- clearInterval(t(this, N)), clearInterval(t(this, B));
78
+ clearInterval(t(this, D)), clearInterval(t(this, N));
79
79
  const r = parseInt(t(this, y).thumb.style.left || 0, 10);
80
- t(this, Y).call(this, r + o), g(this, N, setInterval(() => {
81
- clearInterval(t(this, N)), g(this, B, setInterval(() => {
80
+ t(this, P).call(this, r + o), g(this, D, setInterval(() => {
81
+ clearInterval(t(this, D)), g(this, N, setInterval(() => {
82
82
  const n = parseInt(t(this, y).thumb.style.left || 0, 10);
83
- t(this, Y).call(this, n + o) || clearInterval(t(this, B));
83
+ t(this, P).call(this, n + o) || clearInterval(t(this, N));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ c(() => {
87
- clearInterval(t(this, N)), clearInterval(t(this, B));
87
+ clearInterval(t(this, D)), clearInterval(t(this, N));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
90
  t(this, y).left.addEventListener(o, s), t(this, y).right.addEventListener(o, s), t(this, y).track.addEventListener(o, s);
@@ -96,14 +96,14 @@ const Ft = class Ft extends HTMLElement {
96
96
  if (o.button !== 0) return;
97
97
  o.preventDefault();
98
98
  const r = t(this, y).track.getBoundingClientRect(), n = t(this, y).thumb.clientWidth;
99
- t(this, Y).call(this, o.clientX - r.left - n / 2);
99
+ t(this, P).call(this, o.clientX - r.left - n / 2);
100
100
  }), t(this, y).thumb.addEventListener("mousedown", (o) => {
101
101
  if (o.button !== 0) return;
102
102
  o.stopPropagation(), o.preventDefault(), g(this, M, !0), this.shiftX = o.clientX - t(this, y).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ c((l) => {
104
104
  if (!t(this, M)) return;
105
105
  const a = t(this, y).track.getBoundingClientRect();
106
- t(this, Y).call(this, l.clientX - a.left - this.shiftX);
106
+ t(this, P).call(this, l.clientX - a.left - this.shiftX);
107
107
  }, "onMouseMove"), n = /* @__PURE__ */ c(() => {
108
108
  g(this, M, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
109
109
  }, "onMouseUp");
@@ -195,17 +195,17 @@ const Ft = class Ft extends HTMLElement {
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, P) && t(this, P).disconnect();
198
+ t(this, B) && t(this, B).disconnect();
199
199
  }
200
200
  };
201
- C = new WeakMap(), M = new WeakMap(), y = new WeakMap(), N = new WeakMap(), B = new WeakMap(), P = new WeakMap(), ft = new WeakMap(), Y = new WeakMap(), ut = new WeakMap(), c(Ft, "NineTableHScrollBar");
201
+ C = new WeakMap(), M = new WeakMap(), y = new WeakMap(), D = new WeakMap(), N = new WeakMap(), B = new WeakMap(), ft = new WeakMap(), P = new WeakMap(), ut = new WeakMap(), c(Ft, "NineTableHScrollBar");
202
202
  let Wt = Ft;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Wt);
204
- var V, I, S, it, st, bt;
204
+ var Y, I, S, it, st, bt;
205
205
  const Kt = class Kt extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- h(this, V);
208
+ h(this, Y);
209
209
  h(this, I, !1);
210
210
  h(this, S);
211
211
  h(this, it, 0);
@@ -214,7 +214,7 @@ const Kt = class Kt extends HTMLElement {
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
216
  w(this, "refresh", /* @__PURE__ */ c(() => {
217
- if (!t(this, V) || !t(this, S) || t(this, I)) return;
217
+ if (!t(this, Y) || !t(this, S) || t(this, I)) return;
218
218
  const e = t(this, S).container, s = e.querySelector("table");
219
219
  if (!s) return;
220
220
  const o = t(this, S).track, r = t(this, S).thumb, n = e.clientHeight, l = s.scrollHeight;
@@ -230,8 +230,8 @@ const Kt = class Kt extends HTMLElement {
230
230
  const f = e.scrollTop, u = l - n;
231
231
  let b = 0;
232
232
  u > 0 && (b = f / u * (a - d));
233
- const m = a - d;
234
- b < 0 && (b = 0), b > m && (b = m), r.style.top = `${b}px`, t(this, S).top.disabled = f <= 0, t(this, S).bottom.disabled = f >= u - 1;
233
+ const p = a - d;
234
+ b < 0 && (b = 0), b > p && (b = p), r.style.top = `${b}px`, t(this, S).top.disabled = f <= 0, t(this, S).bottom.disabled = f >= u - 1;
235
235
  }, "refresh"));
236
236
  h(this, bt, /* @__PURE__ */ c(() => {
237
237
  const e = t(this, S).container;
@@ -242,12 +242,12 @@ const Kt = class Kt extends HTMLElement {
242
242
  s.stopPropagation(), s.preventDefault(), g(this, I, !0), g(this, it, s.clientY), g(this, st, e.scrollTop);
243
243
  const o = /* @__PURE__ */ c((n) => {
244
244
  if (!t(this, I)) return;
245
- const l = t(this, S).track.getBoundingClientRect(), a = t(this, S).thumb.clientHeight, f = l.height - a, u = n.clientY - t(this, it), b = e.clientHeight, m = e.querySelector("table");
246
- O.log(m), O.log(m.scrollHeight);
247
- const q = m.scrollHeight - b;
245
+ const l = t(this, S).track.getBoundingClientRect(), a = t(this, S).thumb.clientHeight, f = l.height - a, u = n.clientY - t(this, it), b = e.clientHeight, p = e.querySelector("table");
246
+ tt.log(p), tt.log(p.scrollHeight);
247
+ const q = p.scrollHeight - b;
248
248
  if (f > 0 && q > 0) {
249
- const D = u / f * q;
250
- e.scrollTop = t(this, st) + D;
249
+ const O = u / f * q;
250
+ e.scrollTop = t(this, st) + O;
251
251
  }
252
252
  this.refresh();
253
253
  }, "onMouseMove"), r = /* @__PURE__ */ c(() => {
@@ -270,7 +270,7 @@ const Kt = class Kt extends HTMLElement {
270
270
  }, "#init"));
271
271
  }
272
272
  connectedCallback() {
273
- if (g(this, V, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, V)) return;
273
+ if (g(this, Y, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, Y)) return;
274
274
  this.innerHTML = `
275
275
  <style>
276
276
  nine-table-vscrollbar {
@@ -335,7 +335,7 @@ const Kt = class Kt extends HTMLElement {
335
335
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
336
336
  `;
337
337
  const e = /* @__PURE__ */ c(() => {
338
- const s = t(this, V).querySelector(".ng-container-body");
338
+ const s = t(this, Y).querySelector(".ng-container-body");
339
339
  if (!s) {
340
340
  setTimeout(e, 10);
341
341
  return;
@@ -351,10 +351,10 @@ const Kt = class Kt extends HTMLElement {
351
351
  e();
352
352
  }
353
353
  };
354
- V = new WeakMap(), I = new WeakMap(), S = new WeakMap(), it = new WeakMap(), st = new WeakMap(), bt = new WeakMap(), c(Kt, "NineTableVScrollBar");
354
+ Y = new WeakMap(), I = new WeakMap(), S = new WeakMap(), it = new WeakMap(), st = new WeakMap(), bt = new WeakMap(), c(Kt, "NineTableVScrollBar");
355
355
  let zt = Kt;
356
356
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", zt);
357
- var gt, K;
357
+ var gt, F;
358
358
  const H = class H {
359
359
  /**
360
360
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
@@ -369,7 +369,7 @@ const H = class H {
369
369
  var o, r, n, l;
370
370
  if (!i) return null;
371
371
  const e = i.cloneNode(!0);
372
- return t(o = H, gt).call(o, e), t(r = H, K).call(r, e, "thead"), t(n = H, K).call(n, e, "tbody"), t(l = H, K).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((a, d) => {
372
+ return t(o = H, gt).call(o, e), t(r = H, F).call(r, e, "thead"), t(n = H, F).call(n, e, "tbody"), t(l = H, F).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((a, d) => {
373
373
  const f = a.getAttribute("fixed");
374
374
  f && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((u) => {
375
375
  u.setAttribute("fixed", f);
@@ -377,7 +377,7 @@ const H = class H {
377
377
  }), e;
378
378
  }
379
379
  };
380
- gt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), h(H, gt, /* @__PURE__ */ c((i) => {
380
+ gt = new WeakMap(), F = new WeakMap(), c(H, "TableCompiler"), h(H, gt, /* @__PURE__ */ c((i) => {
381
381
  if (!i.querySelector("colgroup")) {
382
382
  const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, o = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
383
383
  for (let n = 0; n < s; n++) {
@@ -391,7 +391,7 @@ gt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), h(H, gt, /* @__PUR
391
391
  s ? s.after(e) : i.prepend(e);
392
392
  }
393
393
  i.classList.add("nine-table-element"), i.style.display = "table";
394
- }, "#ensureTableStructure")), h(H, K, /* @__PURE__ */ c((i, e) => {
394
+ }, "#ensureTableStructure")), h(H, F, /* @__PURE__ */ c((i, e) => {
395
395
  const s = Array.from(i.querySelectorAll(e + " tr")), o = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
396
396
  if (r === 0 || o.length === 0) return;
397
397
  let n = 0;
@@ -408,9 +408,9 @@ gt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), h(H, gt, /* @__PUR
408
408
  f = E;
409
409
  break;
410
410
  }
411
- const b = u.rowSpan || 1, m = u.colSpan || 1;
411
+ const b = u.rowSpan || 1, p = u.colSpan || 1;
412
412
  for (let E = 0; E < b; E++)
413
- for (let q = 0; q < m; q++)
413
+ for (let q = 0; q < p; q++)
414
414
  d + E < r && f + q < n && (l[d + E][f + q] = E === 0 && q === 0 ? "1" : "0");
415
415
  });
416
416
  }), s.forEach((a) => {
@@ -425,24 +425,24 @@ gt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), h(H, gt, /* @__PUR
425
425
  });
426
426
  }, "#resetColIndex"));
427
427
  let Ot = H;
428
- var nt, p, _, R, $, X, j, yt, pt, ot, rt, mt, xt, lt, Z, vt;
428
+ var nt, m, _, R, $, V, K, yt, pt, ot, rt, mt, xt, lt, j, vt;
429
429
  const jt = class jt {
430
430
  constructor(i) {
431
431
  h(this, nt);
432
- h(this, p);
432
+ h(this, m);
433
433
  h(this, _, /* @__PURE__ */ new Map());
434
434
  h(this, R, null);
435
435
  h(this, $, null);
436
- h(this, X, 0);
437
- h(this, j, 40);
436
+ h(this, V, 0);
437
+ h(this, K, 40);
438
438
  w(this, "refresh", /* @__PURE__ */ c(() => {
439
439
  var e;
440
- const i = t(this, p).querySelector(".ng-container-body");
441
- i && (t(this, ot).call(this), t(this, Z).call(this, i.scrollTop), (e = t(this, p).querySelector("nine-table-vscrollbar")) == null || e.refresh());
440
+ const i = t(this, m).querySelector(".ng-container-body");
441
+ i && (t(this, ot).call(this), t(this, j).call(this, i.scrollTop), (e = t(this, m).querySelector("nine-table-vscrollbar")) == null || e.refresh());
442
442
  }, "refresh"));
443
443
  w(this, "initialize", /* @__PURE__ */ c(() => {
444
444
  g(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
445
- const r = t(this, p).querySelector(o);
445
+ const r = t(this, m).querySelector(o);
446
446
  if (!r) return;
447
447
  const n = r.querySelector("table");
448
448
  if (!n) return;
@@ -451,13 +451,13 @@ const jt = class jt {
451
451
  const d = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
452
452
  t(this, _).set(o, d);
453
453
  });
454
- const i = t(this, p).querySelector(".ng-container-body"), e = t(this, p).querySelector(".ng-container-left"), s = t(this, p).querySelector(".ng-container-right");
454
+ const i = t(this, m).querySelector(".ng-container-body"), e = t(this, m).querySelector(".ng-container-left"), s = t(this, m).querySelector(".ng-container-right");
455
455
  if (i) {
456
- t(this, pt).call(this, i), t(this, lt).call(this), t(this, ot).call(this), t(this, Z).call(this, i.scrollTop);
456
+ t(this, pt).call(this, i), t(this, lt).call(this), t(this, ot).call(this), t(this, j).call(this, i.scrollTop);
457
457
  let o = i.scrollTop;
458
458
  const r = /* @__PURE__ */ c((n) => {
459
459
  var l;
460
- e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, Z).call(this, n), (l = t(this, p).querySelector("nine-table-vscrollbar")) == null || l.refresh();
460
+ e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, j).call(this, n), (l = t(this, m).querySelector("nine-table-vscrollbar")) == null || l.refresh();
461
461
  }, "syncScroll");
462
462
  i.addEventListener("scroll", () => {
463
463
  const n = i.scrollTop;
@@ -472,7 +472,7 @@ const jt = class jt {
472
472
  if (!o) return;
473
473
  o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
474
474
  const r = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
475
- for (let l = 0; l < t(this, j); l++)
475
+ for (let l = 0; l < t(this, K); l++)
476
476
  s.forEach((a) => {
477
477
  n.appendChild(a.cloneNode(!0));
478
478
  });
@@ -490,7 +490,7 @@ const jt = class jt {
490
490
  e.forEach((b) => {
491
491
  r.appendChild(b.cloneNode(!0));
492
492
  }), o ? o.before(r) : s.appendChild(r);
493
- const n = t(this, p), l = n.style.display, a = n.style.visibility, d = n.style.position;
493
+ const n = t(this, m), l = n.style.display, a = n.style.visibility, d = n.style.position;
494
494
  (l === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
495
495
  let f = 0;
496
496
  const u = s.querySelectorAll("tr:not(.nodata)");
@@ -499,24 +499,25 @@ const jt = class jt {
499
499
  }), u.forEach((b) => b.remove()), n.style.display = l, n.style.visibility = a, n.style.position = d, g(this, R, f > 0 ? f : 24), t(this, rt).call(this), t(this, R);
500
500
  }, "#measureAndCacheHeight"));
501
501
  h(this, ot, /* @__PURE__ */ c(() => {
502
- var r, n, l, a;
503
- if (!t(this, p).querySelector(".ng-container-body")) return;
504
- const e = (typeof ((r = t(this, p).data) == null ? void 0 : r.count) == "function" ? t(this, p).data.count() : null) ?? ((l = (n = t(this, p).dataManager) == null ? void 0 : n.rawRecords) == null ? void 0 : l.length) ?? ((a = t(this, p).data) == null ? void 0 : a.length) ?? 100, s = t(this, R) || 24, o = e * s;
505
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
506
- const f = t(this, p).querySelector(d), u = f == null ? void 0 : f.querySelector("table");
507
- u && (u.style.height = `${o}px`);
502
+ if (!t(this, m).querySelector(".ng-container-body")) return;
503
+ const e = t(this, nt).data.get() || [];
504
+ console.trace(e);
505
+ const s = e.length > 0 ? e.length : 100, o = t(this, R), r = s * o;
506
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
507
+ const l = t(this, m).querySelector(n), a = l == null ? void 0 : l.querySelector("table");
508
+ a && (a.style.height = `${r}px`);
508
509
  });
509
510
  }, "#updateVirtualScrollHeight"));
510
511
  h(this, rt, /* @__PURE__ */ c(() => {
511
- if (t(this, X) > 0 && t(this, R) > 0) {
512
- const i = Math.ceil(t(this, X) / t(this, R));
513
- g(this, j, i + 20);
512
+ if (t(this, V) > 0 && t(this, R) > 0) {
513
+ const i = Math.ceil(t(this, V) / t(this, R));
514
+ g(this, K, i + 20);
514
515
  } else
515
- g(this, j, 40);
516
+ g(this, K, 40);
516
517
  }, "#updateRowCount"));
517
518
  h(this, mt, /* @__PURE__ */ c(() => {
518
519
  var a, d, f;
519
- const i = t(this, p).querySelector(".ng-container-left table"), e = t(this, p).querySelector(".ng-container-body table"), s = t(this, p).querySelector(".ng-container-right table");
520
+ const i = t(this, m).querySelector(".ng-container-left table"), e = t(this, m).querySelector(".ng-container-body table"), s = t(this, m).querySelector(".ng-container-right table");
520
521
  if (!e) return;
521
522
  const o = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), n = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(o.length, r.length, n.length);
522
523
  for (let u = 0; u < l; u++) {
@@ -524,12 +525,12 @@ const jt = class jt {
524
525
  ((a = o[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
525
526
  ((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
526
527
  ((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
527
- ], m = Math.max(...b);
528
- m > 0 && (o[u] && (o[u].style.height = `${m}px`), r[u] && (r[u].style.height = `${m}px`), n[u] && (n[u].style.height = `${m}px`));
528
+ ], p = Math.max(...b);
529
+ p > 0 && (o[u] && (o[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), n[u] && (n[u].style.height = `${p}px`));
529
530
  }
530
531
  }, "#syncRowHeights"));
531
532
  h(this, xt, /* @__PURE__ */ c(() => {
532
- !t(this, p) || !(t(this, p) instanceof HTMLElement) || (g(this, $, new ResizeObserver((i) => {
533
+ !t(this, m) || !(t(this, m) instanceof HTMLElement) || (g(this, $, new ResizeObserver((i) => {
533
534
  for (const e of i) {
534
535
  const s = e.target;
535
536
  if (!s.classList.contains("active")) continue;
@@ -539,31 +540,31 @@ const jt = class jt {
539
540
  const n = s.querySelector("thead");
540
541
  n && (r += n.offsetHeight || n.getBoundingClientRect().height);
541
542
  const l = Math.max(o - r, 100);
542
- t(this, X) !== l && (g(this, X, l), t(this, rt).call(this), t(this, R) !== null && t(this, lt).call(this));
543
+ t(this, V) !== l && (g(this, V, l), t(this, rt).call(this), t(this, R) !== null && t(this, lt).call(this));
543
544
  }
544
545
  }
545
- })), t(this, $).observe(t(this, p)));
546
+ })), t(this, $).observe(t(this, m)));
546
547
  }, "#initResizeObserver"));
547
548
  h(this, lt, /* @__PURE__ */ c(() => {
548
549
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
549
- const e = t(this, p).querySelector(i);
550
+ const e = t(this, m).querySelector(i);
550
551
  e && e.querySelector("tbody.bindable-tbody") && t(this, yt).call(this, e, i);
551
552
  }), t(this, mt).call(this);
552
553
  }, "#renderAllContainers"));
553
- h(this, Z, /* @__PURE__ */ c((i) => {
554
+ h(this, j, /* @__PURE__ */ c((i) => {
554
555
  var r;
555
556
  const e = t(this, R);
556
557
  if (!e || e <= 0) return;
557
558
  const s = Math.max(0, Math.floor(i / e)), o = ((r = t(this, _).get(".ng-container-body")) == null ? void 0 : r.length) || 1;
558
559
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
559
- const l = t(this, p).querySelector(n);
560
+ const l = t(this, m).querySelector(n);
560
561
  if (!l) return;
561
562
  const a = l.querySelector("tbody.bindable-tbody");
562
563
  if (!a) return;
563
564
  Array.from(a.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
564
- var E, q, D, ee;
565
- const b = s + Math.floor(u / o), m = (typeof t(this, p).getData == "function" ? t(this, p).getData(b) : null) ?? (typeof ((E = t(this, p).data) == null ? void 0 : E.get) == "function" ? t(this, p).data.get(b) : null) ?? ((D = (q = t(this, p).dataManager) == null ? void 0 : q.rawRecords) == null ? void 0 : D[b]) ?? ((ee = t(this, p).data) == null ? void 0 : ee[b]) ?? { _index: b };
566
- f.style.display = "", t(this, vt).call(this, f, m, b);
565
+ var E, q, O, ee;
566
+ const b = s + Math.floor(u / o), p = (typeof t(this, m).getData == "function" ? t(this, m).getData(b) : null) ?? (typeof ((E = t(this, m).data) == null ? void 0 : E.get) == "function" ? t(this, m).data.get(b) : null) ?? ((O = (q = t(this, m).dataManager) == null ? void 0 : q.rawRecords) == null ? void 0 : O[b]) ?? ((ee = t(this, m).data) == null ? void 0 : ee[b]) ?? { _index: b };
567
+ f.style.display = "", t(this, vt).call(this, f, p, b);
567
568
  });
568
569
  });
569
570
  }, "#handleScroll"));
@@ -576,7 +577,7 @@ const jt = class jt {
576
577
  w(this, "destroy", /* @__PURE__ */ c(() => {
577
578
  t(this, $) && (t(this, $).disconnect(), g(this, $, null));
578
579
  }, "destroy"));
579
- g(this, nt, i.getRootNode().host), g(this, p, i), t(this, xt).call(this), O.log("111"), O.log(t(this, nt));
580
+ g(this, nt, i.getRootNode().host), g(this, m, i), t(this, xt).call(this);
580
581
  }
581
582
  getRowHeight() {
582
583
  return t(this, R);
@@ -586,15 +587,15 @@ const jt = class jt {
586
587
  return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
587
588
  }
588
589
  };
589
- nt = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), X = new WeakMap(), j = new WeakMap(), yt = new WeakMap(), pt = new WeakMap(), ot = new WeakMap(), rt = new WeakMap(), mt = new WeakMap(), xt = new WeakMap(), lt = new WeakMap(), Z = new WeakMap(), vt = new WeakMap(), c(jt, "RowManager");
590
+ nt = new WeakMap(), m = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), V = new WeakMap(), K = new WeakMap(), yt = new WeakMap(), pt = new WeakMap(), ot = new WeakMap(), rt = new WeakMap(), mt = new WeakMap(), xt = new WeakMap(), lt = new WeakMap(), j = new WeakMap(), vt = new WeakMap(), c(jt, "RowManager");
590
591
  let Dt = jt;
591
- var wt, G, J, St, Et, Rt, kt, qt;
592
+ var wt, Z, G, St, Et, Rt, kt, qt;
592
593
  const et = class et extends HTMLElement {
593
594
  constructor() {
594
595
  super();
595
596
  h(this, wt);
596
- h(this, G, null);
597
- h(this, J);
597
+ h(this, Z, null);
598
+ h(this, G);
598
599
  h(this, St, /* @__PURE__ */ c(() => {
599
600
  [
600
601
  { selector: ".ng-container-body", type: null },
@@ -603,7 +604,7 @@ const et = class et extends HTMLElement {
603
604
  ].forEach(({ selector: s, type: o }) => {
604
605
  const r = this.querySelector(s);
605
606
  if (!r) return;
606
- const n = t(this, Rt).call(this, t(this, G), o);
607
+ const n = t(this, Rt).call(this, t(this, Z), o);
607
608
  r.innerHTML = "", r.appendChild(n);
608
609
  });
609
610
  }, "#renderSplitContainers"));
@@ -619,13 +620,13 @@ const et = class et extends HTMLElement {
619
620
  });
620
621
  }, "#updateContainerWidths"));
621
622
  w(this, "generate", /* @__PURE__ */ c((e) => {
622
- e && (g(this, G, Ot.compile(e)), t(this, G).style.display = "table", t(this, St).call(this), t(this, Et).call(this), requestAnimationFrame(() => {
623
+ e && (g(this, Z, Ot.compile(e)), t(this, Z).style.display = "table", t(this, St).call(this), t(this, Et).call(this), requestAnimationFrame(() => {
623
624
  var o;
624
625
  const s = (o = this.querySelector("thead")) == null ? void 0 : o.getBoundingClientRect().height;
625
626
  this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
626
627
  r.style.top = `${s}px`;
627
628
  });
628
- }), t(this, J).initialize(), setTimeout(() => {
629
+ }), t(this, G).initialize(), setTimeout(() => {
629
630
  var s;
630
631
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
631
632
  }, 0));
@@ -647,7 +648,7 @@ const et = class et extends HTMLElement {
647
648
  n.remove();
648
649
  }), o;
649
650
  }, "#createSplitTable"));
650
- w(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, J).getRowHeight(), "getRowHeight"));
651
+ w(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, G).getRowHeight(), "getRowHeight"));
651
652
  w(this, "scrollToX", /* @__PURE__ */ c((e) => {
652
653
  const s = this.querySelector(".ng-container-body");
653
654
  s && (s.scrollLeft = e);
@@ -806,16 +807,16 @@ const et = class et extends HTMLElement {
806
807
  </div>
807
808
  `;
808
809
  }, "#render"));
809
- g(this, J, new Dt(this)), g(this, wt, this.getRootNode().host);
810
+ g(this, G, new Dt(this)), g(this, wt, this.getRootNode().host);
810
811
  }
811
812
  connectedCallback() {
812
813
  t(this, kt).call(this);
813
814
  }
814
815
  disconnectedCallback() {
815
- this.innerHTML = "", O.log("NineTableSheet destroyed.");
816
+ this.innerHTML = "", tt.log("NineTableSheet destroyed.");
816
817
  }
817
818
  };
818
- wt = new WeakMap(), G = new WeakMap(), J = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Rt = new WeakMap(), kt = new WeakMap(), qt = new WeakMap(), c(et, "NineTableSheet"), w(et, "SCROLLBAR_SIZE", 16);
819
+ wt = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Rt = new WeakMap(), kt = new WeakMap(), qt = new WeakMap(), c(et, "NineTableSheet"), w(et, "SCROLLBAR_SIZE", 16);
819
820
  let dt = et;
820
821
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", dt);
821
822
  var Tt, ct;
@@ -833,11 +834,11 @@ const Zt = class Zt extends HTMLElement {
833
834
  h(this, ct, /* @__PURE__ */ c((e, s = !1) => {
834
835
  const o = /* @__PURE__ */ c(() => {
835
836
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
836
- Array.from(this.querySelectorAll("nine-splitter")).forEach((m) => m.style.setProperty("display", "none"));
837
- const b = f.filter((m) => m.classList.contains("active"));
838
- b.length < 2 || b.forEach((m) => {
839
- const E = parseInt(m.getAttribute("data-index"), 10), q = this.querySelector(`nine-splitter[data-split-index="${E}"]`), D = f[E + 1];
840
- q && D && D.classList.contains("active") && q.style.setProperty("display", "flex");
837
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((p) => p.style.setProperty("display", "none"));
838
+ const b = f.filter((p) => p.classList.contains("active"));
839
+ b.length < 2 || b.forEach((p) => {
840
+ const E = parseInt(p.getAttribute("data-index"), 10), q = this.querySelector(`nine-splitter[data-split-index="${E}"]`), O = f[E + 1];
841
+ q && O && O.classList.contains("active") && q.style.setProperty("display", "flex");
841
842
  });
842
843
  }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), a = n.querySelectorAll("nine-table-sheet");
843
844
  if (!l[e]) return;
@@ -1002,36 +1003,36 @@ const Gt = class Gt {
1002
1003
  };
1003
1004
  k = new WeakMap(), At = new WeakMap(), at = new WeakMap(), Lt = new WeakMap(), c(Gt, "LayoutManager");
1004
1005
  let Bt = Gt;
1005
- var W, U;
1006
+ var W, X;
1006
1007
  const Jt = class Jt {
1007
1008
  constructor(i) {
1008
1009
  h(this, W);
1009
- h(this, U, -1);
1010
+ h(this, X, -1);
1010
1011
  w(this, "count", /* @__PURE__ */ c(() => t(this, W).rawRecords.length, "count"));
1011
1012
  g(this, W, i);
1012
1013
  }
1013
1014
  get at() {
1014
- return t(this, U);
1015
+ return t(this, X);
1015
1016
  }
1016
1017
  set at(i) {
1017
1018
  var s, o;
1018
- g(this, U, parseInt(i, 10));
1019
+ g(this, X, parseInt(i, 10));
1019
1020
  const e = ((o = (s = t(this, W).owner).querySelector) == null ? void 0 : o.call(s, ".ng-container-body")) || t(this, W).owner.body;
1020
- e && !e.querySelector(`tbody.bindable tr[data-row="${t(this, U)}"]`) && setTimeout(() => {
1021
+ e && !e.querySelector(`tbody.bindable tr[data-row="${t(this, X)}"]`) && setTimeout(() => {
1021
1022
  var r, n;
1022
- (n = (r = t(this, W).owner).scrollTo_V1) == null || n.call(r, t(this, U));
1023
+ (n = (r = t(this, W).owner).scrollTo_V1) == null || n.call(r, t(this, X));
1023
1024
  });
1024
1025
  }
1025
1026
  };
1026
- W = new WeakMap(), U = new WeakMap(), c(Jt, "ngRow");
1027
+ W = new WeakMap(), X = new WeakMap(), c(Jt, "ngRow");
1027
1028
  let Pt = Jt;
1028
- var T, v, A, Q, Ht, z, Ct, ht, _t, Mt, tt;
1029
+ var T, v, A, J, Ht, z, Ct, ht, _t, Mt, Q;
1029
1030
  const L = class L {
1030
1031
  constructor(i, e) {
1031
1032
  h(this, T);
1032
1033
  h(this, v);
1033
1034
  h(this, A, []);
1034
- h(this, Q, []);
1035
+ h(this, J, []);
1035
1036
  h(this, Ht, 0);
1036
1037
  h(this, z, []);
1037
1038
  h(this, Ct, /* @__PURE__ */ c(() => {
@@ -1057,11 +1058,11 @@ const L = class L {
1057
1058
  _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, z).slice(), -1, {}, {}]
1058
1059
  }), "#getDefaultMeta"));
1059
1060
  w(this, "reset", /* @__PURE__ */ c(() => {
1060
- g(this, A, []), g(this, Q, []);
1061
+ g(this, A, []), g(this, J, []);
1061
1062
  }, "reset"));
1062
1063
  w(this, "clear", /* @__PURE__ */ c(() => {
1063
1064
  var i;
1064
- t(this, v).rawRecords = [], g(this, A, []), g(this, Q, []), (i = t(this, v).viewRecords) != null && i.reset && t(this, v).viewRecords.reset();
1065
+ t(this, v).rawRecords = [], g(this, A, []), g(this, J, []), (i = t(this, v).viewRecords) != null && i.reset && t(this, v).viewRecords.reset();
1065
1066
  }, "clear"));
1066
1067
  h(this, _t, /* @__PURE__ */ c((i) => {
1067
1068
  var o;
@@ -1111,14 +1112,14 @@ const L = class L {
1111
1112
  l !== s && n.__ng.rowState !== L.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = l), n.__ng.rowState = L.ROW_STATE.UPDATE), n.v[r] = s, t(this, v).owner.refreshData && t(this, v).owner.refreshData(i);
1112
1113
  }, "setValue"));
1113
1114
  w(this, "resetRecords", /* @__PURE__ */ c(() => {
1114
- g(this, Q, t(this, v).rawRecords.filter((i) => !i.__ng.deleted)), g(this, A, t(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, v).rawRecords.forEach((i, e) => {
1115
+ g(this, J, t(this, v).rawRecords.filter((i) => !i.__ng.deleted)), g(this, A, t(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, v).rawRecords.forEach((i, e) => {
1115
1116
  i.__ng.rowidx = e;
1116
1117
  }), t(this, A).forEach((i, e) => {
1117
1118
  i.__ng.i = e;
1118
1119
  });
1119
1120
  }, "resetRecords"));
1120
1121
  w(this, "getValidData", /* @__PURE__ */ c(() => (t(this, A).length === 0 && t(this, v).rawRecords.length > 0 && this.resetRecords(), t(this, A)), "getValidData"));
1121
- h(this, tt, /* @__PURE__ */ c((i) => {
1122
+ h(this, Q, /* @__PURE__ */ c((i) => {
1122
1123
  var s;
1123
1124
  if (!i) return i;
1124
1125
  const e = typeof ((s = t(this, T).fields) == null ? void 0 : s.get) == "function" ? t(this, T).fields.get() : [];
@@ -1134,19 +1135,19 @@ const L = class L {
1134
1135
  var r;
1135
1136
  const s = this.getValidData();
1136
1137
  if (!s || s.length <= 0) return;
1137
- if (i == null) return t(this, tt).call(this, s);
1138
+ if (i == null) return t(this, Q).call(this, s);
1138
1139
  if (i < 0 || i >= s.length) return null;
1139
1140
  const o = typeof ((r = t(this, T).fields) == null ? void 0 : r.get) == "function" ? t(this, T).fields.get() : [];
1140
1141
  if (e != null) {
1141
1142
  const n = o.indexOf(e);
1142
1143
  return n >= 0 ? s[i].v[n] : null;
1143
1144
  }
1144
- return t(this, tt).call(this, s[i]);
1145
+ return t(this, Q).call(this, s[i]);
1145
1146
  }, "get"));
1146
1147
  g(this, T, i), g(this, v, e), t(this, Ct).call(this);
1147
1148
  }
1148
1149
  get source() {
1149
- return t(this, tt).call(this, t(this, v).rawRecords);
1150
+ return t(this, Q).call(this, t(this, v).rawRecords);
1150
1151
  }
1151
1152
  set source(i) {
1152
1153
  this.clear(), this.add(i, !1);
@@ -1161,7 +1162,7 @@ const L = class L {
1161
1162
  return this.length;
1162
1163
  }
1163
1164
  };
1164
- T = new WeakMap(), v = new WeakMap(), A = new WeakMap(), Q = new WeakMap(), Ht = new WeakMap(), z = new WeakMap(), Ct = new WeakMap(), ht = new WeakMap(), _t = new WeakMap(), Mt = new WeakMap(), tt = new WeakMap(), c(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1165
+ T = new WeakMap(), v = new WeakMap(), A = new WeakMap(), J = new WeakMap(), Ht = new WeakMap(), z = new WeakMap(), Ct = new WeakMap(), ht = new WeakMap(), _t = new WeakMap(), Mt = new WeakMap(), Q = new WeakMap(), c(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1165
1166
  w(L, "ROW_STATE", {
1166
1167
  EMPTY: "EMPTY",
1167
1168
  NORMAL: "NORMAL",
@@ -1191,35 +1192,35 @@ const Qt = class Qt {
1191
1192
  };
1192
1193
  c(Qt, "ngDataManager");
1193
1194
  let Vt = Qt;
1194
- var F, It;
1195
+ var U, It;
1195
1196
  const te = class te extends HTMLElement {
1196
1197
  constructor() {
1197
1198
  super();
1198
1199
  //#created = false;
1199
- h(this, F);
1200
+ h(this, U);
1200
1201
  h(this, It);
1201
- this.attachShadow({ mode: "open" }), g(this, F, new Vt(this));
1202
+ this.attachShadow({ mode: "open" }), g(this, U, new Vt(this));
1202
1203
  }
1203
1204
  connectedCallback() {
1204
- g(this, It, new Bt(this)), O.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1205
+ g(this, It, new Bt(this)), tt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1205
1206
  }
1206
1207
  disconnectedCallback() {
1207
- O.log("NineTable disconnected.");
1208
+ tt.log("NineTable disconnected.");
1208
1209
  }
1209
1210
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1210
1211
  get data() {
1211
- return t(this, F).data;
1212
+ return t(this, U).data;
1212
1213
  }
1213
1214
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1214
1215
  get row() {
1215
- return t(this, F).row;
1216
+ return t(this, U).row;
1216
1217
  }
1217
1218
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1218
1219
  get dataManager() {
1219
- return t(this, F);
1220
+ return t(this, U);
1220
1221
  }
1221
1222
  };
1222
- F = new WeakMap(), It = new WeakMap(), c(te, "NineTable");
1223
+ U = new WeakMap(), It = new WeakMap(), c(te, "NineTable");
1223
1224
  let Xt = te;
1224
1225
  customElements.get("nine-table") || customElements.define("nine-table", Xt);
1225
1226
  //# sourceMappingURL=nine-table.js.map