@ninebone/table 0.0.283 β†’ 0.0.285

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