@ninebone/table 0.0.268 β†’ 0.0.270

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 Xe = Object.defineProperty;
2
- var Ye = (w) => {
1
+ var Pe = Object.defineProperty;
2
+ var Ve = (w) => {
3
3
  throw TypeError(w);
4
4
  };
5
- var je = (w, i, t) => i in w ? Xe(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
6
- var h = (w, i) => Xe(w, "name", { value: i, configurable: !0 });
7
- var S = (w, i, t) => je(w, typeof i != "symbol" ? i + "" : i, t), Ue = (w, i, t) => i.has(w) || Ye("Cannot " + t);
8
- var e = (w, i, t) => (Ue(w, i, "read from private field"), t ? t.call(w) : i.get(w)), g = (w, i, t) => i.has(w) ? Ye("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), y = (w, i, t, s) => (Ue(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
9
- var Ke = (w, i, t, s) => ({
5
+ var Ue = (w, i, t) => i in w ? Pe(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
6
+ var h = (w, i) => Pe(w, "name", { value: i, configurable: !0 });
7
+ var S = (w, i, t) => Ue(w, typeof i != "symbol" ? i + "" : i, t), Xe = (w, i, t) => i.has(w) || Ve("Cannot " + t);
8
+ var e = (w, i, t) => (Xe(w, i, "read from private field"), t ? t.call(w) : i.get(w)), g = (w, i, t) => i.has(w) ? Ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), y = (w, i, t, s) => (Xe(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
9
+ var Ye = (w, i, t, s) => ({
10
10
  set _(r) {
11
11
  y(w, i, r, t);
12
12
  },
@@ -15,36 +15,36 @@ var Ke = (w, i, t, s) => ({
15
15
  }
16
16
  });
17
17
  import { trace as Fe } from "@ninebone/util";
18
- const We = class We extends Fe.constructor {
18
+ const Ie = class Ie extends Fe.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(We, "Trace");
24
- let qe = We;
25
- const M = new qe();
26
- var I, B, m, D, P, V, ce, X, he;
27
- const ze = class ze extends HTMLElement {
23
+ h(Ie, "Trace");
24
+ let Se = Ie;
25
+ const L = new Se();
26
+ var _, D, p, N, P, V, ne, X, oe;
27
+ const Me = class Me extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- g(this, I);
31
- g(this, B, !1);
32
- g(this, m);
33
- g(this, D);
30
+ g(this, _);
31
+ g(this, D, !1);
32
+ g(this, p);
33
+ g(this, N);
34
34
  g(this, P);
35
35
  g(this, V);
36
- g(this, ce, /* @__PURE__ */ h(() => {
37
- if (!e(this, I)) return;
38
- const t = e(this, I).querySelector(".ng-container-body");
36
+ g(this, ne, /* @__PURE__ */ h(() => {
37
+ if (!e(this, _)) return;
38
+ const t = e(this, _).querySelector(".ng-container-body");
39
39
  t && (y(this, V, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), e(this, V).observe(t));
42
42
  }, "#observeResize"));
43
43
  S(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!e(this, I) || !e(this, m) || e(this, B)) return;
45
- const t = e(this, m).container, s = t.querySelector("table");
44
+ if (!e(this, _) || !e(this, p) || e(this, D)) return;
45
+ const t = e(this, p).container, s = t.querySelector("table");
46
46
  if (!s) return;
47
- const r = e(this, m).track, n = e(this, m).thumb, o = e(this, I).querySelector(".ng-container-bottom"), c = t.clientWidth, u = s.scrollWidth;
47
+ const r = e(this, p).track, n = e(this, p).thumb, o = e(this, _).querySelector(".ng-container-bottom"), c = t.clientWidth, u = s.scrollWidth;
48
48
  if (c !== 0 && u > c)
49
49
  o && (o.style.display = "flex");
50
50
  else {
@@ -58,62 +58,62 @@ const ze = class ze extends HTMLElement {
58
58
  const d = t.scrollLeft, f = u - c;
59
59
  let b = 0;
60
60
  f > 0 && (b = parseInt(d / f * (l - a), 10)), b < 0 && (b = 0);
61
- const p = l - a;
62
- b > p && (b = p), n.style.left = `${b}px`, M.log(b), e(this, m).left.disabled = b === 0, e(this, m).right.disabled = b >= p - 1;
61
+ const m = l - a;
62
+ b > m && (b = m), n.style.left = `${b}px`, L.log(b), e(this, p).left.disabled = b === 0, e(this, p).right.disabled = b >= m - 1;
63
63
  }, "refresh"));
64
64
  g(this, X, /* @__PURE__ */ h((t) => {
65
- if (!e(this, m)) return !1;
66
- const s = e(this, m).container, r = s.querySelector("table");
65
+ if (!e(this, p)) return !1;
66
+ const s = e(this, p).container, r = s.querySelector("table");
67
67
  if (!r) return !1;
68
- const n = e(this, m).track.getBoundingClientRect(), o = e(this, m).thumb.clientWidth;
68
+ const n = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
69
69
  let c = t;
70
70
  c < 0 && (c = 0);
71
71
  const u = n.width - o;
72
- c > u && (c = u), c = parseInt(c, 10), e(this, m).thumb.style.left = `${c}px`, e(this, m).left.disabled = c === 0, e(this, m).right.disabled = c >= u - 1;
72
+ c > u && (c = u), c = parseInt(c, 10), e(this, p).thumb.style.left = `${c}px`, e(this, p).left.disabled = c === 0, e(this, p).right.disabled = c >= u - 1;
73
73
  const l = s.clientWidth, a = r.scrollWidth;
74
74
  let d = u > 0 ? -c * (a - l) / u : 0;
75
75
  return -d > a - l && (d = -(a - l)), -d + 5 > a - l && (d = -(a - l)), l >= a && (d = 0), r.style.transform = `translateX(${d}px)`, c > 0 && c < u - 1;
76
76
  }, "#thumbMoveTo"));
77
- g(this, he, /* @__PURE__ */ h(() => {
77
+ g(this, oe, /* @__PURE__ */ h(() => {
78
78
  const t = /* @__PURE__ */ h((r) => {
79
- clearInterval(e(this, D)), clearInterval(e(this, P));
80
- const n = parseInt(e(this, m).thumb.style.left || 0, 10);
81
- e(this, X).call(this, n + r), y(this, D, setInterval(() => {
82
- clearInterval(e(this, D)), y(this, P, setInterval(() => {
83
- const o = parseInt(e(this, m).thumb.style.left || 0, 10);
79
+ clearInterval(e(this, N)), clearInterval(e(this, P));
80
+ const n = parseInt(e(this, p).thumb.style.left || 0, 10);
81
+ e(this, X).call(this, n + r), y(this, N, setInterval(() => {
82
+ clearInterval(e(this, N)), y(this, P, setInterval(() => {
83
+ const o = parseInt(e(this, p).thumb.style.left || 0, 10);
84
84
  e(this, X).call(this, o + r) || clearInterval(e(this, P));
85
85
  }, 50));
86
86
  }, 500));
87
87
  }, "delayScroll"), s = /* @__PURE__ */ h(() => {
88
- clearInterval(e(this, D)), clearInterval(e(this, P));
88
+ clearInterval(e(this, N)), clearInterval(e(this, P));
89
89
  }, "clearTimer");
90
90
  ["mouseup", "mouseleave", "touchend"].forEach((r) => {
91
- e(this, m).left.addEventListener(r, s), e(this, m).right.addEventListener(r, s), e(this, m).track.addEventListener(r, s);
92
- }), e(this, m).left.addEventListener("mousedown", (r) => {
91
+ e(this, p).left.addEventListener(r, s), e(this, p).right.addEventListener(r, s), e(this, p).track.addEventListener(r, s);
92
+ }), e(this, p).left.addEventListener("mousedown", (r) => {
93
93
  r.button === 0 && t(-20);
94
- }), e(this, m).right.addEventListener("mousedown", (r) => {
94
+ }), e(this, p).right.addEventListener("mousedown", (r) => {
95
95
  r.button === 0 && t(20);
96
- }), e(this, m).left.addEventListener("touchstart", () => t(-20)), e(this, m).right.addEventListener("touchstart", () => t(20)), e(this, m).track.addEventListener("mousedown", (r) => {
96
+ }), e(this, p).left.addEventListener("touchstart", () => t(-20)), e(this, p).right.addEventListener("touchstart", () => t(20)), e(this, p).track.addEventListener("mousedown", (r) => {
97
97
  if (r.button !== 0) return;
98
98
  r.preventDefault();
99
- const n = e(this, m).track.getBoundingClientRect(), o = e(this, m).thumb.clientWidth;
99
+ const n = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
100
100
  e(this, X).call(this, r.clientX - n.left - o / 2);
101
- }), e(this, m).thumb.addEventListener("mousedown", (r) => {
101
+ }), e(this, p).thumb.addEventListener("mousedown", (r) => {
102
102
  if (r.button !== 0) return;
103
- r.stopPropagation(), r.preventDefault(), y(this, B, !0), this.shiftX = r.clientX - e(this, m).thumb.getBoundingClientRect().left;
103
+ r.stopPropagation(), r.preventDefault(), y(this, D, !0), this.shiftX = r.clientX - e(this, p).thumb.getBoundingClientRect().left;
104
104
  const n = /* @__PURE__ */ h((c) => {
105
- if (!e(this, B)) return;
106
- const u = e(this, m).track.getBoundingClientRect();
105
+ if (!e(this, D)) return;
106
+ const u = e(this, p).track.getBoundingClientRect();
107
107
  e(this, X).call(this, c.clientX - u.left - this.shiftX);
108
108
  }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
109
- y(this, B, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
109
+ y(this, D, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
110
110
  }, "onMouseUp");
111
111
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
112
112
  });
113
113
  }, "#init"));
114
114
  }
115
115
  connectedCallback() {
116
- if (y(this, I, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, I)) return;
116
+ if (y(this, _, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, _)) return;
117
117
  this.innerHTML = `
118
118
  <style>
119
119
  nine-table-hscrollbar {
@@ -178,18 +178,18 @@ const ze = class ze extends HTMLElement {
178
178
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
179
179
  `;
180
180
  const t = /* @__PURE__ */ h(() => {
181
- const s = e(this, I).querySelector(".ng-container-body");
181
+ const s = e(this, _).querySelector(".ng-container-body");
182
182
  if (!s) {
183
183
  setTimeout(t, 10);
184
184
  return;
185
185
  }
186
- y(this, m, {
186
+ y(this, p, {
187
187
  container: s,
188
188
  track: this.querySelector(".ng-scroll-track"),
189
189
  thumb: this.querySelector(".ng-scroll-thumb"),
190
190
  left: this.querySelector(".ng-scroll-left"),
191
191
  right: this.querySelector(".ng-scroll-right")
192
- }), e(this, he).call(this), e(this, ce).call(this), this.refresh();
192
+ }), e(this, oe).call(this), e(this, ne).call(this), this.refresh();
193
193
  }, "initWhenReady");
194
194
  t();
195
195
  }
@@ -197,26 +197,26 @@ const ze = class ze extends HTMLElement {
197
197
  e(this, V) && e(this, V).disconnect();
198
198
  }
199
199
  };
200
- I = new WeakMap(), B = new WeakMap(), m = new WeakMap(), D = new WeakMap(), P = new WeakMap(), V = new WeakMap(), ce = new WeakMap(), X = new WeakMap(), he = new WeakMap(), h(ze, "NineTableHScrollBar");
201
- let Te = ze;
202
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Te);
203
- var W, H, q, z, _, $, de, fe, ue, ge;
204
- const Oe = class Oe {
200
+ _ = new WeakMap(), D = new WeakMap(), p = new WeakMap(), N = new WeakMap(), P = new WeakMap(), V = new WeakMap(), ne = new WeakMap(), X = new WeakMap(), oe = new WeakMap(), h(Me, "NineTableHScrollBar");
201
+ let Ee = Me;
202
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ee);
203
+ var W, M, A, z, H, $, le, ae, ce, he;
204
+ const He = class He {
205
205
  constructor(i) {
206
206
  g(this, W);
207
- g(this, H, []);
208
- g(this, q, null);
207
+ g(this, M, []);
208
+ g(this, A, null);
209
209
  g(this, z, null);
210
- g(this, _, 0);
210
+ g(this, H, 0);
211
211
  g(this, $, 0);
212
- S(this, "getRowHeight", /* @__PURE__ */ h(() => e(this, q), "getRowHeight"));
213
- g(this, de, /* @__PURE__ */ h(() => {
214
- e(this, fe).call(this);
212
+ S(this, "getRowHeight", /* @__PURE__ */ h(() => e(this, A), "getRowHeight"));
213
+ g(this, le, /* @__PURE__ */ h(() => {
214
+ e(this, ae).call(this);
215
215
  }, "#init"));
216
216
  /**
217
217
  * 🎯 뷰포트 크기 λ³€ν™” μ‹œμ μ— 높이 계산 및 ν•„μš”ν•œ ν–‰ 개수 산정·캐싱을 μ™„κ²°
218
218
  */
219
- g(this, fe, /* @__PURE__ */ h(() => {
219
+ g(this, ae, /* @__PURE__ */ h(() => {
220
220
  !e(this, W) || !(e(this, W) instanceof HTMLElement) || (y(this, z, new ResizeObserver((i) => {
221
221
  for (const t of i) {
222
222
  const s = t.target;
@@ -229,11 +229,11 @@ const Oe = class Oe {
229
229
  const c = s.querySelector(".ng-container-body") || s, u = c.querySelector("thead"), l = c.querySelector("tfoot");
230
230
  u && (o += u.offsetHeight || u.getBoundingClientRect().height), l && (o += l.offsetHeight || l.getBoundingClientRect().height);
231
231
  const a = Math.max(n - o, 100);
232
- if (e(this, _) !== a && (y(this, _, a), e(this, q) !== null)) {
233
- const d = Math.ceil(e(this, _) / e(this, q));
234
- y(this, $, d + 20), M.log(`[RowManager] Resized. Height: ${e(this, _)}px | Target Rows: ${e(this, $)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((f) => {
232
+ if (e(this, H) !== a && (y(this, H, a), e(this, A) !== null)) {
233
+ const d = Math.ceil(e(this, H) / e(this, A));
234
+ y(this, $, d + 20), L.log(`[RowManager] Resized. Height: ${e(this, H)}px | Target Rows: ${e(this, $)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((f) => {
235
235
  const b = s.querySelector(f);
236
- b && b.querySelector("tbody") && e(this, ge).call(this, b);
236
+ b && b.querySelector("tbody") && e(this, he).call(this, b);
237
237
  });
238
238
  }
239
239
  }
@@ -242,20 +242,20 @@ const Oe = class Oe {
242
242
  }, "#initResizeObserver"));
243
243
  // 🎯 ν…œν”Œλ¦Ώ μΆ”μΆœ, 높이 μΈ‘μ •, 초기 λ Œλ”λ§μ„ μˆœμ„œμ— 맞게 λ‚΄λΆ€μ—μ„œ 일괄 처리
244
244
  S(this, "initialize", /* @__PURE__ */ h((i) => {
245
- M.log(i);
245
+ L.log(i);
246
246
  const t = e(this, W).querySelector(".ng-container-body"), s = i.querySelector("tbody"), r = Array.from(s.querySelectorAll("tr"));
247
- y(this, H, r.map((n) => n.cloneNode(!0))), y(this, q, null), e(this, ue).call(this, t);
247
+ y(this, M, r.map((n) => n.cloneNode(!0))), y(this, A, null), e(this, ce).call(this, t);
248
248
  }, "initialize"));
249
- g(this, ue, /* @__PURE__ */ h((i) => {
250
- if (e(this, q) !== null && e(this, q) > 0)
251
- return e(this, q);
252
- if (e(this, H).length === 0)
249
+ g(this, ce, /* @__PURE__ */ h((i) => {
250
+ if (e(this, A) !== null && e(this, A) > 0)
251
+ return e(this, A);
252
+ if (e(this, M).length === 0)
253
253
  throw new Error("[RowManager] Template TRs are empty.");
254
254
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
255
255
  if (!t) return 24;
256
256
  t.querySelectorAll("tr:not(.nodata)").forEach((d) => d.remove());
257
257
  const s = t.querySelector("tr.nodata"), r = document.createDocumentFragment();
258
- e(this, H).forEach((d) => {
258
+ e(this, M).forEach((d) => {
259
259
  r.appendChild(d.cloneNode(!0));
260
260
  }), s ? s.before(r) : t.appendChild(r);
261
261
  const n = i.closest("nine-table-sheet"), o = n ? n.style.display : "", c = n ? n.style.visibility : "", u = n ? n.style.position : "";
@@ -264,12 +264,12 @@ const Oe = class Oe {
264
264
  const a = t.querySelectorAll("tr:not(.nodata)");
265
265
  if (a.forEach((d, f) => {
266
266
  l += d.offsetHeight || d.getBoundingClientRect().height;
267
- }), a.forEach((d) => d.remove()), n && (n.style.display = o, n.style.visibility = c, n.style.position = u), y(this, q, l), e(this, _) > 0) {
268
- const d = Math.ceil(e(this, _) / e(this, q));
267
+ }), a.forEach((d) => d.remove()), n && (n.style.display = o, n.style.visibility = c, n.style.position = u), y(this, A, l), e(this, H) > 0) {
268
+ const d = Math.ceil(e(this, H) / e(this, A));
269
269
  y(this, $, d + 20);
270
270
  } else
271
271
  y(this, $, 40);
272
- return console.log(`[RowManager] Template Height Cached: ${e(this, q)}px | RowCount: ${e(this, $)}`), e(this, q);
272
+ return console.log(`[RowManager] Template Height Cached: ${e(this, A)}px | RowCount: ${e(this, $)}`), e(this, A);
273
273
  }, "#measureAndCacheHeight"));
274
274
  /**
275
275
  * 🎯 μΊμ‹œλœ ν–‰ 개수 λ°˜ν™˜ (없을 λ•Œλ§Œ μ΅œμ†Œν•œμ˜ λ°©μ–΄ μ—°μ‚°)
@@ -287,14 +287,14 @@ const Oe = class Oe {
287
287
  /**
288
288
  * 🎯 μΊμ‹œλœ ν–‰ 개수λ₯Ό κ³§λ°”λ‘œ κ°€μ Έμ™€μ„œ TR λΌˆλŒ€ μ£Όμž… (쀑볡 계산 제거)
289
289
  */
290
- g(this, ge, /* @__PURE__ */ h((i) => {
291
- if (e(this, H).length === 0) return;
290
+ g(this, he, /* @__PURE__ */ h((i) => {
291
+ if (e(this, M).length === 0) return;
292
292
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
293
293
  if (!t) return;
294
294
  t.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
295
295
  const s = t.querySelector("tr.nodata"), r = document.createDocumentFragment(), n = e(this, $);
296
296
  for (let o = 0; o < n; o++)
297
- e(this, H).forEach((c) => {
297
+ e(this, M).forEach((c) => {
298
298
  r.appendChild(c.cloneNode(!0));
299
299
  });
300
300
  s ? s.before(r) : t.appendChild(r), console.log(`[RowManager] Rendered ${n} sets into DOM.`);
@@ -302,24 +302,24 @@ const Oe = class Oe {
302
302
  S(this, "destroy", /* @__PURE__ */ h(() => {
303
303
  e(this, z) && (e(this, z).disconnect(), y(this, z, null));
304
304
  }, "destroy"));
305
- y(this, W, i), e(this, de).call(this);
305
+ y(this, W, i), e(this, le).call(this);
306
306
  }
307
307
  get templateLength() {
308
- return e(this, H).length || 1;
308
+ return e(this, M).length || 1;
309
309
  }
310
310
  };
311
- W = new WeakMap(), H = new WeakMap(), q = new WeakMap(), z = new WeakMap(), _ = new WeakMap(), $ = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), h(Oe, "RowManager");
312
- let ke = Oe;
313
- var A, K, te, Z, ie, be, ye;
314
- const ee = class ee extends HTMLElement {
311
+ W = new WeakMap(), M = new WeakMap(), A = new WeakMap(), z = new WeakMap(), H = new WeakMap(), $ = new WeakMap(), le = new WeakMap(), ae = new WeakMap(), ce = new WeakMap(), he = new WeakMap(), h(He, "RowManager");
312
+ let Re = He;
313
+ var E, F, J, K, Q, de, fe;
314
+ const G = class G extends HTMLElement {
315
315
  constructor() {
316
316
  super();
317
- g(this, A, null);
318
- g(this, K);
317
+ g(this, E, null);
318
+ g(this, F);
319
319
  /**
320
320
  * 🎯 2차원 μ…€ 격자 인덱슀λ₯Ό κ³„μ‚°ν•˜μ—¬ 병합(`rowSpan`/`colSpan`) μ…€μ˜ μ ˆλŒ€ 컬럼 μœ„μΉ˜λ₯Ό λΆ€μ—¬
321
321
  */
322
- g(this, te, /* @__PURE__ */ h((t, s) => {
322
+ g(this, J, /* @__PURE__ */ h((t, s) => {
323
323
  const r = Array.from(t.querySelectorAll(s + " tr")), n = Array.from(t.querySelectorAll(s + " th," + s + " td")), o = r.length;
324
324
  if (o === 0 || n.length === 0) return;
325
325
  let c = 0;
@@ -336,10 +336,10 @@ const ee = class ee extends HTMLElement {
336
336
  d = v;
337
337
  break;
338
338
  }
339
- const b = f.rowSpan || 1, p = f.colSpan || 1;
339
+ const b = f.rowSpan || 1, m = f.colSpan || 1;
340
340
  for (let v = 0; v < b; v++)
341
- for (let L = 0; L < p; L++)
342
- a + v < o && d + L < c && (u[a + v][d + L] = v === 0 && L === 0 ? "1" : "0");
341
+ for (let C = 0; C < m; C++)
342
+ a + v < o && d + C < c && (u[a + v][d + C] = v === 0 && C === 0 ? "1" : "0");
343
343
  });
344
344
  }), r.forEach((l) => {
345
345
  const a = l.sectionRowIndex;
@@ -355,7 +355,7 @@ const ee = class ee extends HTMLElement {
355
355
  /**
356
356
  * 🎯 순수 바닐라 μžλ°”μŠ€ν¬λ¦½νŠΈ(Vanilla JS) 기반의 κΉ”λ”ν•œ #createSplitTable
357
357
  */
358
- g(this, Z, /* @__PURE__ */ h((t, s) => {
358
+ g(this, K, /* @__PURE__ */ h((t, s) => {
359
359
  const r = t.cloneNode(!0);
360
360
  return s === "left" ? r.querySelectorAll("col, th, td").forEach((n) => {
361
361
  n.getAttribute("fixed") !== "left" && n.remove();
@@ -370,32 +370,32 @@ const ee = class ee extends HTMLElement {
370
370
  const s = /* @__PURE__ */ h((l) => {
371
371
  const a = /* @__PURE__ */ h((f) => {
372
372
  if (f.querySelector("colgroup")) return;
373
- const b = f.querySelector("tbody tr") || f.querySelector("tr"), p = b ? b.querySelectorAll("th, td").length : 1, v = document.createElement("colgroup"), L = Math.max(Math.floor(f.clientWidth / p), 100);
374
- for (let le = 0; le < p; le++) {
375
- const Q = document.createElement("col");
376
- Q.setAttribute("width", L), v.appendChild(Q);
373
+ const b = f.querySelector("tbody tr") || f.querySelector("tr"), m = b ? b.querySelectorAll("th, td").length : 1, v = document.createElement("colgroup"), C = Math.max(Math.floor(f.clientWidth / m), 100);
374
+ for (let De = 0; De < m; De++) {
375
+ const Ne = document.createElement("col");
376
+ Ne.setAttribute("width", C), v.appendChild(Ne);
377
377
  }
378
378
  f.prepend(v);
379
379
  }, "ensureColgroup"), d = /* @__PURE__ */ h((f) => {
380
380
  if (f.querySelector("thead")) return;
381
- const b = document.createElement("thead"), p = f.querySelector("colgroup");
382
- p ? p.after(b) : f.prepend(b);
381
+ const b = document.createElement("thead"), m = f.querySelector("colgroup");
382
+ m ? m.after(b) : f.prepend(b);
383
383
  }, "ensureThead");
384
384
  return a(l), d(l), l.classList.add("nine-table-element"), l;
385
385
  }, "initializeTable"), r = t.cloneNode(!0);
386
- y(this, A, s(r)), e(this, A).style.display = "table", e(this, te).call(this, e(this, A), "thead"), e(this, te).call(this, e(this, A), "tbody"), Array.from(e(this, A).querySelectorAll("colgroup col")).forEach((l, a) => {
386
+ y(this, E, s(r)), e(this, E).style.display = "table", e(this, J).call(this, e(this, E), "thead"), e(this, J).call(this, e(this, E), "tbody"), Array.from(e(this, E).querySelectorAll("colgroup col")).forEach((l, a) => {
387
387
  const d = l.getAttribute("fixed");
388
- d && e(this, A).querySelectorAll(`[data-col="${a}"]`).forEach((f) => {
388
+ d && e(this, E).querySelectorAll(`[data-col="${a}"]`).forEach((f) => {
389
389
  f.setAttribute("fixed", d);
390
390
  });
391
- }), M.log(e(this, A));
391
+ }), L.log(e(this, E));
392
392
  const o = this.querySelector(".ng-container-left"), c = this.querySelector(".ng-container-body"), u = this.querySelector(".ng-container-right");
393
393
  if (c) {
394
- const l = e(this, Z).call(this, e(this, A), null);
395
- c.innerHTML = "", c.appendChild(l), M.log(e(this, A)), M.log(l), e(this, K).initialize(e(this, A));
394
+ const l = e(this, K).call(this, e(this, E), null);
395
+ c.innerHTML = "", c.appendChild(l), L.log(e(this, E)), L.log(l), e(this, F).initialize(e(this, E));
396
396
  }
397
397
  if (o) {
398
- const l = e(this, Z).call(this, e(this, A), "left");
398
+ const l = e(this, K).call(this, e(this, E), "left");
399
399
  let a = 0;
400
400
  l.querySelectorAll("col").forEach((f) => {
401
401
  const b = parseInt(f.getAttribute("width"), 10);
@@ -405,7 +405,7 @@ const ee = class ee extends HTMLElement {
405
405
  o.style.flex = `0 0 ${d}px`, o.style.width = `${d}px`;
406
406
  }
407
407
  if (u) {
408
- const l = e(this, Z).call(this, e(this, A), "right");
408
+ const l = e(this, K).call(this, e(this, E), "right");
409
409
  let a = 0;
410
410
  l.querySelectorAll("col").forEach((f) => {
411
411
  const b = parseInt(f.getAttribute("width"), 10);
@@ -419,10 +419,10 @@ const ee = class ee extends HTMLElement {
419
419
  (l = this.querySelector("nine-table-hscrollbar")) == null || l.refresh();
420
420
  }), setTimeout(() => {
421
421
  var l;
422
- e(this, ie).call(this), (l = this.querySelector("nine-table-hscrollbar")) == null || l.refresh();
422
+ e(this, Q).call(this), (l = this.querySelector("nine-table-hscrollbar")) == null || l.refresh();
423
423
  }, 0);
424
424
  }, "generate"));
425
- S(this, "getRowHeight", /* @__PURE__ */ h(() => e(this, K).getRowHeight(), "getRowHeight"));
425
+ S(this, "getRowHeight", /* @__PURE__ */ h(() => e(this, F).getRowHeight(), "getRowHeight"));
426
426
  S(this, "scrollToX", /* @__PURE__ */ h((t) => {
427
427
  const s = this.querySelector(".ng-container-body");
428
428
  s && (s.scrollLeft = t);
@@ -431,7 +431,7 @@ const ee = class ee extends HTMLElement {
431
431
  const s = this.querySelector(".ng-container-body");
432
432
  s && (s.scrollTop = t);
433
433
  }, "scrollToY"));
434
- g(this, ie, /* @__PURE__ */ h(() => {
434
+ g(this, Q, /* @__PURE__ */ h(() => {
435
435
  var l, a, d;
436
436
  const t = this.querySelector(".ng-container-left table"), s = this.querySelector(".ng-container-body table"), r = this.querySelector(".ng-container-right table");
437
437
  if (!s) return;
@@ -441,18 +441,18 @@ const ee = class ee extends HTMLElement {
441
441
  ((l = n[f]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
442
442
  ((a = o[f]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
443
443
  ((d = c[f]) == null ? void 0 : d.getBoundingClientRect().height) || 0
444
- ], p = Math.max(...b);
445
- p > 0 && (n[f] && (n[f].style.height = `${p}px`), o[f] && (o[f].style.height = `${p}px`), c[f] && (c[f].style.height = `${p}px`));
444
+ ], m = Math.max(...b);
445
+ m > 0 && (n[f] && (n[f].style.height = `${m}px`), o[f] && (o[f].style.height = `${m}px`), c[f] && (c[f].style.height = `${m}px`));
446
446
  }
447
447
  }, "#syncRowHeights"));
448
- g(this, be, /* @__PURE__ */ h(() => {
449
- e(this, ye).call(this), new MutationObserver((t) => {
448
+ g(this, de, /* @__PURE__ */ h(() => {
449
+ e(this, fe).call(this), new MutationObserver((t) => {
450
450
  for (const s of t)
451
- s.attributeName === "class" && this.classList.contains("active") && e(this, ie).call(this);
451
+ s.attributeName === "class" && this.classList.contains("active") && e(this, Q).call(this);
452
452
  }).observe(this, { attributes: !0 });
453
453
  }, "#init"));
454
- g(this, ye, /* @__PURE__ */ h(() => {
455
- const t = ee.SCROLLBAR_SIZE;
454
+ g(this, fe, /* @__PURE__ */ h(() => {
455
+ const t = G.SCROLLBAR_SIZE;
456
456
  this.innerHTML = `
457
457
  <style>
458
458
  nine-table-sheet {
@@ -575,38 +575,38 @@ const ee = class ee extends HTMLElement {
575
575
  </div>
576
576
  `;
577
577
  }, "#render"));
578
- y(this, K, new ke(this));
578
+ y(this, F, new Re(this));
579
579
  }
580
580
  connectedCallback() {
581
- e(this, be).call(this);
581
+ e(this, de).call(this);
582
582
  }
583
583
  disconnectedCallback() {
584
- this.innerHTML = "", M.log("NineTableSheet destroyed.");
584
+ this.innerHTML = "", L.log("NineTableSheet destroyed.");
585
585
  }
586
586
  };
587
- A = new WeakMap(), K = new WeakMap(), te = new WeakMap(), Z = new WeakMap(), ie = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), h(ee, "NineTableSheet"), S(ee, "SCROLLBAR_SIZE", 16);
588
- let ae = ee;
589
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ae);
590
- var pe, se;
591
- const Ne = class Ne extends HTMLElement {
587
+ E = new WeakMap(), F = new WeakMap(), J = new WeakMap(), K = new WeakMap(), Q = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), h(G, "NineTableSheet"), S(G, "SCROLLBAR_SIZE", 16);
588
+ let re = G;
589
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", re);
590
+ var ue, ee;
591
+ const $e = class $e extends HTMLElement {
592
592
  constructor() {
593
593
  super();
594
- g(this, pe, /* @__PURE__ */ h(() => {
594
+ g(this, ue, /* @__PURE__ */ h(() => {
595
595
  var t;
596
596
  (t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
597
597
  var o;
598
598
  const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
599
- e(this, se).call(this, n, r);
600
- }), e(this, se).call(this, 0, !1);
599
+ e(this, ee).call(this, n, r);
600
+ }), e(this, ee).call(this, 0, !1);
601
601
  }, "#init"));
602
- g(this, se, /* @__PURE__ */ h((t, s = !1) => {
602
+ g(this, ee, /* @__PURE__ */ h((t, s = !1) => {
603
603
  const r = /* @__PURE__ */ h(() => {
604
604
  const a = Array.from(this.querySelectorAll("nine-table-sheet"));
605
605
  Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
606
606
  const f = a.filter((b) => b.classList.contains("active"));
607
607
  f.length < 2 || f.forEach((b) => {
608
- const p = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${p}"]`), L = a[p + 1];
609
- v && L && L.classList.contains("active") && v.style.setProperty("display", "flex");
608
+ const m = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), C = a[m + 1];
609
+ v && C && C.classList.contains("active") && v.style.setProperty("display", "flex");
610
610
  });
611
611
  }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), c = n.querySelectorAll(".nine-tab-item"), u = o.querySelectorAll("nine-table-sheet");
612
612
  if (!c[t]) return;
@@ -632,52 +632,36 @@ const Ne = class Ne extends HTMLElement {
632
632
  }, "#switchSheet"));
633
633
  }
634
634
  connectedCallback() {
635
- e(this, pe).call(this);
635
+ e(this, ue).call(this);
636
636
  }
637
637
  };
638
- pe = new WeakMap(), se = new WeakMap(), h(Ne, "NineTableSheets");
639
- let Le = Ne;
640
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Le);
641
- var me, re, j, F;
642
- const E = class E {
638
+ ue = new WeakMap(), ee = new WeakMap(), h($e, "NineTableSheets");
639
+ let Ae = $e;
640
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Ae);
641
+ var ge, te;
642
+ const I = class I {
643
643
  /**
644
- * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 컴파일된 ν…Œμ΄λΈ” μ„ΈνŠΈ λ°°μ—΄λ‘œ λ°˜ν™˜ν•©λ‹ˆλ‹€.
644
+ * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
645
645
  */
646
646
  static compileAll(i) {
647
- return Array.isArray(i) ? i.map((t) => E.compile(t)) : [];
647
+ return Array.isArray(i) ? i.map((t) => I.compile(t)) : [];
648
648
  }
649
649
  /**
650
- * 🎯 단일 원본 ν…Œμ΄λΈ” 컴파일 처리
650
+ * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
651
651
  */
652
652
  static compile(i) {
653
- var c, u, l, a, d, f, b, p, v;
653
+ var r, n, o;
654
654
  if (!i) return null;
655
655
  const t = i.cloneNode(!0);
656
- e(c = E, me).call(c, t), e(u = E, re).call(u, t, "thead"), e(l = E, re).call(l, t, "tbody"), Array.from(t.querySelectorAll("colgroup col")).forEach((L, le) => {
657
- const Q = L.getAttribute("fixed");
658
- Q && t.querySelectorAll(`[data-col="${le}"]`).forEach((Ze) => {
659
- Ze.setAttribute("fixed", Q);
656
+ return e(r = I, ge).call(r, t), e(n = I, te).call(n, t, "thead"), e(o = I, te).call(o, t, "tbody"), Array.from(t.querySelectorAll("colgroup col")).forEach((c, u) => {
657
+ const l = c.getAttribute("fixed");
658
+ l && t.querySelectorAll(`[data-col="${u}"]`).forEach((a) => {
659
+ a.setAttribute("fixed", l);
660
660
  });
661
- });
662
- const r = e(a = E, j).call(a, t, "left"), n = e(d = E, j).call(d, t, null), o = e(f = E, j).call(f, t, "right");
663
- return {
664
- masterTable: t,
665
- left: {
666
- table: r,
667
- width: e(b = E, F).call(b, r)
668
- },
669
- body: {
670
- table: n,
671
- width: e(p = E, F).call(p, n)
672
- },
673
- right: {
674
- table: o,
675
- width: e(v = E, F).call(v, o)
676
- }
677
- };
661
+ }), t;
678
662
  }
679
663
  };
680
- me = new WeakMap(), re = new WeakMap(), j = new WeakMap(), F = new WeakMap(), h(E, "TableCompiler"), g(E, me, /* @__PURE__ */ h((i) => {
664
+ ge = new WeakMap(), te = new WeakMap(), h(I, "TableCompiler"), g(I, ge, /* @__PURE__ */ h((i) => {
681
665
  if (!i.querySelector("colgroup")) {
682
666
  const t = i.querySelector("tbody tr") || i.querySelector("tr"), s = t ? t.querySelectorAll("th, td").length : 1, r = document.createElement("colgroup"), n = Math.max(Math.floor(i.clientWidth / s), 100);
683
667
  for (let o = 0; o < s; o++) {
@@ -691,7 +675,7 @@ me = new WeakMap(), re = new WeakMap(), j = new WeakMap(), F = new WeakMap(), h(
691
675
  s ? s.after(t) : i.prepend(t);
692
676
  }
693
677
  i.classList.add("nine-table-element"), i.style.display = "table";
694
- }, "#ensureTableStructure")), g(E, re, /* @__PURE__ */ h((i, t) => {
678
+ }, "#ensureTableStructure")), g(I, te, /* @__PURE__ */ h((i, t) => {
695
679
  const s = Array.from(i.querySelectorAll(t + " tr")), r = Array.from(i.querySelectorAll(t + " th," + t + " td")), n = s.length;
696
680
  if (n === 0 || r.length === 0) return;
697
681
  let o = 0;
@@ -703,15 +687,15 @@ me = new WeakMap(), re = new WeakMap(), j = new WeakMap(), F = new WeakMap(), h(
703
687
  const l = u.sectionRowIndex;
704
688
  let a = 0;
705
689
  Array.from(u.querySelectorAll("th,td")).forEach((d) => {
706
- for (let p = 0; p < c[l].length; p++)
707
- if (c[l][p] === null) {
708
- a = p;
690
+ for (let m = 0; m < c[l].length; m++)
691
+ if (c[l][m] === null) {
692
+ a = m;
709
693
  break;
710
694
  }
711
695
  const f = d.rowSpan || 1, b = d.colSpan || 1;
712
- for (let p = 0; p < f; p++)
696
+ for (let m = 0; m < f; m++)
713
697
  for (let v = 0; v < b; v++)
714
- l + p < n && a + v < o && (c[l + p][a + v] = p === 0 && v === 0 ? "1" : "0");
698
+ l + m < n && a + v < o && (c[l + m][a + v] = m === 0 && v === 0 ? "1" : "0");
715
699
  });
716
700
  }), s.forEach((u) => {
717
701
  const l = u.sectionRowIndex;
@@ -723,41 +707,26 @@ me = new WeakMap(), re = new WeakMap(), j = new WeakMap(), F = new WeakMap(), h(
723
707
  }
724
708
  });
725
709
  });
726
- }, "#resetColIndex")), g(E, j, /* @__PURE__ */ h((i, t) => {
727
- const s = i.cloneNode(!0);
728
- return t === "left" ? s.querySelectorAll("col, th, td").forEach((r) => {
729
- r.getAttribute("fixed") !== "left" && r.remove();
730
- }) : t === "right" ? s.querySelectorAll("col, th, td").forEach((r) => {
731
- r.getAttribute("fixed") !== "right" && r.remove();
732
- }) : s.querySelectorAll("[fixed=left], [fixed=right]").forEach((r) => {
733
- r.remove();
734
- }), s;
735
- }, "#createSplitTable")), g(E, F, /* @__PURE__ */ h((i) => {
736
- let t = 0;
737
- return i.querySelectorAll("col").forEach((s) => {
738
- const r = parseInt(s.getAttribute("width"), 10);
739
- isNaN(r) || (t += r);
740
- }), t;
741
- }, "#calculateTableWidth"));
742
- let Ce = E;
743
- var R, we, ne, xe;
744
- const Be = class Be {
710
+ }, "#resetColIndex"));
711
+ let qe = I;
712
+ var R, be, ie, ye;
713
+ const We = class We {
745
714
  constructor(i) {
746
715
  g(this, R);
747
- g(this, we, /* @__PURE__ */ h(() => {
748
- e(this, xe).call(this), new ResizeObserver((i) => {
716
+ g(this, be, /* @__PURE__ */ h(() => {
717
+ e(this, ye).call(this), new ResizeObserver((i) => {
749
718
  for (let t of i)
750
- e(this, R).getAttribute("auto-height") === "true" && e(this, ne).call(this);
719
+ e(this, R).getAttribute("auto-height") === "true" && e(this, ie).call(this);
751
720
  }).observe(e(this, R));
752
721
  }, "#init"));
753
- g(this, ne, /* @__PURE__ */ h(() => {
722
+ g(this, ie, /* @__PURE__ */ h(() => {
754
723
  var u, l;
755
724
  const i = Array.from(e(this, R).shadowRoot.querySelectorAll("nine-table-sheet.active"));
756
725
  if (i.length === 0) return;
757
- const t = parseInt(e(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((a) => a.getRowHeight())), r = (u = e(this, R).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : u.getBoundingClientRect().height, n = (l = e(this, R).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = ae.SCROLLBAR_SIZE, c = t * s + r + n + o;
726
+ const t = parseInt(e(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((a) => a.getRowHeight())), r = (u = e(this, R).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : u.getBoundingClientRect().height, n = (l = e(this, R).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = re.SCROLLBAR_SIZE, c = t * s + r + n + o;
758
727
  e(this, R).style.height = `${c}px`;
759
728
  }, "#applyAutoHeight"));
760
- g(this, xe, /* @__PURE__ */ h(() => {
729
+ g(this, ye, /* @__PURE__ */ h(() => {
761
730
  const t = Array.from(e(this, R).children).filter((l) => l.tagName === "TABLE"), s = e(this, R).getAttribute("auto-height") === "true", r = t.length, n = t.map((l, a) => {
762
731
  const f = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, b = a < r - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
763
732
  return f + b;
@@ -861,20 +830,20 @@ const Be = class Be {
861
830
  </nine-table-body>
862
831
  <nine-table-footer></nine-table-footer>
863
832
  `;
864
- const c = e(this, R).shadowRoot.querySelectorAll("nine-table-sheet"), u = Ce.compileAll(t);
865
- M.log(u), c == null || c.forEach((l, a) => {
833
+ const c = e(this, R).shadowRoot.querySelectorAll("nine-table-sheet"), u = qe.compileAll(t);
834
+ L.log("==================="), L.log(u), L.log("==================="), c == null || c.forEach((l, a) => {
866
835
  t[a] && setTimeout(() => {
867
- l.generate(t[a]), s && e(this, ne).call(this);
836
+ l.generate(t[a]), s && e(this, ie).call(this);
868
837
  });
869
838
  });
870
839
  }, "#render"));
871
- y(this, R, i), e(this, we).call(this);
840
+ y(this, R, i), e(this, be).call(this);
872
841
  }
873
842
  };
874
- R = new WeakMap(), we = new WeakMap(), ne = new WeakMap(), xe = new WeakMap(), h(Be, "LayoutManager");
875
- let Ie = Be;
843
+ R = new WeakMap(), be = new WeakMap(), ie = new WeakMap(), ye = new WeakMap(), h(We, "LayoutManager");
844
+ let Te = We;
876
845
  var O, Y;
877
- const De = class De {
846
+ const ze = class ze {
878
847
  constructor(i) {
879
848
  g(this, O);
880
849
  g(this, Y, -1);
@@ -894,50 +863,50 @@ const De = class De {
894
863
  });
895
864
  }
896
865
  };
897
- O = new WeakMap(), Y = new WeakMap(), h(De, "ngRow");
898
- let Me = De;
899
- var T, x, k, G, ve, N, Se, oe, Ee, Ae, J;
900
- const C = class C {
866
+ O = new WeakMap(), Y = new WeakMap(), h(ze, "ngRow");
867
+ let ke = ze;
868
+ var q, x, T, Z, pe, B, me, se, we, xe, j;
869
+ const k = class k {
901
870
  constructor(i, t) {
902
- g(this, T);
871
+ g(this, q);
903
872
  g(this, x);
904
- g(this, k, []);
905
- g(this, G, []);
906
- g(this, ve, 0);
907
- g(this, N, []);
908
- g(this, Se, /* @__PURE__ */ h(() => {
909
- y(this, N, []);
910
- const i = e(this, T).template || [];
873
+ g(this, T, []);
874
+ g(this, Z, []);
875
+ g(this, pe, 0);
876
+ g(this, B, []);
877
+ g(this, me, /* @__PURE__ */ h(() => {
878
+ y(this, B, []);
879
+ const i = e(this, q).template || [];
911
880
  Array.from(i).forEach((t) => {
912
881
  var s;
913
- e(this, N).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
882
+ e(this, B).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
914
883
  }), (e(this, x).rawRecords || []).forEach((t) => {
915
- t.__ng || (t.__ng = e(this, oe).call(this)), t.__ng.height = e(this, N).slice();
884
+ t.__ng || (t.__ng = e(this, se).call(this)), t.__ng.height = e(this, B).slice();
916
885
  });
917
886
  }, "#initialize"));
918
887
  S(this, "set", /* @__PURE__ */ h((i) => {
919
888
  this.clear(), this.add(i, !1);
920
889
  }, "set"));
921
- g(this, oe, /* @__PURE__ */ h(() => ({
922
- rowState: C.ROW_STATE.EMPTY,
890
+ g(this, se, /* @__PURE__ */ h(() => ({
891
+ rowState: k.ROW_STATE.EMPTY,
923
892
  deleted: !1,
924
893
  filtered: !1,
925
- height: e(this, N).slice(),
894
+ height: e(this, B).slice(),
926
895
  o: {},
927
896
  c: {},
928
- _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, N).slice(), -1, {}, {}]
897
+ _: [0, 0, 0, 0, k.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, B).slice(), -1, {}, {}]
929
898
  }), "#getDefaultMeta"));
930
899
  S(this, "reset", /* @__PURE__ */ h(() => {
931
- y(this, k, []), y(this, G, []);
900
+ y(this, T, []), y(this, Z, []);
932
901
  }, "reset"));
933
902
  S(this, "clear", /* @__PURE__ */ h(() => {
934
903
  var i;
935
- e(this, x).rawRecords = [], y(this, k, []), y(this, G, []), (i = e(this, x).viewRecords) != null && i.reset && e(this, x).viewRecords.reset();
904
+ e(this, x).rawRecords = [], y(this, T, []), y(this, Z, []), (i = e(this, x).viewRecords) != null && i.reset && e(this, x).viewRecords.reset();
936
905
  }, "clear"));
937
- g(this, Ee, /* @__PURE__ */ h((i) => {
906
+ g(this, we, /* @__PURE__ */ h((i) => {
938
907
  var r;
939
908
  Array.isArray(i) || (i = [i]);
940
- const t = typeof ((r = e(this, T).fields) == null ? void 0 : r.get) == "function" ? e(this, T).fields.get() : Object.keys(i[0] || {}), s = [];
909
+ const t = typeof ((r = e(this, q).fields) == null ? void 0 : r.get) == "function" ? e(this, q).fields.get() : Object.keys(i[0] || {}), s = [];
941
910
  return i.forEach((n) => {
942
911
  const o = { v: [] };
943
912
  t.forEach((c) => {
@@ -945,28 +914,28 @@ const C = class C {
945
914
  }), s.push(o);
946
915
  }), s;
947
916
  }, "#json2Array"));
948
- g(this, Ae, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
949
- t.__ng = e(this, oe).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = C.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
917
+ g(this, xe, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
918
+ t.__ng = e(this, se).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
950
919
  }), i), "#defaultInsert"));
951
920
  S(this, "add", /* @__PURE__ */ h((i, t = !0) => {
952
921
  var n;
953
922
  i === void 0 && (i = {});
954
- const s = e(this, Ee).call(this, i);
955
- e(this, x).rawRecords = e(this, x).rawRecords.concat(e(this, Ae).call(this, s)), this.resetRecords();
923
+ const s = e(this, we).call(this, i);
924
+ e(this, x).rawRecords = e(this, x).rawRecords.concat(e(this, xe).call(this, s)), this.resetRecords();
956
925
  const r = this.count() - 1;
957
926
  return t || s.forEach((o, c) => {
958
927
  const u = e(this, x).rawRecords[r - c];
959
- u && (u.__ng.rowState = C.ROW_STATE.EMPTY);
928
+ u && (u.__ng.rowState = k.ROW_STATE.EMPTY);
960
929
  }), (n = e(this, x).viewRecords) != null && n.reset && e(this, x).viewRecords.reset(), r;
961
930
  }, "add"));
962
931
  S(this, "delete", /* @__PURE__ */ h((i) => {
963
932
  var s;
964
933
  let t = [];
965
934
  Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this, x).owner.row.at] : t = [parseInt(i, 10)], t.sort((r, n) => n - r).forEach((r) => {
966
- if (e(this, k)[r]) {
967
- const n = e(this, k)[r].__ng.rowid;
968
- e(this, k)[r].__ng.rowState === C.ROW_STATE.INSERT ? e(this, x).rawRecords = e(this, x).rawRecords.filter((o) => o.__ng.rowid !== n) : e(this, x).rawRecords.forEach((o) => {
969
- o.__ng.rowid === n && (o.__ng.deleted = !0, o.__ng.rowState = C.ROW_STATE.DELETE);
935
+ if (e(this, T)[r]) {
936
+ const n = e(this, T)[r].__ng.rowid;
937
+ e(this, T)[r].__ng.rowState === k.ROW_STATE.INSERT ? e(this, x).rawRecords = e(this, x).rawRecords.filter((o) => o.__ng.rowid !== n) : e(this, x).rawRecords.forEach((o) => {
938
+ o.__ng.rowid === n && (o.__ng.deleted = !0, o.__ng.rowState = k.ROW_STATE.DELETE);
970
939
  });
971
940
  }
972
941
  }), this.resetRecords(), (s = e(this, x).viewRecords) != null && s.reset && e(this, x).viewRecords.reset();
@@ -974,25 +943,25 @@ const C = class C {
974
943
  S(this, "setValue", /* @__PURE__ */ h((i, t, s) => {
975
944
  var u;
976
945
  i = parseInt(i, 10);
977
- const n = (typeof ((u = e(this, T).fields) == null ? void 0 : u.get) == "function" ? e(this, T).fields.get() : []).indexOf(t);
946
+ const n = (typeof ((u = e(this, q).fields) == null ? void 0 : u.get) == "function" ? e(this, q).fields.get() : []).indexOf(t);
978
947
  if (n < 0) return;
979
948
  const o = this.getValidData()[i];
980
949
  if (!o) return;
981
950
  const c = o.v[n];
982
- c !== s && o.__ng.rowState !== C.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = c), o.__ng.rowState = C.ROW_STATE.UPDATE), o.v[n] = s, e(this, x).owner.refreshData && e(this, x).owner.refreshData(i);
951
+ c !== s && o.__ng.rowState !== k.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = c), o.__ng.rowState = k.ROW_STATE.UPDATE), o.v[n] = s, e(this, x).owner.refreshData && e(this, x).owner.refreshData(i);
983
952
  }, "setValue"));
984
953
  S(this, "resetRecords", /* @__PURE__ */ h(() => {
985
- y(this, G, e(this, x).rawRecords.filter((i) => !i.__ng.deleted)), y(this, k, e(this, x).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, x).rawRecords.forEach((i, t) => {
954
+ y(this, Z, e(this, x).rawRecords.filter((i) => !i.__ng.deleted)), y(this, T, e(this, x).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, x).rawRecords.forEach((i, t) => {
986
955
  i.__ng.rowidx = t;
987
- }), e(this, k).forEach((i, t) => {
956
+ }), e(this, T).forEach((i, t) => {
988
957
  i.__ng.i = t;
989
958
  });
990
959
  }, "resetRecords"));
991
- S(this, "getValidData", /* @__PURE__ */ h(() => (e(this, k).length === 0 && e(this, x).rawRecords.length > 0 && this.resetRecords(), e(this, k)), "getValidData"));
992
- g(this, J, /* @__PURE__ */ h((i) => {
960
+ S(this, "getValidData", /* @__PURE__ */ h(() => (e(this, T).length === 0 && e(this, x).rawRecords.length > 0 && this.resetRecords(), e(this, T)), "getValidData"));
961
+ g(this, j, /* @__PURE__ */ h((i) => {
993
962
  var s;
994
963
  if (!i) return i;
995
- const t = typeof ((s = e(this, T).fields) == null ? void 0 : s.get) == "function" ? e(this, T).fields.get() : [];
964
+ const t = typeof ((s = e(this, q).fields) == null ? void 0 : s.get) == "function" ? e(this, q).fields.get() : [];
996
965
  return Array.isArray(i) ? i.filter((r) => !r.__ng.deleted).map((r) => {
997
966
  const n = {};
998
967
  return t.forEach((o, c) => {
@@ -1005,45 +974,45 @@ const C = class C {
1005
974
  var n;
1006
975
  const s = this.getValidData();
1007
976
  if (!s || s.length <= 0) return;
1008
- if (i == null) return e(this, J).call(this, s);
977
+ if (i == null) return e(this, j).call(this, s);
1009
978
  if (i < 0 || i >= s.length) return null;
1010
- const r = typeof ((n = e(this, T).fields) == null ? void 0 : n.get) == "function" ? e(this, T).fields.get() : [];
979
+ const r = typeof ((n = e(this, q).fields) == null ? void 0 : n.get) == "function" ? e(this, q).fields.get() : [];
1011
980
  if (t != null) {
1012
981
  const o = r.indexOf(t);
1013
982
  return o >= 0 ? s[i].v[o] : null;
1014
983
  }
1015
- return e(this, J).call(this, s[i]);
984
+ return e(this, j).call(this, s[i]);
1016
985
  }, "get"));
1017
- y(this, T, i), y(this, x, t), e(this, Se).call(this);
986
+ y(this, q, i), y(this, x, t), e(this, me).call(this);
1018
987
  }
1019
988
  get source() {
1020
- return e(this, J).call(this, e(this, x).rawRecords);
989
+ return e(this, j).call(this, e(this, x).rawRecords);
1021
990
  }
1022
991
  set source(i) {
1023
992
  this.clear(), this.add(i, !1);
1024
993
  }
1025
994
  get nextId() {
1026
- return ++Ke(this, ve)._;
995
+ return ++Ye(this, pe)._;
1027
996
  }
1028
997
  get length() {
1029
- return e(this, k).length;
998
+ return e(this, T).length;
1030
999
  }
1031
1000
  getRowCount() {
1032
1001
  return this.length;
1033
1002
  }
1034
1003
  };
1035
- T = new WeakMap(), x = new WeakMap(), k = new WeakMap(), G = new WeakMap(), ve = new WeakMap(), N = new WeakMap(), Se = new WeakMap(), oe = new WeakMap(), Ee = new WeakMap(), Ae = new WeakMap(), J = new WeakMap(), h(C, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1036
- S(C, "ROW_STATE", {
1004
+ q = new WeakMap(), x = new WeakMap(), T = new WeakMap(), Z = new WeakMap(), pe = new WeakMap(), B = new WeakMap(), me = new WeakMap(), se = new WeakMap(), we = new WeakMap(), xe = new WeakMap(), j = new WeakMap(), h(k, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1005
+ S(k, "ROW_STATE", {
1037
1006
  EMPTY: "EMPTY",
1038
1007
  NORMAL: "NORMAL",
1039
1008
  INSERT: "INSERT",
1040
1009
  UPDATE: "UPDATE",
1041
1010
  DELETE: "DELETE"
1042
1011
  });
1043
- let He = C;
1044
- const Pe = class Pe {
1012
+ let Le = k;
1013
+ const Oe = class Oe {
1045
1014
  constructor(i) {
1046
- this.owner = i, this.row = new Me(this), this.data = new He(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1015
+ this.owner = i, this.row = new ke(this), this.data = new Le(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1047
1016
  var t;
1048
1017
  (t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
1049
1018
  }, this.setDataSource = (t) => {
@@ -1060,22 +1029,22 @@ const Pe = class Pe {
1060
1029
  }, this.setDataSource([]);
1061
1030
  }
1062
1031
  };
1063
- h(Pe, "ngDataManager");
1064
- let _e = Pe;
1065
- var U, Re;
1066
- const Ve = class Ve extends HTMLElement {
1032
+ h(Oe, "ngDataManager");
1033
+ let Ce = Oe;
1034
+ var U, ve;
1035
+ const Be = class Be extends HTMLElement {
1067
1036
  constructor() {
1068
1037
  super();
1069
1038
  //#created = false;
1070
1039
  g(this, U);
1071
- g(this, Re);
1072
- this.attachShadow({ mode: "open" }), y(this, U, new _e(this));
1040
+ g(this, ve);
1041
+ this.attachShadow({ mode: "open" }), y(this, U, new Ce(this));
1073
1042
  }
1074
1043
  connectedCallback() {
1075
- y(this, Re, new Ie(this)), M.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1044
+ y(this, ve, new Te(this)), L.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1076
1045
  }
1077
1046
  disconnectedCallback() {
1078
- M.log("NineTable disconnected.");
1047
+ L.log("NineTable disconnected.");
1079
1048
  }
1080
1049
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1081
1050
  get data() {
@@ -1090,7 +1059,7 @@ const Ve = class Ve extends HTMLElement {
1090
1059
  return e(this, U);
1091
1060
  }
1092
1061
  };
1093
- U = new WeakMap(), Re = new WeakMap(), h(Ve, "NineTable");
1094
- let $e = Ve;
1095
- customElements.get("nine-table") || customElements.define("nine-table", $e);
1062
+ U = new WeakMap(), ve = new WeakMap(), h(Be, "NineTable");
1063
+ let _e = Be;
1064
+ customElements.get("nine-table") || customElements.define("nine-table", _e);
1096
1065
  //# sourceMappingURL=nine-table.js.map