@ninebone/table 0.0.293 β†’ 0.0.294

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,30 +1,30 @@
1
- var Jt = Object.defineProperty;
2
- var Qt = (m) => {
1
+ var Qt = Object.defineProperty;
2
+ var te = (m) => {
3
3
  throw TypeError(m);
4
4
  };
5
- var ie = (m, i, e) => i in m ? Jt(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e;
6
- var c = (m, i) => Jt(m, "name", { value: i, configurable: !0 });
7
- var w = (m, i, e) => ie(m, typeof i != "symbol" ? i + "" : i, e), te = (m, i, e) => i.has(m) || Qt("Cannot " + e);
8
- var t = (m, i, e) => (te(m, i, "read from private field"), e ? e.call(m) : i.get(m)), h = (m, i, e) => i.has(m) ? Qt("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, e), g = (m, i, e, s) => (te(m, i, "write to private field"), s ? s.call(m, e) : i.set(m, e), e);
9
- var ee = (m, i, e, s) => ({
5
+ var se = (m, i, e) => i in m ? Qt(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e;
6
+ var c = (m, i) => Qt(m, "name", { value: i, configurable: !0 });
7
+ var S = (m, i, e) => se(m, typeof i != "symbol" ? i + "" : i, e), ee = (m, i, e) => i.has(m) || te("Cannot " + e);
8
+ var t = (m, i, e) => (ee(m, i, "read from private field"), e ? e.call(m) : i.get(m)), h = (m, i, e) => i.has(m) ? te("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, e), b = (m, i, e, s) => (ee(m, i, "write to private field"), s ? s.call(m, e) : i.set(m, e), e);
9
+ var ie = (m, i, e, s) => ({
10
10
  set _(n) {
11
- g(m, i, n, e);
11
+ b(m, i, n, e);
12
12
  },
13
13
  get _() {
14
14
  return t(m, i, s);
15
15
  }
16
16
  });
17
- import { trace as se } from "@ninebone/util";
18
- const Nt = class Nt extends se.constructor {
17
+ import { trace as ne } from "@ninebone/util";
18
+ const Yt = class Yt extends ne.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- c(Nt, "Trace");
24
- let Ct = Nt;
25
- const G = new Ct();
23
+ c(Yt, "Trace");
24
+ let _t = Yt;
25
+ const G = new _t();
26
26
  var H, M, p, z, D, P, ct, B, at;
27
- const Yt = class Yt extends HTMLElement {
27
+ const Vt = class Vt extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  h(this, H);
@@ -36,11 +36,11 @@ const Yt = class Yt extends HTMLElement {
36
36
  h(this, ct, /* @__PURE__ */ c(() => {
37
37
  if (!t(this, H)) return;
38
38
  const e = t(this, H).querySelector(".ng-container-body");
39
- e && (g(this, P, new ResizeObserver(() => {
39
+ e && (b(this, P, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, P).observe(e));
42
42
  }, "#observeResize"));
43
- w(this, "refresh", /* @__PURE__ */ c(() => {
43
+ S(this, "refresh", /* @__PURE__ */ c(() => {
44
44
  if (!t(this, H) || !t(this, p) || t(this, M)) return;
45
45
  const e = t(this, p).container, s = e.querySelector("table");
46
46
  if (!s) return;
@@ -55,11 +55,11 @@ const Yt = class Yt extends HTMLElement {
55
55
  if (d <= 0) return;
56
56
  const u = Math.max(Math.min(d * (l / a), d), 20);
57
57
  r.style.width = `${u}px`;
58
- const f = e.scrollLeft, b = a - l;
58
+ const f = e.scrollLeft, g = a - l;
59
59
  let y = 0;
60
- b > 0 && (y = parseInt(f / b * (d - u), 10)), y < 0 && (y = 0);
61
- const x = d - u;
62
- y > x && (y = x), r.style.left = `${y}px`, G.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= x - 1;
60
+ g > 0 && (y = parseInt(f / g * (d - u), 10)), y < 0 && (y = 0);
61
+ const w = d - u;
62
+ y > w && (y = w), r.style.left = `${y}px`, G.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= w - 1;
63
63
  }, "refresh"));
64
64
  h(this, B, /* @__PURE__ */ c((e) => {
65
65
  if (!t(this, p)) return !1;
@@ -77,8 +77,8 @@ const Yt = class Yt extends HTMLElement {
77
77
  const e = /* @__PURE__ */ c((n) => {
78
78
  clearInterval(t(this, z)), clearInterval(t(this, D));
79
79
  const r = parseInt(t(this, p).thumb.style.left || 0, 10);
80
- t(this, B).call(this, r + n), g(this, z, setInterval(() => {
81
- clearInterval(t(this, z)), g(this, D, setInterval(() => {
80
+ t(this, B).call(this, r + n), b(this, z, setInterval(() => {
81
+ clearInterval(t(this, z)), b(this, D, setInterval(() => {
82
82
  const o = parseInt(t(this, p).thumb.style.left || 0, 10);
83
83
  t(this, B).call(this, o + n) || clearInterval(t(this, D));
84
84
  }, 50));
@@ -99,20 +99,20 @@ const Yt = class Yt extends HTMLElement {
99
99
  t(this, B).call(this, n.clientX - r.left - o / 2);
100
100
  }), t(this, p).thumb.addEventListener("mousedown", (n) => {
101
101
  if (n.button !== 0) return;
102
- n.stopPropagation(), n.preventDefault(), g(this, M, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
102
+ n.stopPropagation(), n.preventDefault(), b(this, M, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ c((l) => {
104
104
  if (!t(this, M)) return;
105
105
  const a = t(this, p).track.getBoundingClientRect();
106
106
  t(this, B).call(this, l.clientX - a.left - this.shiftX);
107
107
  }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
108
- g(this, M, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
108
+ b(this, M, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (g(this, H, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, H)) return;
115
+ if (b(this, H, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, H)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -182,7 +182,7 @@ const Yt = class Yt extends HTMLElement {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- g(this, p, {
185
+ b(this, p, {
186
186
  container: s,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -198,28 +198,28 @@ const Yt = class Yt extends HTMLElement {
198
198
  t(this, P) && t(this, P).disconnect();
199
199
  }
200
200
  };
201
- H = new WeakMap(), M = new WeakMap(), p = new WeakMap(), z = new WeakMap(), D = new WeakMap(), P = new WeakMap(), ct = new WeakMap(), B = new WeakMap(), at = new WeakMap(), c(Yt, "NineTableHScrollBar");
202
- let _t = Yt;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", _t);
204
- var N, I, S, Q, tt, ht;
205
- const Vt = class Vt extends HTMLElement {
201
+ H = new WeakMap(), M = new WeakMap(), p = new WeakMap(), z = new WeakMap(), D = new WeakMap(), P = new WeakMap(), ct = new WeakMap(), B = new WeakMap(), at = new WeakMap(), c(Vt, "NineTableHScrollBar");
202
+ let Mt = Vt;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Mt);
204
+ var N, I, E, Q, tt, ht;
205
+ const Xt = class Xt extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
208
  h(this, N);
209
209
  h(this, I, !1);
210
- h(this, S);
210
+ h(this, E);
211
211
  h(this, Q, 0);
212
212
  h(this, tt, 0);
213
213
  /**
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
- w(this, "refresh", /* @__PURE__ */ c(() => {
217
- if (!t(this, N) || !t(this, S) || t(this, I)) return;
218
- const e = t(this, S).container, s = e.querySelector("table");
216
+ S(this, "refresh", /* @__PURE__ */ c(() => {
217
+ if (!t(this, N) || !t(this, E) || t(this, I)) return;
218
+ const e = t(this, E).container, s = e.querySelector("table");
219
219
  if (!s) return;
220
- const n = t(this, S).track, r = t(this, S).thumb, o = e.clientHeight, l = s.scrollHeight;
220
+ const n = t(this, E).track, r = t(this, E).thumb, o = e.clientHeight, l = s.scrollHeight;
221
221
  if (l <= o) {
222
- r.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
222
+ r.style.display = "none", t(this, E).top.disabled = !0, t(this, E).bottom.disabled = !0;
223
223
  return;
224
224
  } else
225
225
  r.style.display = "block";
@@ -228,47 +228,47 @@ const Vt = class Vt extends HTMLElement {
228
228
  const d = Math.max(Math.min(a * (o / l), a), 20);
229
229
  r.style.height = `${d}px`;
230
230
  const u = e.scrollTop, f = l - o;
231
- let b = 0;
232
- f > 0 && (b = u / f * (a - d));
231
+ let g = 0;
232
+ f > 0 && (g = u / f * (a - d));
233
233
  const y = a - d;
234
- b < 0 && (b = 0), b > y && (b = y), r.style.top = `${b}px`, t(this, S).top.disabled = u <= 0, t(this, S).bottom.disabled = u >= f - 1;
234
+ g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, E).top.disabled = u <= 0, t(this, E).bottom.disabled = u >= f - 1;
235
235
  }, "refresh"));
236
236
  h(this, ht, /* @__PURE__ */ c(() => {
237
- const e = t(this, S).container;
237
+ const e = t(this, E).container;
238
238
  e.addEventListener("scroll", () => {
239
239
  t(this, I) || this.refresh();
240
- }), t(this, S).thumb.addEventListener("mousedown", (s) => {
240
+ }), t(this, E).thumb.addEventListener("mousedown", (s) => {
241
241
  if (s.button !== 0) return;
242
- s.stopPropagation(), s.preventDefault(), g(this, I, !0), g(this, Q, s.clientY), g(this, tt, e.scrollTop);
242
+ s.stopPropagation(), s.preventDefault(), b(this, I, !0), b(this, Q, s.clientY), b(this, tt, e.scrollTop);
243
243
  const n = /* @__PURE__ */ c((o) => {
244
244
  if (!t(this, I)) return;
245
- const l = t(this, S).track.getBoundingClientRect(), a = t(this, S).thumb.clientHeight, u = l.height - a, f = o.clientY - t(this, Q), b = e.clientHeight, x = table.scrollHeight - b;
246
- if (u > 0 && x > 0) {
247
- const L = f / u * x;
245
+ const l = t(this, E).track.getBoundingClientRect(), a = t(this, E).thumb.clientHeight, u = l.height - a, f = o.clientY - t(this, Q), g = e.clientHeight, w = table.scrollHeight - g;
246
+ if (u > 0 && w > 0) {
247
+ const L = f / u * w;
248
248
  e.scrollTop = t(this, tt) + L;
249
249
  }
250
250
  this.refresh();
251
251
  }, "onMouseMove"), r = /* @__PURE__ */ c(() => {
252
- g(this, I, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), this.refresh();
252
+ b(this, I, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), this.refresh();
253
253
  }, "onMouseUp");
254
254
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", r);
255
- }), t(this, S).track.addEventListener("mousedown", (s) => {
256
- if (s.button !== 0 || s.target === t(this, S).thumb) return;
257
- const n = t(this, S).track.getBoundingClientRect(), r = t(this, S).thumb.clientHeight, o = s.clientY - n.top - r / 2, a = n.height - r, d = e.clientHeight, f = e.querySelector("table").scrollHeight - d;
255
+ }), t(this, E).track.addEventListener("mousedown", (s) => {
256
+ if (s.button !== 0 || s.target === t(this, E).thumb) return;
257
+ const n = t(this, E).track.getBoundingClientRect(), r = t(this, E).thumb.clientHeight, o = s.clientY - n.top - r / 2, a = n.height - r, d = e.clientHeight, f = e.querySelector("table").scrollHeight - d;
258
258
  if (a > 0 && f > 0) {
259
- const b = Math.max(0, Math.min(1, o / a));
260
- e.scrollTop = b * f;
259
+ const g = Math.max(0, Math.min(1, o / a));
260
+ e.scrollTop = g * f;
261
261
  }
262
262
  this.refresh();
263
- }), t(this, S).top.addEventListener("click", () => {
263
+ }), t(this, E).top.addEventListener("click", () => {
264
264
  e.scrollTop -= 40;
265
- }), t(this, S).bottom.addEventListener("click", () => {
265
+ }), t(this, E).bottom.addEventListener("click", () => {
266
266
  e.scrollTop += 40;
267
267
  });
268
268
  }, "#init"));
269
269
  }
270
270
  connectedCallback() {
271
- if (g(this, N, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, N)) return;
271
+ if (b(this, N, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, N)) return;
272
272
  this.innerHTML = `
273
273
  <style>
274
274
  nine-table-vscrollbar {
@@ -338,7 +338,7 @@ const Vt = class Vt extends HTMLElement {
338
338
  setTimeout(e, 10);
339
339
  return;
340
340
  }
341
- g(this, S, {
341
+ b(this, E, {
342
342
  container: s,
343
343
  track: this.querySelector(".ng-scroll-track"),
344
344
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -349,9 +349,9 @@ const Vt = class Vt extends HTMLElement {
349
349
  e();
350
350
  }
351
351
  };
352
- N = new WeakMap(), I = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), tt = new WeakMap(), ht = new WeakMap(), c(Vt, "NineTableVScrollBar");
353
- let Mt = Vt;
354
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Mt);
352
+ N = new WeakMap(), I = new WeakMap(), E = new WeakMap(), Q = new WeakMap(), tt = new WeakMap(), ht = new WeakMap(), c(Xt, "NineTableVScrollBar");
353
+ let It = Xt;
354
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", It);
355
355
  var dt, et;
356
356
  const C = class C {
357
357
  /**
@@ -401,15 +401,15 @@ dt = new WeakMap(), et = new WeakMap(), c(C, "TableCompiler"), h(C, dt, /* @__PU
401
401
  const d = a.sectionRowIndex;
402
402
  let u = 0;
403
403
  Array.from(a.querySelectorAll("th,td")).forEach((f) => {
404
- for (let x = 0; x < l[d].length; x++)
405
- if (l[d][x] === null) {
406
- u = x;
404
+ for (let w = 0; w < l[d].length; w++)
405
+ if (l[d][w] === null) {
406
+ u = w;
407
407
  break;
408
408
  }
409
- const b = f.rowSpan || 1, y = f.colSpan || 1;
410
- for (let x = 0; x < b; x++)
409
+ const g = f.rowSpan || 1, y = f.colSpan || 1;
410
+ for (let w = 0; w < g; w++)
411
411
  for (let L = 0; L < y; L++)
412
- d + x < r && u + L < o && (l[d + x][u + L] = x === 0 && L === 0 ? "1" : "0");
412
+ d + w < r && u + L < o && (l[d + w][u + L] = w === 0 && L === 0 ? "1" : "0");
413
413
  });
414
414
  }), s.forEach((a) => {
415
415
  const d = a.sectionRowIndex;
@@ -422,11 +422,11 @@ dt = new WeakMap(), et = new WeakMap(), c(C, "TableCompiler"), h(C, dt, /* @__PU
422
422
  });
423
423
  });
424
424
  }, "#resetColIndex"));
425
- let It = C;
426
- var E, _, R, $, Y, V, ft, ut, it, bt, gt, st, pt, yt;
427
- const Xt = class Xt {
425
+ let $t = C;
426
+ var v, _, R, $, Y, V, ft, ut, gt, it, bt, pt, st, yt, mt;
427
+ const Ut = class Ut {
428
428
  constructor(i) {
429
- h(this, E);
429
+ h(this, v);
430
430
  h(this, _, /* @__PURE__ */ new Map());
431
431
  // 각 μ»¨ν…Œμ΄λ„ˆλ³„ λ…λ¦½λœ ν…œν”Œλ¦Ώ TR 관리
432
432
  h(this, R, null);
@@ -437,9 +437,9 @@ const Xt = class Xt {
437
437
  * 🎯 NineTableSheetμ—μ„œ λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 전달받아 각 μ˜μ—­λ³„ ν…Œμ΄λΈ” 생성 및 ν…œν”Œλ¦Ώ μΆ”μΆœ 일원화
438
438
  */
439
439
  // [RowManager.js μˆ˜μ • λ‚΄μš© 발췌]
440
- w(this, "initialize", /* @__PURE__ */ c(() => {
441
- g(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
442
- const s = t(this, E).querySelector(e);
440
+ S(this, "initialize", /* @__PURE__ */ c(() => {
441
+ b(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
442
+ const s = t(this, v).querySelector(e);
443
443
  if (!s) return;
444
444
  const n = s.querySelector("table");
445
445
  if (!n) return;
@@ -448,14 +448,14 @@ const Xt = class Xt {
448
448
  const l = Array.from(r.querySelectorAll("tr")).map((a) => a.cloneNode(!0));
449
449
  t(this, _).set(e, l);
450
450
  });
451
- const i = t(this, E).querySelector(".ng-container-body");
451
+ const i = t(this, v).querySelector(".ng-container-body");
452
452
  if (i) {
453
- t(this, ut).call(this, i), t(this, st).call(this);
453
+ t(this, ut).call(this, i), t(this, st).call(this), t(this, gt).call(this);
454
454
  let e = i.scrollTop;
455
455
  i.addEventListener("scroll", () => {
456
456
  var n;
457
457
  const s = i.scrollTop;
458
- G.log(e, s), e !== s && (e = s, t(this, pt).call(this, s)), (n = t(this, E).querySelector("nine-table-vscrollbar")) == null || n.refresh();
458
+ G.log(e, s), e !== s && (e = s, t(this, yt).call(this, s)), (n = t(this, v).querySelector("nine-table-vscrollbar")) == null || n.refresh();
459
459
  });
460
460
  }
461
461
  }, "initialize"));
@@ -482,45 +482,60 @@ const Xt = class Xt {
482
482
  if (!e || e.length === 0) return 24;
483
483
  const s = i.querySelector("tbody");
484
484
  if (!s) return 24;
485
- s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
485
+ s.querySelectorAll("tr:not(.nodata)").forEach((g) => g.remove());
486
486
  const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
487
- e.forEach((b) => {
488
- r.appendChild(b.cloneNode(!0));
487
+ e.forEach((g) => {
488
+ r.appendChild(g.cloneNode(!0));
489
489
  }), n ? n.before(r) : s.appendChild(r);
490
- const o = t(this, E), l = o.style.display, a = o.style.visibility, d = o.style.position;
490
+ const o = t(this, v), l = o.style.display, a = o.style.visibility, d = o.style.position;
491
491
  (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
492
492
  let u = 0;
493
493
  const f = s.querySelectorAll("tr:not(.nodata)");
494
- return f.forEach((b) => {
495
- u += b.offsetHeight || b.getBoundingClientRect().height;
496
- }), f.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = a, o.style.position = d, g(this, R, u > 0 ? u : 24), t(this, it).call(this), G.log(`[RowManager] Height Cached: ${t(this, R)}px | RowCount: ${t(this, V)}`), t(this, R);
494
+ return f.forEach((g) => {
495
+ u += g.offsetHeight || g.getBoundingClientRect().height;
496
+ }), f.forEach((g) => g.remove()), o.style.display = l, o.style.visibility = a, o.style.position = d, b(this, R, u > 0 ? u : 24), t(this, it).call(this), G.log(`[RowManager] Height Cached: ${t(this, R)}px | RowCount: ${t(this, V)}`), t(this, R);
497
497
  }, "#measureAndCacheHeight"));
498
+ /**
499
+ * 🎯 전체 데이터 개수 기반으둜 가상 슀크둀 높이 μ„€μ •
500
+ */
501
+ /**
502
+ * 🎯 전체 데이터 개수 기반으둜 가상 슀크둀 높이 μ„€μ •
503
+ */
504
+ h(this, gt, /* @__PURE__ */ c(() => {
505
+ var r, o, l, a;
506
+ if (!t(this, v).querySelector(".ng-container-body")) return;
507
+ const e = (typeof ((r = t(this, v).data) == null ? void 0 : r.count) == "function" ? t(this, v).data.count() : null) ?? ((l = (o = t(this, v).dataManager) == null ? void 0 : o.rawRecords) == null ? void 0 : l.length) ?? ((a = t(this, v).data) == null ? void 0 : a.length) ?? 0, s = t(this, R) || 24, n = e * s;
508
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
509
+ const u = t(this, v).querySelector(d), f = u == null ? void 0 : u.querySelector("table");
510
+ f && (f.style.height = `${n}px`);
511
+ });
512
+ }, "#updateVirtualScrollHeight"));
498
513
  h(this, it, /* @__PURE__ */ c(() => {
499
514
  if (t(this, Y) > 0 && t(this, R) > 0) {
500
515
  const i = Math.ceil(t(this, Y) / t(this, R));
501
- g(this, V, i + 20);
516
+ b(this, V, i + 20);
502
517
  } else
503
- g(this, V, 40);
518
+ b(this, V, 40);
504
519
  }, "#updateRowCount"));
505
520
  h(this, bt, /* @__PURE__ */ c(() => {
506
521
  var a, d, u;
507
- const i = t(this, E).querySelector(".ng-container-left table"), e = t(this, E).querySelector(".ng-container-body table"), s = t(this, E).querySelector(".ng-container-right table");
522
+ const i = t(this, v).querySelector(".ng-container-left table"), e = t(this, v).querySelector(".ng-container-body table"), s = t(this, v).querySelector(".ng-container-right table");
508
523
  if (!e) return;
509
524
  const n = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(n.length, r.length, o.length);
510
525
  for (let f = 0; f < l; f++) {
511
- const b = [
526
+ const g = [
512
527
  ((a = n[f]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
513
528
  ((d = r[f]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
514
529
  ((u = o[f]) == null ? void 0 : u.getBoundingClientRect().height) || 0
515
- ], y = Math.max(...b);
530
+ ], y = Math.max(...g);
516
531
  y > 0 && (n[f] && (n[f].style.height = `${y}px`), r[f] && (r[f].style.height = `${y}px`), o[f] && (o[f].style.height = `${y}px`));
517
532
  }
518
533
  }, "#syncRowHeights"));
519
534
  /**
520
535
  * 🎯 ResizeObserver μ„€μ •: μ‹œνŠΈ 크기 λ³€κ²½ μ‹œ ν–‰ 개수 μž¬μ‚°μ • 및 μž¬λ Œλ”λ§
521
536
  */
522
- h(this, gt, /* @__PURE__ */ c(() => {
523
- !t(this, E) || !(t(this, E) instanceof HTMLElement) || (g(this, $, new ResizeObserver((i) => {
537
+ h(this, pt, /* @__PURE__ */ c(() => {
538
+ !t(this, v) || !(t(this, v) instanceof HTMLElement) || (b(this, $, new ResizeObserver((i) => {
524
539
  for (const e of i) {
525
540
  const s = e.target;
526
541
  if (!s.classList.contains("active")) continue;
@@ -530,52 +545,52 @@ const Xt = class Xt {
530
545
  const o = s.querySelector("thead");
531
546
  o && (r += o.offsetHeight || o.getBoundingClientRect().height);
532
547
  const l = Math.max(n - r, 100);
533
- t(this, Y) !== l && (g(this, Y, l), t(this, it).call(this), t(this, R) !== null && t(this, st).call(this));
548
+ t(this, Y) !== l && (b(this, Y, l), t(this, it).call(this), t(this, R) !== null && t(this, st).call(this));
534
549
  }
535
550
  }
536
- })), t(this, $).observe(t(this, E)));
551
+ })), t(this, $).observe(t(this, v)));
537
552
  }, "#initResizeObserver"));
538
553
  /**
539
554
  * 🎯 λ°”λ”” 및 쒌우 κ³ μ • μ»¨ν…Œμ΄λ„ˆ 전체에 각각에 λ§žλŠ” ν…œν”Œλ¦Ώ ν–‰ λΌˆλŒ€ μ£Όμž…
540
555
  */
541
556
  h(this, st, /* @__PURE__ */ c(() => {
542
557
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
543
- const e = t(this, E).querySelector(i);
558
+ const e = t(this, v).querySelector(i);
544
559
  e && e.querySelector("tbody") && t(this, ft).call(this, e, i);
545
560
  }), t(this, bt).call(this);
546
561
  }, "#renderAllContainers"));
547
562
  /**
548
563
  * 🎯 슀크둀 μœ„μΉ˜μ— λ”°λ₯Έ 데이터 바인딩 κ°±μ‹ 
549
564
  */
550
- h(this, pt, /* @__PURE__ */ c((i) => {
565
+ h(this, yt, /* @__PURE__ */ c((i) => {
551
566
  var o;
552
567
  const e = t(this, R);
553
568
  if (!e || e <= 0) return;
554
569
  const s = ((o = t(this, _).get(".ng-container-body")) == null ? void 0 : o.length) || 1, n = Math.floor(i / e), r = Math.max(0, n);
555
570
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((l) => {
556
- const a = t(this, E).querySelector(l);
571
+ const a = t(this, v).querySelector(l);
557
572
  if (!a) return;
558
573
  const d = a.querySelector("tbody");
559
574
  if (!d) return;
560
- Array.from(d.querySelectorAll("tr:not(.nodata)")).forEach((f, b) => {
561
- const y = r + Math.floor(b / s), x = t(this, E).getData ? t(this, E).getData(y) : null;
562
- x ? (f.style.display = "", t(this, yt).call(this, f, x, y)) : f.style.display = "none";
575
+ Array.from(d.querySelectorAll("tr:not(.nodata)")).forEach((f, g) => {
576
+ const y = r + Math.floor(g / s), w = t(this, v).getData ? t(this, v).getData(y) : null;
577
+ w ? (f.style.display = "", t(this, mt).call(this, f, w, y)) : f.style.display = "none";
563
578
  });
564
579
  });
565
580
  }, "#handleScroll"));
566
581
  /**
567
582
  * 🎯 κ°œλ³„ TR μ—˜λ¦¬λ¨ΌνŠΈμ— μ‹€μ œ 데이터 값을 κ½‚μ•„μ£ΌλŠ” 바인딩 λ©”μ„œλ“œ
568
583
  */
569
- h(this, yt, /* @__PURE__ */ c((i, e, s) => {
584
+ h(this, mt, /* @__PURE__ */ c((i, e, s) => {
570
585
  i.dataset.row = s, Array.from(i.cells).forEach((n) => {
571
586
  const r = n.dataset.bind;
572
587
  r && e[r] !== void 0 && (n.textContent = e[r]), n.dataset.row = s;
573
588
  });
574
589
  }, "#bindRowData"));
575
- w(this, "destroy", /* @__PURE__ */ c(() => {
576
- t(this, $) && (t(this, $).disconnect(), g(this, $, null));
590
+ S(this, "destroy", /* @__PURE__ */ c(() => {
591
+ t(this, $) && (t(this, $).disconnect(), b(this, $, null));
577
592
  }, "destroy"));
578
- g(this, E, i), t(this, gt).call(this);
593
+ b(this, v, i), t(this, pt).call(this);
579
594
  }
580
595
  getRowHeight() {
581
596
  return t(this, R);
@@ -585,15 +600,15 @@ const Xt = class Xt {
585
600
  return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
586
601
  }
587
602
  };
588
- E = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), Y = new WeakMap(), V = new WeakMap(), ft = new WeakMap(), ut = new WeakMap(), it = new WeakMap(), bt = new WeakMap(), gt = new WeakMap(), st = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), c(Xt, "RowManager");
589
- let $t = Xt;
590
- var K, F, mt, vt, xt, wt, St;
603
+ v = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), Y = new WeakMap(), V = new WeakMap(), ft = new WeakMap(), ut = new WeakMap(), gt = new WeakMap(), it = new WeakMap(), bt = new WeakMap(), pt = new WeakMap(), st = new WeakMap(), yt = new WeakMap(), mt = new WeakMap(), c(Ut, "RowManager");
604
+ let Wt = Ut;
605
+ var K, F, xt, vt, wt, St, Et;
591
606
  const J = class J extends HTMLElement {
592
607
  constructor() {
593
608
  super();
594
609
  h(this, K, null);
595
610
  h(this, F);
596
- h(this, mt, /* @__PURE__ */ c(() => {
611
+ h(this, xt, /* @__PURE__ */ c(() => {
597
612
  [
598
613
  { selector: ".ng-container-body", type: null },
599
614
  { selector: ".ng-container-left", type: "left" },
@@ -601,7 +616,7 @@ const J = class J extends HTMLElement {
601
616
  ].forEach(({ selector: s, type: n }) => {
602
617
  const r = this.querySelector(s);
603
618
  if (!r) return;
604
- const o = t(this, xt).call(this, t(this, K), n);
619
+ const o = t(this, wt).call(this, t(this, K), n);
605
620
  r.innerHTML = "", r.appendChild(o);
606
621
  });
607
622
  }, "#renderSplitContainers"));
@@ -616,8 +631,8 @@ const J = class J extends HTMLElement {
616
631
  }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
617
632
  });
618
633
  }, "#updateContainerWidths"));
619
- w(this, "generate", /* @__PURE__ */ c((e) => {
620
- e && (g(this, K, It.compile(e)), t(this, K).style.display = "table", t(this, mt).call(this), t(this, F).initialize(), t(this, vt).call(this), setTimeout(() => {
634
+ S(this, "generate", /* @__PURE__ */ c((e) => {
635
+ e && (b(this, K, $t.compile(e)), t(this, K).style.display = "table", t(this, xt).call(this), t(this, F).initialize(), t(this, vt).call(this), setTimeout(() => {
621
636
  var s;
622
637
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
623
638
  }, 0));
@@ -625,7 +640,7 @@ const J = class J extends HTMLElement {
625
640
  /**
626
641
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
627
642
  */
628
- h(this, xt, /* @__PURE__ */ c((e, s) => {
643
+ h(this, wt, /* @__PURE__ */ c((e, s) => {
629
644
  const n = e.cloneNode(!0);
630
645
  return s === "left" ? n.querySelectorAll("col, th, td").forEach((r) => {
631
646
  r.getAttribute("fixed") !== "left" && r.remove();
@@ -635,19 +650,19 @@ const J = class J extends HTMLElement {
635
650
  r.remove();
636
651
  }), n;
637
652
  }, "#createSplitTable"));
638
- w(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, F).getRowHeight(), "getRowHeight"));
639
- w(this, "scrollToX", /* @__PURE__ */ c((e) => {
653
+ S(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, F).getRowHeight(), "getRowHeight"));
654
+ S(this, "scrollToX", /* @__PURE__ */ c((e) => {
640
655
  const s = this.querySelector(".ng-container-body");
641
656
  s && (s.scrollLeft = e);
642
657
  }, "scrollToX"));
643
- w(this, "scrollToY", /* @__PURE__ */ c((e) => {
658
+ S(this, "scrollToY", /* @__PURE__ */ c((e) => {
644
659
  const s = this.querySelector(".ng-container-body");
645
660
  s && (s.scrollTop = e);
646
661
  }, "scrollToY"));
647
- h(this, wt, /* @__PURE__ */ c(() => {
648
- t(this, St).call(this);
649
- }, "#init"));
650
662
  h(this, St, /* @__PURE__ */ c(() => {
663
+ t(this, Et).call(this);
664
+ }, "#init"));
665
+ h(this, Et, /* @__PURE__ */ c(() => {
651
666
  const e = J.SCROLLBAR_SIZE;
652
667
  this.innerHTML = `
653
668
  <style>
@@ -771,23 +786,23 @@ const J = class J extends HTMLElement {
771
786
  </div>
772
787
  `;
773
788
  }, "#render"));
774
- g(this, F, new $t(this));
789
+ b(this, F, new Wt(this));
775
790
  }
776
791
  connectedCallback() {
777
- t(this, wt).call(this);
792
+ t(this, St).call(this);
778
793
  }
779
794
  disconnectedCallback() {
780
795
  this.innerHTML = "", G.log("NineTableSheet destroyed.");
781
796
  }
782
797
  };
783
- K = new WeakMap(), F = new WeakMap(), mt = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), c(J, "NineTableSheet"), w(J, "SCROLLBAR_SIZE", 16);
798
+ K = new WeakMap(), F = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), c(J, "NineTableSheet"), S(J, "SCROLLBAR_SIZE", 16);
784
799
  let lt = J;
785
800
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", lt);
786
- var Et, nt;
787
- const Ut = class Ut extends HTMLElement {
801
+ var Rt, nt;
802
+ const Kt = class Kt extends HTMLElement {
788
803
  constructor() {
789
804
  super();
790
- h(this, Et, /* @__PURE__ */ c(() => {
805
+ h(this, Rt, /* @__PURE__ */ c(() => {
791
806
  var e;
792
807
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
793
808
  var o;
@@ -799,10 +814,10 @@ const Ut = class Ut extends HTMLElement {
799
814
  const n = /* @__PURE__ */ c(() => {
800
815
  const u = Array.from(this.querySelectorAll("nine-table-sheet"));
801
816
  Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
802
- const b = u.filter((y) => y.classList.contains("active"));
803
- b.length < 2 || b.forEach((y) => {
804
- const x = parseInt(y.getAttribute("data-index"), 10), L = this.querySelector(`nine-splitter[data-split-index="${x}"]`), Gt = u[x + 1];
805
- L && Gt && Gt.classList.contains("active") && L.style.setProperty("display", "flex");
817
+ const g = u.filter((y) => y.classList.contains("active"));
818
+ g.length < 2 || g.forEach((y) => {
819
+ const w = parseInt(y.getAttribute("data-index"), 10), L = this.querySelector(`nine-splitter[data-split-index="${w}"]`), Jt = u[w + 1];
820
+ L && Jt && Jt.classList.contains("active") && L.style.setProperty("display", "flex");
806
821
  });
807
822
  }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), a = o.querySelectorAll("nine-table-sheet");
808
823
  if (!l[e]) return;
@@ -810,16 +825,16 @@ const Ut = class Ut extends HTMLElement {
810
825
  l.forEach((u, f) => {
811
826
  u.classList.toggle("active", f === e);
812
827
  }), a.forEach((u, f) => {
813
- const b = f === e;
814
- u.classList.toggle("active", b), u.style.flex = b ? "1 1 100%" : "";
828
+ const g = f === e;
829
+ u.classList.toggle("active", g), u.style.flex = g ? "1 1 100%" : "";
815
830
  });
816
831
  else {
817
832
  const u = l[e], f = r.querySelectorAll(".nine-tab-item.active");
818
833
  if (u.classList.contains("active") && f.length <= 1)
819
834
  return;
820
835
  u.classList.toggle("active");
821
- const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
822
- b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
836
+ const g = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
837
+ g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
823
838
  }
824
839
  const d = o.querySelectorAll("nine-table-sheet.active");
825
840
  d == null || d.forEach((u) => {
@@ -828,18 +843,18 @@ const Ut = class Ut extends HTMLElement {
828
843
  }, "#switchSheet"));
829
844
  }
830
845
  connectedCallback() {
831
- t(this, Et).call(this);
846
+ t(this, Rt).call(this);
832
847
  }
833
848
  };
834
- Et = new WeakMap(), nt = new WeakMap(), c(Ut, "NineTableSheets");
835
- let Wt = Ut;
836
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Wt);
837
- var A, Rt, rt, At;
838
- const Kt = class Kt {
849
+ Rt = new WeakMap(), nt = new WeakMap(), c(Kt, "NineTableSheets");
850
+ let Ot = Kt;
851
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Ot);
852
+ var A, At, rt, Tt;
853
+ const Ft = class Ft {
839
854
  constructor(i) {
840
855
  h(this, A);
841
- h(this, Rt, /* @__PURE__ */ c(() => {
842
- t(this, At).call(this), new ResizeObserver((i) => {
856
+ h(this, At, /* @__PURE__ */ c(() => {
857
+ t(this, Tt).call(this), new ResizeObserver((i) => {
843
858
  for (let e of i)
844
859
  t(this, A).getAttribute("auto-height") === "true" && t(this, rt).call(this);
845
860
  }).observe(t(this, A));
@@ -851,10 +866,10 @@ const Kt = class Kt {
851
866
  const e = parseInt(t(this, A).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((u) => u.getRowHeight())), n = (a = t(this, A).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : a.getBoundingClientRect().height, r = (d = t(this, A).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, o = lt.SCROLLBAR_SIZE, l = e * s + n + r + o;
852
867
  t(this, A).style.height = `${l}px`;
853
868
  }, "#applyAutoHeight"));
854
- h(this, At, /* @__PURE__ */ c(() => {
869
+ h(this, Tt, /* @__PURE__ */ c(() => {
855
870
  const e = Array.from(t(this, A).children).filter((a) => a.tagName === "TABLE"), s = t(this, A).getAttribute("auto-height") === "true", n = e.length, r = e.map((a, d) => {
856
- const f = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, b = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
857
- return f + b;
871
+ const f = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, g = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
872
+ return f + g;
858
873
  }).join(""), o = e.map((a, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
859
874
  t(this, A).shadowRoot.innerHTML = `
860
875
  <style>
@@ -962,25 +977,25 @@ const Kt = class Kt {
962
977
  });
963
978
  });
964
979
  }, "#render"));
965
- g(this, A, i), t(this, Rt).call(this);
980
+ b(this, A, i), t(this, At).call(this);
966
981
  }
967
982
  };
968
- A = new WeakMap(), Rt = new WeakMap(), rt = new WeakMap(), At = new WeakMap(), c(Kt, "LayoutManager");
969
- let Ot = Kt;
983
+ A = new WeakMap(), At = new WeakMap(), rt = new WeakMap(), Tt = new WeakMap(), c(Ft, "LayoutManager");
984
+ let zt = Ft;
970
985
  var W, X;
971
- const Ft = class Ft {
986
+ const Zt = class Zt {
972
987
  constructor(i) {
973
988
  h(this, W);
974
989
  h(this, X, -1);
975
- w(this, "count", /* @__PURE__ */ c(() => t(this, W).rawRecords.length, "count"));
976
- g(this, W, i);
990
+ S(this, "count", /* @__PURE__ */ c(() => t(this, W).rawRecords.length, "count"));
991
+ b(this, W, i);
977
992
  }
978
993
  get at() {
979
994
  return t(this, X);
980
995
  }
981
996
  set at(i) {
982
997
  var s, n;
983
- g(this, X, parseInt(i, 10));
998
+ b(this, X, parseInt(i, 10));
984
999
  const e = ((n = (s = t(this, W).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || t(this, W).owner.body;
985
1000
  e && !e.querySelector(`tbody.bindable tr[data-row="${t(this, X)}"]`) && setTimeout(() => {
986
1001
  var r, o;
@@ -988,28 +1003,28 @@ const Ft = class Ft {
988
1003
  });
989
1004
  }
990
1005
  };
991
- W = new WeakMap(), X = new WeakMap(), c(Ft, "ngRow");
992
- let zt = Ft;
993
- var T, v, k, Z, Tt, O, kt, ot, qt, Lt, j;
1006
+ W = new WeakMap(), X = new WeakMap(), c(Zt, "ngRow");
1007
+ let Dt = Zt;
1008
+ var T, x, k, Z, kt, O, qt, ot, Lt, Ht, j;
994
1009
  const q = class q {
995
1010
  constructor(i, e) {
996
1011
  h(this, T);
997
- h(this, v);
1012
+ h(this, x);
998
1013
  h(this, k, []);
999
1014
  h(this, Z, []);
1000
- h(this, Tt, 0);
1015
+ h(this, kt, 0);
1001
1016
  h(this, O, []);
1002
- h(this, kt, /* @__PURE__ */ c(() => {
1003
- g(this, O, []);
1017
+ h(this, qt, /* @__PURE__ */ c(() => {
1018
+ b(this, O, []);
1004
1019
  const i = t(this, T).template || [];
1005
1020
  Array.from(i).forEach((e) => {
1006
1021
  var s;
1007
1022
  t(this, O).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1008
- }), (t(this, v).rawRecords || []).forEach((e) => {
1023
+ }), (t(this, x).rawRecords || []).forEach((e) => {
1009
1024
  e.__ng || (e.__ng = t(this, ot).call(this)), e.__ng.height = t(this, O).slice();
1010
1025
  });
1011
1026
  }, "#initialize"));
1012
- w(this, "set", /* @__PURE__ */ c((i) => {
1027
+ S(this, "set", /* @__PURE__ */ c((i) => {
1013
1028
  this.clear(), this.add(i, !1);
1014
1029
  }, "set"));
1015
1030
  h(this, ot, /* @__PURE__ */ c(() => ({
@@ -1021,14 +1036,14 @@ const q = class q {
1021
1036
  c: {},
1022
1037
  _: [0, 0, 0, 0, q.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, O).slice(), -1, {}, {}]
1023
1038
  }), "#getDefaultMeta"));
1024
- w(this, "reset", /* @__PURE__ */ c(() => {
1025
- g(this, k, []), g(this, Z, []);
1039
+ S(this, "reset", /* @__PURE__ */ c(() => {
1040
+ b(this, k, []), b(this, Z, []);
1026
1041
  }, "reset"));
1027
- w(this, "clear", /* @__PURE__ */ c(() => {
1042
+ S(this, "clear", /* @__PURE__ */ c(() => {
1028
1043
  var i;
1029
- t(this, v).rawRecords = [], g(this, k, []), g(this, Z, []), (i = t(this, v).viewRecords) != null && i.reset && t(this, v).viewRecords.reset();
1044
+ t(this, x).rawRecords = [], b(this, k, []), b(this, Z, []), (i = t(this, x).viewRecords) != null && i.reset && t(this, x).viewRecords.reset();
1030
1045
  }, "clear"));
1031
- h(this, qt, /* @__PURE__ */ c((i) => {
1046
+ h(this, Lt, /* @__PURE__ */ c((i) => {
1032
1047
  var n;
1033
1048
  Array.isArray(i) || (i = [i]);
1034
1049
  const e = typeof ((n = t(this, T).fields) == null ? void 0 : n.get) == "function" ? t(this, T).fields.get() : Object.keys(i[0] || {}), s = [];
@@ -1039,33 +1054,33 @@ const q = class q {
1039
1054
  }), s.push(o);
1040
1055
  }), s;
1041
1056
  }, "#json2Array"));
1042
- h(this, Lt, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1057
+ h(this, Ht, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1043
1058
  e.__ng = t(this, ot).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = q.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1044
1059
  }), i), "#defaultInsert"));
1045
- w(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1060
+ S(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1046
1061
  var r;
1047
1062
  i === void 0 && (i = {});
1048
- const s = t(this, qt).call(this, i);
1049
- t(this, v).rawRecords = t(this, v).rawRecords.concat(t(this, Lt).call(this, s)), this.resetRecords();
1063
+ const s = t(this, Lt).call(this, i);
1064
+ t(this, x).rawRecords = t(this, x).rawRecords.concat(t(this, Ht).call(this, s)), this.resetRecords();
1050
1065
  const n = this.count() - 1;
1051
1066
  return e || s.forEach((o, l) => {
1052
- const a = t(this, v).rawRecords[n - l];
1067
+ const a = t(this, x).rawRecords[n - l];
1053
1068
  a && (a.__ng.rowState = q.ROW_STATE.EMPTY);
1054
- }), (r = t(this, v).viewRecords) != null && r.reset && t(this, v).viewRecords.reset(), n;
1069
+ }), (r = t(this, x).viewRecords) != null && r.reset && t(this, x).viewRecords.reset(), n;
1055
1070
  }, "add"));
1056
- w(this, "delete", /* @__PURE__ */ c((i) => {
1071
+ S(this, "delete", /* @__PURE__ */ c((i) => {
1057
1072
  var s;
1058
1073
  let e = [];
1059
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, v).owner.row.at] : e = [parseInt(i, 10)], e.sort((n, r) => r - n).forEach((n) => {
1074
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, x).owner.row.at] : e = [parseInt(i, 10)], e.sort((n, r) => r - n).forEach((n) => {
1060
1075
  if (t(this, k)[n]) {
1061
1076
  const r = t(this, k)[n].__ng.rowid;
1062
- t(this, k)[n].__ng.rowState === q.ROW_STATE.INSERT ? t(this, v).rawRecords = t(this, v).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, v).rawRecords.forEach((o) => {
1077
+ t(this, k)[n].__ng.rowState === q.ROW_STATE.INSERT ? t(this, x).rawRecords = t(this, x).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, x).rawRecords.forEach((o) => {
1063
1078
  o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = q.ROW_STATE.DELETE);
1064
1079
  });
1065
1080
  }
1066
- }), this.resetRecords(), (s = t(this, v).viewRecords) != null && s.reset && t(this, v).viewRecords.reset();
1081
+ }), this.resetRecords(), (s = t(this, x).viewRecords) != null && s.reset && t(this, x).viewRecords.reset();
1067
1082
  }, "delete"));
1068
- w(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1083
+ S(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1069
1084
  var a;
1070
1085
  i = parseInt(i, 10);
1071
1086
  const r = (typeof ((a = t(this, T).fields) == null ? void 0 : a.get) == "function" ? t(this, T).fields.get() : []).indexOf(e);
@@ -1073,16 +1088,16 @@ const q = class q {
1073
1088
  const o = this.getValidData()[i];
1074
1089
  if (!o) return;
1075
1090
  const l = o.v[r];
1076
- l !== s && o.__ng.rowState !== q.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = q.ROW_STATE.UPDATE), o.v[r] = s, t(this, v).owner.refreshData && t(this, v).owner.refreshData(i);
1091
+ l !== s && o.__ng.rowState !== q.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = q.ROW_STATE.UPDATE), o.v[r] = s, t(this, x).owner.refreshData && t(this, x).owner.refreshData(i);
1077
1092
  }, "setValue"));
1078
- w(this, "resetRecords", /* @__PURE__ */ c(() => {
1079
- g(this, Z, t(this, v).rawRecords.filter((i) => !i.__ng.deleted)), g(this, k, t(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, v).rawRecords.forEach((i, e) => {
1093
+ S(this, "resetRecords", /* @__PURE__ */ c(() => {
1094
+ b(this, Z, t(this, x).rawRecords.filter((i) => !i.__ng.deleted)), b(this, k, t(this, x).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, x).rawRecords.forEach((i, e) => {
1080
1095
  i.__ng.rowidx = e;
1081
1096
  }), t(this, k).forEach((i, e) => {
1082
1097
  i.__ng.i = e;
1083
1098
  });
1084
1099
  }, "resetRecords"));
1085
- w(this, "getValidData", /* @__PURE__ */ c(() => (t(this, k).length === 0 && t(this, v).rawRecords.length > 0 && this.resetRecords(), t(this, k)), "getValidData"));
1100
+ S(this, "getValidData", /* @__PURE__ */ c(() => (t(this, k).length === 0 && t(this, x).rawRecords.length > 0 && this.resetRecords(), t(this, k)), "getValidData"));
1086
1101
  h(this, j, /* @__PURE__ */ c((i) => {
1087
1102
  var s;
1088
1103
  if (!i) return i;
@@ -1094,8 +1109,8 @@ const q = class q {
1094
1109
  }), r.__ng = n.__ng, r;
1095
1110
  }) : i;
1096
1111
  }, "#conv2"));
1097
- w(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1098
- w(this, "get", /* @__PURE__ */ c((i, e) => {
1112
+ S(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1113
+ S(this, "get", /* @__PURE__ */ c((i, e) => {
1099
1114
  var r;
1100
1115
  const s = this.getValidData();
1101
1116
  if (!s || s.length <= 0) return;
@@ -1108,16 +1123,16 @@ const q = class q {
1108
1123
  }
1109
1124
  return t(this, j).call(this, s[i]);
1110
1125
  }, "get"));
1111
- g(this, T, i), g(this, v, e), t(this, kt).call(this);
1126
+ b(this, T, i), b(this, x, e), t(this, qt).call(this);
1112
1127
  }
1113
1128
  get source() {
1114
- return t(this, j).call(this, t(this, v).rawRecords);
1129
+ return t(this, j).call(this, t(this, x).rawRecords);
1115
1130
  }
1116
1131
  set source(i) {
1117
1132
  this.clear(), this.add(i, !1);
1118
1133
  }
1119
1134
  get nextId() {
1120
- return ++ee(this, Tt)._;
1135
+ return ++ie(this, kt)._;
1121
1136
  }
1122
1137
  get length() {
1123
1138
  return t(this, k).length;
@@ -1126,18 +1141,18 @@ const q = class q {
1126
1141
  return this.length;
1127
1142
  }
1128
1143
  };
1129
- T = new WeakMap(), v = new WeakMap(), k = new WeakMap(), Z = new WeakMap(), Tt = new WeakMap(), O = new WeakMap(), kt = new WeakMap(), ot = new WeakMap(), qt = new WeakMap(), Lt = new WeakMap(), j = new WeakMap(), c(q, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1130
- w(q, "ROW_STATE", {
1144
+ T = new WeakMap(), x = new WeakMap(), k = new WeakMap(), Z = new WeakMap(), kt = new WeakMap(), O = new WeakMap(), qt = new WeakMap(), ot = new WeakMap(), Lt = new WeakMap(), Ht = new WeakMap(), j = new WeakMap(), c(q, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1145
+ S(q, "ROW_STATE", {
1131
1146
  EMPTY: "EMPTY",
1132
1147
  NORMAL: "NORMAL",
1133
1148
  INSERT: "INSERT",
1134
1149
  UPDATE: "UPDATE",
1135
1150
  DELETE: "DELETE"
1136
1151
  });
1137
- let Dt = q;
1138
- const Zt = class Zt {
1152
+ let Pt = q;
1153
+ const jt = class jt {
1139
1154
  constructor(i) {
1140
- this.owner = i, this.row = new zt(this), this.data = new Dt(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1155
+ this.owner = i, this.row = new Dt(this), this.data = new Pt(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1141
1156
  var e;
1142
1157
  (e = this.owner.view) != null && e.redraw && this.owner.view.redraw();
1143
1158
  }, this.setDataSource = (e) => {
@@ -1154,19 +1169,19 @@ const Zt = class Zt {
1154
1169
  }, this.setDataSource([]);
1155
1170
  }
1156
1171
  };
1157
- c(Zt, "ngDataManager");
1158
- let Pt = Zt;
1159
- var U, Ht;
1160
- const jt = class jt extends HTMLElement {
1172
+ c(jt, "ngDataManager");
1173
+ let Bt = jt;
1174
+ var U, Ct;
1175
+ const Gt = class Gt extends HTMLElement {
1161
1176
  constructor() {
1162
1177
  super();
1163
1178
  //#created = false;
1164
1179
  h(this, U);
1165
- h(this, Ht);
1166
- this.attachShadow({ mode: "open" }), g(this, U, new Pt(this));
1180
+ h(this, Ct);
1181
+ this.attachShadow({ mode: "open" }), b(this, U, new Bt(this));
1167
1182
  }
1168
1183
  connectedCallback() {
1169
- g(this, Ht, new Ot(this)), G.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1184
+ b(this, Ct, new zt(this)), G.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1170
1185
  }
1171
1186
  disconnectedCallback() {
1172
1187
  G.log("NineTable disconnected.");
@@ -1184,7 +1199,7 @@ const jt = class jt extends HTMLElement {
1184
1199
  return t(this, U);
1185
1200
  }
1186
1201
  };
1187
- U = new WeakMap(), Ht = new WeakMap(), c(jt, "NineTable");
1188
- let Bt = jt;
1189
- customElements.get("nine-table") || customElements.define("nine-table", Bt);
1202
+ U = new WeakMap(), Ct = new WeakMap(), c(Gt, "NineTable");
1203
+ let Nt = Gt;
1204
+ customElements.get("nine-table") || customElements.define("nine-table", Nt);
1190
1205
  //# sourceMappingURL=nine-table.js.map