@ninebone/table 0.0.181 β†’ 0.0.183

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.
@@ -22,26 +22,26 @@ const Re = class Re extends We.constructor {
22
22
  };
23
23
  l(Re, "Trace");
24
24
  let be = Re;
25
- const F = new be();
26
- var _, O, y, B, D, N, te, P, ie;
25
+ const I = new be();
26
+ var _, B, y, D, N, P, te, V, ie;
27
27
  const Te = class Te extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  u(this, _);
31
- u(this, O, !1);
31
+ u(this, B, !1);
32
32
  u(this, y);
33
- u(this, B);
34
33
  u(this, D);
35
34
  u(this, N);
35
+ u(this, P);
36
36
  u(this, te, /* @__PURE__ */ l(() => {
37
37
  if (!e(this, _)) return;
38
38
  const t = e(this, _).querySelector(".ng-container-body");
39
- t && (p(this, N, new ResizeObserver(() => {
39
+ t && (p(this, P, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), e(this, N).observe(t));
41
+ })), e(this, P).observe(t));
42
42
  }, "#observeResize"));
43
43
  v(this, "refresh", /* @__PURE__ */ l(() => {
44
- if (!e(this, _) || !e(this, y) || e(this, O)) return;
44
+ if (!e(this, _) || !e(this, y) || e(this, B)) return;
45
45
  const t = e(this, y).container, s = t.querySelector("table");
46
46
  if (!s) return;
47
47
  const n = e(this, y).track, r = e(this, y).thumb, o = e(this, _).querySelector(".ng-container-bottom"), h = t.clientWidth, b = s.scrollWidth;
@@ -67,7 +67,7 @@ const Te = class Te extends HTMLElement {
67
67
  const S = a - d;
68
68
  f > S && (f = S), r.style.left = `${f}px`, e(this, y).left.disabled = f === 0, e(this, y).right.disabled = f >= S - 1;
69
69
  }, "refresh"));
70
- u(this, P, /* @__PURE__ */ l((t) => {
70
+ u(this, V, /* @__PURE__ */ l((t) => {
71
71
  if (!e(this, y)) return !1;
72
72
  const s = e(this, y).container, n = s.querySelector("table");
73
73
  if (!n) return !1;
@@ -82,16 +82,16 @@ const Te = class Te extends HTMLElement {
82
82
  }, "#thumbMoveTo"));
83
83
  u(this, ie, /* @__PURE__ */ l(() => {
84
84
  const t = /* @__PURE__ */ l((n) => {
85
- clearInterval(e(this, B)), clearInterval(e(this, D));
85
+ clearInterval(e(this, D)), clearInterval(e(this, N));
86
86
  const r = parseInt(e(this, y).thumb.style.left || 0, 10);
87
- e(this, P).call(this, r + n), p(this, B, setInterval(() => {
88
- clearInterval(e(this, B)), p(this, D, setInterval(() => {
87
+ e(this, V).call(this, r + n), p(this, D, setInterval(() => {
88
+ clearInterval(e(this, D)), p(this, N, setInterval(() => {
89
89
  const o = parseInt(e(this, y).thumb.style.left || 0, 10);
90
- e(this, P).call(this, o + n) || clearInterval(e(this, D));
90
+ e(this, V).call(this, o + n) || clearInterval(e(this, N));
91
91
  }, 50));
92
92
  }, 500));
93
93
  }, "delayScroll"), s = /* @__PURE__ */ l(() => {
94
- clearInterval(e(this, B)), clearInterval(e(this, D));
94
+ clearInterval(e(this, D)), clearInterval(e(this, N));
95
95
  }, "clearTimer");
96
96
  ["mouseup", "mouseleave", "touchend"].forEach((n) => {
97
97
  e(this, y).left.addEventListener(n, s), e(this, y).right.addEventListener(n, s), e(this, y).track.addEventListener(n, s);
@@ -103,16 +103,16 @@ const Te = class Te extends HTMLElement {
103
103
  if (n.button !== 0) return;
104
104
  n.preventDefault();
105
105
  const r = e(this, y).track.getBoundingClientRect(), o = e(this, y).thumb.clientWidth;
106
- e(this, P).call(this, n.clientX - r.left - o / 2);
106
+ e(this, V).call(this, n.clientX - r.left - o / 2);
107
107
  }), e(this, y).thumb.addEventListener("mousedown", (n) => {
108
108
  if (n.button !== 0) return;
109
- n.stopPropagation(), n.preventDefault(), p(this, O, !0), this.shiftX = n.clientX - e(this, y).thumb.getBoundingClientRect().left;
109
+ n.stopPropagation(), n.preventDefault(), p(this, B, !0), this.shiftX = n.clientX - e(this, y).thumb.getBoundingClientRect().left;
110
110
  const r = /* @__PURE__ */ l((h) => {
111
- if (!e(this, O)) return;
111
+ if (!e(this, B)) return;
112
112
  const b = e(this, y).track.getBoundingClientRect();
113
- e(this, P).call(this, h.clientX - b.left - this.shiftX);
113
+ e(this, V).call(this, h.clientX - b.left - this.shiftX);
114
114
  }, "onMouseMove"), o = /* @__PURE__ */ l(() => {
115
- p(this, O, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
115
+ p(this, B, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
116
116
  }, "onMouseUp");
117
117
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
118
118
  });
@@ -200,21 +200,21 @@ const Te = class Te extends HTMLElement {
200
200
  t();
201
201
  }
202
202
  disconnectedCallback() {
203
- e(this, N) && e(this, N).disconnect();
203
+ e(this, P) && e(this, P).disconnect();
204
204
  }
205
205
  };
206
- _ = new WeakMap(), O = new WeakMap(), y = new WeakMap(), B = new WeakMap(), D = new WeakMap(), N = new WeakMap(), te = new WeakMap(), P = new WeakMap(), ie = new WeakMap(), l(Te, "NineTableHScrollBar");
206
+ _ = new WeakMap(), B = new WeakMap(), y = new WeakMap(), D = new WeakMap(), N = new WeakMap(), P = new WeakMap(), te = new WeakMap(), V = new WeakMap(), ie = new WeakMap(), l(Te, "NineTableHScrollBar");
207
207
  let ge = Te;
208
208
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ge);
209
- var V, M, E, $, I, H, se, ne;
209
+ var X, M, E, z, H, $, se, ne;
210
210
  const qe = class qe {
211
211
  constructor(i) {
212
- u(this, V);
212
+ u(this, X);
213
213
  u(this, M, []);
214
214
  u(this, E, null);
215
- u(this, $, null);
216
- u(this, I, 0);
215
+ u(this, z, null);
217
216
  u(this, H, 0);
217
+ u(this, $, 0);
218
218
  u(this, se, /* @__PURE__ */ l(() => {
219
219
  e(this, ne).call(this);
220
220
  }, "#init"));
@@ -222,7 +222,7 @@ const qe = class qe {
222
222
  * 🎯 뷰포트 크기 λ³€ν™” μ‹œμ μ— 높이 계산 및 ν•„μš”ν•œ ν–‰ 개수 산정·캐싱을 μ™„κ²°
223
223
  */
224
224
  u(this, ne, /* @__PURE__ */ l(() => {
225
- !e(this, V) || !(e(this, V) instanceof HTMLElement) || (p(this, $, new ResizeObserver((i) => {
225
+ !e(this, X) || !(e(this, X) instanceof HTMLElement) || (p(this, z, new ResizeObserver((i) => {
226
226
  for (const t of i) {
227
227
  const s = t.target;
228
228
  if (!s.classList.contains("active"))
@@ -234,16 +234,16 @@ const qe = class qe {
234
234
  const h = s.querySelector(".ng-container-body") || s, b = h.querySelector("thead"), a = h.querySelector("tfoot");
235
235
  b && (o += b.offsetHeight || b.getBoundingClientRect().height), a && (o += a.offsetHeight || a.getBoundingClientRect().height);
236
236
  const d = Math.max(r - o, 100);
237
- if (e(this, I) !== d && (p(this, I, d), e(this, E) !== null)) {
238
- const c = Math.ceil(e(this, I) / e(this, E));
239
- p(this, H, c + 20), F.log(`[RowManager] Resized. Height: ${e(this, I)}px | Target Rows: ${e(this, H)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
237
+ if (e(this, H) !== d && (p(this, H, d), e(this, E) !== null)) {
238
+ const c = Math.ceil(e(this, H) / e(this, E));
239
+ p(this, $, c + 20), I.log(`[RowManager] Resized. Height: ${e(this, H)}px | Target Rows: ${e(this, $)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
240
240
  const f = s.querySelector(g);
241
241
  f && f.querySelector("tbody") && this.renderRows(f);
242
242
  });
243
243
  }
244
244
  }
245
245
  }
246
- })), e(this, $).observe(e(this, V)));
246
+ })), e(this, z).observe(e(this, X)));
247
247
  }, "#initResizeObserver"));
248
248
  v(this, "initTemplate", /* @__PURE__ */ l((i) => {
249
249
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
@@ -269,12 +269,12 @@ const qe = class qe {
269
269
  if (t.querySelectorAll("tr:not(.nodata)").forEach((c, g) => {
270
270
  const f = c.offsetHeight || c.getBoundingClientRect().height;
271
271
  f === 0 ? a += 40 : a += f;
272
- }), r && (r.style.display = o, r.style.visibility = h, r.style.position = b), p(this, E, a), e(this, I) > 0) {
273
- const c = Math.ceil(e(this, I) / e(this, E));
274
- p(this, H, c + 20);
272
+ }), r && (r.style.display = o, r.style.visibility = h, r.style.position = b), p(this, E, a), e(this, H) > 0) {
273
+ const c = Math.ceil(e(this, H) / e(this, E));
274
+ p(this, $, c + 20);
275
275
  } else
276
- p(this, H, 40);
277
- return console.log(`[RowManager] Template Height Cached: ${e(this, E)}px | RowCount: ${e(this, H)}`), e(this, E);
276
+ p(this, $, 40);
277
+ return console.log(`[RowManager] Template Height Cached: ${e(this, E)}px | RowCount: ${e(this, $)}`), e(this, E);
278
278
  }, "measureAndCacheHeight"));
279
279
  /**
280
280
  * 🎯 μΊμ‹œλœ ν–‰ 개수 λ°˜ν™˜ (없을 λ•Œλ§Œ μ΅œμ†Œν•œμ˜ λ°©μ–΄ μ—°μ‚°)
@@ -297,7 +297,7 @@ const qe = class qe {
297
297
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
298
298
  if (!t) return;
299
299
  t.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
300
- const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), r = e(this, H);
300
+ const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), r = e(this, $);
301
301
  for (let o = 0; o < r; o++)
302
302
  e(this, M).forEach((h) => {
303
303
  n.appendChild(h.cloneNode(!0));
@@ -305,15 +305,15 @@ const qe = class qe {
305
305
  s ? s.before(n) : t.appendChild(n), console.log(`[RowManager] Rendered ${r} sets into DOM.`);
306
306
  }, "renderRows"));
307
307
  v(this, "destroy", /* @__PURE__ */ l(() => {
308
- e(this, $) && (e(this, $).disconnect(), p(this, $, null));
308
+ e(this, z) && (e(this, z).disconnect(), p(this, z, null));
309
309
  }, "destroy"));
310
- p(this, V, i), e(this, se).call(this);
310
+ p(this, X, i), e(this, se).call(this);
311
311
  }
312
312
  get templateLength() {
313
313
  return e(this, M).length || 1;
314
314
  }
315
315
  };
316
- V = new WeakMap(), M = new WeakMap(), E = new WeakMap(), $ = new WeakMap(), I = new WeakMap(), H = new WeakMap(), se = new WeakMap(), ne = new WeakMap(), l(qe, "RowManager");
316
+ X = new WeakMap(), M = new WeakMap(), E = new WeakMap(), z = new WeakMap(), H = new WeakMap(), $ = new WeakMap(), se = new WeakMap(), ne = new WeakMap(), l(qe, "RowManager");
317
317
  let pe = qe;
318
318
  var L, K, re;
319
319
  const G = class G extends HTMLElement {
@@ -327,7 +327,7 @@ const G = class G extends HTMLElement {
327
327
  const d = /* @__PURE__ */ l((g) => {
328
328
  if (g.querySelector("colgroup")) return;
329
329
  const f = g.querySelector("tbody tr") || g.querySelector("tr"), S = f ? f.querySelectorAll("th, td").length : 1, x = document.createElement("colgroup"), A = Math.max(Math.floor((g.clientWidth || 600) / S), 100);
330
- for (let T = 0; T < S; T++) {
330
+ for (let q = 0; q < S; q++) {
331
331
  const U = document.createElement("col");
332
332
  U.setAttribute("width", A), x.appendChild(U);
333
333
  }
@@ -343,12 +343,12 @@ const G = class G extends HTMLElement {
343
343
  const r = this.querySelector(".ng-container-left"), o = this.querySelector(".ng-container-body"), h = this.querySelector(".ng-container-right"), b = /* @__PURE__ */ l((a, d, c = !1) => {
344
344
  const g = a.cloneNode(!0), f = Array.from(g.querySelectorAll("colgroup col")), S = [];
345
345
  return f.forEach((x, A) => {
346
- const T = x.getAttribute("fixed");
347
- (c ? T !== "left" && T !== "right" : T === d) || S.push(A);
346
+ const q = x.getAttribute("fixed");
347
+ (c ? q !== "left" && q !== "right" : q === d) || S.push(A);
348
348
  }), S.reverse().forEach((x) => {
349
349
  f[x] && f[x].remove(), g.querySelectorAll("tr").forEach((A) => {
350
- const T = A.querySelectorAll("th, td");
351
- T[x] && T[x].remove();
350
+ const q = A.querySelectorAll("th, td");
351
+ q[x] && q[x].remove();
352
352
  });
353
353
  }), g;
354
354
  }, "filterTableByFixed");
@@ -386,7 +386,7 @@ const G = class G extends HTMLElement {
386
386
  setTimeout(() => {
387
387
  const a = this.querySelector("nine-table-hscrollbar");
388
388
  a && typeof a.refresh == "function" && a.refresh();
389
- }, 0), F.log(`NineTableSheet 3-split initialized with rows: ${this.getRowCount()}`);
389
+ }, 0), I.log(`NineTableSheet 3-split initialized with rows: ${this.getRowCount()}`);
390
390
  }, "init"));
391
391
  v(this, "getRowCount", /* @__PURE__ */ l(() => e(this, L) ? e(this, L).querySelectorAll("tbody tr").length : 0, "getRowCount"));
392
392
  v(this, "scrollToX", /* @__PURE__ */ l((t) => {
@@ -520,7 +520,7 @@ const G = class G extends HTMLElement {
520
520
  e(this, re).call(this);
521
521
  }
522
522
  disconnectedCallback() {
523
- this.innerHTML = "", F.log("NineTableSheet destroyed.");
523
+ this.innerHTML = "", I.log("NineTableSheet destroyed.");
524
524
  }
525
525
  };
526
526
  L = new WeakMap(), K = new WeakMap(), re = new WeakMap(), l(G, "NineTableSheet"), v(G, "SCROLLBAR_SIZE", 16);
@@ -545,8 +545,8 @@ const Ce = class Ce extends HTMLElement {
545
545
  Array.from(c.querySelectorAll("nine-splitter")).forEach((x) => x.style.setProperty("display", "none"));
546
546
  const S = g.filter((x) => x.classList.contains("active"));
547
547
  S.length < 2 || S.forEach((x) => {
548
- const A = parseInt(x.getAttribute("data-index"), 10), T = c.querySelector(`nine-splitter[data-split-index="${A}"]`), U = g[A + 1];
549
- T && U && U.classList.contains("active") && T.style.setProperty("display", "block");
548
+ const A = parseInt(x.getAttribute("data-index"), 10), q = c.querySelector(`nine-splitter[data-split-index="${A}"]`), U = g[A + 1];
549
+ q && U && U.classList.contains("active") && q.style.setProperty("display", "block");
550
550
  });
551
551
  }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), h = r.querySelectorAll(".nine-tab-item"), b = o.querySelectorAll("nine-table-sheet");
552
552
  if (!h[t]) return;
@@ -586,13 +586,13 @@ const Ce = class Ce extends HTMLElement {
586
586
  oe = new WeakMap(), l(Ce, "NineTableSheets");
587
587
  let we = Ce;
588
588
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", we);
589
- var C, J, le, Q, ae;
589
+ var R, J, le, Q, ae;
590
590
  const ke = class ke {
591
591
  constructor(i) {
592
- u(this, C);
592
+ u(this, R);
593
593
  u(this, J, null);
594
594
  u(this, le, /* @__PURE__ */ l(() => {
595
- const i = e(this, C).host;
595
+ const i = e(this, R).host;
596
596
  i && (p(this, J, new ResizeObserver((t) => {
597
597
  for (let s of t)
598
598
  i.getAttribute("auto-height") === "true" && e(this, Q).call(this, i);
@@ -600,21 +600,21 @@ const ke = class ke {
600
600
  }, "#observeResize"));
601
601
  u(this, Q, /* @__PURE__ */ l((i) => {
602
602
  var A;
603
- const t = e(this, C).querySelector("nine-table-sheet.active");
604
- if (!t) return;
605
- const s = ((A = t.getRowCount) == null ? void 0 : A.call(t)) || 0, n = parseInt(i.getAttribute("max-display-row"), 10) || 10, r = Math.min(s, n), o = t.querySelector("tbody tr") || t.querySelector("tr"), h = o ? o.getBoundingClientRect().height : 32, b = e(this, C).querySelector("nine-table-header"), a = e(this, C).querySelector("nine-table-sheets-footer"), d = b ? b.getBoundingClientRect().height : 40, c = a ? a.getBoundingClientRect().height : 32, g = 16;
606
- F.log(b, a), F.log(b.getBoundingClientRect().height, a.getBoundingClientRect().height);
603
+ const t = e(this, R).querySelector("nine-table-sheet.active");
604
+ if (I.log(i), I.log(e(this, R)), I.log(t), !t) return;
605
+ const s = ((A = t.getRowCount) == null ? void 0 : A.call(t)) || 0, n = parseInt(i.getAttribute("max-display-row"), 10) || 10, r = Math.min(s, n), o = t.querySelector("tbody tr") || t.querySelector("tr"), h = o ? o.getBoundingClientRect().height : 32, b = e(this, R).querySelector("nine-table-header"), a = e(this, R).querySelector("nine-table-sheets-footer"), d = b ? b.getBoundingClientRect().height : 40, c = a ? a.getBoundingClientRect().height : 32, g = 16;
606
+ I.log(b, a), I.log(b.getBoundingClientRect().height, a.getBoundingClientRect().height);
607
607
  const f = d + c + g, S = r * h + f;
608
608
  i.style.height = `${S}px`, i.style.maxHeight = `${n * h + f}px`;
609
- const x = e(this, C).querySelector("nine-table-sheets-body");
609
+ const x = e(this, R).querySelector("nine-table-sheets-body");
610
610
  x && (x.style.overflowY = s > n ? "auto" : "hidden");
611
611
  }, "#applyAutoHeight"));
612
612
  u(this, ae, /* @__PURE__ */ l(() => {
613
- const i = e(this, C).host, s = Array.from(i.children).filter((a) => a.tagName === "TABLE"), n = i.getAttribute("auto-height") === "true", r = s.length, o = s.map((a, d) => {
613
+ const i = e(this, R).host, s = Array.from(i.children).filter((a) => a.tagName === "TABLE"), n = i.getAttribute("auto-height") === "true", r = s.length, o = s.map((a, d) => {
614
614
  const g = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, f = d < r - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
615
615
  return g + f;
616
616
  }).join(""), h = s.map((a, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
617
- e(this, C).innerHTML = `
617
+ e(this, R).innerHTML = `
618
618
  <style>
619
619
  :host {
620
620
  display: flex;
@@ -721,71 +721,71 @@ const ke = class ke {
721
721
  </nine-table-body>
722
722
  <nine-table-footer></nine-table-footer>
723
723
  `;
724
- const b = e(this, C).querySelectorAll("nine-table-sheet");
724
+ const b = e(this, R).querySelectorAll("nine-table-sheet");
725
725
  b == null || b.forEach((a, d) => {
726
726
  s[d] && setTimeout(() => {
727
727
  a.init(s[d]), n && e(this, Q).call(this, i);
728
728
  });
729
729
  });
730
730
  }, "#render"));
731
- p(this, C, i), e(this, ae).call(this), e(this, le).call(this);
731
+ p(this, R, i), e(this, ae).call(this), e(this, le).call(this);
732
732
  }
733
733
  };
734
- C = new WeakMap(), J = new WeakMap(), le = new WeakMap(), Q = new WeakMap(), ae = new WeakMap(), l(ke, "LayoutManager");
734
+ R = new WeakMap(), J = new WeakMap(), le = new WeakMap(), Q = new WeakMap(), ae = new WeakMap(), l(ke, "LayoutManager");
735
735
  let me = ke;
736
- var z, X;
736
+ var W, Y;
737
737
  const Ae = class Ae {
738
738
  constructor(i) {
739
- u(this, z);
740
- u(this, X, -1);
741
- v(this, "count", /* @__PURE__ */ l(() => e(this, z).rawRecords.length, "count"));
742
- p(this, z, i);
739
+ u(this, W);
740
+ u(this, Y, -1);
741
+ v(this, "count", /* @__PURE__ */ l(() => e(this, W).rawRecords.length, "count"));
742
+ p(this, W, i);
743
743
  }
744
744
  get at() {
745
- return e(this, X);
745
+ return e(this, Y);
746
746
  }
747
747
  set at(i) {
748
748
  var s, n;
749
- p(this, X, parseInt(i, 10));
750
- const t = ((n = (s = e(this, z).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, z).owner.body;
751
- t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, X)}"]`) && setTimeout(() => {
749
+ p(this, Y, parseInt(i, 10));
750
+ const t = ((n = (s = e(this, W).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, W).owner.body;
751
+ t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, Y)}"]`) && setTimeout(() => {
752
752
  var r, o;
753
- (o = (r = e(this, z).owner).scrollTo_V1) == null || o.call(r, e(this, X));
753
+ (o = (r = e(this, W).owner).scrollTo_V1) == null || o.call(r, e(this, Y));
754
754
  });
755
755
  }
756
756
  };
757
- z = new WeakMap(), X = new WeakMap(), l(Ae, "ngRow");
757
+ W = new WeakMap(), Y = new WeakMap(), l(Ae, "ngRow");
758
758
  let ve = Ae;
759
- var R, m, k, Z, ce, W, he, ee, de, fe, j;
760
- const q = class q {
759
+ var T, m, k, Z, ce, O, he, ee, de, fe, j;
760
+ const C = class C {
761
761
  constructor(i, t) {
762
- u(this, R);
762
+ u(this, T);
763
763
  u(this, m);
764
764
  u(this, k, []);
765
765
  u(this, Z, []);
766
766
  u(this, ce, 0);
767
- u(this, W, []);
767
+ u(this, O, []);
768
768
  u(this, he, /* @__PURE__ */ l(() => {
769
- p(this, W, []);
770
- const i = e(this, R).template || [];
769
+ p(this, O, []);
770
+ const i = e(this, T).template || [];
771
771
  Array.from(i).forEach((t) => {
772
772
  var s;
773
- e(this, W).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
773
+ e(this, O).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
774
774
  }), (e(this, m).rawRecords || []).forEach((t) => {
775
- t.__ng || (t.__ng = e(this, ee).call(this)), t.__ng.height = e(this, W).slice();
775
+ t.__ng || (t.__ng = e(this, ee).call(this)), t.__ng.height = e(this, O).slice();
776
776
  });
777
777
  }, "#initialize"));
778
778
  v(this, "set", /* @__PURE__ */ l((i) => {
779
779
  this.clear(), this.add(i, !1);
780
780
  }, "set"));
781
781
  u(this, ee, /* @__PURE__ */ l(() => ({
782
- rowState: q.ROW_STATE.EMPTY,
782
+ rowState: C.ROW_STATE.EMPTY,
783
783
  deleted: !1,
784
784
  filtered: !1,
785
- height: e(this, W).slice(),
785
+ height: e(this, O).slice(),
786
786
  o: {},
787
787
  c: {},
788
- _: [0, 0, 0, 0, q.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, W).slice(), -1, {}, {}]
788
+ _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, O).slice(), -1, {}, {}]
789
789
  }), "#getDefaultMeta"));
790
790
  v(this, "reset", /* @__PURE__ */ l(() => {
791
791
  p(this, k, []), p(this, Z, []);
@@ -797,7 +797,7 @@ const q = class q {
797
797
  u(this, de, /* @__PURE__ */ l((i) => {
798
798
  var n;
799
799
  Array.isArray(i) || (i = [i]);
800
- const t = typeof ((n = e(this, R).fields) == null ? void 0 : n.get) == "function" ? e(this, R).fields.get() : Object.keys(i[0] || {}), s = [];
800
+ const t = typeof ((n = e(this, T).fields) == null ? void 0 : n.get) == "function" ? e(this, T).fields.get() : Object.keys(i[0] || {}), s = [];
801
801
  return i.forEach((r) => {
802
802
  const o = { v: [] };
803
803
  t.forEach((h) => {
@@ -806,7 +806,7 @@ const q = class q {
806
806
  }), s;
807
807
  }, "#json2Array"));
808
808
  u(this, fe, /* @__PURE__ */ l((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
809
- t.__ng = e(this, ee).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = q.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
809
+ t.__ng = e(this, ee).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = C.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
810
810
  }), i), "#defaultInsert"));
811
811
  v(this, "add", /* @__PURE__ */ l((i, t = !0) => {
812
812
  var r;
@@ -816,7 +816,7 @@ const q = class q {
816
816
  const n = this.count() - 1;
817
817
  return t || s.forEach((o, h) => {
818
818
  const b = e(this, m).rawRecords[n - h];
819
- b && (b.__ng.rowState = q.ROW_STATE.EMPTY);
819
+ b && (b.__ng.rowState = C.ROW_STATE.EMPTY);
820
820
  }), (r = e(this, m).viewRecords) != null && r.reset && e(this, m).viewRecords.reset(), n;
821
821
  }, "add"));
822
822
  v(this, "delete", /* @__PURE__ */ l((i) => {
@@ -825,8 +825,8 @@ const q = class q {
825
825
  Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this, m).owner.row.at] : t = [parseInt(i, 10)], t.sort((n, r) => r - n).forEach((n) => {
826
826
  if (e(this, k)[n]) {
827
827
  const r = e(this, k)[n].__ng.rowid;
828
- e(this, k)[n].__ng.rowState === q.ROW_STATE.INSERT ? e(this, m).rawRecords = e(this, m).rawRecords.filter((o) => o.__ng.rowid !== r) : e(this, m).rawRecords.forEach((o) => {
829
- o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = q.ROW_STATE.DELETE);
828
+ e(this, k)[n].__ng.rowState === C.ROW_STATE.INSERT ? e(this, m).rawRecords = e(this, m).rawRecords.filter((o) => o.__ng.rowid !== r) : e(this, m).rawRecords.forEach((o) => {
829
+ o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = C.ROW_STATE.DELETE);
830
830
  });
831
831
  }
832
832
  }), this.resetRecords(), (s = e(this, m).viewRecords) != null && s.reset && e(this, m).viewRecords.reset();
@@ -834,12 +834,12 @@ const q = class q {
834
834
  v(this, "setValue", /* @__PURE__ */ l((i, t, s) => {
835
835
  var b;
836
836
  i = parseInt(i, 10);
837
- const r = (typeof ((b = e(this, R).fields) == null ? void 0 : b.get) == "function" ? e(this, R).fields.get() : []).indexOf(t);
837
+ const r = (typeof ((b = e(this, T).fields) == null ? void 0 : b.get) == "function" ? e(this, T).fields.get() : []).indexOf(t);
838
838
  if (r < 0) return;
839
839
  const o = this.getValidData()[i];
840
840
  if (!o) return;
841
841
  const h = o.v[r];
842
- h !== s && o.__ng.rowState !== q.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = h), o.__ng.rowState = q.ROW_STATE.UPDATE), o.v[r] = s, e(this, m).owner.refreshData && e(this, m).owner.refreshData(i);
842
+ h !== s && o.__ng.rowState !== C.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = h), o.__ng.rowState = C.ROW_STATE.UPDATE), o.v[r] = s, e(this, m).owner.refreshData && e(this, m).owner.refreshData(i);
843
843
  }, "setValue"));
844
844
  v(this, "resetRecords", /* @__PURE__ */ l(() => {
845
845
  p(this, Z, e(this, m).rawRecords.filter((i) => !i.__ng.deleted)), p(this, k, e(this, m).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, m).rawRecords.forEach((i, t) => {
@@ -852,7 +852,7 @@ const q = class q {
852
852
  u(this, j, /* @__PURE__ */ l((i) => {
853
853
  var s;
854
854
  if (!i) return i;
855
- const t = typeof ((s = e(this, R).fields) == null ? void 0 : s.get) == "function" ? e(this, R).fields.get() : [];
855
+ const t = typeof ((s = e(this, T).fields) == null ? void 0 : s.get) == "function" ? e(this, T).fields.get() : [];
856
856
  return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
857
857
  const r = {};
858
858
  return t.forEach((o, h) => {
@@ -867,14 +867,14 @@ const q = class q {
867
867
  if (!s || s.length <= 0) return;
868
868
  if (i == null) return e(this, j).call(this, s);
869
869
  if (i < 0 || i >= s.length) return null;
870
- const n = typeof ((r = e(this, R).fields) == null ? void 0 : r.get) == "function" ? e(this, R).fields.get() : [];
870
+ const n = typeof ((r = e(this, T).fields) == null ? void 0 : r.get) == "function" ? e(this, T).fields.get() : [];
871
871
  if (t != null) {
872
872
  const o = n.indexOf(t);
873
873
  return o >= 0 ? s[i].v[o] : null;
874
874
  }
875
875
  return e(this, j).call(this, s[i]);
876
876
  }, "get"));
877
- p(this, R, i), p(this, m, t), e(this, he).call(this);
877
+ p(this, T, i), p(this, m, t), e(this, he).call(this);
878
878
  }
879
879
  get source() {
880
880
  return e(this, j).call(this, e(this, m).rawRecords);
@@ -886,15 +886,15 @@ const q = class q {
886
886
  return ++$e(this, ce)._;
887
887
  }
888
888
  };
889
- R = new WeakMap(), m = new WeakMap(), k = new WeakMap(), Z = new WeakMap(), ce = new WeakMap(), W = new WeakMap(), he = new WeakMap(), ee = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), j = new WeakMap(), l(q, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
890
- v(q, "ROW_STATE", {
889
+ T = new WeakMap(), m = new WeakMap(), k = new WeakMap(), Z = new WeakMap(), ce = new WeakMap(), O = new WeakMap(), he = new WeakMap(), ee = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), j = new WeakMap(), l(C, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
890
+ v(C, "ROW_STATE", {
891
891
  EMPTY: "EMPTY",
892
892
  NORMAL: "NORMAL",
893
893
  INSERT: "INSERT",
894
894
  UPDATE: "UPDATE",
895
895
  DELETE: "DELETE"
896
896
  });
897
- let xe = q;
897
+ let xe = C;
898
898
  const Le = class Le {
899
899
  constructor(i) {
900
900
  this.owner = i, this.row = new ve(this), this.data = new xe(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
@@ -916,35 +916,35 @@ const Le = class Le {
916
916
  };
917
917
  l(Le, "ngDataManager");
918
918
  let Se = Le;
919
- var Y, ue;
919
+ var F, ue;
920
920
  const _e = class _e extends HTMLElement {
921
921
  constructor() {
922
922
  super();
923
923
  //#created = false;
924
- u(this, Y);
924
+ u(this, F);
925
925
  u(this, ue);
926
- this.attachShadow({ mode: "open" }), p(this, Y, new Se(this));
926
+ this.attachShadow({ mode: "open" }), p(this, F, new Se(this));
927
927
  }
928
928
  connectedCallback() {
929
- p(this, ue, new me(this.shadowRoot)), F.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
929
+ p(this, ue, new me(this.shadowRoot)), I.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
930
930
  }
931
931
  disconnectedCallback() {
932
- F.log("NineTable disconnected.");
932
+ I.log("NineTable disconnected.");
933
933
  }
934
934
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
935
935
  get data() {
936
- return e(this, Y).data;
936
+ return e(this, F).data;
937
937
  }
938
938
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
939
939
  get row() {
940
- return e(this, Y).row;
940
+ return e(this, F).row;
941
941
  }
942
942
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
943
943
  get dataManager() {
944
- return e(this, Y);
944
+ return e(this, F);
945
945
  }
946
946
  };
947
- Y = new WeakMap(), ue = new WeakMap(), l(_e, "NineTable");
947
+ F = new WeakMap(), ue = new WeakMap(), l(_e, "NineTable");
948
948
  let Ee = _e;
949
949
  customElements.get("nine-table") || customElements.define("nine-table", Ee);
950
950
  //# sourceMappingURL=nine-table.js.map