@ninebone/table 0.0.296 β†’ 0.0.298

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.
@@ -3,7 +3,7 @@ var te = (m) => {
3
3
  throw TypeError(m);
4
4
  };
5
5
  var se = (m, i, e) => i in m ? Qt(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e;
6
- var c = (m, i) => Qt(m, "name", { value: i, configurable: !0 });
6
+ var a = (m, i) => Qt(m, "name", { value: i, configurable: !0 });
7
7
  var S = (m, i, e) => se(m, typeof i != "symbol" ? i + "" : i, e), ee = (m, i, e) => i.has(m) || te("Cannot " + e);
8
8
  var t = (m, i, e) => (ee(m, i, "read from private field"), e ? e.call(m) : i.get(m)), h = (m, i, e) => i.has(m) ? te("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, e), b = (m, i, e, s) => (ee(m, i, "write to private field"), s ? s.call(m, e) : i.set(m, e), e);
9
9
  var ie = (m, i, e, s) => ({
@@ -20,10 +20,10 @@ const Vt = class Vt extends ne.constructor {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- c(Vt, "Trace");
23
+ a(Vt, "Trace");
24
24
  let Mt = Vt;
25
25
  const _ = new Mt();
26
- var H, I, p, D, P, B, at, N, ht;
26
+ var H, I, p, D, P, B, ct, N, ht;
27
27
  const Yt = class Yt extends HTMLElement {
28
28
  constructor() {
29
29
  super();
@@ -33,19 +33,19 @@ const Yt = class Yt extends HTMLElement {
33
33
  h(this, D);
34
34
  h(this, P);
35
35
  h(this, B);
36
- h(this, at, /* @__PURE__ */ c(() => {
36
+ h(this, ct, /* @__PURE__ */ a(() => {
37
37
  if (!t(this, H)) return;
38
38
  const e = t(this, H).querySelector(".ng-container-body");
39
39
  e && (b(this, B, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, B).observe(e));
42
42
  }, "#observeResize"));
43
- S(this, "refresh", /* @__PURE__ */ c(() => {
43
+ S(this, "refresh", /* @__PURE__ */ a(() => {
44
44
  if (!t(this, H) || !t(this, p) || t(this, I)) return;
45
45
  const e = t(this, p).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const n = t(this, p).track, o = t(this, p).thumb, r = t(this, H).querySelector(".ng-container-bottom"), l = e.clientWidth, a = s.scrollWidth;
48
- if (l !== 0 && a > l)
47
+ const n = t(this, p).track, o = t(this, p).thumb, r = t(this, H).querySelector(".ng-container-bottom"), l = e.clientWidth, c = s.scrollWidth;
48
+ if (l !== 0 && c > l)
49
49
  r && (r.style.display = "flex");
50
50
  else {
51
51
  r && (r.style.display = "none");
@@ -53,28 +53,28 @@ const Yt = class Yt extends HTMLElement {
53
53
  }
54
54
  const d = n.clientWidth;
55
55
  if (d <= 0) return;
56
- const u = Math.max(Math.min(d * (l / a), d), 20);
56
+ const u = Math.max(Math.min(d * (l / c), d), 20);
57
57
  o.style.width = `${u}px`;
58
- const f = e.scrollLeft, g = a - l;
58
+ const f = e.scrollLeft, g = c - l;
59
59
  let y = 0;
60
60
  g > 0 && (y = parseInt(f / g * (d - u), 10)), y < 0 && (y = 0);
61
61
  const w = d - u;
62
62
  y > w && (y = w), o.style.left = `${y}px`, _.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= w - 1;
63
63
  }, "refresh"));
64
- h(this, N, /* @__PURE__ */ c((e) => {
64
+ h(this, N, /* @__PURE__ */ a((e) => {
65
65
  if (!t(this, p)) return !1;
66
66
  const s = t(this, p).container, n = s.querySelector("table");
67
67
  if (!n) return !1;
68
68
  const o = t(this, p).track.getBoundingClientRect(), r = t(this, p).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
- const a = o.width - r;
72
- l > a && (l = a), 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 >= a - 1;
71
+ const c = o.width - r;
72
+ l > c && (l = c), 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 >= c - 1;
73
73
  const d = s.clientWidth, f = n.scrollWidth - d;
74
- return a > 0 && f > 0 && (s.scrollLeft = l / a * f), l > 0 && l < a - 1;
74
+ return c > 0 && f > 0 && (s.scrollLeft = l / c * f), l > 0 && l < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- h(this, ht, /* @__PURE__ */ c(() => {
77
- const e = /* @__PURE__ */ c((n) => {
76
+ h(this, ht, /* @__PURE__ */ a(() => {
77
+ const e = /* @__PURE__ */ a((n) => {
78
78
  clearInterval(t(this, D)), clearInterval(t(this, P));
79
79
  const o = parseInt(t(this, p).thumb.style.left || 0, 10);
80
80
  t(this, N).call(this, o + n), b(this, D, setInterval(() => {
@@ -83,7 +83,7 @@ const Yt = class Yt extends HTMLElement {
83
83
  t(this, N).call(this, r + n) || clearInterval(t(this, P));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), s = /* @__PURE__ */ c(() => {
86
+ }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
87
  clearInterval(t(this, D)), clearInterval(t(this, P));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((n) => {
@@ -100,11 +100,11 @@ const Yt = class Yt extends HTMLElement {
100
100
  }), t(this, p).thumb.addEventListener("mousedown", (n) => {
101
101
  if (n.button !== 0) return;
102
102
  n.stopPropagation(), n.preventDefault(), b(this, I, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
- const o = /* @__PURE__ */ c((l) => {
103
+ const o = /* @__PURE__ */ a((l) => {
104
104
  if (!t(this, I)) return;
105
- const a = t(this, p).track.getBoundingClientRect();
106
- t(this, N).call(this, l.clientX - a.left - this.shiftX);
107
- }, "onMouseMove"), r = /* @__PURE__ */ c(() => {
105
+ const c = t(this, p).track.getBoundingClientRect();
106
+ t(this, N).call(this, l.clientX - c.left - this.shiftX);
107
+ }, "onMouseMove"), r = /* @__PURE__ */ a(() => {
108
108
  b(this, I, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
@@ -176,7 +176,7 @@ const Yt = class Yt extends HTMLElement {
176
176
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
- const e = /* @__PURE__ */ c(() => {
179
+ const e = /* @__PURE__ */ a(() => {
180
180
  const s = t(this, H).querySelector(".ng-container-body");
181
181
  if (!s) {
182
182
  setTimeout(e, 10);
@@ -190,7 +190,7 @@ const Yt = class Yt extends HTMLElement {
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
192
  t(this, I) || this.refresh();
193
- }), t(this, ht).call(this), t(this, at).call(this), this.refresh();
193
+ }), t(this, ht).call(this), t(this, ct).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
@@ -198,7 +198,7 @@ const Yt = class Yt extends HTMLElement {
198
198
  t(this, B) && t(this, B).disconnect();
199
199
  }
200
200
  };
201
- H = new WeakMap(), I = new WeakMap(), p = new WeakMap(), D = new WeakMap(), P = new WeakMap(), B = new WeakMap(), at = new WeakMap(), N = new WeakMap(), ht = new WeakMap(), c(Yt, "NineTableHScrollBar");
201
+ H = new WeakMap(), I = new WeakMap(), p = new WeakMap(), D = new WeakMap(), P = new WeakMap(), B = new WeakMap(), ct = new WeakMap(), N = new WeakMap(), ht = new WeakMap(), a(Yt, "NineTableHScrollBar");
202
202
  let _t = Yt;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", _t);
204
204
  var V, $, E, Q, tt, dt;
@@ -213,7 +213,7 @@ const Xt = class Xt extends HTMLElement {
213
213
  /**
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
- S(this, "refresh", /* @__PURE__ */ c(() => {
216
+ S(this, "refresh", /* @__PURE__ */ a(() => {
217
217
  if (!t(this, V) || !t(this, E) || t(this, $)) return;
218
218
  const e = t(this, E).container, s = e.querySelector("table");
219
219
  if (!s) return;
@@ -223,40 +223,40 @@ const Xt = class Xt extends HTMLElement {
223
223
  return;
224
224
  } else
225
225
  o.style.display = "block";
226
- const a = n.clientHeight;
227
- if (a <= 0) return;
228
- const d = Math.max(Math.min(a * (r / l), a), 20);
226
+ const c = n.clientHeight;
227
+ if (c <= 0) return;
228
+ const d = Math.max(Math.min(c * (r / l), c), 20);
229
229
  o.style.height = `${d}px`;
230
230
  const u = e.scrollTop, f = l - r;
231
231
  let g = 0;
232
- f > 0 && (g = u / f * (a - d));
233
- const y = a - d;
232
+ f > 0 && (g = u / f * (c - d));
233
+ const y = c - d;
234
234
  g < 0 && (g = 0), g > y && (g = y), o.style.top = `${g}px`, t(this, E).top.disabled = u <= 0, t(this, E).bottom.disabled = u >= f - 1;
235
235
  }, "refresh"));
236
- h(this, dt, /* @__PURE__ */ c(() => {
236
+ h(this, dt, /* @__PURE__ */ a(() => {
237
237
  const e = t(this, E).container;
238
238
  e.addEventListener("scroll", () => {
239
239
  t(this, $) || this.refresh();
240
240
  }), t(this, E).thumb.addEventListener("mousedown", (s) => {
241
241
  if (s.button !== 0) return;
242
242
  s.stopPropagation(), s.preventDefault(), b(this, $, !0), b(this, Q, s.clientY), b(this, tt, e.scrollTop);
243
- const n = /* @__PURE__ */ c((r) => {
243
+ const n = /* @__PURE__ */ a((r) => {
244
244
  if (!t(this, $)) return;
245
- const l = t(this, E).track.getBoundingClientRect(), a = t(this, E).thumb.clientHeight, u = l.height - a, f = r.clientY - t(this, Q), g = e.clientHeight, w = table.scrollHeight - g;
245
+ const l = t(this, E).track.getBoundingClientRect(), c = t(this, E).thumb.clientHeight, u = l.height - c, f = r.clientY - t(this, Q), g = e.clientHeight, w = table.scrollHeight - g;
246
246
  if (u > 0 && w > 0) {
247
247
  const L = f / u * w;
248
248
  e.scrollTop = t(this, tt) + L;
249
249
  }
250
250
  this.refresh();
251
- }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
251
+ }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
252
252
  b(this, $, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
253
253
  }, "onMouseUp");
254
254
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
255
255
  }), t(this, E).track.addEventListener("mousedown", (s) => {
256
256
  if (s.button !== 0 || s.target === t(this, E).thumb) return;
257
- const n = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientHeight, r = s.clientY - n.top - o / 2, a = n.height - o, d = e.clientHeight, f = e.querySelector("table").scrollHeight - d;
258
- if (a > 0 && f > 0) {
259
- const g = Math.max(0, Math.min(1, r / a));
257
+ const n = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientHeight, r = s.clientY - n.top - o / 2, c = n.height - o, d = e.clientHeight, f = e.querySelector("table").scrollHeight - d;
258
+ if (c > 0 && f > 0) {
259
+ const g = Math.max(0, Math.min(1, r / c));
260
260
  e.scrollTop = g * f;
261
261
  }
262
262
  this.refresh();
@@ -332,7 +332,7 @@ const Xt = class Xt extends HTMLElement {
332
332
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
333
333
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
334
334
  `;
335
- const e = /* @__PURE__ */ c(() => {
335
+ const e = /* @__PURE__ */ a(() => {
336
336
  const s = t(this, V).querySelector(".ng-container-body");
337
337
  if (!s) {
338
338
  setTimeout(e, 10);
@@ -349,7 +349,7 @@ const Xt = class Xt extends HTMLElement {
349
349
  e();
350
350
  }
351
351
  };
352
- V = new WeakMap(), $ = new WeakMap(), E = new WeakMap(), Q = new WeakMap(), tt = new WeakMap(), dt = new WeakMap(), c(Xt, "NineTableVScrollBar");
352
+ V = new WeakMap(), $ = new WeakMap(), E = new WeakMap(), Q = new WeakMap(), tt = new WeakMap(), dt = new WeakMap(), a(Xt, "NineTableVScrollBar");
353
353
  let It = Xt;
354
354
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", It);
355
355
  var ft, et;
@@ -367,15 +367,15 @@ const C = class C {
367
367
  var n, o, r;
368
368
  if (!i) return null;
369
369
  const e = i.cloneNode(!0);
370
- return t(n = C, ft).call(n, e), t(o = C, et).call(o, e, "thead"), t(r = C, et).call(r, e, "tbody"), Array.from(e.querySelectorAll("colgroup col")).forEach((l, a) => {
370
+ return t(n = C, ft).call(n, e), t(o = C, et).call(o, e, "thead"), t(r = C, et).call(r, e, "tbody"), Array.from(e.querySelectorAll("colgroup col")).forEach((l, c) => {
371
371
  const d = l.getAttribute("fixed");
372
- d && e.querySelectorAll(`[data-col="${a}"]`).forEach((u) => {
372
+ d && e.querySelectorAll(`[data-col="${c}"]`).forEach((u) => {
373
373
  u.setAttribute("fixed", d);
374
374
  });
375
375
  }), e;
376
376
  }
377
377
  };
378
- ft = new WeakMap(), et = new WeakMap(), c(C, "TableCompiler"), h(C, ft, /* @__PURE__ */ c((i) => {
378
+ ft = new WeakMap(), et = new WeakMap(), a(C, "TableCompiler"), h(C, ft, /* @__PURE__ */ a((i) => {
379
379
  if (!i.querySelector("colgroup")) {
380
380
  const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), o = Math.max(Math.floor(i.clientWidth / s), 100);
381
381
  for (let r = 0; r < s; r++) {
@@ -389,18 +389,18 @@ ft = new WeakMap(), et = new WeakMap(), c(C, "TableCompiler"), h(C, ft, /* @__PU
389
389
  s ? s.after(e) : i.prepend(e);
390
390
  }
391
391
  i.classList.add("nine-table-element"), i.style.display = "table";
392
- }, "#ensureTableStructure")), h(C, et, /* @__PURE__ */ c((i, e) => {
392
+ }, "#ensureTableStructure")), h(C, et, /* @__PURE__ */ a((i, e) => {
393
393
  const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), o = s.length;
394
394
  if (o === 0 || n.length === 0) return;
395
395
  let r = 0;
396
- n.forEach((a) => {
397
- r += a.colSpan || 1;
396
+ n.forEach((c) => {
397
+ r += c.colSpan || 1;
398
398
  });
399
399
  const l = Array.from(Array(o), () => Array(r).fill(null));
400
- s.forEach((a) => {
401
- const d = a.sectionRowIndex;
400
+ s.forEach((c) => {
401
+ const d = c.sectionRowIndex;
402
402
  let u = 0;
403
- Array.from(a.querySelectorAll("th,td")).forEach((f) => {
403
+ Array.from(c.querySelectorAll("th,td")).forEach((f) => {
404
404
  for (let w = 0; w < l[d].length; w++)
405
405
  if (l[d][w] === null) {
406
406
  u = w;
@@ -411,9 +411,9 @@ ft = new WeakMap(), et = new WeakMap(), c(C, "TableCompiler"), h(C, ft, /* @__PU
411
411
  for (let L = 0; L < y; L++)
412
412
  d + w < o && u + L < r && (l[d + w][u + L] = w === 0 && L === 0 ? "1" : "0");
413
413
  });
414
- }), s.forEach((a) => {
415
- const d = a.sectionRowIndex;
416
- Array.from(a.querySelectorAll("th,td")).forEach((u) => {
414
+ }), s.forEach((c) => {
415
+ const d = c.sectionRowIndex;
416
+ Array.from(c.querySelectorAll("th,td")).forEach((u) => {
417
417
  for (let f = 0; f < l[d].length; f++)
418
418
  if (l[d][f] === "1") {
419
419
  u.dataset.col = f, l[d][f] = "0";
@@ -436,7 +436,7 @@ const Ut = class Ut {
436
436
  /**
437
437
  * 🎯 μ™ΈλΆ€μ—μ„œ 데이터가 λ‘œλ“œλ˜κ±°λ‚˜ λ³€κ²½λœ ν›„ 가상 높이와 λ·°λ₯Ό μž¬κ°±μ‹ ν•˜λŠ” 퍼블릭 λ©”μ„œλ“œ
438
438
  */
439
- S(this, "refresh", /* @__PURE__ */ c(() => {
439
+ S(this, "refresh", /* @__PURE__ */ a(() => {
440
440
  var e;
441
441
  const i = t(this, x).querySelector(".ng-container-body");
442
442
  i && (t(this, bt).call(this), t(this, nt).call(this, i.scrollTop), (e = t(this, x).querySelector("nine-table-vscrollbar")) == null || e.refresh());
@@ -445,7 +445,7 @@ const Ut = class Ut {
445
445
  * 🎯 NineTableSheetμ—μ„œ λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 전달받아 각 μ˜μ—­λ³„ ν…Œμ΄λΈ” 생성 및 ν…œν”Œλ¦Ώ μΆ”μΆœ 일원화
446
446
  */
447
447
  // [RowManager.js μˆ˜μ • λ‚΄μš© 발췌]
448
- S(this, "initialize", /* @__PURE__ */ c(() => {
448
+ S(this, "initialize", /* @__PURE__ */ a(() => {
449
449
  b(this, R, null), t(this, M).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
450
450
  const s = t(this, x).querySelector(e);
451
451
  if (!s) return;
@@ -453,7 +453,7 @@ const Ut = class Ut {
453
453
  if (!n) return;
454
454
  const o = n.querySelector("tbody");
455
455
  if (!o) return;
456
- const l = Array.from(o.querySelectorAll("tr")).map((a) => a.cloneNode(!0));
456
+ const l = Array.from(o.querySelectorAll("tr")).map((c) => c.cloneNode(!0));
457
457
  t(this, M).set(e, l);
458
458
  });
459
459
  const i = t(this, x).querySelector(".ng-container-body");
@@ -467,7 +467,7 @@ const Ut = class Ut {
467
467
  });
468
468
  }
469
469
  }, "initialize"));
470
- h(this, ut, /* @__PURE__ */ c((i, e) => {
470
+ h(this, ut, /* @__PURE__ */ a((i, e) => {
471
471
  const s = t(this, M).get(e);
472
472
  if (!s || s.length === 0) return;
473
473
  const n = i.querySelector("tbody");
@@ -475,15 +475,15 @@ const Ut = class Ut {
475
475
  n.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
476
476
  const o = n.querySelector("tr.nodata"), r = document.createDocumentFragment();
477
477
  for (let l = 0; l < t(this, X); l++)
478
- s.forEach((a) => {
479
- r.appendChild(a.cloneNode(!0));
478
+ s.forEach((c) => {
479
+ r.appendChild(c.cloneNode(!0));
480
480
  });
481
481
  o ? o.before(r) : n.appendChild(r);
482
482
  }, "#renderRows"));
483
483
  /**
484
484
  * 🎯 ν…œν”Œλ¦Ώ TRλ“€μ˜ 총 높이λ₯Ό μΈ‘μ •ν•˜κ³  캐싱
485
485
  */
486
- h(this, gt, /* @__PURE__ */ c((i) => {
486
+ h(this, gt, /* @__PURE__ */ a((i) => {
487
487
  if (t(this, R) !== null && t(this, R) > 0)
488
488
  return t(this, R);
489
489
  const e = t(this, M).get(".ng-container-body");
@@ -495,13 +495,13 @@ const Ut = class Ut {
495
495
  e.forEach((g) => {
496
496
  o.appendChild(g.cloneNode(!0));
497
497
  }), n ? n.before(o) : s.appendChild(o);
498
- const r = t(this, x), l = r.style.display, a = r.style.visibility, d = r.style.position;
498
+ const r = t(this, x), l = r.style.display, c = r.style.visibility, d = r.style.position;
499
499
  (l === "none" || window.getComputedStyle(r).display === "none") && (r.style.display = "block", r.style.visibility = "hidden", r.style.position = "absolute");
500
500
  let u = 0;
501
501
  const f = s.querySelectorAll("tr:not(.nodata)");
502
502
  return f.forEach((g) => {
503
503
  u += g.offsetHeight || g.getBoundingClientRect().height;
504
- }), f.forEach((g) => g.remove()), r.style.display = l, r.style.visibility = a, r.style.position = d, b(this, R, u > 0 ? u : 24), t(this, it).call(this), _.log(`[RowManager] Height Cached: ${t(this, R)}px | RowCount: ${t(this, X)}`), t(this, R);
504
+ }), f.forEach((g) => g.remove()), r.style.display = l, r.style.visibility = c, r.style.position = d, b(this, R, u > 0 ? u : 24), t(this, it).call(this), _.log(`[RowManager] Height Cached: ${t(this, R)}px | RowCount: ${t(this, X)}`), t(this, R);
505
505
  }, "#measureAndCacheHeight"));
506
506
  /**
507
507
  * 🎯 전체 데이터 개수 기반으둜 가상 슀크둀 높이 μ„€μ •
@@ -509,30 +509,30 @@ const Ut = class Ut {
509
509
  /**
510
510
  * 🎯 전체 데이터 개수 기반으둜 가상 슀크둀 높이 μ„€μ •
511
511
  */
512
- h(this, bt, /* @__PURE__ */ c(() => {
513
- var o, r, l, a;
512
+ h(this, bt, /* @__PURE__ */ a(() => {
513
+ var o, r, l, c;
514
514
  if (!t(this, x).querySelector(".ng-container-body")) return;
515
- const e = (typeof ((o = t(this, x).data) == null ? void 0 : o.count) == "function" ? t(this, x).data.count() : null) ?? ((l = (r = t(this, x).dataManager) == null ? void 0 : r.rawRecords) == null ? void 0 : l.length) ?? ((a = t(this, x).data) == null ? void 0 : a.length) ?? 0, s = t(this, R) || 24, n = e * s;
515
+ const e = (typeof ((o = t(this, x).data) == null ? void 0 : o.count) == "function" ? t(this, x).data.count() : null) ?? ((l = (r = t(this, x).dataManager) == null ? void 0 : r.rawRecords) == null ? void 0 : l.length) ?? ((c = t(this, x).data) == null ? void 0 : c.length) ?? 0, s = t(this, R) || 24, n = e * s;
516
516
  _.log(`[RowManager] TotalCount: ${e} | RowHeight: ${s}px | TotalVirtualHeight: ${n}px`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
517
517
  const u = t(this, x).querySelector(d), f = u == null ? void 0 : u.querySelector("table");
518
518
  f ? (f.style.height = `${n}px`, _.log(`[RowManager] Applied height to ${d} table:`, f.style.height)) : _.log(`[RowManager] Table not found for selector: ${d}`);
519
519
  });
520
520
  }, "#updateVirtualScrollHeight"));
521
- h(this, it, /* @__PURE__ */ c(() => {
521
+ h(this, it, /* @__PURE__ */ a(() => {
522
522
  if (t(this, Y) > 0 && t(this, R) > 0) {
523
523
  const i = Math.ceil(t(this, Y) / t(this, R));
524
524
  b(this, X, i + 20);
525
525
  } else
526
526
  b(this, X, 40);
527
527
  }, "#updateRowCount"));
528
- h(this, pt, /* @__PURE__ */ c(() => {
529
- var a, d, u;
528
+ h(this, pt, /* @__PURE__ */ a(() => {
529
+ var c, d, u;
530
530
  const i = t(this, x).querySelector(".ng-container-left table"), e = t(this, x).querySelector(".ng-container-body table"), s = t(this, x).querySelector(".ng-container-right table");
531
531
  if (!e) return;
532
532
  const n = i ? Array.from(i.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), r = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(n.length, o.length, r.length);
533
533
  for (let f = 0; f < l; f++) {
534
534
  const g = [
535
- ((a = n[f]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
535
+ ((c = n[f]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
536
536
  ((d = o[f]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
537
537
  ((u = r[f]) == null ? void 0 : u.getBoundingClientRect().height) || 0
538
538
  ], y = Math.max(...g);
@@ -542,7 +542,7 @@ const Ut = class Ut {
542
542
  /**
543
543
  * 🎯 ResizeObserver μ„€μ •: μ‹œνŠΈ 크기 λ³€κ²½ μ‹œ ν–‰ 개수 μž¬μ‚°μ • 및 μž¬λ Œλ”λ§
544
544
  */
545
- h(this, yt, /* @__PURE__ */ c(() => {
545
+ h(this, yt, /* @__PURE__ */ a(() => {
546
546
  !t(this, x) || !(t(this, x) instanceof HTMLElement) || (b(this, W, new ResizeObserver((i) => {
547
547
  for (const e of i) {
548
548
  const s = e.target;
@@ -561,7 +561,7 @@ const Ut = class Ut {
561
561
  /**
562
562
  * 🎯 λ°”λ”” 및 쒌우 κ³ μ • μ»¨ν…Œμ΄λ„ˆ 전체에 각각에 λ§žλŠ” ν…œν”Œλ¦Ώ ν–‰ λΌˆλŒ€ μ£Όμž…
563
563
  */
564
- h(this, st, /* @__PURE__ */ c(() => {
564
+ h(this, st, /* @__PURE__ */ a(() => {
565
565
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
566
566
  const e = t(this, x).querySelector(i);
567
567
  e && e.querySelector("tbody") && t(this, ut).call(this, e, i);
@@ -570,15 +570,15 @@ const Ut = class Ut {
570
570
  /**
571
571
  * 🎯 슀크둀 μœ„μΉ˜μ— λ”°λ₯Έ 데이터 바인딩 κ°±μ‹ 
572
572
  */
573
- h(this, nt, /* @__PURE__ */ c((i) => {
573
+ h(this, nt, /* @__PURE__ */ a((i) => {
574
574
  var r;
575
575
  const e = t(this, R);
576
576
  if (!e || e <= 0) return;
577
577
  const s = ((r = t(this, M).get(".ng-container-body")) == null ? void 0 : r.length) || 1, n = Math.floor(i / e), o = Math.max(0, n);
578
578
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((l) => {
579
- const a = t(this, x).querySelector(l);
580
- if (!a) return;
581
- const d = a.querySelector("tbody");
579
+ const c = t(this, x).querySelector(l);
580
+ if (!c) return;
581
+ const d = c.querySelector("tbody");
582
582
  if (!d) return;
583
583
  Array.from(d.querySelectorAll("tr:not(.nodata)")).forEach((f, g) => {
584
584
  const y = o + Math.floor(g / s), w = t(this, x).getData ? t(this, x).getData(y) : null;
@@ -589,13 +589,13 @@ const Ut = class Ut {
589
589
  /**
590
590
  * 🎯 κ°œλ³„ TR μ—˜λ¦¬λ¨ΌνŠΈμ— μ‹€μ œ 데이터 값을 κ½‚μ•„μ£ΌλŠ” 바인딩 λ©”μ„œλ“œ
591
591
  */
592
- h(this, mt, /* @__PURE__ */ c((i, e, s) => {
592
+ h(this, mt, /* @__PURE__ */ a((i, e, s) => {
593
593
  i.dataset.row = s, Array.from(i.cells).forEach((n) => {
594
594
  const o = n.dataset.bind;
595
595
  o && e[o] !== void 0 && (n.textContent = e[o]), n.dataset.row = s;
596
596
  });
597
597
  }, "#bindRowData"));
598
- S(this, "destroy", /* @__PURE__ */ c(() => {
598
+ S(this, "destroy", /* @__PURE__ */ a(() => {
599
599
  t(this, W) && (t(this, W).disconnect(), b(this, W, null));
600
600
  }, "destroy"));
601
601
  b(this, x, i), t(this, yt).call(this);
@@ -608,7 +608,7 @@ const Ut = class Ut {
608
608
  return ((e = t(this, M).get(i)) == null ? void 0 : e.length) || 1;
609
609
  }
610
610
  };
611
- x = new WeakMap(), M = new WeakMap(), R = new WeakMap(), W = new WeakMap(), Y = new WeakMap(), X = new WeakMap(), ut = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), it = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), mt = new WeakMap(), c(Ut, "RowManager");
611
+ x = new WeakMap(), M = new WeakMap(), R = new WeakMap(), W = new WeakMap(), Y = new WeakMap(), X = new WeakMap(), ut = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), it = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), mt = new WeakMap(), a(Ut, "RowManager");
612
612
  let Wt = Ut;
613
613
  var F, Z, xt, vt, wt, St, Et;
614
614
  const J = class J extends HTMLElement {
@@ -616,7 +616,7 @@ const J = class J extends HTMLElement {
616
616
  super();
617
617
  h(this, F, null);
618
618
  h(this, Z);
619
- h(this, xt, /* @__PURE__ */ c(() => {
619
+ h(this, xt, /* @__PURE__ */ a(() => {
620
620
  [
621
621
  { selector: ".ng-container-body", type: null },
622
622
  { selector: ".ng-container-left", type: "left" },
@@ -628,7 +628,7 @@ const J = class J extends HTMLElement {
628
628
  o.innerHTML = "", o.appendChild(r);
629
629
  });
630
630
  }, "#renderSplitContainers"));
631
- h(this, vt, /* @__PURE__ */ c(() => {
631
+ h(this, vt, /* @__PURE__ */ a(() => {
632
632
  ["left", "right"].forEach((e) => {
633
633
  const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
634
634
  if (!s || !n) return;
@@ -639,7 +639,7 @@ const J = class J extends HTMLElement {
639
639
  }), s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`;
640
640
  });
641
641
  }, "#updateContainerWidths"));
642
- S(this, "generate", /* @__PURE__ */ c((e) => {
642
+ S(this, "generate", /* @__PURE__ */ a((e) => {
643
643
  e && (b(this, F, $t.compile(e)), t(this, F).style.display = "table", t(this, xt).call(this), t(this, vt).call(this), t(this, Z).initialize(), setTimeout(() => {
644
644
  var s;
645
645
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
@@ -648,7 +648,7 @@ const J = class J extends HTMLElement {
648
648
  /**
649
649
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
650
650
  */
651
- h(this, wt, /* @__PURE__ */ c((e, s) => {
651
+ h(this, wt, /* @__PURE__ */ a((e, s) => {
652
652
  const n = e.cloneNode(!0);
653
653
  return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
654
654
  o.getAttribute("fixed") !== "left" && o.remove();
@@ -658,19 +658,19 @@ const J = class J extends HTMLElement {
658
658
  o.remove();
659
659
  }), n;
660
660
  }, "#createSplitTable"));
661
- S(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, Z).getRowHeight(), "getRowHeight"));
662
- S(this, "scrollToX", /* @__PURE__ */ c((e) => {
661
+ S(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, Z).getRowHeight(), "getRowHeight"));
662
+ S(this, "scrollToX", /* @__PURE__ */ a((e) => {
663
663
  const s = this.querySelector(".ng-container-body");
664
664
  s && (s.scrollLeft = e);
665
665
  }, "scrollToX"));
666
- S(this, "scrollToY", /* @__PURE__ */ c((e) => {
666
+ S(this, "scrollToY", /* @__PURE__ */ a((e) => {
667
667
  const s = this.querySelector(".ng-container-body");
668
668
  s && (s.scrollTop = e);
669
669
  }, "scrollToY"));
670
- h(this, St, /* @__PURE__ */ c(() => {
670
+ h(this, St, /* @__PURE__ */ a(() => {
671
671
  t(this, Et).call(this);
672
672
  }, "#init"));
673
- h(this, Et, /* @__PURE__ */ c(() => {
673
+ h(this, Et, /* @__PURE__ */ a(() => {
674
674
  const e = J.SCROLLBAR_SIZE;
675
675
  this.innerHTML = `
676
676
  <style>
@@ -776,6 +776,19 @@ const J = class J extends HTMLElement {
776
776
  font-weight: 600;
777
777
  text-align: left;
778
778
  }
779
+
780
+ nine-table-sheet tfoot {
781
+ display: table-footer-group;
782
+ position: sticky;
783
+ bottom: 0;
784
+ z-index: 2;
785
+ background: #f9fafb;
786
+ }
787
+
788
+ nine-table-sheet tfoot td, nine-table-sheet tfoot th {
789
+ font-weight: 600;
790
+ border-top: 2px solid #d1d5db;
791
+ }
779
792
 
780
793
  nine-splitter {
781
794
  display: none;
@@ -803,14 +816,14 @@ const J = class J extends HTMLElement {
803
816
  this.innerHTML = "", _.log("NineTableSheet destroyed.");
804
817
  }
805
818
  };
806
- F = new WeakMap(), Z = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), c(J, "NineTableSheet"), S(J, "SCROLLBAR_SIZE", 16);
807
- let ct = J;
808
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ct);
819
+ F = new WeakMap(), Z = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), a(J, "NineTableSheet"), S(J, "SCROLLBAR_SIZE", 16);
820
+ let at = J;
821
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", at);
809
822
  var Rt, ot;
810
823
  const Kt = class Kt extends HTMLElement {
811
824
  constructor() {
812
825
  super();
813
- h(this, Rt, /* @__PURE__ */ c(() => {
826
+ h(this, Rt, /* @__PURE__ */ a(() => {
814
827
  var e;
815
828
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
816
829
  var r;
@@ -818,8 +831,8 @@ const Kt = class Kt extends HTMLElement {
818
831
  t(this, ot).call(this, o, n);
819
832
  }), t(this, ot).call(this, 0, !1);
820
833
  }, "#init"));
821
- h(this, ot, /* @__PURE__ */ c((e, s = !1) => {
822
- const n = /* @__PURE__ */ c(() => {
834
+ h(this, ot, /* @__PURE__ */ a((e, s = !1) => {
835
+ const n = /* @__PURE__ */ a(() => {
823
836
  const u = Array.from(this.querySelectorAll("nine-table-sheet"));
824
837
  Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
825
838
  const g = u.filter((y) => y.classList.contains("active"));
@@ -827,12 +840,12 @@ const Kt = class Kt extends HTMLElement {
827
840
  const w = parseInt(y.getAttribute("data-index"), 10), L = this.querySelector(`nine-splitter[data-split-index="${w}"]`), Jt = u[w + 1];
828
841
  L && Jt && Jt.classList.contains("active") && L.style.setProperty("display", "flex");
829
842
  });
830
- }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), l = o.querySelectorAll(".nine-tab-item"), a = r.querySelectorAll("nine-table-sheet");
843
+ }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), l = o.querySelectorAll(".nine-tab-item"), c = r.querySelectorAll("nine-table-sheet");
831
844
  if (!l[e]) return;
832
845
  if (!s)
833
846
  l.forEach((u, f) => {
834
847
  u.classList.toggle("active", f === e);
835
- }), a.forEach((u, f) => {
848
+ }), c.forEach((u, f) => {
836
849
  const g = f === e;
837
850
  u.classList.toggle("active", g), u.style.flex = g ? "1 1 100%" : "";
838
851
  });
@@ -854,31 +867,31 @@ const Kt = class Kt extends HTMLElement {
854
867
  t(this, Rt).call(this);
855
868
  }
856
869
  };
857
- Rt = new WeakMap(), ot = new WeakMap(), c(Kt, "NineTableSheets");
858
- let Ot = Kt;
859
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Ot);
860
- var T, Tt, rt, At;
870
+ Rt = new WeakMap(), ot = new WeakMap(), a(Kt, "NineTableSheets");
871
+ let zt = Kt;
872
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", zt);
873
+ var T, Tt, rt, kt;
861
874
  const Ft = class Ft {
862
875
  constructor(i) {
863
876
  h(this, T);
864
- h(this, Tt, /* @__PURE__ */ c(() => {
865
- t(this, At).call(this), new ResizeObserver((i) => {
877
+ h(this, Tt, /* @__PURE__ */ a(() => {
878
+ t(this, kt).call(this), new ResizeObserver((i) => {
866
879
  for (let e of i)
867
880
  t(this, T).getAttribute("auto-height") === "true" && t(this, rt).call(this);
868
881
  }).observe(t(this, T));
869
882
  }, "#init"));
870
- h(this, rt, /* @__PURE__ */ c(() => {
871
- var a, d;
883
+ h(this, rt, /* @__PURE__ */ a(() => {
884
+ var c, d;
872
885
  const i = Array.from(t(this, T).shadowRoot.querySelectorAll("nine-table-sheet.active"));
873
886
  if (i.length === 0) return;
874
- const e = parseInt(t(this, T).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((u) => u.getRowHeight())), n = (a = t(this, T).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : a.getBoundingClientRect().height, o = (d = t(this, T).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, r = ct.SCROLLBAR_SIZE, l = e * s + n + o + r;
887
+ const e = parseInt(t(this, T).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((u) => u.getRowHeight())), n = (c = t(this, T).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (d = t(this, T).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, r = at.SCROLLBAR_SIZE, l = e * s + n + o + r;
875
888
  t(this, T).style.height = `${l}px`;
876
889
  }, "#applyAutoHeight"));
877
- h(this, At, /* @__PURE__ */ c(() => {
878
- const e = Array.from(t(this, T).children).filter((a) => a.tagName === "TABLE"), s = t(this, T).getAttribute("auto-height") === "true", n = e.length, o = e.map((a, d) => {
890
+ h(this, kt, /* @__PURE__ */ a(() => {
891
+ const e = Array.from(t(this, T).children).filter((c) => c.tagName === "TABLE"), s = t(this, T).getAttribute("auto-height") === "true", n = e.length, o = e.map((c, d) => {
879
892
  const f = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, g = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
880
893
  return f + g;
881
- }).join(""), r = e.map((a, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
894
+ }).join(""), r = e.map((c, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
882
895
  t(this, T).shadowRoot.innerHTML = `
883
896
  <style>
884
897
  :host {
@@ -979,24 +992,24 @@ const Ft = class Ft {
979
992
  <nine-table-footer></nine-table-footer>
980
993
  `;
981
994
  const l = t(this, T).shadowRoot.querySelectorAll("nine-table-sheet");
982
- l == null || l.forEach((a, d) => {
995
+ l == null || l.forEach((c, d) => {
983
996
  e[d] && setTimeout(() => {
984
- a.generate(e[d]), s && t(this, rt).call(this);
997
+ c.generate(e[d]), s && t(this, rt).call(this);
985
998
  });
986
999
  });
987
1000
  }, "#render"));
988
1001
  b(this, T, i), t(this, Tt).call(this);
989
1002
  }
990
1003
  };
991
- T = new WeakMap(), Tt = new WeakMap(), rt = new WeakMap(), At = new WeakMap(), c(Ft, "LayoutManager");
992
- let zt = Ft;
993
- var O, U;
1004
+ T = new WeakMap(), Tt = new WeakMap(), rt = new WeakMap(), kt = new WeakMap(), a(Ft, "LayoutManager");
1005
+ let Ot = Ft;
1006
+ var z, U;
994
1007
  const Zt = class Zt {
995
1008
  constructor(i) {
996
- h(this, O);
1009
+ h(this, z);
997
1010
  h(this, U, -1);
998
- S(this, "count", /* @__PURE__ */ c(() => t(this, O).rawRecords.length, "count"));
999
- b(this, O, i);
1011
+ S(this, "count", /* @__PURE__ */ a(() => t(this, z).rawRecords.length, "count"));
1012
+ b(this, z, i);
1000
1013
  }
1001
1014
  get at() {
1002
1015
  return t(this, U);
@@ -1004,57 +1017,57 @@ const Zt = class Zt {
1004
1017
  set at(i) {
1005
1018
  var s, n;
1006
1019
  b(this, U, parseInt(i, 10));
1007
- const e = ((n = (s = t(this, O).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || t(this, O).owner.body;
1020
+ const e = ((n = (s = t(this, z).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || t(this, z).owner.body;
1008
1021
  e && !e.querySelector(`tbody.bindable tr[data-row="${t(this, U)}"]`) && setTimeout(() => {
1009
1022
  var o, r;
1010
- (r = (o = t(this, O).owner).scrollTo_V1) == null || r.call(o, t(this, U));
1023
+ (r = (o = t(this, z).owner).scrollTo_V1) == null || r.call(o, t(this, U));
1011
1024
  });
1012
1025
  }
1013
1026
  };
1014
- O = new WeakMap(), U = new WeakMap(), c(Zt, "ngRow");
1027
+ z = new WeakMap(), U = new WeakMap(), a(Zt, "ngRow");
1015
1028
  let Dt = Zt;
1016
- var A, v, k, j, kt, z, qt, lt, Lt, Ht, G;
1029
+ var k, v, A, j, At, O, qt, lt, Lt, Ht, G;
1017
1030
  const q = class q {
1018
1031
  constructor(i, e) {
1019
- h(this, A);
1032
+ h(this, k);
1020
1033
  h(this, v);
1021
- h(this, k, []);
1034
+ h(this, A, []);
1022
1035
  h(this, j, []);
1023
- h(this, kt, 0);
1024
- h(this, z, []);
1025
- h(this, qt, /* @__PURE__ */ c(() => {
1026
- b(this, z, []);
1027
- const i = t(this, A).template || [];
1036
+ h(this, At, 0);
1037
+ h(this, O, []);
1038
+ h(this, qt, /* @__PURE__ */ a(() => {
1039
+ b(this, O, []);
1040
+ const i = t(this, k).template || [];
1028
1041
  Array.from(i).forEach((e) => {
1029
1042
  var s;
1030
- t(this, z).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1043
+ t(this, O).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1031
1044
  }), (t(this, v).rawRecords || []).forEach((e) => {
1032
- e.__ng || (e.__ng = t(this, lt).call(this)), e.__ng.height = t(this, z).slice();
1045
+ e.__ng || (e.__ng = t(this, lt).call(this)), e.__ng.height = t(this, O).slice();
1033
1046
  });
1034
1047
  }, "#initialize"));
1035
- S(this, "set", /* @__PURE__ */ c((i) => {
1048
+ S(this, "set", /* @__PURE__ */ a((i) => {
1036
1049
  this.clear(), this.add(i, !1);
1037
1050
  }, "set"));
1038
- h(this, lt, /* @__PURE__ */ c(() => ({
1051
+ h(this, lt, /* @__PURE__ */ a(() => ({
1039
1052
  rowState: q.ROW_STATE.EMPTY,
1040
1053
  deleted: !1,
1041
1054
  filtered: !1,
1042
- height: t(this, z).slice(),
1055
+ height: t(this, O).slice(),
1043
1056
  o: {},
1044
1057
  c: {},
1045
- _: [0, 0, 0, 0, q.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, z).slice(), -1, {}, {}]
1058
+ _: [0, 0, 0, 0, q.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, O).slice(), -1, {}, {}]
1046
1059
  }), "#getDefaultMeta"));
1047
- S(this, "reset", /* @__PURE__ */ c(() => {
1048
- b(this, k, []), b(this, j, []);
1060
+ S(this, "reset", /* @__PURE__ */ a(() => {
1061
+ b(this, A, []), b(this, j, []);
1049
1062
  }, "reset"));
1050
- S(this, "clear", /* @__PURE__ */ c(() => {
1063
+ S(this, "clear", /* @__PURE__ */ a(() => {
1051
1064
  var i;
1052
- t(this, v).rawRecords = [], b(this, k, []), b(this, j, []), (i = t(this, v).viewRecords) != null && i.reset && t(this, v).viewRecords.reset();
1065
+ t(this, v).rawRecords = [], b(this, A, []), b(this, j, []), (i = t(this, v).viewRecords) != null && i.reset && t(this, v).viewRecords.reset();
1053
1066
  }, "clear"));
1054
- h(this, Lt, /* @__PURE__ */ c((i) => {
1067
+ h(this, Lt, /* @__PURE__ */ a((i) => {
1055
1068
  var n;
1056
1069
  Array.isArray(i) || (i = [i]);
1057
- const e = typeof ((n = t(this, A).fields) == null ? void 0 : n.get) == "function" ? t(this, A).fields.get() : Object.keys(i[0] || {}), s = [];
1070
+ const e = typeof ((n = t(this, k).fields) == null ? void 0 : n.get) == "function" ? t(this, k).fields.get() : Object.keys(i[0] || {}), s = [];
1058
1071
  return i.forEach((o) => {
1059
1072
  const r = { v: [] };
1060
1073
  e.forEach((l) => {
@@ -1062,54 +1075,54 @@ const q = class q {
1062
1075
  }), s.push(r);
1063
1076
  }), s;
1064
1077
  }, "#json2Array"));
1065
- h(this, Ht, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1078
+ h(this, Ht, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1066
1079
  e.__ng = t(this, lt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = q.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1067
1080
  }), i), "#defaultInsert"));
1068
- S(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1081
+ S(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1069
1082
  var o;
1070
1083
  i === void 0 && (i = {});
1071
1084
  const s = t(this, Lt).call(this, i);
1072
1085
  t(this, v).rawRecords = t(this, v).rawRecords.concat(t(this, Ht).call(this, s)), this.resetRecords();
1073
1086
  const n = this.count() - 1;
1074
1087
  return e || s.forEach((r, l) => {
1075
- const a = t(this, v).rawRecords[n - l];
1076
- a && (a.__ng.rowState = q.ROW_STATE.EMPTY);
1088
+ const c = t(this, v).rawRecords[n - l];
1089
+ c && (c.__ng.rowState = q.ROW_STATE.EMPTY);
1077
1090
  }), (o = t(this, v).viewRecords) != null && o.reset && t(this, v).viewRecords.reset(), n;
1078
1091
  }, "add"));
1079
- S(this, "delete", /* @__PURE__ */ c((i) => {
1092
+ S(this, "delete", /* @__PURE__ */ a((i) => {
1080
1093
  var s;
1081
1094
  let e = [];
1082
1095
  Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, v).owner.row.at] : e = [parseInt(i, 10)], e.sort((n, o) => o - n).forEach((n) => {
1083
- if (t(this, k)[n]) {
1084
- const o = t(this, k)[n].__ng.rowid;
1085
- t(this, k)[n].__ng.rowState === q.ROW_STATE.INSERT ? t(this, v).rawRecords = t(this, v).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, v).rawRecords.forEach((r) => {
1096
+ if (t(this, A)[n]) {
1097
+ const o = t(this, A)[n].__ng.rowid;
1098
+ t(this, A)[n].__ng.rowState === q.ROW_STATE.INSERT ? t(this, v).rawRecords = t(this, v).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, v).rawRecords.forEach((r) => {
1086
1099
  r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = q.ROW_STATE.DELETE);
1087
1100
  });
1088
1101
  }
1089
1102
  }), this.resetRecords(), (s = t(this, v).viewRecords) != null && s.reset && t(this, v).viewRecords.reset();
1090
1103
  }, "delete"));
1091
- S(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1092
- var a;
1104
+ S(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
1105
+ var c;
1093
1106
  i = parseInt(i, 10);
1094
- const o = (typeof ((a = t(this, A).fields) == null ? void 0 : a.get) == "function" ? t(this, A).fields.get() : []).indexOf(e);
1107
+ const o = (typeof ((c = t(this, k).fields) == null ? void 0 : c.get) == "function" ? t(this, k).fields.get() : []).indexOf(e);
1095
1108
  if (o < 0) return;
1096
1109
  const r = this.getValidData()[i];
1097
1110
  if (!r) return;
1098
1111
  const l = r.v[o];
1099
1112
  l !== s && r.__ng.rowState !== q.ROW_STATE.INSERT && (r.__ng.o.hasOwnProperty(e) || (r.__ng.o[e] = l), r.__ng.rowState = q.ROW_STATE.UPDATE), r.v[o] = s, t(this, v).owner.refreshData && t(this, v).owner.refreshData(i);
1100
1113
  }, "setValue"));
1101
- S(this, "resetRecords", /* @__PURE__ */ c(() => {
1102
- b(this, j, t(this, v).rawRecords.filter((i) => !i.__ng.deleted)), b(this, k, t(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, v).rawRecords.forEach((i, e) => {
1114
+ S(this, "resetRecords", /* @__PURE__ */ a(() => {
1115
+ b(this, j, t(this, v).rawRecords.filter((i) => !i.__ng.deleted)), b(this, A, t(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, v).rawRecords.forEach((i, e) => {
1103
1116
  i.__ng.rowidx = e;
1104
- }), t(this, k).forEach((i, e) => {
1117
+ }), t(this, A).forEach((i, e) => {
1105
1118
  i.__ng.i = e;
1106
1119
  });
1107
1120
  }, "resetRecords"));
1108
- S(this, "getValidData", /* @__PURE__ */ c(() => (t(this, k).length === 0 && t(this, v).rawRecords.length > 0 && this.resetRecords(), t(this, k)), "getValidData"));
1109
- h(this, G, /* @__PURE__ */ c((i) => {
1121
+ S(this, "getValidData", /* @__PURE__ */ a(() => (t(this, A).length === 0 && t(this, v).rawRecords.length > 0 && this.resetRecords(), t(this, A)), "getValidData"));
1122
+ h(this, G, /* @__PURE__ */ a((i) => {
1110
1123
  var s;
1111
1124
  if (!i) return i;
1112
- const e = typeof ((s = t(this, A).fields) == null ? void 0 : s.get) == "function" ? t(this, A).fields.get() : [];
1125
+ const e = typeof ((s = t(this, k).fields) == null ? void 0 : s.get) == "function" ? t(this, k).fields.get() : [];
1113
1126
  return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
1114
1127
  const o = {};
1115
1128
  return e.forEach((r, l) => {
@@ -1117,21 +1130,21 @@ const q = class q {
1117
1130
  }), o.__ng = n.__ng, o;
1118
1131
  }) : i;
1119
1132
  }, "#conv2"));
1120
- S(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1121
- S(this, "get", /* @__PURE__ */ c((i, e) => {
1133
+ S(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
1134
+ S(this, "get", /* @__PURE__ */ a((i, e) => {
1122
1135
  var o;
1123
1136
  const s = this.getValidData();
1124
1137
  if (!s || s.length <= 0) return;
1125
1138
  if (i == null) return t(this, G).call(this, s);
1126
1139
  if (i < 0 || i >= s.length) return null;
1127
- const n = typeof ((o = t(this, A).fields) == null ? void 0 : o.get) == "function" ? t(this, A).fields.get() : [];
1140
+ const n = typeof ((o = t(this, k).fields) == null ? void 0 : o.get) == "function" ? t(this, k).fields.get() : [];
1128
1141
  if (e != null) {
1129
1142
  const r = n.indexOf(e);
1130
1143
  return r >= 0 ? s[i].v[r] : null;
1131
1144
  }
1132
1145
  return t(this, G).call(this, s[i]);
1133
1146
  }, "get"));
1134
- b(this, A, i), b(this, v, e), t(this, qt).call(this);
1147
+ b(this, k, i), b(this, v, e), t(this, qt).call(this);
1135
1148
  }
1136
1149
  get source() {
1137
1150
  return t(this, G).call(this, t(this, v).rawRecords);
@@ -1140,16 +1153,16 @@ const q = class q {
1140
1153
  this.clear(), this.add(i, !1);
1141
1154
  }
1142
1155
  get nextId() {
1143
- return ++ie(this, kt)._;
1156
+ return ++ie(this, At)._;
1144
1157
  }
1145
1158
  get length() {
1146
- return t(this, k).length;
1159
+ return t(this, A).length;
1147
1160
  }
1148
1161
  getRowCount() {
1149
1162
  return this.length;
1150
1163
  }
1151
1164
  };
1152
- A = new WeakMap(), v = new WeakMap(), k = new WeakMap(), j = new WeakMap(), kt = new WeakMap(), z = new WeakMap(), qt = new WeakMap(), lt = new WeakMap(), Lt = new WeakMap(), Ht = new WeakMap(), G = new WeakMap(), c(q, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1165
+ k = new WeakMap(), v = new WeakMap(), A = new WeakMap(), j = new WeakMap(), At = new WeakMap(), O = new WeakMap(), qt = new WeakMap(), lt = new WeakMap(), Lt = new WeakMap(), Ht = new WeakMap(), G = new WeakMap(), a(q, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1153
1166
  S(q, "ROW_STATE", {
1154
1167
  EMPTY: "EMPTY",
1155
1168
  NORMAL: "NORMAL",
@@ -1177,7 +1190,7 @@ const jt = class jt {
1177
1190
  }, this.setDataSource([]);
1178
1191
  }
1179
1192
  };
1180
- c(jt, "ngDataManager");
1193
+ a(jt, "ngDataManager");
1181
1194
  let Bt = jt;
1182
1195
  var K, Ct;
1183
1196
  const Gt = class Gt extends HTMLElement {
@@ -1189,7 +1202,7 @@ const Gt = class Gt extends HTMLElement {
1189
1202
  this.attachShadow({ mode: "open" }), b(this, K, new Bt(this));
1190
1203
  }
1191
1204
  connectedCallback() {
1192
- b(this, Ct, new zt(this)), _.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1205
+ b(this, Ct, new Ot(this)), _.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1193
1206
  }
1194
1207
  disconnectedCallback() {
1195
1208
  _.log("NineTable disconnected.");
@@ -1207,7 +1220,7 @@ const Gt = class Gt extends HTMLElement {
1207
1220
  return t(this, K);
1208
1221
  }
1209
1222
  };
1210
- K = new WeakMap(), Ct = new WeakMap(), c(Gt, "NineTable");
1223
+ K = new WeakMap(), Ct = new WeakMap(), a(Gt, "NineTable");
1211
1224
  let Nt = Gt;
1212
1225
  customElements.get("nine-table") || customElements.define("nine-table", Nt);
1213
1226
  //# sourceMappingURL=nine-table.js.map