@ninebone/table 0.0.284 β†’ 0.0.286

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