@ninebone/table 0.0.312 β†’ 0.0.313

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,90 +1,90 @@
1
1
  var te = Object.defineProperty;
2
- var ee = (x) => {
3
- throw TypeError(x);
2
+ var ee = (v) => {
3
+ throw TypeError(v);
4
4
  };
5
- var ne = (x, i, e) => i in x ? te(x, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[i] = e;
6
- var a = (x, i) => te(x, "name", { value: i, configurable: !0 });
7
- var w = (x, i, e) => ne(x, typeof i != "symbol" ? i + "" : i, e), ie = (x, i, e) => i.has(x) || ee("Cannot " + e);
8
- var t = (x, i, e) => (ie(x, i, "read from private field"), e ? e.call(x) : i.get(x)), h = (x, i, e) => i.has(x) ? ee("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), b = (x, i, e, s) => (ie(x, i, "write to private field"), s ? s.call(x, e) : i.set(x, e), e);
9
- var se = (x, i, e, s) => ({
5
+ var ne = (v, i, e) => i in v ? te(v, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : v[i] = e;
6
+ var c = (v, i) => te(v, "name", { value: i, configurable: !0 });
7
+ var w = (v, i, e) => ne(v, typeof i != "symbol" ? i + "" : i, e), ie = (v, i, e) => i.has(v) || ee("Cannot " + e);
8
+ var t = (v, i, e) => (ie(v, i, "read from private field"), e ? e.call(v) : i.get(v)), h = (v, i, e) => i.has(v) ? ee("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(v) : i.set(v, e), g = (v, i, e, s) => (ie(v, i, "write to private field"), s ? s.call(v, e) : i.set(v, e), e);
9
+ var se = (v, i, e, s) => ({
10
10
  set _(n) {
11
- b(x, i, n, e);
11
+ g(v, i, n, e);
12
12
  },
13
13
  get _() {
14
- return t(x, i, s);
14
+ return t(v, i, s);
15
15
  }
16
16
  });
17
17
  import { trace as oe } from "@ninebone/util";
18
- const Yt = class Yt extends oe.constructor {
18
+ const Vt = class Vt extends oe.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- a(Yt, "Trace");
24
- let _t = Yt;
25
- const M = new _t();
26
- var C, $, p, P, B, N, dt, V, ft;
23
+ c(Vt, "Trace");
24
+ let Mt = Vt;
25
+ const tt = new Mt();
26
+ var C, M, p, D, P, B, dt, N, ft;
27
27
  const Xt = class Xt extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  h(this, C);
31
- h(this, $, !1);
31
+ h(this, M, !1);
32
32
  h(this, p);
33
+ h(this, D);
33
34
  h(this, P);
34
35
  h(this, B);
35
- h(this, N);
36
- h(this, dt, /* @__PURE__ */ a(() => {
36
+ h(this, dt, /* @__PURE__ */ c(() => {
37
37
  if (!t(this, C)) return;
38
38
  const e = t(this, C).querySelector(".ng-container-body");
39
- e && (b(this, N, new ResizeObserver(() => {
39
+ e && (g(this, B, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, N).observe(e));
41
+ })), t(this, B).observe(e));
42
42
  }, "#observeResize"));
43
- w(this, "refresh", /* @__PURE__ */ a(() => {
44
- if (!t(this, C) || !t(this, p) || t(this, $)) return;
43
+ w(this, "refresh", /* @__PURE__ */ c(() => {
44
+ if (!t(this, C) || !t(this, p) || t(this, M)) 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, o = t(this, p).thumb, r = t(this, C).querySelector(".ng-container-bottom"), l = e.clientWidth, c = s.scrollWidth;
48
- if (l !== 0 && c > l)
49
- r && (r.style.display = "flex");
47
+ const n = t(this, p).track, r = t(this, p).thumb, o = t(this, C).querySelector(".ng-container-bottom"), l = e.clientWidth, a = s.scrollWidth;
48
+ if (l !== 0 && a > l)
49
+ o && (o.style.display = "flex");
50
50
  else {
51
- r && (r.style.display = "none");
51
+ o && (o.style.display = "none");
52
52
  return;
53
53
  }
54
54
  const d = n.clientWidth;
55
55
  if (d <= 0) return;
56
- const u = Math.max(Math.min(d * (l / c), d), 20);
57
- o.style.width = `${u}px`;
58
- const f = e.scrollLeft, g = c - l;
59
- let y = 0;
60
- g > 0 && (y = parseInt(f / g * (d - u), 10)), y < 0 && (y = 0);
61
- const E = d - u;
62
- y > E && (y = E), o.style.left = `${y}px`, M.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= E - 1;
56
+ const f = Math.max(Math.min(d * (l / a), d), 20);
57
+ r.style.width = `${f}px`;
58
+ const u = e.scrollLeft, b = a - l;
59
+ let m = 0;
60
+ b > 0 && (m = parseInt(u / b * (d - f), 10)), m < 0 && (m = 0);
61
+ const E = d - f;
62
+ m > E && (m = E), r.style.left = `${m}px`, tt.log(m), t(this, p).left.disabled = m === 0, t(this, p).right.disabled = m >= E - 1;
63
63
  }, "refresh"));
64
- h(this, V, /* @__PURE__ */ a((e) => {
64
+ h(this, N, /* @__PURE__ */ c((e) => {
65
65
  if (!t(this, p)) return !1;
66
66
  const s = t(this, p).container, n = s.querySelector("table");
67
67
  if (!n) return !1;
68
- const o = t(this, p).track.getBoundingClientRect(), r = t(this, p).thumb.clientWidth;
68
+ const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
- const c = o.width - r;
72
- l > c && (l = c), 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 >= c - 1;
73
- const d = s.clientWidth, f = n.scrollWidth - d;
74
- return c > 0 && f > 0 && (s.scrollLeft = l / c * f), l > 0 && l < c - 1;
71
+ const a = r.width - o;
72
+ l > a && (l = a), 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 >= a - 1;
73
+ const d = s.clientWidth, u = n.scrollWidth - d;
74
+ return a > 0 && u > 0 && (s.scrollLeft = l / a * u), l > 0 && l < a - 1;
75
75
  }, "#thumbMoveTo"));
76
- h(this, ft, /* @__PURE__ */ a(() => {
77
- const e = /* @__PURE__ */ a((n) => {
78
- clearInterval(t(this, P)), clearInterval(t(this, B));
79
- const o = parseInt(t(this, p).thumb.style.left || 0, 10);
80
- t(this, V).call(this, o + n), b(this, P, setInterval(() => {
81
- clearInterval(t(this, P)), b(this, B, setInterval(() => {
82
- const r = parseInt(t(this, p).thumb.style.left || 0, 10);
83
- t(this, V).call(this, r + n) || clearInterval(t(this, B));
76
+ h(this, ft, /* @__PURE__ */ c(() => {
77
+ const e = /* @__PURE__ */ c((n) => {
78
+ clearInterval(t(this, D)), clearInterval(t(this, P));
79
+ const r = parseInt(t(this, p).thumb.style.left || 0, 10);
80
+ t(this, N).call(this, r + n), g(this, D, setInterval(() => {
81
+ clearInterval(t(this, D)), g(this, P, setInterval(() => {
82
+ const o = parseInt(t(this, p).thumb.style.left || 0, 10);
83
+ t(this, N).call(this, o + n) || clearInterval(t(this, P));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
- clearInterval(t(this, P)), clearInterval(t(this, B));
86
+ }, "delayScroll"), s = /* @__PURE__ */ c(() => {
87
+ clearInterval(t(this, D)), clearInterval(t(this, P));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((n) => {
90
90
  t(this, p).left.addEventListener(n, s), t(this, p).right.addEventListener(n, s), t(this, p).track.addEventListener(n, s);
@@ -95,24 +95,24 @@ const Xt = class Xt extends HTMLElement {
95
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
96
  if (n.button !== 0) return;
97
97
  n.preventDefault();
98
- const o = t(this, p).track.getBoundingClientRect(), r = t(this, p).thumb.clientWidth;
99
- t(this, V).call(this, n.clientX - o.left - r / 2);
98
+ const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
99
+ t(this, N).call(this, n.clientX - r.left - o / 2);
100
100
  }), t(this, p).thumb.addEventListener("mousedown", (n) => {
101
101
  if (n.button !== 0) return;
102
- n.stopPropagation(), n.preventDefault(), b(this, $, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
- const o = /* @__PURE__ */ a((l) => {
104
- if (!t(this, $)) return;
105
- const c = t(this, p).track.getBoundingClientRect();
106
- t(this, V).call(this, l.clientX - c.left - this.shiftX);
107
- }, "onMouseMove"), r = /* @__PURE__ */ a(() => {
108
- b(this, $, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
102
+ n.stopPropagation(), n.preventDefault(), g(this, M, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
+ const r = /* @__PURE__ */ c((l) => {
104
+ if (!t(this, M)) return;
105
+ const a = t(this, p).track.getBoundingClientRect();
106
+ t(this, N).call(this, l.clientX - a.left - this.shiftX);
107
+ }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
108
+ g(this, M, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
110
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (b(this, C, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, C)) return;
115
+ if (g(this, C, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, C)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -176,31 +176,31 @@ const Xt = class Xt extends HTMLElement {
176
176
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
- const e = /* @__PURE__ */ a(() => {
179
+ const e = /* @__PURE__ */ c(() => {
180
180
  const s = t(this, C).querySelector(".ng-container-body");
181
181
  if (!s) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- b(this, p, {
185
+ g(this, p, {
186
186
  container: s,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
189
189
  left: this.querySelector(".ng-scroll-left"),
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
- t(this, $) || this.refresh();
192
+ t(this, M) || this.refresh();
193
193
  }), t(this, ft).call(this), t(this, dt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, N) && t(this, N).disconnect();
198
+ t(this, B) && t(this, B).disconnect();
199
199
  }
200
200
  };
201
- C = new WeakMap(), $ = new WeakMap(), p = new WeakMap(), P = new WeakMap(), B = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), V = new WeakMap(), ft = new WeakMap(), a(Xt, "NineTableHScrollBar");
202
- let $t = Xt;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", $t);
201
+ C = new WeakMap(), M = new WeakMap(), p = new WeakMap(), D = new WeakMap(), P = new WeakMap(), B = new WeakMap(), dt = new WeakMap(), N = new WeakMap(), ft = new WeakMap(), c(Xt, "NineTableHScrollBar");
202
+ let It = Xt;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", It);
204
204
  var Y, I, S, it, st, ut;
205
205
  const Ut = class Ut extends HTMLElement {
206
206
  constructor() {
@@ -213,53 +213,53 @@ const Ut = class Ut extends HTMLElement {
213
213
  /**
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
- w(this, "refresh", /* @__PURE__ */ a(() => {
216
+ w(this, "refresh", /* @__PURE__ */ c(() => {
217
217
  if (!t(this, Y) || !t(this, S) || t(this, I)) return;
218
218
  const e = t(this, S).container, s = e.querySelector("table");
219
219
  if (!s) return;
220
- const n = t(this, S).track, o = t(this, S).thumb, r = e.clientHeight, l = s.scrollHeight;
221
- if (l <= r) {
222
- o.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
220
+ const n = t(this, S).track, r = t(this, S).thumb, o = e.clientHeight, l = s.scrollHeight;
221
+ if (l <= o) {
222
+ r.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
223
223
  return;
224
224
  } else
225
- o.style.display = "block";
226
- const c = n.clientHeight;
227
- if (c <= 0) return;
228
- const d = Math.max(Math.min(c * (r / l), c), 20);
229
- o.style.height = `${d}px`;
230
- const u = e.scrollTop, f = l - r;
231
- let g = 0;
232
- f > 0 && (g = u / f * (c - d));
233
- const y = c - d;
234
- g < 0 && (g = 0), g > y && (g = y), o.style.top = `${g}px`, t(this, S).top.disabled = u <= 0, t(this, S).bottom.disabled = u >= f - 1;
225
+ r.style.display = "block";
226
+ const a = n.clientHeight;
227
+ if (a <= 0) return;
228
+ const d = Math.max(Math.min(a * (o / l), a), 20);
229
+ r.style.height = `${d}px`;
230
+ const f = e.scrollTop, u = l - o;
231
+ let b = 0;
232
+ u > 0 && (b = f / u * (a - d));
233
+ const m = a - d;
234
+ b < 0 && (b = 0), b > m && (b = m), r.style.top = `${b}px`, t(this, S).top.disabled = f <= 0, t(this, S).bottom.disabled = f >= u - 1;
235
235
  }, "refresh"));
236
- h(this, ut, /* @__PURE__ */ a(() => {
236
+ h(this, ut, /* @__PURE__ */ c(() => {
237
237
  const e = t(this, S).container;
238
238
  e.addEventListener("scroll", () => {
239
239
  t(this, I) || this.refresh();
240
240
  }), t(this, S).thumb.addEventListener("mousedown", (s) => {
241
241
  if (s.button !== 0) return;
242
- s.stopPropagation(), s.preventDefault(), b(this, I, !0), b(this, it, s.clientY), b(this, st, e.scrollTop);
243
- const n = /* @__PURE__ */ a((r) => {
242
+ s.stopPropagation(), s.preventDefault(), g(this, I, !0), g(this, it, s.clientY), g(this, st, e.scrollTop);
243
+ const n = /* @__PURE__ */ c((o) => {
244
244
  if (!t(this, I)) return;
245
- const l = t(this, S).track.getBoundingClientRect(), c = t(this, S).thumb.clientHeight, u = l.height - c, f = r.clientY - t(this, it), g = e.clientHeight, y = e.querySelector("table");
246
- M.log(y), M.log(y.scrollHeight);
247
- const k = y.scrollHeight - g;
248
- if (u > 0 && k > 0) {
249
- const D = f / u * k;
250
- e.scrollTop = t(this, st) + D;
245
+ const l = t(this, S).track.getBoundingClientRect(), a = t(this, S).thumb.clientHeight, f = l.height - a, u = o.clientY - t(this, it), b = e.clientHeight, m = e.querySelector("table");
246
+ tt.log(m), tt.log(m.scrollHeight);
247
+ const T = m.scrollHeight - b;
248
+ if (f > 0 && T > 0) {
249
+ const z = u / f * T;
250
+ e.scrollTop = t(this, st) + z;
251
251
  }
252
252
  this.refresh();
253
- }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
254
- b(this, I, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
253
+ }, "onMouseMove"), r = /* @__PURE__ */ c(() => {
254
+ g(this, I, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), this.refresh();
255
255
  }, "onMouseUp");
256
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
256
+ document.addEventListener("mousemove", n), document.addEventListener("mouseup", r);
257
257
  }), t(this, S).track.addEventListener("mousedown", (s) => {
258
258
  if (s.button !== 0 || s.target === t(this, S).thumb) return;
259
- const n = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientHeight, r = s.clientY - n.top - o / 2, c = n.height - o, d = e.clientHeight, f = e.querySelector("table").scrollHeight - d;
260
- if (c > 0 && f > 0) {
261
- const g = Math.max(0, Math.min(1, r / c));
262
- e.scrollTop = g * f;
259
+ const n = t(this, S).track.getBoundingClientRect(), r = t(this, S).thumb.clientHeight, o = s.clientY - n.top - r / 2, a = n.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
260
+ if (a > 0 && u > 0) {
261
+ const b = Math.max(0, Math.min(1, o / a));
262
+ e.scrollTop = b * u;
263
263
  }
264
264
  this.refresh();
265
265
  }), t(this, S).top.addEventListener("click", () => {
@@ -270,7 +270,7 @@ const Ut = class Ut extends HTMLElement {
270
270
  }, "#init"));
271
271
  }
272
272
  connectedCallback() {
273
- if (b(this, Y, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, Y)) return;
273
+ if (g(this, Y, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, Y)) return;
274
274
  this.innerHTML = `
275
275
  <style>
276
276
  nine-table-vscrollbar {
@@ -334,13 +334,13 @@ const Ut = class Ut extends HTMLElement {
334
334
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
335
335
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
336
336
  `;
337
- const e = /* @__PURE__ */ a(() => {
337
+ const e = /* @__PURE__ */ c(() => {
338
338
  const s = t(this, Y).querySelector(".ng-container-body");
339
339
  if (!s) {
340
340
  setTimeout(e, 10);
341
341
  return;
342
342
  }
343
- b(this, S, {
343
+ g(this, S, {
344
344
  container: s,
345
345
  track: this.querySelector(".ng-scroll-track"),
346
346
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -351,10 +351,10 @@ const Ut = class Ut extends HTMLElement {
351
351
  e();
352
352
  }
353
353
  };
354
- Y = new WeakMap(), I = new WeakMap(), S = new WeakMap(), it = new WeakMap(), st = new WeakMap(), ut = new WeakMap(), a(Ut, "NineTableVScrollBar");
355
- let It = Ut;
356
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", It);
357
- var gt, F;
354
+ Y = new WeakMap(), I = new WeakMap(), S = new WeakMap(), it = new WeakMap(), st = new WeakMap(), ut = new WeakMap(), c(Ut, "NineTableVScrollBar");
355
+ let $t = Ut;
356
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", $t);
357
+ var bt, K;
358
358
  const H = class H {
359
359
  /**
360
360
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
@@ -366,23 +366,23 @@ const H = class H {
366
366
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
367
367
  */
368
368
  static compile(i) {
369
- var n, o, r, l;
369
+ var n, r, o, l;
370
370
  if (!i) return null;
371
371
  const e = i.cloneNode(!0);
372
- return t(n = H, gt).call(n, e), t(o = H, F).call(o, e, "thead"), t(r = H, F).call(r, e, "tbody"), t(l = H, F).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((c, d) => {
373
- const u = c.getAttribute("fixed");
374
- u && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((f) => {
375
- f.setAttribute("fixed", u);
372
+ return t(n = H, bt).call(n, e), t(r = H, K).call(r, e, "thead"), t(o = H, K).call(o, e, "tbody"), t(l = H, K).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((a, d) => {
373
+ const f = a.getAttribute("fixed");
374
+ f && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((u) => {
375
+ u.setAttribute("fixed", f);
376
376
  });
377
377
  }), e;
378
378
  }
379
379
  };
380
- gt = new WeakMap(), F = new WeakMap(), a(H, "TableCompiler"), h(H, gt, /* @__PURE__ */ a((i) => {
380
+ bt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), h(H, bt, /* @__PURE__ */ c((i) => {
381
381
  if (!i.querySelector("colgroup")) {
382
- const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), o = Math.max(Math.floor(i.clientWidth / s), 100);
383
- for (let r = 0; r < s; r++) {
382
+ 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);
383
+ for (let o = 0; o < s; o++) {
384
384
  const l = document.createElement("col");
385
- l.setAttribute("width", o), n.appendChild(l);
385
+ l.setAttribute("width", r), n.appendChild(l);
386
386
  }
387
387
  i.prepend(n);
388
388
  }
@@ -391,222 +391,191 @@ gt = new WeakMap(), F = new WeakMap(), a(H, "TableCompiler"), h(H, gt, /* @__PUR
391
391
  s ? s.after(e) : i.prepend(e);
392
392
  }
393
393
  i.classList.add("nine-table-element"), i.style.display = "table";
394
- }, "#ensureTableStructure")), h(H, F, /* @__PURE__ */ a((i, e) => {
395
- const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), o = s.length;
396
- if (o === 0 || n.length === 0) return;
397
- let r = 0;
398
- n.forEach((c) => {
399
- r += c.colSpan || 1;
394
+ }, "#ensureTableStructure")), h(H, K, /* @__PURE__ */ c((i, e) => {
395
+ const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
396
+ if (r === 0 || n.length === 0) return;
397
+ let o = 0;
398
+ n.forEach((a) => {
399
+ o += a.colSpan || 1;
400
400
  });
401
- const l = Array.from(Array(o), () => Array(r).fill(null));
402
- s.forEach((c) => {
403
- const d = c.sectionRowIndex;
404
- let u = 0;
405
- Array.from(c.querySelectorAll("th,td")).forEach((f) => {
401
+ const l = Array.from(Array(r), () => Array(o).fill(null));
402
+ s.forEach((a) => {
403
+ const d = a.sectionRowIndex;
404
+ let f = 0;
405
+ Array.from(a.querySelectorAll("th,td")).forEach((u) => {
406
406
  for (let E = 0; E < l[d].length; E++)
407
407
  if (l[d][E] === null) {
408
- u = E;
408
+ f = E;
409
409
  break;
410
410
  }
411
- const g = f.rowSpan || 1, y = f.colSpan || 1;
412
- for (let E = 0; E < g; E++)
413
- for (let k = 0; k < y; k++)
414
- d + E < o && u + k < r && (l[d + E][u + k] = E === 0 && k === 0 ? "1" : "0");
411
+ const b = u.rowSpan || 1, m = u.colSpan || 1;
412
+ for (let E = 0; E < b; E++)
413
+ for (let T = 0; T < m; T++)
414
+ d + E < r && f + T < o && (l[d + E][f + T] = E === 0 && T === 0 ? "1" : "0");
415
415
  });
416
- }), s.forEach((c) => {
417
- const d = c.sectionRowIndex;
418
- Array.from(c.querySelectorAll("th,td")).forEach((u) => {
419
- for (let f = 0; f < l[d].length; f++)
420
- if (l[d][f] === "1") {
421
- u.dataset.col = f, l[d][f] = "0";
416
+ }), s.forEach((a) => {
417
+ const d = a.sectionRowIndex;
418
+ Array.from(a.querySelectorAll("th,td")).forEach((f) => {
419
+ for (let u = 0; u < l[d].length; u++)
420
+ if (l[d][u] === "1") {
421
+ f.dataset.col = u, l[d][u] = "0";
422
422
  break;
423
423
  }
424
424
  });
425
425
  });
426
426
  }, "#resetColIndex"));
427
427
  let Wt = H;
428
- var m, _, R, W, X, U, bt, pt, nt, ot, yt, mt, rt, Z, xt;
428
+ var y, _, R, $, V, j, gt, pt, nt, ot, yt, mt, rt, F, vt;
429
429
  const Kt = class Kt {
430
430
  constructor(i) {
431
- h(this, m);
431
+ h(this, y);
432
432
  h(this, _, /* @__PURE__ */ new Map());
433
- // 각 μ»¨ν…Œμ΄λ„ˆλ³„ λ…λ¦½λœ ν…œν”Œλ¦Ώ TR 관리
434
433
  h(this, R, null);
435
- h(this, W, null);
436
- h(this, X, 0);
437
- h(this, U, 40);
438
- /**
439
- * 🎯 μ™ΈλΆ€μ—μ„œ 데이터가 λ‘œλ“œλ˜κ±°λ‚˜ λ³€κ²½λœ ν›„ 가상 높이와 λ·°λ₯Ό μž¬κ°±μ‹ ν•˜λŠ” 퍼블릭 λ©”μ„œλ“œ
440
- */
441
- w(this, "refresh", /* @__PURE__ */ a(() => {
434
+ h(this, $, null);
435
+ h(this, V, 0);
436
+ h(this, j, 40);
437
+ w(this, "refresh", /* @__PURE__ */ c(() => {
442
438
  var e;
443
- const i = t(this, m).querySelector(".ng-container-body");
444
- i && (t(this, nt).call(this), t(this, Z).call(this, i.scrollTop), (e = t(this, m).querySelector("nine-table-vscrollbar")) == null || e.refresh());
439
+ const i = t(this, y).querySelector(".ng-container-body");
440
+ i && (t(this, nt).call(this), t(this, F).call(this, i.scrollTop), (e = t(this, y).querySelector("nine-table-vscrollbar")) == null || e.refresh());
445
441
  }, "refresh"));
446
- /**
447
- * 🎯 NineTableSheetμ—μ„œ λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 전달받아 각 μ˜μ—­λ³„ ν…Œμ΄λΈ” 생성 및 ν…œν”Œλ¦Ώ μΆ”μΆœ 일원화
448
- */
449
- // [RowManager.js μˆ˜μ • λ‚΄μš© 발췌]
450
- w(this, "initialize", /* @__PURE__ */ a(() => {
451
- b(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
452
- const s = t(this, m).querySelector(e);
453
- if (!s) return;
454
- const n = s.querySelector("table");
455
- if (!n) return;
456
- const o = n.querySelector("tbody");
442
+ w(this, "initialize", /* @__PURE__ */ c(() => {
443
+ g(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
444
+ const r = t(this, y).querySelector(n);
445
+ if (!r) return;
446
+ const o = r.querySelector("table");
457
447
  if (!o) return;
458
- const l = Array.from(o.querySelectorAll("tr")).map((c) => c.cloneNode(!0));
459
- t(this, _).set(e, l);
448
+ const l = o.querySelector("tbody");
449
+ if (!l) return;
450
+ const d = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
451
+ t(this, _).set(n, d);
460
452
  });
461
- const i = t(this, m).querySelector(".ng-container-body");
453
+ const i = t(this, y).querySelector(".ng-container-body"), e = t(this, y).querySelector(".ng-container-left"), s = t(this, y).querySelector(".ng-container-right");
462
454
  if (i) {
463
- t(this, pt).call(this, i), t(this, rt).call(this), t(this, nt).call(this), t(this, Z).call(this, i.scrollTop);
464
- let e = i.scrollTop;
465
- const s = /* @__PURE__ */ a((n) => {
466
- var o;
467
- leftContainer && leftContainer.scrollTop !== n && (leftContainer.scrollTop = n), rightContainer && rightContainer.scrollTop !== n && (rightContainer.scrollTop = n), t(this, Z).call(this, n), (o = t(this, m).querySelector("nine-table-vscrollbar")) == null || o.refresh();
455
+ t(this, pt).call(this, i), t(this, rt).call(this), t(this, nt).call(this), t(this, F).call(this, i.scrollTop);
456
+ let n = i.scrollTop;
457
+ const r = /* @__PURE__ */ c((o) => {
458
+ var l;
459
+ e && e.scrollTop !== o && (e.scrollTop = o), s && s.scrollTop !== o && (s.scrollTop = o), t(this, F).call(this, o), (l = t(this, y).querySelector("nine-table-vscrollbar")) == null || l.refresh();
468
460
  }, "syncScroll");
469
461
  i.addEventListener("scroll", () => {
470
- const n = i.scrollTop;
471
- e !== n && (e = n, s(n));
472
- }), [leftContainer, rightContainer].forEach((n) => {
473
- n && n.addEventListener("scroll", () => {
474
- const o = n.scrollTop;
475
- i.scrollTop !== o && (i.scrollTop = o, e = o, s(o));
476
- });
462
+ const o = i.scrollTop;
463
+ n !== o && (n = o, r(o));
477
464
  });
478
465
  }
479
466
  }, "initialize"));
480
- h(this, bt, /* @__PURE__ */ a((i, e) => {
467
+ h(this, gt, /* @__PURE__ */ c((i, e) => {
481
468
  const s = t(this, _).get(e);
482
469
  if (!s || s.length === 0) return;
483
470
  const n = i.querySelector("tbody");
484
471
  if (!n) return;
485
472
  n.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
486
- const o = n.querySelector("tr.nodata"), r = document.createDocumentFragment();
487
- for (let l = 0; l < t(this, U); l++)
488
- s.forEach((c) => {
489
- r.appendChild(c.cloneNode(!0));
473
+ const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
474
+ for (let l = 0; l < t(this, j); l++)
475
+ s.forEach((a) => {
476
+ o.appendChild(a.cloneNode(!0));
490
477
  });
491
- o ? o.before(r) : n.appendChild(r);
478
+ r ? r.before(o) : n.appendChild(o);
492
479
  }, "#renderRows"));
493
- /**
494
- * 🎯 ν…œν”Œλ¦Ώ TRλ“€μ˜ 총 높이λ₯Ό μΈ‘μ •ν•˜κ³  캐싱
495
- */
496
- h(this, pt, /* @__PURE__ */ a((i) => {
480
+ h(this, pt, /* @__PURE__ */ c((i) => {
497
481
  if (t(this, R) !== null && t(this, R) > 0)
498
482
  return t(this, R);
499
483
  const e = t(this, _).get(".ng-container-body");
500
484
  if (!e || e.length === 0) return 24;
501
485
  const s = i.querySelector("tbody");
502
486
  if (!s) return 24;
503
- s.querySelectorAll("tr:not(.nodata)").forEach((g) => g.remove());
504
- const n = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
505
- e.forEach((g) => {
506
- o.appendChild(g.cloneNode(!0));
507
- }), n ? n.before(o) : s.appendChild(o);
508
- const r = t(this, m), l = r.style.display, c = r.style.visibility, d = r.style.position;
509
- (l === "none" || window.getComputedStyle(r).display === "none") && (r.style.display = "block", r.style.visibility = "hidden", r.style.position = "absolute");
510
- let u = 0;
511
- const f = s.querySelectorAll("tr:not(.nodata)");
512
- return f.forEach((g) => {
513
- u += g.offsetHeight || g.getBoundingClientRect().height;
514
- }), f.forEach((g) => g.remove()), r.style.display = l, r.style.visibility = c, r.style.position = d, b(this, R, u > 0 ? u : 24), t(this, ot).call(this), M.log(`[RowManager] Height Cached: ${t(this, R)}px | RowCount: ${t(this, U)}`), t(this, R);
487
+ s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
488
+ const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
489
+ e.forEach((b) => {
490
+ r.appendChild(b.cloneNode(!0));
491
+ }), n ? n.before(r) : s.appendChild(r);
492
+ const o = t(this, y), l = o.style.display, a = o.style.visibility, d = o.style.position;
493
+ (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
494
+ let f = 0;
495
+ const u = s.querySelectorAll("tr:not(.nodata)");
496
+ return u.forEach((b) => {
497
+ f += b.offsetHeight || b.getBoundingClientRect().height;
498
+ }), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = a, o.style.position = d, g(this, R, f > 0 ? f : 24), t(this, ot).call(this), t(this, R);
515
499
  }, "#measureAndCacheHeight"));
516
- /**
517
- * 🎯 전체 데이터 개수 기반으둜 가상 슀크둀 높이 μ„€μ •
518
- */
519
- /**
520
- * 🎯 전체 데이터 개수 기반으둜 가상 슀크둀 높이 μ„€μ •
521
- */
522
- h(this, nt, /* @__PURE__ */ a(() => {
523
- var o, r, l, c;
524
- if (!t(this, m).querySelector(".ng-container-body")) return;
525
- const e = (typeof ((o = t(this, m).data) == null ? void 0 : o.count) == "function" ? t(this, m).data.count() : null) ?? ((l = (r = t(this, m).dataManager) == null ? void 0 : r.rawRecords) == null ? void 0 : l.length) ?? ((c = t(this, m).data) == null ? void 0 : c.length) ?? 0, s = t(this, R) || 24, n = e * s;
526
- M.log(`[RowManager] TotalCount: ${e} | RowHeight: ${s}px | TotalVirtualHeight: ${n}px`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
527
- const u = t(this, m).querySelector(d), f = u == null ? void 0 : u.querySelector("table");
528
- f ? (f.style.height = `${n}px`, M.log(`[RowManager] Applied height to ${d} table:`, f.style.height)) : M.log(`[RowManager] Table not found for selector: ${d}`);
500
+ h(this, nt, /* @__PURE__ */ c(() => {
501
+ var r, o, l, a;
502
+ if (!t(this, y).querySelector(".ng-container-body")) return;
503
+ const e = (typeof ((r = t(this, y).data) == null ? void 0 : r.count) == "function" ? t(this, y).data.count() : null) ?? ((l = (o = t(this, y).dataManager) == null ? void 0 : o.rawRecords) == null ? void 0 : l.length) ?? ((a = t(this, y).data) == null ? void 0 : a.length) ?? 100, s = t(this, R) || 24, n = e * s;
504
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
505
+ const f = t(this, y).querySelector(d), u = f == null ? void 0 : f.querySelector("table");
506
+ u && (u.style.height = `${n}px`);
529
507
  });
530
508
  }, "#updateVirtualScrollHeight"));
531
- h(this, ot, /* @__PURE__ */ a(() => {
532
- if (t(this, X) > 0 && t(this, R) > 0) {
533
- const i = Math.ceil(t(this, X) / t(this, R));
534
- b(this, U, i + 20);
509
+ h(this, ot, /* @__PURE__ */ c(() => {
510
+ if (t(this, V) > 0 && t(this, R) > 0) {
511
+ const i = Math.ceil(t(this, V) / t(this, R));
512
+ g(this, j, i + 20);
535
513
  } else
536
- b(this, U, 40);
514
+ g(this, j, 40);
537
515
  }, "#updateRowCount"));
538
- h(this, yt, /* @__PURE__ */ a(() => {
539
- var c, d, u;
540
- const i = t(this, m).querySelector(".ng-container-left table"), e = t(this, m).querySelector(".ng-container-body table"), s = t(this, m).querySelector(".ng-container-right table");
516
+ h(this, yt, /* @__PURE__ */ c(() => {
517
+ var a, d, f;
518
+ const i = t(this, y).querySelector(".ng-container-left table"), e = t(this, y).querySelector(".ng-container-body table"), s = t(this, y).querySelector(".ng-container-right table");
541
519
  if (!e) return;
542
- const n = i ? Array.from(i.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), r = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(n.length, o.length, r.length);
543
- for (let f = 0; f < l; f++) {
544
- const g = [
545
- ((c = n[f]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
546
- ((d = o[f]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
547
- ((u = r[f]) == null ? void 0 : u.getBoundingClientRect().height) || 0
548
- ], y = Math.max(...g);
549
- y > 0 && (n[f] && (n[f].style.height = `${y}px`), o[f] && (o[f].style.height = `${y}px`), r[f] && (r[f].style.height = `${y}px`));
520
+ 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);
521
+ for (let u = 0; u < l; u++) {
522
+ const b = [
523
+ ((a = n[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
524
+ ((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
525
+ ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
526
+ ], m = Math.max(...b);
527
+ m > 0 && (n[u] && (n[u].style.height = `${m}px`), r[u] && (r[u].style.height = `${m}px`), o[u] && (o[u].style.height = `${m}px`));
550
528
  }
551
529
  }, "#syncRowHeights"));
552
- /**
553
- * 🎯 ResizeObserver μ„€μ •: μ‹œνŠΈ 크기 λ³€κ²½ μ‹œ ν–‰ 개수 μž¬μ‚°μ • 및 μž¬λ Œλ”λ§
554
- */
555
- h(this, mt, /* @__PURE__ */ a(() => {
556
- !t(this, m) || !(t(this, m) instanceof HTMLElement) || (b(this, W, new ResizeObserver((i) => {
530
+ h(this, mt, /* @__PURE__ */ c(() => {
531
+ !t(this, y) || !(t(this, y) instanceof HTMLElement) || (g(this, $, new ResizeObserver((i) => {
557
532
  for (const e of i) {
558
533
  const s = e.target;
559
534
  if (!s.classList.contains("active")) continue;
560
535
  const n = e.contentRect.height;
561
536
  if (n > 0) {
562
- let o = 0;
563
- const r = s.querySelector("thead");
564
- r && (o += r.offsetHeight || r.getBoundingClientRect().height);
565
- const l = Math.max(n - o, 100);
566
- t(this, X) !== l && (b(this, X, l), t(this, ot).call(this), t(this, R) !== null && t(this, rt).call(this));
537
+ let r = 0;
538
+ const o = s.querySelector("thead");
539
+ o && (r += o.offsetHeight || o.getBoundingClientRect().height);
540
+ const l = Math.max(n - r, 100);
541
+ t(this, V) !== l && (g(this, V, l), t(this, ot).call(this), t(this, R) !== null && t(this, rt).call(this));
567
542
  }
568
543
  }
569
- })), t(this, W).observe(t(this, m)));
544
+ })), t(this, $).observe(t(this, y)));
570
545
  }, "#initResizeObserver"));
571
- /**
572
- * 🎯 λ°”λ”” 및 쒌우 κ³ μ • μ»¨ν…Œμ΄λ„ˆ 전체에 각각에 λ§žλŠ” ν…œν”Œλ¦Ώ ν–‰ λΌˆλŒ€ μ£Όμž…
573
- */
574
- h(this, rt, /* @__PURE__ */ a(() => {
546
+ h(this, rt, /* @__PURE__ */ c(() => {
575
547
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
576
- const e = t(this, m).querySelector(i);
577
- e && e.querySelector("tbody") && t(this, bt).call(this, e, i);
548
+ const e = t(this, y).querySelector(i);
549
+ e && e.querySelector("tbody") && t(this, gt).call(this, e, i);
578
550
  }), t(this, yt).call(this);
579
551
  }, "#renderAllContainers"));
580
- h(this, Z, /* @__PURE__ */ a((i) => {
581
- var o;
552
+ h(this, F, /* @__PURE__ */ c((i) => {
553
+ var r;
582
554
  const e = t(this, R);
583
555
  if (!e || e <= 0) return;
584
- const s = Math.max(0, Math.floor(i / e)), n = ((o = t(this, _).get(".ng-container-body")) == null ? void 0 : o.length) || 1;
585
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
586
- const l = t(this, m).querySelector(r);
556
+ const s = Math.max(0, Math.floor(i / e)), n = ((r = t(this, _).get(".ng-container-body")) == null ? void 0 : r.length) || 1;
557
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
558
+ const l = t(this, y).querySelector(o);
587
559
  if (!l) return;
588
- const c = l.querySelector("tbody");
589
- if (!c) return;
590
- Array.from(c.querySelectorAll("tr:not(.nodata)")).forEach((u, f) => {
591
- var E, k, D, Qt;
592
- const g = s + Math.floor(f / n), y = (typeof t(this, m).getData == "function" ? t(this, m).getData(g) : null) ?? (typeof ((E = t(this, m).data) == null ? void 0 : E.get) == "function" ? t(this, m).data.get(g) : null) ?? ((D = (k = t(this, m).dataManager) == null ? void 0 : k.rawRecords) == null ? void 0 : D[g]) ?? ((Qt = t(this, m).data) == null ? void 0 : Qt[g]) ?? { _index: g };
593
- u.style.display = "", t(this, xt).call(this, u, y, g);
560
+ const a = l.querySelector("tbody");
561
+ if (!a) return;
562
+ Array.from(a.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
563
+ var E, T, z, Qt;
564
+ const b = s + Math.floor(u / n), m = (typeof t(this, y).getData == "function" ? t(this, y).getData(b) : null) ?? (typeof ((E = t(this, y).data) == null ? void 0 : E.get) == "function" ? t(this, y).data.get(b) : null) ?? ((z = (T = t(this, y).dataManager) == null ? void 0 : T.rawRecords) == null ? void 0 : z[b]) ?? ((Qt = t(this, y).data) == null ? void 0 : Qt[b]) ?? { _index: b };
565
+ f.style.display = "", t(this, vt).call(this, f, m, b);
594
566
  });
595
567
  });
596
568
  }, "#handleScroll"));
597
- /**
598
- * 🎯 κ°œλ³„ TR μ—˜λ¦¬λ¨ΌνŠΈμ— μ‹€μ œ 데이터 값을 κ½‚μ•„μ£ΌλŠ” 바인딩 λ©”μ„œλ“œ
599
- */
600
- h(this, xt, /* @__PURE__ */ a((i, e, s) => {
601
- i.dataset.row = s, Array.from(i.cells).forEach((n, o) => {
602
- const r = n.dataset.bind;
603
- r && e && e[r] !== void 0 ? n.textContent = e[r] : n.textContent = e ? e[Object.keys(e)[o]] ?? `R${s}C${o}` : `ν–‰ ${s + 1}`, n.dataset.row = s;
569
+ h(this, vt, /* @__PURE__ */ c((i, e, s) => {
570
+ i.dataset.row = s, Array.from(i.cells).forEach((n, r) => {
571
+ const o = n.dataset.bind;
572
+ 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;
604
573
  });
605
574
  }, "#bindRowData"));
606
- w(this, "destroy", /* @__PURE__ */ a(() => {
607
- t(this, W) && (t(this, W).disconnect(), b(this, W, null));
575
+ w(this, "destroy", /* @__PURE__ */ c(() => {
576
+ t(this, $) && (t(this, $).disconnect(), g(this, $, null));
608
577
  }, "destroy"));
609
- b(this, m, i), t(this, mt).call(this);
578
+ g(this, y, i), t(this, mt).call(this);
610
579
  }
611
580
  getRowHeight() {
612
581
  return t(this, R);
@@ -616,39 +585,39 @@ const Kt = class Kt {
616
585
  return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
617
586
  }
618
587
  };
619
- m = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), W = new WeakMap(), X = new WeakMap(), U = new WeakMap(), bt = new WeakMap(), pt = new WeakMap(), nt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), mt = new WeakMap(), rt = new WeakMap(), Z = new WeakMap(), xt = new WeakMap(), a(Kt, "RowManager");
588
+ y = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), V = new WeakMap(), j = new WeakMap(), gt = new WeakMap(), pt = new WeakMap(), nt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), mt = new WeakMap(), rt = new WeakMap(), F = new WeakMap(), vt = new WeakMap(), c(Kt, "RowManager");
620
589
  let Ot = Kt;
621
- var G, J, vt, wt, St, Et, Rt;
590
+ var Z, G, xt, wt, St, Et, Rt;
622
591
  const et = class et extends HTMLElement {
623
592
  constructor() {
624
593
  super();
625
- h(this, G, null);
626
- h(this, J);
627
- h(this, vt, /* @__PURE__ */ a(() => {
594
+ h(this, Z, null);
595
+ h(this, G);
596
+ h(this, xt, /* @__PURE__ */ c(() => {
628
597
  [
629
598
  { selector: ".ng-container-body", type: null },
630
599
  { selector: ".ng-container-left", type: "left" },
631
600
  { selector: ".ng-container-right", type: "right" }
632
601
  ].forEach(({ selector: s, type: n }) => {
633
- const o = this.querySelector(s);
634
- if (!o) return;
635
- const r = t(this, St).call(this, t(this, G), n);
636
- o.innerHTML = "", o.appendChild(r);
602
+ const r = this.querySelector(s);
603
+ if (!r) return;
604
+ const o = t(this, St).call(this, t(this, Z), n);
605
+ r.innerHTML = "", r.appendChild(o);
637
606
  });
638
607
  }, "#renderSplitContainers"));
639
- h(this, wt, /* @__PURE__ */ a(() => {
608
+ h(this, wt, /* @__PURE__ */ c(() => {
640
609
  ["left", "right"].forEach((e) => {
641
610
  const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
642
611
  if (!s || !n) return;
643
- let o = 0;
644
- n.querySelectorAll("col").forEach((r) => {
645
- const l = parseInt(r.getAttribute("width"), 10);
646
- isNaN(o) || (o += l);
647
- }), s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`;
612
+ let r = 0;
613
+ n.querySelectorAll("col").forEach((o) => {
614
+ const l = parseInt(o.getAttribute("width"), 10);
615
+ isNaN(r) || (r += l);
616
+ }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
648
617
  });
649
618
  }, "#updateContainerWidths"));
650
- w(this, "generate", /* @__PURE__ */ a((e) => {
651
- e && (b(this, G, Wt.compile(e)), t(this, G).style.display = "table", t(this, vt).call(this), t(this, wt).call(this), t(this, J).initialize(), setTimeout(() => {
619
+ w(this, "generate", /* @__PURE__ */ c((e) => {
620
+ e && (g(this, Z, Wt.compile(e)), t(this, Z).style.display = "table", t(this, xt).call(this), t(this, wt).call(this), t(this, G).initialize(), setTimeout(() => {
652
621
  var s;
653
622
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
654
623
  }, 0));
@@ -656,29 +625,29 @@ const et = class et extends HTMLElement {
656
625
  /**
657
626
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
658
627
  */
659
- h(this, St, /* @__PURE__ */ a((e, s) => {
628
+ h(this, St, /* @__PURE__ */ c((e, s) => {
660
629
  const n = e.cloneNode(!0);
661
- return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
662
- o.getAttribute("fixed") !== "left" && o.remove();
663
- }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
664
- o.getAttribute("fixed") !== "right" && o.remove();
665
- }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((o) => {
666
- o.remove();
630
+ return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((r) => {
631
+ r.getAttribute("fixed") !== "left" && r.remove();
632
+ }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((r) => {
633
+ r.getAttribute("fixed") !== "right" && r.remove();
634
+ }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((r) => {
635
+ r.remove();
667
636
  }), n;
668
637
  }, "#createSplitTable"));
669
- w(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, J).getRowHeight(), "getRowHeight"));
670
- w(this, "scrollToX", /* @__PURE__ */ a((e) => {
638
+ w(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, G).getRowHeight(), "getRowHeight"));
639
+ w(this, "scrollToX", /* @__PURE__ */ c((e) => {
671
640
  const s = this.querySelector(".ng-container-body");
672
641
  s && (s.scrollLeft = e);
673
642
  }, "scrollToX"));
674
- w(this, "scrollToY", /* @__PURE__ */ a((e) => {
643
+ w(this, "scrollToY", /* @__PURE__ */ c((e) => {
675
644
  const s = this.querySelector(".ng-container-body");
676
645
  s && (s.scrollTop = e);
677
646
  }, "scrollToY"));
678
- h(this, Et, /* @__PURE__ */ a(() => {
647
+ h(this, Et, /* @__PURE__ */ c(() => {
679
648
  t(this, Rt).call(this);
680
649
  }, "#init"));
681
- h(this, Rt, /* @__PURE__ */ a(() => {
650
+ h(this, Rt, /* @__PURE__ */ c(() => {
682
651
  const e = et.SCROLLBAR_SIZE;
683
652
  this.innerHTML = `
684
653
  <style>
@@ -815,92 +784,92 @@ const et = class et extends HTMLElement {
815
784
  </div>
816
785
  `;
817
786
  }, "#render"));
818
- b(this, J, new Ot(this));
787
+ g(this, G, new Ot(this));
819
788
  }
820
789
  connectedCallback() {
821
790
  t(this, Et).call(this);
822
791
  }
823
792
  disconnectedCallback() {
824
- this.innerHTML = "", M.log("NineTableSheet destroyed.");
793
+ this.innerHTML = "", tt.log("NineTableSheet destroyed.");
825
794
  }
826
795
  };
827
- G = new WeakMap(), J = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Rt = new WeakMap(), a(et, "NineTableSheet"), w(et, "SCROLLBAR_SIZE", 16);
796
+ Z = new WeakMap(), G = new WeakMap(), xt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Rt = new WeakMap(), c(et, "NineTableSheet"), w(et, "SCROLLBAR_SIZE", 16);
828
797
  let ht = et;
829
798
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ht);
830
- var Tt, lt;
799
+ var kt, lt;
831
800
  const jt = class jt extends HTMLElement {
832
801
  constructor() {
833
802
  super();
834
- h(this, Tt, /* @__PURE__ */ a(() => {
803
+ h(this, kt, /* @__PURE__ */ c(() => {
835
804
  var e;
836
805
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
837
- var r;
838
- const n = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((r = s.target.closest(".nine-tab-item")) == null ? void 0 : r.dataset.index, 10);
839
- t(this, lt).call(this, o, n);
806
+ var o;
807
+ const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
808
+ t(this, lt).call(this, r, n);
840
809
  }), t(this, lt).call(this, 0, !1);
841
810
  }, "#init"));
842
- h(this, lt, /* @__PURE__ */ a((e, s = !1) => {
843
- const n = /* @__PURE__ */ a(() => {
844
- const u = Array.from(this.querySelectorAll("nine-table-sheet"));
845
- Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
846
- const g = u.filter((y) => y.classList.contains("active"));
847
- g.length < 2 || g.forEach((y) => {
848
- const E = parseInt(y.getAttribute("data-index"), 10), k = this.querySelector(`nine-splitter[data-split-index="${E}"]`), D = u[E + 1];
849
- k && D && D.classList.contains("active") && k.style.setProperty("display", "flex");
811
+ h(this, lt, /* @__PURE__ */ c((e, s = !1) => {
812
+ const n = /* @__PURE__ */ c(() => {
813
+ const f = Array.from(this.querySelectorAll("nine-table-sheet"));
814
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((m) => m.style.setProperty("display", "none"));
815
+ const b = f.filter((m) => m.classList.contains("active"));
816
+ b.length < 2 || b.forEach((m) => {
817
+ const E = parseInt(m.getAttribute("data-index"), 10), T = this.querySelector(`nine-splitter[data-split-index="${E}"]`), z = f[E + 1];
818
+ T && z && z.classList.contains("active") && T.style.setProperty("display", "flex");
850
819
  });
851
- }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), l = o.querySelectorAll(".nine-tab-item"), c = r.querySelectorAll("nine-table-sheet");
820
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), a = o.querySelectorAll("nine-table-sheet");
852
821
  if (!l[e]) return;
853
822
  if (!s)
854
- l.forEach((u, f) => {
855
- u.classList.toggle("active", f === e);
856
- }), c.forEach((u, f) => {
857
- const g = f === e;
858
- u.classList.toggle("active", g), u.style.flex = g ? "1 1 100%" : "";
823
+ l.forEach((f, u) => {
824
+ f.classList.toggle("active", u === e);
825
+ }), a.forEach((f, u) => {
826
+ const b = u === e;
827
+ f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
859
828
  });
860
829
  else {
861
- const u = l[e], f = o.querySelectorAll(".nine-tab-item.active");
862
- if (u.classList.contains("active") && f.length <= 1)
830
+ const f = l[e], u = r.querySelectorAll(".nine-tab-item.active");
831
+ if (f.classList.contains("active") && u.length <= 1)
863
832
  return;
864
- u.classList.toggle("active");
865
- const g = r.querySelector(`nine-table-sheet[data-index="${e}"]`);
866
- g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
833
+ f.classList.toggle("active");
834
+ const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
835
+ b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
867
836
  }
868
- const d = r.querySelectorAll("nine-table-sheet.active");
869
- d == null || d.forEach((u) => {
870
- u.style.flex = d.length > 1 ? "1 1 0%" : "1 1 100%";
837
+ const d = o.querySelectorAll("nine-table-sheet.active");
838
+ d == null || d.forEach((f) => {
839
+ f.style.flex = d.length > 1 ? "1 1 0%" : "1 1 100%";
871
840
  }), n();
872
841
  }, "#switchSheet"));
873
842
  }
874
843
  connectedCallback() {
875
- t(this, Tt).call(this);
844
+ t(this, kt).call(this);
876
845
  }
877
846
  };
878
- Tt = new WeakMap(), lt = new WeakMap(), a(jt, "NineTableSheets");
847
+ kt = new WeakMap(), lt = new WeakMap(), c(jt, "NineTableSheets");
879
848
  let zt = jt;
880
849
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", zt);
881
- var T, kt, at, At;
850
+ var k, Tt, ct, At;
882
851
  const Ft = class Ft {
883
852
  constructor(i) {
884
- h(this, T);
885
- h(this, kt, /* @__PURE__ */ a(() => {
853
+ h(this, k);
854
+ h(this, Tt, /* @__PURE__ */ c(() => {
886
855
  t(this, At).call(this), new ResizeObserver((i) => {
887
856
  for (let e of i)
888
- t(this, T).getAttribute("auto-height") === "true" && t(this, at).call(this);
889
- }).observe(t(this, T));
857
+ t(this, k).getAttribute("auto-height") === "true" && t(this, ct).call(this);
858
+ }).observe(t(this, k));
890
859
  }, "#init"));
891
- h(this, at, /* @__PURE__ */ a(() => {
892
- var c, d;
893
- const i = Array.from(t(this, T).shadowRoot.querySelectorAll("nine-table-sheet.active"));
860
+ h(this, ct, /* @__PURE__ */ c(() => {
861
+ var a, d;
862
+ const i = Array.from(t(this, k).shadowRoot.querySelectorAll("nine-table-sheet.active"));
894
863
  if (i.length === 0) return;
895
- const e = parseInt(t(this, T).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((u) => u.getRowHeight())), n = (c = t(this, T).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (d = t(this, T).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, r = ht.SCROLLBAR_SIZE, l = e * s + n + o + r;
896
- t(this, T).style.height = `${l}px`;
864
+ const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), n = (a = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : a.getBoundingClientRect().height, r = (d = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, o = ht.SCROLLBAR_SIZE, l = e * s + n + r + o;
865
+ t(this, k).style.height = `${l}px`;
897
866
  }, "#applyAutoHeight"));
898
- h(this, At, /* @__PURE__ */ a(() => {
899
- const e = Array.from(t(this, T).children).filter((c) => c.tagName === "TABLE"), s = t(this, T).getAttribute("auto-height") === "true", n = e.length, o = e.map((c, d) => {
900
- const f = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, g = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
901
- return f + g;
902
- }).join(""), r = e.map((c, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
903
- t(this, T).shadowRoot.innerHTML = `
867
+ h(this, At, /* @__PURE__ */ c(() => {
868
+ const e = Array.from(t(this, k).children).filter((a) => a.tagName === "TABLE"), s = t(this, k).getAttribute("auto-height") === "true", n = e.length, r = e.map((a, d) => {
869
+ const u = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, b = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
870
+ return u + b;
871
+ }).join(""), o = e.map((a, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
872
+ t(this, k).shadowRoot.innerHTML = `
904
873
  <style>
905
874
  :host {
906
875
  display: flex;
@@ -989,9 +958,9 @@ const Ft = class Ft {
989
958
  <nine-table-body>
990
959
  <nine-table-summary></nine-table-summary>
991
960
  <nine-table-sheets>
992
- <nine-table-sheets-body>${o}</nine-table-sheets-body>
961
+ <nine-table-sheets-body>${r}</nine-table-sheets-body>
993
962
  <nine-table-sheets-footer>
994
- <div class="nine-tab-bar">${r}</div>
963
+ <div class="nine-tab-bar">${o}</div>
995
964
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
996
965
  </nine-table-sheets-footer>
997
966
  </nine-table-sheets>
@@ -999,163 +968,163 @@ const Ft = class Ft {
999
968
  </nine-table-body>
1000
969
  <nine-table-footer></nine-table-footer>
1001
970
  `;
1002
- const l = t(this, T).shadowRoot.querySelectorAll("nine-table-sheet");
1003
- l == null || l.forEach((c, d) => {
971
+ const l = t(this, k).shadowRoot.querySelectorAll("nine-table-sheet");
972
+ l == null || l.forEach((a, d) => {
1004
973
  e[d] && setTimeout(() => {
1005
- c.generate(e[d]), s && t(this, at).call(this);
974
+ a.generate(e[d]), s && t(this, ct).call(this);
1006
975
  });
1007
976
  });
1008
977
  }, "#render"));
1009
- b(this, T, i), t(this, kt).call(this);
978
+ g(this, k, i), t(this, Tt).call(this);
1010
979
  }
1011
980
  };
1012
- T = new WeakMap(), kt = new WeakMap(), at = new WeakMap(), At = new WeakMap(), a(Ft, "LayoutManager");
981
+ k = new WeakMap(), Tt = new WeakMap(), ct = new WeakMap(), At = new WeakMap(), c(Ft, "LayoutManager");
1013
982
  let Dt = Ft;
1014
- var O, K;
983
+ var W, X;
1015
984
  const Zt = class Zt {
1016
985
  constructor(i) {
1017
- h(this, O);
1018
- h(this, K, -1);
1019
- w(this, "count", /* @__PURE__ */ a(() => t(this, O).rawRecords.length, "count"));
1020
- b(this, O, i);
986
+ h(this, W);
987
+ h(this, X, -1);
988
+ w(this, "count", /* @__PURE__ */ c(() => t(this, W).rawRecords.length, "count"));
989
+ g(this, W, i);
1021
990
  }
1022
991
  get at() {
1023
- return t(this, K);
992
+ return t(this, X);
1024
993
  }
1025
994
  set at(i) {
1026
995
  var s, n;
1027
- b(this, K, parseInt(i, 10));
1028
- const e = ((n = (s = t(this, O).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || t(this, O).owner.body;
1029
- e && !e.querySelector(`tbody.bindable tr[data-row="${t(this, K)}"]`) && setTimeout(() => {
1030
- var o, r;
1031
- (r = (o = t(this, O).owner).scrollTo_V1) == null || r.call(o, t(this, K));
996
+ g(this, X, parseInt(i, 10));
997
+ const e = ((n = (s = t(this, W).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || t(this, W).owner.body;
998
+ e && !e.querySelector(`tbody.bindable tr[data-row="${t(this, X)}"]`) && setTimeout(() => {
999
+ var r, o;
1000
+ (o = (r = t(this, W).owner).scrollTo_V1) == null || o.call(r, t(this, X));
1032
1001
  });
1033
1002
  }
1034
1003
  };
1035
- O = new WeakMap(), K = new WeakMap(), a(Zt, "ngRow");
1004
+ W = new WeakMap(), X = new WeakMap(), c(Zt, "ngRow");
1036
1005
  let Pt = Zt;
1037
- var A, v, q, Q, qt, z, Lt, ct, Ht, Ct, tt;
1006
+ var A, x, q, J, qt, O, Lt, at, Ht, Ct, Q;
1038
1007
  const L = class L {
1039
1008
  constructor(i, e) {
1040
1009
  h(this, A);
1041
- h(this, v);
1010
+ h(this, x);
1042
1011
  h(this, q, []);
1043
- h(this, Q, []);
1012
+ h(this, J, []);
1044
1013
  h(this, qt, 0);
1045
- h(this, z, []);
1046
- h(this, Lt, /* @__PURE__ */ a(() => {
1047
- b(this, z, []);
1014
+ h(this, O, []);
1015
+ h(this, Lt, /* @__PURE__ */ c(() => {
1016
+ g(this, O, []);
1048
1017
  const i = t(this, A).template || [];
1049
1018
  Array.from(i).forEach((e) => {
1050
1019
  var s;
1051
- t(this, z).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1052
- }), (t(this, v).rawRecords || []).forEach((e) => {
1053
- e.__ng || (e.__ng = t(this, ct).call(this)), e.__ng.height = t(this, z).slice();
1020
+ t(this, O).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1021
+ }), (t(this, x).rawRecords || []).forEach((e) => {
1022
+ e.__ng || (e.__ng = t(this, at).call(this)), e.__ng.height = t(this, O).slice();
1054
1023
  });
1055
1024
  }, "#initialize"));
1056
- w(this, "set", /* @__PURE__ */ a((i) => {
1025
+ w(this, "set", /* @__PURE__ */ c((i) => {
1057
1026
  this.clear(), this.add(i, !1);
1058
1027
  }, "set"));
1059
- h(this, ct, /* @__PURE__ */ a(() => ({
1028
+ h(this, at, /* @__PURE__ */ c(() => ({
1060
1029
  rowState: L.ROW_STATE.EMPTY,
1061
1030
  deleted: !1,
1062
1031
  filtered: !1,
1063
- height: t(this, z).slice(),
1032
+ height: t(this, O).slice(),
1064
1033
  o: {},
1065
1034
  c: {},
1066
- _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, z).slice(), -1, {}, {}]
1035
+ _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, O).slice(), -1, {}, {}]
1067
1036
  }), "#getDefaultMeta"));
1068
- w(this, "reset", /* @__PURE__ */ a(() => {
1069
- b(this, q, []), b(this, Q, []);
1037
+ w(this, "reset", /* @__PURE__ */ c(() => {
1038
+ g(this, q, []), g(this, J, []);
1070
1039
  }, "reset"));
1071
- w(this, "clear", /* @__PURE__ */ a(() => {
1040
+ w(this, "clear", /* @__PURE__ */ c(() => {
1072
1041
  var i;
1073
- t(this, v).rawRecords = [], b(this, q, []), b(this, Q, []), (i = t(this, v).viewRecords) != null && i.reset && t(this, v).viewRecords.reset();
1042
+ t(this, x).rawRecords = [], g(this, q, []), g(this, J, []), (i = t(this, x).viewRecords) != null && i.reset && t(this, x).viewRecords.reset();
1074
1043
  }, "clear"));
1075
- h(this, Ht, /* @__PURE__ */ a((i) => {
1044
+ h(this, Ht, /* @__PURE__ */ c((i) => {
1076
1045
  var n;
1077
1046
  Array.isArray(i) || (i = [i]);
1078
1047
  const e = typeof ((n = t(this, A).fields) == null ? void 0 : n.get) == "function" ? t(this, A).fields.get() : Object.keys(i[0] || {}), s = [];
1079
- return i.forEach((o) => {
1080
- const r = { v: [] };
1048
+ return i.forEach((r) => {
1049
+ const o = { v: [] };
1081
1050
  e.forEach((l) => {
1082
- r.v.push(o[l] !== void 0 && o[l] !== null ? o[l] : "");
1083
- }), s.push(r);
1051
+ o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1052
+ }), s.push(o);
1084
1053
  }), s;
1085
1054
  }, "#json2Array"));
1086
- h(this, Ct, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1087
- e.__ng = t(this, ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = L.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1055
+ h(this, Ct, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1056
+ e.__ng = t(this, at).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = L.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1088
1057
  }), i), "#defaultInsert"));
1089
- w(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1090
- var o;
1058
+ w(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1059
+ var r;
1091
1060
  i === void 0 && (i = {});
1092
1061
  const s = t(this, Ht).call(this, i);
1093
- t(this, v).rawRecords = t(this, v).rawRecords.concat(t(this, Ct).call(this, s)), this.resetRecords();
1062
+ t(this, x).rawRecords = t(this, x).rawRecords.concat(t(this, Ct).call(this, s)), this.resetRecords();
1094
1063
  const n = this.count() - 1;
1095
- return e || s.forEach((r, l) => {
1096
- const c = t(this, v).rawRecords[n - l];
1097
- c && (c.__ng.rowState = L.ROW_STATE.EMPTY);
1098
- }), (o = t(this, v).viewRecords) != null && o.reset && t(this, v).viewRecords.reset(), n;
1064
+ return e || s.forEach((o, l) => {
1065
+ const a = t(this, x).rawRecords[n - l];
1066
+ a && (a.__ng.rowState = L.ROW_STATE.EMPTY);
1067
+ }), (r = t(this, x).viewRecords) != null && r.reset && t(this, x).viewRecords.reset(), n;
1099
1068
  }, "add"));
1100
- w(this, "delete", /* @__PURE__ */ a((i) => {
1069
+ w(this, "delete", /* @__PURE__ */ c((i) => {
1101
1070
  var s;
1102
1071
  let e = [];
1103
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, v).owner.row.at] : e = [parseInt(i, 10)], e.sort((n, o) => o - n).forEach((n) => {
1072
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, x).owner.row.at] : e = [parseInt(i, 10)], e.sort((n, r) => r - n).forEach((n) => {
1104
1073
  if (t(this, q)[n]) {
1105
- const o = t(this, q)[n].__ng.rowid;
1106
- t(this, q)[n].__ng.rowState === L.ROW_STATE.INSERT ? t(this, v).rawRecords = t(this, v).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, v).rawRecords.forEach((r) => {
1107
- r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = L.ROW_STATE.DELETE);
1074
+ const r = t(this, q)[n].__ng.rowid;
1075
+ t(this, q)[n].__ng.rowState === L.ROW_STATE.INSERT ? t(this, x).rawRecords = t(this, x).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, x).rawRecords.forEach((o) => {
1076
+ o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = L.ROW_STATE.DELETE);
1108
1077
  });
1109
1078
  }
1110
- }), this.resetRecords(), (s = t(this, v).viewRecords) != null && s.reset && t(this, v).viewRecords.reset();
1079
+ }), this.resetRecords(), (s = t(this, x).viewRecords) != null && s.reset && t(this, x).viewRecords.reset();
1111
1080
  }, "delete"));
1112
- w(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
1113
- var c;
1081
+ w(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1082
+ var a;
1114
1083
  i = parseInt(i, 10);
1115
- const o = (typeof ((c = t(this, A).fields) == null ? void 0 : c.get) == "function" ? t(this, A).fields.get() : []).indexOf(e);
1116
- if (o < 0) return;
1117
- const r = this.getValidData()[i];
1118
- if (!r) return;
1119
- const l = r.v[o];
1120
- l !== s && r.__ng.rowState !== L.ROW_STATE.INSERT && (r.__ng.o.hasOwnProperty(e) || (r.__ng.o[e] = l), r.__ng.rowState = L.ROW_STATE.UPDATE), r.v[o] = s, t(this, v).owner.refreshData && t(this, v).owner.refreshData(i);
1084
+ const r = (typeof ((a = t(this, A).fields) == null ? void 0 : a.get) == "function" ? t(this, A).fields.get() : []).indexOf(e);
1085
+ if (r < 0) return;
1086
+ const o = this.getValidData()[i];
1087
+ if (!o) return;
1088
+ const l = o.v[r];
1089
+ l !== s && o.__ng.rowState !== L.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = L.ROW_STATE.UPDATE), o.v[r] = s, t(this, x).owner.refreshData && t(this, x).owner.refreshData(i);
1121
1090
  }, "setValue"));
1122
- w(this, "resetRecords", /* @__PURE__ */ a(() => {
1123
- b(this, Q, t(this, v).rawRecords.filter((i) => !i.__ng.deleted)), b(this, q, t(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, v).rawRecords.forEach((i, e) => {
1091
+ w(this, "resetRecords", /* @__PURE__ */ c(() => {
1092
+ g(this, J, t(this, x).rawRecords.filter((i) => !i.__ng.deleted)), g(this, q, t(this, x).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, x).rawRecords.forEach((i, e) => {
1124
1093
  i.__ng.rowidx = e;
1125
1094
  }), t(this, q).forEach((i, e) => {
1126
1095
  i.__ng.i = e;
1127
1096
  });
1128
1097
  }, "resetRecords"));
1129
- w(this, "getValidData", /* @__PURE__ */ a(() => (t(this, q).length === 0 && t(this, v).rawRecords.length > 0 && this.resetRecords(), t(this, q)), "getValidData"));
1130
- h(this, tt, /* @__PURE__ */ a((i) => {
1098
+ w(this, "getValidData", /* @__PURE__ */ c(() => (t(this, q).length === 0 && t(this, x).rawRecords.length > 0 && this.resetRecords(), t(this, q)), "getValidData"));
1099
+ h(this, Q, /* @__PURE__ */ c((i) => {
1131
1100
  var s;
1132
1101
  if (!i) return i;
1133
1102
  const e = typeof ((s = t(this, A).fields) == null ? void 0 : s.get) == "function" ? t(this, A).fields.get() : [];
1134
1103
  return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
1135
- const o = {};
1136
- return e.forEach((r, l) => {
1137
- o[r] = n.v ? n.v[l] : n[r];
1138
- }), o.__ng = n.__ng, o;
1104
+ const r = {};
1105
+ return e.forEach((o, l) => {
1106
+ r[o] = n.v ? n.v[l] : n[o];
1107
+ }), r.__ng = n.__ng, r;
1139
1108
  }) : i;
1140
1109
  }, "#conv2"));
1141
- w(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
1142
- w(this, "get", /* @__PURE__ */ a((i, e) => {
1143
- var o;
1110
+ w(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1111
+ w(this, "get", /* @__PURE__ */ c((i, e) => {
1112
+ var r;
1144
1113
  const s = this.getValidData();
1145
1114
  if (!s || s.length <= 0) return;
1146
- if (i == null) return t(this, tt).call(this, s);
1115
+ if (i == null) return t(this, Q).call(this, s);
1147
1116
  if (i < 0 || i >= s.length) return null;
1148
- const n = typeof ((o = t(this, A).fields) == null ? void 0 : o.get) == "function" ? t(this, A).fields.get() : [];
1117
+ const n = typeof ((r = t(this, A).fields) == null ? void 0 : r.get) == "function" ? t(this, A).fields.get() : [];
1149
1118
  if (e != null) {
1150
- const r = n.indexOf(e);
1151
- return r >= 0 ? s[i].v[r] : null;
1119
+ const o = n.indexOf(e);
1120
+ return o >= 0 ? s[i].v[o] : null;
1152
1121
  }
1153
- return t(this, tt).call(this, s[i]);
1122
+ return t(this, Q).call(this, s[i]);
1154
1123
  }, "get"));
1155
- b(this, A, i), b(this, v, e), t(this, Lt).call(this);
1124
+ g(this, A, i), g(this, x, e), t(this, Lt).call(this);
1156
1125
  }
1157
1126
  get source() {
1158
- return t(this, tt).call(this, t(this, v).rawRecords);
1127
+ return t(this, Q).call(this, t(this, x).rawRecords);
1159
1128
  }
1160
1129
  set source(i) {
1161
1130
  this.clear(), this.add(i, !1);
@@ -1170,7 +1139,7 @@ const L = class L {
1170
1139
  return this.length;
1171
1140
  }
1172
1141
  };
1173
- A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), Q = new WeakMap(), qt = new WeakMap(), z = new WeakMap(), Lt = new WeakMap(), ct = new WeakMap(), Ht = new WeakMap(), Ct = new WeakMap(), tt = new WeakMap(), a(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1142
+ A = new WeakMap(), x = new WeakMap(), q = new WeakMap(), J = new WeakMap(), qt = new WeakMap(), O = new WeakMap(), Lt = new WeakMap(), at = new WeakMap(), Ht = new WeakMap(), Ct = new WeakMap(), Q = new WeakMap(), c(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1174
1143
  w(L, "ROW_STATE", {
1175
1144
  EMPTY: "EMPTY",
1176
1145
  NORMAL: "NORMAL",
@@ -1187,10 +1156,10 @@ const Gt = class Gt {
1187
1156
  }, this.setDataSource = (e) => {
1188
1157
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1189
1158
  }, this.getRowState = (e) => {
1190
- var n, o;
1159
+ var n, r;
1191
1160
  const s = parseInt(e, 10);
1192
1161
  if (!(s >= this.data.count()))
1193
- return (o = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : o.rowState;
1162
+ return (r = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : r.rowState;
1194
1163
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1195
1164
  this.row.at = e;
1196
1165
  }, 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) => {
@@ -1198,37 +1167,37 @@ const Gt = class Gt {
1198
1167
  }, this.setDataSource([]);
1199
1168
  }
1200
1169
  };
1201
- a(Gt, "ngDataManager");
1170
+ c(Gt, "ngDataManager");
1202
1171
  let Nt = Gt;
1203
- var j, Mt;
1172
+ var U, _t;
1204
1173
  const Jt = class Jt extends HTMLElement {
1205
1174
  constructor() {
1206
1175
  super();
1207
1176
  //#created = false;
1208
- h(this, j);
1209
- h(this, Mt);
1210
- this.attachShadow({ mode: "open" }), b(this, j, new Nt(this));
1177
+ h(this, U);
1178
+ h(this, _t);
1179
+ this.attachShadow({ mode: "open" }), g(this, U, new Nt(this));
1211
1180
  }
1212
1181
  connectedCallback() {
1213
- b(this, Mt, new Dt(this)), M.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1182
+ g(this, _t, new Dt(this)), tt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1214
1183
  }
1215
1184
  disconnectedCallback() {
1216
- M.log("NineTable disconnected.");
1185
+ tt.log("NineTable disconnected.");
1217
1186
  }
1218
1187
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1219
1188
  get data() {
1220
- return t(this, j).data;
1189
+ return t(this, U).data;
1221
1190
  }
1222
1191
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1223
1192
  get row() {
1224
- return t(this, j).row;
1193
+ return t(this, U).row;
1225
1194
  }
1226
1195
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1227
1196
  get dataManager() {
1228
- return t(this, j);
1197
+ return t(this, U);
1229
1198
  }
1230
1199
  };
1231
- j = new WeakMap(), Mt = new WeakMap(), a(Jt, "NineTable");
1232
- let Vt = Jt;
1233
- customElements.get("nine-table") || customElements.define("nine-table", Vt);
1200
+ U = new WeakMap(), _t = new WeakMap(), c(Jt, "NineTable");
1201
+ let Yt = Jt;
1202
+ customElements.get("nine-table") || customElements.define("nine-table", Yt);
1234
1203
  //# sourceMappingURL=nine-table.js.map