@ninebone/table 0.0.344 β†’ 0.0.345

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