@ninebone/table 0.0.313 β†’ 0.0.315

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.
@@ -1,17 +1,17 @@
1
1
  var te = Object.defineProperty;
2
- var ee = (v) => {
3
- throw TypeError(v);
2
+ var ee = (x) => {
3
+ throw TypeError(x);
4
4
  };
5
- var ne = (v, i, e) => i in v ? te(v, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : v[i] = e;
6
- var c = (v, i) => te(v, "name", { value: i, configurable: !0 });
7
- var w = (v, i, e) => ne(v, typeof i != "symbol" ? i + "" : i, e), ie = (v, i, e) => i.has(v) || ee("Cannot " + e);
8
- var t = (v, i, e) => (ie(v, i, "read from private field"), e ? e.call(v) : i.get(v)), h = (v, i, e) => i.has(v) ? ee("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(v) : i.set(v, e), g = (v, i, e, s) => (ie(v, i, "write to private field"), s ? s.call(v, e) : i.set(v, e), e);
9
- var se = (v, i, e, s) => ({
10
- set _(n) {
11
- g(v, i, n, e);
5
+ var ne = (x, i, e) => i in x ? te(x, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[i] = e;
6
+ var c = (x, i) => te(x, "name", { value: i, configurable: !0 });
7
+ var w = (x, i, e) => ne(x, typeof i != "symbol" ? i + "" : i, e), ie = (x, i, e) => i.has(x) || ee("Cannot " + e);
8
+ var t = (x, i, e) => (ie(x, i, "read from private field"), e ? e.call(x) : i.get(x)), h = (x, i, e) => i.has(x) ? ee("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), g = (x, i, e, s) => (ie(x, i, "write to private field"), s ? s.call(x, e) : i.set(x, e), e);
9
+ var se = (x, i, e, s) => ({
10
+ set _(o) {
11
+ g(x, i, o, e);
12
12
  },
13
13
  get _() {
14
- return t(v, i, s);
14
+ return t(x, i, s);
15
15
  }
16
16
  });
17
17
  import { trace as oe } from "@ninebone/util";
@@ -23,35 +23,35 @@ const Vt = class Vt extends oe.constructor {
23
23
  c(Vt, "Trace");
24
24
  let Mt = Vt;
25
25
  const tt = new Mt();
26
- var C, M, p, D, P, B, dt, N, ft;
26
+ var C, M, y, D, N, P, dt, B, ft;
27
27
  const Xt = class Xt extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  h(this, C);
31
31
  h(this, M, !1);
32
- h(this, p);
32
+ h(this, y);
33
33
  h(this, D);
34
+ h(this, N);
34
35
  h(this, P);
35
- h(this, B);
36
36
  h(this, dt, /* @__PURE__ */ c(() => {
37
37
  if (!t(this, C)) return;
38
38
  const e = t(this, C).querySelector(".ng-container-body");
39
- e && (g(this, B, new ResizeObserver(() => {
39
+ e && (g(this, P, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, B).observe(e));
41
+ })), t(this, P).observe(e));
42
42
  }, "#observeResize"));
43
43
  w(this, "refresh", /* @__PURE__ */ c(() => {
44
- if (!t(this, C) || !t(this, p) || t(this, M)) return;
45
- const e = t(this, p).container, s = e.querySelector("table");
44
+ if (!t(this, C) || !t(this, y) || t(this, M)) return;
45
+ const e = t(this, y).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const n = t(this, p).track, r = t(this, p).thumb, o = t(this, C).querySelector(".ng-container-bottom"), l = e.clientWidth, a = s.scrollWidth;
47
+ const o = t(this, y).track, r = t(this, y).thumb, n = t(this, C).querySelector(".ng-container-bottom"), l = e.clientWidth, a = s.scrollWidth;
48
48
  if (l !== 0 && a > l)
49
- o && (o.style.display = "flex");
49
+ n && (n.style.display = "flex");
50
50
  else {
51
- o && (o.style.display = "none");
51
+ n && (n.style.display = "none");
52
52
  return;
53
53
  }
54
- const d = n.clientWidth;
54
+ const d = o.clientWidth;
55
55
  if (d <= 0) return;
56
56
  const f = Math.max(Math.min(d * (l / a), d), 20);
57
57
  r.style.width = `${f}px`;
@@ -59,55 +59,55 @@ const Xt = class Xt extends HTMLElement {
59
59
  let m = 0;
60
60
  b > 0 && (m = parseInt(u / b * (d - f), 10)), m < 0 && (m = 0);
61
61
  const E = d - f;
62
- m > E && (m = E), r.style.left = `${m}px`, tt.log(m), t(this, p).left.disabled = m === 0, t(this, p).right.disabled = m >= E - 1;
62
+ m > E && (m = E), r.style.left = `${m}px`, tt.log(m), t(this, y).left.disabled = m === 0, t(this, y).right.disabled = m >= E - 1;
63
63
  }, "refresh"));
64
- h(this, N, /* @__PURE__ */ c((e) => {
65
- if (!t(this, p)) return !1;
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;
64
+ h(this, B, /* @__PURE__ */ c((e) => {
65
+ if (!t(this, y)) return !1;
66
+ const s = t(this, y).container, o = s.querySelector("table");
67
+ if (!o) return !1;
68
+ const r = t(this, y).track.getBoundingClientRect(), n = t(this, y).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
- const a = r.width - o;
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;
73
- const d = s.clientWidth, u = n.scrollWidth - d;
71
+ const a = r.width - n;
72
+ l > a && (l = a), l = parseInt(l, 10), t(this, y).thumb.style.left = `${l}px`, t(this, y).left.disabled = l === 0, t(this, y).right.disabled = l >= a - 1;
73
+ const d = s.clientWidth, u = o.scrollWidth - d;
74
74
  return a > 0 && u > 0 && (s.scrollLeft = l / a * u), l > 0 && l < a - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  h(this, ft, /* @__PURE__ */ c(() => {
77
- const e = /* @__PURE__ */ c((n) => {
78
- clearInterval(t(this, D)), clearInterval(t(this, P));
79
- const r = parseInt(t(this, p).thumb.style.left || 0, 10);
80
- t(this, N).call(this, r + n), g(this, D, setInterval(() => {
81
- clearInterval(t(this, D)), g(this, P, setInterval(() => {
82
- const o = parseInt(t(this, p).thumb.style.left || 0, 10);
83
- t(this, N).call(this, o + n) || clearInterval(t(this, P));
77
+ const e = /* @__PURE__ */ c((o) => {
78
+ clearInterval(t(this, D)), clearInterval(t(this, N));
79
+ const r = parseInt(t(this, y).thumb.style.left || 0, 10);
80
+ t(this, B).call(this, r + o), g(this, D, setInterval(() => {
81
+ clearInterval(t(this, D)), g(this, N, setInterval(() => {
82
+ const n = parseInt(t(this, y).thumb.style.left || 0, 10);
83
+ t(this, B).call(this, n + o) || clearInterval(t(this, N));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ c(() => {
87
- clearInterval(t(this, D)), clearInterval(t(this, P));
87
+ clearInterval(t(this, D)), clearInterval(t(this, N));
88
88
  }, "clearTimer");
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, N).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, M, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
89
+ ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
+ t(this, y).left.addEventListener(o, s), t(this, y).right.addEventListener(o, s), t(this, y).track.addEventListener(o, s);
91
+ }), t(this, y).left.addEventListener("mousedown", (o) => {
92
+ o.button === 0 && e(-20);
93
+ }), t(this, y).right.addEventListener("mousedown", (o) => {
94
+ o.button === 0 && e(20);
95
+ }), t(this, y).left.addEventListener("touchstart", () => e(-20)), t(this, y).right.addEventListener("touchstart", () => e(20)), t(this, y).track.addEventListener("mousedown", (o) => {
96
+ if (o.button !== 0) return;
97
+ o.preventDefault();
98
+ const r = t(this, y).track.getBoundingClientRect(), n = t(this, y).thumb.clientWidth;
99
+ t(this, B).call(this, o.clientX - r.left - n / 2);
100
+ }), t(this, y).thumb.addEventListener("mousedown", (o) => {
101
+ if (o.button !== 0) return;
102
+ o.stopPropagation(), o.preventDefault(), g(this, M, !0), this.shiftX = o.clientX - t(this, y).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ c((l) => {
104
104
  if (!t(this, M)) return;
105
- const a = t(this, p).track.getBoundingClientRect();
106
- t(this, N).call(this, l.clientX - a.left - this.shiftX);
107
- }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
108
- g(this, M, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
105
+ const a = t(this, y).track.getBoundingClientRect();
106
+ t(this, B).call(this, l.clientX - a.left - this.shiftX);
107
+ }, "onMouseMove"), n = /* @__PURE__ */ c(() => {
108
+ g(this, M, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
110
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", n);
111
111
  });
112
112
  }, "#init"));
113
113
  }
@@ -182,7 +182,7 @@ const Xt = class Xt extends HTMLElement {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- g(this, p, {
185
+ g(this, y, {
186
186
  container: s,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -195,10 +195,10 @@ const Xt = class Xt extends HTMLElement {
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, B) && t(this, B).disconnect();
198
+ t(this, P) && t(this, P).disconnect();
199
199
  }
200
200
  };
201
- C = new WeakMap(), M = new WeakMap(), p = new WeakMap(), D = new WeakMap(), P = new WeakMap(), B = new WeakMap(), dt = new WeakMap(), N = new WeakMap(), ft = new WeakMap(), c(Xt, "NineTableHScrollBar");
201
+ C = new WeakMap(), M = new WeakMap(), y = new WeakMap(), D = new WeakMap(), N = new WeakMap(), P = new WeakMap(), dt = new WeakMap(), B = new WeakMap(), ft = new WeakMap(), c(Xt, "NineTableHScrollBar");
202
202
  let It = Xt;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", It);
204
204
  var Y, I, S, it, st, ut;
@@ -217,17 +217,17 @@ const Ut = class Ut extends HTMLElement {
217
217
  if (!t(this, Y) || !t(this, S) || t(this, I)) return;
218
218
  const e = t(this, S).container, s = e.querySelector("table");
219
219
  if (!s) return;
220
- const n = t(this, S).track, r = t(this, S).thumb, o = e.clientHeight, l = s.scrollHeight;
221
- if (l <= o) {
220
+ const o = t(this, S).track, r = t(this, S).thumb, n = e.clientHeight, l = s.scrollHeight;
221
+ if (l <= n) {
222
222
  r.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
223
223
  return;
224
224
  } else
225
225
  r.style.display = "block";
226
- const a = n.clientHeight;
226
+ const a = o.clientHeight;
227
227
  if (a <= 0) return;
228
- const d = Math.max(Math.min(a * (o / l), a), 20);
228
+ const d = Math.max(Math.min(a * (n / l), a), 20);
229
229
  r.style.height = `${d}px`;
230
- const f = e.scrollTop, u = l - o;
230
+ const f = e.scrollTop, u = l - n;
231
231
  let b = 0;
232
232
  u > 0 && (b = f / u * (a - d));
233
233
  const m = a - d;
@@ -240,25 +240,25 @@ const Ut = class Ut extends HTMLElement {
240
240
  }), t(this, S).thumb.addEventListener("mousedown", (s) => {
241
241
  if (s.button !== 0) return;
242
242
  s.stopPropagation(), s.preventDefault(), g(this, I, !0), g(this, it, s.clientY), g(this, st, e.scrollTop);
243
- const n = /* @__PURE__ */ c((o) => {
243
+ const o = /* @__PURE__ */ c((n) => {
244
244
  if (!t(this, I)) return;
245
- const l = t(this, S).track.getBoundingClientRect(), a = t(this, S).thumb.clientHeight, f = l.height - a, u = o.clientY - t(this, it), b = e.clientHeight, m = e.querySelector("table");
245
+ const l = t(this, S).track.getBoundingClientRect(), a = t(this, S).thumb.clientHeight, f = l.height - a, u = n.clientY - t(this, it), b = e.clientHeight, m = e.querySelector("table");
246
246
  tt.log(m), tt.log(m.scrollHeight);
247
- const T = m.scrollHeight - b;
248
- if (f > 0 && T > 0) {
249
- const z = u / f * T;
247
+ const k = m.scrollHeight - b;
248
+ if (f > 0 && k > 0) {
249
+ const z = u / f * k;
250
250
  e.scrollTop = t(this, st) + z;
251
251
  }
252
252
  this.refresh();
253
253
  }, "onMouseMove"), r = /* @__PURE__ */ c(() => {
254
- g(this, I, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), this.refresh();
254
+ g(this, I, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
255
255
  }, "onMouseUp");
256
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", r);
256
+ document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
257
257
  }), t(this, S).track.addEventListener("mousedown", (s) => {
258
258
  if (s.button !== 0 || s.target === t(this, S).thumb) return;
259
- const n = t(this, S).track.getBoundingClientRect(), r = t(this, S).thumb.clientHeight, o = s.clientY - n.top - r / 2, a = n.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
259
+ const o = t(this, S).track.getBoundingClientRect(), r = t(this, S).thumb.clientHeight, n = s.clientY - o.top - r / 2, a = o.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
260
260
  if (a > 0 && u > 0) {
261
- const b = Math.max(0, Math.min(1, o / a));
261
+ const b = Math.max(0, Math.min(1, n / a));
262
262
  e.scrollTop = b * u;
263
263
  }
264
264
  this.refresh();
@@ -366,10 +366,10 @@ const H = class H {
366
366
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
367
367
  */
368
368
  static compile(i) {
369
- var n, r, o, l;
369
+ var o, r, n, l;
370
370
  if (!i) return null;
371
371
  const e = i.cloneNode(!0);
372
- return t(n = H, bt).call(n, e), t(r = H, K).call(r, e, "thead"), t(o = H, K).call(o, e, "tbody"), t(l = H, K).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((a, d) => {
372
+ return t(o = H, bt).call(o, e), t(r = H, K).call(r, e, "thead"), t(n = H, K).call(n, e, "tbody"), t(l = H, K).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((a, d) => {
373
373
  const f = a.getAttribute("fixed");
374
374
  f && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((u) => {
375
375
  u.setAttribute("fixed", f);
@@ -379,12 +379,12 @@ const H = class H {
379
379
  };
380
380
  bt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), h(H, bt, /* @__PURE__ */ c((i) => {
381
381
  if (!i.querySelector("colgroup")) {
382
- 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);
383
- for (let o = 0; o < s; o++) {
382
+ const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, o = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
383
+ for (let n = 0; n < s; n++) {
384
384
  const l = document.createElement("col");
385
- l.setAttribute("width", r), n.appendChild(l);
385
+ l.setAttribute("width", r), o.appendChild(l);
386
386
  }
387
- i.prepend(n);
387
+ i.prepend(o);
388
388
  }
389
389
  if (!i.querySelector("thead")) {
390
390
  const e = document.createElement("thead"), s = i.querySelector("colgroup");
@@ -392,13 +392,13 @@ bt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), h(H, bt, /* @__PUR
392
392
  }
393
393
  i.classList.add("nine-table-element"), i.style.display = "table";
394
394
  }, "#ensureTableStructure")), h(H, K, /* @__PURE__ */ c((i, e) => {
395
- const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
396
- if (r === 0 || n.length === 0) return;
397
- let o = 0;
398
- n.forEach((a) => {
399
- o += a.colSpan || 1;
395
+ const s = Array.from(i.querySelectorAll(e + " tr")), o = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
396
+ if (r === 0 || o.length === 0) return;
397
+ let n = 0;
398
+ o.forEach((a) => {
399
+ n += a.colSpan || 1;
400
400
  });
401
- const l = Array.from(Array(r), () => Array(o).fill(null));
401
+ const l = Array.from(Array(r), () => Array(n).fill(null));
402
402
  s.forEach((a) => {
403
403
  const d = a.sectionRowIndex;
404
404
  let f = 0;
@@ -410,8 +410,8 @@ bt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), h(H, bt, /* @__PUR
410
410
  }
411
411
  const b = u.rowSpan || 1, m = u.colSpan || 1;
412
412
  for (let E = 0; E < b; E++)
413
- for (let T = 0; T < m; T++)
414
- d + E < r && f + T < o && (l[d + E][f + T] = E === 0 && T === 0 ? "1" : "0");
413
+ for (let k = 0; k < m; k++)
414
+ d + E < r && f + k < n && (l[d + E][f + k] = E === 0 && k === 0 ? "1" : "0");
415
415
  });
416
416
  }), s.forEach((a) => {
417
417
  const d = a.sectionRowIndex;
@@ -425,10 +425,10 @@ bt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), h(H, bt, /* @__PUR
425
425
  });
426
426
  }, "#resetColIndex"));
427
427
  let Wt = H;
428
- var y, _, R, $, V, j, gt, pt, nt, ot, yt, mt, rt, F, vt;
428
+ var p, _, R, $, V, j, gt, yt, nt, ot, pt, mt, rt, F, xt;
429
429
  const Kt = class Kt {
430
430
  constructor(i) {
431
- h(this, y);
431
+ h(this, p);
432
432
  h(this, _, /* @__PURE__ */ new Map());
433
433
  h(this, R, null);
434
434
  h(this, $, null);
@@ -436,48 +436,48 @@ const Kt = class Kt {
436
436
  h(this, j, 40);
437
437
  w(this, "refresh", /* @__PURE__ */ c(() => {
438
438
  var e;
439
- const i = t(this, y).querySelector(".ng-container-body");
440
- i && (t(this, nt).call(this), t(this, F).call(this, i.scrollTop), (e = t(this, y).querySelector("nine-table-vscrollbar")) == null || e.refresh());
439
+ const i = t(this, p).querySelector(".ng-container-body");
440
+ i && (t(this, nt).call(this), t(this, F).call(this, i.scrollTop), (e = t(this, p).querySelector("nine-table-vscrollbar")) == null || e.refresh());
441
441
  }, "refresh"));
442
442
  w(this, "initialize", /* @__PURE__ */ c(() => {
443
- g(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
444
- const r = t(this, y).querySelector(n);
443
+ g(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
444
+ const r = t(this, p).querySelector(o);
445
445
  if (!r) return;
446
- const o = r.querySelector("table");
447
- if (!o) return;
448
- const l = o.querySelector("tbody");
446
+ const n = r.querySelector("table");
447
+ if (!n) return;
448
+ const l = n.querySelector("tbody");
449
449
  if (!l) return;
450
450
  const d = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
451
- t(this, _).set(n, d);
451
+ t(this, _).set(o, d);
452
452
  });
453
- const i = t(this, y).querySelector(".ng-container-body"), e = t(this, y).querySelector(".ng-container-left"), s = t(this, y).querySelector(".ng-container-right");
453
+ const i = t(this, p).querySelector(".ng-container-body"), e = t(this, p).querySelector(".ng-container-left"), s = t(this, p).querySelector(".ng-container-right");
454
454
  if (i) {
455
- t(this, pt).call(this, i), t(this, rt).call(this), t(this, nt).call(this), t(this, F).call(this, i.scrollTop);
456
- let n = i.scrollTop;
457
- const r = /* @__PURE__ */ c((o) => {
455
+ t(this, yt).call(this, i), t(this, rt).call(this), t(this, nt).call(this), t(this, F).call(this, i.scrollTop);
456
+ let o = i.scrollTop;
457
+ const r = /* @__PURE__ */ c((n) => {
458
458
  var l;
459
- e && e.scrollTop !== o && (e.scrollTop = o), s && s.scrollTop !== o && (s.scrollTop = o), t(this, F).call(this, o), (l = t(this, y).querySelector("nine-table-vscrollbar")) == null || l.refresh();
459
+ e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, F).call(this, n), (l = t(this, p).querySelector("nine-table-vscrollbar")) == null || l.refresh();
460
460
  }, "syncScroll");
461
461
  i.addEventListener("scroll", () => {
462
- const o = i.scrollTop;
463
- n !== o && (n = o, r(o));
462
+ const n = i.scrollTop;
463
+ o !== n && (o = n, r(n));
464
464
  });
465
465
  }
466
466
  }, "initialize"));
467
467
  h(this, gt, /* @__PURE__ */ c((i, e) => {
468
468
  const s = t(this, _).get(e);
469
469
  if (!s || s.length === 0) return;
470
- const n = i.querySelector("tbody");
471
- if (!n) return;
472
- n.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
473
- const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
470
+ const o = i.querySelector("tbody");
471
+ if (!o) return;
472
+ o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
473
+ const r = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
474
474
  for (let l = 0; l < t(this, j); l++)
475
475
  s.forEach((a) => {
476
- o.appendChild(a.cloneNode(!0));
476
+ n.appendChild(a.cloneNode(!0));
477
477
  });
478
- r ? r.before(o) : n.appendChild(o);
478
+ r ? r.before(n) : o.appendChild(n);
479
479
  }, "#renderRows"));
480
- h(this, pt, /* @__PURE__ */ c((i) => {
480
+ h(this, yt, /* @__PURE__ */ c((i) => {
481
481
  if (t(this, R) !== null && t(this, R) > 0)
482
482
  return t(this, R);
483
483
  const e = t(this, _).get(".ng-container-body");
@@ -485,25 +485,25 @@ const Kt = class Kt {
485
485
  const s = i.querySelector("tbody");
486
486
  if (!s) return 24;
487
487
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
488
- const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
488
+ const o = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
489
489
  e.forEach((b) => {
490
490
  r.appendChild(b.cloneNode(!0));
491
- }), n ? n.before(r) : s.appendChild(r);
492
- const o = t(this, y), l = o.style.display, a = o.style.visibility, d = o.style.position;
493
- (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
491
+ }), o ? o.before(r) : s.appendChild(r);
492
+ const n = t(this, p), l = n.style.display, a = n.style.visibility, d = n.style.position;
493
+ (l === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
494
494
  let f = 0;
495
495
  const u = s.querySelectorAll("tr:not(.nodata)");
496
496
  return u.forEach((b) => {
497
497
  f += b.offsetHeight || b.getBoundingClientRect().height;
498
- }), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = a, o.style.position = d, g(this, R, f > 0 ? f : 24), t(this, ot).call(this), t(this, R);
498
+ }), u.forEach((b) => b.remove()), n.style.display = l, n.style.visibility = a, n.style.position = d, g(this, R, f > 0 ? f : 24), t(this, ot).call(this), t(this, R);
499
499
  }, "#measureAndCacheHeight"));
500
500
  h(this, nt, /* @__PURE__ */ c(() => {
501
- var r, o, l, a;
502
- if (!t(this, y).querySelector(".ng-container-body")) return;
503
- const e = (typeof ((r = t(this, y).data) == null ? void 0 : r.count) == "function" ? t(this, y).data.count() : null) ?? ((l = (o = t(this, y).dataManager) == null ? void 0 : o.rawRecords) == null ? void 0 : l.length) ?? ((a = t(this, y).data) == null ? void 0 : a.length) ?? 100, s = t(this, R) || 24, n = e * s;
501
+ var r, n, l, a;
502
+ if (!t(this, p).querySelector(".ng-container-body")) return;
503
+ const e = (typeof ((r = t(this, p).data) == null ? void 0 : r.count) == "function" ? t(this, p).data.count() : null) ?? ((l = (n = t(this, p).dataManager) == null ? void 0 : n.rawRecords) == null ? void 0 : l.length) ?? ((a = t(this, p).data) == null ? void 0 : a.length) ?? 100, s = t(this, R) || 24, o = e * s;
504
504
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
505
- const f = t(this, y).querySelector(d), u = f == null ? void 0 : f.querySelector("table");
506
- u && (u.style.height = `${n}px`);
505
+ const f = t(this, p).querySelector(d), u = f == null ? void 0 : f.querySelector("table");
506
+ u && (u.style.height = `${o}px`);
507
507
  });
508
508
  }, "#updateVirtualScrollHeight"));
509
509
  h(this, ot, /* @__PURE__ */ c(() => {
@@ -513,69 +513,69 @@ const Kt = class Kt {
513
513
  } else
514
514
  g(this, j, 40);
515
515
  }, "#updateRowCount"));
516
- h(this, yt, /* @__PURE__ */ c(() => {
516
+ h(this, pt, /* @__PURE__ */ c(() => {
517
517
  var a, d, f;
518
- const i = t(this, y).querySelector(".ng-container-left table"), e = t(this, y).querySelector(".ng-container-body table"), s = t(this, y).querySelector(".ng-container-right table");
518
+ const i = t(this, p).querySelector(".ng-container-left table"), e = t(this, p).querySelector(".ng-container-body table"), s = t(this, p).querySelector(".ng-container-right table");
519
519
  if (!e) return;
520
- 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);
520
+ 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);
521
521
  for (let u = 0; u < l; u++) {
522
522
  const b = [
523
- ((a = n[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
523
+ ((a = o[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
524
524
  ((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
525
- ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
525
+ ((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
526
526
  ], m = Math.max(...b);
527
- m > 0 && (n[u] && (n[u].style.height = `${m}px`), r[u] && (r[u].style.height = `${m}px`), o[u] && (o[u].style.height = `${m}px`));
527
+ m > 0 && (o[u] && (o[u].style.height = `${m}px`), r[u] && (r[u].style.height = `${m}px`), n[u] && (n[u].style.height = `${m}px`));
528
528
  }
529
529
  }, "#syncRowHeights"));
530
530
  h(this, mt, /* @__PURE__ */ c(() => {
531
- !t(this, y) || !(t(this, y) instanceof HTMLElement) || (g(this, $, new ResizeObserver((i) => {
531
+ !t(this, p) || !(t(this, p) instanceof HTMLElement) || (g(this, $, new ResizeObserver((i) => {
532
532
  for (const e of i) {
533
533
  const s = e.target;
534
534
  if (!s.classList.contains("active")) continue;
535
- const n = e.contentRect.height;
536
- if (n > 0) {
535
+ const o = e.contentRect.height;
536
+ if (o > 0) {
537
537
  let r = 0;
538
- const o = s.querySelector("thead");
539
- o && (r += o.offsetHeight || o.getBoundingClientRect().height);
540
- const l = Math.max(n - r, 100);
538
+ const n = s.querySelector("thead");
539
+ n && (r += n.offsetHeight || n.getBoundingClientRect().height);
540
+ const l = Math.max(o - r, 100);
541
541
  t(this, V) !== l && (g(this, V, l), t(this, ot).call(this), t(this, R) !== null && t(this, rt).call(this));
542
542
  }
543
543
  }
544
- })), t(this, $).observe(t(this, y)));
544
+ })), t(this, $).observe(t(this, p)));
545
545
  }, "#initResizeObserver"));
546
546
  h(this, rt, /* @__PURE__ */ c(() => {
547
547
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
548
- const e = t(this, y).querySelector(i);
548
+ const e = t(this, p).querySelector(i);
549
549
  e && e.querySelector("tbody") && t(this, gt).call(this, e, i);
550
- }), t(this, yt).call(this);
550
+ }), t(this, pt).call(this);
551
551
  }, "#renderAllContainers"));
552
552
  h(this, F, /* @__PURE__ */ c((i) => {
553
553
  var r;
554
554
  const e = t(this, R);
555
555
  if (!e || e <= 0) return;
556
- const s = Math.max(0, Math.floor(i / e)), n = ((r = t(this, _).get(".ng-container-body")) == null ? void 0 : r.length) || 1;
557
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
558
- const l = t(this, y).querySelector(o);
556
+ const s = Math.max(0, Math.floor(i / e)), o = ((r = t(this, _).get(".ng-container-body")) == null ? void 0 : r.length) || 1;
557
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
558
+ const l = t(this, p).querySelector(n);
559
559
  if (!l) return;
560
560
  const a = l.querySelector("tbody");
561
561
  if (!a) return;
562
562
  Array.from(a.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
563
- var E, T, z, Qt;
564
- const b = s + Math.floor(u / n), m = (typeof t(this, y).getData == "function" ? t(this, y).getData(b) : null) ?? (typeof ((E = t(this, y).data) == null ? void 0 : E.get) == "function" ? t(this, y).data.get(b) : null) ?? ((z = (T = t(this, y).dataManager) == null ? void 0 : T.rawRecords) == null ? void 0 : z[b]) ?? ((Qt = t(this, y).data) == null ? void 0 : Qt[b]) ?? { _index: b };
565
- f.style.display = "", t(this, vt).call(this, f, m, b);
563
+ var E, k, z, Qt;
564
+ const b = s + Math.floor(u / o), m = (typeof t(this, p).getData == "function" ? t(this, p).getData(b) : null) ?? (typeof ((E = t(this, p).data) == null ? void 0 : E.get) == "function" ? t(this, p).data.get(b) : null) ?? ((z = (k = t(this, p).dataManager) == null ? void 0 : k.rawRecords) == null ? void 0 : z[b]) ?? ((Qt = t(this, p).data) == null ? void 0 : Qt[b]) ?? { _index: b };
565
+ f.style.display = "", t(this, xt).call(this, f, m, b);
566
566
  });
567
567
  });
568
568
  }, "#handleScroll"));
569
- h(this, vt, /* @__PURE__ */ c((i, e, s) => {
570
- i.dataset.row = s, Array.from(i.cells).forEach((n, r) => {
571
- const o = n.dataset.bind;
572
- 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;
569
+ h(this, xt, /* @__PURE__ */ c((i, e, s) => {
570
+ i.dataset.row = s, Array.from(i.cells).forEach((o, r) => {
571
+ const n = o.dataset.bind;
572
+ 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;
573
573
  });
574
574
  }, "#bindRowData"));
575
575
  w(this, "destroy", /* @__PURE__ */ c(() => {
576
576
  t(this, $) && (t(this, $).disconnect(), g(this, $, null));
577
577
  }, "destroy"));
578
- g(this, y, i), t(this, mt).call(this);
578
+ g(this, p, i), t(this, mt).call(this);
579
579
  }
580
580
  getRowHeight() {
581
581
  return t(this, R);
@@ -585,39 +585,39 @@ const Kt = class Kt {
585
585
  return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
586
586
  }
587
587
  };
588
- y = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), V = new WeakMap(), j = new WeakMap(), gt = new WeakMap(), pt = new WeakMap(), nt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), mt = new WeakMap(), rt = new WeakMap(), F = new WeakMap(), vt = new WeakMap(), c(Kt, "RowManager");
588
+ p = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), V = new WeakMap(), j = new WeakMap(), gt = new WeakMap(), yt = new WeakMap(), nt = new WeakMap(), ot = new WeakMap(), pt = new WeakMap(), mt = new WeakMap(), rt = new WeakMap(), F = new WeakMap(), xt = new WeakMap(), c(Kt, "RowManager");
589
589
  let Ot = Kt;
590
- var Z, G, xt, wt, St, Et, Rt;
590
+ var Z, G, vt, wt, St, Et, Rt;
591
591
  const et = class et extends HTMLElement {
592
592
  constructor() {
593
593
  super();
594
594
  h(this, Z, null);
595
595
  h(this, G);
596
- h(this, xt, /* @__PURE__ */ c(() => {
596
+ h(this, vt, /* @__PURE__ */ c(() => {
597
597
  [
598
598
  { selector: ".ng-container-body", type: null },
599
599
  { selector: ".ng-container-left", type: "left" },
600
600
  { selector: ".ng-container-right", type: "right" }
601
- ].forEach(({ selector: s, type: n }) => {
601
+ ].forEach(({ selector: s, type: o }) => {
602
602
  const r = this.querySelector(s);
603
603
  if (!r) return;
604
- const o = t(this, St).call(this, t(this, Z), n);
605
- r.innerHTML = "", r.appendChild(o);
604
+ const n = t(this, St).call(this, t(this, Z), o);
605
+ r.innerHTML = "", r.appendChild(n);
606
606
  });
607
607
  }, "#renderSplitContainers"));
608
608
  h(this, wt, /* @__PURE__ */ c(() => {
609
609
  ["left", "right"].forEach((e) => {
610
- const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
611
- if (!s || !n) return;
610
+ const s = this.querySelector(`.ng-container-${e}`), o = s == null ? void 0 : s.querySelector("table");
611
+ if (!s || !o) return;
612
612
  let r = 0;
613
- n.querySelectorAll("col").forEach((o) => {
614
- const l = parseInt(o.getAttribute("width"), 10);
613
+ o.querySelectorAll("col").forEach((n) => {
614
+ const l = parseInt(n.getAttribute("width"), 10);
615
615
  isNaN(r) || (r += l);
616
616
  }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
617
617
  });
618
618
  }, "#updateContainerWidths"));
619
619
  w(this, "generate", /* @__PURE__ */ c((e) => {
620
- e && (g(this, Z, Wt.compile(e)), t(this, Z).style.display = "table", t(this, xt).call(this), t(this, wt).call(this), t(this, G).initialize(), setTimeout(() => {
620
+ e && (g(this, Z, Wt.compile(e)), t(this, Z).style.display = "table", t(this, vt).call(this), t(this, wt).call(this), t(this, G).initialize(), setTimeout(() => {
621
621
  var s;
622
622
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
623
623
  }, 0));
@@ -626,14 +626,18 @@ const et = class et extends HTMLElement {
626
626
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
627
627
  */
628
628
  h(this, St, /* @__PURE__ */ c((e, s) => {
629
- const n = e.cloneNode(!0);
630
- return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((r) => {
631
- r.getAttribute("fixed") !== "left" && r.remove();
632
- }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((r) => {
633
- r.getAttribute("fixed") !== "right" && r.remove();
634
- }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((r) => {
635
- r.remove();
636
- }), n;
629
+ const o = e.cloneNode(!0), r = o.querySelector("tbody");
630
+ if (r) {
631
+ const n = document.createElement("tbody");
632
+ n.className = "ng-fixed-tbody", r.className = "ng-scroll-tbody", r.before(n);
633
+ }
634
+ return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
635
+ n.getAttribute("fixed") !== "left" && n.remove();
636
+ }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
637
+ n.getAttribute("fixed") !== "right" && n.remove();
638
+ }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((n) => {
639
+ n.remove();
640
+ }), o;
637
641
  }, "#createSplitTable"));
638
642
  w(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, G).getRowHeight(), "getRowHeight"));
639
643
  w(this, "scrollToX", /* @__PURE__ */ c((e) => {
@@ -684,6 +688,12 @@ const et = class et extends HTMLElement {
684
688
  border-right: 1px solid #e5e7eb;
685
689
  flex-shrink: 0;
686
690
  }
691
+
692
+ nine-table-sheet thead {
693
+ position: sticky;
694
+ top: 0;
695
+ }
696
+
687
697
 
688
698
  nine-table-sheet .ng-container-body {
689
699
  display: flex;
@@ -793,31 +803,31 @@ const et = class et extends HTMLElement {
793
803
  this.innerHTML = "", tt.log("NineTableSheet destroyed.");
794
804
  }
795
805
  };
796
- Z = new WeakMap(), G = new WeakMap(), xt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Rt = new WeakMap(), c(et, "NineTableSheet"), w(et, "SCROLLBAR_SIZE", 16);
806
+ Z = new WeakMap(), G = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Rt = new WeakMap(), c(et, "NineTableSheet"), w(et, "SCROLLBAR_SIZE", 16);
797
807
  let ht = et;
798
808
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ht);
799
- var kt, lt;
809
+ var Tt, lt;
800
810
  const jt = class jt extends HTMLElement {
801
811
  constructor() {
802
812
  super();
803
- h(this, kt, /* @__PURE__ */ c(() => {
813
+ h(this, Tt, /* @__PURE__ */ c(() => {
804
814
  var e;
805
815
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
806
- var o;
807
- const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
808
- t(this, lt).call(this, r, n);
816
+ var n;
817
+ const o = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((n = s.target.closest(".nine-tab-item")) == null ? void 0 : n.dataset.index, 10);
818
+ t(this, lt).call(this, r, o);
809
819
  }), t(this, lt).call(this, 0, !1);
810
820
  }, "#init"));
811
821
  h(this, lt, /* @__PURE__ */ c((e, s = !1) => {
812
- const n = /* @__PURE__ */ c(() => {
822
+ const o = /* @__PURE__ */ c(() => {
813
823
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
814
824
  Array.from(this.querySelectorAll("nine-splitter")).forEach((m) => m.style.setProperty("display", "none"));
815
825
  const b = f.filter((m) => m.classList.contains("active"));
816
826
  b.length < 2 || b.forEach((m) => {
817
- const E = parseInt(m.getAttribute("data-index"), 10), T = this.querySelector(`nine-splitter[data-split-index="${E}"]`), z = f[E + 1];
818
- T && z && z.classList.contains("active") && T.style.setProperty("display", "flex");
827
+ const E = parseInt(m.getAttribute("data-index"), 10), k = this.querySelector(`nine-splitter[data-split-index="${E}"]`), z = f[E + 1];
828
+ k && z && z.classList.contains("active") && k.style.setProperty("display", "flex");
819
829
  });
820
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), a = o.querySelectorAll("nine-table-sheet");
830
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), a = n.querySelectorAll("nine-table-sheet");
821
831
  if (!l[e]) return;
822
832
  if (!s)
823
833
  l.forEach((f, u) => {
@@ -831,45 +841,45 @@ const jt = class jt extends HTMLElement {
831
841
  if (f.classList.contains("active") && u.length <= 1)
832
842
  return;
833
843
  f.classList.toggle("active");
834
- const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
844
+ const b = n.querySelector(`nine-table-sheet[data-index="${e}"]`);
835
845
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
836
846
  }
837
- const d = o.querySelectorAll("nine-table-sheet.active");
847
+ const d = n.querySelectorAll("nine-table-sheet.active");
838
848
  d == null || d.forEach((f) => {
839
849
  f.style.flex = d.length > 1 ? "1 1 0%" : "1 1 100%";
840
- }), n();
850
+ }), o();
841
851
  }, "#switchSheet"));
842
852
  }
843
853
  connectedCallback() {
844
- t(this, kt).call(this);
854
+ t(this, Tt).call(this);
845
855
  }
846
856
  };
847
- kt = new WeakMap(), lt = new WeakMap(), c(jt, "NineTableSheets");
857
+ Tt = new WeakMap(), lt = new WeakMap(), c(jt, "NineTableSheets");
848
858
  let zt = jt;
849
859
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", zt);
850
- var k, Tt, ct, At;
860
+ var T, kt, ct, qt;
851
861
  const Ft = class Ft {
852
862
  constructor(i) {
853
- h(this, k);
854
- h(this, Tt, /* @__PURE__ */ c(() => {
855
- t(this, At).call(this), new ResizeObserver((i) => {
863
+ h(this, T);
864
+ h(this, kt, /* @__PURE__ */ c(() => {
865
+ t(this, qt).call(this), new ResizeObserver((i) => {
856
866
  for (let e of i)
857
- t(this, k).getAttribute("auto-height") === "true" && t(this, ct).call(this);
858
- }).observe(t(this, k));
867
+ t(this, T).getAttribute("auto-height") === "true" && t(this, ct).call(this);
868
+ }).observe(t(this, T));
859
869
  }, "#init"));
860
870
  h(this, ct, /* @__PURE__ */ c(() => {
861
871
  var a, d;
862
- const i = Array.from(t(this, k).shadowRoot.querySelectorAll("nine-table-sheet.active"));
872
+ const i = Array.from(t(this, T).shadowRoot.querySelectorAll("nine-table-sheet.active"));
863
873
  if (i.length === 0) return;
864
- const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), n = (a = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : a.getBoundingClientRect().height, r = (d = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, o = ht.SCROLLBAR_SIZE, l = e * s + n + r + o;
865
- t(this, k).style.height = `${l}px`;
874
+ const e = parseInt(t(this, T).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), o = (a = t(this, T).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : a.getBoundingClientRect().height, r = (d = t(this, T).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, n = ht.SCROLLBAR_SIZE, l = e * s + o + r + n;
875
+ t(this, T).style.height = `${l}px`;
866
876
  }, "#applyAutoHeight"));
867
- h(this, At, /* @__PURE__ */ c(() => {
868
- const e = Array.from(t(this, k).children).filter((a) => a.tagName === "TABLE"), s = t(this, k).getAttribute("auto-height") === "true", n = e.length, r = e.map((a, d) => {
869
- const u = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, b = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
877
+ h(this, qt, /* @__PURE__ */ c(() => {
878
+ const e = Array.from(t(this, T).children).filter((a) => a.tagName === "TABLE"), s = t(this, T).getAttribute("auto-height") === "true", o = e.length, r = e.map((a, d) => {
879
+ 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>` : "";
870
880
  return u + b;
871
- }).join(""), o = e.map((a, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
872
- t(this, k).shadowRoot.innerHTML = `
881
+ }).join(""), n = e.map((a, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
882
+ t(this, T).shadowRoot.innerHTML = `
873
883
  <style>
874
884
  :host {
875
885
  display: flex;
@@ -960,7 +970,7 @@ const Ft = class Ft {
960
970
  <nine-table-sheets>
961
971
  <nine-table-sheets-body>${r}</nine-table-sheets-body>
962
972
  <nine-table-sheets-footer>
963
- <div class="nine-tab-bar">${o}</div>
973
+ <div class="nine-tab-bar">${n}</div>
964
974
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
965
975
  </nine-table-sheets-footer>
966
976
  </nine-table-sheets>
@@ -968,17 +978,17 @@ const Ft = class Ft {
968
978
  </nine-table-body>
969
979
  <nine-table-footer></nine-table-footer>
970
980
  `;
971
- const l = t(this, k).shadowRoot.querySelectorAll("nine-table-sheet");
981
+ const l = t(this, T).shadowRoot.querySelectorAll("nine-table-sheet");
972
982
  l == null || l.forEach((a, d) => {
973
983
  e[d] && setTimeout(() => {
974
984
  a.generate(e[d]), s && t(this, ct).call(this);
975
985
  });
976
986
  });
977
987
  }, "#render"));
978
- g(this, k, i), t(this, Tt).call(this);
988
+ g(this, T, i), t(this, kt).call(this);
979
989
  }
980
990
  };
981
- k = new WeakMap(), Tt = new WeakMap(), ct = new WeakMap(), At = new WeakMap(), c(Ft, "LayoutManager");
991
+ T = new WeakMap(), kt = new WeakMap(), ct = new WeakMap(), qt = new WeakMap(), c(Ft, "LayoutManager");
982
992
  let Dt = Ft;
983
993
  var W, X;
984
994
  const Zt = class Zt {
@@ -992,33 +1002,33 @@ const Zt = class Zt {
992
1002
  return t(this, X);
993
1003
  }
994
1004
  set at(i) {
995
- var s, n;
1005
+ var s, o;
996
1006
  g(this, X, parseInt(i, 10));
997
- const e = ((n = (s = t(this, W).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || t(this, W).owner.body;
1007
+ const e = ((o = (s = t(this, W).owner).querySelector) == null ? void 0 : o.call(s, ".ng-container-body")) || t(this, W).owner.body;
998
1008
  e && !e.querySelector(`tbody.bindable tr[data-row="${t(this, X)}"]`) && setTimeout(() => {
999
- var r, o;
1000
- (o = (r = t(this, W).owner).scrollTo_V1) == null || o.call(r, t(this, X));
1009
+ var r, n;
1010
+ (n = (r = t(this, W).owner).scrollTo_V1) == null || n.call(r, t(this, X));
1001
1011
  });
1002
1012
  }
1003
1013
  };
1004
1014
  W = new WeakMap(), X = new WeakMap(), c(Zt, "ngRow");
1005
- let Pt = Zt;
1006
- var A, x, q, J, qt, O, Lt, at, Ht, Ct, Q;
1015
+ let Nt = Zt;
1016
+ var q, v, A, J, At, O, Lt, at, Ht, Ct, Q;
1007
1017
  const L = class L {
1008
1018
  constructor(i, e) {
1009
- h(this, A);
1010
- h(this, x);
1011
- h(this, q, []);
1019
+ h(this, q);
1020
+ h(this, v);
1021
+ h(this, A, []);
1012
1022
  h(this, J, []);
1013
- h(this, qt, 0);
1023
+ h(this, At, 0);
1014
1024
  h(this, O, []);
1015
1025
  h(this, Lt, /* @__PURE__ */ c(() => {
1016
1026
  g(this, O, []);
1017
- const i = t(this, A).template || [];
1027
+ const i = t(this, q).template || [];
1018
1028
  Array.from(i).forEach((e) => {
1019
1029
  var s;
1020
1030
  t(this, O).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1021
- }), (t(this, x).rawRecords || []).forEach((e) => {
1031
+ }), (t(this, v).rawRecords || []).forEach((e) => {
1022
1032
  e.__ng || (e.__ng = t(this, at).call(this)), e.__ng.height = t(this, O).slice();
1023
1033
  });
1024
1034
  }, "#initialize"));
@@ -1035,21 +1045,21 @@ const L = class L {
1035
1045
  _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, O).slice(), -1, {}, {}]
1036
1046
  }), "#getDefaultMeta"));
1037
1047
  w(this, "reset", /* @__PURE__ */ c(() => {
1038
- g(this, q, []), g(this, J, []);
1048
+ g(this, A, []), g(this, J, []);
1039
1049
  }, "reset"));
1040
1050
  w(this, "clear", /* @__PURE__ */ c(() => {
1041
1051
  var i;
1042
- t(this, x).rawRecords = [], g(this, q, []), g(this, J, []), (i = t(this, x).viewRecords) != null && i.reset && t(this, x).viewRecords.reset();
1052
+ t(this, v).rawRecords = [], g(this, A, []), g(this, J, []), (i = t(this, v).viewRecords) != null && i.reset && t(this, v).viewRecords.reset();
1043
1053
  }, "clear"));
1044
1054
  h(this, Ht, /* @__PURE__ */ c((i) => {
1045
- var n;
1055
+ var o;
1046
1056
  Array.isArray(i) || (i = [i]);
1047
- const e = typeof ((n = t(this, A).fields) == null ? void 0 : n.get) == "function" ? t(this, A).fields.get() : Object.keys(i[0] || {}), s = [];
1057
+ const e = typeof ((o = t(this, q).fields) == null ? void 0 : o.get) == "function" ? t(this, q).fields.get() : Object.keys(i[0] || {}), s = [];
1048
1058
  return i.forEach((r) => {
1049
- const o = { v: [] };
1059
+ const n = { v: [] };
1050
1060
  e.forEach((l) => {
1051
- o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1052
- }), s.push(o);
1061
+ n.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1062
+ }), s.push(n);
1053
1063
  }), s;
1054
1064
  }, "#json2Array"));
1055
1065
  h(this, Ct, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
@@ -1059,52 +1069,52 @@ const L = class L {
1059
1069
  var r;
1060
1070
  i === void 0 && (i = {});
1061
1071
  const s = t(this, Ht).call(this, i);
1062
- t(this, x).rawRecords = t(this, x).rawRecords.concat(t(this, Ct).call(this, s)), this.resetRecords();
1063
- const n = this.count() - 1;
1064
- return e || s.forEach((o, l) => {
1065
- const a = t(this, x).rawRecords[n - l];
1072
+ t(this, v).rawRecords = t(this, v).rawRecords.concat(t(this, Ct).call(this, s)), this.resetRecords();
1073
+ const o = this.count() - 1;
1074
+ return e || s.forEach((n, l) => {
1075
+ const a = t(this, v).rawRecords[o - l];
1066
1076
  a && (a.__ng.rowState = L.ROW_STATE.EMPTY);
1067
- }), (r = t(this, x).viewRecords) != null && r.reset && t(this, x).viewRecords.reset(), n;
1077
+ }), (r = t(this, v).viewRecords) != null && r.reset && t(this, v).viewRecords.reset(), o;
1068
1078
  }, "add"));
1069
1079
  w(this, "delete", /* @__PURE__ */ c((i) => {
1070
1080
  var s;
1071
1081
  let e = [];
1072
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, x).owner.row.at] : e = [parseInt(i, 10)], e.sort((n, r) => r - n).forEach((n) => {
1073
- if (t(this, q)[n]) {
1074
- const r = t(this, q)[n].__ng.rowid;
1075
- t(this, q)[n].__ng.rowState === L.ROW_STATE.INSERT ? t(this, x).rawRecords = t(this, x).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, x).rawRecords.forEach((o) => {
1076
- o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = L.ROW_STATE.DELETE);
1082
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, v).owner.row.at] : e = [parseInt(i, 10)], e.sort((o, r) => r - o).forEach((o) => {
1083
+ if (t(this, A)[o]) {
1084
+ const r = t(this, A)[o].__ng.rowid;
1085
+ t(this, A)[o].__ng.rowState === L.ROW_STATE.INSERT ? t(this, v).rawRecords = t(this, v).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, v).rawRecords.forEach((n) => {
1086
+ n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = L.ROW_STATE.DELETE);
1077
1087
  });
1078
1088
  }
1079
- }), this.resetRecords(), (s = t(this, x).viewRecords) != null && s.reset && t(this, x).viewRecords.reset();
1089
+ }), this.resetRecords(), (s = t(this, v).viewRecords) != null && s.reset && t(this, v).viewRecords.reset();
1080
1090
  }, "delete"));
1081
1091
  w(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1082
1092
  var a;
1083
1093
  i = parseInt(i, 10);
1084
- const r = (typeof ((a = t(this, A).fields) == null ? void 0 : a.get) == "function" ? t(this, A).fields.get() : []).indexOf(e);
1094
+ const r = (typeof ((a = t(this, q).fields) == null ? void 0 : a.get) == "function" ? t(this, q).fields.get() : []).indexOf(e);
1085
1095
  if (r < 0) return;
1086
- const o = this.getValidData()[i];
1087
- if (!o) return;
1088
- const l = o.v[r];
1089
- l !== s && o.__ng.rowState !== L.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = L.ROW_STATE.UPDATE), o.v[r] = s, t(this, x).owner.refreshData && t(this, x).owner.refreshData(i);
1096
+ const n = this.getValidData()[i];
1097
+ if (!n) return;
1098
+ const l = n.v[r];
1099
+ l !== s && n.__ng.rowState !== L.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = l), n.__ng.rowState = L.ROW_STATE.UPDATE), n.v[r] = s, t(this, v).owner.refreshData && t(this, v).owner.refreshData(i);
1090
1100
  }, "setValue"));
1091
1101
  w(this, "resetRecords", /* @__PURE__ */ c(() => {
1092
- g(this, J, t(this, x).rawRecords.filter((i) => !i.__ng.deleted)), g(this, q, t(this, x).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, x).rawRecords.forEach((i, e) => {
1102
+ g(this, J, t(this, v).rawRecords.filter((i) => !i.__ng.deleted)), g(this, A, t(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, v).rawRecords.forEach((i, e) => {
1093
1103
  i.__ng.rowidx = e;
1094
- }), t(this, q).forEach((i, e) => {
1104
+ }), t(this, A).forEach((i, e) => {
1095
1105
  i.__ng.i = e;
1096
1106
  });
1097
1107
  }, "resetRecords"));
1098
- w(this, "getValidData", /* @__PURE__ */ c(() => (t(this, q).length === 0 && t(this, x).rawRecords.length > 0 && this.resetRecords(), t(this, q)), "getValidData"));
1108
+ w(this, "getValidData", /* @__PURE__ */ c(() => (t(this, A).length === 0 && t(this, v).rawRecords.length > 0 && this.resetRecords(), t(this, A)), "getValidData"));
1099
1109
  h(this, Q, /* @__PURE__ */ c((i) => {
1100
1110
  var s;
1101
1111
  if (!i) return i;
1102
- const e = typeof ((s = t(this, A).fields) == null ? void 0 : s.get) == "function" ? t(this, A).fields.get() : [];
1103
- return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
1112
+ const e = typeof ((s = t(this, q).fields) == null ? void 0 : s.get) == "function" ? t(this, q).fields.get() : [];
1113
+ return Array.isArray(i) ? i.filter((o) => !o.__ng.deleted).map((o) => {
1104
1114
  const r = {};
1105
- return e.forEach((o, l) => {
1106
- r[o] = n.v ? n.v[l] : n[o];
1107
- }), r.__ng = n.__ng, r;
1115
+ return e.forEach((n, l) => {
1116
+ r[n] = o.v ? o.v[l] : o[n];
1117
+ }), r.__ng = o.__ng, r;
1108
1118
  }) : i;
1109
1119
  }, "#conv2"));
1110
1120
  w(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
@@ -1114,32 +1124,32 @@ const L = class L {
1114
1124
  if (!s || s.length <= 0) return;
1115
1125
  if (i == null) return t(this, Q).call(this, s);
1116
1126
  if (i < 0 || i >= s.length) return null;
1117
- const n = typeof ((r = t(this, A).fields) == null ? void 0 : r.get) == "function" ? t(this, A).fields.get() : [];
1127
+ const o = typeof ((r = t(this, q).fields) == null ? void 0 : r.get) == "function" ? t(this, q).fields.get() : [];
1118
1128
  if (e != null) {
1119
- const o = n.indexOf(e);
1120
- return o >= 0 ? s[i].v[o] : null;
1129
+ const n = o.indexOf(e);
1130
+ return n >= 0 ? s[i].v[n] : null;
1121
1131
  }
1122
1132
  return t(this, Q).call(this, s[i]);
1123
1133
  }, "get"));
1124
- g(this, A, i), g(this, x, e), t(this, Lt).call(this);
1134
+ g(this, q, i), g(this, v, e), t(this, Lt).call(this);
1125
1135
  }
1126
1136
  get source() {
1127
- return t(this, Q).call(this, t(this, x).rawRecords);
1137
+ return t(this, Q).call(this, t(this, v).rawRecords);
1128
1138
  }
1129
1139
  set source(i) {
1130
1140
  this.clear(), this.add(i, !1);
1131
1141
  }
1132
1142
  get nextId() {
1133
- return ++se(this, qt)._;
1143
+ return ++se(this, At)._;
1134
1144
  }
1135
1145
  get length() {
1136
- return t(this, q).length;
1146
+ return t(this, A).length;
1137
1147
  }
1138
1148
  getRowCount() {
1139
1149
  return this.length;
1140
1150
  }
1141
1151
  };
1142
- A = new WeakMap(), x = new WeakMap(), q = new WeakMap(), J = new WeakMap(), qt = new WeakMap(), O = new WeakMap(), Lt = new WeakMap(), at = new WeakMap(), Ht = new WeakMap(), Ct = new WeakMap(), Q = new WeakMap(), c(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1152
+ q = new WeakMap(), v = new WeakMap(), A = new WeakMap(), J = new WeakMap(), At = new WeakMap(), O = new WeakMap(), Lt = new WeakMap(), at = new WeakMap(), Ht = new WeakMap(), Ct = new WeakMap(), Q = new WeakMap(), c(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1143
1153
  w(L, "ROW_STATE", {
1144
1154
  EMPTY: "EMPTY",
1145
1155
  NORMAL: "NORMAL",
@@ -1147,28 +1157,28 @@ w(L, "ROW_STATE", {
1147
1157
  UPDATE: "UPDATE",
1148
1158
  DELETE: "DELETE"
1149
1159
  });
1150
- let Bt = L;
1160
+ let Pt = L;
1151
1161
  const Gt = class Gt {
1152
1162
  constructor(i) {
1153
- this.owner = i, this.row = new Pt(this), this.data = new Bt(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1163
+ this.owner = i, this.row = new Nt(this), this.data = new Pt(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1154
1164
  var e;
1155
1165
  (e = this.owner.view) != null && e.redraw && this.owner.view.redraw();
1156
1166
  }, this.setDataSource = (e) => {
1157
1167
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1158
1168
  }, this.getRowState = (e) => {
1159
- var n, r;
1169
+ var o, r;
1160
1170
  const s = parseInt(e, 10);
1161
1171
  if (!(s >= this.data.count()))
1162
- return (r = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : r.rowState;
1172
+ return (r = (o = this.data.getValidData()[s]) == null ? void 0 : o.__ng) == null ? void 0 : r.rowState;
1163
1173
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1164
1174
  this.row.at = e;
1165
- }, 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) => {
1166
- e = parseInt(e, 10), this.data.setValue(e, s, n);
1175
+ }, 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) => {
1176
+ e = parseInt(e, 10), this.data.setValue(e, s, o);
1167
1177
  }, this.setDataSource([]);
1168
1178
  }
1169
1179
  };
1170
1180
  c(Gt, "ngDataManager");
1171
- let Nt = Gt;
1181
+ let Bt = Gt;
1172
1182
  var U, _t;
1173
1183
  const Jt = class Jt extends HTMLElement {
1174
1184
  constructor() {
@@ -1176,7 +1186,7 @@ const Jt = class Jt extends HTMLElement {
1176
1186
  //#created = false;
1177
1187
  h(this, U);
1178
1188
  h(this, _t);
1179
- this.attachShadow({ mode: "open" }), g(this, U, new Nt(this));
1189
+ this.attachShadow({ mode: "open" }), g(this, U, new Bt(this));
1180
1190
  }
1181
1191
  connectedCallback() {
1182
1192
  g(this, _t, new Dt(this)), tt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));