@ninebone/table 0.0.234 β†’ 0.0.235

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.
@@ -23,7 +23,7 @@ const qe = class qe extends De.constructor {
23
23
  a(qe, "Trace");
24
24
  let me = qe;
25
25
  const G = new me();
26
- var L, z, p, O, B, D, se, N, ne;
26
+ var L, z, p, O, B, D, ie, N, se;
27
27
  const ke = class ke extends HTMLElement {
28
28
  constructor() {
29
29
  super();
@@ -33,7 +33,7 @@ const ke = class ke extends HTMLElement {
33
33
  d(this, O);
34
34
  d(this, B);
35
35
  d(this, D);
36
- d(this, se, /* @__PURE__ */ a(() => {
36
+ d(this, ie, /* @__PURE__ */ a(() => {
37
37
  if (!e(this, L)) return;
38
38
  const t = e(this, L).querySelector(".ng-container-body");
39
39
  t && (y(this, D, new ResizeObserver(() => {
@@ -74,7 +74,7 @@ const ke = class ke extends HTMLElement {
74
74
  let u = f > 0 ? -c * (h - l) / f : 0;
75
75
  return -u > h - l && (u = -(h - l)), -u + 5 > h - l && (u = -(h - l)), l >= h && (u = 0), n.style.transform = `translateX(${u}px)`, c > 0 && c < f - 1;
76
76
  }, "#thumbMoveTo"));
77
- d(this, ne, /* @__PURE__ */ a(() => {
77
+ d(this, se, /* @__PURE__ */ a(() => {
78
78
  const t = /* @__PURE__ */ a((n) => {
79
79
  clearInterval(e(this, O)), clearInterval(e(this, B));
80
80
  const r = parseInt(e(this, p).thumb.style.left || 0, 10);
@@ -189,7 +189,7 @@ const ke = class ke extends HTMLElement {
189
189
  thumb: this.querySelector(".ng-scroll-thumb"),
190
190
  left: this.querySelector(".ng-scroll-left"),
191
191
  right: this.querySelector(".ng-scroll-right")
192
- }), e(this, ne).call(this), e(this, se).call(this), this.refresh();
192
+ }), e(this, se).call(this), e(this, ie).call(this), this.refresh();
193
193
  }, "initWhenReady");
194
194
  t();
195
195
  }
@@ -197,10 +197,10 @@ const ke = class ke extends HTMLElement {
197
197
  e(this, D) && e(this, D).disconnect();
198
198
  }
199
199
  };
200
- L = new WeakMap(), z = new WeakMap(), p = new WeakMap(), O = new WeakMap(), B = new WeakMap(), D = new WeakMap(), se = new WeakMap(), N = new WeakMap(), ne = new WeakMap(), a(ke, "NineTableHScrollBar");
200
+ L = new WeakMap(), z = new WeakMap(), p = new WeakMap(), O = new WeakMap(), B = new WeakMap(), D = new WeakMap(), ie = new WeakMap(), N = new WeakMap(), se = new WeakMap(), a(ke, "NineTableHScrollBar");
201
201
  let we = ke;
202
202
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", we);
203
- var P, _, E, V, H, M, re, oe, le, J;
203
+ var P, _, E, V, H, M, ne, re, oe, le;
204
204
  const Le = class Le {
205
205
  constructor(i) {
206
206
  d(this, P);
@@ -210,13 +210,13 @@ const Le = class Le {
210
210
  d(this, H, 0);
211
211
  d(this, M, 0);
212
212
  x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this, E), "getRowHeight"));
213
- d(this, re, /* @__PURE__ */ a(() => {
214
- e(this, oe).call(this);
213
+ d(this, ne, /* @__PURE__ */ a(() => {
214
+ e(this, re).call(this);
215
215
  }, "#init"));
216
216
  /**
217
217
  * 🎯 뷰포트 크기 λ³€ν™” μ‹œμ μ— 높이 계산 및 ν•„μš”ν•œ ν–‰ 개수 산정·캐싱을 μ™„κ²°
218
218
  */
219
- d(this, oe, /* @__PURE__ */ a(() => {
219
+ d(this, re, /* @__PURE__ */ a(() => {
220
220
  !e(this, P) || !(e(this, P) instanceof HTMLElement) || y(this, V, new ResizeObserver((i) => {
221
221
  for (const t of i) {
222
222
  const s = t.target;
@@ -233,7 +233,7 @@ const Le = class Le {
233
233
  const u = Math.ceil(e(this, H) / e(this, E));
234
234
  y(this, M, u + 20), G.log(`[RowManager] Resized. Height: ${e(this, H)}px | Target Rows: ${e(this, M)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
235
235
  const b = s.querySelector(g);
236
- b && b.querySelector("tbody") && e(this, J).call(this, b);
236
+ b && b.querySelector("tbody") && e(this, le).call(this, b);
237
237
  });
238
238
  }
239
239
  }
@@ -243,9 +243,9 @@ const Le = class Le {
243
243
  // 🎯 ν…œν”Œλ¦Ώ μΆ”μΆœ, 높이 μΈ‘μ •, 초기 λ Œλ”λ§μ„ μˆœμ„œμ— 맞게 λ‚΄λΆ€μ—μ„œ 일괄 처리
244
244
  x(this, "initialize", /* @__PURE__ */ a((i) => {
245
245
  const t = e(this, P).querySelector(".ng-container-body"), s = i.querySelector("tbody"), n = Array.from(s.querySelectorAll("tr"));
246
- y(this, _, n.map((r) => r.cloneNode(!0))), y(this, E, null), e(this, le).call(this, t), e(this, J).call(this, t);
246
+ y(this, _, n.map((r) => r.cloneNode(!0))), y(this, E, null), e(this, oe).call(this, t);
247
247
  }, "initialize"));
248
- d(this, le, /* @__PURE__ */ a((i) => {
248
+ d(this, oe, /* @__PURE__ */ a((i) => {
249
249
  if (e(this, E) !== null && e(this, E) > 0)
250
250
  return e(this, E);
251
251
  if (e(this, _).length === 0)
@@ -285,7 +285,7 @@ const Le = class Le {
285
285
  /**
286
286
  * 🎯 μΊμ‹œλœ ν–‰ 개수λ₯Ό κ³§λ°”λ‘œ κ°€μ Έμ™€μ„œ TR λΌˆλŒ€ μ£Όμž… (쀑볡 계산 제거)
287
287
  */
288
- d(this, J, /* @__PURE__ */ a((i) => {
288
+ d(this, le, /* @__PURE__ */ a((i) => {
289
289
  if (e(this, _).length === 0) return;
290
290
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
291
291
  if (!t) return;
@@ -300,13 +300,13 @@ const Le = class Le {
300
300
  x(this, "destroy", /* @__PURE__ */ a(() => {
301
301
  e(this, V) && (e(this, V).disconnect(), y(this, V, null));
302
302
  }, "destroy"));
303
- y(this, P, i), e(this, re).call(this);
303
+ y(this, P, i), e(this, ne).call(this);
304
304
  }
305
305
  get templateLength() {
306
306
  return e(this, _).length || 1;
307
307
  }
308
308
  };
309
- P = new WeakMap(), _ = new WeakMap(), E = new WeakMap(), V = new WeakMap(), H = new WeakMap(), M = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), J = new WeakMap(), a(Le, "RowManager");
309
+ P = new WeakMap(), _ = new WeakMap(), E = new WeakMap(), V = new WeakMap(), H = new WeakMap(), M = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), a(Le, "RowManager");
310
310
  let ve = Le;
311
311
  var I, U, ae, ce;
312
312
  const j = class j extends HTMLElement {
@@ -550,9 +550,9 @@ const j = class j extends HTMLElement {
550
550
  }
551
551
  };
552
552
  I = new WeakMap(), U = new WeakMap(), ae = new WeakMap(), ce = new WeakMap(), a(j, "NineTableSheet"), x(j, "SCROLLBAR_SIZE", 16);
553
- let ie = j;
554
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ie);
555
- var he, Q;
553
+ let te = j;
554
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", te);
555
+ var he, J;
556
556
  const Ce = class Ce extends HTMLElement {
557
557
  constructor() {
558
558
  super();
@@ -561,10 +561,10 @@ const Ce = class Ce extends HTMLElement {
561
561
  (t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
562
562
  var o;
563
563
  const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
564
- e(this, Q).call(this, r, n);
565
- }), e(this, Q).call(this, 0, !1);
564
+ e(this, J).call(this, r, n);
565
+ }), e(this, J).call(this, 0, !1);
566
566
  }, "#init"));
567
- d(this, Q, /* @__PURE__ */ a((t, s = !1) => {
567
+ d(this, J, /* @__PURE__ */ a((t, s = !1) => {
568
568
  const n = /* @__PURE__ */ a(() => {
569
569
  const h = Array.from(this.querySelectorAll("nine-table-sheet"));
570
570
  Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
@@ -600,24 +600,24 @@ const Ce = class Ce extends HTMLElement {
600
600
  e(this, he).call(this);
601
601
  }
602
602
  };
603
- he = new WeakMap(), Q = new WeakMap(), a(Ce, "NineTableSheets");
603
+ he = new WeakMap(), J = new WeakMap(), a(Ce, "NineTableSheets");
604
604
  let xe = Ce;
605
605
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", xe);
606
- var S, de, ee, fe;
606
+ var S, de, Q, fe;
607
607
  const _e = class _e {
608
608
  constructor(i) {
609
609
  d(this, S);
610
610
  d(this, de, /* @__PURE__ */ a(() => {
611
611
  e(this, fe).call(this), new ResizeObserver((i) => {
612
612
  for (let t of i)
613
- e(this, S).getAttribute("auto-height") === "true" && e(this, ee).call(this);
613
+ e(this, S).getAttribute("auto-height") === "true" && e(this, Q).call(this);
614
614
  }).observe(e(this, S));
615
615
  }, "#init"));
616
- d(this, ee, /* @__PURE__ */ a(() => {
616
+ d(this, Q, /* @__PURE__ */ a(() => {
617
617
  var f, l;
618
618
  const i = Array.from(e(this, S).shadowRoot.querySelectorAll("nine-table-sheet.active"));
619
619
  if (i.length === 0) return;
620
- const t = parseInt(e(this, S).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((h) => h.getRowHeight())), n = (f = e(this, S).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : f.getBoundingClientRect().height, r = (l = e(this, S).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = ie.SCROLLBAR_SIZE, c = t * s + n + r + o;
620
+ const t = parseInt(e(this, S).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((h) => h.getRowHeight())), n = (f = e(this, S).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : f.getBoundingClientRect().height, r = (l = e(this, S).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = te.SCROLLBAR_SIZE, c = t * s + n + r + o;
621
621
  e(this, S).style.height = `${c}px`;
622
622
  }, "#applyAutoHeight"));
623
623
  d(this, fe, /* @__PURE__ */ a(() => {
@@ -727,14 +727,14 @@ const _e = class _e {
727
727
  const c = e(this, S).shadowRoot.querySelectorAll("nine-table-sheet");
728
728
  c == null || c.forEach((f, l) => {
729
729
  t[l] && setTimeout(() => {
730
- f.generate(t[l]), s && e(this, ee).call(this);
730
+ f.generate(t[l]), s && e(this, Q).call(this);
731
731
  });
732
732
  });
733
733
  }, "#render"));
734
734
  y(this, S, i), e(this, de).call(this);
735
735
  }
736
736
  };
737
- S = new WeakMap(), de = new WeakMap(), ee = new WeakMap(), fe = new WeakMap(), a(_e, "LayoutManager");
737
+ S = new WeakMap(), de = new WeakMap(), Q = new WeakMap(), fe = new WeakMap(), a(_e, "LayoutManager");
738
738
  let Se = _e;
739
739
  var $, X;
740
740
  const He = class He {
@@ -759,7 +759,7 @@ const He = class He {
759
759
  };
760
760
  $ = new WeakMap(), X = new WeakMap(), a(He, "ngRow");
761
761
  let Re = He;
762
- var A, v, q, K, ue, W, ge, te, be, ye, Z;
762
+ var A, v, q, K, ue, W, ge, ee, be, ye, Z;
763
763
  const k = class k {
764
764
  constructor(i, t) {
765
765
  d(this, A);
@@ -775,13 +775,13 @@ const k = class k {
775
775
  var s;
776
776
  e(this, W).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
777
777
  }), (e(this, v).rawRecords || []).forEach((t) => {
778
- t.__ng || (t.__ng = e(this, te).call(this)), t.__ng.height = e(this, W).slice();
778
+ t.__ng || (t.__ng = e(this, ee).call(this)), t.__ng.height = e(this, W).slice();
779
779
  });
780
780
  }, "#initialize"));
781
781
  x(this, "set", /* @__PURE__ */ a((i) => {
782
782
  this.clear(), this.add(i, !1);
783
783
  }, "set"));
784
- d(this, te, /* @__PURE__ */ a(() => ({
784
+ d(this, ee, /* @__PURE__ */ a(() => ({
785
785
  rowState: k.ROW_STATE.EMPTY,
786
786
  deleted: !1,
787
787
  filtered: !1,
@@ -809,7 +809,7 @@ const k = class k {
809
809
  }), s;
810
810
  }, "#json2Array"));
811
811
  d(this, ye, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
812
- t.__ng = e(this, te).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
812
+ t.__ng = e(this, ee).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
813
813
  }), i), "#defaultInsert"));
814
814
  x(this, "add", /* @__PURE__ */ a((i, t = !0) => {
815
815
  var r;
@@ -895,7 +895,7 @@ const k = class k {
895
895
  return this.length;
896
896
  }
897
897
  };
898
- A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), K = new WeakMap(), ue = new WeakMap(), W = new WeakMap(), ge = new WeakMap(), te = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), Z = new WeakMap(), a(k, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
898
+ A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), K = new WeakMap(), ue = new WeakMap(), W = new WeakMap(), ge = new WeakMap(), ee = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), Z = new WeakMap(), a(k, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
899
899
  x(k, "ROW_STATE", {
900
900
  EMPTY: "EMPTY",
901
901
  NORMAL: "NORMAL",