@ninebone/table 0.0.285 β†’ 0.0.287

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,50 +1,50 @@
1
- var Pe = Object.defineProperty;
2
- var Ve = (p) => {
1
+ var Xt = Object.defineProperty;
2
+ var Yt = (p) => {
3
3
  throw TypeError(p);
4
4
  };
5
- var Ue = (p, i, t) => i in p ? Pe(p, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[i] = t;
6
- var a = (p, i) => Pe(p, "name", { value: i, configurable: !0 });
7
- var x = (p, i, t) => Ue(p, typeof i != "symbol" ? i + "" : i, t), Xe = (p, i, t) => i.has(p) || Ve("Cannot " + t);
8
- var e = (p, i, t) => (Xe(p, i, "read from private field"), t ? t.call(p) : i.get(p)), c = (p, i, t) => i.has(p) ? Ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(p) : i.set(p, t), g = (p, i, t, s) => (Xe(p, i, "write to private field"), s ? s.call(p, t) : i.set(p, t), t);
9
- var Ye = (p, i, t, s) => ({
5
+ var Ft = (p, i, e) => i in p ? Xt(p, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[i] = e;
6
+ var a = (p, i) => Xt(p, "name", { value: i, configurable: !0 });
7
+ var x = (p, i, e) => Ft(p, typeof i != "symbol" ? i + "" : i, e), Kt = (p, i, e) => i.has(p) || Yt("Cannot " + e);
8
+ var t = (p, i, e) => (Kt(p, i, "read from private field"), e ? e.call(p) : i.get(p)), c = (p, i, e) => i.has(p) ? Yt("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(p) : i.set(p, e), g = (p, i, e, s) => (Kt(p, i, "write to private field"), s ? s.call(p, e) : i.set(p, e), e);
9
+ var Ut = (p, i, e, s) => ({
10
10
  set _(n) {
11
- g(p, i, n, t);
11
+ g(p, i, n, e);
12
12
  },
13
13
  get _() {
14
- return e(p, i, s);
14
+ return t(p, i, s);
15
15
  }
16
16
  });
17
- import { trace as Fe } from "@ninebone/util";
18
- const He = class He extends Fe.constructor {
17
+ import { trace as Zt } from "@ninebone/util";
18
+ const $t = class $t extends Zt.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- a(He, "Trace");
24
- let Ee = He;
25
- const Z = new Ee();
26
- var k, $, b, W, O, z, se, D, ne;
27
- const Me = class Me extends HTMLElement {
23
+ a($t, "Trace");
24
+ let At = $t;
25
+ const Z = new At();
26
+ var k, I, b, W, O, D, st, z, nt;
27
+ const Wt = class Wt extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  c(this, k);
31
- c(this, $, !1);
31
+ c(this, I, !1);
32
32
  c(this, b);
33
33
  c(this, W);
34
34
  c(this, O);
35
- c(this, z);
36
- c(this, se, /* @__PURE__ */ a(() => {
37
- if (!e(this, k)) return;
38
- const t = e(this, k).querySelector(".ng-container-body");
39
- t && (g(this, z, new ResizeObserver(() => {
35
+ c(this, D);
36
+ c(this, st, /* @__PURE__ */ a(() => {
37
+ if (!t(this, k)) return;
38
+ const e = t(this, k).querySelector(".ng-container-body");
39
+ e && (g(this, D, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), e(this, z).observe(t));
41
+ })), t(this, D).observe(e));
42
42
  }, "#observeResize"));
43
43
  x(this, "refresh", /* @__PURE__ */ a(() => {
44
- if (!e(this, k) || !e(this, b) || e(this, $)) return;
45
- const t = e(this, b).container, s = t.querySelector("table");
44
+ if (!t(this, k) || !t(this, b) || t(this, I)) return;
45
+ const e = t(this, b).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const n = e(this, b).track, r = e(this, b).thumb, o = e(this, k).querySelector(".ng-container-bottom"), l = t.clientWidth, h = s.scrollWidth;
47
+ const n = t(this, b).track, r = t(this, b).thumb, o = t(this, k).querySelector(".ng-container-bottom"), l = e.clientWidth, h = s.scrollWidth;
48
48
  if (l !== 0 && h > l)
49
49
  o && (o.style.display = "flex");
50
50
  else {
@@ -55,64 +55,64 @@ const Me = class Me extends HTMLElement {
55
55
  if (d <= 0) return;
56
56
  const u = Math.max(Math.min(d * (l / h), d), 20);
57
57
  r.style.width = `${u}px`;
58
- const f = t.scrollLeft, y = h - l;
58
+ const f = e.scrollLeft, y = h - l;
59
59
  let w = 0;
60
60
  y > 0 && (w = parseInt(f / y * (d - u), 10)), w < 0 && (w = 0);
61
61
  const v = d - u;
62
- w > v && (w = v), r.style.left = `${w}px`, Z.log(w), e(this, b).left.disabled = w === 0, e(this, b).right.disabled = w >= v - 1;
62
+ w > v && (w = v), r.style.left = `${w}px`, Z.log(w), t(this, b).left.disabled = w === 0, t(this, b).right.disabled = w >= v - 1;
63
63
  }, "refresh"));
64
- c(this, D, /* @__PURE__ */ a((t) => {
65
- if (!e(this, b)) return !1;
66
- const s = e(this, b).container, n = s.querySelector("table");
64
+ c(this, z, /* @__PURE__ */ a((e) => {
65
+ if (!t(this, b)) return !1;
66
+ const s = t(this, b).container, n = s.querySelector("table");
67
67
  if (!n) return !1;
68
- const r = e(this, b).track.getBoundingClientRect(), o = e(this, b).thumb.clientWidth;
69
- let l = t;
68
+ const r = t(this, b).track.getBoundingClientRect(), o = t(this, b).thumb.clientWidth;
69
+ let l = e;
70
70
  l < 0 && (l = 0);
71
71
  const h = r.width - o;
72
- l > h && (l = h), l = parseInt(l, 10), e(this, b).thumb.style.left = `${l}px`, e(this, b).left.disabled = l === 0, e(this, b).right.disabled = l >= h - 1;
72
+ l > h && (l = h), l = parseInt(l, 10), t(this, b).thumb.style.left = `${l}px`, t(this, b).left.disabled = l === 0, t(this, b).right.disabled = l >= h - 1;
73
73
  const d = s.clientWidth, f = n.scrollWidth - d;
74
74
  return h > 0 && f > 0 && (s.scrollLeft = l / h * f), l > 0 && l < h - 1;
75
75
  }, "#thumbMoveTo"));
76
- c(this, ne, /* @__PURE__ */ a(() => {
77
- const t = /* @__PURE__ */ a((n) => {
78
- clearInterval(e(this, W)), clearInterval(e(this, O));
79
- const r = parseInt(e(this, b).thumb.style.left || 0, 10);
80
- e(this, D).call(this, r + n), g(this, W, setInterval(() => {
81
- clearInterval(e(this, W)), g(this, O, setInterval(() => {
82
- const o = parseInt(e(this, b).thumb.style.left || 0, 10);
83
- e(this, D).call(this, o + n) || clearInterval(e(this, O));
76
+ c(this, nt, /* @__PURE__ */ a(() => {
77
+ const e = /* @__PURE__ */ a((n) => {
78
+ clearInterval(t(this, W)), clearInterval(t(this, O));
79
+ const r = parseInt(t(this, b).thumb.style.left || 0, 10);
80
+ t(this, z).call(this, r + n), g(this, W, setInterval(() => {
81
+ clearInterval(t(this, W)), g(this, O, setInterval(() => {
82
+ const o = parseInt(t(this, b).thumb.style.left || 0, 10);
83
+ t(this, z).call(this, o + n) || clearInterval(t(this, O));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
- clearInterval(e(this, W)), clearInterval(e(this, O));
87
+ clearInterval(t(this, W)), clearInterval(t(this, O));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((n) => {
90
- e(this, b).left.addEventListener(n, s), e(this, b).right.addEventListener(n, s), e(this, b).track.addEventListener(n, s);
91
- }), e(this, b).left.addEventListener("mousedown", (n) => {
92
- n.button === 0 && t(-20);
93
- }), e(this, b).right.addEventListener("mousedown", (n) => {
94
- n.button === 0 && t(20);
95
- }), e(this, b).left.addEventListener("touchstart", () => t(-20)), e(this, b).right.addEventListener("touchstart", () => t(20)), e(this, b).track.addEventListener("mousedown", (n) => {
90
+ t(this, b).left.addEventListener(n, s), t(this, b).right.addEventListener(n, s), t(this, b).track.addEventListener(n, s);
91
+ }), t(this, b).left.addEventListener("mousedown", (n) => {
92
+ n.button === 0 && e(-20);
93
+ }), t(this, b).right.addEventListener("mousedown", (n) => {
94
+ n.button === 0 && e(20);
95
+ }), t(this, b).left.addEventListener("touchstart", () => e(-20)), t(this, b).right.addEventListener("touchstart", () => e(20)), t(this, b).track.addEventListener("mousedown", (n) => {
96
96
  if (n.button !== 0) return;
97
97
  n.preventDefault();
98
- const r = e(this, b).track.getBoundingClientRect(), o = e(this, b).thumb.clientWidth;
99
- e(this, D).call(this, n.clientX - r.left - o / 2);
100
- }), e(this, b).thumb.addEventListener("mousedown", (n) => {
98
+ const r = t(this, b).track.getBoundingClientRect(), o = t(this, b).thumb.clientWidth;
99
+ t(this, z).call(this, n.clientX - r.left - o / 2);
100
+ }), t(this, b).thumb.addEventListener("mousedown", (n) => {
101
101
  if (n.button !== 0) return;
102
- n.stopPropagation(), n.preventDefault(), g(this, $, !0), this.shiftX = n.clientX - e(this, b).thumb.getBoundingClientRect().left;
102
+ n.stopPropagation(), n.preventDefault(), g(this, I, !0), this.shiftX = n.clientX - t(this, b).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ a((l) => {
104
- if (!e(this, $)) return;
105
- const h = e(this, b).track.getBoundingClientRect();
106
- e(this, D).call(this, l.clientX - h.left - this.shiftX);
104
+ if (!t(this, I)) return;
105
+ const h = t(this, b).track.getBoundingClientRect();
106
+ t(this, z).call(this, l.clientX - h.left - this.shiftX);
107
107
  }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
108
- g(this, $, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
108
+ g(this, I, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (g(this, k, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, k)) return;
115
+ if (g(this, k, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, k)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -176,10 +176,10 @@ const Me = class Me 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 t = /* @__PURE__ */ a(() => {
180
- const s = e(this, k).querySelector(".ng-container-body");
179
+ const e = /* @__PURE__ */ a(() => {
180
+ const s = t(this, k).querySelector(".ng-container-body");
181
181
  if (!s) {
182
- setTimeout(t, 10);
182
+ setTimeout(e, 10);
183
183
  return;
184
184
  }
185
185
  g(this, b, {
@@ -188,24 +188,26 @@ const Me = class Me extends HTMLElement {
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
- }), e(this, ne).call(this), e(this, se).call(this), this.refresh();
191
+ }), s.addEventListener("scroll", () => {
192
+ t(this, I) || this.refresh();
193
+ }), t(this, nt).call(this), t(this, st).call(this), this.refresh();
192
194
  }, "initWhenReady");
193
- t();
195
+ e();
194
196
  }
195
197
  disconnectedCallback() {
196
- e(this, z) && e(this, z).disconnect();
198
+ t(this, D) && t(this, D).disconnect();
197
199
  }
198
200
  };
199
- k = new WeakMap(), $ = new WeakMap(), b = new WeakMap(), W = new WeakMap(), O = new WeakMap(), z = new WeakMap(), se = new WeakMap(), D = new WeakMap(), ne = new WeakMap(), a(Me, "NineTableHScrollBar");
200
- let Re = Me;
201
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Re);
202
- var re, j;
201
+ k = new WeakMap(), I = new WeakMap(), b = new WeakMap(), W = new WeakMap(), O = new WeakMap(), D = new WeakMap(), st = new WeakMap(), z = new WeakMap(), nt = new WeakMap(), a(Wt, "NineTableHScrollBar");
202
+ let qt = Wt;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", qt);
204
+ var rt, j;
203
205
  const L = class L {
204
206
  /**
205
207
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
206
208
  */
207
209
  static compileAll(i) {
208
- return Array.isArray(i) ? i.map((t) => L.compile(t)) : [];
210
+ return Array.isArray(i) ? i.map((e) => L.compile(e)) : [];
209
211
  }
210
212
  /**
211
213
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
@@ -213,18 +215,18 @@ const L = class L {
213
215
  static compile(i) {
214
216
  var n, r, o;
215
217
  if (!i) return null;
216
- const t = i.cloneNode(!0);
217
- return e(n = L, re).call(n, t), e(r = L, j).call(r, t, "thead"), e(o = L, j).call(o, t, "tbody"), Array.from(t.querySelectorAll("colgroup col")).forEach((l, h) => {
218
+ const e = i.cloneNode(!0);
219
+ return t(n = L, rt).call(n, e), t(r = L, j).call(r, e, "thead"), t(o = L, j).call(o, e, "tbody"), Array.from(e.querySelectorAll("colgroup col")).forEach((l, h) => {
218
220
  const d = l.getAttribute("fixed");
219
- d && t.querySelectorAll(`[data-col="${h}"]`).forEach((u) => {
221
+ d && e.querySelectorAll(`[data-col="${h}"]`).forEach((u) => {
220
222
  u.setAttribute("fixed", d);
221
223
  });
222
- }), t;
224
+ }), e;
223
225
  }
224
226
  };
225
- re = new WeakMap(), j = new WeakMap(), a(L, "TableCompiler"), c(L, re, /* @__PURE__ */ a((i) => {
227
+ rt = new WeakMap(), j = new WeakMap(), a(L, "TableCompiler"), c(L, rt, /* @__PURE__ */ a((i) => {
226
228
  if (!i.querySelector("colgroup")) {
227
- const t = i.querySelector("tbody tr") || i.querySelector("tr"), s = t ? t.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
229
+ 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);
228
230
  for (let o = 0; o < s; o++) {
229
231
  const l = document.createElement("col");
230
232
  l.setAttribute("width", r), n.appendChild(l);
@@ -232,12 +234,12 @@ re = new WeakMap(), j = new WeakMap(), a(L, "TableCompiler"), c(L, re, /* @__PUR
232
234
  i.prepend(n);
233
235
  }
234
236
  if (!i.querySelector("thead")) {
235
- const t = document.createElement("thead"), s = i.querySelector("colgroup");
236
- s ? s.after(t) : i.prepend(t);
237
+ const e = document.createElement("thead"), s = i.querySelector("colgroup");
238
+ s ? s.after(e) : i.prepend(e);
237
239
  }
238
240
  i.classList.add("nine-table-element"), i.style.display = "table";
239
- }, "#ensureTableStructure")), c(L, j, /* @__PURE__ */ a((i, t) => {
240
- const s = Array.from(i.querySelectorAll(t + " tr")), n = Array.from(i.querySelectorAll(t + " th," + t + " td")), r = s.length;
241
+ }, "#ensureTableStructure")), c(L, j, /* @__PURE__ */ a((i, e) => {
242
+ const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
241
243
  if (r === 0 || n.length === 0) return;
242
244
  let o = 0;
243
245
  n.forEach((h) => {
@@ -255,8 +257,8 @@ re = new WeakMap(), j = new WeakMap(), a(L, "TableCompiler"), c(L, re, /* @__PUR
255
257
  }
256
258
  const y = f.rowSpan || 1, w = f.colSpan || 1;
257
259
  for (let v = 0; v < y; v++)
258
- for (let C = 0; C < w; C++)
259
- d + v < r && u + C < o && (l[d + v][u + C] = v === 0 && C === 0 ? "1" : "0");
260
+ for (let _ = 0; _ < w; _++)
261
+ d + v < r && u + _ < o && (l[d + v][u + _] = v === 0 && _ === 0 ? "1" : "0");
260
262
  });
261
263
  }), s.forEach((h) => {
262
264
  const d = h.sectionRowIndex;
@@ -269,15 +271,15 @@ re = new WeakMap(), j = new WeakMap(), a(L, "TableCompiler"), c(L, re, /* @__PUR
269
271
  });
270
272
  });
271
273
  }, "#resetColIndex"));
272
- let Ae = L;
273
- var E, _, R, I, B, N, oe, le, G, ae, ce, J;
274
- const $e = class $e {
274
+ let Tt = L;
275
+ var S, C, E, H, B, N, ot, lt, G, at, ct, J, ht, dt;
276
+ const Ot = class Ot {
275
277
  constructor(i) {
276
- c(this, E);
277
- c(this, _, /* @__PURE__ */ new Map());
278
+ c(this, S);
279
+ c(this, C, /* @__PURE__ */ new Map());
278
280
  // 각 μ»¨ν…Œμ΄λ„ˆλ³„ λ…λ¦½λœ ν…œν”Œλ¦Ώ TR 관리
279
- c(this, R, null);
280
- c(this, I, null);
281
+ c(this, E, null);
282
+ c(this, H, null);
281
283
  c(this, B, 0);
282
284
  c(this, N, 40);
283
285
  /**
@@ -285,27 +287,29 @@ const $e = class $e {
285
287
  */
286
288
  // [RowManager.js μˆ˜μ • λ‚΄μš© 발췌]
287
289
  x(this, "initialize", /* @__PURE__ */ a(() => {
288
- g(this, R, null), e(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((t) => {
289
- const s = e(this, E).querySelector(t);
290
+ g(this, E, null), t(this, C).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
291
+ const s = t(this, S).querySelector(e);
290
292
  if (!s) return;
291
293
  const n = s.querySelector("table");
292
294
  if (!n) return;
293
295
  const r = n.querySelector("tbody");
294
296
  if (!r) return;
295
297
  const l = Array.from(r.querySelectorAll("tr")).map((h) => h.cloneNode(!0));
296
- e(this, _).set(t, l);
298
+ t(this, C).set(e, l);
297
299
  });
298
- const i = e(this, E).querySelector(".ng-container-body");
299
- i && (e(this, le).call(this, i), e(this, J).call(this));
300
+ const i = t(this, S).querySelector(".ng-container-body");
301
+ i && (t(this, lt).call(this, i), t(this, J).call(this), i.addEventListener("scroll", () => {
302
+ t(this, ht).call(this, i.scrollTop);
303
+ }));
300
304
  }, "initialize"));
301
- c(this, oe, /* @__PURE__ */ a((i, t) => {
302
- const s = e(this, _).get(t);
305
+ c(this, ot, /* @__PURE__ */ a((i, e) => {
306
+ const s = t(this, C).get(e);
303
307
  if (!s || s.length === 0) return;
304
308
  const n = i.querySelector("tbody");
305
309
  if (!n) return;
306
310
  n.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
307
311
  const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
308
- for (let l = 0; l < e(this, N); l++)
312
+ for (let l = 0; l < t(this, N); l++)
309
313
  s.forEach((h) => {
310
314
  o.appendChild(h.cloneNode(!0));
311
315
  });
@@ -314,38 +318,38 @@ const $e = class $e {
314
318
  /**
315
319
  * 🎯 ν…œν”Œλ¦Ώ TRλ“€μ˜ 총 높이λ₯Ό μΈ‘μ •ν•˜κ³  캐싱
316
320
  */
317
- c(this, le, /* @__PURE__ */ a((i) => {
318
- if (e(this, R) !== null && e(this, R) > 0)
319
- return e(this, R);
320
- const t = e(this, _).get(".ng-container-body");
321
- if (!t || t.length === 0) return 24;
321
+ c(this, lt, /* @__PURE__ */ a((i) => {
322
+ if (t(this, E) !== null && t(this, E) > 0)
323
+ return t(this, E);
324
+ const e = t(this, C).get(".ng-container-body");
325
+ if (!e || e.length === 0) return 24;
322
326
  const s = i.querySelector("tbody");
323
327
  if (!s) return 24;
324
328
  s.querySelectorAll("tr:not(.nodata)").forEach((y) => y.remove());
325
329
  const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
326
- t.forEach((y) => {
330
+ e.forEach((y) => {
327
331
  r.appendChild(y.cloneNode(!0));
328
332
  }), n ? n.before(r) : s.appendChild(r);
329
- const o = e(this, E), l = o.style.display, h = o.style.visibility, d = o.style.position;
333
+ const o = t(this, S), l = o.style.display, h = o.style.visibility, d = o.style.position;
330
334
  (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
331
335
  let u = 0;
332
336
  const f = s.querySelectorAll("tr:not(.nodata)");
333
337
  return f.forEach((y) => {
334
338
  u += y.offsetHeight || y.getBoundingClientRect().height;
335
- }), f.forEach((y) => y.remove()), o.style.display = l, o.style.visibility = h, o.style.position = d, g(this, R, u > 0 ? u : 24), e(this, G).call(this), Z.log(`[RowManager] Height Cached: ${e(this, R)}px | RowCount: ${e(this, N)}`), e(this, R);
339
+ }), f.forEach((y) => y.remove()), o.style.display = l, o.style.visibility = h, o.style.position = d, g(this, E, u > 0 ? u : 24), t(this, G).call(this), Z.log(`[RowManager] Height Cached: ${t(this, E)}px | RowCount: ${t(this, N)}`), t(this, E);
336
340
  }, "#measureAndCacheHeight"));
337
341
  c(this, G, /* @__PURE__ */ a(() => {
338
- if (e(this, B) > 0 && e(this, R) > 0) {
339
- const i = Math.ceil(e(this, B) / e(this, R));
342
+ if (t(this, B) > 0 && t(this, E) > 0) {
343
+ const i = Math.ceil(t(this, B) / t(this, E));
340
344
  g(this, N, i + 20);
341
345
  } else
342
346
  g(this, N, 40);
343
347
  }, "#updateRowCount"));
344
- c(this, ae, /* @__PURE__ */ a(() => {
348
+ c(this, at, /* @__PURE__ */ a(() => {
345
349
  var h, d, u;
346
- const i = e(this, E).querySelector(".ng-container-left table"), t = e(this, E).querySelector(".ng-container-body table"), s = e(this, E).querySelector(".ng-container-right table");
347
- if (!t) return;
348
- const n = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(t.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(n.length, r.length, o.length);
350
+ const i = t(this, S).querySelector(".ng-container-left table"), e = t(this, S).querySelector(".ng-container-body table"), s = t(this, S).querySelector(".ng-container-right table");
351
+ if (!e) return;
352
+ 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);
349
353
  for (let f = 0; f < l; f++) {
350
354
  const y = [
351
355
  ((h = n[f]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
@@ -358,53 +362,81 @@ const $e = class $e {
358
362
  /**
359
363
  * 🎯 ResizeObserver μ„€μ •: μ‹œνŠΈ 크기 λ³€κ²½ μ‹œ ν–‰ 개수 μž¬μ‚°μ • 및 μž¬λ Œλ”λ§
360
364
  */
361
- c(this, ce, /* @__PURE__ */ a(() => {
362
- !e(this, E) || !(e(this, E) instanceof HTMLElement) || (g(this, I, new ResizeObserver((i) => {
363
- for (const t of i) {
364
- const s = t.target;
365
+ c(this, ct, /* @__PURE__ */ a(() => {
366
+ !t(this, S) || !(t(this, S) instanceof HTMLElement) || (g(this, H, new ResizeObserver((i) => {
367
+ for (const e of i) {
368
+ const s = e.target;
365
369
  if (!s.classList.contains("active")) continue;
366
- const n = t.contentRect.height;
370
+ const n = e.contentRect.height;
367
371
  if (n > 0) {
368
372
  let r = 0;
369
373
  const o = s.querySelector("thead");
370
374
  o && (r += o.offsetHeight || o.getBoundingClientRect().height);
371
375
  const l = Math.max(n - r, 100);
372
- e(this, B) !== l && (g(this, B, l), e(this, G).call(this), e(this, R) !== null && e(this, J).call(this));
376
+ t(this, B) !== l && (g(this, B, l), t(this, G).call(this), t(this, E) !== null && t(this, J).call(this));
373
377
  }
374
378
  }
375
- })), e(this, I).observe(e(this, E)));
379
+ })), t(this, H).observe(t(this, S)));
376
380
  }, "#initResizeObserver"));
377
381
  /**
378
382
  * 🎯 λ°”λ”” 및 쒌우 κ³ μ • μ»¨ν…Œμ΄λ„ˆ 전체에 각각에 λ§žλŠ” ν…œν”Œλ¦Ώ ν–‰ λΌˆλŒ€ μ£Όμž…
379
383
  */
380
384
  c(this, J, /* @__PURE__ */ a(() => {
381
385
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
382
- const t = e(this, E).querySelector(i);
383
- t && t.querySelector("tbody") && e(this, oe).call(this, t, i);
384
- }), e(this, ae).call(this);
386
+ const e = t(this, S).querySelector(i);
387
+ e && e.querySelector("tbody") && t(this, ot).call(this, e, i);
388
+ }), t(this, at).call(this);
385
389
  }, "#renderAllContainers"));
390
+ /**
391
+ * 🎯 슀크둀 μœ„μΉ˜μ— λ”°λ₯Έ 데이터 바인딩 κ°±μ‹ 
392
+ */
393
+ c(this, ht, /* @__PURE__ */ a((i) => {
394
+ var o;
395
+ const e = t(this, E);
396
+ if (!e || e <= 0) return;
397
+ const s = ((o = t(this, C).get(".ng-container-body")) == null ? void 0 : o.length) || 1, n = Math.floor(i / e), r = Math.max(0, n);
398
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((l) => {
399
+ const h = t(this, S).querySelector(l);
400
+ if (!h) return;
401
+ const d = h.querySelector("tbody");
402
+ if (!d) return;
403
+ Array.from(d.querySelectorAll("tr:not(.nodata)")).forEach((f, y) => {
404
+ const w = r + Math.floor(y / s), v = t(this, S).getData ? t(this, S).getData(w) : null;
405
+ v ? (f.style.display = "", t(this, dt).call(this, f, v, w)) : f.style.display = "none";
406
+ });
407
+ });
408
+ }, "#handleScroll"));
409
+ /**
410
+ * 🎯 κ°œλ³„ TR μ—˜λ¦¬λ¨ΌνŠΈμ— μ‹€μ œ 데이터 값을 κ½‚μ•„μ£ΌλŠ” 바인딩 λ©”μ„œλ“œ
411
+ */
412
+ c(this, dt, /* @__PURE__ */ a((i, e, s) => {
413
+ i.dataset.row = s, Array.from(i.cells).forEach((n) => {
414
+ const r = n.dataset.bind;
415
+ r && e[r] !== void 0 && (n.textContent = e[r]), n.dataset.row = s;
416
+ });
417
+ }, "#bindRowData"));
386
418
  x(this, "destroy", /* @__PURE__ */ a(() => {
387
- e(this, I) && (e(this, I).disconnect(), g(this, I, null));
419
+ t(this, H) && (t(this, H).disconnect(), g(this, H, null));
388
420
  }, "destroy"));
389
- g(this, E, i), e(this, ce).call(this);
421
+ g(this, S, i), t(this, ct).call(this);
390
422
  }
391
423
  getRowHeight() {
392
- return e(this, R);
424
+ return t(this, E);
393
425
  }
394
426
  templateLength(i = ".ng-container-body") {
395
- var t;
396
- return ((t = e(this, _).get(i)) == null ? void 0 : t.length) || 1;
427
+ var e;
428
+ return ((e = t(this, C).get(i)) == null ? void 0 : e.length) || 1;
397
429
  }
398
430
  };
399
- E = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), I = new WeakMap(), B = new WeakMap(), N = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), G = new WeakMap(), ae = new WeakMap(), ce = new WeakMap(), J = new WeakMap(), a($e, "RowManager");
400
- let qe = $e;
401
- var X, Y, he, de, fe, ue, ge;
402
- const K = class K extends HTMLElement {
431
+ S = new WeakMap(), C = new WeakMap(), E = new WeakMap(), H = new WeakMap(), B = new WeakMap(), N = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), G = new WeakMap(), at = new WeakMap(), ct = new WeakMap(), J = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), a(Ot, "RowManager");
432
+ let kt = Ot;
433
+ var X, Y, ft, ut, gt, bt, yt;
434
+ const F = class F extends HTMLElement {
403
435
  constructor() {
404
436
  super();
405
437
  c(this, X, null);
406
438
  c(this, Y);
407
- c(this, he, /* @__PURE__ */ a(() => {
439
+ c(this, ft, /* @__PURE__ */ a(() => {
408
440
  [
409
441
  { selector: ".ng-container-body", type: null },
410
442
  { selector: ".ng-container-left", type: "left" },
@@ -412,13 +444,13 @@ const K = class K extends HTMLElement {
412
444
  ].forEach(({ selector: s, type: n }) => {
413
445
  const r = this.querySelector(s);
414
446
  if (!r) return;
415
- const o = e(this, fe).call(this, e(this, X), n);
447
+ const o = t(this, gt).call(this, t(this, X), n);
416
448
  r.innerHTML = "", r.appendChild(o);
417
449
  });
418
450
  }, "#renderSplitContainers"));
419
- c(this, de, /* @__PURE__ */ a(() => {
420
- ["left", "right"].forEach((t) => {
421
- const s = this.querySelector(`.ng-container-${t}`), n = s == null ? void 0 : s.querySelector("table");
451
+ c(this, ut, /* @__PURE__ */ a(() => {
452
+ ["left", "right"].forEach((e) => {
453
+ const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
422
454
  if (!s || !n) return;
423
455
  let r = 0;
424
456
  n.querySelectorAll("col").forEach((o) => {
@@ -427,23 +459,17 @@ const K = class K extends HTMLElement {
427
459
  }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
428
460
  });
429
461
  }, "#updateContainerWidths"));
430
- x(this, "generate", /* @__PURE__ */ a((t) => {
431
- if (!t) return;
432
- g(this, X, Ae.compile(t)), e(this, X).style.display = "table", e(this, he).call(this), e(this, Y).initialize(), e(this, de).call(this);
433
- const s = this.querySelector(".ng-container-body");
434
- s && s.addEventListener("scroll", () => {
435
- var n;
436
- (n = this.querySelector("nine-table-hscrollbar")) == null || n.refresh();
437
- }), setTimeout(() => {
438
- var n;
439
- (n = this.querySelector("nine-table-hscrollbar")) == null || n.refresh();
440
- }, 0);
462
+ x(this, "generate", /* @__PURE__ */ a((e) => {
463
+ e && (g(this, X, Tt.compile(e)), t(this, X).style.display = "table", t(this, ft).call(this), t(this, Y).initialize(), t(this, ut).call(this), setTimeout(() => {
464
+ var s;
465
+ (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
466
+ }, 0));
441
467
  }, "generate"));
442
468
  /**
443
469
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
444
470
  */
445
- c(this, fe, /* @__PURE__ */ a((t, s) => {
446
- const n = t.cloneNode(!0);
471
+ c(this, gt, /* @__PURE__ */ a((e, s) => {
472
+ const n = e.cloneNode(!0);
447
473
  return s === "left" ? n.querySelectorAll("col, th, td").forEach((r) => {
448
474
  r.getAttribute("fixed") !== "left" && r.remove();
449
475
  }) : s === "right" ? n.querySelectorAll("col, th, td").forEach((r) => {
@@ -452,20 +478,20 @@ const K = class K extends HTMLElement {
452
478
  r.remove();
453
479
  }), n;
454
480
  }, "#createSplitTable"));
455
- x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this, Y).getRowHeight(), "getRowHeight"));
456
- x(this, "scrollToX", /* @__PURE__ */ a((t) => {
481
+ x(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, Y).getRowHeight(), "getRowHeight"));
482
+ x(this, "scrollToX", /* @__PURE__ */ a((e) => {
457
483
  const s = this.querySelector(".ng-container-body");
458
- s && (s.scrollLeft = t);
484
+ s && (s.scrollLeft = e);
459
485
  }, "scrollToX"));
460
- x(this, "scrollToY", /* @__PURE__ */ a((t) => {
486
+ x(this, "scrollToY", /* @__PURE__ */ a((e) => {
461
487
  const s = this.querySelector(".ng-container-body");
462
- s && (s.scrollTop = t);
488
+ s && (s.scrollTop = e);
463
489
  }, "scrollToY"));
464
- c(this, ue, /* @__PURE__ */ a(() => {
465
- e(this, ge).call(this);
490
+ c(this, bt, /* @__PURE__ */ a(() => {
491
+ t(this, yt).call(this);
466
492
  }, "#init"));
467
- c(this, ge, /* @__PURE__ */ a(() => {
468
- const t = K.SCROLLBAR_SIZE;
493
+ c(this, yt, /* @__PURE__ */ a(() => {
494
+ const e = F.SCROLLBAR_SIZE;
469
495
  this.innerHTML = `
470
496
  <style>
471
497
  nine-table-sheet {
@@ -488,7 +514,7 @@ const K = class K extends HTMLElement {
488
514
  flex-direction: row;
489
515
  flex: 1 1 auto;
490
516
  width: 100%;
491
- height: calc(100% - ${t}px);
517
+ height: calc(100% - ${e}px);
492
518
  overflow: hidden;
493
519
  position: relative;
494
520
  }
@@ -532,16 +558,16 @@ const K = class K extends HTMLElement {
532
558
  nine-table-sheet .ng-container-bottom {
533
559
  display: flex;
534
560
  flex-direction: row;
535
- height: ${t}px;
536
- min-height: ${t}px;
561
+ height: ${e}px;
562
+ min-height: ${e}px;
537
563
  flex-shrink: 0;
538
564
  background: #f9fafb;
539
565
  border-top: 1px solid #e5e7eb;
540
566
  }
541
567
 
542
568
  nine-table-sheet .ng-scroll-edge {
543
- width: ${t}px;
544
- min-width: ${t}px;
569
+ width: ${e}px;
570
+ min-width: ${e}px;
545
571
  height: 100%;
546
572
  flex-shrink: 0;
547
573
  background: #f3f4f6;
@@ -588,54 +614,54 @@ const K = class K extends HTMLElement {
588
614
  </div>
589
615
  `;
590
616
  }, "#render"));
591
- g(this, Y, new qe(this));
617
+ g(this, Y, new kt(this));
592
618
  }
593
619
  connectedCallback() {
594
- e(this, ue).call(this);
620
+ t(this, bt).call(this);
595
621
  }
596
622
  disconnectedCallback() {
597
623
  this.innerHTML = "", Z.log("NineTableSheet destroyed.");
598
624
  }
599
625
  };
600
- X = new WeakMap(), Y = new WeakMap(), he = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), a(K, "NineTableSheet"), x(K, "SCROLLBAR_SIZE", 16);
601
- let ie = K;
602
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ie);
603
- var be, Q;
604
- const We = class We extends HTMLElement {
626
+ X = new WeakMap(), Y = new WeakMap(), ft = new WeakMap(), ut = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), yt = new WeakMap(), a(F, "NineTableSheet"), x(F, "SCROLLBAR_SIZE", 16);
627
+ let it = F;
628
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", it);
629
+ var pt, Q;
630
+ const Dt = class Dt extends HTMLElement {
605
631
  constructor() {
606
632
  super();
607
- c(this, be, /* @__PURE__ */ a(() => {
608
- var t;
609
- (t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
633
+ c(this, pt, /* @__PURE__ */ a(() => {
634
+ var e;
635
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
610
636
  var o;
611
637
  const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
612
- e(this, Q).call(this, r, n);
613
- }), e(this, Q).call(this, 0, !1);
638
+ t(this, Q).call(this, r, n);
639
+ }), t(this, Q).call(this, 0, !1);
614
640
  }, "#init"));
615
- c(this, Q, /* @__PURE__ */ a((t, s = !1) => {
641
+ c(this, Q, /* @__PURE__ */ a((e, s = !1) => {
616
642
  const n = /* @__PURE__ */ a(() => {
617
643
  const u = Array.from(this.querySelectorAll("nine-table-sheet"));
618
644
  Array.from(this.querySelectorAll("nine-splitter")).forEach((w) => w.style.setProperty("display", "none"));
619
645
  const y = u.filter((w) => w.classList.contains("active"));
620
646
  y.length < 2 || y.forEach((w) => {
621
- const v = parseInt(w.getAttribute("data-index"), 10), C = this.querySelector(`nine-splitter[data-split-index="${v}"]`), Ne = u[v + 1];
622
- C && Ne && Ne.classList.contains("active") && C.style.setProperty("display", "flex");
647
+ const v = parseInt(w.getAttribute("data-index"), 10), _ = this.querySelector(`nine-splitter[data-split-index="${v}"]`), Vt = u[v + 1];
648
+ _ && Vt && Vt.classList.contains("active") && _.style.setProperty("display", "flex");
623
649
  });
624
650
  }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
625
- if (!l[t]) return;
651
+ if (!l[e]) return;
626
652
  if (!s)
627
653
  l.forEach((u, f) => {
628
- u.classList.toggle("active", f === t);
654
+ u.classList.toggle("active", f === e);
629
655
  }), h.forEach((u, f) => {
630
- const y = f === t;
656
+ const y = f === e;
631
657
  u.classList.toggle("active", y), u.style.flex = y ? "1 1 100%" : "";
632
658
  });
633
659
  else {
634
- const u = l[t], f = r.querySelectorAll(".nine-tab-item.active");
660
+ const u = l[e], f = r.querySelectorAll(".nine-tab-item.active");
635
661
  if (u.classList.contains("active") && f.length <= 1)
636
662
  return;
637
663
  u.classList.toggle("active");
638
- const y = o.querySelector(`nine-table-sheet[data-index="${t}"]`);
664
+ const y = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
639
665
  y && (y.classList.toggle("active"), y.classList.contains("active") || (y.style.flex = ""));
640
666
  }
641
667
  const d = o.querySelectorAll("nine-table-sheet.active");
@@ -645,35 +671,35 @@ const We = class We extends HTMLElement {
645
671
  }, "#switchSheet"));
646
672
  }
647
673
  connectedCallback() {
648
- e(this, be).call(this);
674
+ t(this, pt).call(this);
649
675
  }
650
676
  };
651
- be = new WeakMap(), Q = new WeakMap(), a(We, "NineTableSheets");
652
- let Te = We;
653
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Te);
654
- var S, ye, ee, pe;
655
- const Oe = class Oe {
677
+ pt = new WeakMap(), Q = new WeakMap(), a(Dt, "NineTableSheets");
678
+ let Lt = Dt;
679
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Lt);
680
+ var R, mt, tt, wt;
681
+ const zt = class zt {
656
682
  constructor(i) {
657
- c(this, S);
658
- c(this, ye, /* @__PURE__ */ a(() => {
659
- e(this, pe).call(this), new ResizeObserver((i) => {
660
- for (let t of i)
661
- e(this, S).getAttribute("auto-height") === "true" && e(this, ee).call(this);
662
- }).observe(e(this, S));
683
+ c(this, R);
684
+ c(this, mt, /* @__PURE__ */ a(() => {
685
+ t(this, wt).call(this), new ResizeObserver((i) => {
686
+ for (let e of i)
687
+ t(this, R).getAttribute("auto-height") === "true" && t(this, tt).call(this);
688
+ }).observe(t(this, R));
663
689
  }, "#init"));
664
- c(this, ee, /* @__PURE__ */ a(() => {
690
+ c(this, tt, /* @__PURE__ */ a(() => {
665
691
  var h, d;
666
- const i = Array.from(e(this, S).shadowRoot.querySelectorAll("nine-table-sheet.active"));
692
+ const i = Array.from(t(this, R).shadowRoot.querySelectorAll("nine-table-sheet.active"));
667
693
  if (i.length === 0) return;
668
- const t = parseInt(e(this, S).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((u) => u.getRowHeight())), n = (h = e(this, S).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, r = (d = e(this, S).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, o = ie.SCROLLBAR_SIZE, l = t * s + n + r + o;
669
- e(this, S).style.height = `${l}px`;
694
+ const e = parseInt(t(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((u) => u.getRowHeight())), n = (h = t(this, R).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, r = (d = t(this, R).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, o = it.SCROLLBAR_SIZE, l = e * s + n + r + o;
695
+ t(this, R).style.height = `${l}px`;
670
696
  }, "#applyAutoHeight"));
671
- c(this, pe, /* @__PURE__ */ a(() => {
672
- const t = Array.from(e(this, S).children).filter((h) => h.tagName === "TABLE"), s = e(this, S).getAttribute("auto-height") === "true", n = t.length, r = t.map((h, d) => {
697
+ c(this, wt, /* @__PURE__ */ a(() => {
698
+ const e = Array.from(t(this, R).children).filter((h) => h.tagName === "TABLE"), s = t(this, R).getAttribute("auto-height") === "true", n = e.length, r = e.map((h, d) => {
673
699
  const f = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, y = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
674
700
  return f + y;
675
- }).join(""), o = t.map((h, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
676
- e(this, S).shadowRoot.innerHTML = `
701
+ }).join(""), o = e.map((h, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
702
+ t(this, R).shadowRoot.innerHTML = `
677
703
  <style>
678
704
  :host {
679
705
  display: flex;
@@ -772,178 +798,178 @@ const Oe = class Oe {
772
798
  </nine-table-body>
773
799
  <nine-table-footer></nine-table-footer>
774
800
  `;
775
- const l = e(this, S).shadowRoot.querySelectorAll("nine-table-sheet");
801
+ const l = t(this, R).shadowRoot.querySelectorAll("nine-table-sheet");
776
802
  l == null || l.forEach((h, d) => {
777
- t[d] && setTimeout(() => {
778
- h.generate(t[d]), s && e(this, ee).call(this);
803
+ e[d] && setTimeout(() => {
804
+ h.generate(e[d]), s && t(this, tt).call(this);
779
805
  });
780
806
  });
781
807
  }, "#render"));
782
- g(this, S, i), e(this, ye).call(this);
808
+ g(this, R, i), t(this, mt).call(this);
783
809
  }
784
810
  };
785
- S = new WeakMap(), ye = new WeakMap(), ee = new WeakMap(), pe = new WeakMap(), a(Oe, "LayoutManager");
786
- let ke = Oe;
787
- var H, P;
788
- const ze = class ze {
811
+ R = new WeakMap(), mt = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), a(zt, "LayoutManager");
812
+ let Ct = zt;
813
+ var M, P;
814
+ const Bt = class Bt {
789
815
  constructor(i) {
790
- c(this, H);
816
+ c(this, M);
791
817
  c(this, P, -1);
792
- x(this, "count", /* @__PURE__ */ a(() => e(this, H).rawRecords.length, "count"));
793
- g(this, H, i);
818
+ x(this, "count", /* @__PURE__ */ a(() => t(this, M).rawRecords.length, "count"));
819
+ g(this, M, i);
794
820
  }
795
821
  get at() {
796
- return e(this, P);
822
+ return t(this, P);
797
823
  }
798
824
  set at(i) {
799
825
  var s, n;
800
826
  g(this, P, parseInt(i, 10));
801
- const t = ((n = (s = e(this, H).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, H).owner.body;
802
- t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, P)}"]`) && setTimeout(() => {
827
+ const e = ((n = (s = t(this, M).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || t(this, M).owner.body;
828
+ e && !e.querySelector(`tbody.bindable tr[data-row="${t(this, P)}"]`) && setTimeout(() => {
803
829
  var r, o;
804
- (o = (r = e(this, H).owner).scrollTo_V1) == null || o.call(r, e(this, P));
830
+ (o = (r = t(this, M).owner).scrollTo_V1) == null || o.call(r, t(this, P));
805
831
  });
806
832
  }
807
833
  };
808
- H = new WeakMap(), P = new WeakMap(), a(ze, "ngRow");
809
- let Le = ze;
810
- var A, m, q, U, me, M, we, te, xe, ve, F;
834
+ M = new WeakMap(), P = new WeakMap(), a(Bt, "ngRow");
835
+ let _t = Bt;
836
+ var A, m, q, K, xt, $, vt, et, St, Et, U;
811
837
  const T = class T {
812
- constructor(i, t) {
838
+ constructor(i, e) {
813
839
  c(this, A);
814
840
  c(this, m);
815
841
  c(this, q, []);
816
- c(this, U, []);
817
- c(this, me, 0);
818
- c(this, M, []);
819
- c(this, we, /* @__PURE__ */ a(() => {
820
- g(this, M, []);
821
- const i = e(this, A).template || [];
822
- Array.from(i).forEach((t) => {
842
+ c(this, K, []);
843
+ c(this, xt, 0);
844
+ c(this, $, []);
845
+ c(this, vt, /* @__PURE__ */ a(() => {
846
+ g(this, $, []);
847
+ const i = t(this, A).template || [];
848
+ Array.from(i).forEach((e) => {
823
849
  var s;
824
- e(this, M).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
825
- }), (e(this, m).rawRecords || []).forEach((t) => {
826
- t.__ng || (t.__ng = e(this, te).call(this)), t.__ng.height = e(this, M).slice();
850
+ t(this, $).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
851
+ }), (t(this, m).rawRecords || []).forEach((e) => {
852
+ e.__ng || (e.__ng = t(this, et).call(this)), e.__ng.height = t(this, $).slice();
827
853
  });
828
854
  }, "#initialize"));
829
855
  x(this, "set", /* @__PURE__ */ a((i) => {
830
856
  this.clear(), this.add(i, !1);
831
857
  }, "set"));
832
- c(this, te, /* @__PURE__ */ a(() => ({
858
+ c(this, et, /* @__PURE__ */ a(() => ({
833
859
  rowState: T.ROW_STATE.EMPTY,
834
860
  deleted: !1,
835
861
  filtered: !1,
836
- height: e(this, M).slice(),
862
+ height: t(this, $).slice(),
837
863
  o: {},
838
864
  c: {},
839
- _: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, M).slice(), -1, {}, {}]
865
+ _: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, $).slice(), -1, {}, {}]
840
866
  }), "#getDefaultMeta"));
841
867
  x(this, "reset", /* @__PURE__ */ a(() => {
842
- g(this, q, []), g(this, U, []);
868
+ g(this, q, []), g(this, K, []);
843
869
  }, "reset"));
844
870
  x(this, "clear", /* @__PURE__ */ a(() => {
845
871
  var i;
846
- e(this, m).rawRecords = [], g(this, q, []), g(this, U, []), (i = e(this, m).viewRecords) != null && i.reset && e(this, m).viewRecords.reset();
872
+ t(this, m).rawRecords = [], g(this, q, []), g(this, K, []), (i = t(this, m).viewRecords) != null && i.reset && t(this, m).viewRecords.reset();
847
873
  }, "clear"));
848
- c(this, xe, /* @__PURE__ */ a((i) => {
874
+ c(this, St, /* @__PURE__ */ a((i) => {
849
875
  var n;
850
876
  Array.isArray(i) || (i = [i]);
851
- const t = typeof ((n = e(this, A).fields) == null ? void 0 : n.get) == "function" ? e(this, A).fields.get() : Object.keys(i[0] || {}), s = [];
877
+ const e = typeof ((n = t(this, A).fields) == null ? void 0 : n.get) == "function" ? t(this, A).fields.get() : Object.keys(i[0] || {}), s = [];
852
878
  return i.forEach((r) => {
853
879
  const o = { v: [] };
854
- t.forEach((l) => {
880
+ e.forEach((l) => {
855
881
  o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
856
882
  }), s.push(o);
857
883
  }), s;
858
884
  }, "#json2Array"));
859
- c(this, ve, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
860
- t.__ng = e(this, te).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = T.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
885
+ c(this, Et, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
886
+ e.__ng = t(this, et).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = T.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
861
887
  }), i), "#defaultInsert"));
862
- x(this, "add", /* @__PURE__ */ a((i, t = !0) => {
888
+ x(this, "add", /* @__PURE__ */ a((i, e = !0) => {
863
889
  var r;
864
890
  i === void 0 && (i = {});
865
- const s = e(this, xe).call(this, i);
866
- e(this, m).rawRecords = e(this, m).rawRecords.concat(e(this, ve).call(this, s)), this.resetRecords();
891
+ const s = t(this, St).call(this, i);
892
+ t(this, m).rawRecords = t(this, m).rawRecords.concat(t(this, Et).call(this, s)), this.resetRecords();
867
893
  const n = this.count() - 1;
868
- return t || s.forEach((o, l) => {
869
- const h = e(this, m).rawRecords[n - l];
894
+ return e || s.forEach((o, l) => {
895
+ const h = t(this, m).rawRecords[n - l];
870
896
  h && (h.__ng.rowState = T.ROW_STATE.EMPTY);
871
- }), (r = e(this, m).viewRecords) != null && r.reset && e(this, m).viewRecords.reset(), n;
897
+ }), (r = t(this, m).viewRecords) != null && r.reset && t(this, m).viewRecords.reset(), n;
872
898
  }, "add"));
873
899
  x(this, "delete", /* @__PURE__ */ a((i) => {
874
900
  var s;
875
- let t = [];
876
- Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this, m).owner.row.at] : t = [parseInt(i, 10)], t.sort((n, r) => r - n).forEach((n) => {
877
- if (e(this, q)[n]) {
878
- const r = e(this, q)[n].__ng.rowid;
879
- e(this, q)[n].__ng.rowState === T.ROW_STATE.INSERT ? e(this, m).rawRecords = e(this, m).rawRecords.filter((o) => o.__ng.rowid !== r) : e(this, m).rawRecords.forEach((o) => {
901
+ let e = [];
902
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, m).owner.row.at] : e = [parseInt(i, 10)], e.sort((n, r) => r - n).forEach((n) => {
903
+ if (t(this, q)[n]) {
904
+ const r = t(this, q)[n].__ng.rowid;
905
+ t(this, q)[n].__ng.rowState === T.ROW_STATE.INSERT ? t(this, m).rawRecords = t(this, m).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, m).rawRecords.forEach((o) => {
880
906
  o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = T.ROW_STATE.DELETE);
881
907
  });
882
908
  }
883
- }), this.resetRecords(), (s = e(this, m).viewRecords) != null && s.reset && e(this, m).viewRecords.reset();
909
+ }), this.resetRecords(), (s = t(this, m).viewRecords) != null && s.reset && t(this, m).viewRecords.reset();
884
910
  }, "delete"));
885
- x(this, "setValue", /* @__PURE__ */ a((i, t, s) => {
911
+ x(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
886
912
  var h;
887
913
  i = parseInt(i, 10);
888
- const r = (typeof ((h = e(this, A).fields) == null ? void 0 : h.get) == "function" ? e(this, A).fields.get() : []).indexOf(t);
914
+ const r = (typeof ((h = t(this, A).fields) == null ? void 0 : h.get) == "function" ? t(this, A).fields.get() : []).indexOf(e);
889
915
  if (r < 0) return;
890
916
  const o = this.getValidData()[i];
891
917
  if (!o) return;
892
918
  const l = o.v[r];
893
- l !== s && o.__ng.rowState !== T.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = l), o.__ng.rowState = T.ROW_STATE.UPDATE), o.v[r] = s, e(this, m).owner.refreshData && e(this, m).owner.refreshData(i);
919
+ l !== s && o.__ng.rowState !== T.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = T.ROW_STATE.UPDATE), o.v[r] = s, t(this, m).owner.refreshData && t(this, m).owner.refreshData(i);
894
920
  }, "setValue"));
895
921
  x(this, "resetRecords", /* @__PURE__ */ a(() => {
896
- g(this, U, e(this, m).rawRecords.filter((i) => !i.__ng.deleted)), g(this, q, e(this, m).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, m).rawRecords.forEach((i, t) => {
897
- i.__ng.rowidx = t;
898
- }), e(this, q).forEach((i, t) => {
899
- i.__ng.i = t;
922
+ g(this, K, t(this, m).rawRecords.filter((i) => !i.__ng.deleted)), g(this, q, t(this, m).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, m).rawRecords.forEach((i, e) => {
923
+ i.__ng.rowidx = e;
924
+ }), t(this, q).forEach((i, e) => {
925
+ i.__ng.i = e;
900
926
  });
901
927
  }, "resetRecords"));
902
- x(this, "getValidData", /* @__PURE__ */ a(() => (e(this, q).length === 0 && e(this, m).rawRecords.length > 0 && this.resetRecords(), e(this, q)), "getValidData"));
903
- c(this, F, /* @__PURE__ */ a((i) => {
928
+ x(this, "getValidData", /* @__PURE__ */ a(() => (t(this, q).length === 0 && t(this, m).rawRecords.length > 0 && this.resetRecords(), t(this, q)), "getValidData"));
929
+ c(this, U, /* @__PURE__ */ a((i) => {
904
930
  var s;
905
931
  if (!i) return i;
906
- const t = typeof ((s = e(this, A).fields) == null ? void 0 : s.get) == "function" ? e(this, A).fields.get() : [];
932
+ const e = typeof ((s = t(this, A).fields) == null ? void 0 : s.get) == "function" ? t(this, A).fields.get() : [];
907
933
  return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
908
934
  const r = {};
909
- return t.forEach((o, l) => {
935
+ return e.forEach((o, l) => {
910
936
  r[o] = n.v ? n.v[l] : n[o];
911
937
  }), r.__ng = n.__ng, r;
912
938
  }) : i;
913
939
  }, "#conv2"));
914
940
  x(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
915
- x(this, "get", /* @__PURE__ */ a((i, t) => {
941
+ x(this, "get", /* @__PURE__ */ a((i, e) => {
916
942
  var r;
917
943
  const s = this.getValidData();
918
944
  if (!s || s.length <= 0) return;
919
- if (i == null) return e(this, F).call(this, s);
945
+ if (i == null) return t(this, U).call(this, s);
920
946
  if (i < 0 || i >= s.length) return null;
921
- const n = typeof ((r = e(this, A).fields) == null ? void 0 : r.get) == "function" ? e(this, A).fields.get() : [];
922
- if (t != null) {
923
- const o = n.indexOf(t);
947
+ const n = typeof ((r = t(this, A).fields) == null ? void 0 : r.get) == "function" ? t(this, A).fields.get() : [];
948
+ if (e != null) {
949
+ const o = n.indexOf(e);
924
950
  return o >= 0 ? s[i].v[o] : null;
925
951
  }
926
- return e(this, F).call(this, s[i]);
952
+ return t(this, U).call(this, s[i]);
927
953
  }, "get"));
928
- g(this, A, i), g(this, m, t), e(this, we).call(this);
954
+ g(this, A, i), g(this, m, e), t(this, vt).call(this);
929
955
  }
930
956
  get source() {
931
- return e(this, F).call(this, e(this, m).rawRecords);
957
+ return t(this, U).call(this, t(this, m).rawRecords);
932
958
  }
933
959
  set source(i) {
934
960
  this.clear(), this.add(i, !1);
935
961
  }
936
962
  get nextId() {
937
- return ++Ye(this, me)._;
963
+ return ++Ut(this, xt)._;
938
964
  }
939
965
  get length() {
940
- return e(this, q).length;
966
+ return t(this, q).length;
941
967
  }
942
968
  getRowCount() {
943
969
  return this.length;
944
970
  }
945
971
  };
946
- A = new WeakMap(), m = new WeakMap(), q = new WeakMap(), U = new WeakMap(), me = new WeakMap(), M = new WeakMap(), we = new WeakMap(), te = new WeakMap(), xe = new WeakMap(), ve = new WeakMap(), F = new WeakMap(), a(T, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
972
+ A = new WeakMap(), m = new WeakMap(), q = new WeakMap(), K = new WeakMap(), xt = new WeakMap(), $ = new WeakMap(), vt = new WeakMap(), et = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), U = new WeakMap(), a(T, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
947
973
  x(T, "ROW_STATE", {
948
974
  EMPTY: "EMPTY",
949
975
  NORMAL: "NORMAL",
@@ -951,57 +977,57 @@ x(T, "ROW_STATE", {
951
977
  UPDATE: "UPDATE",
952
978
  DELETE: "DELETE"
953
979
  });
954
- let Ce = T;
955
- const De = class De {
980
+ let It = T;
981
+ const Nt = class Nt {
956
982
  constructor(i) {
957
- this.owner = i, this.row = new Le(this), this.data = new Ce(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
958
- var t;
959
- (t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
960
- }, this.setDataSource = (t) => {
961
- this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(t || []);
962
- }, this.getRowState = (t) => {
983
+ this.owner = i, this.row = new _t(this), this.data = new It(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
984
+ var e;
985
+ (e = this.owner.view) != null && e.redraw && this.owner.view.redraw();
986
+ }, this.setDataSource = (e) => {
987
+ this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
988
+ }, this.getRowState = (e) => {
963
989
  var n, r;
964
- const s = parseInt(t, 10);
990
+ const s = parseInt(e, 10);
965
991
  if (!(s >= this.data.count()))
966
992
  return (r = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : r.rowState;
967
- }, this.getRowPosition = () => this.row.at, this.setRowPosition = (t) => {
968
- this.row.at = t;
969
- }, this.scrollTo_V1 = (t) => (t < 0 && (t = 0), t >= this.rawRecords.length && (t = this.rawRecords.length - 1), this.viewRecords.rawIndex = t, this.viewRecords.reset && this.viewRecords.reset(), !(t <= 0 || t >= this.rawRecords.length - 1)), this.getColumn = (t, s) => this.data.get(t, s), this.setColumn = (t, s, n) => {
970
- t = parseInt(t, 10), this.data.setValue(t, s, n);
993
+ }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
994
+ this.row.at = e;
995
+ }, 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) => {
996
+ e = parseInt(e, 10), this.data.setValue(e, s, n);
971
997
  }, this.setDataSource([]);
972
998
  }
973
999
  };
974
- a(De, "ngDataManager");
975
- let _e = De;
976
- var V, Se;
977
- const Be = class Be extends HTMLElement {
1000
+ a(Nt, "ngDataManager");
1001
+ let Ht = Nt;
1002
+ var V, Rt;
1003
+ const Pt = class Pt extends HTMLElement {
978
1004
  constructor() {
979
1005
  super();
980
1006
  //#created = false;
981
1007
  c(this, V);
982
- c(this, Se);
983
- this.attachShadow({ mode: "open" }), g(this, V, new _e(this));
1008
+ c(this, Rt);
1009
+ this.attachShadow({ mode: "open" }), g(this, V, new Ht(this));
984
1010
  }
985
1011
  connectedCallback() {
986
- g(this, Se, new ke(this)), Z.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1012
+ g(this, Rt, new Ct(this)), Z.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
987
1013
  }
988
1014
  disconnectedCallback() {
989
1015
  Z.log("NineTable disconnected.");
990
1016
  }
991
1017
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
992
1018
  get data() {
993
- return e(this, V).data;
1019
+ return t(this, V).data;
994
1020
  }
995
1021
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
996
1022
  get row() {
997
- return e(this, V).row;
1023
+ return t(this, V).row;
998
1024
  }
999
1025
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1000
1026
  get dataManager() {
1001
- return e(this, V);
1027
+ return t(this, V);
1002
1028
  }
1003
1029
  };
1004
- V = new WeakMap(), Se = new WeakMap(), a(Be, "NineTable");
1005
- let Ie = Be;
1006
- customElements.get("nine-table") || customElements.define("nine-table", Ie);
1030
+ V = new WeakMap(), Rt = new WeakMap(), a(Pt, "NineTable");
1031
+ let Mt = Pt;
1032
+ customElements.get("nine-table") || customElements.define("nine-table", Mt);
1007
1033
  //# sourceMappingURL=nine-table.js.map