@ninebone/table 0.0.414 β†’ 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);
@@ -23,91 +23,91 @@ const re = class re extends Se.constructor {
23
23
  a(re, "Trace");
24
24
  let jt = re;
25
25
  const k = new jt();
26
- var _, O, p, P, V, Y, St, X, Et;
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, P);
34
- c(this, V);
35
- c(this, Y);
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, Y, new ResizeObserver(() => {
39
+ e && (g(this, X, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, Y).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;
60
+ b > 0 && (y = parseInt(u / b * (c - f), 10)), y < 0 && (y = 0);
61
+ const m = c - f;
62
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, X, /* @__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, P)), clearInterval(t(this, V));
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, X).call(this, r + n), g(this, P, setInterval(() => {
81
- clearInterval(t(this, P)), g(this, V, setInterval(() => {
82
- const o = parseInt(t(this, p).thumb.style.left || 0, 10);
83
- t(this, X).call(this, o + n) || clearInterval(t(this, V));
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, P)), clearInterval(t(this, V));
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, X).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, X).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, Y) && t(this, Y).disconnect();
198
+ t(this, X) && t(this, X).disconnect();
199
199
  }
200
200
  };
201
- _ = new WeakMap(), O = new WeakMap(), p = new WeakMap(), P = new WeakMap(), V = new WeakMap(), Y = new WeakMap(), St = new WeakMap(), X = 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 U, 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, U);
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
218
  k.log("refresh", t(this, z)), k.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, U).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;
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`, 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;
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, U).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, U, 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, U).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
- U = 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,121 +369,121 @@ 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, T, D, F, B, et, Tt, qt, kt, 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, T, null);
438
- c(this, D, null);
439
- c(this, F, 0);
440
- c(this, B, 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, T, 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, kt).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, qt, /* @__PURE__ */ a((i, e) => {
473
+ h(this, kt, /* @__PURE__ */ a((i, e) => {
474
474
  const s = t(this, W).get(e);
475
475
  if (!s || s.length === 0) return;
476
- const n = i.querySelector("tbody.bindable-tbody");
477
- if (!n) return;
478
- n.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
479
- const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
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
480
  for (let l = 0; l < t(this, B); l++)
481
481
  s.forEach((d) => {
482
- o.appendChild(d.cloneNode(!0));
482
+ n.appendChild(d.cloneNode(!0));
483
483
  });
484
- r ? r.before(o) : n.appendChild(o);
484
+ r ? r.before(n) : o.appendChild(n);
485
485
  }, "#renderRows"));
486
- c(this, kt, /* @__PURE__ */ a((i) => {
486
+ h(this, Lt, /* @__PURE__ */ a((i) => {
487
487
  if (t(this, T) !== null && t(this, T) > 0)
488
488
  return t(this, T);
489
489
  const e = t(this, W).get(".ng-container-body");
@@ -491,78 +491,78 @@ const ce = class ce {
491
491
  const s = i.querySelector("tbody.bindable-tbody") || i.querySelector("tbody.bindable-tbody:last-of-type");
492
492
  if (!s) return 24;
493
493
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
494
- const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
494
+ const o = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
495
495
  e.forEach((b) => {
496
496
  r.appendChild(b.cloneNode(!0));
497
- }), n ? n.before(r) : s.appendChild(r);
498
- const o = t(this, w), l = o.style.display, d = o.style.visibility, h = o.style.position;
499
- (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");
500
500
  let f = 0;
501
501
  const u = s.querySelectorAll("tr:not(.nodata)");
502
502
  return u.forEach((b) => {
503
503
  f += b.offsetHeight || b.getBoundingClientRect().height;
504
- }), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = d, o.style.position = h, g(this, T, f > 0 ? f : 24), t(this, ut).call(this), t(this, T);
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);
505
505
  }, "#measureAndCacheHeight"));
506
- c(this, ft, /* @__PURE__ */ a(() => {
506
+ h(this, ft, /* @__PURE__ */ a(() => {
507
507
  if (!t(this, w).querySelector(".ng-container-body")) return;
508
- const s = (t(this, I).data.get() || []).length, n = t(this, T) || 24, r = s * n;
509
- k.log(`[VirtualHeight] totalCount: ${s}, rowHeight: ${n}, totalVirtualHeight: ${r}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
510
- 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");
511
511
  d && (d.style.height = `${r}px`);
512
512
  });
513
513
  }, "#updateVirtualScrollHeight"));
514
- c(this, ut, /* @__PURE__ */ a(() => {
515
- if ((t(this, I).data.get() || []).length, t(this, F) > 0 && t(this, T) > 0) {
516
- const e = Math.ceil(t(this, F) / t(this, T));
517
- g(this, B, e + t(this, Tt)), k.log("visibleRows:", e, "cachedRowCount:", t(this, B));
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));
518
518
  }
519
519
  }, "#updateRowCount"));
520
- c(this, Lt, /* @__PURE__ */ a(() => {
521
- var d, h, f;
520
+ h(this, Ht, /* @__PURE__ */ a(() => {
521
+ var d, c, f;
522
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");
523
523
  if (!e) return;
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);
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);
525
525
  for (let u = 0; u < l; u++) {
526
526
  const b = [
527
- ((d = n[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
528
- ((h = r[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
529
- ((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
530
530
  ], y = Math.max(...b);
531
- 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`));
532
532
  }
533
533
  }, "#syncRowHeights"));
534
- c(this, Ht, /* @__PURE__ */ a(() => {
534
+ h(this, Ct, /* @__PURE__ */ a(() => {
535
535
  !t(this, w) || !(t(this, w) instanceof HTMLElement) || (g(this, D, new ResizeObserver((i) => {
536
536
  for (const e of i) {
537
537
  const s = e.target;
538
538
  if (!s.classList.contains("active")) continue;
539
- const n = e.contentRect.height;
540
- if (n > 0) {
539
+ const o = e.contentRect.height;
540
+ if (o > 0) {
541
541
  let r = 0;
542
- const o = s.querySelector("thead");
543
- o && (r += o.offsetHeight || o.getBoundingClientRect().height);
544
- const l = Math.max(n - r, 100);
545
- t(this, F) !== l && (g(this, F, l), t(this, ut).call(this), t(this, T) !== 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));
546
546
  }
547
547
  }
548
548
  })), t(this, D).observe(t(this, w)));
549
549
  }, "#initResizeObserver"));
550
- c(this, gt, /* @__PURE__ */ a(() => {
550
+ h(this, gt, /* @__PURE__ */ a(() => {
551
551
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
552
552
  const e = t(this, w).querySelector(i);
553
- e && e.querySelector("tbody.bindable-tbody") && t(this, qt).call(this, e, i);
554
- }), t(this, Lt).call(this);
553
+ e && e.querySelector("tbody.bindable-tbody") && t(this, kt).call(this, e, i);
554
+ }), t(this, Ht).call(this);
555
555
  }, "#renderAllContainers"));
556
- c(this, Ct, /* @__PURE__ */ a((i) => {
556
+ h(this, $t, /* @__PURE__ */ a((i) => {
557
557
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
558
- var h;
558
+ var c;
559
559
  const s = t(this, w).querySelector(e);
560
560
  if (!s) return;
561
- const n = s.querySelector("tbody.bindable-tbody");
562
- if (!n) return;
563
- 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;
564
564
  r.forEach((f, u) => {
565
- const b = i + Math.floor(u / o);
565
+ const b = i + Math.floor(u / n);
566
566
  if (b >= d) {
567
567
  f.style.display = "none";
568
568
  return;
@@ -572,19 +572,19 @@ const ce = class ce {
572
572
  });
573
573
  });
574
574
  }, "#adjustBufferRows"));
575
- c(this, it, /* @__PURE__ */ a((i) => {
575
+ h(this, it, /* @__PURE__ */ a((i) => {
576
576
  var d;
577
577
  const e = t(this, T);
578
578
  if (!e || e <= 0) return;
579
- 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, B);
580
- k.log(`[Scroll] scrollTop: ${i}, startIndex: ${r}, cachedRowCount: ${t(this, B)}, targetDataIndex range: ${r} ~ ${l} (Total: ${n})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((h) => {
581
- 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);
582
582
  if (!f) return;
583
583
  const u = f.querySelector("tbody.bindable-tbody");
584
584
  if (!u) return;
585
585
  Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((y, m) => {
586
- const R = r + Math.floor(m / o);
587
- if (R >= n) {
586
+ const R = r + Math.floor(m / n);
587
+ if (R >= o) {
588
588
  y.style.display = "none";
589
589
  return;
590
590
  }
@@ -592,19 +592,19 @@ const ce = class ce {
592
592
  y.style.display = "", t(this, bt).call(this, y, J, R);
593
593
  });
594
594
  }), t(this, et) || (g(this, et, !0), setTimeout(() => {
595
- t(this, Ct).call(this, r), g(this, et, !1);
595
+ t(this, $t).call(this, r), g(this, et, !1);
596
596
  }, 0));
597
597
  }, "#handleScroll"));
598
- c(this, bt, /* @__PURE__ */ a((i, e, s) => {
599
- i.dataset.row = s, Array.from(i.cells).forEach((n, r) => {
600
- const o = n.dataset.bind;
601
- 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;
602
602
  });
603
603
  }, "#bindRowData"));
604
604
  v(this, "destroy", /* @__PURE__ */ a(() => {
605
605
  t(this, D) && (t(this, D).disconnect(), g(this, D, null));
606
606
  }, "destroy"));
607
- 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);
608
608
  }
609
609
  getRowHeight() {
610
610
  return t(this, T);
@@ -614,75 +614,82 @@ const ce = class ce {
614
614
  return ((e = t(this, W).get(i)) == null ? void 0 : e.length) || 1;
615
615
  }
616
616
  };
617
- I = new WeakMap(), w = new WeakMap(), W = new WeakMap(), T = new WeakMap(), D = new WeakMap(), F = new WeakMap(), B = new WeakMap(), et = new WeakMap(), Tt = new WeakMap(), qt = new WeakMap(), kt = 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");
618
618
  let Jt = ce;
619
- var Mt, st, j, _t, $t, It, Wt, Ot;
619
+ var yt, st, N, Mt, _t, It, Wt, Ot;
620
620
  const ct = class ct extends HTMLElement {
621
621
  constructor() {
622
622
  super();
623
- c(this, Mt);
624
- c(this, st, null);
625
- c(this, j);
623
+ h(this, yt);
624
+ h(this, st, null);
625
+ h(this, N);
626
626
  /**
627
627
  * data.set, add, delete
628
628
  * filter, sorting : κ³ λ €λŒ€μƒ
629
629
  */
630
630
  v(this, "invalidate", /* @__PURE__ */ a(() => {
631
- t(this, j).refresh();
631
+ t(this, N).refresh();
632
632
  }, "invalidate"));
633
- c(this, _t, /* @__PURE__ */ a(() => {
633
+ h(this, Mt, /* @__PURE__ */ a(() => {
634
634
  [
635
635
  { selector: ".ng-container-body", type: null },
636
636
  { selector: ".ng-container-left", type: "left" },
637
637
  { selector: ".ng-container-right", type: "right" }
638
- ].forEach(({ selector: s, type: n }) => {
638
+ ].forEach(({ selector: s, type: o }) => {
639
639
  const r = this.querySelector(s);
640
640
  if (!r) return;
641
- const o = t(this, It).call(this, t(this, st), n);
642
- r.innerHTML = "", r.appendChild(o);
641
+ const n = t(this, It).call(this, t(this, st), o);
642
+ r.innerHTML = "", r.appendChild(n);
643
643
  });
644
644
  }, "#renderSplitContainers"));
645
- c(this, $t, /* @__PURE__ */ a(() => {
645
+ h(this, _t, /* @__PURE__ */ a(() => {
646
646
  ["left", "right"].forEach((e) => {
647
- const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
648
- 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;
649
649
  let r = 0;
650
- n.querySelectorAll("col").forEach((o) => {
651
- const l = parseInt(o.getAttribute("width"), 10);
650
+ o.querySelectorAll("col").forEach((n) => {
651
+ const l = parseInt(n.getAttribute("width"), 10);
652
652
  isNaN(r) || (r += l);
653
653
  }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
654
654
  });
655
655
  }, "#updateContainerWidths"));
656
656
  v(this, "generate", /* @__PURE__ */ a((e) => {
657
- e && (g(this, st, Gt.compile(e)), t(this, st).style.display = "table", t(this, _t).call(this), t(this, $t).call(this), requestAnimationFrame(() => {
658
- var n;
659
- const s = (n = this.querySelector("thead")) == null ? void 0 : n.getBoundingClientRect().height;
660
- this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
661
- 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`;
662
664
  });
663
- }), t(this, j).initialize(), setTimeout(() => {
664
- var s;
665
- (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
666
- }, 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);
667
674
  }, "generate"));
668
675
  /**
669
676
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
670
677
  */
671
- c(this, It, /* @__PURE__ */ a((e, s) => {
672
- 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");
673
680
  if (r) {
674
- const o = document.createElement("tbody");
675
- 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);
676
683
  }
677
- return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
678
- o.getAttribute("fixed") !== "left" && o.remove();
679
- }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
680
- o.getAttribute("fixed") !== "right" && o.remove();
681
- }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((o) => {
682
- o.remove();
683
- }), 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;
684
691
  }, "#createSplitTable"));
685
- v(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, j).getRowHeight(), "getRowHeight"));
692
+ v(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, N).getRowHeight(), "getRowHeight"));
686
693
  v(this, "scrollToX", /* @__PURE__ */ a((e) => {
687
694
  const s = this.querySelector(".ng-container-body");
688
695
  s && (s.scrollLeft = e);
@@ -691,10 +698,10 @@ const ct = class ct extends HTMLElement {
691
698
  const s = this.querySelector(".ng-container-body");
692
699
  s && (s.scrollTop = e);
693
700
  }, "scrollToY"));
694
- c(this, Wt, /* @__PURE__ */ a(() => {
701
+ h(this, Wt, /* @__PURE__ */ a(() => {
695
702
  t(this, Ot).call(this);
696
703
  }, "#init"));
697
- c(this, Ot, /* @__PURE__ */ a(() => {
704
+ h(this, Ot, /* @__PURE__ */ a(() => {
698
705
  const e = ct.SCROLLBAR_SIZE;
699
706
  this.innerHTML = `
700
707
  <style>
@@ -841,7 +848,7 @@ const ct = class ct extends HTMLElement {
841
848
  </div>
842
849
  `;
843
850
  }, "#render"));
844
- g(this, j, new Jt(this)), g(this, Mt, this.getRootNode().host);
851
+ g(this, N, new Jt(this)), g(this, yt, this.getRootNode().host);
845
852
  }
846
853
  connectedCallback() {
847
854
  t(this, Wt).call(this);
@@ -850,23 +857,23 @@ const ct = class ct extends HTMLElement {
850
857
  this.innerHTML = "", k.log("NineTableSheet destroyed.");
851
858
  }
852
859
  };
853
- Mt = new WeakMap(), st = new WeakMap(), j = 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);
854
- let wt = ct;
855
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", wt);
856
- 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;
857
864
  const he = class he extends HTMLElement {
858
865
  constructor() {
859
866
  super();
860
- c(this, zt, /* @__PURE__ */ a(() => {
867
+ h(this, zt, /* @__PURE__ */ a(() => {
861
868
  var e;
862
869
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
863
- var o;
864
- const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
865
- t(this, yt).call(this, r, n);
866
- }), 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);
867
874
  }, "#init"));
868
- c(this, yt, /* @__PURE__ */ a((e, s = !1) => {
869
- const n = /* @__PURE__ */ a(() => {
875
+ h(this, pt, /* @__PURE__ */ a((e, s = !1) => {
876
+ const o = /* @__PURE__ */ a(() => {
870
877
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
871
878
  Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
872
879
  const b = f.filter((y) => y.classList.contains("active"));
@@ -874,7 +881,7 @@ const he = class he extends HTMLElement {
874
881
  const m = parseInt(y.getAttribute("data-index"), 10), R = this.querySelector(`nine-splitter[data-split-index="${m}"]`), J = f[m + 1];
875
882
  R && J && J.classList.contains("active") && R.style.setProperty("display", "flex");
876
883
  });
877
- }, "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");
878
885
  if (!l[e]) return;
879
886
  if (!s)
880
887
  l.forEach((f, u) => {
@@ -888,44 +895,44 @@ const he = class he extends HTMLElement {
888
895
  if (f.classList.contains("active") && u.length <= 1)
889
896
  return;
890
897
  f.classList.toggle("active");
891
- const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
898
+ const b = n.querySelector(`nine-table-sheet[data-index="${e}"]`);
892
899
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
893
900
  }
894
- const h = o.querySelectorAll("nine-table-sheet.active");
895
- h == null || h.forEach((f) => {
896
- f.style.flex = h.length > 1 ? "1 1 0%" : "1 1 100%";
897
- }), 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();
898
905
  }, "#switchSheet"));
899
906
  }
900
907
  connectedCallback() {
901
908
  t(this, zt).call(this);
902
909
  }
903
910
  };
904
- zt = new WeakMap(), yt = new WeakMap(), a(he, "NineTableSheets");
911
+ zt = new WeakMap(), pt = new WeakMap(), a(he, "NineTableSheets");
905
912
  let Qt = he;
906
913
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Qt);
907
- var q, Dt, pt, Bt;
914
+ var q, Dt, mt, Bt;
908
915
  const de = class de {
909
916
  constructor(i) {
910
- c(this, q);
911
- c(this, Dt, /* @__PURE__ */ a(() => {
917
+ h(this, q);
918
+ h(this, Dt, /* @__PURE__ */ a(() => {
912
919
  t(this, Bt).call(this), new ResizeObserver((i) => {
913
920
  for (let e of i)
914
- 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);
915
922
  }).observe(t(this, q));
916
923
  }, "#init"));
917
- c(this, pt, /* @__PURE__ */ a(() => {
918
- var d, h;
924
+ h(this, mt, /* @__PURE__ */ a(() => {
925
+ var d, c;
919
926
  const i = Array.from(t(this, q).shadowRoot.querySelectorAll("nine-table-sheet.active"));
920
927
  if (i.length === 0) return;
921
- 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;
922
929
  t(this, q).style.height = `${l}px`;
923
930
  }, "#applyAutoHeight"));
924
- c(this, Bt, /* @__PURE__ */ a(() => {
925
- 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) => {
926
- 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>` : "";
927
934
  return u + b;
928
- }).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("");
929
936
  t(this, q).shadowRoot.innerHTML = `
930
937
  <style>
931
938
  :host {
@@ -1009,7 +1016,7 @@ const de = class de {
1009
1016
  <nine-table-sheets>
1010
1017
  <nine-table-sheets-body>${r}</nine-table-sheets-body>
1011
1018
  <nine-table-sheets-footer>
1012
- <div class="nine-tab-bar">${o}</div>
1019
+ <div class="nine-tab-bar">${n}</div>
1013
1020
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1014
1021
  </nine-table-sheets-footer>
1015
1022
  </nine-table-sheets>
@@ -1018,24 +1025,24 @@ const de = class de {
1018
1025
  <nine-table-footer></nine-table-footer>
1019
1026
  `;
1020
1027
  const l = t(this, q).shadowRoot.querySelectorAll("nine-table-sheet");
1021
- l == null || l.forEach((d, h) => {
1022
- e[h] && setTimeout(() => {
1023
- 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);
1024
1031
  });
1025
1032
  });
1026
1033
  }, "#render"));
1027
1034
  g(this, q, i), t(this, Dt).call(this);
1028
1035
  }
1029
1036
  };
1030
- q = new WeakMap(), Dt = new WeakMap(), pt = new WeakMap(), Bt = new WeakMap(), a(de, "LayoutManager");
1037
+ q = new WeakMap(), Dt = new WeakMap(), mt = new WeakMap(), Bt = new WeakMap(), a(de, "LayoutManager");
1031
1038
  let te = de;
1032
- var mt, nt;
1039
+ var xt, nt;
1033
1040
  const fe = class fe {
1034
1041
  constructor(i) {
1035
- c(this, mt);
1036
- c(this, nt, -1);
1037
- v(this, "count", /* @__PURE__ */ a(() => t(this, mt).rawRecords.length, "count"));
1038
- 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);
1039
1046
  }
1040
1047
  get at() {
1041
1048
  return t(this, nt);
@@ -1045,28 +1052,28 @@ const fe = class fe {
1045
1052
  });
1046
1053
  }
1047
1054
  };
1048
- mt = new WeakMap(), nt = new WeakMap(), a(fe, "ngRow");
1055
+ xt = new WeakMap(), nt = new WeakMap(), a(fe, "ngRow");
1049
1056
  let ee = fe;
1050
- var L, E, H, ot, Nt, N, Pt, K, xt, Vt, Yt, rt;
1057
+ var L, E, H, ot, Nt, P, Pt, K, vt, Vt, Yt, rt;
1051
1058
  const C = class C {
1052
1059
  constructor(i, e) {
1053
- c(this, L);
1054
- c(this, E);
1055
- c(this, H, []);
1056
- c(this, ot, []);
1057
- c(this, Nt, 0);
1058
- c(this, N, []);
1059
- c(this, Pt, /* @__PURE__ */ a(() => {
1060
- g(this, N, []);
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, []);
1061
1068
  const i = t(this, L).template || [];
1062
1069
  Array.from(i).forEach((e) => {
1063
1070
  var s;
1064
- t(this, N).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);
1065
1072
  }), (t(this, E).rawRecords || []).forEach((e) => {
1066
- e.__ng || (e.__ng = t(this, xt).call(this)), e.__ng.height = t(this, N).slice();
1073
+ e.__ng || (e.__ng = t(this, vt).call(this)), e.__ng.height = t(this, P).slice();
1067
1074
  });
1068
1075
  }, "#initialize"));
1069
- c(this, K, /* @__PURE__ */ a(() => {
1076
+ h(this, K, /* @__PURE__ */ a(() => {
1070
1077
  t(this, L).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1071
1078
  i.invalidate();
1072
1079
  });
@@ -1077,24 +1084,24 @@ const C = class C {
1077
1084
  if (!s || s.length <= 0) return;
1078
1085
  if (i == null) return t(this, rt).call(this, s);
1079
1086
  if (i < 0 || i >= s.length) return null;
1080
- 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() : [];
1081
1088
  if (e != null) {
1082
- const o = n.indexOf(e);
1083
- return o >= 0 ? s[i].v[o] : null;
1089
+ const n = o.indexOf(e);
1090
+ return n >= 0 ? s[i].v[n] : null;
1084
1091
  }
1085
1092
  return t(this, rt).call(this, s[i]);
1086
1093
  }, "get"));
1087
1094
  v(this, "set", /* @__PURE__ */ a((i) => {
1088
1095
  this.clear(), this.add(i, !1), t(this, K).call(this);
1089
1096
  }, "set"));
1090
- c(this, xt, /* @__PURE__ */ a(() => ({
1097
+ h(this, vt, /* @__PURE__ */ a(() => ({
1091
1098
  rowState: C.ROW_STATE.EMPTY,
1092
1099
  deleted: !1,
1093
1100
  filtered: !1,
1094
- height: t(this, N).slice(),
1101
+ height: t(this, P).slice(),
1095
1102
  o: {},
1096
1103
  c: {},
1097
- _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, N).slice(), -1, {}, {}]
1104
+ _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, P).slice(), -1, {}, {}]
1098
1105
  }), "#getDefaultMeta"));
1099
1106
  v(this, "reset", /* @__PURE__ */ a(() => {
1100
1107
  g(this, H, []), g(this, ot, []), t(this, K).call(this);
@@ -1103,37 +1110,37 @@ const C = class C {
1103
1110
  var i;
1104
1111
  t(this, E).rawRecords = [], g(this, H, []), g(this, ot, []), (i = t(this, E).viewRecords) != null && i.reset && t(this, E).viewRecords.reset();
1105
1112
  }, "clear"));
1106
- c(this, Vt, /* @__PURE__ */ a((i) => {
1107
- var n;
1113
+ h(this, Vt, /* @__PURE__ */ a((i) => {
1114
+ var o;
1108
1115
  Array.isArray(i) || (i = [i]);
1109
- 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 = [];
1110
1117
  return i.forEach((r) => {
1111
- const o = { v: [] };
1118
+ const n = { v: [] };
1112
1119
  e.forEach((l) => {
1113
- o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1114
- }), s.push(o);
1120
+ n.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1121
+ }), s.push(n);
1115
1122
  }), s;
1116
1123
  }, "#json2Array"));
1117
- c(this, Yt, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1118
- 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;
1119
1126
  }), i), "#defaultInsert"));
1120
1127
  v(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1121
1128
  i === void 0 && (i = {});
1122
1129
  const s = t(this, Vt).call(this, i);
1123
1130
  t(this, E).rawRecords = t(this, E).rawRecords.concat(t(this, Yt).call(this, s)), this.resetRecords();
1124
- const n = this.count() - 1;
1125
- return e || s.forEach((r, o) => {
1126
- 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];
1127
1134
  l && (l.__ng.rowState = C.ROW_STATE.EMPTY);
1128
- }), t(this, K).call(this), n;
1135
+ }), t(this, K).call(this), o;
1129
1136
  }, "add"));
1130
1137
  v(this, "delete", /* @__PURE__ */ a((i) => {
1131
1138
  let e = [];
1132
- 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) => {
1133
1140
  if (t(this, H)[s]) {
1134
- const n = t(this, H)[s].__ng.rowid;
1135
- 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) => {
1136
- 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);
1137
1144
  });
1138
1145
  }
1139
1146
  }), this.resetRecords(), t(this, K).call(this);
@@ -1143,10 +1150,10 @@ const C = class C {
1143
1150
  i = parseInt(i, 10);
1144
1151
  const r = (typeof ((d = t(this, L).fields) == null ? void 0 : d.get) == "function" ? t(this, L).fields.get() : []).indexOf(e);
1145
1152
  if (r < 0) return;
1146
- const o = this.getValidData()[i];
1147
- if (!o) return;
1148
- const l = o.v[r];
1149
- 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;
1150
1157
  }, "setValue"));
1151
1158
  v(this, "resetRecords", /* @__PURE__ */ a(() => {
1152
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) => {
@@ -1156,13 +1163,13 @@ const C = class C {
1156
1163
  });
1157
1164
  }, "resetRecords"));
1158
1165
  v(this, "getValidData", /* @__PURE__ */ a(() => (t(this, H).length === 0 && t(this, E).rawRecords.length > 0 && this.resetRecords(), t(this, H)), "getValidData"));
1159
- c(this, rt, /* @__PURE__ */ a((i) => {
1160
- var o;
1166
+ h(this, rt, /* @__PURE__ */ a((i) => {
1167
+ var n;
1161
1168
  if (!i) return i;
1162
- 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) => {
1163
1170
  const d = {};
1164
- return n.forEach((h, f) => {
1165
- 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];
1166
1173
  }), d.__ng = l.__ng, d;
1167
1174
  });
1168
1175
  return e ? r[0] : r;
@@ -1186,7 +1193,7 @@ const C = class C {
1186
1193
  return this.length;
1187
1194
  }
1188
1195
  };
1189
- L = new WeakMap(), E = new WeakMap(), H = new WeakMap(), ot = new WeakMap(), Nt = new WeakMap(), N = 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"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1190
1197
  v(C, "ROW_STATE", {
1191
1198
  EMPTY: "EMPTY",
1192
1199
  NORMAL: "NORMAL",
@@ -1198,73 +1205,73 @@ let ie = C;
1198
1205
  var Z;
1199
1206
  const ue = class ue {
1200
1207
  constructor(i) {
1201
- c(this, Z);
1208
+ h(this, Z);
1202
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 = () => {
1203
1210
  var e;
1204
1211
  (e = t(this, Z).view) != null && e.redraw && t(this, Z).view.redraw();
1205
1212
  }, this.setDataSource = (e) => {
1206
1213
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1207
1214
  }, this.getRowState = (e) => {
1208
- var n, r;
1215
+ var o, r;
1209
1216
  const s = parseInt(e, 10);
1210
1217
  if (!(s >= this.data.count()))
1211
- 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;
1212
1219
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1213
1220
  this.row.at = e;
1214
- }, 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) => {
1215
- 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);
1216
1223
  }, this.setDataSource([]);
1217
1224
  }
1218
1225
  };
1219
1226
  Z = new WeakMap(), a(ue, "ngDataManager");
1220
1227
  let se = ue;
1221
- var lt, A, vt, Xt;
1228
+ var lt, A, wt, Xt;
1222
1229
  const ge = class ge {
1223
1230
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1224
1231
  constructor(i) {
1225
- c(this, lt);
1226
- c(this, A, []);
1232
+ h(this, lt);
1233
+ h(this, A, []);
1227
1234
  v(this, "add", /* @__PURE__ */ a((i, e = "string") => {
1228
1235
  i.forEach((s) => {
1229
- t(this, A).some((n) => n.name === s) || t(this, A).push({ name: s, type: e });
1230
- }), 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);
1231
1238
  }, "add"));
1232
- c(this, vt, /* @__PURE__ */ a(() => {
1239
+ h(this, wt, /* @__PURE__ */ a(() => {
1233
1240
  const i = /* @__PURE__ */ new Map();
1234
1241
  t(this, A).forEach((e) => {
1235
1242
  i.set(e.name, e.type);
1236
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);
1237
1244
  }, "#adjust"));
1238
- c(this, Xt, /* @__PURE__ */ a(() => {
1245
+ h(this, Xt, /* @__PURE__ */ a(() => {
1239
1246
  g(this, A, []), k.log(t(this, lt).querySelectorAll("table"));
1240
1247
  const i = Array.from(t(this, lt).querySelectorAll("table"));
1241
1248
  if (!(!i || i.length === 0)) {
1242
1249
  for (const e of i)
1243
- k.log(e), $("[data-bind]", e).each((s, n) => {
1244
- const r = n.dataset.bind, o = n.getAttribute("data-type") || "string";
1245
- 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 });
1246
1253
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1247
- $(`[${s}]`, e).each((n, r) => {
1248
- var o = r.getAttribute(s);
1249
- if (o.indexOf("data.") < 0) {
1250
- 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);
1251
1258
  if (l > 0)
1252
1259
  try {
1253
- o = String(window[o.substring(0, l).trim()]);
1260
+ n = String(window[n.substring(0, l).trim()]);
1254
1261
  } catch {
1255
- o = "";
1262
+ n = "";
1256
1263
  }
1257
1264
  }
1258
- o.split("data.").forEach((l) => {
1265
+ n.split("data.").forEach((l) => {
1259
1266
  if (l.trim() != "") {
1260
1267
  const d = l.search(/[^_A-Za-z0-9]/g);
1261
- let h = "";
1262
- 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" });
1263
1270
  }
1264
1271
  });
1265
1272
  });
1266
1273
  });
1267
- t(this, vt).call(this);
1274
+ t(this, wt).call(this);
1268
1275
  }
1269
1276
  }, "#init"));
1270
1277
  g(this, lt, i), t(this, Xt).call(this);
@@ -1289,16 +1296,16 @@ const ge = class ge {
1289
1296
  return t(this, A).some((e) => e.name === i);
1290
1297
  }
1291
1298
  };
1292
- 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");
1293
1300
  let ne = ge;
1294
1301
  var G, Ut, Ft;
1295
1302
  const be = class be extends HTMLElement {
1296
1303
  constructor() {
1297
1304
  super();
1298
1305
  //#created = false;
1299
- c(this, G);
1300
- c(this, Ut);
1301
- c(this, Ft, /* @__PURE__ */ a(() => {
1306
+ h(this, G);
1307
+ h(this, Ut);
1308
+ h(this, Ft, /* @__PURE__ */ a(() => {
1302
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 } }));
1303
1310
  }, "#init"));
1304
1311
  this.attachShadow({ mode: "open" }), g(this, G, new se(this));