@ninebone/table 0.0.380 β†’ 0.0.382

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.
@@ -7,8 +7,8 @@ var a = (x, i) => xe(x, "name", { value: i, configurable: !0 });
7
7
  var v = (x, i, e) => Ee(x, typeof i != "symbol" ? i + "" : i, e), we = (x, i, e) => i.has(x) || ve("Cannot " + e);
8
8
  var t = (x, i, e) => (we(x, i, "read from private field"), e ? e.call(x) : i.get(x)), c = (x, i, e) => i.has(x) ? ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), g = (x, i, e, s) => (we(x, i, "write to private field"), s ? s.call(x, e) : i.set(x, e), e);
9
9
  var Se = (x, i, e, s) => ({
10
- set _(o) {
11
- g(x, i, o, e);
10
+ set _(n) {
11
+ g(x, i, n, e);
12
12
  },
13
13
  get _() {
14
14
  return t(x, i, s);
@@ -22,7 +22,7 @@ const ne = class ne extends Re.constructor {
22
22
  };
23
23
  a(ne, "Trace");
24
24
  let Ut = ne;
25
- const _ = new Ut();
25
+ const z = new Ut();
26
26
  var I, D, p, Y, X, U, vt, F, wt;
27
27
  const oe = class oe extends HTMLElement {
28
28
  constructor() {
@@ -44,70 +44,70 @@ const oe = class oe extends HTMLElement {
44
44
  if (!t(this, I) || !t(this, p) || t(this, D)) return;
45
45
  const e = t(this, p).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const o = t(this, p).track, r = t(this, p).thumb, n = t(this, I).querySelector(".ng-container-bottom"), l = e.clientWidth, h = s.scrollWidth;
48
- if (l !== 0 && h > l)
49
- n && (n.style.display = "flex");
47
+ const n = t(this, p).track, r = t(this, p).thumb, o = t(this, I).querySelector(".ng-container-bottom"), l = e.clientWidth, d = s.scrollWidth;
48
+ if (l !== 0 && d > l)
49
+ o && (o.style.display = "flex");
50
50
  else {
51
- n && (n.style.display = "none");
51
+ o && (o.style.display = "none");
52
52
  return;
53
53
  }
54
- const d = o.clientWidth;
55
- if (d <= 0) return;
56
- const f = Math.max(Math.min(d * (l / h), d), 20);
54
+ const h = n.clientWidth;
55
+ if (h <= 0) return;
56
+ const f = Math.max(Math.min(h * (l / d), h), 20);
57
57
  r.style.width = `${f}px`;
58
- const u = e.scrollLeft, b = h - l;
58
+ const u = e.scrollLeft, b = d - l;
59
59
  let y = 0;
60
- b > 0 && (y = parseInt(u / b * (d - f), 10)), y < 0 && (y = 0);
61
- const m = d - f;
62
- y > m && (y = m), r.style.left = `${y}px`, _.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= m - 1;
60
+ b > 0 && (y = parseInt(u / b * (h - f), 10)), y < 0 && (y = 0);
61
+ const m = h - f;
62
+ y > m && (y = m), r.style.left = `${y}px`, z.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= m - 1;
63
63
  }, "refresh"));
64
64
  c(this, F, /* @__PURE__ */ a((e) => {
65
65
  if (!t(this, p)) return !1;
66
- const s = t(this, p).container, o = s.querySelector("table");
67
- if (!o) return !1;
68
- const r = t(this, p).track.getBoundingClientRect(), n = t(this, p).thumb.clientWidth;
66
+ const s = t(this, p).container, n = s.querySelector("table");
67
+ if (!n) return !1;
68
+ const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
- const h = r.width - n;
72
- l > h && (l = h), l = parseInt(l, 10), t(this, p).thumb.style.left = `${l}px`, t(this, p).left.disabled = l === 0, t(this, p).right.disabled = l >= h - 1;
73
- const d = s.clientWidth, u = o.scrollWidth - d;
74
- return h > 0 && u > 0 && (s.scrollLeft = l / h * u), l > 0 && l < h - 1;
71
+ const d = r.width - o;
72
+ l > d && (l = d), l = parseInt(l, 10), t(this, p).thumb.style.left = `${l}px`, t(this, p).left.disabled = l === 0, t(this, p).right.disabled = l >= d - 1;
73
+ const h = s.clientWidth, u = n.scrollWidth - h;
74
+ return d > 0 && u > 0 && (s.scrollLeft = l / d * u), l > 0 && l < d - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  c(this, wt, /* @__PURE__ */ a(() => {
77
- const e = /* @__PURE__ */ a((o) => {
77
+ const e = /* @__PURE__ */ a((n) => {
78
78
  clearInterval(t(this, Y)), clearInterval(t(this, X));
79
79
  const r = parseInt(t(this, p).thumb.style.left || 0, 10);
80
- t(this, F).call(this, r + o), g(this, Y, setInterval(() => {
80
+ t(this, F).call(this, r + n), g(this, Y, setInterval(() => {
81
81
  clearInterval(t(this, Y)), g(this, X, setInterval(() => {
82
- const n = parseInt(t(this, p).thumb.style.left || 0, 10);
83
- t(this, F).call(this, n + o) || clearInterval(t(this, X));
82
+ const o = parseInt(t(this, p).thumb.style.left || 0, 10);
83
+ t(this, F).call(this, o + n) || clearInterval(t(this, X));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
87
  clearInterval(t(this, Y)), clearInterval(t(this, X));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
- t(this, p).left.addEventListener(o, s), t(this, p).right.addEventListener(o, s), t(this, p).track.addEventListener(o, s);
91
- }), t(this, p).left.addEventListener("mousedown", (o) => {
92
- o.button === 0 && e(-20);
93
- }), t(this, p).right.addEventListener("mousedown", (o) => {
94
- o.button === 0 && e(20);
95
- }), t(this, p).left.addEventListener("touchstart", () => e(-20)), t(this, p).right.addEventListener("touchstart", () => e(20)), t(this, p).track.addEventListener("mousedown", (o) => {
96
- if (o.button !== 0) return;
97
- o.preventDefault();
98
- const r = t(this, p).track.getBoundingClientRect(), n = t(this, p).thumb.clientWidth;
99
- t(this, F).call(this, o.clientX - r.left - n / 2);
100
- }), t(this, p).thumb.addEventListener("mousedown", (o) => {
101
- if (o.button !== 0) return;
102
- o.stopPropagation(), o.preventDefault(), g(this, D, !0), this.shiftX = o.clientX - t(this, p).thumb.getBoundingClientRect().left;
89
+ ["mouseup", "mouseleave", "touchend"].forEach((n) => {
90
+ t(this, p).left.addEventListener(n, s), t(this, p).right.addEventListener(n, s), t(this, p).track.addEventListener(n, s);
91
+ }), t(this, p).left.addEventListener("mousedown", (n) => {
92
+ n.button === 0 && e(-20);
93
+ }), t(this, p).right.addEventListener("mousedown", (n) => {
94
+ n.button === 0 && e(20);
95
+ }), t(this, p).left.addEventListener("touchstart", () => e(-20)), t(this, p).right.addEventListener("touchstart", () => e(20)), t(this, p).track.addEventListener("mousedown", (n) => {
96
+ if (n.button !== 0) return;
97
+ n.preventDefault();
98
+ const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
99
+ t(this, F).call(this, n.clientX - r.left - o / 2);
100
+ }), t(this, p).thumb.addEventListener("mousedown", (n) => {
101
+ if (n.button !== 0) return;
102
+ n.stopPropagation(), n.preventDefault(), g(this, D, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ a((l) => {
104
104
  if (!t(this, D)) return;
105
- const h = t(this, p).track.getBoundingClientRect();
106
- t(this, F).call(this, l.clientX - h.left - this.shiftX);
107
- }, "onMouseMove"), n = /* @__PURE__ */ a(() => {
108
- g(this, D, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
105
+ const d = t(this, p).track.getBoundingClientRect();
106
+ t(this, F).call(this, l.clientX - d.left - this.shiftX);
107
+ }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
108
+ g(this, D, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", r), document.addEventListener("mouseup", n);
110
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
@@ -214,53 +214,53 @@ const re = class re extends HTMLElement {
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
216
  v(this, "refresh", /* @__PURE__ */ a(() => {
217
- var z, ge, be, ye, pe, me;
217
+ var O, ge, be, ye, pe, me;
218
218
  if (!t(this, L) || !t(this, S) || t(this, B)) return;
219
- const e = t(this, S).container, s = t(this, S).track, o = t(this, S).thumb, r = e.clientHeight;
220
- (t(this, L)._rowManager || t(this, L).getRowHeight) && t(this, L);
221
- const n = ((ge = (z = t(this, L).host) == null ? void 0 : z.data) == null ? void 0 : ge.get()) || ((ye = (be = t(this, L)._host) == null ? void 0 : be.data) == null ? void 0 : ye.get()) || [], l = n.length > 0 ? n.length : 61, h = ((me = (pe = t(this, L)).getRowHeight) == null ? void 0 : me.call(pe)) || 85, d = l * h;
222
- if (d <= r) {
223
- o.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
219
+ const e = t(this, S).container, s = t(this, S).track, n = t(this, S).thumb, r = e.clientHeight, o = ((ge = (O = t(this, L).host) == null ? void 0 : O.data) == null ? void 0 : ge.get()) || ((ye = (be = t(this, L)._host) == null ? void 0 : be.data) == null ? void 0 : ye.get()) || [], l = o.length > 0 ? o.length : 61, d = ((me = (pe = t(this, L)).getRowHeight) == null ? void 0 : me.call(pe)) || 85, h = l * d;
220
+ if (h <= r) {
221
+ n.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
224
222
  return;
225
223
  } else
226
- o.style.display = "block";
224
+ n.style.display = "block";
227
225
  const f = s.clientHeight;
228
226
  if (f <= 0) return;
229
- const u = Math.max(Math.min(f * (r / d), f), 20);
230
- o.style.height = `${u}px`;
231
- const b = e.scrollTop, y = d - r;
227
+ const u = Math.max(Math.min(f * (r / h), f), 20);
228
+ n.style.height = `${u}px`;
229
+ const b = e.scrollTop, y = h - r;
232
230
  let m = 0;
233
231
  y > 0 && (m = b / y * (f - u));
234
232
  const R = f - u;
235
- m < 0 && (m = 0), m > R && (m = R), o.style.top = `${m}px`, t(this, S).top.disabled = b <= 0, t(this, S).bottom.disabled = b >= y - 1;
233
+ m < 0 && (m = 0), m > R && (m = R), n.style.top = `${m}px`, t(this, S).top.disabled = b <= 0, t(this, S).bottom.disabled = b >= y - 1;
236
234
  }, "refresh"));
237
235
  c(this, St, /* @__PURE__ */ a(() => {
238
- const e = t(this, S).container;
236
+ const e = t(this, S).container, s = /* @__PURE__ */ a(() => {
237
+ var l, d, h, f, u, b;
238
+ const n = ((d = (l = t(this, L).host) == null ? void 0 : l.data) == null ? void 0 : d.get()) || ((f = (h = t(this, L)._host) == null ? void 0 : h.data) == null ? void 0 : f.get()) || [], r = n.length > 0 ? n.length : 61, o = ((b = (u = t(this, L)).getRowHeight) == null ? void 0 : b.call(u)) || 85;
239
+ return r * o;
240
+ }, "getContentHeight");
239
241
  e.addEventListener("scroll", () => {
240
242
  t(this, B) || this.refresh();
241
- }), t(this, S).thumb.addEventListener("mousedown", (s) => {
242
- if (s.button !== 0) return;
243
- s.stopPropagation(), s.preventDefault(), g(this, B, !0), g(this, at, s.clientY), g(this, ct, e.scrollTop);
244
- const o = /* @__PURE__ */ a((n) => {
243
+ }), t(this, S).thumb.addEventListener("mousedown", (n) => {
244
+ if (n.button !== 0) return;
245
+ n.stopPropagation(), n.preventDefault(), g(this, B, !0), g(this, at, n.clientY), g(this, ct, e.scrollTop);
246
+ const r = /* @__PURE__ */ a((l) => {
245
247
  if (!t(this, B)) return;
246
- const l = t(this, S).track.getBoundingClientRect(), h = t(this, S).thumb.clientHeight, f = l.height - h, u = n.clientY - t(this, at), b = e.clientHeight, y = e.querySelector("table");
247
- _.log(y), _.log(y.scrollHeight);
248
- const R = y.scrollHeight - b;
249
- if (f > 0 && R > 0) {
250
- const z = u / f * R;
251
- e.scrollTop = t(this, ct) + z;
248
+ const d = t(this, S).track.getBoundingClientRect(), h = t(this, S).thumb.clientHeight, u = d.height - h, b = l.clientY - t(this, at), y = e.clientHeight, R = s() - y;
249
+ if (u > 0 && R > 0) {
250
+ const O = b / u * R;
251
+ e.scrollTop = t(this, ct) + O;
252
252
  }
253
253
  this.refresh();
254
- }, "onMouseMove"), r = /* @__PURE__ */ a(() => {
255
- g(this, B, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
254
+ }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
255
+ g(this, B, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
256
256
  }, "onMouseUp");
257
- document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
258
- }), t(this, S).track.addEventListener("mousedown", (s) => {
259
- if (s.button !== 0 || s.target === t(this, S).thumb) return;
260
- const o = t(this, S).track.getBoundingClientRect(), r = t(this, S).thumb.clientHeight, n = s.clientY - o.top - r / 2, h = o.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
261
- if (h > 0 && u > 0) {
262
- const b = Math.max(0, Math.min(1, n / h));
263
- e.scrollTop = b * u;
257
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
258
+ }), t(this, S).track.addEventListener("mousedown", (n) => {
259
+ if (n.button !== 0 || n.target === t(this, S).thumb) return;
260
+ const r = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientHeight, l = n.clientY - r.top - o / 2, h = r.height - o, f = e.clientHeight, b = s() - f;
261
+ if (h > 0 && b > 0) {
262
+ const y = Math.max(0, Math.min(1, l / h));
263
+ e.scrollTop = y * b;
264
264
  }
265
265
  this.refresh();
266
266
  }), t(this, S).top.addEventListener("click", () => {
@@ -356,83 +356,83 @@ L = new WeakMap(), B = new WeakMap(), S = new WeakMap(), at = new WeakMap(), ct
356
356
  let jt = re;
357
357
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", jt);
358
358
  var Et, Q;
359
- const M = class M {
359
+ const _ = class _ {
360
360
  /**
361
361
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
362
362
  */
363
363
  static compileAll(i) {
364
- return Array.isArray(i) ? i.map((e) => M.compile(e)) : [];
364
+ return Array.isArray(i) ? i.map((e) => _.compile(e)) : [];
365
365
  }
366
366
  /**
367
367
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
368
368
  */
369
369
  static compile(i) {
370
- var o, r, n, l;
370
+ var n, r, o, l;
371
371
  if (!i) return null;
372
372
  const e = i.cloneNode(!0);
373
- return t(o = M, Et).call(o, e), t(r = M, Q).call(r, e, "thead"), t(n = M, Q).call(n, e, "tbody"), t(l = M, Q).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, d) => {
374
- const f = h.getAttribute("fixed");
375
- f && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((u) => {
373
+ return t(n = _, Et).call(n, e), t(r = _, Q).call(r, e, "thead"), t(o = _, Q).call(o, e, "tbody"), t(l = _, Q).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((d, h) => {
374
+ const f = d.getAttribute("fixed");
375
+ f && e.querySelectorAll(`thead [data-col="${h}"], tbody [data-col="${h}"], tfoot [data-col="${h}"]`).forEach((u) => {
376
376
  u.setAttribute("fixed", f);
377
377
  });
378
378
  }), e;
379
379
  }
380
380
  };
381
- Et = new WeakMap(), Q = new WeakMap(), a(M, "TableCompiler"), c(M, Et, /* @__PURE__ */ a((i) => {
381
+ Et = new WeakMap(), Q = new WeakMap(), a(_, "TableCompiler"), c(_, Et, /* @__PURE__ */ a((i) => {
382
382
  if (!i.querySelector("colgroup")) {
383
- 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);
384
- for (let n = 0; n < s; n++) {
383
+ const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
384
+ for (let o = 0; o < s; o++) {
385
385
  const l = document.createElement("col");
386
- l.setAttribute("width", r), o.appendChild(l);
386
+ l.setAttribute("width", r), n.appendChild(l);
387
387
  }
388
- i.prepend(o);
388
+ i.prepend(n);
389
389
  }
390
390
  if (!i.querySelector("thead")) {
391
391
  const e = document.createElement("thead"), s = i.querySelector("colgroup");
392
392
  s ? s.after(e) : i.prepend(e);
393
393
  }
394
394
  i.classList.add("nine-table-element"), i.style.display = "table";
395
- }, "#ensureTableStructure")), c(M, Q, /* @__PURE__ */ a((i, e) => {
396
- const s = Array.from(i.querySelectorAll(e + " tr")), o = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
397
- if (r === 0 || o.length === 0) return;
398
- let n = 0;
399
- o.forEach((h) => {
400
- n += h.colSpan || 1;
395
+ }, "#ensureTableStructure")), c(_, Q, /* @__PURE__ */ a((i, e) => {
396
+ const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
397
+ if (r === 0 || n.length === 0) return;
398
+ let o = 0;
399
+ n.forEach((d) => {
400
+ o += d.colSpan || 1;
401
401
  });
402
- const l = Array.from(Array(r), () => Array(n).fill(null));
403
- s.forEach((h) => {
404
- const d = h.sectionRowIndex;
402
+ const l = Array.from(Array(r), () => Array(o).fill(null));
403
+ s.forEach((d) => {
404
+ const h = d.sectionRowIndex;
405
405
  let f = 0;
406
- Array.from(h.querySelectorAll("th,td")).forEach((u) => {
407
- for (let m = 0; m < l[d].length; m++)
408
- if (l[d][m] === null) {
406
+ Array.from(d.querySelectorAll("th,td")).forEach((u) => {
407
+ for (let m = 0; m < l[h].length; m++)
408
+ if (l[h][m] === null) {
409
409
  f = m;
410
410
  break;
411
411
  }
412
412
  const b = u.rowSpan || 1, y = u.colSpan || 1;
413
413
  for (let m = 0; m < b; m++)
414
414
  for (let R = 0; R < y; R++)
415
- d + m < r && f + R < n && (l[d + m][f + R] = m === 0 && R === 0 ? "1" : "0");
415
+ h + m < r && f + R < o && (l[h + m][f + R] = m === 0 && R === 0 ? "1" : "0");
416
416
  });
417
- }), s.forEach((h) => {
418
- const d = h.sectionRowIndex;
419
- Array.from(h.querySelectorAll("th,td")).forEach((f) => {
420
- for (let u = 0; u < l[d].length; u++)
421
- if (l[d][u] === "1") {
422
- f.dataset.col = u, l[d][u] = "0";
417
+ }), s.forEach((d) => {
418
+ const h = d.sectionRowIndex;
419
+ Array.from(d.querySelectorAll("th,td")).forEach((f) => {
420
+ for (let u = 0; u < l[h].length; u++)
421
+ if (l[h][u] === "1") {
422
+ f.dataset.col = u, l[h][u] = "0";
423
423
  break;
424
424
  }
425
425
  });
426
426
  });
427
427
  }, "#resetColIndex"));
428
- let Kt = M;
429
- var W, w, O, q, N, j, P, tt, Rt, At, qt, ht, dt, Tt, kt, ft, Lt, et, ut;
428
+ let Kt = _;
429
+ var M, w, W, T, N, j, P, tt, Rt, At, Tt, ht, dt, qt, kt, ft, Lt, et, ut;
430
430
  const le = class le {
431
431
  constructor(i) {
432
- c(this, W);
432
+ c(this, M);
433
433
  c(this, w);
434
- c(this, O, /* @__PURE__ */ new Map());
435
- c(this, q, null);
434
+ c(this, W, /* @__PURE__ */ new Map());
435
+ c(this, T, null);
436
436
  c(this, N, null);
437
437
  c(this, j, 0);
438
438
  c(this, P, 40);
@@ -444,89 +444,89 @@ const le = class le {
444
444
  i && (t(this, ht).call(this), t(this, et).call(this, i.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
445
445
  }, "refresh"));
446
446
  v(this, "initialize", /* @__PURE__ */ a(() => {
447
- g(this, q, null), t(this, O).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
448
- const r = t(this, w).querySelector(o);
447
+ g(this, T, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
448
+ const r = t(this, w).querySelector(n);
449
449
  if (!r) return;
450
- const n = r.querySelector("table");
451
- if (!n) return;
452
- const l = n.querySelector("tbody.bindable-tbody");
450
+ const o = r.querySelector("table");
451
+ if (!o) return;
452
+ const l = o.querySelector("tbody.bindable-tbody");
453
453
  if (!l) return;
454
- const d = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
455
- t(this, O).set(o, d);
454
+ const h = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
455
+ t(this, W).set(n, h);
456
456
  });
457
457
  const i = t(this, w).querySelector(".ng-container-body"), e = t(this, w).querySelector(".ng-container-left"), s = t(this, w).querySelector(".ng-container-right");
458
458
  if (i) {
459
- t(this, qt).call(this, i), t(this, ft).call(this), t(this, ht).call(this), t(this, et).call(this, i.scrollTop);
460
- let o = i.scrollTop;
461
- const r = /* @__PURE__ */ a((n) => {
459
+ t(this, Tt).call(this, i), t(this, ft).call(this), t(this, ht).call(this), t(this, et).call(this, i.scrollTop);
460
+ let n = i.scrollTop;
461
+ const r = /* @__PURE__ */ a((o) => {
462
462
  var l;
463
- e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, et).call(this, n), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
463
+ e && e.scrollTop !== o && (e.scrollTop = o), s && s.scrollTop !== o && (s.scrollTop = o), t(this, et).call(this, o), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
464
464
  }, "syncScroll");
465
465
  i.addEventListener("scroll", () => {
466
- const n = i.scrollTop;
467
- o !== n && (o = n, r(n));
466
+ const o = i.scrollTop;
467
+ n !== o && (n = o, r(o));
468
468
  });
469
469
  }
470
470
  }, "initialize"));
471
471
  c(this, At, /* @__PURE__ */ a((i, e) => {
472
- const s = t(this, O).get(e);
472
+ const s = t(this, W).get(e);
473
473
  if (!s || s.length === 0) return;
474
- const o = i.querySelector("tbody.bindable-tbody");
475
- if (!o) return;
476
- o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
477
- const r = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
474
+ const n = i.querySelector("tbody.bindable-tbody");
475
+ if (!n) return;
476
+ n.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
477
+ const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
478
478
  for (let l = 0; l < t(this, P); l++)
479
- s.forEach((h) => {
480
- n.appendChild(h.cloneNode(!0));
479
+ s.forEach((d) => {
480
+ o.appendChild(d.cloneNode(!0));
481
481
  });
482
- r ? r.before(n) : o.appendChild(n);
482
+ r ? r.before(o) : n.appendChild(o);
483
483
  }, "#renderRows"));
484
- c(this, qt, /* @__PURE__ */ a((i) => {
485
- if (t(this, q) !== null && t(this, q) > 0)
486
- return t(this, q);
487
- const e = t(this, O).get(".ng-container-body");
484
+ c(this, Tt, /* @__PURE__ */ a((i) => {
485
+ if (t(this, T) !== null && t(this, T) > 0)
486
+ return t(this, T);
487
+ const e = t(this, W).get(".ng-container-body");
488
488
  if (!e || e.length === 0) return 24;
489
489
  const s = i.querySelector("tbody.bindable-tbody") || i.querySelector("tbody.bindable-tbody:last-of-type");
490
490
  if (!s) return 24;
491
491
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
492
- const o = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
492
+ const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
493
493
  e.forEach((b) => {
494
494
  r.appendChild(b.cloneNode(!0));
495
- }), o ? o.before(r) : s.appendChild(r);
496
- const n = t(this, w), l = n.style.display, h = n.style.visibility, d = n.style.position;
497
- (l === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
495
+ }), n ? n.before(r) : s.appendChild(r);
496
+ const o = t(this, w), l = o.style.display, d = o.style.visibility, h = o.style.position;
497
+ (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
498
498
  let f = 0;
499
499
  const u = s.querySelectorAll("tr:not(.nodata)");
500
500
  return u.forEach((b) => {
501
501
  f += b.offsetHeight || b.getBoundingClientRect().height;
502
- }), u.forEach((b) => b.remove()), n.style.display = l, n.style.visibility = h, n.style.position = d, g(this, q, f > 0 ? f : 24), t(this, dt).call(this), t(this, q);
502
+ }), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = d, o.style.position = h, g(this, T, f > 0 ? f : 24), t(this, dt).call(this), t(this, T);
503
503
  }, "#measureAndCacheHeight"));
504
504
  c(this, ht, /* @__PURE__ */ a(() => {
505
505
  if (!t(this, w).querySelector(".ng-container-body")) return;
506
- const s = (t(this, W).data.get() || []).length, o = t(this, q) || 24, r = s * o;
507
- _.log(`[VirtualHeight] totalCount: ${s}, rowHeight: ${o}, totalVirtualHeight: ${r}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
508
- const l = t(this, w).querySelector(n), h = l == null ? void 0 : l.querySelector("table");
509
- h && (h.style.height = `${r}px`);
506
+ const s = (t(this, M).data.get() || []).length, n = t(this, T) || 24, r = s * n;
507
+ z.log(`[VirtualHeight] totalCount: ${s}, rowHeight: ${n}, totalVirtualHeight: ${r}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
508
+ const l = t(this, w).querySelector(o), d = l == null ? void 0 : l.querySelector("table");
509
+ d && (d.style.height = `${r}px`);
510
510
  });
511
511
  }, "#updateVirtualScrollHeight"));
512
512
  c(this, dt, /* @__PURE__ */ a(() => {
513
- if ((t(this, W).data.get() || []).length, t(this, j) > 0 && t(this, q) > 0) {
514
- const e = Math.ceil(t(this, j) / t(this, q));
515
- g(this, P, e + t(this, Rt)), _.log("visibleRows:", e, "cachedRowCount:", t(this, P));
513
+ if ((t(this, M).data.get() || []).length, t(this, j) > 0 && t(this, T) > 0) {
514
+ const e = Math.ceil(t(this, j) / t(this, T));
515
+ g(this, P, e + t(this, Rt)), z.log("visibleRows:", e, "cachedRowCount:", t(this, P));
516
516
  }
517
517
  }, "#updateRowCount"));
518
- c(this, Tt, /* @__PURE__ */ a(() => {
519
- var h, d, f;
518
+ c(this, qt, /* @__PURE__ */ a(() => {
519
+ var d, h, f;
520
520
  const i = t(this, w).querySelector(".ng-container-left table"), e = t(this, w).querySelector(".ng-container-body table"), s = t(this, w).querySelector(".ng-container-right table");
521
521
  if (!e) return;
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
+ const n = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(n.length, r.length, o.length);
523
523
  for (let u = 0; u < l; u++) {
524
524
  const b = [
525
- ((h = o[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
526
- ((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
527
- ((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
525
+ ((d = n[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
526
+ ((h = r[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
527
+ ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
528
528
  ], y = Math.max(...b);
529
- y > 0 && (o[u] && (o[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), n[u] && (n[u].style.height = `${y}px`));
529
+ y > 0 && (n[u] && (n[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), o[u] && (o[u].style.height = `${y}px`));
530
530
  }
531
531
  }, "#syncRowHeights"));
532
532
  c(this, kt, /* @__PURE__ */ a(() => {
@@ -534,13 +534,13 @@ const le = class le {
534
534
  for (const e of i) {
535
535
  const s = e.target;
536
536
  if (!s.classList.contains("active")) continue;
537
- const o = e.contentRect.height;
538
- if (o > 0) {
537
+ const n = e.contentRect.height;
538
+ if (n > 0) {
539
539
  let r = 0;
540
- const n = s.querySelector("thead");
541
- n && (r += n.offsetHeight || n.getBoundingClientRect().height);
542
- const l = Math.max(o - r, 100);
543
- t(this, j) !== l && (g(this, j, l), t(this, dt).call(this), t(this, q) !== null && t(this, ft).call(this));
540
+ const o = s.querySelector("thead");
541
+ o && (r += o.offsetHeight || o.getBoundingClientRect().height);
542
+ const l = Math.max(n - r, 100);
543
+ t(this, j) !== l && (g(this, j, l), t(this, dt).call(this), t(this, T) !== null && t(this, ft).call(this));
544
544
  }
545
545
  }
546
546
  })), t(this, N).observe(t(this, w)));
@@ -549,72 +549,72 @@ const le = class le {
549
549
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
550
550
  const e = t(this, w).querySelector(i);
551
551
  e && e.querySelector("tbody.bindable-tbody") && t(this, At).call(this, e, i);
552
- }), t(this, Tt).call(this);
552
+ }), t(this, qt).call(this);
553
553
  }, "#renderAllContainers"));
554
554
  c(this, Lt, /* @__PURE__ */ a((i) => {
555
555
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
556
- var d;
556
+ var h;
557
557
  const s = t(this, w).querySelector(e);
558
558
  if (!s) return;
559
- const o = s.querySelector("tbody.bindable-tbody");
560
- if (!o) return;
561
- const r = Array.from(o.querySelectorAll("tr:not(.nodata)")), n = ((d = t(this, O).get(e)) == null ? void 0 : d.length) || 1, h = (t(this, W).data.get() || []).length;
559
+ const n = s.querySelector("tbody.bindable-tbody");
560
+ if (!n) return;
561
+ const r = Array.from(n.querySelectorAll("tr:not(.nodata)")), o = ((h = t(this, W).get(e)) == null ? void 0 : h.length) || 1, d = (t(this, M).data.get() || []).length;
562
562
  r.forEach((f, u) => {
563
- const b = i + Math.floor(u / n);
564
- if (b >= h) {
563
+ const b = i + Math.floor(u / o);
564
+ if (b >= d) {
565
565
  f.style.display = "none";
566
566
  return;
567
567
  }
568
- const y = t(this, W).data.get(b);
568
+ const y = t(this, M).data.get(b);
569
569
  f.style.display = "", t(this, ut).call(this, f, y, b);
570
570
  });
571
571
  });
572
572
  }, "#adjustBufferRows"));
573
573
  c(this, et, /* @__PURE__ */ a((i) => {
574
- var h;
575
- const e = t(this, q);
574
+ var d;
575
+ const e = t(this, T);
576
576
  if (!e || e <= 0) return;
577
- const o = (t(this, W).data.get() || []).length, r = Math.max(0, Math.floor(i / e)), n = ((h = t(this, O).get(".ng-container-body")) == null ? void 0 : h.length) || 1, l = r + t(this, P);
578
- _.log(`[Scroll] scrollTop: ${i}, startIndex: ${r}, cachedRowCount: ${t(this, P)}, targetDataIndex range: ${r} ~ ${l} (Total: ${o})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
579
- const f = t(this, w).querySelector(d);
577
+ const n = (t(this, M).data.get() || []).length, r = Math.max(0, Math.floor(i / e)), o = ((d = t(this, W).get(".ng-container-body")) == null ? void 0 : d.length) || 1, l = r + t(this, P);
578
+ z.log(`[Scroll] scrollTop: ${i}, startIndex: ${r}, cachedRowCount: ${t(this, P)}, targetDataIndex range: ${r} ~ ${l} (Total: ${n})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((h) => {
579
+ const f = t(this, w).querySelector(h);
580
580
  if (!f) return;
581
581
  const u = f.querySelector("tbody.bindable-tbody");
582
582
  if (!u) return;
583
583
  Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((y, m) => {
584
- const R = r + Math.floor(m / n);
585
- if (R >= o) {
584
+ const R = r + Math.floor(m / o);
585
+ if (R >= n) {
586
586
  y.style.display = "none";
587
587
  return;
588
588
  }
589
- const z = t(this, W).data.get(R);
590
- y.style.display = "", t(this, ut).call(this, y, z, R);
589
+ const O = t(this, M).data.get(R);
590
+ y.style.display = "", t(this, ut).call(this, y, O, R);
591
591
  });
592
592
  }), t(this, tt) || (g(this, tt, !0), setTimeout(() => {
593
593
  t(this, Lt).call(this, r), g(this, tt, !1);
594
594
  }, 0));
595
595
  }, "#handleScroll"));
596
596
  c(this, ut, /* @__PURE__ */ a((i, e, s) => {
597
- i.dataset.row = s, Array.from(i.cells).forEach((o, r) => {
598
- const n = o.dataset.bind;
599
- n && e && e[n] !== void 0 ? o.textContent = e[n] : o.textContent = e ? e[Object.keys(e)[r]] ?? `R${s}C${r}` : `ν–‰ ${s + 1}`, o.dataset.row = s;
597
+ i.dataset.row = s, Array.from(i.cells).forEach((n, r) => {
598
+ const o = n.dataset.bind;
599
+ o && e && e[o] !== void 0 ? n.textContent = e[o] : n.textContent = e ? e[Object.keys(e)[r]] ?? `R${s}C${r}` : `ν–‰ ${s + 1}`, n.dataset.row = s;
600
600
  });
601
601
  }, "#bindRowData"));
602
602
  v(this, "destroy", /* @__PURE__ */ a(() => {
603
603
  t(this, N) && (t(this, N).disconnect(), g(this, N, null));
604
604
  }, "destroy"));
605
- g(this, W, i.getRootNode().host), g(this, w, i), t(this, kt).call(this);
605
+ g(this, M, i.getRootNode().host), g(this, w, i), t(this, kt).call(this);
606
606
  }
607
607
  getRowHeight() {
608
- return t(this, q);
608
+ return t(this, T);
609
609
  }
610
610
  templateLength(i = ".ng-container-body") {
611
611
  var e;
612
- return ((e = t(this, O).get(i)) == null ? void 0 : e.length) || 1;
612
+ return ((e = t(this, W).get(i)) == null ? void 0 : e.length) || 1;
613
613
  }
614
614
  };
615
- W = new WeakMap(), w = new WeakMap(), O = new WeakMap(), q = new WeakMap(), N = new WeakMap(), j = new WeakMap(), P = new WeakMap(), tt = new WeakMap(), Rt = new WeakMap(), At = new WeakMap(), qt = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), ft = new WeakMap(), Lt = new WeakMap(), et = new WeakMap(), ut = new WeakMap(), a(le, "RowManager");
615
+ M = new WeakMap(), w = new WeakMap(), W = new WeakMap(), T = new WeakMap(), N = new WeakMap(), j = new WeakMap(), P = new WeakMap(), tt = new WeakMap(), Rt = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), qt = new WeakMap(), kt = new WeakMap(), ft = new WeakMap(), Lt = new WeakMap(), et = new WeakMap(), ut = new WeakMap(), a(le, "RowManager");
616
616
  let Zt = le;
617
- var Ht, it, K, Ct, _t, $t, Mt, It;
617
+ var Ht, it, K, Ct, _t, $t, It, Mt;
618
618
  const lt = class lt extends HTMLElement {
619
619
  constructor() {
620
620
  super();
@@ -633,28 +633,28 @@ const lt = class lt extends HTMLElement {
633
633
  { selector: ".ng-container-body", type: null },
634
634
  { selector: ".ng-container-left", type: "left" },
635
635
  { selector: ".ng-container-right", type: "right" }
636
- ].forEach(({ selector: s, type: o }) => {
636
+ ].forEach(({ selector: s, type: n }) => {
637
637
  const r = this.querySelector(s);
638
638
  if (!r) return;
639
- const n = t(this, $t).call(this, t(this, it), o);
640
- r.innerHTML = "", r.appendChild(n);
639
+ const o = t(this, $t).call(this, t(this, it), n);
640
+ r.innerHTML = "", r.appendChild(o);
641
641
  });
642
642
  }, "#renderSplitContainers"));
643
643
  c(this, _t, /* @__PURE__ */ a(() => {
644
644
  ["left", "right"].forEach((e) => {
645
- const s = this.querySelector(`.ng-container-${e}`), o = s == null ? void 0 : s.querySelector("table");
646
- if (!s || !o) return;
645
+ const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
646
+ if (!s || !n) return;
647
647
  let r = 0;
648
- o.querySelectorAll("col").forEach((n) => {
649
- const l = parseInt(n.getAttribute("width"), 10);
648
+ n.querySelectorAll("col").forEach((o) => {
649
+ const l = parseInt(o.getAttribute("width"), 10);
650
650
  isNaN(r) || (r += l);
651
651
  }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
652
652
  });
653
653
  }, "#updateContainerWidths"));
654
654
  v(this, "generate", /* @__PURE__ */ a((e) => {
655
655
  e && (g(this, it, Kt.compile(e)), t(this, it).style.display = "table", t(this, Ct).call(this), t(this, _t).call(this), requestAnimationFrame(() => {
656
- var o;
657
- const s = (o = this.querySelector("thead")) == null ? void 0 : o.getBoundingClientRect().height;
656
+ var n;
657
+ const s = (n = this.querySelector("thead")) == null ? void 0 : n.getBoundingClientRect().height;
658
658
  this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
659
659
  r.style.top = `${s}px`;
660
660
  });
@@ -667,18 +667,18 @@ const lt = class lt extends HTMLElement {
667
667
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
668
668
  */
669
669
  c(this, $t, /* @__PURE__ */ a((e, s) => {
670
- const o = e.cloneNode(!0), r = o.querySelector("tbody");
670
+ const n = e.cloneNode(!0), r = n.querySelector("tbody");
671
671
  if (r) {
672
- const n = document.createElement("tbody");
673
- n.className = "fixed-tbody", r.className = "bindable-tbody", r.before(n);
672
+ const o = document.createElement("tbody");
673
+ o.className = "fixed-tbody", r.className = "bindable-tbody", r.before(o);
674
674
  }
675
- return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
676
- n.getAttribute("fixed") !== "left" && n.remove();
677
- }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
678
- n.getAttribute("fixed") !== "right" && n.remove();
679
- }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((n) => {
680
- n.remove();
681
- }), o;
675
+ return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
676
+ o.getAttribute("fixed") !== "left" && o.remove();
677
+ }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
678
+ o.getAttribute("fixed") !== "right" && o.remove();
679
+ }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((o) => {
680
+ o.remove();
681
+ }), n;
682
682
  }, "#createSplitTable"));
683
683
  v(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, K).getRowHeight(), "getRowHeight"));
684
684
  v(this, "scrollToX", /* @__PURE__ */ a((e) => {
@@ -689,10 +689,10 @@ const lt = class lt extends HTMLElement {
689
689
  const s = this.querySelector(".ng-container-body");
690
690
  s && (s.scrollTop = e);
691
691
  }, "scrollToY"));
692
- c(this, Mt, /* @__PURE__ */ a(() => {
693
- t(this, It).call(this);
694
- }, "#init"));
695
692
  c(this, It, /* @__PURE__ */ a(() => {
693
+ t(this, Mt).call(this);
694
+ }, "#init"));
695
+ c(this, Mt, /* @__PURE__ */ a(() => {
696
696
  const e = lt.SCROLLBAR_SIZE;
697
697
  this.innerHTML = `
698
698
  <style>
@@ -842,13 +842,13 @@ const lt = class lt extends HTMLElement {
842
842
  g(this, K, new Zt(this)), g(this, Ht, this.getRootNode().host);
843
843
  }
844
844
  connectedCallback() {
845
- t(this, Mt).call(this);
845
+ t(this, It).call(this);
846
846
  }
847
847
  disconnectedCallback() {
848
- this.innerHTML = "", _.log("NineTableSheet destroyed.");
848
+ this.innerHTML = "", z.log("NineTableSheet destroyed.");
849
849
  }
850
850
  };
851
- Ht = new WeakMap(), it = new WeakMap(), K = new WeakMap(), Ct = new WeakMap(), _t = new WeakMap(), $t = new WeakMap(), Mt = new WeakMap(), It = new WeakMap(), a(lt, "NineTableSheet"), v(lt, "SCROLLBAR_SIZE", 16);
851
+ Ht = new WeakMap(), it = new WeakMap(), K = new WeakMap(), Ct = new WeakMap(), _t = new WeakMap(), $t = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), a(lt, "NineTableSheet"), v(lt, "SCROLLBAR_SIZE", 16);
852
852
  let xt = lt;
853
853
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", xt);
854
854
  var Wt, gt;
@@ -858,26 +858,26 @@ const ae = class ae extends HTMLElement {
858
858
  c(this, Wt, /* @__PURE__ */ a(() => {
859
859
  var e;
860
860
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
861
- var n;
862
- const o = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((n = s.target.closest(".nine-tab-item")) == null ? void 0 : n.dataset.index, 10);
863
- t(this, gt).call(this, r, o);
861
+ var o;
862
+ const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
863
+ t(this, gt).call(this, r, n);
864
864
  }), t(this, gt).call(this, 0, !1);
865
865
  }, "#init"));
866
866
  c(this, gt, /* @__PURE__ */ a((e, s = !1) => {
867
- const o = /* @__PURE__ */ a(() => {
867
+ const n = /* @__PURE__ */ a(() => {
868
868
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
869
869
  Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
870
870
  const b = f.filter((y) => y.classList.contains("active"));
871
871
  b.length < 2 || b.forEach((y) => {
872
- const m = parseInt(y.getAttribute("data-index"), 10), R = this.querySelector(`nine-splitter[data-split-index="${m}"]`), z = f[m + 1];
873
- R && z && z.classList.contains("active") && R.style.setProperty("display", "flex");
872
+ const m = parseInt(y.getAttribute("data-index"), 10), R = this.querySelector(`nine-splitter[data-split-index="${m}"]`), O = f[m + 1];
873
+ R && O && O.classList.contains("active") && R.style.setProperty("display", "flex");
874
874
  });
875
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), h = n.querySelectorAll("nine-table-sheet");
875
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), d = o.querySelectorAll("nine-table-sheet");
876
876
  if (!l[e]) return;
877
877
  if (!s)
878
878
  l.forEach((f, u) => {
879
879
  f.classList.toggle("active", u === e);
880
- }), h.forEach((f, u) => {
880
+ }), d.forEach((f, u) => {
881
881
  const b = u === e;
882
882
  f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
883
883
  });
@@ -886,13 +886,13 @@ const ae = class ae extends HTMLElement {
886
886
  if (f.classList.contains("active") && u.length <= 1)
887
887
  return;
888
888
  f.classList.toggle("active");
889
- const b = n.querySelector(`nine-table-sheet[data-index="${e}"]`);
889
+ const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
890
890
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
891
891
  }
892
- const d = n.querySelectorAll("nine-table-sheet.active");
893
- d == null || d.forEach((f) => {
894
- f.style.flex = d.length > 1 ? "1 1 0%" : "1 1 100%";
895
- }), o();
892
+ const h = o.querySelectorAll("nine-table-sheet.active");
893
+ h == null || h.forEach((f) => {
894
+ f.style.flex = h.length > 1 ? "1 1 0%" : "1 1 100%";
895
+ }), n();
896
896
  }, "#switchSheet"));
897
897
  }
898
898
  connectedCallback() {
@@ -902,29 +902,29 @@ const ae = class ae extends HTMLElement {
902
902
  Wt = new WeakMap(), gt = new WeakMap(), a(ae, "NineTableSheets");
903
903
  let Gt = ae;
904
904
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Gt);
905
- var T, Ot, bt, zt;
905
+ var q, Ot, bt, zt;
906
906
  const ce = class ce {
907
907
  constructor(i) {
908
- c(this, T);
908
+ c(this, q);
909
909
  c(this, Ot, /* @__PURE__ */ a(() => {
910
910
  t(this, zt).call(this), new ResizeObserver((i) => {
911
911
  for (let e of i)
912
- t(this, T).getAttribute("auto-height") === "true" && t(this, bt).call(this);
913
- }).observe(t(this, T));
912
+ t(this, q).getAttribute("auto-height") === "true" && t(this, bt).call(this);
913
+ }).observe(t(this, q));
914
914
  }, "#init"));
915
915
  c(this, bt, /* @__PURE__ */ a(() => {
916
- var h, d;
917
- const i = Array.from(t(this, T).shadowRoot.querySelectorAll("nine-table-sheet.active"));
916
+ var d, h;
917
+ const i = Array.from(t(this, q).shadowRoot.querySelectorAll("nine-table-sheet.active"));
918
918
  if (i.length === 0) return;
919
- const e = parseInt(t(this, T).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), o = (h = t(this, T).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, r = (d = t(this, T).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, n = xt.SCROLLBAR_SIZE, l = e * s + o + r + n;
920
- t(this, T).style.height = `${l}px`;
919
+ const e = parseInt(t(this, q).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), n = (d = t(this, q).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (h = t(this, q).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : h.getBoundingClientRect().height, o = xt.SCROLLBAR_SIZE, l = e * s + n + r + o;
920
+ t(this, q).style.height = `${l}px`;
921
921
  }, "#applyAutoHeight"));
922
922
  c(this, zt, /* @__PURE__ */ a(() => {
923
- const e = Array.from(t(this, T).children).filter((h) => h.tagName === "TABLE"), s = t(this, T).getAttribute("auto-height") === "true", o = e.length, r = e.map((h, d) => {
924
- const u = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, b = d < o - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
923
+ const e = Array.from(t(this, q).children).filter((d) => d.tagName === "TABLE"), s = t(this, q).getAttribute("auto-height") === "true", n = e.length, r = e.map((d, h) => {
924
+ const u = `<nine-table-sheet class="${h === 0 ? "active" : ""}" data-index="${h}"></nine-table-sheet>`, b = h < n - 1 ? `<nine-splitter class="h" data-split-index="${h}"></nine-splitter>` : "";
925
925
  return u + b;
926
- }).join(""), n = e.map((h, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
927
- t(this, T).shadowRoot.innerHTML = `
926
+ }).join(""), o = e.map((d, h) => `<div class="nine-tab-item ${h === 0 ? "active" : ""}" data-index="${h}">Sheet ${h + 1}</div>`).join("");
927
+ t(this, q).shadowRoot.innerHTML = `
928
928
  <style>
929
929
  :host {
930
930
  display: flex;
@@ -1007,7 +1007,7 @@ const ce = class ce {
1007
1007
  <nine-table-sheets>
1008
1008
  <nine-table-sheets-body>${r}</nine-table-sheets-body>
1009
1009
  <nine-table-sheets-footer>
1010
- <div class="nine-tab-bar">${n}</div>
1010
+ <div class="nine-tab-bar">${o}</div>
1011
1011
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1012
1012
  </nine-table-sheets-footer>
1013
1013
  </nine-table-sheets>
@@ -1015,17 +1015,17 @@ const ce = class ce {
1015
1015
  </nine-table-body>
1016
1016
  <nine-table-footer></nine-table-footer>
1017
1017
  `;
1018
- const l = t(this, T).shadowRoot.querySelectorAll("nine-table-sheet");
1019
- l == null || l.forEach((h, d) => {
1020
- e[d] && setTimeout(() => {
1021
- h.generate(e[d]), s && t(this, bt).call(this);
1018
+ const l = t(this, q).shadowRoot.querySelectorAll("nine-table-sheet");
1019
+ l == null || l.forEach((d, h) => {
1020
+ e[h] && setTimeout(() => {
1021
+ d.generate(e[h]), s && t(this, bt).call(this);
1022
1022
  });
1023
1023
  });
1024
1024
  }, "#render"));
1025
- g(this, T, i), t(this, Ot).call(this);
1025
+ g(this, q, i), t(this, Ot).call(this);
1026
1026
  }
1027
1027
  };
1028
- T = new WeakMap(), Ot = new WeakMap(), bt = new WeakMap(), zt = new WeakMap(), a(ce, "LayoutManager");
1028
+ q = new WeakMap(), Ot = new WeakMap(), bt = new WeakMap(), zt = new WeakMap(), a(ce, "LayoutManager");
1029
1029
  let Jt = ce;
1030
1030
  var yt, st;
1031
1031
  const he = class he {
@@ -1075,10 +1075,10 @@ const C = class C {
1075
1075
  if (!s || s.length <= 0) return;
1076
1076
  if (i == null) return t(this, ot).call(this, s);
1077
1077
  if (i < 0 || i >= s.length) return null;
1078
- const o = typeof ((r = t(this, k).fields) == null ? void 0 : r.get) == "function" ? t(this, k).fields.get() : [];
1078
+ const n = typeof ((r = t(this, k).fields) == null ? void 0 : r.get) == "function" ? t(this, k).fields.get() : [];
1079
1079
  if (e != null) {
1080
- const n = o.indexOf(e);
1081
- return n >= 0 ? s[i].v[n] : null;
1080
+ const o = n.indexOf(e);
1081
+ return o >= 0 ? s[i].v[o] : null;
1082
1082
  }
1083
1083
  return t(this, ot).call(this, s[i]);
1084
1084
  }, "get"));
@@ -1102,14 +1102,14 @@ const C = class C {
1102
1102
  t(this, E).rawRecords = [], g(this, H, []), g(this, nt, []), (i = t(this, E).viewRecords) != null && i.reset && t(this, E).viewRecords.reset();
1103
1103
  }, "clear"));
1104
1104
  c(this, Nt, /* @__PURE__ */ a((i) => {
1105
- var o;
1105
+ var n;
1106
1106
  Array.isArray(i) || (i = [i]);
1107
- const e = typeof ((o = t(this, k).fields) == null ? void 0 : o.get) == "function" ? t(this, k).fields.get() : Object.keys(i[0] || {}), s = [];
1107
+ const e = typeof ((n = t(this, k).fields) == null ? void 0 : n.get) == "function" ? t(this, k).fields.get() : Object.keys(i[0] || {}), s = [];
1108
1108
  return i.forEach((r) => {
1109
- const n = { v: [] };
1109
+ const o = { v: [] };
1110
1110
  e.forEach((l) => {
1111
- n.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1112
- }), s.push(n);
1111
+ o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1112
+ }), s.push(o);
1113
1113
  }), s;
1114
1114
  }, "#json2Array"));
1115
1115
  c(this, Pt, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
@@ -1119,32 +1119,32 @@ const C = class C {
1119
1119
  i === void 0 && (i = {});
1120
1120
  const s = t(this, Nt).call(this, i);
1121
1121
  t(this, E).rawRecords = t(this, E).rawRecords.concat(t(this, Pt).call(this, s)), this.resetRecords();
1122
- const o = this.count() - 1;
1123
- return e || s.forEach((r, n) => {
1124
- const l = t(this, E).rawRecords[o - n];
1122
+ const n = this.count() - 1;
1123
+ return e || s.forEach((r, o) => {
1124
+ const l = t(this, E).rawRecords[n - o];
1125
1125
  l && (l.__ng.rowState = C.ROW_STATE.EMPTY);
1126
- }), t(this, Z).call(this), o;
1126
+ }), t(this, Z).call(this), n;
1127
1127
  }, "add"));
1128
1128
  v(this, "delete", /* @__PURE__ */ a((i) => {
1129
1129
  let e = [];
1130
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, E).host.row.at] : e = [parseInt(i, 10)], e.sort((s, o) => o - s).forEach((s) => {
1130
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, E).host.row.at] : e = [parseInt(i, 10)], e.sort((s, n) => n - s).forEach((s) => {
1131
1131
  if (t(this, H)[s]) {
1132
- const o = t(this, H)[s].__ng.rowid;
1133
- t(this, H)[s].__ng.rowState === C.ROW_STATE.INSERT ? t(this, E).rawRecords = t(this, E).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, E).rawRecords.forEach((r) => {
1134
- r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = C.ROW_STATE.DELETE);
1132
+ const n = t(this, H)[s].__ng.rowid;
1133
+ t(this, H)[s].__ng.rowState === C.ROW_STATE.INSERT ? t(this, E).rawRecords = t(this, E).rawRecords.filter((r) => r.__ng.rowid !== n) : t(this, E).rawRecords.forEach((r) => {
1134
+ r.__ng.rowid === n && (r.__ng.deleted = !0, r.__ng.rowState = C.ROW_STATE.DELETE);
1135
1135
  });
1136
1136
  }
1137
1137
  }), this.resetRecords(), t(this, Z).call(this);
1138
1138
  }, "delete"));
1139
1139
  v(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
1140
- var h;
1140
+ var d;
1141
1141
  i = parseInt(i, 10);
1142
- const r = (typeof ((h = t(this, k).fields) == null ? void 0 : h.get) == "function" ? t(this, k).fields.get() : []).indexOf(e);
1142
+ const r = (typeof ((d = t(this, k).fields) == null ? void 0 : d.get) == "function" ? t(this, k).fields.get() : []).indexOf(e);
1143
1143
  if (r < 0) return;
1144
- const n = this.getValidData()[i];
1145
- if (!n) return;
1146
- const l = n.v[r];
1147
- l !== s && n.__ng.rowState !== C.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = l), n.__ng.rowState = C.ROW_STATE.UPDATE), n.v[r] = s;
1144
+ const o = this.getValidData()[i];
1145
+ if (!o) return;
1146
+ const l = o.v[r];
1147
+ l !== s && o.__ng.rowState !== C.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = C.ROW_STATE.UPDATE), o.v[r] = s;
1148
1148
  }, "setValue"));
1149
1149
  v(this, "resetRecords", /* @__PURE__ */ a(() => {
1150
1150
  g(this, nt, t(this, E).rawRecords.filter((i) => !i.__ng.deleted)), g(this, H, t(this, E).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, E).rawRecords.forEach((i, e) => {
@@ -1155,13 +1155,13 @@ const C = class C {
1155
1155
  }, "resetRecords"));
1156
1156
  v(this, "getValidData", /* @__PURE__ */ a(() => (t(this, H).length === 0 && t(this, E).rawRecords.length > 0 && this.resetRecords(), t(this, H)), "getValidData"));
1157
1157
  c(this, ot, /* @__PURE__ */ a((i) => {
1158
- var n;
1158
+ var o;
1159
1159
  if (!i) return i;
1160
- const e = !Array.isArray(i), s = e ? [i] : i, o = typeof ((n = t(this, k).fields) == null ? void 0 : n.get) == "function" ? t(this, k).fields.get() : [], r = s.filter((l) => !l.__ng.deleted).map((l) => {
1161
- const h = {};
1162
- return o.forEach((d, f) => {
1163
- h[d] = l.v ? l.v[f] : l[d];
1164
- }), h.__ng = l.__ng, h;
1160
+ const e = !Array.isArray(i), s = e ? [i] : i, n = typeof ((o = t(this, k).fields) == null ? void 0 : o.get) == "function" ? t(this, k).fields.get() : [], r = s.filter((l) => !l.__ng.deleted).map((l) => {
1161
+ const d = {};
1162
+ return n.forEach((h, f) => {
1163
+ d[h] = l.v ? l.v[f] : l[h];
1164
+ }), d.__ng = l.__ng, d;
1165
1165
  });
1166
1166
  return e ? r[0] : r;
1167
1167
  }, "#conv"));
@@ -1203,14 +1203,14 @@ const de = class de {
1203
1203
  }, this.setDataSource = (e) => {
1204
1204
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1205
1205
  }, this.getRowState = (e) => {
1206
- var o, r;
1206
+ var n, r;
1207
1207
  const s = parseInt(e, 10);
1208
1208
  if (!(s >= this.data.count()))
1209
- return (r = (o = this.data.getValidData()[s]) == null ? void 0 : o.__ng) == null ? void 0 : r.rowState;
1209
+ return (r = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : r.rowState;
1210
1210
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1211
1211
  this.row.at = e;
1212
- }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, o) => {
1213
- e = parseInt(e, 10), this.data.setValue(e, s, o);
1212
+ }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, n) => {
1213
+ e = parseInt(e, 10), this.data.setValue(e, s, n);
1214
1214
  }, this.setDataSource([]);
1215
1215
  }
1216
1216
  };
@@ -1224,7 +1224,7 @@ const fe = class fe {
1224
1224
  c(this, A, []);
1225
1225
  v(this, "add", /* @__PURE__ */ a((i, e = "string") => {
1226
1226
  i.forEach((s) => {
1227
- t(this, A).some((o) => o.name === s) || t(this, A).push({ name: s, type: e });
1227
+ t(this, A).some((n) => n.name === s) || t(this, A).push({ name: s, type: e });
1228
1228
  }), t(this, mt).call(this);
1229
1229
  }, "add"));
1230
1230
  c(this, mt, /* @__PURE__ */ a(() => {
@@ -1234,30 +1234,30 @@ const fe = class fe {
1234
1234
  }), g(this, A, Array.from(i, ([e, s]) => ({ name: e, type: s }))), g(this, A, t(this, A).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, A).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1235
1235
  }, "#adjust"));
1236
1236
  c(this, Vt, /* @__PURE__ */ a(() => {
1237
- g(this, A, []), _.log(t(this, rt).querySelectorAll("table"));
1237
+ g(this, A, []), z.log(t(this, rt).querySelectorAll("table"));
1238
1238
  const i = Array.from(t(this, rt).querySelectorAll("table"));
1239
1239
  if (!(!i || i.length === 0)) {
1240
1240
  for (const e of i)
1241
- _.log(e), $("[data-bind]", e).each((s, o) => {
1242
- const r = o.dataset.bind, n = o.getAttribute("data-type") || "string";
1243
- r && t(this, A).push({ name: r, type: n });
1241
+ z.log(e), $("[data-bind]", e).each((s, n) => {
1242
+ const r = n.dataset.bind, o = n.getAttribute("data-type") || "string";
1243
+ r && t(this, A).push({ name: r, type: o });
1244
1244
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1245
- $(`[${s}]`, e).each((o, r) => {
1246
- var n = r.getAttribute(s);
1247
- if (n.indexOf("data.") < 0) {
1248
- const l = n.search(/[(]/g);
1245
+ $(`[${s}]`, e).each((n, r) => {
1246
+ var o = r.getAttribute(s);
1247
+ if (o.indexOf("data.") < 0) {
1248
+ const l = o.search(/[(]/g);
1249
1249
  if (l > 0)
1250
1250
  try {
1251
- n = String(window[n.substring(0, l).trim()]);
1251
+ o = String(window[o.substring(0, l).trim()]);
1252
1252
  } catch {
1253
- n = "";
1253
+ o = "";
1254
1254
  }
1255
1255
  }
1256
- n.split("data.").forEach((l) => {
1256
+ o.split("data.").forEach((l) => {
1257
1257
  if (l.trim() != "") {
1258
- const h = l.search(/[^_A-Za-z0-9]/g);
1259
- let d = "";
1260
- h >= 0 ? d = l.substring(0, h) : n.startsWith("data.") && (d = l.replace("data.", "")), d && t(this, A).push({ name: d, type: "string" });
1258
+ const d = l.search(/[^_A-Za-z0-9]/g);
1259
+ let h = "";
1260
+ d >= 0 ? h = l.substring(0, d) : o.startsWith("data.") && (h = l.replace("data.", "")), h && t(this, A).push({ name: h, type: "string" });
1261
1261
  }
1262
1262
  });
1263
1263
  });
@@ -1297,7 +1297,7 @@ const ue = class ue extends HTMLElement {
1297
1297
  c(this, J);
1298
1298
  c(this, Yt);
1299
1299
  c(this, Xt, /* @__PURE__ */ a(() => {
1300
- this.fields = new ie(this), g(this, Yt, new Jt(this)), _.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1300
+ this.fields = new ie(this), g(this, Yt, new Jt(this)), z.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1301
1301
  }, "#init"));
1302
1302
  this.attachShadow({ mode: "open" }), g(this, J, new ee(this));
1303
1303
  }
@@ -1305,7 +1305,7 @@ const ue = class ue extends HTMLElement {
1305
1305
  t(this, Xt).call(this);
1306
1306
  }
1307
1307
  disconnectedCallback() {
1308
- _.log("NineTable disconnected.");
1308
+ z.log("NineTable disconnected.");
1309
1309
  }
1310
1310
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1311
1311
  get data() {