@ninebone/table 0.0.337 β†’ 0.0.339

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,8 +7,8 @@ var c = (m, i) => se(m, "name", { value: i, configurable: !0 });
7
7
  var x = (m, i, e) => le(m, typeof i != "symbol" ? i + "" : i, e), oe = (m, i, e) => i.has(m) || ne("Cannot " + e);
8
8
  var t = (m, i, e) => (oe(m, i, "read from private field"), e ? e.call(m) : i.get(m)), a = (m, i, e) => i.has(m) ? ne("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, e), g = (m, i, e, s) => (oe(m, i, "write to private field"), s ? s.call(m, e) : i.set(m, e), e);
9
9
  var re = (m, i, e, s) => ({
10
- set _(n) {
11
- g(m, i, n, e);
10
+ set _(o) {
11
+ g(m, i, o, e);
12
12
  },
13
13
  get _() {
14
14
  return t(m, i, s);
@@ -22,13 +22,13 @@ const Kt = class Kt extends ce.constructor {
22
22
  };
23
23
  c(Kt, "Trace");
24
24
  let zt = Kt;
25
- const _ = new zt();
26
- var C, I, y, O, D, N, bt, B, gt;
25
+ const z = new zt();
26
+ var C, M, y, O, D, N, bt, B, gt;
27
27
  const jt = class jt extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  a(this, C);
31
- a(this, I, !1);
31
+ a(this, M, !1);
32
32
  a(this, y);
33
33
  a(this, O);
34
34
  a(this, D);
@@ -41,17 +41,17 @@ const jt = class jt extends HTMLElement {
41
41
  })), t(this, N).observe(e));
42
42
  }, "#observeResize"));
43
43
  x(this, "refresh", /* @__PURE__ */ c(() => {
44
- if (!t(this, C) || !t(this, y) || t(this, I)) return;
44
+ if (!t(this, C) || !t(this, y) || t(this, M)) return;
45
45
  const e = t(this, y).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const n = t(this, y).track, r = t(this, y).thumb, o = t(this, C).querySelector(".ng-container-bottom"), l = e.clientWidth, h = 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, h = s.scrollWidth;
48
48
  if (l !== 0 && h > 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 / h), d), 20);
57
57
  r.style.width = `${f}px`;
@@ -59,55 +59,55 @@ const jt = class jt extends HTMLElement {
59
59
  let p = 0;
60
60
  b > 0 && (p = parseInt(u / b * (d - f), 10)), p < 0 && (p = 0);
61
61
  const E = d - f;
62
- p > E && (p = E), r.style.left = `${p}px`, _.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= E - 1;
62
+ p > E && (p = E), r.style.left = `${p}px`, z.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= E - 1;
63
63
  }, "refresh"));
64
64
  a(this, B, /* @__PURE__ */ c((e) => {
65
65
  if (!t(this, y)) return !1;
66
- const s = t(this, y).container, n = s.querySelector("table");
67
- if (!n) return !1;
68
- const r = t(this, y).track.getBoundingClientRect(), o = t(this, y).thumb.clientWidth;
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 h = r.width - o;
71
+ const h = r.width - n;
72
72
  l > h && (l = h), 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 >= h - 1;
73
- const d = s.clientWidth, u = n.scrollWidth - d;
73
+ const d = s.clientWidth, u = o.scrollWidth - d;
74
74
  return h > 0 && u > 0 && (s.scrollLeft = l / h * u), l > 0 && l < h - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  a(this, gt, /* @__PURE__ */ c(() => {
77
- const e = /* @__PURE__ */ c((n) => {
77
+ const e = /* @__PURE__ */ c((o) => {
78
78
  clearInterval(t(this, O)), clearInterval(t(this, D));
79
79
  const r = parseInt(t(this, y).thumb.style.left || 0, 10);
80
- t(this, B).call(this, r + n), g(this, O, setInterval(() => {
80
+ t(this, B).call(this, r + o), g(this, O, setInterval(() => {
81
81
  clearInterval(t(this, O)), g(this, D, setInterval(() => {
82
- const o = parseInt(t(this, y).thumb.style.left || 0, 10);
83
- t(this, B).call(this, o + n) || clearInterval(t(this, D));
82
+ const n = parseInt(t(this, y).thumb.style.left || 0, 10);
83
+ t(this, B).call(this, n + o) || clearInterval(t(this, D));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ c(() => {
87
87
  clearInterval(t(this, O)), clearInterval(t(this, D));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((n) => {
90
- t(this, y).left.addEventListener(n, s), t(this, y).right.addEventListener(n, s), t(this, y).track.addEventListener(n, s);
91
- }), t(this, y).left.addEventListener("mousedown", (n) => {
92
- n.button === 0 && e(-20);
93
- }), t(this, y).right.addEventListener("mousedown", (n) => {
94
- n.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", (n) => {
96
- if (n.button !== 0) return;
97
- n.preventDefault();
98
- const r = t(this, y).track.getBoundingClientRect(), o = t(this, y).thumb.clientWidth;
99
- t(this, B).call(this, n.clientX - r.left - o / 2);
100
- }), t(this, y).thumb.addEventListener("mousedown", (n) => {
101
- if (n.button !== 0) return;
102
- n.stopPropagation(), n.preventDefault(), g(this, I, !0), this.shiftX = n.clientX - t(this, y).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
- if (!t(this, I)) return;
104
+ if (!t(this, M)) return;
105
105
  const h = t(this, y).track.getBoundingClientRect();
106
106
  t(this, B).call(this, l.clientX - h.left - this.shiftX);
107
- }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
108
- g(this, I, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
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
  }
@@ -189,7 +189,7 @@ const jt = class jt extends HTMLElement {
189
189
  left: this.querySelector(".ng-scroll-left"),
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
- t(this, I) || this.refresh();
192
+ t(this, M) || this.refresh();
193
193
  }), t(this, gt).call(this), t(this, bt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
@@ -198,15 +198,15 @@ const jt = class jt extends HTMLElement {
198
198
  t(this, N) && t(this, N).disconnect();
199
199
  }
200
200
  };
201
- C = new WeakMap(), I = new WeakMap(), y = new WeakMap(), O = new WeakMap(), D = new WeakMap(), N = new WeakMap(), bt = new WeakMap(), B = new WeakMap(), gt = new WeakMap(), c(jt, "NineTableHScrollBar");
201
+ C = new WeakMap(), M = new WeakMap(), y = new WeakMap(), O = new WeakMap(), D = new WeakMap(), N = new WeakMap(), bt = new WeakMap(), B = new WeakMap(), gt = new WeakMap(), c(jt, "NineTableHScrollBar");
202
202
  let Ot = jt;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ot);
204
- var P, $, v, st, nt, yt;
204
+ var P, I, v, st, nt, yt;
205
205
  const Zt = class Zt extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
208
  a(this, P);
209
- a(this, $, !1);
209
+ a(this, I, !1);
210
210
  a(this, v);
211
211
  a(this, st, 0);
212
212
  a(this, nt, 0);
@@ -214,20 +214,20 @@ const Zt = class Zt extends HTMLElement {
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
216
  x(this, "refresh", /* @__PURE__ */ c(() => {
217
- if (!t(this, P) || !t(this, v) || t(this, $)) return;
217
+ if (!t(this, P) || !t(this, v) || t(this, I)) return;
218
218
  const e = t(this, v).container, s = e.querySelector("table");
219
219
  if (!s) return;
220
- const n = t(this, v).track, r = t(this, v).thumb, o = e.clientHeight, l = s.scrollHeight;
221
- if (l <= o) {
220
+ const o = t(this, v).track, r = t(this, v).thumb, n = e.clientHeight, l = s.scrollHeight;
221
+ if (l <= n) {
222
222
  r.style.display = "none", t(this, v).top.disabled = !0, t(this, v).bottom.disabled = !0;
223
223
  return;
224
224
  } else
225
225
  r.style.display = "block";
226
- const h = n.clientHeight;
226
+ const h = o.clientHeight;
227
227
  if (h <= 0) return;
228
- const d = Math.max(Math.min(h * (o / l), h), 20);
228
+ const d = Math.max(Math.min(h * (n / l), h), 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 * (h - d));
233
233
  const p = h - d;
@@ -236,14 +236,14 @@ const Zt = class Zt extends HTMLElement {
236
236
  a(this, yt, /* @__PURE__ */ c(() => {
237
237
  const e = t(this, v).container;
238
238
  e.addEventListener("scroll", () => {
239
- t(this, $) || this.refresh();
239
+ t(this, I) || this.refresh();
240
240
  }), t(this, v).thumb.addEventListener("mousedown", (s) => {
241
241
  if (s.button !== 0) return;
242
- s.stopPropagation(), s.preventDefault(), g(this, $, !0), g(this, st, s.clientY), g(this, nt, e.scrollTop);
243
- const n = /* @__PURE__ */ c((o) => {
244
- if (!t(this, $)) return;
245
- const l = t(this, v).track.getBoundingClientRect(), h = t(this, v).thumb.clientHeight, f = l.height - h, u = o.clientY - t(this, st), b = e.clientHeight, p = e.querySelector("table");
246
- _.log(p), _.log(p.scrollHeight);
242
+ s.stopPropagation(), s.preventDefault(), g(this, I, !0), g(this, st, s.clientY), g(this, nt, e.scrollTop);
243
+ const o = /* @__PURE__ */ c((n) => {
244
+ if (!t(this, I)) return;
245
+ const l = t(this, v).track.getBoundingClientRect(), h = t(this, v).thumb.clientHeight, f = l.height - h, u = n.clientY - t(this, st), b = e.clientHeight, p = e.querySelector("table");
246
+ z.log(p), z.log(p.scrollHeight);
247
247
  const L = p.scrollHeight - b;
248
248
  if (f > 0 && L > 0) {
249
249
  const ft = u / f * L;
@@ -251,14 +251,14 @@ const Zt = class Zt extends HTMLElement {
251
251
  }
252
252
  this.refresh();
253
253
  }, "onMouseMove"), r = /* @__PURE__ */ c(() => {
254
- g(this, $, !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, v).track.addEventListener("mousedown", (s) => {
258
258
  if (s.button !== 0 || s.target === t(this, v).thumb) return;
259
- const n = t(this, v).track.getBoundingClientRect(), r = t(this, v).thumb.clientHeight, o = s.clientY - n.top - r / 2, h = n.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
259
+ const o = t(this, v).track.getBoundingClientRect(), r = t(this, v).thumb.clientHeight, n = s.clientY - o.top - r / 2, h = o.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
260
260
  if (h > 0 && u > 0) {
261
- const b = Math.max(0, Math.min(1, o / h));
261
+ const b = Math.max(0, Math.min(1, n / h));
262
262
  e.scrollTop = b * u;
263
263
  }
264
264
  this.refresh();
@@ -351,10 +351,10 @@ const Zt = class Zt extends HTMLElement {
351
351
  e();
352
352
  }
353
353
  };
354
- P = new WeakMap(), $ = new WeakMap(), v = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), yt = new WeakMap(), c(Zt, "NineTableVScrollBar");
354
+ P = new WeakMap(), I = new WeakMap(), v = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), yt = new WeakMap(), c(Zt, "NineTableVScrollBar");
355
355
  let Dt = Zt;
356
356
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Dt);
357
- var pt, Z;
357
+ var pt, j;
358
358
  const H = class H {
359
359
  /**
360
360
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
@@ -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, pt).call(n, e), t(r = H, Z).call(r, e, "thead"), t(o = H, Z).call(o, e, "tbody"), t(l = H, Z).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, d) => {
372
+ return t(o = H, pt).call(o, e), t(r = H, j).call(r, e, "thead"), t(n = H, j).call(n, e, "tbody"), t(l = H, j).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, d) => {
373
373
  const f = h.getAttribute("fixed");
374
374
  f && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((u) => {
375
375
  u.setAttribute("fixed", f);
@@ -377,28 +377,28 @@ const H = class H {
377
377
  }), e;
378
378
  }
379
379
  };
380
- pt = new WeakMap(), Z = new WeakMap(), c(H, "TableCompiler"), a(H, pt, /* @__PURE__ */ c((i) => {
380
+ pt = new WeakMap(), j = new WeakMap(), c(H, "TableCompiler"), a(H, pt, /* @__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");
391
391
  s ? s.after(e) : i.prepend(e);
392
392
  }
393
393
  i.classList.add("nine-table-element"), i.style.display = "table";
394
- }, "#ensureTableStructure")), a(H, Z, /* @__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((h) => {
399
- o += h.colSpan || 1;
394
+ }, "#ensureTableStructure")), a(H, j, /* @__PURE__ */ c((i, e) => {
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((h) => {
399
+ n += h.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((h) => {
403
403
  const d = h.sectionRowIndex;
404
404
  let f = 0;
@@ -411,7 +411,7 @@ pt = new WeakMap(), Z = new WeakMap(), c(H, "TableCompiler"), a(H, pt, /* @__PUR
411
411
  const b = u.rowSpan || 1, p = u.colSpan || 1;
412
412
  for (let E = 0; E < b; E++)
413
413
  for (let L = 0; L < p; L++)
414
- d + E < r && f + L < o && (l[d + E][f + L] = E === 0 && L === 0 ? "1" : "0");
414
+ d + E < r && f + L < n && (l[d + E][f + L] = E === 0 && L === 0 ? "1" : "0");
415
415
  });
416
416
  }), s.forEach((h) => {
417
417
  const d = h.sectionRowIndex;
@@ -425,123 +425,123 @@ pt = new WeakMap(), Z = new WeakMap(), c(H, "TableCompiler"), a(H, pt, /* @__PUR
425
425
  });
426
426
  }, "#resetColIndex"));
427
427
  let Nt = H;
428
- var Y, w, M, R, W, V, G, mt, xt, ot, rt, vt, wt, lt, J, St;
428
+ var Y, w, _, R, $, V, Z, mt, xt, ot, rt, vt, wt, lt, G, St;
429
429
  const Gt = class Gt {
430
430
  constructor(i) {
431
431
  a(this, Y);
432
432
  a(this, w);
433
- a(this, M, /* @__PURE__ */ new Map());
433
+ a(this, _, /* @__PURE__ */ new Map());
434
434
  a(this, R, null);
435
- a(this, W, null);
435
+ a(this, $, null);
436
436
  a(this, V, 0);
437
- a(this, G, 40);
437
+ a(this, Z, 40);
438
438
  x(this, "refresh", /* @__PURE__ */ c(() => {
439
439
  var e;
440
440
  const i = t(this, w).querySelector(".ng-container-body");
441
- i && (t(this, ot).call(this), t(this, J).call(this, i.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
441
+ i && (t(this, ot).call(this), t(this, G).call(this, i.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
442
442
  }, "refresh"));
443
443
  x(this, "initialize", /* @__PURE__ */ c(() => {
444
- g(this, R, null), t(this, M).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
445
- const r = t(this, w).querySelector(n);
444
+ g(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
445
+ const r = t(this, w).querySelector(o);
446
446
  if (!r) return;
447
- const o = r.querySelector("table");
448
- if (!o) return;
449
- const l = o.querySelector("tbody.bindable-tbody");
447
+ const n = r.querySelector("table");
448
+ if (!n) return;
449
+ const l = n.querySelector("tbody.bindable-tbody");
450
450
  if (!l) return;
451
451
  const d = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
452
- t(this, M).set(n, d);
452
+ t(this, _).set(o, d);
453
453
  });
454
454
  const i = t(this, w).querySelector(".ng-container-body"), e = t(this, w).querySelector(".ng-container-left"), s = t(this, w).querySelector(".ng-container-right");
455
455
  if (i) {
456
- t(this, xt).call(this, i), t(this, lt).call(this), t(this, ot).call(this), t(this, J).call(this, i.scrollTop);
457
- let n = i.scrollTop;
458
- const r = /* @__PURE__ */ c((o) => {
456
+ t(this, xt).call(this, i), t(this, lt).call(this), t(this, ot).call(this), t(this, G).call(this, i.scrollTop);
457
+ let o = i.scrollTop;
458
+ const r = /* @__PURE__ */ c((n) => {
459
459
  var l;
460
- e && e.scrollTop !== o && (e.scrollTop = o), s && s.scrollTop !== o && (s.scrollTop = o), t(this, J).call(this, o), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
460
+ e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, G).call(this, n), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
461
461
  }, "syncScroll");
462
462
  i.addEventListener("scroll", () => {
463
- const o = i.scrollTop;
464
- n !== o && (n = o, r(o));
463
+ const n = i.scrollTop;
464
+ o !== n && (o = n, r(n));
465
465
  });
466
466
  }
467
467
  }, "initialize"));
468
468
  a(this, mt, /* @__PURE__ */ c((i, e) => {
469
- const s = t(this, M).get(e);
469
+ const s = t(this, _).get(e);
470
470
  if (!s || s.length === 0) return;
471
- const n = i.querySelector("tbody.bindable-tbody");
472
- if (!n) return;
473
- n.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
474
- const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
475
- for (let l = 0; l < t(this, G); l++)
471
+ const o = i.querySelector("tbody.bindable-tbody");
472
+ if (!o) return;
473
+ o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
474
+ const r = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
475
+ for (let l = 0; l < t(this, Z); l++)
476
476
  s.forEach((h) => {
477
- o.appendChild(h.cloneNode(!0));
477
+ n.appendChild(h.cloneNode(!0));
478
478
  });
479
- r ? r.before(o) : n.appendChild(o);
479
+ r ? r.before(n) : o.appendChild(n);
480
480
  }, "#renderRows"));
481
481
  a(this, xt, /* @__PURE__ */ c((i) => {
482
482
  if (t(this, R) !== null && t(this, R) > 0)
483
483
  return t(this, R);
484
- const e = t(this, M).get(".ng-container-body");
484
+ const e = t(this, _).get(".ng-container-body");
485
485
  if (!e || e.length === 0) return 24;
486
486
  const s = i.querySelector("tbody.bindable-tbody") || i.querySelector("tbody.bindable-tbody:last-of-type");
487
487
  if (!s) return 24;
488
488
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
489
- const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
489
+ const o = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
490
490
  e.forEach((b) => {
491
491
  r.appendChild(b.cloneNode(!0));
492
- }), n ? n.before(r) : s.appendChild(r);
493
- const o = t(this, w), l = o.style.display, h = o.style.visibility, d = o.style.position;
494
- (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
492
+ }), o ? o.before(r) : s.appendChild(r);
493
+ const n = t(this, w), l = n.style.display, h = n.style.visibility, d = n.style.position;
494
+ (l === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
495
495
  let f = 0;
496
496
  const u = s.querySelectorAll("tr:not(.nodata)");
497
497
  return u.forEach((b) => {
498
498
  f += b.offsetHeight || b.getBoundingClientRect().height;
499
- }), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = h, o.style.position = d, g(this, R, f > 0 ? f : 24), t(this, rt).call(this), t(this, R);
499
+ }), u.forEach((b) => b.remove()), n.style.display = l, n.style.visibility = h, n.style.position = d, g(this, R, f > 0 ? f : 24), t(this, rt).call(this), t(this, R);
500
500
  }, "#measureAndCacheHeight"));
501
501
  a(this, ot, /* @__PURE__ */ c(() => {
502
502
  if (!t(this, w).querySelector(".ng-container-body")) return;
503
- const e = t(this, Y).data.get() || [], s = e.length > 0 ? e.length : 100, n = t(this, R), r = s * n;
504
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
505
- const l = t(this, w).querySelector(o), h = l == null ? void 0 : l.querySelector("table");
503
+ const e = t(this, Y).data.get() || [], s = e.length > 0 ? e.length : 100, o = t(this, R), r = s * o;
504
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
505
+ const l = t(this, w).querySelector(n), h = l == null ? void 0 : l.querySelector("table");
506
506
  h && (h.style.height = `${r}px`);
507
507
  });
508
508
  }, "#updateVirtualScrollHeight"));
509
509
  a(this, rt, /* @__PURE__ */ c(() => {
510
510
  if (t(this, V) > 0 && t(this, R) > 0) {
511
511
  const i = Math.ceil(t(this, V) / t(this, R));
512
- g(this, G, i + 20);
512
+ g(this, Z, i + 20);
513
513
  } else
514
- g(this, G, 40);
514
+ g(this, Z, 40);
515
515
  }, "#updateRowCount"));
516
516
  a(this, vt, /* @__PURE__ */ c(() => {
517
517
  var h, d, f;
518
518
  const i = t(this, w).querySelector(".ng-container-left table"), e = t(this, w).querySelector(".ng-container-body table"), s = t(this, w).querySelector(".ng-container-right table");
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
- ((h = n[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
523
+ ((h = o[u]) == null ? void 0 : h.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
  ], p = Math.max(...b);
527
- p > 0 && (n[u] && (n[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), o[u] && (o[u].style.height = `${p}px`));
527
+ p > 0 && (o[u] && (o[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), n[u] && (n[u].style.height = `${p}px`));
528
528
  }
529
529
  }, "#syncRowHeights"));
530
530
  a(this, wt, /* @__PURE__ */ c(() => {
531
- !t(this, w) || !(t(this, w) instanceof HTMLElement) || (g(this, W, new ResizeObserver((i) => {
531
+ !t(this, w) || !(t(this, w) 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, rt).call(this), t(this, R) !== null && t(this, lt).call(this));
542
542
  }
543
543
  }
544
- })), t(this, W).observe(t(this, w)));
544
+ })), t(this, $).observe(t(this, w)));
545
545
  }, "#initResizeObserver"));
546
546
  a(this, lt, /* @__PURE__ */ c(() => {
547
547
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
@@ -549,30 +549,30 @@ const Gt = class Gt {
549
549
  e && e.querySelector("tbody.bindable-tbody") && t(this, mt).call(this, e, i);
550
550
  }), t(this, vt).call(this);
551
551
  }, "#renderAllContainers"));
552
- a(this, J, /* @__PURE__ */ c((i) => {
552
+ a(this, G, /* @__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, M).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, w).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, w).querySelector(n);
559
559
  if (!l) return;
560
560
  const h = l.querySelector("tbody.bindable-tbody");
561
561
  if (!h) return;
562
562
  Array.from(h.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
563
- const b = s + Math.floor(u / n), p = t(this, Y).data.get(b);
564
- _.log("--", t(this, Y).data.get(0)), f.style.display = "", t(this, St).call(this, f, p, b);
563
+ const b = s + Math.floor(u / o), p = t(this, Y).data.get(b);
564
+ z.log("--", t(this, Y).data.get(0)), f.style.display = "", t(this, St).call(this, f, p, b);
565
565
  });
566
566
  });
567
567
  }, "#handleScroll"));
568
568
  a(this, St, /* @__PURE__ */ c((i, e, s) => {
569
- i.dataset.row = s, _.log(i, e, s), Array.from(i.cells).forEach((n, r) => {
570
- const o = n.dataset.bind;
571
- 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
+ i.dataset.row = s, z.log(i, e, s), Array.from(i.cells).forEach((o, r) => {
570
+ const n = o.dataset.bind;
571
+ 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;
572
572
  });
573
573
  }, "#bindRowData"));
574
574
  x(this, "destroy", /* @__PURE__ */ c(() => {
575
- t(this, W) && (t(this, W).disconnect(), g(this, W, null));
575
+ t(this, $) && (t(this, $).disconnect(), g(this, $, null));
576
576
  }, "destroy"));
577
577
  g(this, Y, i.getRootNode().host), g(this, w, i), t(this, wt).call(this);
578
578
  }
@@ -581,17 +581,17 @@ const Gt = class Gt {
581
581
  }
582
582
  templateLength(i = ".ng-container-body") {
583
583
  var e;
584
- return ((e = t(this, M).get(i)) == null ? void 0 : e.length) || 1;
584
+ return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
585
585
  }
586
586
  };
587
- Y = new WeakMap(), w = new WeakMap(), M = new WeakMap(), R = new WeakMap(), W = new WeakMap(), V = new WeakMap(), G = new WeakMap(), mt = new WeakMap(), xt = new WeakMap(), ot = new WeakMap(), rt = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), lt = new WeakMap(), J = new WeakMap(), St = new WeakMap(), c(Gt, "RowManager");
587
+ Y = new WeakMap(), w = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), V = new WeakMap(), Z = new WeakMap(), mt = new WeakMap(), xt = new WeakMap(), ot = new WeakMap(), rt = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), lt = new WeakMap(), G = new WeakMap(), St = new WeakMap(), c(Gt, "RowManager");
588
588
  let Bt = Gt;
589
- var Et, Q, X, Rt, kt, qt, At, Tt;
589
+ var Et, J, X, Rt, kt, qt, At, Tt;
590
590
  const it = class it extends HTMLElement {
591
591
  constructor() {
592
592
  super();
593
593
  a(this, Et);
594
- a(this, Q, null);
594
+ a(this, J, null);
595
595
  a(this, X);
596
596
  /**
597
597
  * data.set, add, delete
@@ -605,28 +605,28 @@ const it = class it extends HTMLElement {
605
605
  { selector: ".ng-container-body", type: null },
606
606
  { selector: ".ng-container-left", type: "left" },
607
607
  { selector: ".ng-container-right", type: "right" }
608
- ].forEach(({ selector: s, type: n }) => {
608
+ ].forEach(({ selector: s, type: o }) => {
609
609
  const r = this.querySelector(s);
610
610
  if (!r) return;
611
- const o = t(this, qt).call(this, t(this, Q), n);
612
- r.innerHTML = "", r.appendChild(o);
611
+ const n = t(this, qt).call(this, t(this, J), o);
612
+ r.innerHTML = "", r.appendChild(n);
613
613
  });
614
614
  }, "#renderSplitContainers"));
615
615
  a(this, kt, /* @__PURE__ */ c(() => {
616
616
  ["left", "right"].forEach((e) => {
617
- const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
618
- if (!s || !n) return;
617
+ const s = this.querySelector(`.ng-container-${e}`), o = s == null ? void 0 : s.querySelector("table");
618
+ if (!s || !o) return;
619
619
  let r = 0;
620
- n.querySelectorAll("col").forEach((o) => {
621
- const l = parseInt(o.getAttribute("width"), 10);
620
+ o.querySelectorAll("col").forEach((n) => {
621
+ const l = parseInt(n.getAttribute("width"), 10);
622
622
  isNaN(r) || (r += l);
623
623
  }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
624
624
  });
625
625
  }, "#updateContainerWidths"));
626
626
  x(this, "generate", /* @__PURE__ */ c((e) => {
627
- e && (g(this, Q, Nt.compile(e)), t(this, Q).style.display = "table", t(this, Rt).call(this), t(this, kt).call(this), requestAnimationFrame(() => {
628
- var n;
629
- const s = (n = this.querySelector("thead")) == null ? void 0 : n.getBoundingClientRect().height;
627
+ e && (g(this, J, Nt.compile(e)), t(this, J).style.display = "table", t(this, Rt).call(this), t(this, kt).call(this), requestAnimationFrame(() => {
628
+ var o;
629
+ const s = (o = this.querySelector("thead")) == null ? void 0 : o.getBoundingClientRect().height;
630
630
  this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
631
631
  r.style.top = `${s}px`;
632
632
  });
@@ -639,18 +639,18 @@ const it = class it extends HTMLElement {
639
639
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
640
640
  */
641
641
  a(this, qt, /* @__PURE__ */ c((e, s) => {
642
- const n = e.cloneNode(!0), r = n.querySelector("tbody");
642
+ const o = e.cloneNode(!0), r = o.querySelector("tbody");
643
643
  if (r) {
644
- const o = document.createElement("tbody");
645
- o.className = "fixed-tbody", r.className = "bindable-tbody", r.before(o);
644
+ const n = document.createElement("tbody");
645
+ n.className = "fixed-tbody", r.className = "bindable-tbody", r.before(n);
646
646
  }
647
- return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
648
- o.getAttribute("fixed") !== "left" && o.remove();
649
- }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
650
- o.getAttribute("fixed") !== "right" && o.remove();
651
- }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((o) => {
652
- o.remove();
653
- }), n;
647
+ return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
648
+ n.getAttribute("fixed") !== "left" && n.remove();
649
+ }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
650
+ n.getAttribute("fixed") !== "right" && n.remove();
651
+ }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((n) => {
652
+ n.remove();
653
+ }), o;
654
654
  }, "#createSplitTable"));
655
655
  x(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, X).getRowHeight(), "getRowHeight"));
656
656
  x(this, "scrollToX", /* @__PURE__ */ c((e) => {
@@ -817,10 +817,10 @@ const it = class it extends HTMLElement {
817
817
  t(this, At).call(this);
818
818
  }
819
819
  disconnectedCallback() {
820
- this.innerHTML = "", _.log("NineTableSheet destroyed.");
820
+ this.innerHTML = "", z.log("NineTableSheet destroyed.");
821
821
  }
822
822
  };
823
- Et = new WeakMap(), Q = new WeakMap(), X = new WeakMap(), Rt = new WeakMap(), kt = new WeakMap(), qt = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), c(it, "NineTableSheet"), x(it, "SCROLLBAR_SIZE", 16);
823
+ Et = new WeakMap(), J = new WeakMap(), X = new WeakMap(), Rt = new WeakMap(), kt = new WeakMap(), qt = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), c(it, "NineTableSheet"), x(it, "SCROLLBAR_SIZE", 16);
824
824
  let ut = it;
825
825
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ut);
826
826
  var Lt, ct;
@@ -830,13 +830,13 @@ const Jt = class Jt extends HTMLElement {
830
830
  a(this, Lt, /* @__PURE__ */ c(() => {
831
831
  var e;
832
832
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
833
- var o;
834
- const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
835
- t(this, ct).call(this, r, n);
833
+ var n;
834
+ const o = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((n = s.target.closest(".nine-tab-item")) == null ? void 0 : n.dataset.index, 10);
835
+ t(this, ct).call(this, r, o);
836
836
  }), t(this, ct).call(this, 0, !1);
837
837
  }, "#init"));
838
838
  a(this, ct, /* @__PURE__ */ c((e, s = !1) => {
839
- const n = /* @__PURE__ */ c(() => {
839
+ const o = /* @__PURE__ */ c(() => {
840
840
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
841
841
  Array.from(this.querySelectorAll("nine-splitter")).forEach((p) => p.style.setProperty("display", "none"));
842
842
  const b = f.filter((p) => p.classList.contains("active"));
@@ -844,7 +844,7 @@ const Jt = class Jt extends HTMLElement {
844
844
  const E = parseInt(p.getAttribute("data-index"), 10), L = this.querySelector(`nine-splitter[data-split-index="${E}"]`), ft = f[E + 1];
845
845
  L && ft && ft.classList.contains("active") && L.style.setProperty("display", "flex");
846
846
  });
847
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
847
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), h = n.querySelectorAll("nine-table-sheet");
848
848
  if (!l[e]) return;
849
849
  if (!s)
850
850
  l.forEach((f, u) => {
@@ -858,13 +858,13 @@ const Jt = class Jt extends HTMLElement {
858
858
  if (f.classList.contains("active") && u.length <= 1)
859
859
  return;
860
860
  f.classList.toggle("active");
861
- const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
861
+ const b = n.querySelector(`nine-table-sheet[data-index="${e}"]`);
862
862
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
863
863
  }
864
- const d = o.querySelectorAll("nine-table-sheet.active");
864
+ const d = n.querySelectorAll("nine-table-sheet.active");
865
865
  d == null || d.forEach((f) => {
866
866
  f.style.flex = d.length > 1 ? "1 1 0%" : "1 1 100%";
867
- }), n();
867
+ }), o();
868
868
  }, "#switchSheet"));
869
869
  }
870
870
  connectedCallback() {
@@ -888,14 +888,14 @@ const Qt = class Qt {
888
888
  var h, d;
889
889
  const i = Array.from(t(this, k).shadowRoot.querySelectorAll("nine-table-sheet.active"));
890
890
  if (i.length === 0) return;
891
- const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), n = (h = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, r = (d = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, o = ut.SCROLLBAR_SIZE, l = e * s + n + r + o;
891
+ const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), o = (h = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, r = (d = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, n = ut.SCROLLBAR_SIZE, l = e * s + o + r + n;
892
892
  t(this, k).style.height = `${l}px`;
893
893
  }, "#applyAutoHeight"));
894
894
  a(this, Ct, /* @__PURE__ */ c(() => {
895
- const e = Array.from(t(this, k).children).filter((h) => h.tagName === "TABLE"), s = t(this, k).getAttribute("auto-height") === "true", n = e.length, r = e.map((h, d) => {
896
- 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>` : "";
895
+ const e = Array.from(t(this, k).children).filter((h) => h.tagName === "TABLE"), s = t(this, k).getAttribute("auto-height") === "true", o = e.length, r = e.map((h, d) => {
896
+ 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>` : "";
897
897
  return u + b;
898
- }).join(""), o = e.map((h, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
898
+ }).join(""), n = e.map((h, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
899
899
  t(this, k).shadowRoot.innerHTML = `
900
900
  <style>
901
901
  :host {
@@ -987,7 +987,7 @@ const Qt = class Qt {
987
987
  <nine-table-sheets>
988
988
  <nine-table-sheets-body>${r}</nine-table-sheets-body>
989
989
  <nine-table-sheets-footer>
990
- <div class="nine-tab-bar">${o}</div>
990
+ <div class="nine-tab-bar">${n}</div>
991
991
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
992
992
  </nine-table-sheets-footer>
993
993
  </nine-table-sheets>
@@ -1007,41 +1007,41 @@ const Qt = class Qt {
1007
1007
  };
1008
1008
  k = new WeakMap(), Ht = new WeakMap(), at = new WeakMap(), Ct = new WeakMap(), c(Qt, "LayoutManager");
1009
1009
  let Yt = Qt;
1010
- var ht, tt;
1010
+ var ht, Q;
1011
1011
  const te = class te {
1012
1012
  constructor(i) {
1013
1013
  a(this, ht);
1014
- a(this, tt, -1);
1014
+ a(this, Q, -1);
1015
1015
  x(this, "count", /* @__PURE__ */ c(() => t(this, ht).rawRecords.length, "count"));
1016
1016
  g(this, ht, i);
1017
1017
  }
1018
1018
  get at() {
1019
- return t(this, tt);
1019
+ return t(this, Q);
1020
1020
  }
1021
1021
  set at(i) {
1022
- g(this, tt, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, tt)}"]`) && setTimeout(() => {
1022
+ g(this, Q, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, Q)}"]`) && setTimeout(() => {
1023
1023
  });
1024
1024
  }
1025
1025
  };
1026
- ht = new WeakMap(), tt = new WeakMap(), c(te, "ngRow");
1026
+ ht = new WeakMap(), Q = new WeakMap(), c(te, "ngRow");
1027
1027
  let Vt = te;
1028
- var q, S, A, et, _t, z, Mt, U, dt, It, $t, F;
1028
+ var q, S, A, tt, _t, W, Mt, U, dt, It, $t, et;
1029
1029
  const T = class T {
1030
1030
  constructor(i, e) {
1031
1031
  a(this, q);
1032
1032
  a(this, S);
1033
1033
  a(this, A, []);
1034
- a(this, et, []);
1034
+ a(this, tt, []);
1035
1035
  a(this, _t, 0);
1036
- a(this, z, []);
1036
+ a(this, W, []);
1037
1037
  a(this, Mt, /* @__PURE__ */ c(() => {
1038
- g(this, z, []);
1038
+ g(this, W, []);
1039
1039
  const i = t(this, q).template || [];
1040
1040
  Array.from(i).forEach((e) => {
1041
1041
  var s;
1042
- t(this, z).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1042
+ t(this, W).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1043
1043
  }), (t(this, S).rawRecords || []).forEach((e) => {
1044
- e.__ng || (e.__ng = t(this, dt).call(this)), e.__ng.height = t(this, z).slice();
1044
+ e.__ng || (e.__ng = t(this, dt).call(this)), e.__ng.height = t(this, W).slice();
1045
1045
  });
1046
1046
  }, "#initialize"));
1047
1047
  a(this, U, /* @__PURE__ */ c(() => {
@@ -1053,14 +1053,14 @@ const T = class T {
1053
1053
  var r;
1054
1054
  const s = this.getValidData();
1055
1055
  if (!s || s.length <= 0) return;
1056
- if (i == null) return t(this, F).call(this, s);
1056
+ if (i == null) return t(this, et).call(this, s);
1057
1057
  if (i < 0 || i >= s.length) return null;
1058
- const n = typeof ((r = t(this, q).fields) == null ? void 0 : r.get) == "function" ? t(this, q).fields.get() : [];
1058
+ const o = typeof ((r = t(this, q).fields) == null ? void 0 : r.get) == "function" ? t(this, q).fields.get() : [];
1059
1059
  if (e != null) {
1060
- const o = n.indexOf(e);
1061
- return o >= 0 ? s[i].v[o] : null;
1060
+ const n = o.indexOf(e);
1061
+ return n >= 0 ? s[i].v[n] : null;
1062
1062
  }
1063
- return _.log(s[i]), _.log(t(this, F).call(this, s[i])), t(this, F).call(this, s[i]);
1063
+ return t(this, et).call(this, s[i]);
1064
1064
  }, "get"));
1065
1065
  x(this, "set", /* @__PURE__ */ c((i) => {
1066
1066
  this.clear(), this.add(i, !1), t(this, U).call(this);
@@ -1069,27 +1069,27 @@ const T = class T {
1069
1069
  rowState: T.ROW_STATE.EMPTY,
1070
1070
  deleted: !1,
1071
1071
  filtered: !1,
1072
- height: t(this, z).slice(),
1072
+ height: t(this, W).slice(),
1073
1073
  o: {},
1074
1074
  c: {},
1075
- _: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, z).slice(), -1, {}, {}]
1075
+ _: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, W).slice(), -1, {}, {}]
1076
1076
  }), "#getDefaultMeta"));
1077
1077
  x(this, "reset", /* @__PURE__ */ c(() => {
1078
- g(this, A, []), g(this, et, []), t(this, U).call(this);
1078
+ g(this, A, []), g(this, tt, []), t(this, U).call(this);
1079
1079
  }, "reset"));
1080
1080
  x(this, "clear", /* @__PURE__ */ c(() => {
1081
1081
  var i;
1082
- t(this, S).rawRecords = [], g(this, A, []), g(this, et, []), (i = t(this, S).viewRecords) != null && i.reset && t(this, S).viewRecords.reset();
1082
+ t(this, S).rawRecords = [], g(this, A, []), g(this, tt, []), (i = t(this, S).viewRecords) != null && i.reset && t(this, S).viewRecords.reset();
1083
1083
  }, "clear"));
1084
1084
  a(this, It, /* @__PURE__ */ c((i) => {
1085
- var n;
1085
+ var o;
1086
1086
  Array.isArray(i) || (i = [i]);
1087
- const e = typeof ((n = t(this, q).fields) == null ? void 0 : n.get) == "function" ? t(this, q).fields.get() : Object.keys(i[0] || {}), s = [];
1087
+ const e = typeof ((o = t(this, q).fields) == null ? void 0 : o.get) == "function" ? t(this, q).fields.get() : Object.keys(i[0] || {}), s = [];
1088
1088
  return i.forEach((r) => {
1089
- const o = { v: [] };
1089
+ const n = { v: [] };
1090
1090
  e.forEach((l) => {
1091
- o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1092
- }), s.push(o);
1091
+ n.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1092
+ }), s.push(n);
1093
1093
  }), s;
1094
1094
  }, "#json2Array"));
1095
1095
  a(this, $t, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
@@ -1099,19 +1099,19 @@ const T = class T {
1099
1099
  i === void 0 && (i = {});
1100
1100
  const s = t(this, It).call(this, i);
1101
1101
  t(this, S).rawRecords = t(this, S).rawRecords.concat(t(this, $t).call(this, s)), this.resetRecords();
1102
- const n = this.count() - 1;
1103
- return e || s.forEach((r, o) => {
1104
- const l = t(this, S).rawRecords[n - o];
1102
+ const o = this.count() - 1;
1103
+ return e || s.forEach((r, n) => {
1104
+ const l = t(this, S).rawRecords[o - n];
1105
1105
  l && (l.__ng.rowState = T.ROW_STATE.EMPTY);
1106
- }), t(this, U).call(this), n;
1106
+ }), t(this, U).call(this), o;
1107
1107
  }, "add"));
1108
1108
  x(this, "delete", /* @__PURE__ */ c((i) => {
1109
1109
  let e = [];
1110
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, S).host.row.at] : e = [parseInt(i, 10)], e.sort((s, n) => n - s).forEach((s) => {
1110
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, S).host.row.at] : e = [parseInt(i, 10)], e.sort((s, o) => o - s).forEach((s) => {
1111
1111
  if (t(this, A)[s]) {
1112
- const n = t(this, A)[s].__ng.rowid;
1113
- t(this, A)[s].__ng.rowState === T.ROW_STATE.INSERT ? t(this, S).rawRecords = t(this, S).rawRecords.filter((r) => r.__ng.rowid !== n) : t(this, S).rawRecords.forEach((r) => {
1114
- r.__ng.rowid === n && (r.__ng.deleted = !0, r.__ng.rowState = T.ROW_STATE.DELETE);
1112
+ const o = t(this, A)[s].__ng.rowid;
1113
+ t(this, A)[s].__ng.rowState === T.ROW_STATE.INSERT ? t(this, S).rawRecords = t(this, S).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, S).rawRecords.forEach((r) => {
1114
+ r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = T.ROW_STATE.DELETE);
1115
1115
  });
1116
1116
  }
1117
1117
  }), this.resetRecords(), t(this, U).call(this);
@@ -1121,35 +1121,35 @@ const T = class T {
1121
1121
  i = parseInt(i, 10);
1122
1122
  const r = (typeof ((h = t(this, q).fields) == null ? void 0 : h.get) == "function" ? t(this, q).fields.get() : []).indexOf(e);
1123
1123
  if (r < 0) return;
1124
- const o = this.getValidData()[i];
1125
- if (!o) return;
1126
- const l = o.v[r];
1127
- l !== s && o.__ng.rowState !== T.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = T.ROW_STATE.UPDATE), o.v[r] = s;
1124
+ const n = this.getValidData()[i];
1125
+ if (!n) return;
1126
+ const l = n.v[r];
1127
+ l !== s && n.__ng.rowState !== T.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = l), n.__ng.rowState = T.ROW_STATE.UPDATE), n.v[r] = s;
1128
1128
  }, "setValue"));
1129
1129
  x(this, "resetRecords", /* @__PURE__ */ c(() => {
1130
- g(this, et, t(this, S).rawRecords.filter((i) => !i.__ng.deleted)), g(this, A, t(this, S).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, S).rawRecords.forEach((i, e) => {
1130
+ g(this, tt, t(this, S).rawRecords.filter((i) => !i.__ng.deleted)), g(this, A, t(this, S).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, S).rawRecords.forEach((i, e) => {
1131
1131
  i.__ng.rowidx = e;
1132
1132
  }), t(this, A).forEach((i, e) => {
1133
1133
  i.__ng.i = e;
1134
1134
  });
1135
1135
  }, "resetRecords"));
1136
1136
  x(this, "getValidData", /* @__PURE__ */ c(() => (t(this, A).length === 0 && t(this, S).rawRecords.length > 0 && this.resetRecords(), t(this, A)), "getValidData"));
1137
- a(this, F, /* @__PURE__ */ c((i) => {
1138
- var s;
1137
+ a(this, et, /* @__PURE__ */ c((i) => {
1138
+ var r;
1139
1139
  if (!i) return i;
1140
- const e = typeof ((s = t(this, q).fields) == null ? void 0 : s.get) == "function" ? t(this, q).fields.get() : [];
1141
- return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
1142
- const r = {};
1143
- return e.forEach((o, l) => {
1144
- r[o] = n.v ? n.v[l] : n[o];
1145
- }), r.__ng = n.__ng, r;
1146
- }) : i;
1147
- }, "#conv2"));
1140
+ const e = Array.isArray(i) ? i : [i], s = typeof ((r = t(this, q).fields) == null ? void 0 : r.get) == "function" ? t(this, q).fields.get() : [], o = e.filter((n) => !n.__ng.deleted).map((n) => {
1141
+ const l = {};
1142
+ return s.forEach((h, d) => {
1143
+ l[h] = n.v ? n.v[d] : n[h];
1144
+ }), l.__ng = n.__ng, l;
1145
+ });
1146
+ return isSingle ? o[0] : o;
1147
+ }, "#conv"));
1148
1148
  x(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1149
1149
  g(this, q, i), g(this, S, e), t(this, Mt).call(this);
1150
1150
  }
1151
1151
  get source() {
1152
- return t(this, F).call(this, t(this, S).rawRecords);
1152
+ return t(this, et).call(this, t(this, S).rawRecords);
1153
1153
  }
1154
1154
  set source(i) {
1155
1155
  this.clear(), this.add(i, !1);
@@ -1164,7 +1164,7 @@ const T = class T {
1164
1164
  return this.length;
1165
1165
  }
1166
1166
  };
1167
- q = new WeakMap(), S = new WeakMap(), A = new WeakMap(), et = new WeakMap(), _t = new WeakMap(), z = new WeakMap(), Mt = new WeakMap(), U = new WeakMap(), dt = new WeakMap(), It = new WeakMap(), $t = new WeakMap(), F = new WeakMap(), c(T, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1167
+ q = new WeakMap(), S = new WeakMap(), A = new WeakMap(), tt = new WeakMap(), _t = new WeakMap(), W = new WeakMap(), Mt = new WeakMap(), U = new WeakMap(), dt = new WeakMap(), It = new WeakMap(), $t = new WeakMap(), et = new WeakMap(), c(T, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1168
1168
  x(T, "ROW_STATE", {
1169
1169
  EMPTY: "EMPTY",
1170
1170
  NORMAL: "NORMAL",
@@ -1173,58 +1173,58 @@ x(T, "ROW_STATE", {
1173
1173
  DELETE: "DELETE"
1174
1174
  });
1175
1175
  let Xt = T;
1176
- var K;
1176
+ var F;
1177
1177
  const ee = class ee {
1178
1178
  constructor(i) {
1179
- a(this, K);
1180
- g(this, K, i), this.row = new Vt(this), this.data = new Xt(t(this, K), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1179
+ a(this, F);
1180
+ g(this, F, i), this.row = new Vt(this), this.data = new Xt(t(this, F), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1181
1181
  var e;
1182
- (e = t(this, K).view) != null && e.redraw && t(this, K).view.redraw();
1182
+ (e = t(this, F).view) != null && e.redraw && t(this, F).view.redraw();
1183
1183
  }, this.setDataSource = (e) => {
1184
1184
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1185
1185
  }, this.getRowState = (e) => {
1186
- var n, r;
1186
+ var o, r;
1187
1187
  const s = parseInt(e, 10);
1188
1188
  if (!(s >= this.data.count()))
1189
- return (r = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : r.rowState;
1189
+ return (r = (o = this.data.getValidData()[s]) == null ? void 0 : o.__ng) == null ? void 0 : r.rowState;
1190
1190
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1191
1191
  this.row.at = e;
1192
- }, 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) => {
1193
- e = parseInt(e, 10), this.data.setValue(e, s, n);
1192
+ }, 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) => {
1193
+ e = parseInt(e, 10), this.data.setValue(e, s, o);
1194
1194
  }, this.setDataSource([]);
1195
1195
  }
1196
1196
  };
1197
- K = new WeakMap(), c(ee, "ngDataManager");
1197
+ F = new WeakMap(), c(ee, "ngDataManager");
1198
1198
  let Ut = ee;
1199
- var j, Wt;
1199
+ var K, Wt;
1200
1200
  const ie = class ie extends HTMLElement {
1201
1201
  constructor() {
1202
1202
  super();
1203
1203
  //#created = false;
1204
- a(this, j);
1204
+ a(this, K);
1205
1205
  a(this, Wt);
1206
- this.attachShadow({ mode: "open" }), g(this, j, new Ut(this));
1206
+ this.attachShadow({ mode: "open" }), g(this, K, new Ut(this));
1207
1207
  }
1208
1208
  connectedCallback() {
1209
- g(this, Wt, new Yt(this)), _.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1209
+ g(this, Wt, new Yt(this)), z.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1210
1210
  }
1211
1211
  disconnectedCallback() {
1212
- _.log("NineTable disconnected.");
1212
+ z.log("NineTable disconnected.");
1213
1213
  }
1214
1214
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1215
1215
  get data() {
1216
- return t(this, j).data;
1216
+ return t(this, K).data;
1217
1217
  }
1218
1218
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1219
1219
  get row() {
1220
- return t(this, j).row;
1220
+ return t(this, K).row;
1221
1221
  }
1222
1222
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1223
1223
  get dataManager() {
1224
- return t(this, j);
1224
+ return t(this, K);
1225
1225
  }
1226
1226
  };
1227
- j = new WeakMap(), Wt = new WeakMap(), c(ie, "NineTable");
1227
+ K = new WeakMap(), Wt = new WeakMap(), c(ie, "NineTable");
1228
1228
  let Ft = ie;
1229
1229
  customElements.get("nine-table") || customElements.define("nine-table", Ft);
1230
1230
  //# sourceMappingURL=nine-table.js.map