@ninebone/table 0.0.413 → 0.0.415

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.
@@ -5,10 +5,10 @@ var me = (x) => {
5
5
  var we = (x, i, e) => i in x ? pe(x, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[i] = e;
6
6
  var a = (x, i) => pe(x, "name", { value: i, configurable: !0 });
7
7
  var v = (x, i, e) => we(x, typeof i != "symbol" ? i + "" : i, e), xe = (x, i, e) => i.has(x) || me("Cannot " + e);
8
- var t = (x, i, e) => (xe(x, i, "read from private field"), e ? e.call(x) : i.get(x)), c = (x, i, e) => i.has(x) ? me("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), g = (x, i, e, s) => (xe(x, i, "write to private field"), s ? s.call(x, e) : i.set(x, e), e);
8
+ var t = (x, i, e) => (xe(x, i, "read from private field"), e ? e.call(x) : i.get(x)), h = (x, i, e) => i.has(x) ? me("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), g = (x, i, e, s) => (xe(x, i, "write to private field"), s ? s.call(x, e) : i.set(x, e), e);
9
9
  var ve = (x, i, e, s) => ({
10
- set _(n) {
11
- g(x, i, n, e);
10
+ set _(o) {
11
+ g(x, i, o, e);
12
12
  },
13
13
  get _() {
14
14
  return t(x, i, s);
@@ -21,93 +21,93 @@ const re = class re extends Se.constructor {
21
21
  }
22
22
  };
23
23
  a(re, "Trace");
24
- let Ft = re;
25
- const T = new Ft();
26
- var _, O, p, N, P, V, St, Y, Et;
24
+ let jt = re;
25
+ const k = new jt();
26
+ var _, O, p, V, Y, X, Et, U, Rt;
27
27
  const le = class le extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- c(this, _);
31
- c(this, O, !1);
32
- c(this, p);
33
- c(this, N);
34
- c(this, P);
35
- c(this, V);
36
- c(this, St, /* @__PURE__ */ a(() => {
30
+ h(this, _);
31
+ h(this, O, !1);
32
+ h(this, p);
33
+ h(this, V);
34
+ h(this, Y);
35
+ h(this, X);
36
+ h(this, Et, /* @__PURE__ */ a(() => {
37
37
  if (!t(this, _)) return;
38
38
  const e = t(this, _).querySelector(".ng-container-body");
39
- e && (g(this, V, new ResizeObserver(() => {
39
+ e && (g(this, X, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, V).observe(e));
41
+ })), t(this, X).observe(e));
42
42
  }, "#observeResize"));
43
43
  v(this, "refresh", /* @__PURE__ */ a(() => {
44
44
  if (!t(this, _) || !t(this, p) || t(this, O)) return;
45
45
  const e = t(this, p).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const n = t(this, p).track, r = t(this, p).thumb, o = t(this, _).querySelector(".ng-container-bottom"), l = e.clientWidth, d = s.scrollWidth;
47
+ const o = t(this, p).track, r = t(this, p).thumb, n = t(this, _).querySelector(".ng-container-bottom"), l = e.clientWidth, d = s.scrollWidth;
48
48
  if (l !== 0 && d > l)
49
- o && (o.style.display = "flex");
49
+ n && (n.style.display = "flex");
50
50
  else {
51
- o && (o.style.display = "none");
51
+ n && (n.style.display = "none");
52
52
  return;
53
53
  }
54
- const h = n.clientWidth;
55
- if (h <= 0) return;
56
- const f = Math.max(Math.min(h * (l / d), h), 20);
54
+ const c = o.clientWidth;
55
+ if (c <= 0) return;
56
+ const f = Math.max(Math.min(c * (l / d), c), 20);
57
57
  r.style.width = `${f}px`;
58
58
  const u = e.scrollLeft, b = d - l;
59
59
  let y = 0;
60
- b > 0 && (y = parseInt(u / b * (h - f), 10)), y < 0 && (y = 0);
61
- const m = h - f;
62
- y > m && (y = m), r.style.left = `${y}px`, T.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= m - 1;
60
+ b > 0 && (y = parseInt(u / b * (c - f), 10)), y < 0 && (y = 0);
61
+ const m = c - f;
62
+ y > m && (y = m), r.style.left = `${y}px`, k.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= m - 1;
63
63
  }, "refresh"));
64
- c(this, Y, /* @__PURE__ */ a((e) => {
64
+ h(this, U, /* @__PURE__ */ a((e) => {
65
65
  if (!t(this, p)) return !1;
66
- const s = t(this, p).container, n = s.querySelector("table");
67
- if (!n) return !1;
68
- const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
66
+ const s = t(this, p).container, o = s.querySelector("table");
67
+ if (!o) return !1;
68
+ const r = t(this, p).track.getBoundingClientRect(), n = t(this, p).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
- const d = r.width - o;
71
+ const d = r.width - n;
72
72
  l > d && (l = d), l = parseInt(l, 10), t(this, p).thumb.style.left = `${l}px`, t(this, p).left.disabled = l === 0, t(this, p).right.disabled = l >= d - 1;
73
- const h = s.clientWidth, u = n.scrollWidth - h;
73
+ const c = s.clientWidth, u = o.scrollWidth - c;
74
74
  return d > 0 && u > 0 && (s.scrollLeft = l / d * u), l > 0 && l < d - 1;
75
75
  }, "#thumbMoveTo"));
76
- c(this, Et, /* @__PURE__ */ a(() => {
77
- const e = /* @__PURE__ */ a((n) => {
78
- clearInterval(t(this, N)), clearInterval(t(this, P));
76
+ h(this, Rt, /* @__PURE__ */ a(() => {
77
+ const e = /* @__PURE__ */ a((o) => {
78
+ clearInterval(t(this, V)), clearInterval(t(this, Y));
79
79
  const r = parseInt(t(this, p).thumb.style.left || 0, 10);
80
- t(this, Y).call(this, r + n), g(this, N, setInterval(() => {
81
- clearInterval(t(this, N)), g(this, P, setInterval(() => {
82
- const o = parseInt(t(this, p).thumb.style.left || 0, 10);
83
- t(this, Y).call(this, o + n) || clearInterval(t(this, P));
80
+ t(this, U).call(this, r + o), g(this, V, setInterval(() => {
81
+ clearInterval(t(this, V)), g(this, Y, setInterval(() => {
82
+ const n = parseInt(t(this, p).thumb.style.left || 0, 10);
83
+ t(this, U).call(this, n + o) || clearInterval(t(this, Y));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
- clearInterval(t(this, N)), clearInterval(t(this, P));
87
+ clearInterval(t(this, V)), clearInterval(t(this, Y));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((n) => {
90
- t(this, p).left.addEventListener(n, s), t(this, p).right.addEventListener(n, s), t(this, p).track.addEventListener(n, s);
91
- }), t(this, p).left.addEventListener("mousedown", (n) => {
92
- n.button === 0 && e(-20);
93
- }), t(this, p).right.addEventListener("mousedown", (n) => {
94
- n.button === 0 && e(20);
95
- }), t(this, p).left.addEventListener("touchstart", () => e(-20)), t(this, p).right.addEventListener("touchstart", () => e(20)), t(this, p).track.addEventListener("mousedown", (n) => {
96
- if (n.button !== 0) return;
97
- n.preventDefault();
98
- const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
99
- t(this, Y).call(this, n.clientX - r.left - o / 2);
100
- }), t(this, p).thumb.addEventListener("mousedown", (n) => {
101
- if (n.button !== 0) return;
102
- n.stopPropagation(), n.preventDefault(), g(this, O, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
89
+ ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
+ t(this, p).left.addEventListener(o, s), t(this, p).right.addEventListener(o, s), t(this, p).track.addEventListener(o, s);
91
+ }), t(this, p).left.addEventListener("mousedown", (o) => {
92
+ o.button === 0 && e(-20);
93
+ }), t(this, p).right.addEventListener("mousedown", (o) => {
94
+ o.button === 0 && e(20);
95
+ }), t(this, p).left.addEventListener("touchstart", () => e(-20)), t(this, p).right.addEventListener("touchstart", () => e(20)), t(this, p).track.addEventListener("mousedown", (o) => {
96
+ if (o.button !== 0) return;
97
+ o.preventDefault();
98
+ const r = t(this, p).track.getBoundingClientRect(), n = t(this, p).thumb.clientWidth;
99
+ t(this, U).call(this, o.clientX - r.left - n / 2);
100
+ }), t(this, p).thumb.addEventListener("mousedown", (o) => {
101
+ if (o.button !== 0) return;
102
+ o.stopPropagation(), o.preventDefault(), g(this, O, !0), this.shiftX = o.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ a((l) => {
104
104
  if (!t(this, O)) return;
105
105
  const d = t(this, p).track.getBoundingClientRect();
106
- t(this, Y).call(this, l.clientX - d.left - this.shiftX);
107
- }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
108
- g(this, O, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
106
+ t(this, U).call(this, l.clientX - d.left - this.shiftX);
107
+ }, "onMouseMove"), n = /* @__PURE__ */ a(() => {
108
+ g(this, O, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
110
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", n);
111
111
  });
112
112
  }, "#init"));
113
113
  }
@@ -190,61 +190,61 @@ const le = class le extends HTMLElement {
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
192
  t(this, O) || this.refresh();
193
- }), t(this, Et).call(this), t(this, St).call(this), this.refresh();
193
+ }), t(this, Rt).call(this), t(this, Et).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, V) && t(this, V).disconnect();
198
+ t(this, X) && t(this, X).disconnect();
199
199
  }
200
200
  };
201
- _ = new WeakMap(), O = new WeakMap(), p = new WeakMap(), N = new WeakMap(), P = new WeakMap(), V = new WeakMap(), St = new WeakMap(), Y = new WeakMap(), Et = new WeakMap(), a(le, "NineTableHScrollBar");
201
+ _ = new WeakMap(), O = new WeakMap(), p = new WeakMap(), V = new WeakMap(), Y = new WeakMap(), X = new WeakMap(), Et = new WeakMap(), U = new WeakMap(), Rt = new WeakMap(), a(le, "NineTableHScrollBar");
202
202
  let Kt = le;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Kt);
204
- var X, Q, z, S, ht, dt, Rt;
204
+ var F, Q, z, S, ht, dt, At;
205
205
  const ae = class ae extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- c(this, X);
209
- c(this, Q);
210
- c(this, z, !1);
211
- c(this, S);
212
- c(this, ht, 0);
213
- c(this, dt, 0);
208
+ h(this, F);
209
+ h(this, Q);
210
+ h(this, z, !1);
211
+ h(this, S);
212
+ h(this, ht, 0);
213
+ h(this, dt, 0);
214
214
  /**
215
215
  * 🎯 스크롤바 위치 및 썸브 크기 갱신
216
216
  */
217
217
  v(this, "refresh", /* @__PURE__ */ a(() => {
218
- T.log("refresh", t(this, z)), T.log("refresh2");
219
- const e = t(this, S).container, s = t(this, S).track, n = t(this, S).thumb, r = e.clientHeight, l = (t(this, X).data.get() || []).length, d = t(this, Q).getRowHeight(), h = l * d;
220
- if (h <= r) {
221
- n.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
218
+ k.log("refresh", t(this, z)), k.log("refresh2");
219
+ const e = t(this, S).container, s = t(this, S).track, o = t(this, S).thumb, r = e.clientHeight, l = (t(this, F).data.get() || []).length, d = t(this, Q).getRowHeight(), c = l * d;
220
+ if (c <= r) {
221
+ o.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
222
222
  return;
223
223
  } else
224
- n.style.display = "block";
224
+ o.style.display = "block";
225
225
  const f = s.clientHeight;
226
226
  if (f <= 0) return;
227
- const u = Math.max(Math.min(f * (r / h), f), 20);
228
- n.style.height = `${u}px`;
229
- const b = e.scrollTop, y = Math.max(h - r, 1);
227
+ const u = Math.max(Math.min(f * (r / c), f), 20);
228
+ o.style.height = `${u}px`;
229
+ const b = e.scrollTop, y = Math.max(c - r, 1);
230
230
  let m = 0;
231
231
  y > 0 && (m = b / y * (f - u));
232
232
  const R = f - u;
233
- m < 0 && (m = 0), m > R && (m = R), n.style.top = `${m}px`, T.log("currentScrollTop", b), T.log("maxScrollTop", y), T.log("trackHeight", f), T.log("thumbHeight", u), t(this, S).top.disabled = b <= 0, t(this, S).bottom.disabled = b >= y - 1;
233
+ m < 0 && (m = 0), m > R && (m = R), o.style.top = `${m}px`, k.log("currentScrollTop", b), k.log("maxScrollTop", y), k.log("trackHeight", f), k.log("thumbHeight", u), t(this, S).top.disabled = b <= 0, t(this, S).bottom.disabled = b >= y - 1;
234
234
  }, "refresh"));
235
- c(this, Rt, /* @__PURE__ */ a(() => {
235
+ h(this, At, /* @__PURE__ */ a(() => {
236
236
  const e = t(this, S).container, s = /* @__PURE__ */ a(() => {
237
- const r = (t(this, X).data.get() || []).length, o = t(this, Q).getRowHeight();
238
- return r * o;
237
+ const r = (t(this, F).data.get() || []).length, n = t(this, Q).getRowHeight();
238
+ return r * n;
239
239
  }, "getContentHeight");
240
240
  e.addEventListener("scroll", () => {
241
241
  t(this, z) || this.refresh();
242
- }), t(this, S).thumb.addEventListener("mousedown", (n) => {
243
- if (n.button !== 0) return;
244
- n.stopPropagation(), n.preventDefault(), g(this, z, !0), g(this, ht, n.clientY), g(this, dt, e.scrollTop);
242
+ }), t(this, S).thumb.addEventListener("mousedown", (o) => {
243
+ if (o.button !== 0) return;
244
+ o.stopPropagation(), o.preventDefault(), g(this, z, !0), g(this, ht, o.clientY), g(this, dt, e.scrollTop);
245
245
  const r = /* @__PURE__ */ a((l) => {
246
246
  if (!t(this, z)) return;
247
- const d = t(this, S).track.getBoundingClientRect(), h = t(this, S).thumb.clientHeight, u = d.height - h, b = l.clientY - t(this, ht), y = e.clientHeight, m = s(), R = Math.max(m - y, 1);
247
+ const d = t(this, S).track.getBoundingClientRect(), c = t(this, S).thumb.clientHeight, u = d.height - c, b = l.clientY - t(this, ht), y = e.clientHeight, m = s(), R = Math.max(m - y, 1);
248
248
  if (u > 0 && R > 0) {
249
249
  const J = b / u * R;
250
250
  let at = t(this, dt) + J;
@@ -252,15 +252,15 @@ const ae = class ae extends HTMLElement {
252
252
  at < 0 && (at = 0), at > ye && (at = ye), e.scrollTop = at;
253
253
  }
254
254
  this.refresh();
255
- }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
256
- g(this, z, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
255
+ }, "onMouseMove"), n = /* @__PURE__ */ a(() => {
256
+ g(this, z, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
257
257
  }, "onMouseUp");
258
- document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
259
- }), t(this, S).track.addEventListener("mousedown", (n) => {
260
- if (n.button !== 0 || n.target === t(this, S).thumb) return;
261
- const r = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientHeight, l = n.clientY - r.top - o / 2, h = r.height - o, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
262
- if (h > 0 && b > 0) {
263
- const y = Math.max(0, Math.min(1, l / h));
258
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", n);
259
+ }), t(this, S).track.addEventListener("mousedown", (o) => {
260
+ if (o.button !== 0 || o.target === t(this, S).thumb) return;
261
+ const r = t(this, S).track.getBoundingClientRect(), n = t(this, S).thumb.clientHeight, l = o.clientY - r.top - n / 2, c = r.height - n, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
262
+ if (c > 0 && b > 0) {
263
+ const y = Math.max(0, Math.min(1, l / c));
264
264
  e.scrollTop = y * b;
265
265
  }
266
266
  this.refresh();
@@ -272,7 +272,7 @@ const ae = class ae extends HTMLElement {
272
272
  }, "#init"));
273
273
  }
274
274
  connectedCallback() {
275
- g(this, X, this.getRootNode().host), g(this, Q, this.closest("nine-table-sheet")), this.innerHTML = `
275
+ g(this, F, this.getRootNode().host), g(this, Q, this.closest("nine-table-sheet")), this.innerHTML = `
276
276
  <style>
277
277
  nine-table-vscrollbar {
278
278
  display: flex;
@@ -338,7 +338,7 @@ const ae = class ae extends HTMLElement {
338
338
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
339
339
  `;
340
340
  const e = /* @__PURE__ */ a(() => {
341
- const s = t(this, X).shadowRoot.querySelector(".ng-container-body");
341
+ const s = t(this, F).shadowRoot.querySelector(".ng-container-body");
342
342
  if (!s) {
343
343
  setTimeout(e, 10);
344
344
  return;
@@ -349,15 +349,15 @@ const ae = class ae extends HTMLElement {
349
349
  thumb: this.querySelector(".ng-scroll-thumb"),
350
350
  top: this.querySelector(".ng-scroll-top"),
351
351
  bottom: this.querySelector(".ng-scroll-bottom")
352
- }), t(this, Rt).call(this), this.refresh();
352
+ }), t(this, At).call(this), this.refresh();
353
353
  }, "initWhenReady");
354
354
  e();
355
355
  }
356
356
  };
357
- X = new WeakMap(), Q = new WeakMap(), z = new WeakMap(), S = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), Rt = new WeakMap(), a(ae, "NineTableVScrollBar");
357
+ F = new WeakMap(), Q = new WeakMap(), z = new WeakMap(), S = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), At = new WeakMap(), a(ae, "NineTableVScrollBar");
358
358
  let Zt = ae;
359
359
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Zt);
360
- var At, tt;
360
+ var Tt, tt;
361
361
  const M = class M {
362
362
  /**
363
363
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
@@ -369,190 +369,200 @@ const M = class M {
369
369
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
370
370
  */
371
371
  static compile(i) {
372
- var n, r, o, l;
372
+ var o, r, n, l;
373
373
  if (!i) return null;
374
374
  const e = i.cloneNode(!0);
375
- return t(n = M, At).call(n, e), t(r = M, tt).call(r, e, "thead"), t(o = M, tt).call(o, e, "tbody"), t(l = M, tt).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((d, h) => {
375
+ return t(o = M, Tt).call(o, e), t(r = M, tt).call(r, e, "thead"), t(n = M, tt).call(n, e, "tbody"), t(l = M, tt).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((d, c) => {
376
376
  const f = d.getAttribute("fixed");
377
- f && e.querySelectorAll(`thead [data-col="${h}"], tbody [data-col="${h}"], tfoot [data-col="${h}"]`).forEach((u) => {
377
+ f && e.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((u) => {
378
378
  u.setAttribute("fixed", f);
379
379
  });
380
380
  }), e;
381
381
  }
382
382
  };
383
- At = new WeakMap(), tt = new WeakMap(), a(M, "TableCompiler"), c(M, At, /* @__PURE__ */ a((i) => {
383
+ Tt = new WeakMap(), tt = new WeakMap(), a(M, "TableCompiler"), h(M, Tt, /* @__PURE__ */ a((i) => {
384
384
  if (!i.querySelector("colgroup")) {
385
- const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
386
- for (let o = 0; o < s; o++) {
385
+ const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, o = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
386
+ for (let n = 0; n < s; n++) {
387
387
  const l = document.createElement("col");
388
- l.setAttribute("width", r), n.appendChild(l);
388
+ l.setAttribute("width", r), o.appendChild(l);
389
389
  }
390
- i.prepend(n);
390
+ i.prepend(o);
391
391
  }
392
392
  if (!i.querySelector("thead")) {
393
393
  const e = document.createElement("thead"), s = i.querySelector("colgroup");
394
394
  s ? s.after(e) : i.prepend(e);
395
395
  }
396
396
  i.classList.add("nine-table-element"), i.style.display = "table";
397
- }, "#ensureTableStructure")), c(M, tt, /* @__PURE__ */ a((i, e) => {
398
- const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
399
- if (r === 0 || n.length === 0) return;
400
- let o = 0;
401
- n.forEach((d) => {
402
- o += d.colSpan || 1;
397
+ }, "#ensureTableStructure")), h(M, tt, /* @__PURE__ */ a((i, e) => {
398
+ const s = Array.from(i.querySelectorAll(e + " tr")), o = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
399
+ if (r === 0 || o.length === 0) return;
400
+ let n = 0;
401
+ o.forEach((d) => {
402
+ n += d.colSpan || 1;
403
403
  });
404
- const l = Array.from(Array(r), () => Array(o).fill(null));
404
+ const l = Array.from(Array(r), () => Array(n).fill(null));
405
405
  s.forEach((d) => {
406
- const h = d.sectionRowIndex;
406
+ const c = d.sectionRowIndex;
407
407
  let f = 0;
408
408
  Array.from(d.querySelectorAll("th,td")).forEach((u) => {
409
- for (let m = 0; m < l[h].length; m++)
410
- if (l[h][m] === null) {
409
+ for (let m = 0; m < l[c].length; m++)
410
+ if (l[c][m] === null) {
411
411
  f = m;
412
412
  break;
413
413
  }
414
414
  const b = u.rowSpan || 1, y = u.colSpan || 1;
415
415
  for (let m = 0; m < b; m++)
416
416
  for (let R = 0; R < y; R++)
417
- h + m < r && f + R < o && (l[h + m][f + R] = m === 0 && R === 0 ? "1" : "0");
417
+ c + m < r && f + R < n && (l[c + m][f + R] = m === 0 && R === 0 ? "1" : "0");
418
418
  });
419
419
  }), s.forEach((d) => {
420
- const h = d.sectionRowIndex;
420
+ const c = d.sectionRowIndex;
421
421
  Array.from(d.querySelectorAll("th,td")).forEach((f) => {
422
- for (let u = 0; u < l[h].length; u++)
423
- if (l[h][u] === "1") {
424
- f.dataset.col = u, l[h][u] = "0";
422
+ for (let u = 0; u < l[c].length; u++)
423
+ if (l[c][u] === "1") {
424
+ f.dataset.col = u, l[c][u] = "0";
425
425
  break;
426
426
  }
427
427
  });
428
428
  });
429
429
  }, "#resetColIndex"));
430
430
  let Gt = M;
431
- var I, w, W, k, B, U, j, et, Tt, kt, qt, ft, ut, Lt, Ht, gt, Ct, it, bt;
431
+ var I, w, W, T, D, j, B, et, qt, kt, Lt, ft, ut, Ht, Ct, gt, $t, it, bt;
432
432
  const ce = class ce {
433
433
  constructor(i) {
434
- c(this, I);
435
- c(this, w);
436
- c(this, W, /* @__PURE__ */ new Map());
437
- c(this, k, null);
438
- c(this, B, null);
439
- c(this, U, 0);
440
- c(this, j, 40);
441
- c(this, et, !1);
442
- c(this, Tt, 3);
434
+ h(this, I);
435
+ h(this, w);
436
+ h(this, W, /* @__PURE__ */ new Map());
437
+ h(this, T, null);
438
+ h(this, D, null);
439
+ h(this, j, 0);
440
+ h(this, B, 40);
441
+ h(this, et, !1);
442
+ h(this, qt, 3);
443
443
  v(this, "refresh", /* @__PURE__ */ a(() => {
444
444
  var e;
445
445
  const i = t(this, w).querySelector(".ng-container-body");
446
446
  i && (t(this, ft).call(this), t(this, it).call(this, i.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
447
447
  }, "refresh"));
448
448
  v(this, "initialize", /* @__PURE__ */ a(() => {
449
- g(this, k, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
450
- const r = t(this, w).querySelector(n);
449
+ g(this, T, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
450
+ const r = t(this, w).querySelector(o);
451
451
  if (!r) return;
452
- const o = r.querySelector("table");
453
- if (!o) return;
454
- const l = o.querySelector("tbody.bindable-tbody");
452
+ const n = r.querySelector("table");
453
+ if (!n) return;
454
+ const l = n.querySelector("tbody.bindable-tbody");
455
455
  if (!l) return;
456
- const h = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
457
- t(this, W).set(n, h);
456
+ const c = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
457
+ t(this, W).set(o, c);
458
458
  });
459
459
  const i = t(this, w).querySelector(".ng-container-body"), e = t(this, w).querySelector(".ng-container-left"), s = t(this, w).querySelector(".ng-container-right");
460
460
  if (i) {
461
- t(this, qt).call(this, i), t(this, gt).call(this), t(this, ft).call(this), t(this, it).call(this, i.scrollTop);
462
- let n = i.scrollTop;
463
- const r = /* @__PURE__ */ a((o) => {
461
+ t(this, Lt).call(this, i), t(this, gt).call(this), t(this, ft).call(this), t(this, it).call(this, i.scrollTop);
462
+ let o = i.scrollTop;
463
+ const r = /* @__PURE__ */ a((n) => {
464
464
  var l;
465
- e && e.scrollTop !== o && (e.scrollTop = o), s && s.scrollTop !== o && (s.scrollTop = o), t(this, it).call(this, o), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
465
+ e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, it).call(this, n), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
466
466
  }, "syncScroll");
467
467
  i.addEventListener("scroll", () => {
468
- const o = i.scrollTop;
469
- n !== o && (n = o, r(o));
468
+ const n = i.scrollTop;
469
+ o !== n && (o = n, r(n));
470
470
  });
471
471
  }
472
472
  }, "initialize"));
473
- c(this, kt, /* @__PURE__ */ a((i, e) => {
474
- T.log("#renderRows");
473
+ h(this, kt, /* @__PURE__ */ a((i, e) => {
474
+ const s = t(this, W).get(e);
475
+ if (!s || s.length === 0) return;
476
+ const o = i.querySelector("tbody.bindable-tbody");
477
+ if (!o) return;
478
+ o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
479
+ const r = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
480
+ for (let l = 0; l < t(this, B); l++)
481
+ s.forEach((d) => {
482
+ n.appendChild(d.cloneNode(!0));
483
+ });
484
+ r ? r.before(n) : o.appendChild(n);
475
485
  }, "#renderRows"));
476
- c(this, qt, /* @__PURE__ */ a((i) => {
477
- if (t(this, k) !== null && t(this, k) > 0)
478
- return t(this, k);
486
+ h(this, Lt, /* @__PURE__ */ a((i) => {
487
+ if (t(this, T) !== null && t(this, T) > 0)
488
+ return t(this, T);
479
489
  const e = t(this, W).get(".ng-container-body");
480
490
  if (!e || e.length === 0) return 24;
481
491
  const s = i.querySelector("tbody.bindable-tbody") || i.querySelector("tbody.bindable-tbody:last-of-type");
482
492
  if (!s) return 24;
483
493
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
484
- const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
494
+ const o = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
485
495
  e.forEach((b) => {
486
496
  r.appendChild(b.cloneNode(!0));
487
- }), n ? n.before(r) : s.appendChild(r);
488
- const o = t(this, w), l = o.style.display, d = o.style.visibility, h = o.style.position;
489
- (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
497
+ }), o ? o.before(r) : s.appendChild(r);
498
+ const n = t(this, w), l = n.style.display, d = n.style.visibility, c = n.style.position;
499
+ (l === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
490
500
  let f = 0;
491
501
  const u = s.querySelectorAll("tr:not(.nodata)");
492
502
  return u.forEach((b) => {
493
503
  f += b.offsetHeight || b.getBoundingClientRect().height;
494
- }), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = d, o.style.position = h, g(this, k, f > 0 ? f : 24), t(this, ut).call(this), t(this, k);
504
+ }), u.forEach((b) => b.remove()), n.style.display = l, n.style.visibility = d, n.style.position = c, g(this, T, f > 0 ? f : 24), t(this, ut).call(this), t(this, T);
495
505
  }, "#measureAndCacheHeight"));
496
- c(this, ft, /* @__PURE__ */ a(() => {
506
+ h(this, ft, /* @__PURE__ */ a(() => {
497
507
  if (!t(this, w).querySelector(".ng-container-body")) return;
498
- const s = (t(this, I).data.get() || []).length, n = t(this, k) || 24, r = s * n;
499
- T.log(`[VirtualHeight] totalCount: ${s}, rowHeight: ${n}, totalVirtualHeight: ${r}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
500
- const l = t(this, w).querySelector(o), d = l == null ? void 0 : l.querySelector("table");
508
+ const s = (t(this, I).data.get() || []).length, o = t(this, T) || 24, r = s * o;
509
+ k.log(`[VirtualHeight] totalCount: ${s}, rowHeight: ${o}, totalVirtualHeight: ${r}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
510
+ const l = t(this, w).querySelector(n), d = l == null ? void 0 : l.querySelector("table");
501
511
  d && (d.style.height = `${r}px`);
502
512
  });
503
513
  }, "#updateVirtualScrollHeight"));
504
- c(this, ut, /* @__PURE__ */ a(() => {
505
- if ((t(this, I).data.get() || []).length, t(this, U) > 0 && t(this, k) > 0) {
506
- const e = Math.ceil(t(this, U) / t(this, k));
507
- g(this, j, e + t(this, Tt)), T.log("visibleRows:", e, "cachedRowCount:", t(this, j));
514
+ h(this, ut, /* @__PURE__ */ a(() => {
515
+ if ((t(this, I).data.get() || []).length, t(this, j) > 0 && t(this, T) > 0) {
516
+ const e = Math.ceil(t(this, j) / t(this, T));
517
+ g(this, B, e + t(this, qt)), k.log("visibleRows:", e, "cachedRowCount:", t(this, B));
508
518
  }
509
519
  }, "#updateRowCount"));
510
- c(this, Lt, /* @__PURE__ */ a(() => {
511
- var d, h, f;
520
+ h(this, Ht, /* @__PURE__ */ a(() => {
521
+ var d, c, f;
512
522
  const i = t(this, w).querySelector(".ng-container-left table"), e = t(this, w).querySelector(".ng-container-body table"), s = t(this, w).querySelector(".ng-container-right table");
513
523
  if (!e) return;
514
- 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);
524
+ const o = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), n = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(o.length, r.length, n.length);
515
525
  for (let u = 0; u < l; u++) {
516
526
  const b = [
517
- ((d = n[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
518
- ((h = r[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
519
- ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
527
+ ((d = o[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
528
+ ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
529
+ ((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
520
530
  ], y = Math.max(...b);
521
- y > 0 && (n[u] && (n[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), o[u] && (o[u].style.height = `${y}px`));
531
+ y > 0 && (o[u] && (o[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), n[u] && (n[u].style.height = `${y}px`));
522
532
  }
523
533
  }, "#syncRowHeights"));
524
- c(this, Ht, /* @__PURE__ */ a(() => {
525
- !t(this, w) || !(t(this, w) instanceof HTMLElement) || (g(this, B, new ResizeObserver((i) => {
534
+ h(this, Ct, /* @__PURE__ */ a(() => {
535
+ !t(this, w) || !(t(this, w) instanceof HTMLElement) || (g(this, D, new ResizeObserver((i) => {
526
536
  for (const e of i) {
527
537
  const s = e.target;
528
538
  if (!s.classList.contains("active")) continue;
529
- const n = e.contentRect.height;
530
- if (n > 0) {
539
+ const o = e.contentRect.height;
540
+ if (o > 0) {
531
541
  let r = 0;
532
- const o = s.querySelector("thead");
533
- o && (r += o.offsetHeight || o.getBoundingClientRect().height);
534
- const l = Math.max(n - r, 100);
535
- t(this, U) !== l && (g(this, U, l), t(this, ut).call(this), t(this, k) !== null && t(this, gt).call(this));
542
+ const n = s.querySelector("thead");
543
+ n && (r += n.offsetHeight || n.getBoundingClientRect().height);
544
+ const l = Math.max(o - r, 100);
545
+ t(this, j) !== l && (g(this, j, l), t(this, ut).call(this), t(this, T) !== null && t(this, gt).call(this));
536
546
  }
537
547
  }
538
- })), t(this, B).observe(t(this, w)));
548
+ })), t(this, D).observe(t(this, w)));
539
549
  }, "#initResizeObserver"));
540
- c(this, gt, /* @__PURE__ */ a(() => {
550
+ h(this, gt, /* @__PURE__ */ a(() => {
541
551
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
542
552
  const e = t(this, w).querySelector(i);
543
553
  e && e.querySelector("tbody.bindable-tbody") && t(this, kt).call(this, e, i);
544
- }), t(this, Lt).call(this);
554
+ }), t(this, Ht).call(this);
545
555
  }, "#renderAllContainers"));
546
- c(this, Ct, /* @__PURE__ */ a((i) => {
556
+ h(this, $t, /* @__PURE__ */ a((i) => {
547
557
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
548
- var h;
558
+ var c;
549
559
  const s = t(this, w).querySelector(e);
550
560
  if (!s) return;
551
- const n = s.querySelector("tbody.bindable-tbody");
552
- if (!n) return;
553
- const r = Array.from(n.querySelectorAll("tr:not(.nodata)")), o = ((h = t(this, W).get(e)) == null ? void 0 : h.length) || 1, d = (t(this, I).data.get() || []).length;
561
+ const o = s.querySelector("tbody.bindable-tbody");
562
+ if (!o) return;
563
+ const r = Array.from(o.querySelectorAll("tr:not(.nodata)")), n = ((c = t(this, W).get(e)) == null ? void 0 : c.length) || 1, d = (t(this, I).data.get() || []).length;
554
564
  r.forEach((f, u) => {
555
- const b = i + Math.floor(u / o);
565
+ const b = i + Math.floor(u / n);
556
566
  if (b >= d) {
557
567
  f.style.display = "none";
558
568
  return;
@@ -562,19 +572,19 @@ const ce = class ce {
562
572
  });
563
573
  });
564
574
  }, "#adjustBufferRows"));
565
- c(this, it, /* @__PURE__ */ a((i) => {
575
+ h(this, it, /* @__PURE__ */ a((i) => {
566
576
  var d;
567
- const e = t(this, k);
577
+ const e = t(this, T);
568
578
  if (!e || e <= 0) return;
569
- const n = (t(this, I).data.get() || []).length, r = Math.max(0, Math.floor(i / e)), o = ((d = t(this, W).get(".ng-container-body")) == null ? void 0 : d.length) || 1, l = r + t(this, j);
570
- T.log(`[Scroll] scrollTop: ${i}, startIndex: ${r}, cachedRowCount: ${t(this, j)}, targetDataIndex range: ${r} ~ ${l} (Total: ${n})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((h) => {
571
- const f = t(this, w).querySelector(h);
579
+ const o = (t(this, I).data.get() || []).length, r = Math.max(0, Math.floor(i / e)), n = ((d = t(this, W).get(".ng-container-body")) == null ? void 0 : d.length) || 1, l = r + t(this, B);
580
+ k.log(`[Scroll] scrollTop: ${i}, startIndex: ${r}, cachedRowCount: ${t(this, B)}, targetDataIndex range: ${r} ~ ${l} (Total: ${o})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((c) => {
581
+ const f = t(this, w).querySelector(c);
572
582
  if (!f) return;
573
583
  const u = f.querySelector("tbody.bindable-tbody");
574
584
  if (!u) return;
575
585
  Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((y, m) => {
576
- const R = r + Math.floor(m / o);
577
- if (R >= n) {
586
+ const R = r + Math.floor(m / n);
587
+ if (R >= o) {
578
588
  y.style.display = "none";
579
589
  return;
580
590
  }
@@ -582,97 +592,104 @@ const ce = class ce {
582
592
  y.style.display = "", t(this, bt).call(this, y, J, R);
583
593
  });
584
594
  }), t(this, et) || (g(this, et, !0), setTimeout(() => {
585
- t(this, Ct).call(this, r), g(this, et, !1);
595
+ t(this, $t).call(this, r), g(this, et, !1);
586
596
  }, 0));
587
597
  }, "#handleScroll"));
588
- c(this, bt, /* @__PURE__ */ a((i, e, s) => {
589
- i.dataset.row = s, Array.from(i.cells).forEach((n, r) => {
590
- const o = n.dataset.bind;
591
- o && e && e[o] !== void 0 ? n.textContent = e[o] : n.textContent = e ? e[Object.keys(e)[r]] ?? `R${s}C${r}` : `행 ${s + 1}`, n.dataset.row = s;
598
+ h(this, bt, /* @__PURE__ */ a((i, e, s) => {
599
+ i.dataset.row = s, Array.from(i.cells).forEach((o, r) => {
600
+ const n = o.dataset.bind;
601
+ n && e && e[n] !== void 0 ? o.textContent = e[n] : o.textContent = e ? e[Object.keys(e)[r]] ?? `R${s}C${r}` : `행 ${s + 1}`, o.dataset.row = s;
592
602
  });
593
603
  }, "#bindRowData"));
594
604
  v(this, "destroy", /* @__PURE__ */ a(() => {
595
- t(this, B) && (t(this, B).disconnect(), g(this, B, null));
605
+ t(this, D) && (t(this, D).disconnect(), g(this, D, null));
596
606
  }, "destroy"));
597
- g(this, I, i.getRootNode().host), g(this, w, i), t(this, Ht).call(this);
607
+ g(this, I, i.getRootNode().host), g(this, w, i), t(this, Ct).call(this);
598
608
  }
599
609
  getRowHeight() {
600
- return t(this, k);
610
+ return t(this, T);
601
611
  }
602
612
  templateLength(i = ".ng-container-body") {
603
613
  var e;
604
614
  return ((e = t(this, W).get(i)) == null ? void 0 : e.length) || 1;
605
615
  }
606
616
  };
607
- I = new WeakMap(), w = new WeakMap(), W = new WeakMap(), k = new WeakMap(), B = new WeakMap(), U = new WeakMap(), j = new WeakMap(), et = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), qt = new WeakMap(), ft = new WeakMap(), ut = new WeakMap(), Lt = new WeakMap(), Ht = new WeakMap(), gt = new WeakMap(), Ct = new WeakMap(), it = new WeakMap(), bt = new WeakMap(), a(ce, "RowManager");
617
+ I = new WeakMap(), w = new WeakMap(), W = new WeakMap(), T = new WeakMap(), D = new WeakMap(), j = new WeakMap(), B = new WeakMap(), et = new WeakMap(), qt = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), ft = new WeakMap(), ut = new WeakMap(), Ht = new WeakMap(), Ct = new WeakMap(), gt = new WeakMap(), $t = new WeakMap(), it = new WeakMap(), bt = new WeakMap(), a(ce, "RowManager");
608
618
  let Jt = ce;
609
- var Mt, st, F, _t, $t, It, Wt, Ot;
619
+ var yt, st, N, Mt, _t, It, Wt, Ot;
610
620
  const ct = class ct extends HTMLElement {
611
621
  constructor() {
612
622
  super();
613
- c(this, Mt);
614
- c(this, st, null);
615
- c(this, F);
623
+ h(this, yt);
624
+ h(this, st, null);
625
+ h(this, N);
616
626
  /**
617
627
  * data.set, add, delete
618
628
  * filter, sorting : 고려대상
619
629
  */
620
630
  v(this, "invalidate", /* @__PURE__ */ a(() => {
621
- t(this, F).refresh();
631
+ t(this, N).refresh();
622
632
  }, "invalidate"));
623
- c(this, _t, /* @__PURE__ */ a(() => {
633
+ h(this, Mt, /* @__PURE__ */ a(() => {
624
634
  [
625
635
  { selector: ".ng-container-body", type: null },
626
636
  { selector: ".ng-container-left", type: "left" },
627
637
  { selector: ".ng-container-right", type: "right" }
628
- ].forEach(({ selector: s, type: n }) => {
638
+ ].forEach(({ selector: s, type: o }) => {
629
639
  const r = this.querySelector(s);
630
640
  if (!r) return;
631
- const o = t(this, It).call(this, t(this, st), n);
632
- r.innerHTML = "", r.appendChild(o);
641
+ const n = t(this, It).call(this, t(this, st), o);
642
+ r.innerHTML = "", r.appendChild(n);
633
643
  });
634
644
  }, "#renderSplitContainers"));
635
- c(this, $t, /* @__PURE__ */ a(() => {
645
+ h(this, _t, /* @__PURE__ */ a(() => {
636
646
  ["left", "right"].forEach((e) => {
637
- const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
638
- if (!s || !n) return;
647
+ const s = this.querySelector(`.ng-container-${e}`), o = s == null ? void 0 : s.querySelector("table");
648
+ if (!s || !o) return;
639
649
  let r = 0;
640
- n.querySelectorAll("col").forEach((o) => {
641
- const l = parseInt(o.getAttribute("width"), 10);
650
+ o.querySelectorAll("col").forEach((n) => {
651
+ const l = parseInt(n.getAttribute("width"), 10);
642
652
  isNaN(r) || (r += l);
643
653
  }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
644
654
  });
645
655
  }, "#updateContainerWidths"));
646
656
  v(this, "generate", /* @__PURE__ */ a((e) => {
647
- e && (g(this, st, Gt.compile(e)), t(this, st).style.display = "table", t(this, _t).call(this), t(this, $t).call(this), requestAnimationFrame(() => {
648
- var n;
649
- const s = (n = this.querySelector("thead")) == null ? void 0 : n.getBoundingClientRect().height;
650
- this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
651
- r.style.top = `${s}px`;
657
+ var l, d;
658
+ if (!e) return;
659
+ g(this, st, Gt.compile(e)), t(this, st).style.display = "table", t(this, Mt).call(this), t(this, _t).call(this), requestAnimationFrame(() => {
660
+ var f;
661
+ const c = (f = this.querySelector("thead")) == null ? void 0 : f.getBoundingClientRect().height;
662
+ this.querySelectorAll("tbody.fixed-tbody").forEach((u) => {
663
+ u.style.top = `${c}px`;
652
664
  });
653
- }), t(this, F).initialize(), setTimeout(() => {
654
- var s;
655
- (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
656
- }, 0));
665
+ }), t(this, N).initialize();
666
+ const o = (((d = (l = t(this, yt)) == null ? void 0 : l.data) == null ? void 0 : d.get()) || []).length, r = t(this, N).getRowHeight(), n = o * r;
667
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((c) => {
668
+ const f = this.querySelector(c), u = f == null ? void 0 : f.querySelector("table");
669
+ u && (u.style.height = `${n}px`, u.style.minHeight = `${n}px`);
670
+ }), setTimeout(() => {
671
+ var c;
672
+ (c = this.querySelector("nine-table-hscrollbar")) == null || c.refresh();
673
+ }, 0);
657
674
  }, "generate"));
658
675
  /**
659
676
  * 🎯 마스터 테이블을 기반으로 특정 fixed 타입 영역만 남기는 분할 헬퍼
660
677
  */
661
- c(this, It, /* @__PURE__ */ a((e, s) => {
662
- const n = e.cloneNode(!0), r = n.querySelector("tbody");
678
+ h(this, It, /* @__PURE__ */ a((e, s) => {
679
+ const o = e.cloneNode(!0), r = o.querySelector("tbody");
663
680
  if (r) {
664
- const o = document.createElement("tbody");
665
- o.className = "fixed-tbody", r.className = "bindable-tbody", r.before(o);
681
+ const n = document.createElement("tbody");
682
+ n.className = "fixed-tbody", r.className = "bindable-tbody", r.before(n);
666
683
  }
667
- return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
668
- o.getAttribute("fixed") !== "left" && o.remove();
669
- }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
670
- o.getAttribute("fixed") !== "right" && o.remove();
671
- }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((o) => {
672
- o.remove();
673
- }), n;
684
+ return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
685
+ n.getAttribute("fixed") !== "left" && n.remove();
686
+ }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
687
+ n.getAttribute("fixed") !== "right" && n.remove();
688
+ }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((n) => {
689
+ n.remove();
690
+ }), o;
674
691
  }, "#createSplitTable"));
675
- v(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, F).getRowHeight(), "getRowHeight"));
692
+ v(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, N).getRowHeight(), "getRowHeight"));
676
693
  v(this, "scrollToX", /* @__PURE__ */ a((e) => {
677
694
  const s = this.querySelector(".ng-container-body");
678
695
  s && (s.scrollLeft = e);
@@ -681,10 +698,10 @@ const ct = class ct extends HTMLElement {
681
698
  const s = this.querySelector(".ng-container-body");
682
699
  s && (s.scrollTop = e);
683
700
  }, "scrollToY"));
684
- c(this, Wt, /* @__PURE__ */ a(() => {
701
+ h(this, Wt, /* @__PURE__ */ a(() => {
685
702
  t(this, Ot).call(this);
686
703
  }, "#init"));
687
- c(this, Ot, /* @__PURE__ */ a(() => {
704
+ h(this, Ot, /* @__PURE__ */ a(() => {
688
705
  const e = ct.SCROLLBAR_SIZE;
689
706
  this.innerHTML = `
690
707
  <style>
@@ -831,32 +848,32 @@ const ct = class ct extends HTMLElement {
831
848
  </div>
832
849
  `;
833
850
  }, "#render"));
834
- g(this, F, new Jt(this)), g(this, Mt, this.getRootNode().host);
851
+ g(this, N, new Jt(this)), g(this, yt, this.getRootNode().host);
835
852
  }
836
853
  connectedCallback() {
837
854
  t(this, Wt).call(this);
838
855
  }
839
856
  disconnectedCallback() {
840
- this.innerHTML = "", T.log("NineTableSheet destroyed.");
857
+ this.innerHTML = "", k.log("NineTableSheet destroyed.");
841
858
  }
842
859
  };
843
- Mt = new WeakMap(), st = new WeakMap(), F = new WeakMap(), _t = new WeakMap(), $t = new WeakMap(), It = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), a(ct, "NineTableSheet"), v(ct, "SCROLLBAR_SIZE", 16);
844
- let wt = ct;
845
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", wt);
846
- var zt, yt;
860
+ yt = new WeakMap(), st = new WeakMap(), N = new WeakMap(), Mt = new WeakMap(), _t = new WeakMap(), It = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), a(ct, "NineTableSheet"), v(ct, "SCROLLBAR_SIZE", 16);
861
+ let St = ct;
862
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", St);
863
+ var zt, pt;
847
864
  const he = class he extends HTMLElement {
848
865
  constructor() {
849
866
  super();
850
- c(this, zt, /* @__PURE__ */ a(() => {
867
+ h(this, zt, /* @__PURE__ */ a(() => {
851
868
  var e;
852
869
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
853
- var o;
854
- const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
855
- t(this, yt).call(this, r, n);
856
- }), t(this, yt).call(this, 0, !1);
870
+ var n;
871
+ const o = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((n = s.target.closest(".nine-tab-item")) == null ? void 0 : n.dataset.index, 10);
872
+ t(this, pt).call(this, r, o);
873
+ }), t(this, pt).call(this, 0, !1);
857
874
  }, "#init"));
858
- c(this, yt, /* @__PURE__ */ a((e, s = !1) => {
859
- const n = /* @__PURE__ */ a(() => {
875
+ h(this, pt, /* @__PURE__ */ a((e, s = !1) => {
876
+ const o = /* @__PURE__ */ a(() => {
860
877
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
861
878
  Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
862
879
  const b = f.filter((y) => y.classList.contains("active"));
@@ -864,7 +881,7 @@ const he = class he extends HTMLElement {
864
881
  const m = parseInt(y.getAttribute("data-index"), 10), R = this.querySelector(`nine-splitter[data-split-index="${m}"]`), J = f[m + 1];
865
882
  R && J && J.classList.contains("active") && R.style.setProperty("display", "flex");
866
883
  });
867
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), d = o.querySelectorAll("nine-table-sheet");
884
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), d = n.querySelectorAll("nine-table-sheet");
868
885
  if (!l[e]) return;
869
886
  if (!s)
870
887
  l.forEach((f, u) => {
@@ -878,44 +895,44 @@ const he = class he extends HTMLElement {
878
895
  if (f.classList.contains("active") && u.length <= 1)
879
896
  return;
880
897
  f.classList.toggle("active");
881
- const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
898
+ const b = n.querySelector(`nine-table-sheet[data-index="${e}"]`);
882
899
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
883
900
  }
884
- const h = o.querySelectorAll("nine-table-sheet.active");
885
- h == null || h.forEach((f) => {
886
- f.style.flex = h.length > 1 ? "1 1 0%" : "1 1 100%";
887
- }), n();
901
+ const c = n.querySelectorAll("nine-table-sheet.active");
902
+ c == null || c.forEach((f) => {
903
+ f.style.flex = c.length > 1 ? "1 1 0%" : "1 1 100%";
904
+ }), o();
888
905
  }, "#switchSheet"));
889
906
  }
890
907
  connectedCallback() {
891
908
  t(this, zt).call(this);
892
909
  }
893
910
  };
894
- zt = new WeakMap(), yt = new WeakMap(), a(he, "NineTableSheets");
911
+ zt = new WeakMap(), pt = new WeakMap(), a(he, "NineTableSheets");
895
912
  let Qt = he;
896
913
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Qt);
897
- var q, Bt, pt, Dt;
914
+ var q, Dt, mt, Bt;
898
915
  const de = class de {
899
916
  constructor(i) {
900
- c(this, q);
901
- c(this, Bt, /* @__PURE__ */ a(() => {
902
- t(this, Dt).call(this), new ResizeObserver((i) => {
917
+ h(this, q);
918
+ h(this, Dt, /* @__PURE__ */ a(() => {
919
+ t(this, Bt).call(this), new ResizeObserver((i) => {
903
920
  for (let e of i)
904
- t(this, q).getAttribute("auto-height") === "true" && t(this, pt).call(this);
921
+ t(this, q).getAttribute("auto-height") === "true" && t(this, mt).call(this);
905
922
  }).observe(t(this, q));
906
923
  }, "#init"));
907
- c(this, pt, /* @__PURE__ */ a(() => {
908
- var d, h;
924
+ h(this, mt, /* @__PURE__ */ a(() => {
925
+ var d, c;
909
926
  const i = Array.from(t(this, q).shadowRoot.querySelectorAll("nine-table-sheet.active"));
910
927
  if (i.length === 0) return;
911
- const e = parseInt(t(this, q).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), n = (d = t(this, q).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (h = t(this, q).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : h.getBoundingClientRect().height, o = wt.SCROLLBAR_SIZE, l = e * s + n + r + o;
928
+ const e = parseInt(t(this, q).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), o = (d = t(this, q).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (c = t(this, q).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : c.getBoundingClientRect().height, n = St.SCROLLBAR_SIZE, l = e * s + o + r + n;
912
929
  t(this, q).style.height = `${l}px`;
913
930
  }, "#applyAutoHeight"));
914
- c(this, Dt, /* @__PURE__ */ a(() => {
915
- const e = Array.from(t(this, q).children).filter((d) => d.tagName === "TABLE"), s = t(this, q).getAttribute("auto-height") === "true", n = e.length, r = e.map((d, h) => {
916
- const u = `<nine-table-sheet class="${h === 0 ? "active" : ""}" data-index="${h}"></nine-table-sheet>`, b = h < n - 1 ? `<nine-splitter class="h" data-split-index="${h}"></nine-splitter>` : "";
931
+ h(this, Bt, /* @__PURE__ */ a(() => {
932
+ const e = Array.from(t(this, q).children).filter((d) => d.tagName === "TABLE"), s = t(this, q).getAttribute("auto-height") === "true", o = e.length, r = e.map((d, c) => {
933
+ const u = `<nine-table-sheet class="${c === 0 ? "active" : ""}" data-index="${c}"></nine-table-sheet>`, b = c < o - 1 ? `<nine-splitter class="h" data-split-index="${c}"></nine-splitter>` : "";
917
934
  return u + b;
918
- }).join(""), o = e.map((d, h) => `<div class="nine-tab-item ${h === 0 ? "active" : ""}" data-index="${h}">Sheet ${h + 1}</div>`).join("");
935
+ }).join(""), n = e.map((d, c) => `<div class="nine-tab-item ${c === 0 ? "active" : ""}" data-index="${c}">Sheet ${c + 1}</div>`).join("");
919
936
  t(this, q).shadowRoot.innerHTML = `
920
937
  <style>
921
938
  :host {
@@ -999,7 +1016,7 @@ const de = class de {
999
1016
  <nine-table-sheets>
1000
1017
  <nine-table-sheets-body>${r}</nine-table-sheets-body>
1001
1018
  <nine-table-sheets-footer>
1002
- <div class="nine-tab-bar">${o}</div>
1019
+ <div class="nine-tab-bar">${n}</div>
1003
1020
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1004
1021
  </nine-table-sheets-footer>
1005
1022
  </nine-table-sheets>
@@ -1008,24 +1025,24 @@ const de = class de {
1008
1025
  <nine-table-footer></nine-table-footer>
1009
1026
  `;
1010
1027
  const l = t(this, q).shadowRoot.querySelectorAll("nine-table-sheet");
1011
- l == null || l.forEach((d, h) => {
1012
- e[h] && setTimeout(() => {
1013
- d.generate(e[h]), s && t(this, pt).call(this);
1028
+ l == null || l.forEach((d, c) => {
1029
+ e[c] && setTimeout(() => {
1030
+ d.generate(e[c]), s && t(this, mt).call(this);
1014
1031
  });
1015
1032
  });
1016
1033
  }, "#render"));
1017
- g(this, q, i), t(this, Bt).call(this);
1034
+ g(this, q, i), t(this, Dt).call(this);
1018
1035
  }
1019
1036
  };
1020
- q = new WeakMap(), Bt = new WeakMap(), pt = new WeakMap(), Dt = new WeakMap(), a(de, "LayoutManager");
1037
+ q = new WeakMap(), Dt = new WeakMap(), mt = new WeakMap(), Bt = new WeakMap(), a(de, "LayoutManager");
1021
1038
  let te = de;
1022
- var mt, nt;
1039
+ var xt, nt;
1023
1040
  const fe = class fe {
1024
1041
  constructor(i) {
1025
- c(this, mt);
1026
- c(this, nt, -1);
1027
- v(this, "count", /* @__PURE__ */ a(() => t(this, mt).rawRecords.length, "count"));
1028
- g(this, mt, i);
1042
+ h(this, xt);
1043
+ h(this, nt, -1);
1044
+ v(this, "count", /* @__PURE__ */ a(() => t(this, xt).rawRecords.length, "count"));
1045
+ g(this, xt, i);
1029
1046
  }
1030
1047
  get at() {
1031
1048
  return t(this, nt);
@@ -1035,28 +1052,28 @@ const fe = class fe {
1035
1052
  });
1036
1053
  }
1037
1054
  };
1038
- mt = new WeakMap(), nt = new WeakMap(), a(fe, "ngRow");
1055
+ xt = new WeakMap(), nt = new WeakMap(), a(fe, "ngRow");
1039
1056
  let ee = fe;
1040
- var L, E, H, ot, Nt, D, Pt, K, xt, Vt, Yt, rt;
1057
+ var L, E, H, ot, Nt, P, Pt, K, vt, Vt, Yt, rt;
1041
1058
  const C = class C {
1042
1059
  constructor(i, e) {
1043
- c(this, L);
1044
- c(this, E);
1045
- c(this, H, []);
1046
- c(this, ot, []);
1047
- c(this, Nt, 0);
1048
- c(this, D, []);
1049
- c(this, Pt, /* @__PURE__ */ a(() => {
1050
- g(this, D, []);
1060
+ h(this, L);
1061
+ h(this, E);
1062
+ h(this, H, []);
1063
+ h(this, ot, []);
1064
+ h(this, Nt, 0);
1065
+ h(this, P, []);
1066
+ h(this, Pt, /* @__PURE__ */ a(() => {
1067
+ g(this, P, []);
1051
1068
  const i = t(this, L).template || [];
1052
1069
  Array.from(i).forEach((e) => {
1053
1070
  var s;
1054
- t(this, D).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1071
+ t(this, P).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1055
1072
  }), (t(this, E).rawRecords || []).forEach((e) => {
1056
- e.__ng || (e.__ng = t(this, xt).call(this)), e.__ng.height = t(this, D).slice();
1073
+ e.__ng || (e.__ng = t(this, vt).call(this)), e.__ng.height = t(this, P).slice();
1057
1074
  });
1058
1075
  }, "#initialize"));
1059
- c(this, K, /* @__PURE__ */ a(() => {
1076
+ h(this, K, /* @__PURE__ */ a(() => {
1060
1077
  t(this, L).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1061
1078
  i.invalidate();
1062
1079
  });
@@ -1067,24 +1084,24 @@ const C = class C {
1067
1084
  if (!s || s.length <= 0) return;
1068
1085
  if (i == null) return t(this, rt).call(this, s);
1069
1086
  if (i < 0 || i >= s.length) return null;
1070
- const n = typeof ((r = t(this, L).fields) == null ? void 0 : r.get) == "function" ? t(this, L).fields.get() : [];
1087
+ const o = typeof ((r = t(this, L).fields) == null ? void 0 : r.get) == "function" ? t(this, L).fields.get() : [];
1071
1088
  if (e != null) {
1072
- const o = n.indexOf(e);
1073
- return o >= 0 ? s[i].v[o] : null;
1089
+ const n = o.indexOf(e);
1090
+ return n >= 0 ? s[i].v[n] : null;
1074
1091
  }
1075
1092
  return t(this, rt).call(this, s[i]);
1076
1093
  }, "get"));
1077
1094
  v(this, "set", /* @__PURE__ */ a((i) => {
1078
1095
  this.clear(), this.add(i, !1), t(this, K).call(this);
1079
1096
  }, "set"));
1080
- c(this, xt, /* @__PURE__ */ a(() => ({
1097
+ h(this, vt, /* @__PURE__ */ a(() => ({
1081
1098
  rowState: C.ROW_STATE.EMPTY,
1082
1099
  deleted: !1,
1083
1100
  filtered: !1,
1084
- height: t(this, D).slice(),
1101
+ height: t(this, P).slice(),
1085
1102
  o: {},
1086
1103
  c: {},
1087
- _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, D).slice(), -1, {}, {}]
1104
+ _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, P).slice(), -1, {}, {}]
1088
1105
  }), "#getDefaultMeta"));
1089
1106
  v(this, "reset", /* @__PURE__ */ a(() => {
1090
1107
  g(this, H, []), g(this, ot, []), t(this, K).call(this);
@@ -1093,37 +1110,37 @@ const C = class C {
1093
1110
  var i;
1094
1111
  t(this, E).rawRecords = [], g(this, H, []), g(this, ot, []), (i = t(this, E).viewRecords) != null && i.reset && t(this, E).viewRecords.reset();
1095
1112
  }, "clear"));
1096
- c(this, Vt, /* @__PURE__ */ a((i) => {
1097
- var n;
1113
+ h(this, Vt, /* @__PURE__ */ a((i) => {
1114
+ var o;
1098
1115
  Array.isArray(i) || (i = [i]);
1099
- const e = typeof ((n = t(this, L).fields) == null ? void 0 : n.get) == "function" ? t(this, L).fields.get() : Object.keys(i[0] || {}), s = [];
1116
+ const e = typeof ((o = t(this, L).fields) == null ? void 0 : o.get) == "function" ? t(this, L).fields.get() : Object.keys(i[0] || {}), s = [];
1100
1117
  return i.forEach((r) => {
1101
- const o = { v: [] };
1118
+ const n = { v: [] };
1102
1119
  e.forEach((l) => {
1103
- o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1104
- }), s.push(o);
1120
+ n.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1121
+ }), s.push(n);
1105
1122
  }), s;
1106
1123
  }, "#json2Array"));
1107
- c(this, Yt, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1108
- e.__ng = t(this, xt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = C.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1124
+ h(this, Yt, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1125
+ e.__ng = t(this, vt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = C.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1109
1126
  }), i), "#defaultInsert"));
1110
1127
  v(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1111
1128
  i === void 0 && (i = {});
1112
1129
  const s = t(this, Vt).call(this, i);
1113
1130
  t(this, E).rawRecords = t(this, E).rawRecords.concat(t(this, Yt).call(this, s)), this.resetRecords();
1114
- const n = this.count() - 1;
1115
- return e || s.forEach((r, o) => {
1116
- const l = t(this, E).rawRecords[n - o];
1131
+ const o = this.count() - 1;
1132
+ return e || s.forEach((r, n) => {
1133
+ const l = t(this, E).rawRecords[o - n];
1117
1134
  l && (l.__ng.rowState = C.ROW_STATE.EMPTY);
1118
- }), t(this, K).call(this), n;
1135
+ }), t(this, K).call(this), o;
1119
1136
  }, "add"));
1120
1137
  v(this, "delete", /* @__PURE__ */ a((i) => {
1121
1138
  let e = [];
1122
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, E).host.row.at] : e = [parseInt(i, 10)], e.sort((s, n) => n - s).forEach((s) => {
1139
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, E).host.row.at] : e = [parseInt(i, 10)], e.sort((s, o) => o - s).forEach((s) => {
1123
1140
  if (t(this, H)[s]) {
1124
- const n = t(this, H)[s].__ng.rowid;
1125
- t(this, H)[s].__ng.rowState === C.ROW_STATE.INSERT ? t(this, E).rawRecords = t(this, E).rawRecords.filter((r) => r.__ng.rowid !== n) : t(this, E).rawRecords.forEach((r) => {
1126
- r.__ng.rowid === n && (r.__ng.deleted = !0, r.__ng.rowState = C.ROW_STATE.DELETE);
1141
+ const o = t(this, H)[s].__ng.rowid;
1142
+ t(this, H)[s].__ng.rowState === C.ROW_STATE.INSERT ? t(this, E).rawRecords = t(this, E).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, E).rawRecords.forEach((r) => {
1143
+ r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = C.ROW_STATE.DELETE);
1127
1144
  });
1128
1145
  }
1129
1146
  }), this.resetRecords(), t(this, K).call(this);
@@ -1133,10 +1150,10 @@ const C = class C {
1133
1150
  i = parseInt(i, 10);
1134
1151
  const r = (typeof ((d = t(this, L).fields) == null ? void 0 : d.get) == "function" ? t(this, L).fields.get() : []).indexOf(e);
1135
1152
  if (r < 0) return;
1136
- const o = this.getValidData()[i];
1137
- if (!o) return;
1138
- const l = o.v[r];
1139
- l !== s && o.__ng.rowState !== C.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = C.ROW_STATE.UPDATE), o.v[r] = s;
1153
+ const n = this.getValidData()[i];
1154
+ if (!n) return;
1155
+ const l = n.v[r];
1156
+ l !== s && n.__ng.rowState !== C.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = l), n.__ng.rowState = C.ROW_STATE.UPDATE), n.v[r] = s;
1140
1157
  }, "setValue"));
1141
1158
  v(this, "resetRecords", /* @__PURE__ */ a(() => {
1142
1159
  g(this, ot, t(this, E).rawRecords.filter((i) => !i.__ng.deleted)), g(this, H, t(this, E).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, E).rawRecords.forEach((i, e) => {
@@ -1146,13 +1163,13 @@ const C = class C {
1146
1163
  });
1147
1164
  }, "resetRecords"));
1148
1165
  v(this, "getValidData", /* @__PURE__ */ a(() => (t(this, H).length === 0 && t(this, E).rawRecords.length > 0 && this.resetRecords(), t(this, H)), "getValidData"));
1149
- c(this, rt, /* @__PURE__ */ a((i) => {
1150
- var o;
1166
+ h(this, rt, /* @__PURE__ */ a((i) => {
1167
+ var n;
1151
1168
  if (!i) return i;
1152
- const e = !Array.isArray(i), s = e ? [i] : i, n = typeof ((o = t(this, L).fields) == null ? void 0 : o.get) == "function" ? t(this, L).fields.get() : [], r = s.filter((l) => !l.__ng.deleted).map((l) => {
1169
+ const e = !Array.isArray(i), s = e ? [i] : i, o = typeof ((n = t(this, L).fields) == null ? void 0 : n.get) == "function" ? t(this, L).fields.get() : [], r = s.filter((l) => !l.__ng.deleted).map((l) => {
1153
1170
  const d = {};
1154
- return n.forEach((h, f) => {
1155
- d[h] = l.v ? l.v[f] : l[h];
1171
+ return o.forEach((c, f) => {
1172
+ d[c] = l.v ? l.v[f] : l[c];
1156
1173
  }), d.__ng = l.__ng, d;
1157
1174
  });
1158
1175
  return e ? r[0] : r;
@@ -1176,7 +1193,7 @@ const C = class C {
1176
1193
  return this.length;
1177
1194
  }
1178
1195
  };
1179
- L = new WeakMap(), E = new WeakMap(), H = new WeakMap(), ot = new WeakMap(), Nt = new WeakMap(), D = new WeakMap(), Pt = new WeakMap(), K = new WeakMap(), xt = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), rt = new WeakMap(), a(C, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1196
+ L = new WeakMap(), E = new WeakMap(), H = new WeakMap(), ot = new WeakMap(), Nt = new WeakMap(), P = new WeakMap(), Pt = new WeakMap(), K = new WeakMap(), vt = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), rt = new WeakMap(), a(C, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1180
1197
  v(C, "ROW_STATE", {
1181
1198
  EMPTY: "EMPTY",
1182
1199
  NORMAL: "NORMAL",
@@ -1188,73 +1205,73 @@ let ie = C;
1188
1205
  var Z;
1189
1206
  const ue = class ue {
1190
1207
  constructor(i) {
1191
- c(this, Z);
1208
+ h(this, Z);
1192
1209
  g(this, Z, i), this.row = new ee(this), this.data = new ie(t(this, Z), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1193
1210
  var e;
1194
1211
  (e = t(this, Z).view) != null && e.redraw && t(this, Z).view.redraw();
1195
1212
  }, this.setDataSource = (e) => {
1196
1213
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1197
1214
  }, this.getRowState = (e) => {
1198
- var n, r;
1215
+ var o, r;
1199
1216
  const s = parseInt(e, 10);
1200
1217
  if (!(s >= this.data.count()))
1201
- return (r = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : r.rowState;
1218
+ return (r = (o = this.data.getValidData()[s]) == null ? void 0 : o.__ng) == null ? void 0 : r.rowState;
1202
1219
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1203
1220
  this.row.at = e;
1204
- }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, n) => {
1205
- e = parseInt(e, 10), this.data.setValue(e, s, n);
1221
+ }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, o) => {
1222
+ e = parseInt(e, 10), this.data.setValue(e, s, o);
1206
1223
  }, this.setDataSource([]);
1207
1224
  }
1208
1225
  };
1209
1226
  Z = new WeakMap(), a(ue, "ngDataManager");
1210
1227
  let se = ue;
1211
- var lt, A, vt, Xt;
1228
+ var lt, A, wt, Xt;
1212
1229
  const ge = class ge {
1213
1230
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1214
1231
  constructor(i) {
1215
- c(this, lt);
1216
- c(this, A, []);
1232
+ h(this, lt);
1233
+ h(this, A, []);
1217
1234
  v(this, "add", /* @__PURE__ */ a((i, e = "string") => {
1218
1235
  i.forEach((s) => {
1219
- t(this, A).some((n) => n.name === s) || t(this, A).push({ name: s, type: e });
1220
- }), t(this, vt).call(this);
1236
+ t(this, A).some((o) => o.name === s) || t(this, A).push({ name: s, type: e });
1237
+ }), t(this, wt).call(this);
1221
1238
  }, "add"));
1222
- c(this, vt, /* @__PURE__ */ a(() => {
1239
+ h(this, wt, /* @__PURE__ */ a(() => {
1223
1240
  const i = /* @__PURE__ */ new Map();
1224
1241
  t(this, A).forEach((e) => {
1225
1242
  i.set(e.name, e.type);
1226
1243
  }), g(this, A, Array.from(i, ([e, s]) => ({ name: e, type: s }))), g(this, A, t(this, A).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, A).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1227
1244
  }, "#adjust"));
1228
- c(this, Xt, /* @__PURE__ */ a(() => {
1229
- g(this, A, []), T.log(t(this, lt).querySelectorAll("table"));
1245
+ h(this, Xt, /* @__PURE__ */ a(() => {
1246
+ g(this, A, []), k.log(t(this, lt).querySelectorAll("table"));
1230
1247
  const i = Array.from(t(this, lt).querySelectorAll("table"));
1231
1248
  if (!(!i || i.length === 0)) {
1232
1249
  for (const e of i)
1233
- T.log(e), $("[data-bind]", e).each((s, n) => {
1234
- const r = n.dataset.bind, o = n.getAttribute("data-type") || "string";
1235
- r && t(this, A).push({ name: r, type: o });
1250
+ k.log(e), $("[data-bind]", e).each((s, o) => {
1251
+ const r = o.dataset.bind, n = o.getAttribute("data-type") || "string";
1252
+ r && t(this, A).push({ name: r, type: n });
1236
1253
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1237
- $(`[${s}]`, e).each((n, r) => {
1238
- var o = r.getAttribute(s);
1239
- if (o.indexOf("data.") < 0) {
1240
- const l = o.search(/[(]/g);
1254
+ $(`[${s}]`, e).each((o, r) => {
1255
+ var n = r.getAttribute(s);
1256
+ if (n.indexOf("data.") < 0) {
1257
+ const l = n.search(/[(]/g);
1241
1258
  if (l > 0)
1242
1259
  try {
1243
- o = String(window[o.substring(0, l).trim()]);
1260
+ n = String(window[n.substring(0, l).trim()]);
1244
1261
  } catch {
1245
- o = "";
1262
+ n = "";
1246
1263
  }
1247
1264
  }
1248
- o.split("data.").forEach((l) => {
1265
+ n.split("data.").forEach((l) => {
1249
1266
  if (l.trim() != "") {
1250
1267
  const d = l.search(/[^_A-Za-z0-9]/g);
1251
- let h = "";
1252
- d >= 0 ? h = l.substring(0, d) : o.startsWith("data.") && (h = l.replace("data.", "")), h && t(this, A).push({ name: h, type: "string" });
1268
+ let c = "";
1269
+ d >= 0 ? c = l.substring(0, d) : n.startsWith("data.") && (c = l.replace("data.", "")), c && t(this, A).push({ name: c, type: "string" });
1253
1270
  }
1254
1271
  });
1255
1272
  });
1256
1273
  });
1257
- t(this, vt).call(this);
1274
+ t(this, wt).call(this);
1258
1275
  }
1259
1276
  }, "#init"));
1260
1277
  g(this, lt, i), t(this, Xt).call(this);
@@ -1279,25 +1296,25 @@ const ge = class ge {
1279
1296
  return t(this, A).some((e) => e.name === i);
1280
1297
  }
1281
1298
  };
1282
- lt = new WeakMap(), A = new WeakMap(), vt = new WeakMap(), Xt = new WeakMap(), a(ge, "ngFields");
1299
+ lt = new WeakMap(), A = new WeakMap(), wt = new WeakMap(), Xt = new WeakMap(), a(ge, "ngFields");
1283
1300
  let ne = ge;
1284
- var G, Ut, jt;
1301
+ var G, Ut, Ft;
1285
1302
  const be = class be extends HTMLElement {
1286
1303
  constructor() {
1287
1304
  super();
1288
1305
  //#created = false;
1289
- c(this, G);
1290
- c(this, Ut);
1291
- c(this, jt, /* @__PURE__ */ a(() => {
1292
- this.fields = new ne(this), g(this, Ut, new te(this)), T.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1306
+ h(this, G);
1307
+ h(this, Ut);
1308
+ h(this, Ft, /* @__PURE__ */ a(() => {
1309
+ this.fields = new ne(this), g(this, Ut, new te(this)), k.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1293
1310
  }, "#init"));
1294
1311
  this.attachShadow({ mode: "open" }), g(this, G, new se(this));
1295
1312
  }
1296
1313
  connectedCallback() {
1297
- t(this, jt).call(this);
1314
+ t(this, Ft).call(this);
1298
1315
  }
1299
1316
  disconnectedCallback() {
1300
- T.log("NineTable disconnected.");
1317
+ k.log("NineTable disconnected.");
1301
1318
  }
1302
1319
  // 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
1303
1320
  get data() {
@@ -1312,7 +1329,7 @@ const be = class be extends HTMLElement {
1312
1329
  return t(this, G);
1313
1330
  }
1314
1331
  };
1315
- G = new WeakMap(), Ut = new WeakMap(), jt = new WeakMap(), a(be, "NineTable");
1332
+ G = new WeakMap(), Ut = new WeakMap(), Ft = new WeakMap(), a(be, "NineTable");
1316
1333
  let oe = be;
1317
1334
  customElements.get("nine-table") || customElements.define("nine-table", oe);
1318
1335
  //# sourceMappingURL=nine-table.js.map