@ninebone/table 0.0.354 β†’ 0.0.356

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,12 +1,12 @@
1
- var he = Object.defineProperty;
2
- var de = (m) => {
1
+ var ue = Object.defineProperty;
2
+ var be = (m) => {
3
3
  throw TypeError(m);
4
4
  };
5
- var be = (m, i, e) => i in m ? he(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e;
6
- var a = (m, i) => he(m, "name", { value: i, configurable: !0 });
7
- var x = (m, i, e) => be(m, typeof i != "symbol" ? i + "" : i, e), fe = (m, i, e) => i.has(m) || de("Cannot " + e);
8
- var t = (m, i, e) => (fe(m, i, "read from private field"), e ? e.call(m) : i.get(m)), h = (m, i, e) => i.has(m) ? de("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, e), b = (m, i, e, s) => (fe(m, i, "write to private field"), s ? s.call(m, e) : i.set(m, e), e);
9
- var ue = (m, i, e, s) => ({
5
+ var pe = (m, i, e) => i in m ? ue(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e;
6
+ var a = (m, i) => ue(m, "name", { value: i, configurable: !0 });
7
+ var x = (m, i, e) => pe(m, typeof i != "symbol" ? i + "" : i, e), ge = (m, i, e) => i.has(m) || be("Cannot " + e);
8
+ var t = (m, i, e) => (ge(m, i, "read from private field"), e ? e.call(m) : i.get(m)), c = (m, i, e) => i.has(m) ? be("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, e), b = (m, i, e, s) => (ge(m, i, "write to private field"), s ? s.call(m, e) : i.set(m, e), e);
9
+ var ye = (m, i, e, s) => ({
10
10
  set _(o) {
11
11
  b(m, i, o, e);
12
12
  },
@@ -14,26 +14,26 @@ var ue = (m, i, e, s) => ({
14
14
  return t(m, i, s);
15
15
  }
16
16
  });
17
- import { trace as ge } from "@ninebone/util";
18
- const te = class te extends ge.constructor {
17
+ import { trace as me } from "@ninebone/util";
18
+ const se = class se extends me.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- a(te, "Trace");
24
- let Pt = te;
25
- const I = new Pt();
26
- var _, W, y, N, B, P, mt, Y, xt;
27
- const ee = class ee extends HTMLElement {
23
+ a(se, "Trace");
24
+ let Xt = se;
25
+ const D = new Xt();
26
+ var _, I, y, B, N, P, xt, Y, vt;
27
+ const ne = class ne extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- h(this, _);
31
- h(this, W, !1);
32
- h(this, y);
33
- h(this, N);
34
- h(this, B);
35
- h(this, P);
36
- h(this, mt, /* @__PURE__ */ a(() => {
30
+ c(this, _);
31
+ c(this, I, !1);
32
+ c(this, y);
33
+ c(this, B);
34
+ c(this, N);
35
+ c(this, P);
36
+ c(this, xt, /* @__PURE__ */ a(() => {
37
37
  if (!t(this, _)) return;
38
38
  const e = t(this, _).querySelector(".ng-container-body");
39
39
  e && (b(this, P, new ResizeObserver(() => {
@@ -41,11 +41,11 @@ const ee = class ee extends HTMLElement {
41
41
  })), t(this, P).observe(e));
42
42
  }, "#observeResize"));
43
43
  x(this, "refresh", /* @__PURE__ */ a(() => {
44
- if (!t(this, _) || !t(this, y) || t(this, W)) return;
44
+ if (!t(this, _) || !t(this, y) || t(this, I)) return;
45
45
  const e = t(this, y).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const o = t(this, y).track, r = t(this, y).thumb, n = t(this, _).querySelector(".ng-container-bottom"), l = e.clientWidth, c = s.scrollWidth;
48
- if (l !== 0 && c > l)
47
+ const o = t(this, y).track, r = t(this, y).thumb, n = t(this, _).querySelector(".ng-container-bottom"), l = e.clientWidth, h = s.scrollWidth;
48
+ if (l !== 0 && h > l)
49
49
  n && (n.style.display = "flex");
50
50
  else {
51
51
  n && (n.style.display = "none");
@@ -53,38 +53,38 @@ const ee = class ee extends HTMLElement {
53
53
  }
54
54
  const d = o.clientWidth;
55
55
  if (d <= 0) return;
56
- const f = Math.max(Math.min(d * (l / c), d), 20);
56
+ const f = Math.max(Math.min(d * (l / h), d), 20);
57
57
  r.style.width = `${f}px`;
58
- const u = e.scrollLeft, g = c - l;
58
+ const u = e.scrollLeft, g = h - l;
59
59
  let p = 0;
60
60
  g > 0 && (p = parseInt(u / g * (d - f), 10)), p < 0 && (p = 0);
61
61
  const E = d - f;
62
- p > E && (p = E), r.style.left = `${p}px`, I.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= E - 1;
62
+ p > E && (p = E), r.style.left = `${p}px`, D.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= E - 1;
63
63
  }, "refresh"));
64
- h(this, Y, /* @__PURE__ */ a((e) => {
64
+ c(this, Y, /* @__PURE__ */ a((e) => {
65
65
  if (!t(this, y)) return !1;
66
66
  const s = t(this, y).container, o = s.querySelector("table");
67
67
  if (!o) return !1;
68
68
  const r = t(this, y).track.getBoundingClientRect(), n = t(this, y).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
- const c = r.width - n;
72
- l > c && (l = c), l = parseInt(l, 10), t(this, y).thumb.style.left = `${l}px`, t(this, y).left.disabled = l === 0, t(this, y).right.disabled = l >= c - 1;
71
+ const h = r.width - n;
72
+ l > h && (l = h), l = parseInt(l, 10), t(this, y).thumb.style.left = `${l}px`, t(this, y).left.disabled = l === 0, t(this, y).right.disabled = l >= h - 1;
73
73
  const d = s.clientWidth, u = o.scrollWidth - d;
74
- return c > 0 && u > 0 && (s.scrollLeft = l / c * u), l > 0 && l < c - 1;
74
+ return h > 0 && u > 0 && (s.scrollLeft = l / h * u), l > 0 && l < h - 1;
75
75
  }, "#thumbMoveTo"));
76
- h(this, xt, /* @__PURE__ */ a(() => {
76
+ c(this, vt, /* @__PURE__ */ a(() => {
77
77
  const e = /* @__PURE__ */ a((o) => {
78
- clearInterval(t(this, N)), clearInterval(t(this, B));
78
+ clearInterval(t(this, B)), clearInterval(t(this, N));
79
79
  const r = parseInt(t(this, y).thumb.style.left || 0, 10);
80
- t(this, Y).call(this, r + o), b(this, N, setInterval(() => {
81
- clearInterval(t(this, N)), b(this, B, setInterval(() => {
80
+ t(this, Y).call(this, r + o), b(this, B, setInterval(() => {
81
+ clearInterval(t(this, B)), b(this, N, setInterval(() => {
82
82
  const n = parseInt(t(this, y).thumb.style.left || 0, 10);
83
- t(this, Y).call(this, n + o) || clearInterval(t(this, B));
83
+ t(this, Y).call(this, n + o) || clearInterval(t(this, N));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
- clearInterval(t(this, N)), clearInterval(t(this, B));
87
+ clearInterval(t(this, B)), clearInterval(t(this, N));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
90
  t(this, y).left.addEventListener(o, s), t(this, y).right.addEventListener(o, s), t(this, y).track.addEventListener(o, s);
@@ -99,13 +99,13 @@ const ee = class ee extends HTMLElement {
99
99
  t(this, Y).call(this, o.clientX - r.left - n / 2);
100
100
  }), t(this, y).thumb.addEventListener("mousedown", (o) => {
101
101
  if (o.button !== 0) return;
102
- o.stopPropagation(), o.preventDefault(), b(this, W, !0), this.shiftX = o.clientX - t(this, y).thumb.getBoundingClientRect().left;
102
+ o.stopPropagation(), o.preventDefault(), b(this, I, !0), this.shiftX = o.clientX - t(this, y).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ a((l) => {
104
- if (!t(this, W)) return;
105
- const c = t(this, y).track.getBoundingClientRect();
106
- t(this, Y).call(this, l.clientX - c.left - this.shiftX);
104
+ if (!t(this, I)) return;
105
+ const h = t(this, y).track.getBoundingClientRect();
106
+ t(this, Y).call(this, l.clientX - h.left - this.shiftX);
107
107
  }, "onMouseMove"), n = /* @__PURE__ */ a(() => {
108
- b(this, W, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
108
+ b(this, I, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", n);
111
111
  });
@@ -189,8 +189,8 @@ const ee = class ee extends HTMLElement {
189
189
  left: this.querySelector(".ng-scroll-left"),
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
- t(this, W) || this.refresh();
193
- }), t(this, xt).call(this), t(this, mt).call(this), this.refresh();
192
+ t(this, I) || this.refresh();
193
+ }), t(this, vt).call(this), t(this, xt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
@@ -198,73 +198,73 @@ const ee = class ee extends HTMLElement {
198
198
  t(this, P) && t(this, P).disconnect();
199
199
  }
200
200
  };
201
- _ = new WeakMap(), W = new WeakMap(), y = new WeakMap(), N = new WeakMap(), B = new WeakMap(), P = new WeakMap(), mt = new WeakMap(), Y = new WeakMap(), xt = new WeakMap(), a(ee, "NineTableHScrollBar");
202
- let Yt = ee;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Yt);
204
- var V, O, v, rt, lt, vt;
205
- const ie = class ie extends HTMLElement {
201
+ _ = new WeakMap(), I = new WeakMap(), y = new WeakMap(), B = new WeakMap(), N = new WeakMap(), P = new WeakMap(), xt = new WeakMap(), Y = new WeakMap(), vt = new WeakMap(), a(ne, "NineTableHScrollBar");
202
+ let jt = ne;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", jt);
204
+ var V, W, w, lt, at, wt;
205
+ const oe = class oe extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- h(this, V);
209
- h(this, O, !1);
210
- h(this, v);
211
- h(this, rt, 0);
212
- h(this, lt, 0);
208
+ c(this, V);
209
+ c(this, W, !1);
210
+ c(this, w);
211
+ c(this, lt, 0);
212
+ c(this, at, 0);
213
213
  /**
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
216
  x(this, "refresh", /* @__PURE__ */ a(() => {
217
- if (!t(this, V) || !t(this, v) || t(this, O)) return;
218
- const e = t(this, v).container, s = e.querySelector("table");
217
+ if (!t(this, V) || !t(this, w) || t(this, W)) return;
218
+ const e = t(this, w).container, s = e.querySelector("table");
219
219
  if (!s) return;
220
- const o = t(this, v).track, r = t(this, v).thumb, n = e.clientHeight, l = s.scrollHeight;
220
+ const o = t(this, w).track, r = t(this, w).thumb, n = e.clientHeight, l = s.scrollHeight;
221
221
  if (l <= n) {
222
- r.style.display = "none", t(this, v).top.disabled = !0, t(this, v).bottom.disabled = !0;
222
+ r.style.display = "none", t(this, w).top.disabled = !0, t(this, w).bottom.disabled = !0;
223
223
  return;
224
224
  } else
225
225
  r.style.display = "block";
226
- const c = o.clientHeight;
227
- if (c <= 0) return;
228
- const d = Math.max(Math.min(c * (n / l), c), 20);
226
+ const h = o.clientHeight;
227
+ if (h <= 0) return;
228
+ const d = Math.max(Math.min(h * (n / l), h), 20);
229
229
  r.style.height = `${d}px`;
230
230
  const f = e.scrollTop, u = l - n;
231
231
  let g = 0;
232
- u > 0 && (g = f / u * (c - d));
233
- const p = c - d;
234
- g < 0 && (g = 0), g > p && (g = p), r.style.top = `${g}px`, t(this, v).top.disabled = f <= 0, t(this, v).bottom.disabled = f >= u - 1;
232
+ u > 0 && (g = f / u * (h - d));
233
+ const p = h - d;
234
+ g < 0 && (g = 0), g > p && (g = p), r.style.top = `${g}px`, t(this, w).top.disabled = f <= 0, t(this, w).bottom.disabled = f >= u - 1;
235
235
  }, "refresh"));
236
- h(this, vt, /* @__PURE__ */ a(() => {
237
- const e = t(this, v).container;
236
+ c(this, wt, /* @__PURE__ */ a(() => {
237
+ const e = t(this, w).container;
238
238
  e.addEventListener("scroll", () => {
239
- t(this, O) || this.refresh();
240
- }), t(this, v).thumb.addEventListener("mousedown", (s) => {
239
+ t(this, W) || this.refresh();
240
+ }), t(this, w).thumb.addEventListener("mousedown", (s) => {
241
241
  if (s.button !== 0) return;
242
- s.stopPropagation(), s.preventDefault(), b(this, O, !0), b(this, rt, s.clientY), b(this, lt, e.scrollTop);
242
+ s.stopPropagation(), s.preventDefault(), b(this, W, !0), b(this, lt, s.clientY), b(this, at, e.scrollTop);
243
243
  const o = /* @__PURE__ */ a((n) => {
244
- if (!t(this, O)) return;
245
- const l = t(this, v).track.getBoundingClientRect(), c = t(this, v).thumb.clientHeight, f = l.height - c, u = n.clientY - t(this, rt), g = e.clientHeight, p = e.querySelector("table");
246
- I.log(p), I.log(p.scrollHeight);
244
+ if (!t(this, W)) return;
245
+ const l = t(this, w).track.getBoundingClientRect(), h = t(this, w).thumb.clientHeight, f = l.height - h, u = n.clientY - t(this, lt), g = e.clientHeight, p = e.querySelector("table");
246
+ D.log(p), D.log(p.scrollHeight);
247
247
  const H = p.scrollHeight - g;
248
248
  if (f > 0 && H > 0) {
249
- const yt = u / f * H;
250
- e.scrollTop = t(this, lt) + yt;
249
+ const pt = u / f * H;
250
+ e.scrollTop = t(this, at) + pt;
251
251
  }
252
252
  this.refresh();
253
253
  }, "onMouseMove"), r = /* @__PURE__ */ a(() => {
254
- b(this, O, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
254
+ b(this, W, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
255
255
  }, "onMouseUp");
256
256
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
257
- }), t(this, v).track.addEventListener("mousedown", (s) => {
258
- if (s.button !== 0 || s.target === t(this, v).thumb) return;
259
- const o = t(this, v).track.getBoundingClientRect(), r = t(this, v).thumb.clientHeight, n = s.clientY - o.top - r / 2, c = o.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
260
- if (c > 0 && u > 0) {
261
- const g = Math.max(0, Math.min(1, n / c));
257
+ }), t(this, w).track.addEventListener("mousedown", (s) => {
258
+ if (s.button !== 0 || s.target === t(this, w).thumb) return;
259
+ const o = t(this, w).track.getBoundingClientRect(), r = t(this, w).thumb.clientHeight, n = s.clientY - o.top - r / 2, h = o.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
260
+ if (h > 0 && u > 0) {
261
+ const g = Math.max(0, Math.min(1, n / h));
262
262
  e.scrollTop = g * u;
263
263
  }
264
264
  this.refresh();
265
- }), t(this, v).top.addEventListener("click", () => {
265
+ }), t(this, w).top.addEventListener("click", () => {
266
266
  e.scrollTop -= 40;
267
- }), t(this, v).bottom.addEventListener("click", () => {
267
+ }), t(this, w).bottom.addEventListener("click", () => {
268
268
  e.scrollTop += 40;
269
269
  });
270
270
  }, "#init"));
@@ -340,21 +340,21 @@ const ie = class ie extends HTMLElement {
340
340
  setTimeout(e, 10);
341
341
  return;
342
342
  }
343
- b(this, v, {
343
+ b(this, w, {
344
344
  container: s,
345
345
  track: this.querySelector(".ng-scroll-track"),
346
346
  thumb: this.querySelector(".ng-scroll-thumb"),
347
347
  top: this.querySelector(".ng-scroll-top"),
348
348
  bottom: this.querySelector(".ng-scroll-bottom")
349
- }), t(this, vt).call(this), this.refresh();
349
+ }), t(this, wt).call(this), this.refresh();
350
350
  }, "initWhenReady");
351
351
  e();
352
352
  }
353
353
  };
354
- V = new WeakMap(), O = new WeakMap(), v = new WeakMap(), rt = new WeakMap(), lt = new WeakMap(), vt = new WeakMap(), a(ie, "NineTableVScrollBar");
355
- let Vt = ie;
356
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Vt);
357
- var wt, G;
354
+ V = new WeakMap(), W = new WeakMap(), w = new WeakMap(), lt = new WeakMap(), at = new WeakMap(), wt = new WeakMap(), a(oe, "NineTableVScrollBar");
355
+ let Ut = oe;
356
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Ut);
357
+ var St, Z;
358
358
  const C = class C {
359
359
  /**
360
360
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
@@ -369,15 +369,15 @@ const C = class C {
369
369
  var o, r, n, l;
370
370
  if (!i) return null;
371
371
  const e = i.cloneNode(!0);
372
- return t(o = C, wt).call(o, e), t(r = C, G).call(r, e, "thead"), t(n = C, G).call(n, e, "tbody"), t(l = C, G).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((c, d) => {
373
- const f = c.getAttribute("fixed");
372
+ return t(o = C, St).call(o, e), t(r = C, Z).call(r, e, "thead"), t(n = C, Z).call(n, e, "tbody"), t(l = C, Z).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, d) => {
373
+ const f = h.getAttribute("fixed");
374
374
  f && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((u) => {
375
375
  u.setAttribute("fixed", f);
376
376
  });
377
377
  }), e;
378
378
  }
379
379
  };
380
- wt = new WeakMap(), G = new WeakMap(), a(C, "TableCompiler"), h(C, wt, /* @__PURE__ */ a((i) => {
380
+ St = new WeakMap(), Z = new WeakMap(), a(C, "TableCompiler"), c(C, St, /* @__PURE__ */ a((i) => {
381
381
  if (!i.querySelector("colgroup")) {
382
382
  const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, o = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
383
383
  for (let n = 0; n < s; n++) {
@@ -391,18 +391,18 @@ wt = new WeakMap(), G = new WeakMap(), a(C, "TableCompiler"), h(C, wt, /* @__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(C, G, /* @__PURE__ */ a((i, e) => {
394
+ }, "#ensureTableStructure")), c(C, Z, /* @__PURE__ */ a((i, e) => {
395
395
  const s = Array.from(i.querySelectorAll(e + " tr")), o = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
396
396
  if (r === 0 || o.length === 0) return;
397
397
  let n = 0;
398
- o.forEach((c) => {
399
- n += c.colSpan || 1;
398
+ o.forEach((h) => {
399
+ n += h.colSpan || 1;
400
400
  });
401
401
  const l = Array.from(Array(r), () => Array(n).fill(null));
402
- s.forEach((c) => {
403
- const d = c.sectionRowIndex;
402
+ s.forEach((h) => {
403
+ const d = h.sectionRowIndex;
404
404
  let f = 0;
405
- Array.from(c.querySelectorAll("th,td")).forEach((u) => {
405
+ Array.from(h.querySelectorAll("th,td")).forEach((u) => {
406
406
  for (let E = 0; E < l[d].length; E++)
407
407
  if (l[d][E] === null) {
408
408
  f = E;
@@ -413,9 +413,9 @@ wt = new WeakMap(), G = new WeakMap(), a(C, "TableCompiler"), h(C, wt, /* @__PUR
413
413
  for (let H = 0; H < p; H++)
414
414
  d + E < r && f + H < n && (l[d + E][f + H] = E === 0 && H === 0 ? "1" : "0");
415
415
  });
416
- }), s.forEach((c) => {
417
- const d = c.sectionRowIndex;
418
- Array.from(c.querySelectorAll("th,td")).forEach((f) => {
416
+ }), s.forEach((h) => {
417
+ const d = h.sectionRowIndex;
418
+ Array.from(h.querySelectorAll("th,td")).forEach((f) => {
419
419
  for (let u = 0; u < l[d].length; u++)
420
420
  if (l[d][u] === "1") {
421
421
  f.dataset.col = u, l[d][u] = "0";
@@ -424,25 +424,26 @@ wt = new WeakMap(), G = new WeakMap(), a(C, "TableCompiler"), h(C, wt, /* @__PUR
424
424
  });
425
425
  });
426
426
  }, "#resetColIndex"));
427
- let Xt = C;
428
- var X, w, M, A, z, U, J, St, Et, at, ct, Rt, At, ht, Q, kt;
429
- const se = class se {
427
+ let Ft = C;
428
+ var G, v, M, A, O, X, J, Q, Et, Rt, ct, ht, At, qt, dt, Tt, tt, kt;
429
+ const re = class re {
430
430
  constructor(i) {
431
- h(this, X);
432
- h(this, w);
433
- h(this, M, /* @__PURE__ */ new Map());
434
- h(this, A, null);
435
- h(this, z, null);
436
- h(this, U, 0);
437
- h(this, J, 40);
431
+ c(this, G);
432
+ c(this, v);
433
+ c(this, M, /* @__PURE__ */ new Map());
434
+ c(this, A, null);
435
+ c(this, O, null);
436
+ c(this, X, 0);
437
+ c(this, J, 40);
438
+ c(this, Q, !1);
438
439
  x(this, "refresh", /* @__PURE__ */ a(() => {
439
440
  var e;
440
- const i = t(this, w).querySelector(".ng-container-body");
441
- i && (t(this, at).call(this), t(this, Q).call(this, i.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
441
+ const i = t(this, v).querySelector(".ng-container-body");
442
+ i && (t(this, ct).call(this), t(this, tt).call(this, i.scrollTop), (e = t(this, v).querySelector("nine-table-vscrollbar")) == null || e.refresh());
442
443
  }, "refresh"));
443
444
  x(this, "initialize", /* @__PURE__ */ a(() => {
444
445
  b(this, A, null), t(this, M).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
445
- const r = t(this, w).querySelector(o);
446
+ const r = t(this, v).querySelector(o);
446
447
  if (!r) return;
447
448
  const n = r.querySelector("table");
448
449
  if (!n) return;
@@ -451,13 +452,13 @@ const se = class se {
451
452
  const d = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
452
453
  t(this, M).set(o, d);
453
454
  });
454
- const i = t(this, w).querySelector(".ng-container-body"), e = t(this, w).querySelector(".ng-container-left"), s = t(this, w).querySelector(".ng-container-right");
455
+ const i = t(this, v).querySelector(".ng-container-body"), e = t(this, v).querySelector(".ng-container-left"), s = t(this, v).querySelector(".ng-container-right");
455
456
  if (i) {
456
- t(this, Et).call(this, i), t(this, ht).call(this), t(this, at).call(this), t(this, Q).call(this, i.scrollTop);
457
+ t(this, Rt).call(this, i), t(this, dt).call(this), t(this, ct).call(this), t(this, tt).call(this, i.scrollTop);
457
458
  let o = i.scrollTop;
458
459
  const r = /* @__PURE__ */ a((n) => {
459
460
  var l;
460
- e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, Q).call(this, n), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
461
+ e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, tt).call(this, n), (l = t(this, v).querySelector("nine-table-vscrollbar")) == null || l.refresh();
461
462
  }, "syncScroll");
462
463
  i.addEventListener("scroll", () => {
463
464
  const n = i.scrollTop;
@@ -465,7 +466,7 @@ const se = class se {
465
466
  });
466
467
  }
467
468
  }, "initialize"));
468
- h(this, St, /* @__PURE__ */ a((i, e) => {
469
+ c(this, Et, /* @__PURE__ */ a((i, e) => {
469
470
  const s = t(this, M).get(e);
470
471
  if (!s || s.length === 0) return;
471
472
  const o = i.querySelector("tbody.bindable-tbody");
@@ -473,12 +474,12 @@ const se = class se {
473
474
  o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
474
475
  const r = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
475
476
  for (let l = 0; l < t(this, J); l++)
476
- s.forEach((c) => {
477
- n.appendChild(c.cloneNode(!0));
477
+ s.forEach((h) => {
478
+ n.appendChild(h.cloneNode(!0));
478
479
  });
479
480
  r ? r.before(n) : o.appendChild(n);
480
481
  }, "#renderRows"));
481
- h(this, Et, /* @__PURE__ */ a((i) => {
482
+ c(this, Rt, /* @__PURE__ */ a((i) => {
482
483
  if (t(this, A) !== null && t(this, A) > 0)
483
484
  return t(this, A);
484
485
  const e = t(this, M).get(".ng-container-body");
@@ -490,45 +491,45 @@ const se = class se {
490
491
  e.forEach((g) => {
491
492
  r.appendChild(g.cloneNode(!0));
492
493
  }), o ? o.before(r) : s.appendChild(r);
493
- const n = t(this, w), l = n.style.display, c = n.style.visibility, d = n.style.position;
494
+ const n = t(this, v), l = n.style.display, h = n.style.visibility, d = n.style.position;
494
495
  (l === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
495
496
  let f = 0;
496
497
  const u = s.querySelectorAll("tr:not(.nodata)");
497
498
  return u.forEach((g) => {
498
499
  f += g.offsetHeight || g.getBoundingClientRect().height;
499
- }), u.forEach((g) => g.remove()), n.style.display = l, n.style.visibility = c, n.style.position = d, b(this, A, f > 0 ? f : 24), t(this, ct).call(this), t(this, A);
500
+ }), u.forEach((g) => g.remove()), n.style.display = l, n.style.visibility = h, n.style.position = d, b(this, A, f > 0 ? f : 24), t(this, ht).call(this), t(this, A);
500
501
  }, "#measureAndCacheHeight"));
501
- h(this, at, /* @__PURE__ */ a(() => {
502
- if (!t(this, w).querySelector(".ng-container-body")) return;
503
- const e = t(this, X).data.get() || [], s = e.length > 0 ? e.length : 100, o = t(this, A), r = s * o;
502
+ c(this, ct, /* @__PURE__ */ a(() => {
503
+ if (!t(this, v).querySelector(".ng-container-body")) return;
504
+ const e = t(this, G).data.get() || [], s = e.length > 0 ? e.length : 100, o = t(this, A), r = s * o;
504
505
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
505
- const l = t(this, w).querySelector(n), c = l == null ? void 0 : l.querySelector("table");
506
- c && (c.style.height = `${r}px`);
506
+ const l = t(this, v).querySelector(n), h = l == null ? void 0 : l.querySelector("table");
507
+ h && (h.style.height = `${r}px`);
507
508
  });
508
509
  }, "#updateVirtualScrollHeight"));
509
- h(this, ct, /* @__PURE__ */ a(() => {
510
- if (t(this, U) > 0 && t(this, A) > 0) {
511
- const i = Math.ceil(t(this, U) / t(this, A));
510
+ c(this, ht, /* @__PURE__ */ a(() => {
511
+ if (t(this, X) > 0 && t(this, A) > 0) {
512
+ const i = Math.ceil(t(this, X) / t(this, A));
512
513
  b(this, J, i + 20);
513
514
  } else
514
515
  b(this, J, 40);
515
516
  }, "#updateRowCount"));
516
- h(this, Rt, /* @__PURE__ */ a(() => {
517
- var c, d, f;
518
- const i = t(this, w).querySelector(".ng-container-left table"), e = t(this, w).querySelector(".ng-container-body table"), s = t(this, w).querySelector(".ng-container-right table");
517
+ c(this, At, /* @__PURE__ */ a(() => {
518
+ var h, d, f;
519
+ const i = t(this, v).querySelector(".ng-container-left table"), e = t(this, v).querySelector(".ng-container-body table"), s = t(this, v).querySelector(".ng-container-right table");
519
520
  if (!e) return;
520
521
  const o = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), n = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(o.length, r.length, n.length);
521
522
  for (let u = 0; u < l; u++) {
522
523
  const g = [
523
- ((c = o[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
524
+ ((h = o[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
524
525
  ((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
525
526
  ((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
526
527
  ], p = Math.max(...g);
527
528
  p > 0 && (o[u] && (o[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), n[u] && (n[u].style.height = `${p}px`));
528
529
  }
529
530
  }, "#syncRowHeights"));
530
- h(this, At, /* @__PURE__ */ a(() => {
531
- !t(this, w) || !(t(this, w) instanceof HTMLElement) || (b(this, z, new ResizeObserver((i) => {
531
+ c(this, qt, /* @__PURE__ */ a(() => {
532
+ !t(this, v) || !(t(this, v) instanceof HTMLElement) || (b(this, O, new ResizeObserver((i) => {
532
533
  for (const e of i) {
533
534
  const s = e.target;
534
535
  if (!s.classList.contains("active")) continue;
@@ -538,43 +539,52 @@ const se = class se {
538
539
  const n = s.querySelector("thead");
539
540
  n && (r += n.offsetHeight || n.getBoundingClientRect().height);
540
541
  const l = Math.max(o - r, 100);
541
- t(this, U) !== l && (b(this, U, l), t(this, ct).call(this), t(this, A) !== null && t(this, ht).call(this));
542
+ t(this, X) !== l && (b(this, X, l), t(this, ht).call(this), t(this, A) !== null && t(this, dt).call(this));
542
543
  }
543
544
  }
544
- })), t(this, z).observe(t(this, w)));
545
+ })), t(this, O).observe(t(this, v)));
545
546
  }, "#initResizeObserver"));
546
- h(this, ht, /* @__PURE__ */ a(() => {
547
+ c(this, dt, /* @__PURE__ */ a(() => {
547
548
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
548
- const e = t(this, w).querySelector(i);
549
- e && e.querySelector("tbody.bindable-tbody") && t(this, St).call(this, e, i);
550
- }), t(this, Rt).call(this);
549
+ const e = t(this, v).querySelector(i);
550
+ e && e.querySelector("tbody.bindable-tbody") && t(this, Et).call(this, e, i);
551
+ }), t(this, At).call(this);
551
552
  }, "#renderAllContainers"));
552
- h(this, Q, /* @__PURE__ */ a((i) => {
553
+ c(this, Tt, /* @__PURE__ */ a((i) => {
554
+ const e = t(this, A) || 24, s = i * e;
555
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
556
+ const r = t(this, v).querySelector(o), n = r == null ? void 0 : r.querySelector("table");
557
+ n && (n.style.transform = `translateY(${s}px)`);
558
+ });
559
+ }, "#adjustBufferRows"));
560
+ c(this, tt, /* @__PURE__ */ a((i) => {
553
561
  var r;
554
562
  const e = t(this, A);
555
563
  if (!e || e <= 0) return;
556
564
  const s = Math.max(0, Math.floor(i / e)), o = ((r = t(this, M).get(".ng-container-body")) == null ? void 0 : r.length) || 1;
557
565
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
558
- const l = t(this, w).querySelector(n);
566
+ const l = t(this, v).querySelector(n);
559
567
  if (!l) return;
560
- const c = l.querySelector("tbody.bindable-tbody");
561
- if (!c) return;
562
- Array.from(c.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
563
- const g = s + Math.floor(u / o), p = t(this, X).data.get(g);
564
- I.log("--", t(this, X).data.get(0)), f.style.display = "", t(this, kt).call(this, f, p, g);
568
+ const h = l.querySelector("tbody.bindable-tbody");
569
+ if (!h) return;
570
+ Array.from(h.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
571
+ const g = s + Math.floor(u / o), p = t(this, G).data.get(g);
572
+ f.style.display = "", t(this, kt).call(this, f, p, g);
565
573
  });
566
- });
574
+ }), t(this, Q) || (b(this, Q, !0), setTimeout(() => {
575
+ t(this, Tt).call(this, s), b(this, Q, !1);
576
+ }, 0));
567
577
  }, "#handleScroll"));
568
- h(this, kt, /* @__PURE__ */ a((i, e, s) => {
578
+ c(this, kt, /* @__PURE__ */ a((i, e, s) => {
569
579
  i.dataset.row = s, Array.from(i.cells).forEach((o, r) => {
570
580
  const n = o.dataset.bind;
571
581
  n && e && e[n] !== void 0 ? o.textContent = e[n] : o.textContent = e ? e[Object.keys(e)[r]] ?? `R${s}C${r}` : `ν–‰ ${s + 1}`, o.dataset.row = s;
572
582
  });
573
583
  }, "#bindRowData"));
574
584
  x(this, "destroy", /* @__PURE__ */ a(() => {
575
- t(this, z) && (t(this, z).disconnect(), b(this, z, null));
585
+ t(this, O) && (t(this, O).disconnect(), b(this, O, null));
576
586
  }, "destroy"));
577
- b(this, X, i.getRootNode().host), b(this, w, i), t(this, At).call(this);
587
+ b(this, G, i.getRootNode().host), b(this, v, i), t(this, qt).call(this);
578
588
  }
579
589
  getRowHeight() {
580
590
  return t(this, A);
@@ -584,15 +594,15 @@ const se = class se {
584
594
  return ((e = t(this, M).get(i)) == null ? void 0 : e.length) || 1;
585
595
  }
586
596
  };
587
- X = new WeakMap(), w = new WeakMap(), M = new WeakMap(), A = new WeakMap(), z = new WeakMap(), U = new WeakMap(), J = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), at = new WeakMap(), ct = new WeakMap(), Rt = new WeakMap(), At = new WeakMap(), ht = new WeakMap(), Q = new WeakMap(), kt = new WeakMap(), a(se, "RowManager");
588
- let Ut = se;
589
- var qt, tt, j, Tt, Lt, Ht, Ct, _t;
590
- const ot = class ot extends HTMLElement {
597
+ G = new WeakMap(), v = new WeakMap(), M = new WeakMap(), A = new WeakMap(), O = new WeakMap(), X = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), Et = new WeakMap(), Rt = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), At = new WeakMap(), qt = new WeakMap(), dt = new WeakMap(), Tt = new WeakMap(), tt = new WeakMap(), kt = new WeakMap(), a(re, "RowManager");
598
+ let Kt = re;
599
+ var Lt, et, j, Ht, Ct, _t, Mt, It;
600
+ const rt = class rt extends HTMLElement {
591
601
  constructor() {
592
602
  super();
593
- h(this, qt);
594
- h(this, tt, null);
595
- h(this, j);
603
+ c(this, Lt);
604
+ c(this, et, null);
605
+ c(this, j);
596
606
  /**
597
607
  * data.set, add, delete
598
608
  * filter, sorting : κ³ λ €λŒ€μƒ
@@ -600,7 +610,7 @@ const ot = class ot extends HTMLElement {
600
610
  x(this, "invalidate", /* @__PURE__ */ a(() => {
601
611
  t(this, j).refresh();
602
612
  }, "invalidate"));
603
- h(this, Tt, /* @__PURE__ */ a(() => {
613
+ c(this, Ht, /* @__PURE__ */ a(() => {
604
614
  [
605
615
  { selector: ".ng-container-body", type: null },
606
616
  { selector: ".ng-container-left", type: "left" },
@@ -608,11 +618,11 @@ const ot = class ot extends HTMLElement {
608
618
  ].forEach(({ selector: s, type: o }) => {
609
619
  const r = this.querySelector(s);
610
620
  if (!r) return;
611
- const n = t(this, Ht).call(this, t(this, tt), o);
621
+ const n = t(this, _t).call(this, t(this, et), o);
612
622
  r.innerHTML = "", r.appendChild(n);
613
623
  });
614
624
  }, "#renderSplitContainers"));
615
- h(this, Lt, /* @__PURE__ */ a(() => {
625
+ c(this, Ct, /* @__PURE__ */ a(() => {
616
626
  ["left", "right"].forEach((e) => {
617
627
  const s = this.querySelector(`.ng-container-${e}`), o = s == null ? void 0 : s.querySelector("table");
618
628
  if (!s || !o) return;
@@ -624,7 +634,7 @@ const ot = class ot extends HTMLElement {
624
634
  });
625
635
  }, "#updateContainerWidths"));
626
636
  x(this, "generate", /* @__PURE__ */ a((e) => {
627
- e && (b(this, tt, Xt.compile(e)), t(this, tt).style.display = "table", t(this, Tt).call(this), t(this, Lt).call(this), requestAnimationFrame(() => {
637
+ e && (b(this, et, Ft.compile(e)), t(this, et).style.display = "table", t(this, Ht).call(this), t(this, Ct).call(this), requestAnimationFrame(() => {
628
638
  var o;
629
639
  const s = (o = this.querySelector("thead")) == null ? void 0 : o.getBoundingClientRect().height;
630
640
  this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
@@ -638,7 +648,7 @@ const ot = class ot extends HTMLElement {
638
648
  /**
639
649
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
640
650
  */
641
- h(this, Ht, /* @__PURE__ */ a((e, s) => {
651
+ c(this, _t, /* @__PURE__ */ a((e, s) => {
642
652
  const o = e.cloneNode(!0), r = o.querySelector("tbody");
643
653
  if (r) {
644
654
  const n = document.createElement("tbody");
@@ -661,11 +671,11 @@ const ot = class ot extends HTMLElement {
661
671
  const s = this.querySelector(".ng-container-body");
662
672
  s && (s.scrollTop = e);
663
673
  }, "scrollToY"));
664
- h(this, Ct, /* @__PURE__ */ a(() => {
665
- t(this, _t).call(this);
674
+ c(this, Mt, /* @__PURE__ */ a(() => {
675
+ t(this, It).call(this);
666
676
  }, "#init"));
667
- h(this, _t, /* @__PURE__ */ a(() => {
668
- const e = ot.SCROLLBAR_SIZE;
677
+ c(this, It, /* @__PURE__ */ a(() => {
678
+ const e = rt.SCROLLBAR_SIZE;
669
679
  this.innerHTML = `
670
680
  <style>
671
681
  nine-table-sheet {
@@ -811,45 +821,45 @@ const ot = class ot extends HTMLElement {
811
821
  </div>
812
822
  `;
813
823
  }, "#render"));
814
- b(this, j, new Ut(this)), b(this, qt, this.getRootNode().host);
824
+ b(this, j, new Kt(this)), b(this, Lt, this.getRootNode().host);
815
825
  }
816
826
  connectedCallback() {
817
- t(this, Ct).call(this);
827
+ t(this, Mt).call(this);
818
828
  }
819
829
  disconnectedCallback() {
820
- this.innerHTML = "", I.log("NineTableSheet destroyed.");
830
+ this.innerHTML = "", D.log("NineTableSheet destroyed.");
821
831
  }
822
832
  };
823
- qt = new WeakMap(), tt = new WeakMap(), j = new WeakMap(), Tt = new WeakMap(), Lt = new WeakMap(), Ht = new WeakMap(), Ct = new WeakMap(), _t = new WeakMap(), a(ot, "NineTableSheet"), x(ot, "SCROLLBAR_SIZE", 16);
824
- let pt = ot;
825
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", pt);
826
- var Mt, dt;
827
- const ne = class ne extends HTMLElement {
833
+ Lt = new WeakMap(), et = new WeakMap(), j = new WeakMap(), Ht = new WeakMap(), Ct = new WeakMap(), _t = new WeakMap(), Mt = new WeakMap(), It = new WeakMap(), a(rt, "NineTableSheet"), x(rt, "SCROLLBAR_SIZE", 16);
834
+ let mt = rt;
835
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", mt);
836
+ var $t, ft;
837
+ const le = class le extends HTMLElement {
828
838
  constructor() {
829
839
  super();
830
- h(this, Mt, /* @__PURE__ */ a(() => {
840
+ c(this, $t, /* @__PURE__ */ a(() => {
831
841
  var e;
832
842
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
833
843
  var n;
834
844
  const o = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((n = s.target.closest(".nine-tab-item")) == null ? void 0 : n.dataset.index, 10);
835
- t(this, dt).call(this, r, o);
836
- }), t(this, dt).call(this, 0, !1);
845
+ t(this, ft).call(this, r, o);
846
+ }), t(this, ft).call(this, 0, !1);
837
847
  }, "#init"));
838
- h(this, dt, /* @__PURE__ */ a((e, s = !1) => {
848
+ c(this, ft, /* @__PURE__ */ a((e, s = !1) => {
839
849
  const o = /* @__PURE__ */ a(() => {
840
850
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
841
851
  Array.from(this.querySelectorAll("nine-splitter")).forEach((p) => p.style.setProperty("display", "none"));
842
852
  const g = f.filter((p) => p.classList.contains("active"));
843
853
  g.length < 2 || g.forEach((p) => {
844
- const E = parseInt(p.getAttribute("data-index"), 10), H = this.querySelector(`nine-splitter[data-split-index="${E}"]`), yt = f[E + 1];
845
- H && yt && yt.classList.contains("active") && H.style.setProperty("display", "flex");
854
+ const E = parseInt(p.getAttribute("data-index"), 10), H = this.querySelector(`nine-splitter[data-split-index="${E}"]`), pt = f[E + 1];
855
+ H && pt && pt.classList.contains("active") && H.style.setProperty("display", "flex");
846
856
  });
847
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), c = n.querySelectorAll("nine-table-sheet");
857
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), h = n.querySelectorAll("nine-table-sheet");
848
858
  if (!l[e]) return;
849
859
  if (!s)
850
860
  l.forEach((f, u) => {
851
861
  f.classList.toggle("active", u === e);
852
- }), c.forEach((f, u) => {
862
+ }), h.forEach((f, u) => {
853
863
  const g = u === e;
854
864
  f.classList.toggle("active", g), f.style.flex = g ? "1 1 100%" : "";
855
865
  });
@@ -868,108 +878,35 @@ const ne = class ne extends HTMLElement {
868
878
  }, "#switchSheet"));
869
879
  }
870
880
  connectedCallback() {
871
- t(this, Mt).call(this);
872
- }
873
- };
874
- Mt = new WeakMap(), dt = new WeakMap(), a(ne, "NineTableSheets");
875
- let jt = ne;
876
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", jt);
877
- var et, R, ft, It;
878
- const oe = class oe {
879
- // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
880
- constructor(i) {
881
- h(this, et);
882
- h(this, R, []);
883
- x(this, "add", /* @__PURE__ */ a((i, e = "string") => {
884
- i.forEach((s) => {
885
- t(this, R).some((o) => o.name === s) || t(this, R).push({ name: s, type: e });
886
- }), t(this, ft).call(this);
887
- }, "add"));
888
- h(this, ft, /* @__PURE__ */ a(() => {
889
- const i = /* @__PURE__ */ new Map();
890
- t(this, R).forEach((e) => {
891
- i.set(e.name, e.type);
892
- }), b(this, R, Array.from(i, ([e, s]) => ({ name: e, type: s }))), b(this, R, t(this, R).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, R).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
893
- }, "#adjust"));
894
- h(this, It, /* @__PURE__ */ a(() => {
895
- b(this, R, []), I.log(t(this, et).querySelectorAll("table"));
896
- const i = Array.from(t(this, et).querySelectorAll("table"));
897
- if (!(!i || i.length === 0)) {
898
- for (const e of i)
899
- I.log(e), $("[data-bind]", e).each((s, o) => {
900
- const r = o.dataset.bind, n = o.getAttribute("data-type") || "string";
901
- r && t(this, R).push({ name: r, type: n });
902
- }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
903
- $(`[${s}]`, e).each((o, r) => {
904
- var n = r.getAttribute(s);
905
- if (n.indexOf("data.") < 0) {
906
- const l = n.search(/[(]/g);
907
- if (l > 0)
908
- try {
909
- n = String(window[n.substring(0, l).trim()]);
910
- } catch {
911
- n = "";
912
- }
913
- }
914
- n.split("data.").forEach((l) => {
915
- if (l.trim() != "") {
916
- const c = l.search(/[^_A-Za-z0-9]/g);
917
- let d = "";
918
- c >= 0 ? d = l.substring(0, c) : n.startsWith("data.") && (d = l.replace("data.", "")), d && t(this, R).push({ name: d, type: "string" });
919
- }
920
- });
921
- });
922
- });
923
- t(this, ft).call(this);
924
- }
925
- }, "#init"));
926
- b(this, et, i), t(this, It).call(this);
927
- }
928
- // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
929
- get() {
930
- return t(this, R).map((i) => i.name);
931
- }
932
- // 🎯 λ‚΄λΆ€ 객체 ν†΅μ§Έλ‘œ μ–»κΈ°
933
- getFields() {
934
- return t(this, R);
935
- }
936
- // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
937
- getType(i) {
938
- const e = t(this, R).find((s) => s.name === i);
939
- return e ? e.type : "string";
940
- }
941
- indexOf(i) {
942
- return t(this, R).findIndex((e) => e.name === i);
943
- }
944
- includes(i) {
945
- return t(this, R).some((e) => e.name === i);
881
+ t(this, $t).call(this);
946
882
  }
947
883
  };
948
- et = new WeakMap(), R = new WeakMap(), ft = new WeakMap(), It = new WeakMap(), a(oe, "ngFields");
949
- let Ft = oe;
950
- var k, $t, ut, Wt;
951
- const re = class re {
884
+ $t = new WeakMap(), ft = new WeakMap(), a(le, "NineTableSheets");
885
+ let Zt = le;
886
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Zt);
887
+ var q, Wt, ut, Ot;
888
+ const ae = class ae {
952
889
  constructor(i) {
953
- h(this, k);
954
- h(this, $t, /* @__PURE__ */ a(() => {
955
- t(this, Wt).call(this), new ResizeObserver((i) => {
890
+ c(this, q);
891
+ c(this, Wt, /* @__PURE__ */ a(() => {
892
+ t(this, Ot).call(this), new ResizeObserver((i) => {
956
893
  for (let e of i)
957
- t(this, k).getAttribute("auto-height") === "true" && t(this, ut).call(this);
958
- }).observe(t(this, k));
894
+ t(this, q).getAttribute("auto-height") === "true" && t(this, ut).call(this);
895
+ }).observe(t(this, q));
959
896
  }, "#init"));
960
- h(this, ut, /* @__PURE__ */ a(() => {
961
- var c, d;
962
- const i = Array.from(t(this, k).shadowRoot.querySelectorAll("nine-table-sheet.active"));
897
+ c(this, ut, /* @__PURE__ */ a(() => {
898
+ var h, d;
899
+ const i = Array.from(t(this, q).shadowRoot.querySelectorAll("nine-table-sheet.active"));
963
900
  if (i.length === 0) return;
964
- const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), o = (c = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, r = (d = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, n = pt.SCROLLBAR_SIZE, l = e * s + o + r + n;
965
- t(this, k).style.height = `${l}px`;
901
+ const e = parseInt(t(this, q).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), o = (h = t(this, q).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, r = (d = t(this, q).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, n = mt.SCROLLBAR_SIZE, l = e * s + o + r + n;
902
+ t(this, q).style.height = `${l}px`;
966
903
  }, "#applyAutoHeight"));
967
- h(this, Wt, /* @__PURE__ */ a(() => {
968
- const e = Array.from(t(this, k).children).filter((c) => c.tagName === "TABLE"), s = t(this, k).getAttribute("auto-height") === "true", o = e.length, r = e.map((c, d) => {
904
+ c(this, Ot, /* @__PURE__ */ a(() => {
905
+ const e = Array.from(t(this, q).children).filter((h) => h.tagName === "TABLE"), s = t(this, q).getAttribute("auto-height") === "true", o = e.length, r = e.map((h, d) => {
969
906
  const u = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, g = d < o - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
970
907
  return u + g;
971
- }).join(""), n = e.map((c, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
972
- t(this, k).shadowRoot.innerHTML = `
908
+ }).join(""), n = e.map((h, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
909
+ t(this, q).shadowRoot.innerHTML = `
973
910
  <style>
974
911
  :host {
975
912
  display: flex;
@@ -1068,23 +1005,23 @@ const re = class re {
1068
1005
  </nine-table-body>
1069
1006
  <nine-table-footer></nine-table-footer>
1070
1007
  `;
1071
- const l = t(this, k).shadowRoot.querySelectorAll("nine-table-sheet");
1072
- l == null || l.forEach((c, d) => {
1008
+ const l = t(this, q).shadowRoot.querySelectorAll("nine-table-sheet");
1009
+ l == null || l.forEach((h, d) => {
1073
1010
  e[d] && setTimeout(() => {
1074
- c.generate(e[d]), s && t(this, ut).call(this);
1011
+ h.generate(e[d]), s && t(this, ut).call(this);
1075
1012
  });
1076
1013
  });
1077
1014
  }, "#render"));
1078
- b(this, k, i), t(this, $t).call(this);
1015
+ b(this, q, i), t(this, Wt).call(this);
1079
1016
  }
1080
1017
  };
1081
- k = new WeakMap(), $t = new WeakMap(), ut = new WeakMap(), Wt = new WeakMap(), a(re, "LayoutManager");
1082
- let Kt = re;
1018
+ q = new WeakMap(), Wt = new WeakMap(), ut = new WeakMap(), Ot = new WeakMap(), a(ae, "LayoutManager");
1019
+ let Gt = ae;
1083
1020
  var bt, it;
1084
- const le = class le {
1021
+ const ce = class ce {
1085
1022
  constructor(i) {
1086
- h(this, bt);
1087
- h(this, it, -1);
1023
+ c(this, bt);
1024
+ c(this, it, -1);
1088
1025
  x(this, "count", /* @__PURE__ */ a(() => t(this, bt).rawRecords.length, "count"));
1089
1026
  b(this, bt, i);
1090
1027
  }
@@ -1096,29 +1033,29 @@ const le = class le {
1096
1033
  });
1097
1034
  }
1098
1035
  };
1099
- bt = new WeakMap(), it = new WeakMap(), a(le, "ngRow");
1100
- let Zt = le;
1101
- var q, S, T, st, Ot, D, zt, F, gt, Dt, Nt, nt;
1036
+ bt = new WeakMap(), it = new WeakMap(), a(ce, "ngRow");
1037
+ let Jt = ce;
1038
+ var T, S, k, st, zt, z, Dt, U, gt, Bt, Nt, nt;
1102
1039
  const L = class L {
1103
1040
  constructor(i, e) {
1104
- h(this, q);
1105
- h(this, S);
1106
- h(this, T, []);
1107
- h(this, st, []);
1108
- h(this, Ot, 0);
1109
- h(this, D, []);
1110
- h(this, zt, /* @__PURE__ */ a(() => {
1111
- b(this, D, []);
1112
- const i = t(this, q).template || [];
1041
+ c(this, T);
1042
+ c(this, S);
1043
+ c(this, k, []);
1044
+ c(this, st, []);
1045
+ c(this, zt, 0);
1046
+ c(this, z, []);
1047
+ c(this, Dt, /* @__PURE__ */ a(() => {
1048
+ b(this, z, []);
1049
+ const i = t(this, T).template || [];
1113
1050
  Array.from(i).forEach((e) => {
1114
1051
  var s;
1115
- t(this, D).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1052
+ t(this, z).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1116
1053
  }), (t(this, S).rawRecords || []).forEach((e) => {
1117
- e.__ng || (e.__ng = t(this, gt).call(this)), e.__ng.height = t(this, D).slice();
1054
+ e.__ng || (e.__ng = t(this, gt).call(this)), e.__ng.height = t(this, z).slice();
1118
1055
  });
1119
1056
  }, "#initialize"));
1120
- h(this, F, /* @__PURE__ */ a(() => {
1121
- t(this, q).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1057
+ c(this, U, /* @__PURE__ */ a(() => {
1058
+ t(this, T).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1122
1059
  i.invalidate();
1123
1060
  });
1124
1061
  }, "#invalidate"));
@@ -1128,7 +1065,7 @@ const L = class L {
1128
1065
  if (!s || s.length <= 0) return;
1129
1066
  if (i == null) return t(this, nt).call(this, s);
1130
1067
  if (i < 0 || i >= s.length) return null;
1131
- const o = typeof ((r = t(this, q).fields) == null ? void 0 : r.get) == "function" ? t(this, q).fields.get() : [];
1068
+ const o = typeof ((r = t(this, T).fields) == null ? void 0 : r.get) == "function" ? t(this, T).fields.get() : [];
1132
1069
  if (e != null) {
1133
1070
  const n = o.indexOf(e);
1134
1071
  return n >= 0 ? s[i].v[n] : null;
@@ -1136,28 +1073,28 @@ const L = class L {
1136
1073
  return t(this, nt).call(this, s[i]);
1137
1074
  }, "get"));
1138
1075
  x(this, "set", /* @__PURE__ */ a((i) => {
1139
- this.clear(), this.add(i, !1), t(this, F).call(this);
1076
+ this.clear(), this.add(i, !1), t(this, U).call(this);
1140
1077
  }, "set"));
1141
- h(this, gt, /* @__PURE__ */ a(() => ({
1078
+ c(this, gt, /* @__PURE__ */ a(() => ({
1142
1079
  rowState: L.ROW_STATE.EMPTY,
1143
1080
  deleted: !1,
1144
1081
  filtered: !1,
1145
- height: t(this, D).slice(),
1082
+ height: t(this, z).slice(),
1146
1083
  o: {},
1147
1084
  c: {},
1148
- _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, D).slice(), -1, {}, {}]
1085
+ _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, z).slice(), -1, {}, {}]
1149
1086
  }), "#getDefaultMeta"));
1150
1087
  x(this, "reset", /* @__PURE__ */ a(() => {
1151
- b(this, T, []), b(this, st, []), t(this, F).call(this);
1088
+ b(this, k, []), b(this, st, []), t(this, U).call(this);
1152
1089
  }, "reset"));
1153
1090
  x(this, "clear", /* @__PURE__ */ a(() => {
1154
1091
  var i;
1155
- t(this, S).rawRecords = [], b(this, T, []), b(this, st, []), (i = t(this, S).viewRecords) != null && i.reset && t(this, S).viewRecords.reset();
1092
+ t(this, S).rawRecords = [], b(this, k, []), b(this, st, []), (i = t(this, S).viewRecords) != null && i.reset && t(this, S).viewRecords.reset();
1156
1093
  }, "clear"));
1157
- h(this, Dt, /* @__PURE__ */ a((i) => {
1094
+ c(this, Bt, /* @__PURE__ */ a((i) => {
1158
1095
  var o;
1159
1096
  Array.isArray(i) || (i = [i]);
1160
- const e = typeof ((o = t(this, q).fields) == null ? void 0 : o.get) == "function" ? t(this, q).fields.get() : Object.keys(i[0] || {}), s = [];
1097
+ const e = typeof ((o = t(this, T).fields) == null ? void 0 : o.get) == "function" ? t(this, T).fields.get() : Object.keys(i[0] || {}), s = [];
1161
1098
  return i.forEach((r) => {
1162
1099
  const n = { v: [] };
1163
1100
  e.forEach((l) => {
@@ -1165,34 +1102,34 @@ const L = class L {
1165
1102
  }), s.push(n);
1166
1103
  }), s;
1167
1104
  }, "#json2Array"));
1168
- h(this, Nt, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1105
+ c(this, Nt, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1169
1106
  e.__ng = t(this, gt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = L.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1170
1107
  }), i), "#defaultInsert"));
1171
1108
  x(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1172
1109
  i === void 0 && (i = {});
1173
- const s = t(this, Dt).call(this, i);
1110
+ const s = t(this, Bt).call(this, i);
1174
1111
  t(this, S).rawRecords = t(this, S).rawRecords.concat(t(this, Nt).call(this, s)), this.resetRecords();
1175
1112
  const o = this.count() - 1;
1176
1113
  return e || s.forEach((r, n) => {
1177
1114
  const l = t(this, S).rawRecords[o - n];
1178
1115
  l && (l.__ng.rowState = L.ROW_STATE.EMPTY);
1179
- }), t(this, F).call(this), o;
1116
+ }), t(this, U).call(this), o;
1180
1117
  }, "add"));
1181
1118
  x(this, "delete", /* @__PURE__ */ a((i) => {
1182
1119
  let e = [];
1183
1120
  Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, S).host.row.at] : e = [parseInt(i, 10)], e.sort((s, o) => o - s).forEach((s) => {
1184
- if (t(this, T)[s]) {
1185
- const o = t(this, T)[s].__ng.rowid;
1186
- t(this, T)[s].__ng.rowState === L.ROW_STATE.INSERT ? t(this, S).rawRecords = t(this, S).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, S).rawRecords.forEach((r) => {
1121
+ if (t(this, k)[s]) {
1122
+ const o = t(this, k)[s].__ng.rowid;
1123
+ t(this, k)[s].__ng.rowState === L.ROW_STATE.INSERT ? t(this, S).rawRecords = t(this, S).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, S).rawRecords.forEach((r) => {
1187
1124
  r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = L.ROW_STATE.DELETE);
1188
1125
  });
1189
1126
  }
1190
- }), this.resetRecords(), t(this, F).call(this);
1127
+ }), this.resetRecords(), t(this, U).call(this);
1191
1128
  }, "delete"));
1192
1129
  x(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
1193
- var c;
1130
+ var h;
1194
1131
  i = parseInt(i, 10);
1195
- const r = (typeof ((c = t(this, q).fields) == null ? void 0 : c.get) == "function" ? t(this, q).fields.get() : []).indexOf(e);
1132
+ const r = (typeof ((h = t(this, T).fields) == null ? void 0 : h.get) == "function" ? t(this, T).fields.get() : []).indexOf(e);
1196
1133
  if (r < 0) return;
1197
1134
  const n = this.getValidData()[i];
1198
1135
  if (!n) return;
@@ -1200,26 +1137,26 @@ const L = class L {
1200
1137
  l !== s && n.__ng.rowState !== L.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = l), n.__ng.rowState = L.ROW_STATE.UPDATE), n.v[r] = s;
1201
1138
  }, "setValue"));
1202
1139
  x(this, "resetRecords", /* @__PURE__ */ a(() => {
1203
- b(this, st, t(this, S).rawRecords.filter((i) => !i.__ng.deleted)), b(this, T, t(this, S).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, S).rawRecords.forEach((i, e) => {
1140
+ b(this, st, t(this, S).rawRecords.filter((i) => !i.__ng.deleted)), b(this, k, t(this, S).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, S).rawRecords.forEach((i, e) => {
1204
1141
  i.__ng.rowidx = e;
1205
- }), t(this, T).forEach((i, e) => {
1142
+ }), t(this, k).forEach((i, e) => {
1206
1143
  i.__ng.i = e;
1207
1144
  });
1208
1145
  }, "resetRecords"));
1209
- x(this, "getValidData", /* @__PURE__ */ a(() => (t(this, T).length === 0 && t(this, S).rawRecords.length > 0 && this.resetRecords(), t(this, T)), "getValidData"));
1210
- h(this, nt, /* @__PURE__ */ a((i) => {
1146
+ x(this, "getValidData", /* @__PURE__ */ a(() => (t(this, k).length === 0 && t(this, S).rawRecords.length > 0 && this.resetRecords(), t(this, k)), "getValidData"));
1147
+ c(this, nt, /* @__PURE__ */ a((i) => {
1211
1148
  var n;
1212
1149
  if (!i) return i;
1213
- const e = !Array.isArray(i), s = e ? [i] : i, o = typeof ((n = t(this, q).fields) == null ? void 0 : n.get) == "function" ? t(this, q).fields.get() : [], r = s.filter((l) => !l.__ng.deleted).map((l) => {
1214
- const c = {};
1150
+ const e = !Array.isArray(i), s = e ? [i] : i, o = typeof ((n = t(this, T).fields) == null ? void 0 : n.get) == "function" ? t(this, T).fields.get() : [], r = s.filter((l) => !l.__ng.deleted).map((l) => {
1151
+ const h = {};
1215
1152
  return o.forEach((d, f) => {
1216
- c[d] = l.v ? l.v[f] : l[d];
1217
- }), c.__ng = l.__ng, c;
1153
+ h[d] = l.v ? l.v[f] : l[d];
1154
+ }), h.__ng = l.__ng, h;
1218
1155
  });
1219
1156
  return e ? r[0] : r;
1220
1157
  }, "#conv"));
1221
1158
  x(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
1222
- b(this, q, i), b(this, S, e), t(this, zt).call(this);
1159
+ b(this, T, i), b(this, S, e), t(this, Dt).call(this);
1223
1160
  }
1224
1161
  get source() {
1225
1162
  return t(this, nt).call(this, t(this, S).rawRecords);
@@ -1228,16 +1165,16 @@ const L = class L {
1228
1165
  this.clear(), this.add(i, !1);
1229
1166
  }
1230
1167
  get nextId() {
1231
- return ++ue(this, Ot)._;
1168
+ return ++ye(this, zt)._;
1232
1169
  }
1233
1170
  get length() {
1234
- return t(this, T).length;
1171
+ return t(this, k).length;
1235
1172
  }
1236
1173
  getRowCount() {
1237
1174
  return this.length;
1238
1175
  }
1239
1176
  };
1240
- q = new WeakMap(), S = new WeakMap(), T = new WeakMap(), st = new WeakMap(), Ot = new WeakMap(), D = new WeakMap(), zt = new WeakMap(), F = new WeakMap(), gt = new WeakMap(), Dt = new WeakMap(), Nt = new WeakMap(), nt = new WeakMap(), a(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1177
+ T = new WeakMap(), S = new WeakMap(), k = new WeakMap(), st = new WeakMap(), zt = new WeakMap(), z = new WeakMap(), Dt = new WeakMap(), U = new WeakMap(), gt = new WeakMap(), Bt = new WeakMap(), Nt = new WeakMap(), nt = new WeakMap(), a(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1241
1178
  x(L, "ROW_STATE", {
1242
1179
  EMPTY: "EMPTY",
1243
1180
  NORMAL: "NORMAL",
@@ -1245,14 +1182,14 @@ x(L, "ROW_STATE", {
1245
1182
  UPDATE: "UPDATE",
1246
1183
  DELETE: "DELETE"
1247
1184
  });
1248
- let Gt = L;
1249
- var K;
1250
- const ae = class ae {
1185
+ let Qt = L;
1186
+ var F;
1187
+ const he = class he {
1251
1188
  constructor(i) {
1252
- h(this, K);
1253
- b(this, K, i), this.row = new Zt(this), this.data = new Gt(t(this, K), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1189
+ c(this, F);
1190
+ b(this, F, i), this.row = new Jt(this), this.data = new Qt(t(this, F), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1254
1191
  var e;
1255
- (e = t(this, K).view) != null && e.redraw && t(this, K).view.redraw();
1192
+ (e = t(this, F).view) != null && e.redraw && t(this, F).view.redraw();
1256
1193
  }, this.setDataSource = (e) => {
1257
1194
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1258
1195
  }, this.getRowState = (e) => {
@@ -1267,37 +1204,113 @@ const ae = class ae {
1267
1204
  }, this.setDataSource([]);
1268
1205
  }
1269
1206
  };
1270
- K = new WeakMap(), a(ae, "ngDataManager");
1271
- let Jt = ae;
1272
- var Z, Bt;
1273
- const ce = class ce extends HTMLElement {
1207
+ F = new WeakMap(), a(he, "ngDataManager");
1208
+ let te = he;
1209
+ var ot, R, yt, Pt;
1210
+ const de = class de {
1211
+ // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1212
+ constructor(i) {
1213
+ c(this, ot);
1214
+ c(this, R, []);
1215
+ x(this, "add", /* @__PURE__ */ a((i, e = "string") => {
1216
+ i.forEach((s) => {
1217
+ t(this, R).some((o) => o.name === s) || t(this, R).push({ name: s, type: e });
1218
+ }), t(this, yt).call(this);
1219
+ }, "add"));
1220
+ c(this, yt, /* @__PURE__ */ a(() => {
1221
+ const i = /* @__PURE__ */ new Map();
1222
+ t(this, R).forEach((e) => {
1223
+ i.set(e.name, e.type);
1224
+ }), b(this, R, Array.from(i, ([e, s]) => ({ name: e, type: s }))), b(this, R, t(this, R).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, R).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1225
+ }, "#adjust"));
1226
+ c(this, Pt, /* @__PURE__ */ a(() => {
1227
+ b(this, R, []), D.log(t(this, ot).querySelectorAll("table"));
1228
+ const i = Array.from(t(this, ot).querySelectorAll("table"));
1229
+ if (!(!i || i.length === 0)) {
1230
+ for (const e of i)
1231
+ D.log(e), $("[data-bind]", e).each((s, o) => {
1232
+ const r = o.dataset.bind, n = o.getAttribute("data-type") || "string";
1233
+ r && t(this, R).push({ name: r, type: n });
1234
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1235
+ $(`[${s}]`, e).each((o, r) => {
1236
+ var n = r.getAttribute(s);
1237
+ if (n.indexOf("data.") < 0) {
1238
+ const l = n.search(/[(]/g);
1239
+ if (l > 0)
1240
+ try {
1241
+ n = String(window[n.substring(0, l).trim()]);
1242
+ } catch {
1243
+ n = "";
1244
+ }
1245
+ }
1246
+ n.split("data.").forEach((l) => {
1247
+ if (l.trim() != "") {
1248
+ const h = l.search(/[^_A-Za-z0-9]/g);
1249
+ let d = "";
1250
+ h >= 0 ? d = l.substring(0, h) : n.startsWith("data.") && (d = l.replace("data.", "")), d && t(this, R).push({ name: d, type: "string" });
1251
+ }
1252
+ });
1253
+ });
1254
+ });
1255
+ t(this, yt).call(this);
1256
+ }
1257
+ }, "#init"));
1258
+ b(this, ot, i), t(this, Pt).call(this);
1259
+ }
1260
+ // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1261
+ get() {
1262
+ return t(this, R).map((i) => i.name);
1263
+ }
1264
+ // 🎯 λ‚΄λΆ€ 객체 ν†΅μ§Έλ‘œ μ–»κΈ°
1265
+ getFields() {
1266
+ return t(this, R);
1267
+ }
1268
+ // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
1269
+ getType(i) {
1270
+ const e = t(this, R).find((s) => s.name === i);
1271
+ return e ? e.type : "string";
1272
+ }
1273
+ indexOf(i) {
1274
+ return t(this, R).findIndex((e) => e.name === i);
1275
+ }
1276
+ includes(i) {
1277
+ return t(this, R).some((e) => e.name === i);
1278
+ }
1279
+ };
1280
+ ot = new WeakMap(), R = new WeakMap(), yt = new WeakMap(), Pt = new WeakMap(), a(de, "ngFields");
1281
+ let ee = de;
1282
+ var K, Yt, Vt;
1283
+ const fe = class fe extends HTMLElement {
1274
1284
  constructor() {
1275
1285
  super();
1276
1286
  //#created = false;
1277
- h(this, Z);
1278
- h(this, Bt);
1279
- this.attachShadow({ mode: "open" }), b(this, Z, new Jt(this));
1287
+ c(this, K);
1288
+ c(this, Yt);
1289
+ c(this, Vt, /* @__PURE__ */ a(() => {
1290
+ this.fields = new ee(this), b(this, Yt, new Gt(this)), D.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1291
+ }, "#init"));
1292
+ this.attachShadow({ mode: "open" }), b(this, K, new te(this));
1280
1293
  }
1281
1294
  connectedCallback() {
1282
- this.fields = new Ft(this), b(this, Bt, new Kt(this)), I.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1295
+ t(this, Vt).call(this);
1283
1296
  }
1284
1297
  disconnectedCallback() {
1285
- I.log("NineTable disconnected.");
1298
+ D.log("NineTable disconnected.");
1286
1299
  }
1287
1300
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1288
1301
  get data() {
1289
- return t(this, Z).data;
1302
+ return t(this, K).data;
1290
1303
  }
1291
1304
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1292
1305
  get row() {
1293
- return t(this, Z).row;
1306
+ return t(this, K).row;
1294
1307
  }
1295
1308
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1296
1309
  get dataManager() {
1297
- return t(this, Z);
1310
+ return t(this, K);
1298
1311
  }
1299
1312
  };
1300
- Z = new WeakMap(), Bt = new WeakMap(), a(ce, "NineTable");
1301
- let Qt = ce;
1302
- customElements.get("nine-table") || customElements.define("nine-table", Qt);
1313
+ K = new WeakMap(), Yt = new WeakMap(), Vt = new WeakMap(), a(fe, "NineTable");
1314
+ let ie = fe;
1315
+ customElements.get("nine-table") || customElements.define("nine-table", ie);
1303
1316
  //# sourceMappingURL=nine-table.js.map