@ninebone/table 0.0.731 β†’ 0.0.733

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 ds = Object.defineProperty;
2
- var fs = (q) => {
1
+ var fs = Object.defineProperty;
2
+ var us = (q) => {
3
3
  throw TypeError(q);
4
4
  };
5
- var ps = (q, s, e) => s in q ? ds(q, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[s] = e;
6
- var h = (q, s) => ds(q, "name", { value: s, configurable: !0 });
7
- var E = (q, s, e) => ps(q, typeof s != "symbol" ? s + "" : s, e), xe = (q, s, e) => s.has(q) || fs("Cannot " + e);
8
- var t = (q, s, e) => (xe(q, s, "read from private field"), e ? e.call(q) : s.get(q)), d = (q, s, e) => s.has(q) ? fs("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(q) : s.set(q, e), p = (q, s, e, n) => (xe(q, s, "write to private field"), n ? n.call(q, e) : s.set(q, e), e), Q = (q, s, e) => (xe(q, s, "access private method"), e);
9
- var us = (q, s, e, n) => ({
5
+ var ys = (q, s, e) => s in q ? fs(q, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[s] = e;
6
+ var h = (q, s) => fs(q, "name", { value: s, configurable: !0 });
7
+ var E = (q, s, e) => ys(q, typeof s != "symbol" ? s + "" : s, e), ve = (q, s, e) => s.has(q) || us("Cannot " + e);
8
+ var t = (q, s, e) => (ve(q, s, "read from private field"), e ? e.call(q) : s.get(q)), d = (q, s, e) => s.has(q) ? us("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(q) : s.set(q, e), p = (q, s, e, n) => (ve(q, s, "write to private field"), n ? n.call(q, e) : s.set(q, e), e), Q = (q, s, e) => (ve(q, s, "access private method"), e);
9
+ var gs = (q, s, e, n) => ({
10
10
  set _(r) {
11
11
  p(q, s, r, e);
12
12
  },
@@ -14,17 +14,17 @@ var us = (q, s, e, n) => ({
14
14
  return t(q, s, n);
15
15
  }
16
16
  });
17
- import { trace as ys } from "@ninebone/util";
18
- const Ue = class Ue extends ys.constructor {
17
+ import { trace as ms } from "@ninebone/util";
18
+ const Xe = class Xe extends ms.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(Ue, "Trace");
24
- let we = Ue;
23
+ h(Xe, "Trace");
24
+ let we = Xe;
25
25
  const R = new we();
26
- var B, K, A, tt, et, st, Yt, nt, Vt;
27
- const Xe = class Xe extends HTMLElement {
26
+ var B, K, A, tt, et, st, Vt, nt, Ut;
27
+ const Ke = class Ke extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  d(this, B);
@@ -33,7 +33,7 @@ const Xe = class Xe extends HTMLElement {
33
33
  d(this, tt);
34
34
  d(this, et);
35
35
  d(this, st);
36
- d(this, Yt, /* @__PURE__ */ h(() => {
36
+ d(this, Vt, /* @__PURE__ */ h(() => {
37
37
  if (!t(this, B)) return;
38
38
  const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
39
39
  e && (p(this, st, new ResizeObserver(() => {
@@ -73,7 +73,7 @@ const Xe = class Xe extends HTMLElement {
73
73
  const l = n.clientWidth, u = r.scrollWidth - l;
74
74
  return c > 0 && u > 0 && (n.scrollLeft = a / c * u), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, Vt, /* @__PURE__ */ h(() => {
76
+ d(this, Ut, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
78
  clearInterval(t(this, tt)), clearInterval(t(this, et));
79
79
  const o = parseInt(t(this, A).thumb.style.left || 0, 10);
@@ -190,7 +190,7 @@ const Xe = class Xe extends HTMLElement {
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), n.addEventListener("scroll", () => {
192
192
  t(this, K) || this.refresh();
193
- }), t(this, Vt).call(this), t(this, Yt).call(this), this.refresh();
193
+ }), t(this, Ut).call(this), t(this, Vt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
@@ -198,11 +198,11 @@ const Xe = class Xe extends HTMLElement {
198
198
  t(this, st) && t(this, st).disconnect();
199
199
  }
200
200
  };
201
- B = new WeakMap(), K = new WeakMap(), A = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), nt = new WeakMap(), Vt = new WeakMap(), h(Xe, "NineTableHScrollBar");
202
- let ve = Xe;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ve);
204
- var rt, ot, bt, C, Tt, Ct, Ut;
205
- const Ke = class Ke extends HTMLElement {
201
+ B = new WeakMap(), K = new WeakMap(), A = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), nt = new WeakMap(), Ut = new WeakMap(), h(Ke, "NineTableHScrollBar");
202
+ let Se = Ke;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Se);
204
+ var rt, ot, bt, C, Tt, Ct, Xt;
205
+ const Ge = class Ge extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
208
  d(this, rt);
@@ -230,7 +230,7 @@ const Ke = class Ke extends HTMLElement {
230
230
  const y = l - f;
231
231
  g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, C).top.disabled = u <= 0, t(this, C).bottom.disabled = u >= b - 1;
232
232
  }, "refresh"));
233
- d(this, Ut, /* @__PURE__ */ h(() => {
233
+ d(this, Xt, /* @__PURE__ */ h(() => {
234
234
  R.log("nine-table-vscrollbar.#init");
235
235
  const e = t(this, C).container, n = /* @__PURE__ */ h(() => {
236
236
  const o = (t(this, rt).data.get() || []).length, i = t(this, ot).getRowHeight();
@@ -241,10 +241,10 @@ const Ke = class Ke extends HTMLElement {
241
241
  r.stopPropagation(), r.preventDefault(), p(this, bt, !0), p(this, Tt, r.clientY), p(this, Ct, e.scrollTop);
242
242
  const o = /* @__PURE__ */ h((a) => {
243
243
  if (!t(this, bt)) return;
244
- const c = t(this, C).track.getBoundingClientRect(), l = t(this, C).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, Tt), g = e.clientHeight, y = n(), w = Math.max(y - g, 1);
245
- if (u > 0 && w > 0) {
246
- const v = b / u * w;
247
- let m = t(this, Ct) + v;
244
+ const c = t(this, C).track.getBoundingClientRect(), l = t(this, C).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, Tt), g = e.clientHeight, y = n(), v = Math.max(y - g, 1);
245
+ if (u > 0 && v > 0) {
246
+ const w = b / u * v;
247
+ let m = t(this, Ct) + w;
248
248
  const I = Math.max(0, y - g);
249
249
  m < 0 && (m = 0), m > I && (m = I), e.scrollTop = m;
250
250
  }
@@ -345,16 +345,16 @@ const Ke = class Ke extends HTMLElement {
345
345
  thumb: this.querySelector(".ng-scroll-thumb"),
346
346
  top: this.querySelector(".ng-scroll-top"),
347
347
  bottom: this.querySelector(".ng-scroll-bottom")
348
- }), t(this, Ut).call(this), this.refresh();
348
+ }), t(this, Xt).call(this), this.refresh();
349
349
  }, "initWhenReady");
350
350
  e();
351
351
  }
352
352
  };
353
- rt = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), C = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Ut = new WeakMap(), h(Ke, "NineTableVScrollBar");
354
- let Se = Ke;
355
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Se);
356
- var j, S, it, P, D, G, at, kt, Oe, ze, Xt, Kt, Lt, It, Ht, Gt, Zt, Mt, We, pt, $t, Jt;
357
- const Ge = class Ge {
353
+ rt = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), C = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Xt = new WeakMap(), h(Ge, "NineTableVScrollBar");
354
+ let Re = Ge;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Re);
356
+ var j, S, it, P, D, G, at, kt, ze, We, Kt, Gt, Lt, It, Ht, Zt, Jt, Mt, Be, pt, $t, Qt;
357
+ const Ze = class Ze {
358
358
  constructor(s) {
359
359
  d(this, j);
360
360
  d(this, S);
@@ -364,10 +364,10 @@ const Ge = class Ge {
364
364
  d(this, G, null);
365
365
  d(this, at, 0);
366
366
  d(this, kt, 40);
367
- d(this, Oe, !1);
368
367
  d(this, ze, !1);
368
+ d(this, We, !1);
369
369
  //#ticking = false; // 🎯 고속 슀크둀 μŠ€λ‘œν‹€λ§μš© ν”Œλž˜κ·Έ
370
- d(this, Xt, 3);
370
+ d(this, Kt, 3);
371
371
  E(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
373
  R.log("rowManager.refresh");
@@ -406,7 +406,7 @@ const Ge = class Ge {
406
406
  });
407
407
  }
408
408
  }, "initialize"));
409
- d(this, Kt, /* @__PURE__ */ h((s, e) => {
409
+ d(this, Gt, /* @__PURE__ */ h((s, e) => {
410
410
  R.log("rowManager.#renderRows");
411
411
  const n = t(this, P).get(e);
412
412
  if (!n || n.length === 0) return;
@@ -460,37 +460,37 @@ const Ge = class Ge {
460
460
  d(this, Ht, /* @__PURE__ */ h(() => {
461
461
  if (t(this, at) > 0 && t(this, D) > 0) {
462
462
  const s = Math.ceil(t(this, at) / t(this, D));
463
- p(this, kt, s + t(this, Xt));
463
+ p(this, kt, s + t(this, Kt));
464
464
  }
465
465
  }, "#updateRowCount"));
466
- d(this, Gt, /* @__PURE__ */ h(() => {
466
+ d(this, Zt, /* @__PURE__ */ h(() => {
467
467
  var a, c, l, f, u, b;
468
468
  const s = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), n = t(this, S).querySelector(".ng-container-right .ng-part-body table");
469
469
  if (e) {
470
- const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), w = n ? Array.from(n.querySelectorAll("tbody tr")) : [], v = Math.max(g.length, y.length, w.length);
471
- for (let m = 0; m < v; m++) {
470
+ const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), v = n ? Array.from(n.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, y.length, v.length);
471
+ for (let m = 0; m < w; m++) {
472
472
  const I = [
473
473
  ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
474
  ((c = y[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
- ((l = w[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
475
+ ((l = v[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
476
  ], T = Math.max(...I);
477
- T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), w[m] && (w[m].style.height = `${T}px`));
477
+ T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`));
478
478
  }
479
479
  }
480
480
  const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), o = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), i = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
481
481
  if (o) {
482
- const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), w = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], v = Math.max(g.length, y.length, w.length);
483
- for (let m = 0; m < v; m++) {
482
+ const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, y.length, v.length);
483
+ for (let m = 0; m < w; m++) {
484
484
  const I = [
485
485
  ((f = g[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
486
  ((u = y[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
487
- ((b = w[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
487
+ ((b = v[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
488
  ], T = Math.max(...I);
489
- T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), w[m] && (w[m].style.height = `${T}px`));
489
+ T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`));
490
490
  }
491
491
  }
492
492
  }, "#syncRowHeights"));
493
- d(this, Zt, /* @__PURE__ */ h(() => {
493
+ d(this, Jt, /* @__PURE__ */ h(() => {
494
494
  !t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, G, new ResizeObserver((s) => {
495
495
  for (const e of s) {
496
496
  const n = e.target;
@@ -509,10 +509,10 @@ const Ge = class Ge {
509
509
  d(this, Mt, /* @__PURE__ */ h(() => {
510
510
  R.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
511
511
  const e = t(this, S).querySelector(s);
512
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Kt).call(this, e, s);
513
- }), t(this, Jt).call(this), t(this, Gt).call(this);
512
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Gt).call(this, e, s);
513
+ }), t(this, Qt).call(this), t(this, Zt).call(this);
514
514
  }, "#renderAllContainers"));
515
- d(this, We, /* @__PURE__ */ h((s) => {
515
+ d(this, Be, /* @__PURE__ */ h((s) => {
516
516
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
517
517
  var l;
518
518
  const n = t(this, S).querySelector(e);
@@ -548,9 +548,9 @@ const Ge = class Ge {
548
548
  }), f !== a && (R.log(`πŸ”„ [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
549
549
  const y = t(this, S).querySelector(g);
550
550
  if (!y) return;
551
- const w = y.querySelector(".ng-part-body tbody.bindable-tbody");
552
- if (!w) return;
553
- Array.from(w.querySelectorAll("tr:not(.nodata)")).forEach((m, I) => {
551
+ const v = y.querySelector(".ng-part-body tbody.bindable-tbody");
552
+ if (!v) return;
553
+ Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((m, I) => {
554
554
  const T = a + Math.floor(I / r);
555
555
  if (T >= n) {
556
556
  m.style.display = "none";
@@ -582,7 +582,7 @@ const Ge = class Ge {
582
582
  i && typeof i.refresh == "function" && i.refresh();
583
583
  });
584
584
  }, "#bindRowData"));
585
- d(this, Jt, /* @__PURE__ */ h(() => {
585
+ d(this, Qt, /* @__PURE__ */ h(() => {
586
586
  var c, l, f;
587
587
  R.log("rowManager.#syncHeaderHeights");
588
588
  const s = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), n = t(this, S).querySelector(".ng-container-right .ng-part-header table");
@@ -600,7 +600,7 @@ const Ge = class Ge {
600
600
  E(this, "destroy", /* @__PURE__ */ h(() => {
601
601
  t(this, G) && (t(this, G).disconnect(), p(this, G, null));
602
602
  }, "destroy"));
603
- p(this, j, s.getRootNode().host), p(this, S, s), t(this, Zt).call(this);
603
+ p(this, j, s.getRootNode().host), p(this, S, s), t(this, Jt).call(this);
604
604
  }
605
605
  getRowHeight() {
606
606
  return t(this, D);
@@ -610,14 +610,14 @@ const Ge = class Ge {
610
610
  return ((e = t(this, P).get(s)) == null ? void 0 : e.length) || 1;
611
611
  }
612
612
  };
613
- j = new WeakMap(), S = new WeakMap(), it = new WeakMap(), P = new WeakMap(), D = new WeakMap(), G = new WeakMap(), at = new WeakMap(), kt = new WeakMap(), Oe = new WeakMap(), ze = new WeakMap(), Xt = new WeakMap(), Kt = new WeakMap(), Lt = new WeakMap(), It = new WeakMap(), Ht = new WeakMap(), Gt = new WeakMap(), Zt = new WeakMap(), Mt = new WeakMap(), We = new WeakMap(), pt = new WeakMap(), $t = new WeakMap(), Jt = new WeakMap(), h(Ge, "RowManager");
614
- let Re = Ge;
615
- const Qt = class Qt {
613
+ j = new WeakMap(), S = new WeakMap(), it = new WeakMap(), P = new WeakMap(), D = new WeakMap(), G = new WeakMap(), at = new WeakMap(), kt = new WeakMap(), ze = new WeakMap(), We = new WeakMap(), Kt = new WeakMap(), Gt = new WeakMap(), Lt = new WeakMap(), It = new WeakMap(), Ht = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), Mt = new WeakMap(), Be = new WeakMap(), pt = new WeakMap(), $t = new WeakMap(), Qt = new WeakMap(), h(Ze, "RowManager");
614
+ let Ae = Ze;
615
+ const te = class te {
616
616
  /**
617
617
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
618
618
  */
619
619
  static compileAll(s) {
620
- return Array.isArray(s) ? s.map((e) => Qt.compile(e)) : [];
620
+ return Array.isArray(s) ? s.map((e) => te.compile(e)) : [];
621
621
  }
622
622
  /**
623
623
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
@@ -629,9 +629,9 @@ const Qt = class Qt {
629
629
  const f = l.getAttribute("cell-type") || "renderer";
630
630
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
631
  let u = `cell-${f}`;
632
- const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), w = l.getAttribute("type");
633
- let v = [];
634
- b && v.push(`data-bind="${b}"`), g && v.push(`data-expr="${g}"`), y && v.push(`maxbyte="${y}"`), w && v.push(`type="${w}"`), l.innerHTML = `<${u} ${v.join(" ")}></${u}>`;
632
+ const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), v = l.getAttribute("type");
633
+ let w = [];
634
+ b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), y && w.push(`maxbyte="${y}"`), v && w.push(`type="${v}"`), l.innerHTML = `<${u} ${w.join(" ")}></${u}>`;
635
635
  });
636
636
  }, "processCellTypes"), n = /* @__PURE__ */ h((a) => {
637
637
  if (!a.querySelector("colgroup")) {
@@ -656,25 +656,25 @@ const Qt = class Qt {
656
656
  });
657
657
  const g = Array.from(Array(u), () => Array(b).fill(null));
658
658
  l.forEach((y) => {
659
- const w = y.sectionRowIndex;
660
- let v = 0;
659
+ const v = y.sectionRowIndex;
660
+ let w = 0;
661
661
  Array.from(y.querySelectorAll("th,td")).forEach((m) => {
662
- for (let H = 0; H < g[w].length; H++)
663
- if (g[w][H] === null) {
664
- v = H;
662
+ for (let H = 0; H < g[v].length; H++)
663
+ if (g[v][H] === null) {
664
+ w = H;
665
665
  break;
666
666
  }
667
667
  const I = m.rowSpan || 1, T = m.colSpan || 1;
668
668
  for (let H = 0; H < I; H++)
669
669
  for (let F = 0; F < T; F++)
670
- w + H < u && v + F < b && (g[w + H][v + F] = H === 0 && F === 0 ? "1" : "0");
670
+ v + H < u && w + F < b && (g[v + H][w + F] = H === 0 && F === 0 ? "1" : "0");
671
671
  });
672
672
  }), l.forEach((y) => {
673
- const w = y.sectionRowIndex;
674
- Array.from(y.querySelectorAll("th,td")).forEach((v) => {
675
- for (let m = 0; m < g[w].length; m++)
676
- if (g[w][m] === "1") {
677
- v.dataset.col = m, g[w][m] = "0";
673
+ const v = y.sectionRowIndex;
674
+ Array.from(y.querySelectorAll("th,td")).forEach((w) => {
675
+ for (let m = 0; m < g[v].length; m++)
676
+ if (g[v][m] === "1") {
677
+ w.dataset.col = m, g[v][m] = "0";
678
678
  break;
679
679
  }
680
680
  });
@@ -689,10 +689,10 @@ const Qt = class Qt {
689
689
  }
690
690
  // 🎯 [μΆ”κ°€] td/th에 μ„ μ–Έλœ cell-type 속성을 읽어 μ»€μŠ€ν…€ νƒœκ·Έλ‘œ μžλ™ 감싸기
691
691
  };
692
- h(Qt, "TableCompiler");
693
- let Ae = Qt;
694
- var _, Y, U, At, gs;
695
- const Ze = class Ze {
692
+ h(te, "TableCompiler");
693
+ let Ee = te;
694
+ var _, Y, U, At, bs;
695
+ const Je = class Je {
696
696
  constructor(s) {
697
697
  d(this, U);
698
698
  d(this, _);
@@ -719,13 +719,13 @@ const Ze = class Ze {
719
719
  l < 0 || c.querySelectorAll("td, th").forEach((f) => {
720
720
  const u = parseInt(f.dataset.col, 10);
721
721
  if (isNaN(u)) return;
722
- const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), y = l + b - 1, w = u + g - 1;
723
- y >= s && l <= n && w >= e && u <= r && (i++, f.classList.add("selected"), l <= s && f.classList.add("selected-top"), y >= n && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), w >= r && f.classList.add("selected-right"));
722
+ const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), y = l + b - 1, v = u + g - 1;
723
+ y >= s && l <= n && v >= e && u <= r && (i++, f.classList.add("selected"), l <= s && f.classList.add("selected-top"), y >= n && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), v >= r && f.classList.add("selected-right"));
724
724
  });
725
725
  });
726
726
  }), R.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
727
727
  }, "render"));
728
- p(this, _, s), Q(this, U, gs).call(this), t(this, _).querySelectorAll(
728
+ p(this, _, s), Q(this, U, bs).call(this), t(this, _).querySelectorAll(
729
729
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
730
730
  ).forEach((n) => {
731
731
  n.addEventListener("scroll", () => {
@@ -745,13 +745,13 @@ const Ze = class Ze {
745
745
  b.querySelectorAll("tbody tr").forEach((g) => {
746
746
  if (g.classList.contains("nodata")) return;
747
747
  const { matrixRow: y } = Q(this, U, At).call(this, g);
748
- y < 0 || g.querySelectorAll("td, th").forEach((w) => {
749
- const v = parseInt(w.dataset.col, 10);
750
- if (isNaN(v)) return;
751
- const m = parseInt(w.rowSpan || 1, 10), I = parseInt(w.colSpan || 1, 10), T = y + m - 1, H = v + I - 1;
752
- if (T >= o && y <= i && H >= a && v <= c) {
753
- const X = Math.min(o, y), ls = Math.max(i, T), cs = Math.min(a, v), hs = Math.max(c, H);
754
- (X !== o || ls !== i || cs !== a || hs !== c) && (o = X, i = ls, a = cs, c = hs, f = !0);
748
+ y < 0 || g.querySelectorAll("td, th").forEach((v) => {
749
+ const w = parseInt(v.dataset.col, 10);
750
+ if (isNaN(w)) return;
751
+ const m = parseInt(v.rowSpan || 1, 10), I = parseInt(v.colSpan || 1, 10), T = y + m - 1, H = w + I - 1;
752
+ if (T >= o && y <= i && H >= a && w <= c) {
753
+ const X = Math.min(o, y), cs = Math.max(i, T), hs = Math.min(a, w), ds = Math.max(c, H);
754
+ (X !== o || cs !== i || hs !== a || ds !== c) && (o = X, i = cs, a = hs, c = ds, f = !0);
755
755
  }
756
756
  });
757
757
  });
@@ -765,7 +765,7 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
765
765
  if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
766
766
  const n = s.closest("tbody"), o = Array.from(n.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), i = o.indexOf(s), a = o.length > 0 ? o.length : 1, c = e * a + (i >= 0 ? i : s.sectionRowIndex % a);
767
767
  return { dataRow: e, subRowIndex: i, matrixRow: c };
768
- }, "#getMatrixRow"), gs = /* @__PURE__ */ h(function() {
768
+ }, "#getMatrixRow"), bs = /* @__PURE__ */ h(function() {
769
769
  const s = t(this, _).querySelector(".ng-container-top");
770
770
  if (!s) {
771
771
  R.log("❌ [CellSelection] .ng-container-top not found!");
@@ -786,11 +786,11 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
786
786
  const f = document.elementFromPoint(l.clientX, l.clientY);
787
787
  let u = f == null ? void 0 : f.closest("td, th");
788
788
  if (!u || !t(this, _).contains(u)) {
789
- const w = t(this, _).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
790
- for (const v of w) {
791
- const m = v.getBoundingClientRect();
789
+ const v = t(this, _).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
790
+ for (const w of v) {
791
+ const m = w.getBoundingClientRect();
792
792
  if (l.clientX >= m.left && l.clientX <= m.right && l.clientY >= m.top && l.clientY <= m.bottom) {
793
- u = v;
793
+ u = w;
794
794
  break;
795
795
  }
796
796
  }
@@ -803,17 +803,19 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
803
803
  }, "onMouseUp");
804
804
  document.addEventListener("mousemove", a), document.addEventListener("mouseup", c);
805
805
  });
806
- }, "#initEvents"), h(Ze, "CellSelection");
807
- let Ee = Ze;
808
- var V, lt, te, ee, se, bs;
809
- const Je = class Je {
806
+ }, "#initEvents"), h(Je, "CellSelection");
807
+ let qe = Je;
808
+ var V, lt, ee, se, _t, ne, ps;
809
+ const Qe = class Qe {
810
+ // 🎯 ν‚€λ³΄λ“œ λ„€λΉ„κ²Œμ΄μ…˜ 쀑 슀크둀 튐 λ°©μ§€ ν”Œλž˜κ·Έ
810
811
  constructor(s) {
811
- d(this, se);
812
+ d(this, ne);
812
813
  d(this, V);
813
814
  d(this, lt, null);
814
- d(this, te, -1);
815
815
  d(this, ee, -1);
816
- p(this, V, s), Q(this, se, bs).call(this), R.log("🎯 [CellNavigation] Initialized");
816
+ d(this, se, -1);
817
+ d(this, _t, !1);
818
+ p(this, V, s), Q(this, ne, ps).call(this), R.log("🎯 [CellNavigation] Initialized");
817
819
  }
818
820
  get currentCell() {
819
821
  return t(this, lt);
@@ -823,11 +825,13 @@ const Je = class Je {
823
825
  p(this, lt, s), s.focus({ preventScroll: !0 });
824
826
  const e = parseInt(s.dataset.row, 10), n = parseInt(s.dataset.col, 10);
825
827
  if (!isNaN(e) && !isNaN(n)) {
826
- p(this, te, e), p(this, ee, n);
828
+ p(this, ee, e), p(this, se, n);
827
829
  const r = s.closest("tr"), o = r == null ? void 0 : r.closest("tbody");
828
830
  if (o) {
829
831
  const a = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((u) => parseInt(u.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), f = e * c + (l >= 0 ? l : 0);
830
- t(this, V).selection.setRange(f, n, f, n);
832
+ p(this, _t, !0), t(this, V).selection.setRange(f, n, f, n), setTimeout(() => {
833
+ p(this, _t, !1);
834
+ }, 0);
831
835
  }
832
836
  }
833
837
  }
@@ -863,37 +867,37 @@ const Je = class Je {
863
867
  }
864
868
  }
865
869
  };
866
- V = new WeakMap(), lt = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), se = new WeakSet(), bs = /* @__PURE__ */ h(function() {
870
+ V = new WeakMap(), lt = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), _t = new WeakMap(), ne = new WeakSet(), ps = /* @__PURE__ */ h(function() {
867
871
  t(this, V).addEventListener("mousedown", (s) => {
868
872
  const e = s.target.closest("td, th");
869
873
  !e || e.dataset.row === void 0 || e.dataset.col === void 0 || e.closest("tr").classList.contains("nodata") || (this.currentCell = e);
870
874
  }), t(this, V).addEventListener("keydown", (s) => {
871
875
  ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(s.code) && this.moveCell(s);
872
876
  });
873
- }, "#initEvents"), h(Je, "CellNavigation");
874
- let qe = Je;
875
- var ne, ct, ht, _t, Nt, re, oe, yt, ie, ae;
877
+ }, "#initEvents"), h(Qe, "CellNavigation");
878
+ let Te = Qe;
879
+ var re, ct, ht, Nt, Dt, oe, ie, yt, ae, le;
876
880
  const Et = class Et extends HTMLElement {
877
881
  constructor() {
878
882
  super();
879
- d(this, ne);
883
+ d(this, re);
880
884
  d(this, ct, null);
881
885
  d(this, ht);
882
- d(this, _t);
883
886
  d(this, Nt);
887
+ d(this, Dt);
884
888
  E(this, "invalidate", /* @__PURE__ */ h(() => {
885
889
  R.log("sheet.invalidate()"), t(this, ht).refresh();
886
890
  }, "invalidate"));
887
891
  E(this, "generate", /* @__PURE__ */ h((e) => {
888
892
  if (R.log("sheet.generate()"), !e) return;
889
- p(this, ct, Ae.compile(e)), t(this, re).call(this), t(this, oe).call(this);
893
+ p(this, ct, Ee.compile(e)), t(this, oe).call(this), t(this, ie).call(this);
890
894
  const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
891
895
  n && o && (o.style.top = `${n.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ht).initialize(), setTimeout(() => {
892
896
  var i;
893
897
  (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
894
898
  }, 0);
895
899
  }, "generate"));
896
- d(this, re, /* @__PURE__ */ h(() => {
900
+ d(this, oe, /* @__PURE__ */ h(() => {
897
901
  [
898
902
  { selector: ".ng-container-body", type: null },
899
903
  { selector: ".ng-container-left", type: "left" },
@@ -903,7 +907,7 @@ const Et = class Et extends HTMLElement {
903
907
  (o = this.querySelector(`${n} .ng-part-header`)) == null || o.appendChild(t(this, yt).call(this, t(this, ct), r, "header")), (i = this.querySelector(`${n} .ng-virtual-spacer`)) == null || i.before(t(this, yt).call(this, t(this, ct), r, "body")), (a = this.querySelector(`${n} .ng-part-footer`)) == null || a.appendChild(t(this, yt).call(this, t(this, ct), r, "footer"));
904
908
  });
905
909
  }, "#renderSplitContainers"));
906
- d(this, oe, /* @__PURE__ */ h(() => {
910
+ d(this, ie, /* @__PURE__ */ h(() => {
907
911
  ["left", "right", "body"].forEach((e) => {
908
912
  const n = this.querySelector(`.ng-container-${e}`), r = n == null ? void 0 : n.querySelectorAll("table");
909
913
  if (!n || !r || r.length === 0) return;
@@ -939,10 +943,10 @@ const Et = class Et extends HTMLElement {
939
943
  const n = this.querySelector(".ng-container-body .ng-part-body");
940
944
  n && (n.scrollTop = e);
941
945
  }, "scrollToY"));
942
- d(this, ie, /* @__PURE__ */ h(() => {
943
- t(this, ae).call(this), p(this, _t, new Ee(this)), p(this, Nt, new qe(this));
944
- }, "#init"));
945
946
  d(this, ae, /* @__PURE__ */ h(() => {
947
+ t(this, le).call(this), p(this, Nt, new qe(this)), p(this, Dt, new Te(this));
948
+ }, "#init"));
949
+ d(this, le, /* @__PURE__ */ h(() => {
946
950
  const e = Et.SCROLLBAR_SIZE;
947
951
  this.innerHTML = `
948
952
  <style>
@@ -1144,44 +1148,44 @@ const Et = class Et extends HTMLElement {
1144
1148
  </div>
1145
1149
  `;
1146
1150
  }, "#render"));
1147
- p(this, ht, new Re(this)), p(this, ne, this.getRootNode().host);
1151
+ p(this, ht, new Ae(this)), p(this, re, this.getRootNode().host);
1148
1152
  }
1149
1153
  connectedCallback() {
1150
- t(this, ie).call(this);
1154
+ t(this, ae).call(this);
1151
1155
  }
1152
1156
  get selection() {
1153
- return t(this, _t);
1157
+ return t(this, Nt);
1154
1158
  }
1155
1159
  get navigation() {
1156
- return t(this, Nt);
1160
+ return t(this, Dt);
1157
1161
  }
1158
1162
  disconnectedCallback() {
1159
1163
  this.innerHTML = "", R.log("NineTableSheet destroyed.");
1160
1164
  }
1161
1165
  };
1162
- ne = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), _t = new WeakMap(), Nt = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), yt = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), h(Et, "NineTableSheet"), E(Et, "SCROLLBAR_SIZE", 16);
1163
- let jt = Et;
1164
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", jt);
1165
- var le, Dt;
1166
- const Qe = class Qe extends HTMLElement {
1166
+ re = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), Nt = new WeakMap(), Dt = new WeakMap(), oe = new WeakMap(), ie = new WeakMap(), yt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), h(Et, "NineTableSheet"), E(Et, "SCROLLBAR_SIZE", 16);
1167
+ let Yt = Et;
1168
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Yt);
1169
+ var ce, Ot;
1170
+ const ts = class ts extends HTMLElement {
1167
1171
  constructor() {
1168
1172
  super();
1169
- d(this, le, /* @__PURE__ */ h(() => {
1173
+ d(this, ce, /* @__PURE__ */ h(() => {
1170
1174
  var e;
1171
1175
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
1172
1176
  var i;
1173
1177
  const r = n.ctrlKey || n.metaKey || n.shiftKey, o = parseInt((i = n.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1174
- t(this, Dt).call(this, o, r);
1175
- }), t(this, Dt).call(this, 0, !1);
1178
+ t(this, Ot).call(this, o, r);
1179
+ }), t(this, Ot).call(this, 0, !1);
1176
1180
  }, "#init"));
1177
- d(this, Dt, /* @__PURE__ */ h((e, n = !1) => {
1181
+ d(this, Ot, /* @__PURE__ */ h((e, n = !1) => {
1178
1182
  const r = /* @__PURE__ */ h(() => {
1179
1183
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
1180
1184
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1181
1185
  const b = f.filter((g) => g.classList.contains("active"));
1182
1186
  b.length < 2 || b.forEach((g) => {
1183
- const y = parseInt(g.getAttribute("data-index"), 10), w = this.querySelector(`nine-splitter[data-split-index="${y}"]`), v = f[y + 1];
1184
- w && v && v.classList.contains("active") && w.style.setProperty("display", "flex");
1187
+ const y = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${y}"]`), w = f[y + 1];
1188
+ v && w && w.classList.contains("active") && v.style.setProperty("display", "flex");
1185
1189
  });
1186
1190
  }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), c = i.querySelectorAll("nine-table-sheet");
1187
1191
  if (!a[e]) return;
@@ -1207,30 +1211,30 @@ const Qe = class Qe extends HTMLElement {
1207
1211
  }, "#switchSheet"));
1208
1212
  }
1209
1213
  connectedCallback() {
1210
- t(this, le).call(this);
1214
+ t(this, ce).call(this);
1211
1215
  }
1212
1216
  };
1213
- le = new WeakMap(), Dt = new WeakMap(), h(Qe, "NineTableSheets");
1214
- let Te = Qe;
1215
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Te);
1216
- var N, ce, Ot, he;
1217
- const ts = class ts {
1217
+ ce = new WeakMap(), Ot = new WeakMap(), h(ts, "NineTableSheets");
1218
+ let Ce = ts;
1219
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Ce);
1220
+ var N, he, zt, de;
1221
+ const es = class es {
1218
1222
  constructor(s) {
1219
1223
  d(this, N);
1220
- d(this, ce, /* @__PURE__ */ h(() => {
1221
- t(this, he).call(this), new ResizeObserver((s) => {
1224
+ d(this, he, /* @__PURE__ */ h(() => {
1225
+ t(this, de).call(this), new ResizeObserver((s) => {
1222
1226
  for (let e of s)
1223
- t(this, N).getAttribute("auto-height") === "true" && t(this, Ot).call(this);
1227
+ t(this, N).getAttribute("auto-height") === "true" && t(this, zt).call(this);
1224
1228
  }).observe(t(this, N));
1225
1229
  }, "#init"));
1226
- d(this, Ot, /* @__PURE__ */ h(() => {
1230
+ d(this, zt, /* @__PURE__ */ h(() => {
1227
1231
  var c, l;
1228
1232
  const s = Array.from(t(this, N).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1229
1233
  if (s.length === 0) return;
1230
- const e = parseInt(t(this, N).getAttribute("max-display-row"), 10) || 10, n = Math.max(...s.map((f) => f.getRowHeight())), r = (c = t(this, N).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, N).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = jt.SCROLLBAR_SIZE, a = e * n + r + o + i;
1234
+ const e = parseInt(t(this, N).getAttribute("max-display-row"), 10) || 10, n = Math.max(...s.map((f) => f.getRowHeight())), r = (c = t(this, N).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, N).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Yt.SCROLLBAR_SIZE, a = e * n + r + o + i;
1231
1235
  t(this, N).style.height = `${a}px`;
1232
1236
  }, "#applyAutoHeight"));
1233
- d(this, he, /* @__PURE__ */ h(() => {
1237
+ d(this, de, /* @__PURE__ */ h(() => {
1234
1238
  const e = Array.from(t(this, N).children).filter((c) => c.tagName === "TABLE"), n = t(this, N).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1235
1239
  const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1236
1240
  return u + b;
@@ -1359,22 +1363,22 @@ const ts = class ts {
1359
1363
  const a = t(this, N).shadowRoot.querySelectorAll("nine-table-sheet");
1360
1364
  a == null || a.forEach((c, l) => {
1361
1365
  e[l] && setTimeout(() => {
1362
- c.generate(e[l]), n && t(this, Ot).call(this);
1366
+ c.generate(e[l]), n && t(this, zt).call(this);
1363
1367
  });
1364
1368
  });
1365
1369
  }, "#render"));
1366
- p(this, N, s), t(this, ce).call(this);
1370
+ p(this, N, s), t(this, he).call(this);
1367
1371
  }
1368
1372
  };
1369
- N = new WeakMap(), ce = new WeakMap(), Ot = new WeakMap(), he = new WeakMap(), h(ts, "LayoutManager");
1370
- let Ce = ts;
1371
- var zt, mt;
1372
- const es = class es {
1373
+ N = new WeakMap(), he = new WeakMap(), zt = new WeakMap(), de = new WeakMap(), h(es, "LayoutManager");
1374
+ let ke = es;
1375
+ var Wt, mt;
1376
+ const ss = class ss {
1373
1377
  constructor(s) {
1374
- d(this, zt);
1378
+ d(this, Wt);
1375
1379
  d(this, mt, -1);
1376
- E(this, "count", /* @__PURE__ */ h(() => t(this, zt).rawRecords.length, "count"));
1377
- p(this, zt, s);
1380
+ E(this, "count", /* @__PURE__ */ h(() => t(this, Wt).rawRecords.length, "count"));
1381
+ p(this, Wt, s);
1378
1382
  }
1379
1383
  get at() {
1380
1384
  return t(this, mt);
@@ -1384,25 +1388,25 @@ const es = class es {
1384
1388
  });
1385
1389
  }
1386
1390
  };
1387
- zt = new WeakMap(), mt = new WeakMap(), h(es, "ngRow");
1388
- let ke = es;
1389
- var O, k, z, xt, de, Z, fe, dt, Wt, ue, ge, wt;
1391
+ Wt = new WeakMap(), mt = new WeakMap(), h(ss, "ngRow");
1392
+ let Le = ss;
1393
+ var O, k, z, xt, fe, Z, ue, dt, Bt, ge, be, vt;
1390
1394
  const W = class W {
1391
1395
  constructor(s, e) {
1392
1396
  d(this, O);
1393
1397
  d(this, k);
1394
1398
  d(this, z, []);
1395
1399
  d(this, xt, []);
1396
- d(this, de, 0);
1400
+ d(this, fe, 0);
1397
1401
  d(this, Z, []);
1398
- d(this, fe, /* @__PURE__ */ h(() => {
1402
+ d(this, ue, /* @__PURE__ */ h(() => {
1399
1403
  p(this, Z, []);
1400
1404
  const s = t(this, O).template || [];
1401
1405
  Array.from(s).forEach((e) => {
1402
1406
  var n;
1403
1407
  t(this, Z).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1404
1408
  }), (t(this, k).rawRecords || []).forEach((e) => {
1405
- e.__ng || (e.__ng = t(this, Wt).call(this)), e.__ng.height = t(this, Z).slice();
1409
+ e.__ng || (e.__ng = t(this, Bt).call(this)), e.__ng.height = t(this, Z).slice();
1406
1410
  });
1407
1411
  }, "#initialize"));
1408
1412
  d(this, dt, /* @__PURE__ */ h(() => {
@@ -1415,19 +1419,19 @@ const W = class W {
1415
1419
  var o;
1416
1420
  const n = this.getValidData();
1417
1421
  if (!n || n.length <= 0) return;
1418
- if (s == null) return t(this, wt).call(this, n);
1422
+ if (s == null) return t(this, vt).call(this, n);
1419
1423
  if (s < 0 || s >= n.length) return null;
1420
1424
  const r = typeof ((o = t(this, O).fields) == null ? void 0 : o.get) == "function" ? t(this, O).fields.get() : [];
1421
1425
  if (e != null) {
1422
1426
  const i = r.indexOf(e);
1423
1427
  return i >= 0 ? n[s].v[i] : null;
1424
1428
  }
1425
- return t(this, wt).call(this, n[s]);
1429
+ return t(this, vt).call(this, n[s]);
1426
1430
  }, "get"));
1427
1431
  E(this, "set", /* @__PURE__ */ h((s) => {
1428
1432
  this.clear(), this.add(s, !1), t(this, dt).call(this);
1429
1433
  }, "set"));
1430
- d(this, Wt, /* @__PURE__ */ h(() => ({
1434
+ d(this, Bt, /* @__PURE__ */ h(() => ({
1431
1435
  rowState: W.ROW_STATE.EMPTY,
1432
1436
  deleted: !1,
1433
1437
  filtered: !1,
@@ -1443,7 +1447,7 @@ const W = class W {
1443
1447
  var s;
1444
1448
  t(this, k).rawRecords = [], p(this, z, []), p(this, xt, []), (s = t(this, k).viewRecords) != null && s.reset && t(this, k).viewRecords.reset();
1445
1449
  }, "clear"));
1446
- d(this, ue, /* @__PURE__ */ h((s) => {
1450
+ d(this, ge, /* @__PURE__ */ h((s) => {
1447
1451
  var r;
1448
1452
  Array.isArray(s) || (s = [s]);
1449
1453
  const e = typeof ((r = t(this, O).fields) == null ? void 0 : r.get) == "function" ? t(this, O).fields.get() : Object.keys(s[0] || {}), n = [];
@@ -1454,13 +1458,13 @@ const W = class W {
1454
1458
  }), n.push(i);
1455
1459
  }), n;
1456
1460
  }, "#json2Array"));
1457
- d(this, ge, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1458
- e.__ng = t(this, Wt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1461
+ d(this, be, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1462
+ e.__ng = t(this, Bt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1459
1463
  }), s), "#defaultInsert"));
1460
1464
  E(this, "add", /* @__PURE__ */ h((s, e = !0) => {
1461
1465
  s === void 0 && (s = {});
1462
- const n = t(this, ue).call(this, s);
1463
- t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ge).call(this, n)), this.resetRecords();
1466
+ const n = t(this, ge).call(this, s);
1467
+ t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, be).call(this, n)), this.resetRecords();
1464
1468
  const r = this.count() - 1;
1465
1469
  return e || n.forEach((o, i) => {
1466
1470
  const a = t(this, k).rawRecords[r - i];
@@ -1496,7 +1500,7 @@ const W = class W {
1496
1500
  });
1497
1501
  }, "resetRecords"));
1498
1502
  E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, z).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, z)), "getValidData"));
1499
- d(this, wt, /* @__PURE__ */ h((s) => {
1503
+ d(this, vt, /* @__PURE__ */ h((s) => {
1500
1504
  var i;
1501
1505
  if (!s) return s;
1502
1506
  const e = !Array.isArray(s), n = e ? [s] : s, r = typeof ((i = t(this, O).fields) == null ? void 0 : i.get) == "function" ? t(this, O).fields.get() : [], o = n.filter((a) => !a.__ng.deleted).map((a) => {
@@ -1508,16 +1512,16 @@ const W = class W {
1508
1512
  return e ? o[0] : o;
1509
1513
  }, "#conv"));
1510
1514
  E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1511
- p(this, O, s), p(this, k, e), t(this, fe).call(this);
1515
+ p(this, O, s), p(this, k, e), t(this, ue).call(this);
1512
1516
  }
1513
1517
  get source() {
1514
- return t(this, wt).call(this, t(this, k).rawRecords);
1518
+ return t(this, vt).call(this, t(this, k).rawRecords);
1515
1519
  }
1516
1520
  set source(s) {
1517
1521
  this.clear(), this.add(s, !1);
1518
1522
  }
1519
1523
  get nextId() {
1520
- return ++us(this, de)._;
1524
+ return ++gs(this, fe)._;
1521
1525
  }
1522
1526
  get count() {
1523
1527
  return t(this, z).length;
@@ -1529,7 +1533,7 @@ const W = class W {
1529
1533
  return this.length;
1530
1534
  }
1531
1535
  };
1532
- O = new WeakMap(), k = new WeakMap(), z = new WeakMap(), xt = new WeakMap(), de = new WeakMap(), Z = new WeakMap(), fe = new WeakMap(), dt = new WeakMap(), Wt = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), wt = new WeakMap(), h(W, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1536
+ O = new WeakMap(), k = new WeakMap(), z = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), Z = new WeakMap(), ue = new WeakMap(), dt = new WeakMap(), Bt = new WeakMap(), ge = new WeakMap(), be = new WeakMap(), vt = new WeakMap(), h(W, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1533
1537
  E(W, "ROW_STATE", {
1534
1538
  EMPTY: "EMPTY",
1535
1539
  NORMAL: "NORMAL",
@@ -1537,12 +1541,12 @@ E(W, "ROW_STATE", {
1537
1541
  UPDATE: "UPDATE",
1538
1542
  DELETE: "DELETE"
1539
1543
  });
1540
- let Le = W;
1544
+ let Ie = W;
1541
1545
  var ft;
1542
- const ss = class ss {
1546
+ const ns = class ns {
1543
1547
  constructor(s) {
1544
1548
  d(this, ft);
1545
- p(this, ft, s), this.row = new ke(this), this.data = new Le(t(this, ft), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1549
+ p(this, ft, s), this.row = new Le(this), this.data = new Ie(t(this, ft), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1546
1550
  var e;
1547
1551
  (e = t(this, ft).view) != null && e.redraw && t(this, ft).view.redraw();
1548
1552
  }, this.setDataSource = (e) => {
@@ -1559,28 +1563,28 @@ const ss = class ss {
1559
1563
  }, this.setDataSource([]);
1560
1564
  }
1561
1565
  };
1562
- ft = new WeakMap(), h(ss, "ngDataManager");
1563
- let Ie = ss;
1564
- var vt, M, Bt, be;
1565
- const ns = class ns {
1566
+ ft = new WeakMap(), h(ns, "ngDataManager");
1567
+ let He = ns;
1568
+ var wt, M, Pt, pe;
1569
+ const rs = class rs {
1566
1570
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1567
1571
  constructor(s) {
1568
- d(this, vt);
1572
+ d(this, wt);
1569
1573
  d(this, M, []);
1570
1574
  E(this, "add", /* @__PURE__ */ h((s, e = "string") => {
1571
1575
  s.forEach((n) => {
1572
1576
  t(this, M).some((r) => r.name === n) || t(this, M).push({ name: n, type: e });
1573
- }), t(this, Bt).call(this);
1577
+ }), t(this, Pt).call(this);
1574
1578
  }, "add"));
1575
- d(this, Bt, /* @__PURE__ */ h(() => {
1579
+ d(this, Pt, /* @__PURE__ */ h(() => {
1576
1580
  const s = /* @__PURE__ */ new Map();
1577
1581
  t(this, M).forEach((e) => {
1578
1582
  s.set(e.name, e.type);
1579
1583
  }), p(this, M, Array.from(s, ([e, n]) => ({ name: e, type: n }))), p(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
1580
1584
  }, "#adjust"));
1581
- d(this, be, /* @__PURE__ */ h(() => {
1582
- p(this, M, []), R.log(t(this, vt).querySelectorAll("table"));
1583
- const s = Array.from(t(this, vt).querySelectorAll("table"));
1585
+ d(this, pe, /* @__PURE__ */ h(() => {
1586
+ p(this, M, []), R.log(t(this, wt).querySelectorAll("table"));
1587
+ const s = Array.from(t(this, wt).querySelectorAll("table"));
1584
1588
  if (!(!s || s.length === 0)) {
1585
1589
  for (const e of s)
1586
1590
  R.log(e), $("[data-bind]", e).each((n, r) => {
@@ -1607,10 +1611,10 @@ const ns = class ns {
1607
1611
  });
1608
1612
  });
1609
1613
  });
1610
- t(this, Bt).call(this);
1614
+ t(this, Pt).call(this);
1611
1615
  }
1612
1616
  }, "#init"));
1613
- p(this, vt, s), t(this, be).call(this);
1617
+ p(this, wt, s), t(this, pe).call(this);
1614
1618
  }
1615
1619
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1616
1620
  get() {
@@ -1632,22 +1636,22 @@ const ns = class ns {
1632
1636
  return t(this, M).some((e) => e.name === s);
1633
1637
  }
1634
1638
  };
1635
- vt = new WeakMap(), M = new WeakMap(), Bt = new WeakMap(), be = new WeakMap(), h(ns, "ngFields");
1636
- let He = ns;
1637
- var ut, pe, ye;
1638
- const rs = class rs extends HTMLElement {
1639
+ wt = new WeakMap(), M = new WeakMap(), Pt = new WeakMap(), pe = new WeakMap(), h(rs, "ngFields");
1640
+ let Me = rs;
1641
+ var ut, ye, me;
1642
+ const os = class os extends HTMLElement {
1639
1643
  constructor() {
1640
1644
  super();
1641
1645
  //#created = false;
1642
1646
  d(this, ut);
1643
- d(this, pe);
1644
- d(this, ye, /* @__PURE__ */ h(() => {
1645
- this.fields = new He(this), p(this, pe, new Ce(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1647
+ d(this, ye);
1648
+ d(this, me, /* @__PURE__ */ h(() => {
1649
+ this.fields = new Me(this), p(this, ye, new ke(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1646
1650
  }, "#init"));
1647
- this.attachShadow({ mode: "open" }), p(this, ut, new Ie(this));
1651
+ this.attachShadow({ mode: "open" }), p(this, ut, new He(this));
1648
1652
  }
1649
1653
  connectedCallback() {
1650
- t(this, ye).call(this);
1654
+ t(this, me).call(this);
1651
1655
  }
1652
1656
  disconnectedCallback() {
1653
1657
  R.log("NineTable disconnected.");
@@ -1665,9 +1669,9 @@ const rs = class rs extends HTMLElement {
1665
1669
  return t(this, ut);
1666
1670
  }
1667
1671
  };
1668
- ut = new WeakMap(), pe = new WeakMap(), ye = new WeakMap(), h(rs, "NineTable");
1669
- let Me = rs;
1670
- customElements.get("nine-table") || customElements.define("nine-table", Me);
1672
+ ut = new WeakMap(), ye = new WeakMap(), me = new WeakMap(), h(os, "NineTable");
1673
+ let $e = os;
1674
+ customElements.get("nine-table") || customElements.define("nine-table", $e);
1671
1675
  const qt = class qt extends HTMLElement {
1672
1676
  // πŸ‘ˆ μ»€μŠ€ν…€ μŠ€νƒ€μΌμš© μΊμ‹œ μΆ”κ°€
1673
1677
  constructor() {
@@ -1680,18 +1684,18 @@ const qt = class qt extends HTMLElement {
1680
1684
  }
1681
1685
  };
1682
1686
  h(qt, "BasicCellElement"), E(qt, "_styleCache", /* @__PURE__ */ new Map()), E(qt, "_customStyleCache", /* @__PURE__ */ new Map());
1683
- let $e = qt;
1684
- var L, Pt, x, Be, Pe, Fe, je, Ye;
1685
- const os = class os extends $e {
1687
+ let _e = qt;
1688
+ var L, Ft, x, Pe, Fe, je, Ye, Ve;
1689
+ const is = class is extends _e {
1686
1690
  constructor() {
1687
1691
  super();
1688
1692
  d(this, L);
1689
- d(this, Pt);
1693
+ d(this, Ft);
1690
1694
  d(this, x);
1691
- d(this, Be);
1692
1695
  d(this, Pe);
1693
1696
  d(this, Fe);
1694
1697
  d(this, je);
1698
+ d(this, Ye);
1695
1699
  E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1696
1700
  if (t(this, x))
1697
1701
  if (t(this, x).closest("tbody")) {
@@ -1712,7 +1716,7 @@ const os = class os extends $e {
1712
1716
  } catch {
1713
1717
  }
1714
1718
  }, "getDisplayText"));
1715
- d(this, Ye, /* @__PURE__ */ h(() => {
1719
+ d(this, Ve, /* @__PURE__ */ h(() => {
1716
1720
  if (!(!t(this, L) || !t(this, L).template || !t(this, x).closest("tbody.bindable"))) {
1717
1721
  var e = ninegrid.j.querySelectorAll(t(this, x)).attr("suppress");
1718
1722
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
@@ -1736,8 +1740,8 @@ const os = class os extends $e {
1736
1740
  else
1737
1741
  o = !0;
1738
1742
  o ? ninegrid.j.querySelectorAll(t(this, x)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, x)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, x)).hasClass("hidden") || (o ? ninegrid.j.querySelectorAll(t(this, x)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, x)).addClass("hidden"));
1739
- var y = parseInt(t(this, x).dataset.matrixRow), w = y - 1, v = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, x).dataset.col}"][data-matrix-row="${w}"]`);
1740
- $(v).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(v).removeClass("last-none-suppress").addClass("last-suppress") : !$(v).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(v).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(v).removeClass("last-none-suppress").removeClass("last-suppress");
1743
+ var y = parseInt(t(this, x).dataset.matrixRow), v = y - 1, w = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, x).dataset.col}"][data-matrix-row="${v}"]`);
1744
+ $(w).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").addClass("last-suppress") : !$(w).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").removeClass("last-suppress");
1741
1745
  }
1742
1746
  }
1743
1747
  }, "#resetSuppress"));
@@ -1755,7 +1759,7 @@ const os = class os extends $e {
1755
1759
  }, "getExprValue"));
1756
1760
  }
1757
1761
  connectedCallback() {
1758
- super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this, Pt, t(this, x).closest("tr"));
1762
+ super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this, Ft, t(this, x).closest("tr"));
1759
1763
  }
1760
1764
  get value() {
1761
1765
  var e = !t(this, L) || !t(this, L).dataManager || !t(this, x) || !t(this, x).dataset || !t(this, x).dataset.row || !t(this, x).dataset.bind ? "" : t(this, x).closest("tr").data[t(this, x).dataset.bind];
@@ -1774,12 +1778,12 @@ const os = class os extends $e {
1774
1778
  }
1775
1779
  refresh() {
1776
1780
  const e = t(this, x).dataset.bind;
1777
- return parseInt(t(this, x).dataset.row), t(this, Pt).data[e];
1781
+ return parseInt(t(this, x).dataset.row), t(this, Ft).data[e];
1778
1782
  }
1779
1783
  };
1780
- L = new WeakMap(), Pt = new WeakMap(), x = new WeakMap(), Be = new WeakMap(), Pe = new WeakMap(), Fe = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), h(os, "CellElement");
1781
- let _e = os;
1782
- const is = class is extends _e {
1784
+ L = new WeakMap(), Ft = new WeakMap(), x = new WeakMap(), Pe = new WeakMap(), Fe = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), h(is, "CellElement");
1785
+ let Ne = is;
1786
+ const as = class as extends Ne {
1783
1787
  constructor() {
1784
1788
  super();
1785
1789
  }
@@ -1790,21 +1794,21 @@ const is = class is extends _e {
1790
1794
  return super.refresh();
1791
1795
  }
1792
1796
  };
1793
- h(is, "EditableCellElement");
1794
- let Ne = is;
1795
- var Ft, gt, St, Rt, me, J, Ve;
1796
- const as = class as extends Ne {
1797
+ h(as, "EditableCellElement");
1798
+ let De = as;
1799
+ var jt, gt, St, Rt, xe, J, Ue;
1800
+ const ls = class ls extends De {
1797
1801
  constructor() {
1798
1802
  super();
1799
- d(this, Ft);
1803
+ d(this, jt);
1800
1804
  d(this, gt);
1801
1805
  d(this, St);
1802
1806
  d(this, Rt);
1803
- d(this, me);
1807
+ d(this, xe);
1804
1808
  d(this, J);
1805
1809
  E(this, "refresh", /* @__PURE__ */ h(() => {
1806
1810
  const e = super.refresh();
1807
- t(this, Ft).value = e;
1811
+ t(this, jt).value = e;
1808
1812
  }, "refresh"));
1809
1813
  /**
1810
1814
  dataRefresh = (v) => {
@@ -1836,7 +1840,7 @@ const as = class as extends Ne {
1836
1840
  if (!v) this.reset();
1837
1841
  };
1838
1842
  */
1839
- d(this, Ve, /* @__PURE__ */ h((e) => {
1843
+ d(this, Ue, /* @__PURE__ */ h((e) => {
1840
1844
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1841
1845
  if (t(this, gt) == "number") {
1842
1846
  let o = [];
@@ -1851,7 +1855,7 @@ const as = class as extends Ne {
1851
1855
  t(this, St) && ninegrid.getByteLength(e.target.value) >= Number(t(this, St)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1852
1856
  }
1853
1857
  }, "#onKeyDown"));
1854
- if (this.applyBaseStyle(), p(this, gt, this.getAttribute("type") || "text"), p(this, St, this.getAttribute("maxbyte")), p(this, Rt, this.getAttribute("min")), p(this, me, this.getAttribute("max")), p(this, J, this.getAttribute("scale")), !["text", "number"].includes(t(this, gt))) throw `invalid type : ${t(this, gt)}`;
1858
+ if (this.applyBaseStyle(), p(this, gt, this.getAttribute("type") || "text"), p(this, St, this.getAttribute("maxbyte")), p(this, Rt, this.getAttribute("min")), p(this, xe, this.getAttribute("max")), p(this, J, this.getAttribute("scale")), !["text", "number"].includes(t(this, gt))) throw `invalid type : ${t(this, gt)}`;
1855
1859
  }
1856
1860
  connectedCallback() {
1857
1861
  for (var e = [], n = 0; n < this.attributes.length; n++)
@@ -1861,11 +1865,11 @@ const as = class as extends Ne {
1861
1865
  ${e.join(" ")}
1862
1866
  ondragstart="return false;"
1863
1867
  >
1864
- `, super.connectedCallback(), p(this, Ft, this.querySelector("input"));
1868
+ `, super.connectedCallback(), p(this, jt, this.querySelector("input"));
1865
1869
  }
1866
1870
  };
1867
- Ft = new WeakMap(), gt = new WeakMap(), St = new WeakMap(), Rt = new WeakMap(), me = new WeakMap(), J = new WeakMap(), Ve = new WeakMap(), h(as, "CellInputText");
1868
- let De = as;
1871
+ jt = new WeakMap(), gt = new WeakMap(), St = new WeakMap(), Rt = new WeakMap(), xe = new WeakMap(), J = new WeakMap(), Ue = new WeakMap(), h(ls, "CellInputText");
1872
+ let Oe = ls;
1869
1873
  customElements.get("cell-input-text");
1870
- customElements.get("cell-input") || customElements.define("cell-input", De);
1874
+ customElements.get("cell-input") || customElements.define("cell-input", Oe);
1871
1875
  //# sourceMappingURL=nine-table.js.map