@ninebone/table 0.0.358 β†’ 0.0.360

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,12 +1,12 @@
1
- var ue = Object.defineProperty;
2
- var be = (m) => {
1
+ var be = Object.defineProperty;
2
+ var ge = (m) => {
3
3
  throw TypeError(m);
4
4
  };
5
- var pe = (m, i, e) => i in m ? ue(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e;
6
- var a = (m, i) => ue(m, "name", { value: i, configurable: !0 });
7
- var x = (m, i, e) => pe(m, typeof i != "symbol" ? i + "" : i, e), ge = (m, i, e) => i.has(m) || be("Cannot " + e);
8
- var t = (m, i, e) => (ge(m, i, "read from private field"), e ? e.call(m) : i.get(m)), h = (m, i, e) => i.has(m) ? be("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, e), b = (m, i, e, s) => (ge(m, i, "write to private field"), s ? s.call(m, e) : i.set(m, e), e);
9
- var ye = (m, i, e, s) => ({
5
+ var me = (m, i, e) => i in m ? be(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e;
6
+ var a = (m, i) => be(m, "name", { value: i, configurable: !0 });
7
+ var x = (m, i, e) => me(m, typeof i != "symbol" ? i + "" : i, e), ye = (m, i, e) => i.has(m) || ge("Cannot " + e);
8
+ var t = (m, i, e) => (ye(m, i, "read from private field"), e ? e.call(m) : i.get(m)), c = (m, i, e) => i.has(m) ? ge("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, e), b = (m, i, e, s) => (ye(m, i, "write to private field"), s ? s.call(m, e) : i.set(m, e), e);
9
+ var pe = (m, i, e, s) => ({
10
10
  set _(o) {
11
11
  b(m, i, o, e);
12
12
  },
@@ -14,26 +14,26 @@ var ye = (m, i, e, s) => ({
14
14
  return t(m, i, s);
15
15
  }
16
16
  });
17
- import { trace as me } from "@ninebone/util";
18
- const se = class se extends me.constructor {
17
+ import { trace as xe } from "@ninebone/util";
18
+ const ne = class ne extends xe.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- a(se, "Trace");
24
- let Xt = se;
25
- const D = new Xt();
26
- var _, I, y, B, N, P, vt, Y, wt;
27
- const ne = class ne extends HTMLElement {
23
+ a(ne, "Trace");
24
+ let Ut = ne;
25
+ const I = new Ut();
26
+ var _, W, y, D, N, P, vt, Y, wt;
27
+ const oe = class oe extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- h(this, _);
31
- h(this, I, !1);
32
- h(this, y);
33
- h(this, B);
34
- h(this, N);
35
- h(this, P);
36
- h(this, vt, /* @__PURE__ */ a(() => {
30
+ c(this, _);
31
+ c(this, W, !1);
32
+ c(this, y);
33
+ c(this, D);
34
+ c(this, N);
35
+ c(this, P);
36
+ c(this, vt, /* @__PURE__ */ a(() => {
37
37
  if (!t(this, _)) return;
38
38
  const e = t(this, _).querySelector(".ng-container-body");
39
39
  e && (b(this, P, new ResizeObserver(() => {
@@ -41,11 +41,11 @@ const ne = class ne extends HTMLElement {
41
41
  })), t(this, P).observe(e));
42
42
  }, "#observeResize"));
43
43
  x(this, "refresh", /* @__PURE__ */ a(() => {
44
- if (!t(this, _) || !t(this, y) || t(this, I)) return;
44
+ if (!t(this, _) || !t(this, y) || t(this, W)) return;
45
45
  const e = t(this, y).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const o = t(this, y).track, r = t(this, y).thumb, n = t(this, _).querySelector(".ng-container-bottom"), l = e.clientWidth, c = s.scrollWidth;
48
- if (l !== 0 && c > l)
47
+ const o = t(this, y).track, r = t(this, y).thumb, n = t(this, _).querySelector(".ng-container-bottom"), l = e.clientWidth, h = s.scrollWidth;
48
+ if (l !== 0 && h > l)
49
49
  n && (n.style.display = "flex");
50
50
  else {
51
51
  n && (n.style.display = "none");
@@ -53,38 +53,38 @@ const ne = class ne extends HTMLElement {
53
53
  }
54
54
  const d = o.clientWidth;
55
55
  if (d <= 0) return;
56
- const f = Math.max(Math.min(d * (l / c), d), 20);
56
+ const f = Math.max(Math.min(d * (l / h), d), 20);
57
57
  r.style.width = `${f}px`;
58
- const u = e.scrollLeft, g = c - l;
58
+ const u = e.scrollLeft, g = h - l;
59
59
  let p = 0;
60
60
  g > 0 && (p = parseInt(u / g * (d - f), 10)), p < 0 && (p = 0);
61
61
  const E = d - f;
62
- p > E && (p = E), r.style.left = `${p}px`, D.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`, I.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= E - 1;
63
63
  }, "refresh"));
64
- h(this, Y, /* @__PURE__ */ a((e) => {
64
+ c(this, Y, /* @__PURE__ */ a((e) => {
65
65
  if (!t(this, y)) return !1;
66
66
  const s = t(this, y).container, o = s.querySelector("table");
67
67
  if (!o) return !1;
68
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 c = r.width - n;
72
- l > c && (l = c), 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 >= c - 1;
71
+ const h = r.width - n;
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
73
  const d = s.clientWidth, u = o.scrollWidth - d;
74
- return c > 0 && u > 0 && (s.scrollLeft = l / c * u), l > 0 && l < c - 1;
74
+ return h > 0 && u > 0 && (s.scrollLeft = l / h * u), l > 0 && l < h - 1;
75
75
  }, "#thumbMoveTo"));
76
- h(this, wt, /* @__PURE__ */ a(() => {
76
+ c(this, wt, /* @__PURE__ */ a(() => {
77
77
  const e = /* @__PURE__ */ a((o) => {
78
- clearInterval(t(this, B)), clearInterval(t(this, N));
78
+ clearInterval(t(this, D)), clearInterval(t(this, N));
79
79
  const r = parseInt(t(this, y).thumb.style.left || 0, 10);
80
- t(this, Y).call(this, r + o), b(this, B, setInterval(() => {
81
- clearInterval(t(this, B)), b(this, N, setInterval(() => {
80
+ t(this, Y).call(this, r + o), b(this, D, setInterval(() => {
81
+ clearInterval(t(this, D)), b(this, N, setInterval(() => {
82
82
  const n = parseInt(t(this, y).thumb.style.left || 0, 10);
83
83
  t(this, Y).call(this, n + o) || clearInterval(t(this, N));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
- clearInterval(t(this, B)), clearInterval(t(this, N));
87
+ clearInterval(t(this, D)), clearInterval(t(this, N));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
90
  t(this, y).left.addEventListener(o, s), t(this, y).right.addEventListener(o, s), t(this, y).track.addEventListener(o, s);
@@ -99,13 +99,13 @@ const ne = class ne extends HTMLElement {
99
99
  t(this, Y).call(this, o.clientX - r.left - n / 2);
100
100
  }), t(this, y).thumb.addEventListener("mousedown", (o) => {
101
101
  if (o.button !== 0) return;
102
- o.stopPropagation(), o.preventDefault(), b(this, I, !0), this.shiftX = o.clientX - t(this, y).thumb.getBoundingClientRect().left;
102
+ o.stopPropagation(), o.preventDefault(), b(this, W, !0), this.shiftX = o.clientX - t(this, y).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ a((l) => {
104
- if (!t(this, I)) return;
105
- const c = t(this, y).track.getBoundingClientRect();
106
- t(this, Y).call(this, l.clientX - c.left - this.shiftX);
104
+ if (!t(this, W)) return;
105
+ const h = t(this, y).track.getBoundingClientRect();
106
+ t(this, Y).call(this, l.clientX - h.left - this.shiftX);
107
107
  }, "onMouseMove"), n = /* @__PURE__ */ a(() => {
108
- b(this, I, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
108
+ b(this, W, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", n);
111
111
  });
@@ -189,7 +189,7 @@ const ne = class ne 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, W) || this.refresh();
193
193
  }), t(this, wt).call(this), t(this, vt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
@@ -198,23 +198,23 @@ const ne = class ne extends HTMLElement {
198
198
  t(this, P) && t(this, P).disconnect();
199
199
  }
200
200
  };
201
- _ = new WeakMap(), I = new WeakMap(), y = new WeakMap(), B = new WeakMap(), N = new WeakMap(), P = new WeakMap(), vt = new WeakMap(), Y = new WeakMap(), wt = new WeakMap(), a(ne, "NineTableHScrollBar");
202
- let jt = ne;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", jt);
204
- var V, W, w, lt, at, St;
205
- const oe = class oe extends HTMLElement {
201
+ _ = new WeakMap(), W = new WeakMap(), y = new WeakMap(), D = new WeakMap(), N = new WeakMap(), P = new WeakMap(), vt = new WeakMap(), Y = new WeakMap(), wt = new WeakMap(), a(oe, "NineTableHScrollBar");
202
+ let Ft = oe;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ft);
204
+ var V, O, w, rt, lt, St;
205
+ const re = class re extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- h(this, V);
209
- h(this, W, !1);
210
- h(this, w);
211
- h(this, lt, 0);
212
- h(this, at, 0);
208
+ c(this, V);
209
+ c(this, O, !1);
210
+ c(this, w);
211
+ c(this, rt, 0);
212
+ c(this, lt, 0);
213
213
  /**
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
216
  x(this, "refresh", /* @__PURE__ */ a(() => {
217
- if (!t(this, V) || !t(this, w) || t(this, W)) return;
217
+ if (!t(this, V) || !t(this, w) || t(this, O)) return;
218
218
  const e = t(this, w).container, s = e.querySelector("table");
219
219
  if (!s) return;
220
220
  const o = t(this, w).track, r = t(this, w).thumb, n = e.clientHeight, l = s.scrollHeight;
@@ -223,42 +223,42 @@ const oe = class oe extends HTMLElement {
223
223
  return;
224
224
  } else
225
225
  r.style.display = "block";
226
- const c = o.clientHeight;
227
- if (c <= 0) return;
228
- const d = Math.max(Math.min(c * (n / l), c), 20);
226
+ const h = o.clientHeight;
227
+ if (h <= 0) return;
228
+ const d = Math.max(Math.min(h * (n / l), h), 20);
229
229
  r.style.height = `${d}px`;
230
230
  const f = e.scrollTop, u = l - n;
231
231
  let g = 0;
232
- u > 0 && (g = f / u * (c - d));
233
- const p = c - d;
232
+ u > 0 && (g = f / u * (h - d));
233
+ const p = h - d;
234
234
  g < 0 && (g = 0), g > p && (g = p), r.style.top = `${g}px`, t(this, w).top.disabled = f <= 0, t(this, w).bottom.disabled = f >= u - 1;
235
235
  }, "refresh"));
236
- h(this, St, /* @__PURE__ */ a(() => {
236
+ c(this, St, /* @__PURE__ */ a(() => {
237
237
  const e = t(this, w).container;
238
238
  e.addEventListener("scroll", () => {
239
- t(this, W) || this.refresh();
239
+ t(this, O) || this.refresh();
240
240
  }), t(this, w).thumb.addEventListener("mousedown", (s) => {
241
241
  if (s.button !== 0) return;
242
- s.stopPropagation(), s.preventDefault(), b(this, W, !0), b(this, lt, s.clientY), b(this, at, e.scrollTop);
242
+ s.stopPropagation(), s.preventDefault(), b(this, O, !0), b(this, rt, s.clientY), b(this, lt, e.scrollTop);
243
243
  const o = /* @__PURE__ */ a((n) => {
244
- if (!t(this, W)) return;
245
- const l = t(this, w).track.getBoundingClientRect(), c = t(this, w).thumb.clientHeight, f = l.height - c, u = n.clientY - t(this, lt), g = e.clientHeight, p = e.querySelector("table");
246
- D.log(p), D.log(p.scrollHeight);
244
+ if (!t(this, O)) return;
245
+ const l = t(this, w).track.getBoundingClientRect(), h = t(this, w).thumb.clientHeight, f = l.height - h, u = n.clientY - t(this, rt), g = e.clientHeight, p = e.querySelector("table");
246
+ I.log(p), I.log(p.scrollHeight);
247
247
  const H = p.scrollHeight - g;
248
248
  if (f > 0 && H > 0) {
249
249
  const mt = u / f * H;
250
- e.scrollTop = t(this, at) + mt;
250
+ e.scrollTop = t(this, lt) + mt;
251
251
  }
252
252
  this.refresh();
253
253
  }, "onMouseMove"), r = /* @__PURE__ */ a(() => {
254
- b(this, W, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
254
+ b(this, O, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
255
255
  }, "onMouseUp");
256
256
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
257
257
  }), t(this, w).track.addEventListener("mousedown", (s) => {
258
258
  if (s.button !== 0 || s.target === t(this, w).thumb) return;
259
- const o = t(this, w).track.getBoundingClientRect(), r = t(this, w).thumb.clientHeight, n = s.clientY - o.top - r / 2, c = o.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
260
- if (c > 0 && u > 0) {
261
- const g = Math.max(0, Math.min(1, n / c));
259
+ const o = t(this, w).track.getBoundingClientRect(), r = t(this, w).thumb.clientHeight, n = s.clientY - o.top - r / 2, h = o.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
260
+ if (h > 0 && u > 0) {
261
+ const g = Math.max(0, Math.min(1, n / h));
262
262
  e.scrollTop = g * u;
263
263
  }
264
264
  this.refresh();
@@ -351,9 +351,9 @@ const oe = class oe extends HTMLElement {
351
351
  e();
352
352
  }
353
353
  };
354
- V = new WeakMap(), W = new WeakMap(), w = new WeakMap(), lt = new WeakMap(), at = new WeakMap(), St = new WeakMap(), a(oe, "NineTableVScrollBar");
355
- let Ut = oe;
356
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Ut);
354
+ V = new WeakMap(), O = new WeakMap(), w = new WeakMap(), rt = new WeakMap(), lt = new WeakMap(), St = new WeakMap(), a(re, "NineTableVScrollBar");
355
+ let jt = re;
356
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", jt);
357
357
  var Et, G;
358
358
  const C = class C {
359
359
  /**
@@ -369,15 +369,15 @@ const C = class C {
369
369
  var o, r, n, l;
370
370
  if (!i) return null;
371
371
  const e = i.cloneNode(!0);
372
- return t(o = C, Et).call(o, e), t(r = C, G).call(r, e, "thead"), t(n = C, G).call(n, e, "tbody"), t(l = C, G).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((c, d) => {
373
- const f = c.getAttribute("fixed");
372
+ return t(o = C, Et).call(o, e), t(r = C, G).call(r, e, "thead"), t(n = C, G).call(n, e, "tbody"), t(l = C, G).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, d) => {
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);
376
376
  });
377
377
  }), e;
378
378
  }
379
379
  };
380
- Et = new WeakMap(), G = new WeakMap(), a(C, "TableCompiler"), h(C, Et, /* @__PURE__ */ a((i) => {
380
+ Et = new WeakMap(), G = new WeakMap(), a(C, "TableCompiler"), c(C, Et, /* @__PURE__ */ a((i) => {
381
381
  if (!i.querySelector("colgroup")) {
382
382
  const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, o = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
383
383
  for (let n = 0; n < s; n++) {
@@ -391,18 +391,18 @@ Et = new WeakMap(), G = new WeakMap(), a(C, "TableCompiler"), h(C, Et, /* @__PUR
391
391
  s ? s.after(e) : i.prepend(e);
392
392
  }
393
393
  i.classList.add("nine-table-element"), i.style.display = "table";
394
- }, "#ensureTableStructure")), h(C, G, /* @__PURE__ */ a((i, e) => {
394
+ }, "#ensureTableStructure")), c(C, G, /* @__PURE__ */ a((i, e) => {
395
395
  const s = Array.from(i.querySelectorAll(e + " tr")), o = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
396
396
  if (r === 0 || o.length === 0) return;
397
397
  let n = 0;
398
- o.forEach((c) => {
399
- n += c.colSpan || 1;
398
+ o.forEach((h) => {
399
+ n += h.colSpan || 1;
400
400
  });
401
401
  const l = Array.from(Array(r), () => Array(n).fill(null));
402
- s.forEach((c) => {
403
- const d = c.sectionRowIndex;
402
+ s.forEach((h) => {
403
+ const d = h.sectionRowIndex;
404
404
  let f = 0;
405
- Array.from(c.querySelectorAll("th,td")).forEach((u) => {
405
+ Array.from(h.querySelectorAll("th,td")).forEach((u) => {
406
406
  for (let E = 0; E < l[d].length; E++)
407
407
  if (l[d][E] === null) {
408
408
  f = E;
@@ -413,9 +413,9 @@ Et = new WeakMap(), G = new WeakMap(), a(C, "TableCompiler"), h(C, Et, /* @__PUR
413
413
  for (let H = 0; H < p; H++)
414
414
  d + E < r && f + H < n && (l[d + E][f + H] = E === 0 && H === 0 ? "1" : "0");
415
415
  });
416
- }), s.forEach((c) => {
417
- const d = c.sectionRowIndex;
418
- Array.from(c.querySelectorAll("th,td")).forEach((f) => {
416
+ }), s.forEach((h) => {
417
+ const d = h.sectionRowIndex;
418
+ Array.from(h.querySelectorAll("th,td")).forEach((f) => {
419
419
  for (let u = 0; u < l[d].length; u++)
420
420
  if (l[d][u] === "1") {
421
421
  f.dataset.col = u, l[d][u] = "0";
@@ -424,22 +424,23 @@ Et = new WeakMap(), G = new WeakMap(), a(C, "TableCompiler"), h(C, Et, /* @__PUR
424
424
  });
425
425
  });
426
426
  }, "#resetColIndex"));
427
- let Ft = C;
428
- var X, v, M, A, O, j, J, Q, Rt, At, ct, ht, qt, Tt, dt, kt, tt, ft;
429
- const re = class re {
427
+ let Kt = C;
428
+ var X, v, M, A, z, U, at, J, Rt, At, qt, ct, ht, Tt, kt, dt, Lt, Q, ft;
429
+ const le = class le {
430
430
  constructor(i) {
431
- h(this, X);
432
- h(this, v);
433
- h(this, M, /* @__PURE__ */ new Map());
434
- h(this, A, null);
435
- h(this, O, null);
436
- h(this, j, 0);
437
- h(this, J, 40);
438
- h(this, Q, !1);
431
+ c(this, X);
432
+ c(this, v);
433
+ c(this, M, /* @__PURE__ */ new Map());
434
+ c(this, A, null);
435
+ c(this, z, null);
436
+ c(this, U, 0);
437
+ c(this, at, 40);
438
+ c(this, J, !1);
439
+ c(this, Rt, 20);
439
440
  x(this, "refresh", /* @__PURE__ */ a(() => {
440
441
  var e;
441
442
  const i = t(this, v).querySelector(".ng-container-body");
442
- i && (t(this, ct).call(this), t(this, tt).call(this, i.scrollTop), (e = t(this, v).querySelector("nine-table-vscrollbar")) == null || e.refresh());
443
+ i && (t(this, ct).call(this), t(this, Q).call(this, i.scrollTop), (e = t(this, v).querySelector("nine-table-vscrollbar")) == null || e.refresh());
443
444
  }, "refresh"));
444
445
  x(this, "initialize", /* @__PURE__ */ a(() => {
445
446
  b(this, A, null), t(this, M).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
@@ -454,11 +455,11 @@ const re = class re {
454
455
  });
455
456
  const i = t(this, v).querySelector(".ng-container-body"), e = t(this, v).querySelector(".ng-container-left"), s = t(this, v).querySelector(".ng-container-right");
456
457
  if (i) {
457
- t(this, At).call(this, i), t(this, dt).call(this), t(this, ct).call(this), t(this, tt).call(this, i.scrollTop);
458
+ t(this, qt).call(this, i), t(this, dt).call(this), t(this, ct).call(this), t(this, Q).call(this, i.scrollTop);
458
459
  let o = i.scrollTop;
459
460
  const r = /* @__PURE__ */ a((n) => {
460
461
  var l;
461
- e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, tt).call(this, n), (l = t(this, v).querySelector("nine-table-vscrollbar")) == null || l.refresh();
462
+ e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, Q).call(this, n), (l = t(this, v).querySelector("nine-table-vscrollbar")) == null || l.refresh();
462
463
  }, "syncScroll");
463
464
  i.addEventListener("scroll", () => {
464
465
  const n = i.scrollTop;
@@ -466,20 +467,20 @@ const re = class re {
466
467
  });
467
468
  }
468
469
  }, "initialize"));
469
- h(this, Rt, /* @__PURE__ */ a((i, e) => {
470
+ c(this, At, /* @__PURE__ */ a((i, e) => {
470
471
  const s = t(this, M).get(e);
471
472
  if (!s || s.length === 0) return;
472
473
  const o = i.querySelector("tbody.bindable-tbody");
473
474
  if (!o) return;
474
475
  o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
475
476
  const r = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
476
- for (let l = 0; l < t(this, J); l++)
477
- s.forEach((c) => {
478
- n.appendChild(c.cloneNode(!0));
477
+ for (let l = 0; l < t(this, at); l++)
478
+ s.forEach((h) => {
479
+ n.appendChild(h.cloneNode(!0));
479
480
  });
480
481
  r ? r.before(n) : o.appendChild(n);
481
482
  }, "#renderRows"));
482
- h(this, At, /* @__PURE__ */ a((i) => {
483
+ c(this, qt, /* @__PURE__ */ a((i) => {
483
484
  if (t(this, A) !== null && t(this, A) > 0)
484
485
  return t(this, A);
485
486
  const e = t(this, M).get(".ng-container-body");
@@ -491,45 +492,44 @@ const re = class re {
491
492
  e.forEach((g) => {
492
493
  r.appendChild(g.cloneNode(!0));
493
494
  }), o ? o.before(r) : s.appendChild(r);
494
- const n = t(this, v), l = n.style.display, c = n.style.visibility, d = n.style.position;
495
+ const n = t(this, v), l = n.style.display, h = n.style.visibility, d = n.style.position;
495
496
  (l === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
496
497
  let f = 0;
497
498
  const u = s.querySelectorAll("tr:not(.nodata)");
498
499
  return u.forEach((g) => {
499
500
  f += g.offsetHeight || g.getBoundingClientRect().height;
500
- }), u.forEach((g) => g.remove()), n.style.display = l, n.style.visibility = c, n.style.position = d, b(this, A, f > 0 ? f : 24), t(this, ht).call(this), t(this, A);
501
+ }), u.forEach((g) => g.remove()), n.style.display = l, n.style.visibility = h, n.style.position = d, b(this, A, f > 0 ? f : 24), t(this, ht).call(this), t(this, A);
501
502
  }, "#measureAndCacheHeight"));
502
- h(this, ct, /* @__PURE__ */ a(() => {
503
+ c(this, ct, /* @__PURE__ */ a(() => {
503
504
  if (!t(this, v).querySelector(".ng-container-body")) return;
504
505
  const e = t(this, X).data.get() || [], s = e.length > 0 ? e.length : 100, o = t(this, A), r = s * o;
505
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
506
- const l = t(this, v).querySelector(n), c = l == null ? void 0 : l.querySelector("table");
507
- c && (c.style.height = `${r}px`);
506
+ I.log(":", s, r), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
507
+ const l = t(this, v).querySelector(n), h = l == null ? void 0 : l.querySelector("table");
508
+ h && (h.style.height = `${r}px`);
508
509
  });
509
510
  }, "#updateVirtualScrollHeight"));
510
- h(this, ht, /* @__PURE__ */ a(() => {
511
- if (t(this, j) > 0 && t(this, A) > 0) {
512
- const i = Math.ceil(t(this, j) / t(this, A));
513
- b(this, J, i + 20);
514
- } else
515
- b(this, J, 40);
511
+ c(this, ht, /* @__PURE__ */ a(() => {
512
+ if (t(this, U) > 0 && t(this, A) > 0) {
513
+ const i = Math.ceil(t(this, U) / t(this, A));
514
+ b(this, at, i + t(this, Rt));
515
+ }
516
516
  }, "#updateRowCount"));
517
- h(this, qt, /* @__PURE__ */ a(() => {
518
- var c, d, f;
517
+ c(this, Tt, /* @__PURE__ */ a(() => {
518
+ var h, d, f;
519
519
  const i = t(this, v).querySelector(".ng-container-left table"), e = t(this, v).querySelector(".ng-container-body table"), s = t(this, v).querySelector(".ng-container-right table");
520
520
  if (!e) return;
521
521
  const o = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), n = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(o.length, r.length, n.length);
522
522
  for (let u = 0; u < l; u++) {
523
523
  const g = [
524
- ((c = o[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
524
+ ((h = o[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
525
525
  ((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
526
526
  ((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
527
527
  ], p = Math.max(...g);
528
528
  p > 0 && (o[u] && (o[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), n[u] && (n[u].style.height = `${p}px`));
529
529
  }
530
530
  }, "#syncRowHeights"));
531
- h(this, Tt, /* @__PURE__ */ a(() => {
532
- !t(this, v) || !(t(this, v) instanceof HTMLElement) || (b(this, O, new ResizeObserver((i) => {
531
+ c(this, kt, /* @__PURE__ */ a(() => {
532
+ !t(this, v) || !(t(this, v) instanceof HTMLElement) || (b(this, z, new ResizeObserver((i) => {
533
533
  for (const e of i) {
534
534
  const s = e.target;
535
535
  if (!s.classList.contains("active")) continue;
@@ -539,18 +539,18 @@ const re = class re {
539
539
  const n = s.querySelector("thead");
540
540
  n && (r += n.offsetHeight || n.getBoundingClientRect().height);
541
541
  const l = Math.max(o - r, 100);
542
- t(this, j) !== l && (b(this, j, l), t(this, ht).call(this), t(this, A) !== null && t(this, dt).call(this));
542
+ t(this, U) !== l && (b(this, U, l), t(this, ht).call(this), t(this, A) !== null && t(this, dt).call(this));
543
543
  }
544
544
  }
545
- })), t(this, O).observe(t(this, v)));
545
+ })), t(this, z).observe(t(this, v)));
546
546
  }, "#initResizeObserver"));
547
- h(this, dt, /* @__PURE__ */ a(() => {
547
+ c(this, dt, /* @__PURE__ */ a(() => {
548
548
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
549
549
  const e = t(this, v).querySelector(i);
550
- e && e.querySelector("tbody.bindable-tbody") && t(this, Rt).call(this, e, i);
551
- }), t(this, qt).call(this);
550
+ e && e.querySelector("tbody.bindable-tbody") && t(this, At).call(this, e, i);
551
+ }), t(this, Tt).call(this);
552
552
  }, "#renderAllContainers"));
553
- h(this, kt, /* @__PURE__ */ a((i) => {
553
+ c(this, Lt, /* @__PURE__ */ a((i) => {
554
554
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
555
555
  var l;
556
556
  const s = t(this, v).querySelector(e);
@@ -558,13 +558,13 @@ const re = class re {
558
558
  const o = s.querySelector("tbody.bindable-tbody");
559
559
  if (!o) return;
560
560
  const r = Array.from(o.querySelectorAll("tr:not(.nodata)")), n = ((l = t(this, M).get(e)) == null ? void 0 : l.length) || 1;
561
- r.forEach((c, d) => {
561
+ r.forEach((h, d) => {
562
562
  const f = i + Math.floor(d / n), u = t(this, X).data.get(f);
563
- c.style.display = "", t(this, ft).call(this, c, u, f);
563
+ h.style.display = "", t(this, ft).call(this, h, u, f);
564
564
  });
565
565
  });
566
566
  }, "#adjustBufferRows"));
567
- h(this, tt, /* @__PURE__ */ a((i) => {
567
+ c(this, Q, /* @__PURE__ */ a((i) => {
568
568
  var r;
569
569
  const e = t(this, A);
570
570
  if (!e || e <= 0) return;
@@ -572,26 +572,26 @@ const re = class re {
572
572
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
573
573
  const l = t(this, v).querySelector(n);
574
574
  if (!l) return;
575
- const c = l.querySelector("tbody.bindable-tbody");
576
- if (!c) return;
577
- Array.from(c.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
575
+ const h = l.querySelector("tbody.bindable-tbody");
576
+ if (!h) return;
577
+ Array.from(h.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
578
578
  const g = s + Math.floor(u / o), p = t(this, X).data.get(g);
579
579
  f.style.display = "", t(this, ft).call(this, f, p, g);
580
580
  });
581
- }), t(this, Q) || (b(this, Q, !0), setTimeout(() => {
582
- t(this, kt).call(this, s), b(this, Q, !1);
581
+ }), t(this, J) || (b(this, J, !0), setTimeout(() => {
582
+ t(this, Lt).call(this, s), b(this, J, !1);
583
583
  }, 0));
584
584
  }, "#handleScroll"));
585
- h(this, ft, /* @__PURE__ */ a((i, e, s) => {
585
+ c(this, ft, /* @__PURE__ */ a((i, e, s) => {
586
586
  i.dataset.row = s, Array.from(i.cells).forEach((o, r) => {
587
587
  const n = o.dataset.bind;
588
588
  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;
589
589
  });
590
590
  }, "#bindRowData"));
591
591
  x(this, "destroy", /* @__PURE__ */ a(() => {
592
- t(this, O) && (t(this, O).disconnect(), b(this, O, null));
592
+ t(this, z) && (t(this, z).disconnect(), b(this, z, null));
593
593
  }, "destroy"));
594
- b(this, X, i.getRootNode().host), b(this, v, i), t(this, Tt).call(this);
594
+ b(this, X, i.getRootNode().host), b(this, v, i), t(this, kt).call(this);
595
595
  }
596
596
  getRowHeight() {
597
597
  return t(this, A);
@@ -601,23 +601,23 @@ const re = class re {
601
601
  return ((e = t(this, M).get(i)) == null ? void 0 : e.length) || 1;
602
602
  }
603
603
  };
604
- X = new WeakMap(), v = new WeakMap(), M = new WeakMap(), A = new WeakMap(), O = new WeakMap(), j = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), Rt = new WeakMap(), At = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), dt = new WeakMap(), kt = new WeakMap(), tt = new WeakMap(), ft = new WeakMap(), a(re, "RowManager");
605
- let Kt = re;
606
- var Lt, et, U, Ht, Ct, _t, Mt, It;
607
- const rt = class rt extends HTMLElement {
604
+ X = new WeakMap(), v = new WeakMap(), M = new WeakMap(), A = new WeakMap(), z = new WeakMap(), U = new WeakMap(), at = new WeakMap(), J = new WeakMap(), Rt = new WeakMap(), At = new WeakMap(), qt = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), dt = new WeakMap(), Lt = new WeakMap(), Q = new WeakMap(), ft = new WeakMap(), a(le, "RowManager");
605
+ let Zt = le;
606
+ var Ht, tt, F, Ct, _t, Mt, It, $t;
607
+ const ot = class ot extends HTMLElement {
608
608
  constructor() {
609
609
  super();
610
- h(this, Lt);
611
- h(this, et, null);
612
- h(this, U);
610
+ c(this, Ht);
611
+ c(this, tt, null);
612
+ c(this, F);
613
613
  /**
614
614
  * data.set, add, delete
615
615
  * filter, sorting : κ³ λ €λŒ€μƒ
616
616
  */
617
617
  x(this, "invalidate", /* @__PURE__ */ a(() => {
618
- t(this, U).refresh();
618
+ t(this, F).refresh();
619
619
  }, "invalidate"));
620
- h(this, Ht, /* @__PURE__ */ a(() => {
620
+ c(this, Ct, /* @__PURE__ */ a(() => {
621
621
  [
622
622
  { selector: ".ng-container-body", type: null },
623
623
  { selector: ".ng-container-left", type: "left" },
@@ -625,11 +625,11 @@ const rt = class rt extends HTMLElement {
625
625
  ].forEach(({ selector: s, type: o }) => {
626
626
  const r = this.querySelector(s);
627
627
  if (!r) return;
628
- const n = t(this, _t).call(this, t(this, et), o);
628
+ const n = t(this, Mt).call(this, t(this, tt), o);
629
629
  r.innerHTML = "", r.appendChild(n);
630
630
  });
631
631
  }, "#renderSplitContainers"));
632
- h(this, Ct, /* @__PURE__ */ a(() => {
632
+ c(this, _t, /* @__PURE__ */ a(() => {
633
633
  ["left", "right"].forEach((e) => {
634
634
  const s = this.querySelector(`.ng-container-${e}`), o = s == null ? void 0 : s.querySelector("table");
635
635
  if (!s || !o) return;
@@ -641,13 +641,13 @@ const rt = class rt extends HTMLElement {
641
641
  });
642
642
  }, "#updateContainerWidths"));
643
643
  x(this, "generate", /* @__PURE__ */ a((e) => {
644
- e && (b(this, et, Ft.compile(e)), t(this, et).style.display = "table", t(this, Ht).call(this), t(this, Ct).call(this), requestAnimationFrame(() => {
644
+ e && (b(this, tt, Kt.compile(e)), t(this, tt).style.display = "table", t(this, Ct).call(this), t(this, _t).call(this), requestAnimationFrame(() => {
645
645
  var o;
646
646
  const s = (o = this.querySelector("thead")) == null ? void 0 : o.getBoundingClientRect().height;
647
647
  this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
648
648
  r.style.top = `${s}px`;
649
649
  });
650
- }), t(this, U).initialize(), setTimeout(() => {
650
+ }), t(this, F).initialize(), setTimeout(() => {
651
651
  var s;
652
652
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
653
653
  }, 0));
@@ -655,7 +655,7 @@ const rt = class rt extends HTMLElement {
655
655
  /**
656
656
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
657
657
  */
658
- h(this, _t, /* @__PURE__ */ a((e, s) => {
658
+ c(this, Mt, /* @__PURE__ */ a((e, s) => {
659
659
  const o = e.cloneNode(!0), r = o.querySelector("tbody");
660
660
  if (r) {
661
661
  const n = document.createElement("tbody");
@@ -669,7 +669,7 @@ const rt = class rt extends HTMLElement {
669
669
  n.remove();
670
670
  }), o;
671
671
  }, "#createSplitTable"));
672
- x(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, U).getRowHeight(), "getRowHeight"));
672
+ x(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, F).getRowHeight(), "getRowHeight"));
673
673
  x(this, "scrollToX", /* @__PURE__ */ a((e) => {
674
674
  const s = this.querySelector(".ng-container-body");
675
675
  s && (s.scrollLeft = e);
@@ -678,11 +678,11 @@ const rt = class rt extends HTMLElement {
678
678
  const s = this.querySelector(".ng-container-body");
679
679
  s && (s.scrollTop = e);
680
680
  }, "scrollToY"));
681
- h(this, Mt, /* @__PURE__ */ a(() => {
682
- t(this, It).call(this);
681
+ c(this, It, /* @__PURE__ */ a(() => {
682
+ t(this, $t).call(this);
683
683
  }, "#init"));
684
- h(this, It, /* @__PURE__ */ a(() => {
685
- const e = rt.SCROLLBAR_SIZE;
684
+ c(this, $t, /* @__PURE__ */ a(() => {
685
+ const e = ot.SCROLLBAR_SIZE;
686
686
  this.innerHTML = `
687
687
  <style>
688
688
  nine-table-sheet {
@@ -828,23 +828,23 @@ const rt = class rt extends HTMLElement {
828
828
  </div>
829
829
  `;
830
830
  }, "#render"));
831
- b(this, U, new Kt(this)), b(this, Lt, this.getRootNode().host);
831
+ b(this, F, new Zt(this)), b(this, Ht, this.getRootNode().host);
832
832
  }
833
833
  connectedCallback() {
834
- t(this, Mt).call(this);
834
+ t(this, It).call(this);
835
835
  }
836
836
  disconnectedCallback() {
837
- this.innerHTML = "", D.log("NineTableSheet destroyed.");
837
+ this.innerHTML = "", I.log("NineTableSheet destroyed.");
838
838
  }
839
839
  };
840
- Lt = new WeakMap(), et = new WeakMap(), U = new WeakMap(), Ht = new WeakMap(), Ct = new WeakMap(), _t = new WeakMap(), Mt = new WeakMap(), It = new WeakMap(), a(rt, "NineTableSheet"), x(rt, "SCROLLBAR_SIZE", 16);
841
- let xt = rt;
840
+ Ht = new WeakMap(), tt = new WeakMap(), F = new WeakMap(), Ct = new WeakMap(), _t = new WeakMap(), Mt = new WeakMap(), It = new WeakMap(), $t = new WeakMap(), a(ot, "NineTableSheet"), x(ot, "SCROLLBAR_SIZE", 16);
841
+ let xt = ot;
842
842
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", xt);
843
- var $t, ut;
844
- const le = class le extends HTMLElement {
843
+ var Wt, ut;
844
+ const ae = class ae extends HTMLElement {
845
845
  constructor() {
846
846
  super();
847
- h(this, $t, /* @__PURE__ */ a(() => {
847
+ c(this, Wt, /* @__PURE__ */ a(() => {
848
848
  var e;
849
849
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
850
850
  var n;
@@ -852,7 +852,7 @@ const le = class le extends HTMLElement {
852
852
  t(this, ut).call(this, r, o);
853
853
  }), t(this, ut).call(this, 0, !1);
854
854
  }, "#init"));
855
- h(this, ut, /* @__PURE__ */ a((e, s = !1) => {
855
+ c(this, ut, /* @__PURE__ */ a((e, s = !1) => {
856
856
  const o = /* @__PURE__ */ a(() => {
857
857
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
858
858
  Array.from(this.querySelectorAll("nine-splitter")).forEach((p) => p.style.setProperty("display", "none"));
@@ -861,12 +861,12 @@ const le = class le extends HTMLElement {
861
861
  const E = parseInt(p.getAttribute("data-index"), 10), H = this.querySelector(`nine-splitter[data-split-index="${E}"]`), mt = f[E + 1];
862
862
  H && mt && mt.classList.contains("active") && H.style.setProperty("display", "flex");
863
863
  });
864
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), c = n.querySelectorAll("nine-table-sheet");
864
+ }, "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");
865
865
  if (!l[e]) return;
866
866
  if (!s)
867
867
  l.forEach((f, u) => {
868
868
  f.classList.toggle("active", u === e);
869
- }), c.forEach((f, u) => {
869
+ }), h.forEach((f, u) => {
870
870
  const g = u === e;
871
871
  f.classList.toggle("active", g), f.style.flex = g ? "1 1 100%" : "";
872
872
  });
@@ -885,34 +885,34 @@ const le = class le extends HTMLElement {
885
885
  }, "#switchSheet"));
886
886
  }
887
887
  connectedCallback() {
888
- t(this, $t).call(this);
888
+ t(this, Wt).call(this);
889
889
  }
890
890
  };
891
- $t = new WeakMap(), ut = new WeakMap(), a(le, "NineTableSheets");
892
- let Zt = le;
893
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Zt);
894
- var q, Wt, bt, Ot;
895
- const ae = class ae {
891
+ Wt = new WeakMap(), ut = new WeakMap(), a(ae, "NineTableSheets");
892
+ let Gt = ae;
893
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Gt);
894
+ var q, Ot, bt, zt;
895
+ const ce = class ce {
896
896
  constructor(i) {
897
- h(this, q);
898
- h(this, Wt, /* @__PURE__ */ a(() => {
899
- t(this, Ot).call(this), new ResizeObserver((i) => {
897
+ c(this, q);
898
+ c(this, Ot, /* @__PURE__ */ a(() => {
899
+ t(this, zt).call(this), new ResizeObserver((i) => {
900
900
  for (let e of i)
901
901
  t(this, q).getAttribute("auto-height") === "true" && t(this, bt).call(this);
902
902
  }).observe(t(this, q));
903
903
  }, "#init"));
904
- h(this, bt, /* @__PURE__ */ a(() => {
905
- var c, d;
904
+ c(this, bt, /* @__PURE__ */ a(() => {
905
+ var h, d;
906
906
  const i = Array.from(t(this, q).shadowRoot.querySelectorAll("nine-table-sheet.active"));
907
907
  if (i.length === 0) return;
908
- const e = parseInt(t(this, q).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), o = (c = t(this, q).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, r = (d = t(this, q).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, n = xt.SCROLLBAR_SIZE, l = e * s + o + r + n;
908
+ const e = parseInt(t(this, q).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), o = (h = t(this, q).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, r = (d = t(this, q).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, n = xt.SCROLLBAR_SIZE, l = e * s + o + r + n;
909
909
  t(this, q).style.height = `${l}px`;
910
910
  }, "#applyAutoHeight"));
911
- h(this, Ot, /* @__PURE__ */ a(() => {
912
- const e = Array.from(t(this, q).children).filter((c) => c.tagName === "TABLE"), s = t(this, q).getAttribute("auto-height") === "true", o = e.length, r = e.map((c, d) => {
911
+ c(this, zt, /* @__PURE__ */ a(() => {
912
+ const e = Array.from(t(this, q).children).filter((h) => h.tagName === "TABLE"), s = t(this, q).getAttribute("auto-height") === "true", o = e.length, r = e.map((h, d) => {
913
913
  const u = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, g = d < o - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
914
914
  return u + g;
915
- }).join(""), n = e.map((c, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
915
+ }).join(""), n = e.map((h, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
916
916
  t(this, q).shadowRoot.innerHTML = `
917
917
  <style>
918
918
  :host {
@@ -1013,55 +1013,55 @@ const ae = class ae {
1013
1013
  <nine-table-footer></nine-table-footer>
1014
1014
  `;
1015
1015
  const l = t(this, q).shadowRoot.querySelectorAll("nine-table-sheet");
1016
- l == null || l.forEach((c, d) => {
1016
+ l == null || l.forEach((h, d) => {
1017
1017
  e[d] && setTimeout(() => {
1018
- c.generate(e[d]), s && t(this, bt).call(this);
1018
+ h.generate(e[d]), s && t(this, bt).call(this);
1019
1019
  });
1020
1020
  });
1021
1021
  }, "#render"));
1022
- b(this, q, i), t(this, Wt).call(this);
1022
+ b(this, q, i), t(this, Ot).call(this);
1023
1023
  }
1024
1024
  };
1025
- q = new WeakMap(), Wt = new WeakMap(), bt = new WeakMap(), Ot = new WeakMap(), a(ae, "LayoutManager");
1026
- let Gt = ae;
1027
- var gt, it;
1028
- const ce = class ce {
1025
+ q = new WeakMap(), Ot = new WeakMap(), bt = new WeakMap(), zt = new WeakMap(), a(ce, "LayoutManager");
1026
+ let Jt = ce;
1027
+ var gt, et;
1028
+ const he = class he {
1029
1029
  constructor(i) {
1030
- h(this, gt);
1031
- h(this, it, -1);
1030
+ c(this, gt);
1031
+ c(this, et, -1);
1032
1032
  x(this, "count", /* @__PURE__ */ a(() => t(this, gt).rawRecords.length, "count"));
1033
1033
  b(this, gt, i);
1034
1034
  }
1035
1035
  get at() {
1036
- return t(this, it);
1036
+ return t(this, et);
1037
1037
  }
1038
1038
  set at(i) {
1039
- b(this, it, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, it)}"]`) && setTimeout(() => {
1039
+ b(this, et, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, et)}"]`) && setTimeout(() => {
1040
1040
  });
1041
1041
  }
1042
1042
  };
1043
- gt = new WeakMap(), it = new WeakMap(), a(ce, "ngRow");
1044
- let Jt = ce;
1045
- var T, S, k, st, zt, z, Dt, F, yt, Bt, Nt, nt;
1043
+ gt = new WeakMap(), et = new WeakMap(), a(he, "ngRow");
1044
+ let Qt = he;
1045
+ var T, S, k, it, Bt, B, Dt, j, yt, Nt, Pt, st;
1046
1046
  const L = class L {
1047
1047
  constructor(i, e) {
1048
- h(this, T);
1049
- h(this, S);
1050
- h(this, k, []);
1051
- h(this, st, []);
1052
- h(this, zt, 0);
1053
- h(this, z, []);
1054
- h(this, Dt, /* @__PURE__ */ a(() => {
1055
- b(this, z, []);
1048
+ c(this, T);
1049
+ c(this, S);
1050
+ c(this, k, []);
1051
+ c(this, it, []);
1052
+ c(this, Bt, 0);
1053
+ c(this, B, []);
1054
+ c(this, Dt, /* @__PURE__ */ a(() => {
1055
+ b(this, B, []);
1056
1056
  const i = t(this, T).template || [];
1057
1057
  Array.from(i).forEach((e) => {
1058
1058
  var s;
1059
- t(this, z).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1059
+ t(this, B).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1060
1060
  }), (t(this, S).rawRecords || []).forEach((e) => {
1061
- e.__ng || (e.__ng = t(this, yt).call(this)), e.__ng.height = t(this, z).slice();
1061
+ e.__ng || (e.__ng = t(this, yt).call(this)), e.__ng.height = t(this, B).slice();
1062
1062
  });
1063
1063
  }, "#initialize"));
1064
- h(this, F, /* @__PURE__ */ a(() => {
1064
+ c(this, j, /* @__PURE__ */ a(() => {
1065
1065
  t(this, T).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1066
1066
  i.invalidate();
1067
1067
  });
@@ -1070,35 +1070,35 @@ const L = class L {
1070
1070
  var r;
1071
1071
  const s = this.getValidData();
1072
1072
  if (!s || s.length <= 0) return;
1073
- if (i == null) return t(this, nt).call(this, s);
1073
+ if (i == null) return t(this, st).call(this, s);
1074
1074
  if (i < 0 || i >= s.length) return null;
1075
1075
  const o = typeof ((r = t(this, T).fields) == null ? void 0 : r.get) == "function" ? t(this, T).fields.get() : [];
1076
1076
  if (e != null) {
1077
1077
  const n = o.indexOf(e);
1078
1078
  return n >= 0 ? s[i].v[n] : null;
1079
1079
  }
1080
- return t(this, nt).call(this, s[i]);
1080
+ return t(this, st).call(this, s[i]);
1081
1081
  }, "get"));
1082
1082
  x(this, "set", /* @__PURE__ */ a((i) => {
1083
- this.clear(), this.add(i, !1), t(this, F).call(this);
1083
+ this.clear(), this.add(i, !1), t(this, j).call(this);
1084
1084
  }, "set"));
1085
- h(this, yt, /* @__PURE__ */ a(() => ({
1085
+ c(this, yt, /* @__PURE__ */ a(() => ({
1086
1086
  rowState: L.ROW_STATE.EMPTY,
1087
1087
  deleted: !1,
1088
1088
  filtered: !1,
1089
- height: t(this, z).slice(),
1089
+ height: t(this, B).slice(),
1090
1090
  o: {},
1091
1091
  c: {},
1092
- _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, z).slice(), -1, {}, {}]
1092
+ _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, B).slice(), -1, {}, {}]
1093
1093
  }), "#getDefaultMeta"));
1094
1094
  x(this, "reset", /* @__PURE__ */ a(() => {
1095
- b(this, k, []), b(this, st, []), t(this, F).call(this);
1095
+ b(this, k, []), b(this, it, []), t(this, j).call(this);
1096
1096
  }, "reset"));
1097
1097
  x(this, "clear", /* @__PURE__ */ a(() => {
1098
1098
  var i;
1099
- t(this, S).rawRecords = [], b(this, k, []), b(this, st, []), (i = t(this, S).viewRecords) != null && i.reset && t(this, S).viewRecords.reset();
1099
+ t(this, S).rawRecords = [], b(this, k, []), b(this, it, []), (i = t(this, S).viewRecords) != null && i.reset && t(this, S).viewRecords.reset();
1100
1100
  }, "clear"));
1101
- h(this, Bt, /* @__PURE__ */ a((i) => {
1101
+ c(this, Nt, /* @__PURE__ */ a((i) => {
1102
1102
  var o;
1103
1103
  Array.isArray(i) || (i = [i]);
1104
1104
  const e = typeof ((o = t(this, T).fields) == null ? void 0 : o.get) == "function" ? t(this, T).fields.get() : Object.keys(i[0] || {}), s = [];
@@ -1109,18 +1109,18 @@ const L = class L {
1109
1109
  }), s.push(n);
1110
1110
  }), s;
1111
1111
  }, "#json2Array"));
1112
- h(this, Nt, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1112
+ c(this, Pt, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1113
1113
  e.__ng = t(this, yt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = L.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1114
1114
  }), i), "#defaultInsert"));
1115
1115
  x(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1116
1116
  i === void 0 && (i = {});
1117
- const s = t(this, Bt).call(this, i);
1118
- t(this, S).rawRecords = t(this, S).rawRecords.concat(t(this, Nt).call(this, s)), this.resetRecords();
1117
+ const s = t(this, Nt).call(this, i);
1118
+ t(this, S).rawRecords = t(this, S).rawRecords.concat(t(this, Pt).call(this, s)), this.resetRecords();
1119
1119
  const o = this.count() - 1;
1120
1120
  return e || s.forEach((r, n) => {
1121
1121
  const l = t(this, S).rawRecords[o - n];
1122
1122
  l && (l.__ng.rowState = L.ROW_STATE.EMPTY);
1123
- }), t(this, F).call(this), o;
1123
+ }), t(this, j).call(this), o;
1124
1124
  }, "add"));
1125
1125
  x(this, "delete", /* @__PURE__ */ a((i) => {
1126
1126
  let e = [];
@@ -1131,12 +1131,12 @@ const L = class L {
1131
1131
  r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = L.ROW_STATE.DELETE);
1132
1132
  });
1133
1133
  }
1134
- }), this.resetRecords(), t(this, F).call(this);
1134
+ }), this.resetRecords(), t(this, j).call(this);
1135
1135
  }, "delete"));
1136
1136
  x(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
1137
- var c;
1137
+ var h;
1138
1138
  i = parseInt(i, 10);
1139
- const r = (typeof ((c = t(this, T).fields) == null ? void 0 : c.get) == "function" ? t(this, T).fields.get() : []).indexOf(e);
1139
+ const r = (typeof ((h = t(this, T).fields) == null ? void 0 : h.get) == "function" ? t(this, T).fields.get() : []).indexOf(e);
1140
1140
  if (r < 0) return;
1141
1141
  const n = this.getValidData()[i];
1142
1142
  if (!n) return;
@@ -1144,21 +1144,21 @@ const L = class L {
1144
1144
  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;
1145
1145
  }, "setValue"));
1146
1146
  x(this, "resetRecords", /* @__PURE__ */ a(() => {
1147
- b(this, st, t(this, S).rawRecords.filter((i) => !i.__ng.deleted)), b(this, k, t(this, S).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, S).rawRecords.forEach((i, e) => {
1147
+ b(this, it, t(this, S).rawRecords.filter((i) => !i.__ng.deleted)), b(this, k, t(this, S).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, S).rawRecords.forEach((i, e) => {
1148
1148
  i.__ng.rowidx = e;
1149
1149
  }), t(this, k).forEach((i, e) => {
1150
1150
  i.__ng.i = e;
1151
1151
  });
1152
1152
  }, "resetRecords"));
1153
1153
  x(this, "getValidData", /* @__PURE__ */ a(() => (t(this, k).length === 0 && t(this, S).rawRecords.length > 0 && this.resetRecords(), t(this, k)), "getValidData"));
1154
- h(this, nt, /* @__PURE__ */ a((i) => {
1154
+ c(this, st, /* @__PURE__ */ a((i) => {
1155
1155
  var n;
1156
1156
  if (!i) return i;
1157
1157
  const e = !Array.isArray(i), s = e ? [i] : i, o = typeof ((n = t(this, T).fields) == null ? void 0 : n.get) == "function" ? t(this, T).fields.get() : [], r = s.filter((l) => !l.__ng.deleted).map((l) => {
1158
- const c = {};
1158
+ const h = {};
1159
1159
  return o.forEach((d, f) => {
1160
- c[d] = l.v ? l.v[f] : l[d];
1161
- }), c.__ng = l.__ng, c;
1160
+ h[d] = l.v ? l.v[f] : l[d];
1161
+ }), h.__ng = l.__ng, h;
1162
1162
  });
1163
1163
  return e ? r[0] : r;
1164
1164
  }, "#conv"));
@@ -1166,13 +1166,13 @@ const L = class L {
1166
1166
  b(this, T, i), b(this, S, e), t(this, Dt).call(this);
1167
1167
  }
1168
1168
  get source() {
1169
- return t(this, nt).call(this, t(this, S).rawRecords);
1169
+ return t(this, st).call(this, t(this, S).rawRecords);
1170
1170
  }
1171
1171
  set source(i) {
1172
1172
  this.clear(), this.add(i, !1);
1173
1173
  }
1174
1174
  get nextId() {
1175
- return ++ye(this, zt)._;
1175
+ return ++pe(this, Bt)._;
1176
1176
  }
1177
1177
  get length() {
1178
1178
  return t(this, k).length;
@@ -1181,7 +1181,7 @@ const L = class L {
1181
1181
  return this.length;
1182
1182
  }
1183
1183
  };
1184
- T = new WeakMap(), S = new WeakMap(), k = new WeakMap(), st = new WeakMap(), zt = new WeakMap(), z = new WeakMap(), Dt = new WeakMap(), F = new WeakMap(), yt = new WeakMap(), Bt = new WeakMap(), Nt = new WeakMap(), nt = new WeakMap(), a(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1184
+ T = new WeakMap(), S = new WeakMap(), k = new WeakMap(), it = new WeakMap(), Bt = new WeakMap(), B = new WeakMap(), Dt = new WeakMap(), j = new WeakMap(), yt = new WeakMap(), Nt = new WeakMap(), Pt = new WeakMap(), st = new WeakMap(), a(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1185
1185
  x(L, "ROW_STATE", {
1186
1186
  EMPTY: "EMPTY",
1187
1187
  NORMAL: "NORMAL",
@@ -1189,12 +1189,12 @@ x(L, "ROW_STATE", {
1189
1189
  UPDATE: "UPDATE",
1190
1190
  DELETE: "DELETE"
1191
1191
  });
1192
- let Qt = L;
1192
+ let te = L;
1193
1193
  var K;
1194
- const he = class he {
1194
+ const de = class de {
1195
1195
  constructor(i) {
1196
- h(this, K);
1197
- b(this, K, i), this.row = new Jt(this), this.data = new Qt(t(this, K), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1196
+ c(this, K);
1197
+ b(this, K, i), this.row = new Qt(this), this.data = new te(t(this, K), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1198
1198
  var e;
1199
1199
  (e = t(this, K).view) != null && e.redraw && t(this, K).view.redraw();
1200
1200
  }, this.setDataSource = (e) => {
@@ -1211,31 +1211,31 @@ const he = class he {
1211
1211
  }, this.setDataSource([]);
1212
1212
  }
1213
1213
  };
1214
- K = new WeakMap(), a(he, "ngDataManager");
1215
- let te = he;
1216
- var ot, R, pt, Pt;
1217
- const de = class de {
1214
+ K = new WeakMap(), a(de, "ngDataManager");
1215
+ let ee = de;
1216
+ var nt, R, pt, Yt;
1217
+ const fe = class fe {
1218
1218
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1219
1219
  constructor(i) {
1220
- h(this, ot);
1221
- h(this, R, []);
1220
+ c(this, nt);
1221
+ c(this, R, []);
1222
1222
  x(this, "add", /* @__PURE__ */ a((i, e = "string") => {
1223
1223
  i.forEach((s) => {
1224
1224
  t(this, R).some((o) => o.name === s) || t(this, R).push({ name: s, type: e });
1225
1225
  }), t(this, pt).call(this);
1226
1226
  }, "add"));
1227
- h(this, pt, /* @__PURE__ */ a(() => {
1227
+ c(this, pt, /* @__PURE__ */ a(() => {
1228
1228
  const i = /* @__PURE__ */ new Map();
1229
1229
  t(this, R).forEach((e) => {
1230
1230
  i.set(e.name, e.type);
1231
1231
  }), b(this, R, Array.from(i, ([e, s]) => ({ name: e, type: s }))), b(this, R, t(this, R).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, R).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1232
1232
  }, "#adjust"));
1233
- h(this, Pt, /* @__PURE__ */ a(() => {
1234
- b(this, R, []), D.log(t(this, ot).querySelectorAll("table"));
1235
- const i = Array.from(t(this, ot).querySelectorAll("table"));
1233
+ c(this, Yt, /* @__PURE__ */ a(() => {
1234
+ b(this, R, []), I.log(t(this, nt).querySelectorAll("table"));
1235
+ const i = Array.from(t(this, nt).querySelectorAll("table"));
1236
1236
  if (!(!i || i.length === 0)) {
1237
1237
  for (const e of i)
1238
- D.log(e), $("[data-bind]", e).each((s, o) => {
1238
+ I.log(e), $("[data-bind]", e).each((s, o) => {
1239
1239
  const r = o.dataset.bind, n = o.getAttribute("data-type") || "string";
1240
1240
  r && t(this, R).push({ name: r, type: n });
1241
1241
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
@@ -1252,9 +1252,9 @@ const de = class de {
1252
1252
  }
1253
1253
  n.split("data.").forEach((l) => {
1254
1254
  if (l.trim() != "") {
1255
- const c = l.search(/[^_A-Za-z0-9]/g);
1255
+ const h = l.search(/[^_A-Za-z0-9]/g);
1256
1256
  let d = "";
1257
- c >= 0 ? d = l.substring(0, c) : n.startsWith("data.") && (d = l.replace("data.", "")), d && t(this, R).push({ name: d, type: "string" });
1257
+ h >= 0 ? d = l.substring(0, h) : n.startsWith("data.") && (d = l.replace("data.", "")), d && t(this, R).push({ name: d, type: "string" });
1258
1258
  }
1259
1259
  });
1260
1260
  });
@@ -1262,7 +1262,7 @@ const de = class de {
1262
1262
  t(this, pt).call(this);
1263
1263
  }
1264
1264
  }, "#init"));
1265
- b(this, ot, i), t(this, Pt).call(this);
1265
+ b(this, nt, i), t(this, Yt).call(this);
1266
1266
  }
1267
1267
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1268
1268
  get() {
@@ -1284,25 +1284,25 @@ const de = class de {
1284
1284
  return t(this, R).some((e) => e.name === i);
1285
1285
  }
1286
1286
  };
1287
- ot = new WeakMap(), R = new WeakMap(), pt = new WeakMap(), Pt = new WeakMap(), a(de, "ngFields");
1288
- let ee = de;
1289
- var Z, Yt, Vt;
1290
- const fe = class fe extends HTMLElement {
1287
+ nt = new WeakMap(), R = new WeakMap(), pt = new WeakMap(), Yt = new WeakMap(), a(fe, "ngFields");
1288
+ let ie = fe;
1289
+ var Z, Vt, Xt;
1290
+ const ue = class ue extends HTMLElement {
1291
1291
  constructor() {
1292
1292
  super();
1293
1293
  //#created = false;
1294
- h(this, Z);
1295
- h(this, Yt);
1296
- h(this, Vt, /* @__PURE__ */ a(() => {
1297
- this.fields = new ee(this), b(this, Yt, new Gt(this)), D.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1294
+ c(this, Z);
1295
+ c(this, Vt);
1296
+ c(this, Xt, /* @__PURE__ */ a(() => {
1297
+ this.fields = new ie(this), b(this, Vt, new Jt(this)), I.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1298
1298
  }, "#init"));
1299
- this.attachShadow({ mode: "open" }), b(this, Z, new te(this));
1299
+ this.attachShadow({ mode: "open" }), b(this, Z, new ee(this));
1300
1300
  }
1301
1301
  connectedCallback() {
1302
- t(this, Vt).call(this);
1302
+ t(this, Xt).call(this);
1303
1303
  }
1304
1304
  disconnectedCallback() {
1305
- D.log("NineTable disconnected.");
1305
+ I.log("NineTable disconnected.");
1306
1306
  }
1307
1307
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1308
1308
  get data() {
@@ -1317,7 +1317,7 @@ const fe = class fe extends HTMLElement {
1317
1317
  return t(this, Z);
1318
1318
  }
1319
1319
  };
1320
- Z = new WeakMap(), Yt = new WeakMap(), Vt = new WeakMap(), a(fe, "NineTable");
1321
- let ie = fe;
1322
- customElements.get("nine-table") || customElements.define("nine-table", ie);
1320
+ Z = new WeakMap(), Vt = new WeakMap(), Xt = new WeakMap(), a(ue, "NineTable");
1321
+ let se = ue;
1322
+ customElements.get("nine-table") || customElements.define("nine-table", se);
1323
1323
  //# sourceMappingURL=nine-table.js.map