@ninebone/table 0.0.281 β†’ 0.0.283

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 v = (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 v = (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,17 +14,17 @@ 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 Ke } from "@ninebone/util";
18
+ const He = class He extends Ke.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 j = new Ee();
26
- var k, $, y, O, W, z, ne, D, re;
27
- const $e = class $e extends HTMLElement {
23
+ a(He, "Trace");
24
+ let Se = He;
25
+ const F = new Se();
26
+ var k, $, y, O, W, z, se, D, ne;
27
+ const Me = class Me extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  c(this, k);
@@ -33,7 +33,7 @@ const $e = class $e extends HTMLElement {
33
33
  c(this, O);
34
34
  c(this, W);
35
35
  c(this, z);
36
- c(this, ne, /* @__PURE__ */ a(() => {
36
+ c(this, se, /* @__PURE__ */ a(() => {
37
37
  if (!e(this, k)) return;
38
38
  const t = e(this, k).querySelector(".ng-container-body");
39
39
  t && (g(this, z, new ResizeObserver(() => {
@@ -59,7 +59,7 @@ const $e = class $e extends HTMLElement {
59
59
  let x = 0;
60
60
  u > 0 && (x = parseInt(b / u * (h - f), 10)), x < 0 && (x = 0);
61
61
  const w = h - f;
62
- x > w && (x = w), r.style.left = `${x}px`, j.log(x), e(this, y).left.disabled = x === 0, e(this, y).right.disabled = x >= w - 1;
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;
63
63
  }, "refresh"));
64
64
  c(this, D, /* @__PURE__ */ a((t) => {
65
65
  if (!e(this, y)) return !1;
@@ -74,7 +74,7 @@ const $e = class $e extends HTMLElement {
74
74
  let b = d > 0 ? -l * (f - h) / d : 0;
75
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;
76
76
  }, "#thumbMoveTo"));
77
- c(this, re, /* @__PURE__ */ a(() => {
77
+ c(this, ne, /* @__PURE__ */ a(() => {
78
78
  const t = /* @__PURE__ */ a((n) => {
79
79
  clearInterval(e(this, O)), clearInterval(e(this, W));
80
80
  const r = parseInt(e(this, y).thumb.style.left || 0, 10);
@@ -189,7 +189,7 @@ const $e = class $e extends HTMLElement {
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, re).call(this), e(this, ne).call(this), this.refresh();
192
+ }), e(this, ne).call(this), e(this, se).call(this), this.refresh();
193
193
  }, "initWhenReady");
194
194
  t();
195
195
  }
@@ -197,10 +197,10 @@ const $e = class $e extends HTMLElement {
197
197
  e(this, z) && e(this, z).disconnect();
198
198
  }
199
199
  };
200
- k = new WeakMap(), $ = new WeakMap(), y = new WeakMap(), O = new WeakMap(), W = new WeakMap(), z = new WeakMap(), ne = new WeakMap(), D = new WeakMap(), re = new WeakMap(), a($e, "NineTableHScrollBar");
201
- let Re = $e;
202
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Re);
203
- var oe, G;
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);
203
+ var re, j;
204
204
  const L = class L {
205
205
  /**
206
206
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
@@ -215,7 +215,7 @@ const L = class L {
215
215
  var n, r, o;
216
216
  if (!i) return null;
217
217
  const t = i.cloneNode(!0);
218
- return e(n = L, oe).call(n, t), e(r = L, G).call(r, t, "thead"), e(o = L, G).call(o, t, "tbody"), Array.from(t.querySelectorAll("colgroup col")).forEach((l, d) => {
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
219
  const h = l.getAttribute("fixed");
220
220
  h && t.querySelectorAll(`[data-col="${d}"]`).forEach((f) => {
221
221
  f.setAttribute("fixed", h);
@@ -223,7 +223,7 @@ const L = class L {
223
223
  }), t;
224
224
  }
225
225
  };
226
- oe = new WeakMap(), G = new WeakMap(), a(L, "TableCompiler"), c(L, oe, /* @__PURE__ */ a((i) => {
226
+ re = new WeakMap(), j = new WeakMap(), a(L, "TableCompiler"), c(L, re, /* @__PURE__ */ a((i) => {
227
227
  if (!i.querySelector("colgroup")) {
228
228
  const t = i.querySelector("tbody tr") || i.querySelector("tr"), s = t ? t.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
229
229
  for (let o = 0; o < s; o++) {
@@ -237,7 +237,7 @@ oe = new WeakMap(), G = new WeakMap(), a(L, "TableCompiler"), c(L, oe, /* @__PUR
237
237
  s ? s.after(t) : i.prepend(t);
238
238
  }
239
239
  i.classList.add("nine-table-element"), i.style.display = "table";
240
- }, "#ensureTableStructure")), c(L, G, /* @__PURE__ */ a((i, t) => {
240
+ }, "#ensureTableStructure")), c(L, j, /* @__PURE__ */ a((i, t) => {
241
241
  const s = Array.from(i.querySelectorAll(t + " tr")), n = Array.from(i.querySelectorAll(t + " th," + t + " td")), r = s.length;
242
242
  if (r === 0 || n.length === 0) return;
243
243
  let o = 0;
@@ -270,9 +270,9 @@ oe = new WeakMap(), G = new WeakMap(), a(L, "TableCompiler"), c(L, oe, /* @__PUR
270
270
  });
271
271
  });
272
272
  }, "#resetColIndex"));
273
- let Ae = L;
274
- var R, _, E, I, N, B, le, He, ae, J, ce, Q;
275
- const Oe = class Oe {
273
+ let Re = L;
274
+ var R, _, E, I, N, B, oe, Ie, le, G, ae, J;
275
+ const $e = class $e {
276
276
  constructor(i) {
277
277
  c(this, R);
278
278
  c(this, _, /* @__PURE__ */ new Map());
@@ -297,9 +297,9 @@ const Oe = class Oe {
297
297
  e(this, _).set(t, l);
298
298
  });
299
299
  const i = e(this, R).querySelector(".ng-container-body");
300
- i && (e(this, ae).call(this, i), e(this, Q).call(this));
300
+ i && (e(this, le).call(this, i), e(this, J).call(this));
301
301
  }, "initialize"));
302
- c(this, le, /* @__PURE__ */ a((i, t) => {
302
+ c(this, oe, /* @__PURE__ */ a((i, t) => {
303
303
  const s = e(this, _).get(t);
304
304
  if (!s || s.length === 0) return;
305
305
  const n = i.querySelector("tbody");
@@ -315,7 +315,7 @@ const Oe = class Oe {
315
315
  /**
316
316
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°κ±°λ‚˜ μ œκ±°ν•˜λŠ” λΆ„ν•  헬퍼
317
317
  */
318
- c(this, He, /* @__PURE__ */ a((i, t) => {
318
+ c(this, Ie, /* @__PURE__ */ a((i, t) => {
319
319
  const s = i.cloneNode(!0);
320
320
  return t === "left" ? s.querySelectorAll("col, th, td").forEach((n) => {
321
321
  n.getAttribute("fixed") !== "left" && n.remove();
@@ -326,7 +326,7 @@ const Oe = class Oe {
326
326
  /**
327
327
  * 🎯 ν…œν”Œλ¦Ώ TRλ“€μ˜ 총 높이λ₯Ό μΈ‘μ •ν•˜κ³  캐싱
328
328
  */
329
- c(this, ae, /* @__PURE__ */ a((i) => {
329
+ c(this, le, /* @__PURE__ */ a((i) => {
330
330
  if (e(this, E) !== null && e(this, E) > 0)
331
331
  return e(this, E);
332
332
  const t = e(this, _).get(".ng-container-body");
@@ -344,9 +344,9 @@ const Oe = class Oe {
344
344
  const b = s.querySelectorAll("tr:not(.nodata)");
345
345
  return b.forEach((u) => {
346
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, J).call(this), j.log(`[RowManager] Height Cached: ${e(this, E)}px | RowCount: ${e(this, B)}`), e(this, E);
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);
348
348
  }, "#measureAndCacheHeight"));
349
- c(this, J, /* @__PURE__ */ a(() => {
349
+ c(this, G, /* @__PURE__ */ a(() => {
350
350
  if (e(this, N) > 0 && e(this, E) > 0) {
351
351
  const i = Math.ceil(e(this, N) / e(this, E));
352
352
  g(this, B, i + 20);
@@ -356,7 +356,7 @@ const Oe = class Oe {
356
356
  /**
357
357
  * 🎯 ResizeObserver μ„€μ •: μ‹œνŠΈ 크기 λ³€κ²½ μ‹œ ν–‰ 개수 μž¬μ‚°μ • 및 μž¬λ Œλ”λ§
358
358
  */
359
- c(this, ce, /* @__PURE__ */ a(() => {
359
+ c(this, ae, /* @__PURE__ */ a(() => {
360
360
  !e(this, R) || !(e(this, R) instanceof HTMLElement) || (g(this, I, new ResizeObserver((i) => {
361
361
  for (const t of i) {
362
362
  const s = t.target;
@@ -367,7 +367,7 @@ const Oe = class Oe {
367
367
  const o = s.querySelector("thead");
368
368
  o && (r += o.offsetHeight || o.getBoundingClientRect().height);
369
369
  const l = Math.max(n - r, 100);
370
- e(this, N) !== l && (g(this, N, l), e(this, J).call(this), e(this, E) !== null && e(this, Q).call(this));
370
+ e(this, N) !== l && (g(this, N, l), e(this, G).call(this), e(this, E) !== null && e(this, J).call(this));
371
371
  }
372
372
  }
373
373
  })), e(this, I).observe(e(this, R)));
@@ -375,16 +375,16 @@ const Oe = class Oe {
375
375
  /**
376
376
  * 🎯 λ°”λ”” 및 쒌우 κ³ μ • μ»¨ν…Œμ΄λ„ˆ 전체에 각각에 λ§žλŠ” ν…œν”Œλ¦Ώ ν–‰ λΌˆλŒ€ μ£Όμž…
377
377
  */
378
- c(this, Q, /* @__PURE__ */ a(() => {
378
+ c(this, J, /* @__PURE__ */ a(() => {
379
379
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
380
380
  const t = e(this, R).querySelector(i);
381
- t && t.querySelector("tbody") && e(this, le).call(this, t, i);
381
+ t && t.querySelector("tbody") && e(this, oe).call(this, t, i);
382
382
  }), typeof e(this, R).syncRowHeights == "function" && e(this, R).syncRowHeights();
383
383
  }, "#renderAllContainers"));
384
384
  v(this, "destroy", /* @__PURE__ */ a(() => {
385
385
  e(this, I) && (e(this, I).disconnect(), g(this, I, null));
386
386
  }, "destroy"));
387
- g(this, R, i), e(this, ce).call(this);
387
+ g(this, R, i), e(this, ae).call(this);
388
388
  }
389
389
  getRowHeight() {
390
390
  return e(this, E);
@@ -394,15 +394,15 @@ const Oe = class Oe {
394
394
  return ((t = e(this, _).get(i)) == null ? void 0 : t.length) || 1;
395
395
  }
396
396
  };
397
- R = new WeakMap(), _ = new WeakMap(), E = new WeakMap(), I = new WeakMap(), N = new WeakMap(), B = new WeakMap(), le = new WeakMap(), He = new WeakMap(), ae = new WeakMap(), J = new WeakMap(), ce = new WeakMap(), Q = new WeakMap(), a(Oe, "RowManager");
398
- let qe = Oe;
399
- var X, Y, he, de, fe, U, ue, ge;
400
- const F = class F extends HTMLElement {
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 {
401
401
  constructor() {
402
402
  super();
403
403
  c(this, X, null);
404
404
  c(this, Y);
405
- c(this, he, /* @__PURE__ */ a(() => {
405
+ c(this, ce, /* @__PURE__ */ a(() => {
406
406
  [
407
407
  { selector: ".ng-container-body", type: null },
408
408
  { selector: ".ng-container-left", type: "left" },
@@ -410,11 +410,11 @@ const F = class F extends HTMLElement {
410
410
  ].forEach(({ selector: s, type: n }) => {
411
411
  const r = this.querySelector(s);
412
412
  if (!r) return;
413
- const o = e(this, fe).call(this, e(this, X), n);
413
+ const o = e(this, de).call(this, e(this, X), n);
414
414
  r.innerHTML = "", r.appendChild(o);
415
415
  });
416
416
  }, "#renderSplitContainers"));
417
- c(this, de, /* @__PURE__ */ a(() => {
417
+ c(this, he, /* @__PURE__ */ a(() => {
418
418
  ["left", "right"].forEach((t) => {
419
419
  const s = this.querySelector(`.ng-container-${t}`), n = s == null ? void 0 : s.querySelector("table");
420
420
  if (!s || !n) return;
@@ -427,20 +427,20 @@ const F = class F extends HTMLElement {
427
427
  }, "#updateContainerWidths"));
428
428
  v(this, "generate", /* @__PURE__ */ a((t) => {
429
429
  if (!t) return;
430
- 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);
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);
431
431
  const s = this.querySelector(".ng-container-body");
432
432
  s && s.addEventListener("scroll", () => {
433
433
  var n;
434
434
  (n = this.querySelector("nine-table-hscrollbar")) == null || n.refresh();
435
435
  }), setTimeout(() => {
436
436
  var n;
437
- e(this, U).call(this), (n = this.querySelector("nine-table-hscrollbar")) == null || n.refresh();
437
+ (n = this.querySelector("nine-table-hscrollbar")) == null || n.refresh();
438
438
  }, 0);
439
439
  }, "generate"));
440
440
  /**
441
441
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
442
442
  */
443
- c(this, fe, /* @__PURE__ */ a((t, s) => {
443
+ c(this, de, /* @__PURE__ */ a((t, s) => {
444
444
  const n = t.cloneNode(!0);
445
445
  return s === "left" ? n.querySelectorAll("col, th, td").forEach((r) => {
446
446
  r.getAttribute("fixed") !== "left" && r.remove();
@@ -460,9 +460,6 @@ const F = class F extends HTMLElement {
460
460
  s && (s.scrollTop = t);
461
461
  }, "scrollToY"));
462
462
  v(this, "syncRowHeights", /* @__PURE__ */ a(() => {
463
- e(this, U).call(this);
464
- }, "syncRowHeights"));
465
- c(this, U, /* @__PURE__ */ a(() => {
466
463
  var h, f, b;
467
464
  const t = this.querySelector(".ng-container-left table"), s = this.querySelector(".ng-container-body table"), n = this.querySelector(".ng-container-right table");
468
465
  if (!s) return;
@@ -475,15 +472,15 @@ const F = class F extends HTMLElement {
475
472
  ], w = Math.max(...x);
476
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`));
477
474
  }
478
- }, "#syncRowHeights"));
479
- c(this, ue, /* @__PURE__ */ a(() => {
480
- e(this, ge).call(this), new MutationObserver((t) => {
475
+ }, "syncRowHeights"));
476
+ c(this, fe, /* @__PURE__ */ a(() => {
477
+ e(this, ue).call(this), new MutationObserver((t) => {
481
478
  for (const s of t)
482
- s.attributeName === "class" && this.classList.contains("active") && e(this, U).call(this);
479
+ s.attributeName === "class" && this.classList.contains("active");
483
480
  }).observe(this, { attributes: !0 });
484
481
  }, "#init"));
485
- c(this, ge, /* @__PURE__ */ a(() => {
486
- const t = F.SCROLLBAR_SIZE;
482
+ c(this, ue, /* @__PURE__ */ a(() => {
483
+ const t = Z.SCROLLBAR_SIZE;
487
484
  this.innerHTML = `
488
485
  <style>
489
486
  nine-table-sheet {
@@ -606,38 +603,38 @@ const F = class F extends HTMLElement {
606
603
  </div>
607
604
  `;
608
605
  }, "#render"));
609
- g(this, Y, new qe(this));
606
+ g(this, Y, new Ae(this));
610
607
  }
611
608
  connectedCallback() {
612
- e(this, ue).call(this);
609
+ e(this, fe).call(this);
613
610
  }
614
611
  disconnectedCallback() {
615
- this.innerHTML = "", j.log("NineTableSheet destroyed.");
612
+ this.innerHTML = "", F.log("NineTableSheet destroyed.");
616
613
  }
617
614
  };
618
- X = new WeakMap(), Y = new WeakMap(), he = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), U = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), a(F, "NineTableSheet"), v(F, "SCROLLBAR_SIZE", 16);
619
- let se = F;
620
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", se);
621
- var be, ee;
622
- const We = class We extends HTMLElement {
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;
617
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ie);
618
+ var ge, Q;
619
+ const Oe = class Oe extends HTMLElement {
623
620
  constructor() {
624
621
  super();
625
- c(this, be, /* @__PURE__ */ a(() => {
622
+ c(this, ge, /* @__PURE__ */ a(() => {
626
623
  var t;
627
624
  (t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
628
625
  var o;
629
626
  const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
630
- e(this, ee).call(this, r, n);
631
- }), e(this, ee).call(this, 0, !1);
627
+ e(this, Q).call(this, r, n);
628
+ }), e(this, Q).call(this, 0, !1);
632
629
  }, "#init"));
633
- c(this, ee, /* @__PURE__ */ a((t, s = !1) => {
630
+ c(this, Q, /* @__PURE__ */ a((t, s = !1) => {
634
631
  const n = /* @__PURE__ */ a(() => {
635
632
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
636
633
  Array.from(this.querySelectorAll("nine-splitter")).forEach((x) => x.style.setProperty("display", "none"));
637
634
  const u = f.filter((x) => x.classList.contains("active"));
638
635
  u.length < 2 || u.forEach((x) => {
639
- const w = parseInt(x.getAttribute("data-index"), 10), C = this.querySelector(`nine-splitter[data-split-index="${w}"]`), Pe = f[w + 1];
640
- C && Pe && Pe.classList.contains("active") && C.style.setProperty("display", "flex");
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");
641
638
  });
642
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");
643
640
  if (!l[t]) return;
@@ -663,30 +660,30 @@ const We = class We extends HTMLElement {
663
660
  }, "#switchSheet"));
664
661
  }
665
662
  connectedCallback() {
666
- e(this, be).call(this);
663
+ e(this, ge).call(this);
667
664
  }
668
665
  };
669
- be = new WeakMap(), ee = new WeakMap(), a(We, "NineTableSheets");
670
- let Te = We;
671
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Te);
672
- var S, ye, te, pe;
673
- const ze = class ze {
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 {
674
671
  constructor(i) {
675
672
  c(this, S);
676
- c(this, ye, /* @__PURE__ */ a(() => {
677
- e(this, pe).call(this), new ResizeObserver((i) => {
673
+ c(this, be, /* @__PURE__ */ a(() => {
674
+ e(this, ye).call(this), new ResizeObserver((i) => {
678
675
  for (let t of i)
679
- e(this, S).getAttribute("auto-height") === "true" && e(this, te).call(this);
676
+ e(this, S).getAttribute("auto-height") === "true" && e(this, ee).call(this);
680
677
  }).observe(e(this, S));
681
678
  }, "#init"));
682
- c(this, te, /* @__PURE__ */ a(() => {
679
+ c(this, ee, /* @__PURE__ */ a(() => {
683
680
  var d, h;
684
681
  const i = Array.from(e(this, S).shadowRoot.querySelectorAll("nine-table-sheet.active"));
685
682
  if (i.length === 0) return;
686
- 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 = se.SCROLLBAR_SIZE, l = t * s + n + r + o;
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;
687
684
  e(this, S).style.height = `${l}px`;
688
685
  }, "#applyAutoHeight"));
689
- c(this, pe, /* @__PURE__ */ a(() => {
686
+ c(this, ye, /* @__PURE__ */ a(() => {
690
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) => {
691
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>` : "";
692
689
  return b + u;
@@ -793,17 +790,17 @@ const ze = class ze {
793
790
  const l = e(this, S).shadowRoot.querySelectorAll("nine-table-sheet");
794
791
  l == null || l.forEach((d, h) => {
795
792
  t[h] && setTimeout(() => {
796
- d.generate(t[h]), s && e(this, te).call(this);
793
+ d.generate(t[h]), s && e(this, ee).call(this);
797
794
  });
798
795
  });
799
796
  }, "#render"));
800
- g(this, S, i), e(this, ye).call(this);
797
+ g(this, S, i), e(this, be).call(this);
801
798
  }
802
799
  };
803
- S = new WeakMap(), ye = new WeakMap(), te = new WeakMap(), pe = new WeakMap(), a(ze, "LayoutManager");
804
- let ke = ze;
800
+ S = new WeakMap(), be = new WeakMap(), ee = new WeakMap(), ye = new WeakMap(), a(We, "LayoutManager");
801
+ let Te = We;
805
802
  var H, P;
806
- const De = class De {
803
+ const ze = class ze {
807
804
  constructor(i) {
808
805
  c(this, H);
809
806
  c(this, P, -1);
@@ -823,31 +820,31 @@ const De = class De {
823
820
  });
824
821
  }
825
822
  };
826
- H = new WeakMap(), P = new WeakMap(), a(De, "ngRow");
827
- let Le = De;
828
- var A, m, q, K, me, M, we, ie, ve, xe, Z;
823
+ 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;
829
826
  const T = class T {
830
827
  constructor(i, t) {
831
828
  c(this, A);
832
829
  c(this, m);
833
830
  c(this, q, []);
834
- c(this, K, []);
835
- c(this, me, 0);
831
+ c(this, U, []);
832
+ c(this, pe, 0);
836
833
  c(this, M, []);
837
- c(this, we, /* @__PURE__ */ a(() => {
834
+ c(this, me, /* @__PURE__ */ a(() => {
838
835
  g(this, M, []);
839
836
  const i = e(this, A).template || [];
840
837
  Array.from(i).forEach((t) => {
841
838
  var s;
842
839
  e(this, M).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
843
840
  }), (e(this, m).rawRecords || []).forEach((t) => {
844
- t.__ng || (t.__ng = e(this, ie).call(this)), t.__ng.height = e(this, M).slice();
841
+ t.__ng || (t.__ng = e(this, te).call(this)), t.__ng.height = e(this, M).slice();
845
842
  });
846
843
  }, "#initialize"));
847
844
  v(this, "set", /* @__PURE__ */ a((i) => {
848
845
  this.clear(), this.add(i, !1);
849
846
  }, "set"));
850
- c(this, ie, /* @__PURE__ */ a(() => ({
847
+ c(this, te, /* @__PURE__ */ a(() => ({
851
848
  rowState: T.ROW_STATE.EMPTY,
852
849
  deleted: !1,
853
850
  filtered: !1,
@@ -857,13 +854,13 @@ const T = class T {
857
854
  _: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, M).slice(), -1, {}, {}]
858
855
  }), "#getDefaultMeta"));
859
856
  v(this, "reset", /* @__PURE__ */ a(() => {
860
- g(this, q, []), g(this, K, []);
857
+ g(this, q, []), g(this, U, []);
861
858
  }, "reset"));
862
859
  v(this, "clear", /* @__PURE__ */ a(() => {
863
860
  var i;
864
- e(this, m).rawRecords = [], g(this, q, []), g(this, K, []), (i = e(this, m).viewRecords) != null && i.reset && e(this, m).viewRecords.reset();
861
+ e(this, m).rawRecords = [], g(this, q, []), g(this, U, []), (i = e(this, m).viewRecords) != null && i.reset && e(this, m).viewRecords.reset();
865
862
  }, "clear"));
866
- c(this, ve, /* @__PURE__ */ a((i) => {
863
+ c(this, we, /* @__PURE__ */ a((i) => {
867
864
  var n;
868
865
  Array.isArray(i) || (i = [i]);
869
866
  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,14 +871,14 @@ const T = class T {
874
871
  }), s.push(o);
875
872
  }), s;
876
873
  }, "#json2Array"));
877
- c(this, xe, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
878
- t.__ng = e(this, ie).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = T.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
874
+ c(this, ve, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
875
+ 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;
879
876
  }), i), "#defaultInsert"));
880
877
  v(this, "add", /* @__PURE__ */ a((i, t = !0) => {
881
878
  var r;
882
879
  i === void 0 && (i = {});
883
- const s = e(this, ve).call(this, i);
884
- e(this, m).rawRecords = e(this, m).rawRecords.concat(e(this, xe).call(this, s)), this.resetRecords();
880
+ const s = e(this, we).call(this, i);
881
+ e(this, m).rawRecords = e(this, m).rawRecords.concat(e(this, ve).call(this, s)), this.resetRecords();
885
882
  const n = this.count() - 1;
886
883
  return t || s.forEach((o, l) => {
887
884
  const d = e(this, m).rawRecords[n - l];
@@ -911,14 +908,14 @@ const T = class T {
911
908
  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);
912
909
  }, "setValue"));
913
910
  v(this, "resetRecords", /* @__PURE__ */ a(() => {
914
- g(this, K, 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) => {
911
+ 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) => {
915
912
  i.__ng.rowidx = t;
916
913
  }), e(this, q).forEach((i, t) => {
917
914
  i.__ng.i = t;
918
915
  });
919
916
  }, "resetRecords"));
920
917
  v(this, "getValidData", /* @__PURE__ */ a(() => (e(this, q).length === 0 && e(this, m).rawRecords.length > 0 && this.resetRecords(), e(this, q)), "getValidData"));
921
- c(this, Z, /* @__PURE__ */ a((i) => {
918
+ c(this, K, /* @__PURE__ */ a((i) => {
922
919
  var s;
923
920
  if (!i) return i;
924
921
  const t = typeof ((s = e(this, A).fields) == null ? void 0 : s.get) == "function" ? e(this, A).fields.get() : [];
@@ -934,25 +931,25 @@ const T = class T {
934
931
  var r;
935
932
  const s = this.getValidData();
936
933
  if (!s || s.length <= 0) return;
937
- if (i == null) return e(this, Z).call(this, s);
934
+ if (i == null) return e(this, K).call(this, s);
938
935
  if (i < 0 || i >= s.length) return null;
939
936
  const n = typeof ((r = e(this, A).fields) == null ? void 0 : r.get) == "function" ? e(this, A).fields.get() : [];
940
937
  if (t != null) {
941
938
  const o = n.indexOf(t);
942
939
  return o >= 0 ? s[i].v[o] : null;
943
940
  }
944
- return e(this, Z).call(this, s[i]);
941
+ return e(this, K).call(this, s[i]);
945
942
  }, "get"));
946
- g(this, A, i), g(this, m, t), e(this, we).call(this);
943
+ g(this, A, i), g(this, m, t), e(this, me).call(this);
947
944
  }
948
945
  get source() {
949
- return e(this, Z).call(this, e(this, m).rawRecords);
946
+ return e(this, K).call(this, e(this, m).rawRecords);
950
947
  }
951
948
  set source(i) {
952
949
  this.clear(), this.add(i, !1);
953
950
  }
954
951
  get nextId() {
955
- return ++Ue(this, me)._;
952
+ return ++Ye(this, pe)._;
956
953
  }
957
954
  get length() {
958
955
  return e(this, q).length;
@@ -961,7 +958,7 @@ const T = class T {
961
958
  return this.length;
962
959
  }
963
960
  };
964
- A = new WeakMap(), m = new WeakMap(), q = new WeakMap(), K = new WeakMap(), me = new WeakMap(), M = new WeakMap(), we = new WeakMap(), ie = new WeakMap(), ve = new WeakMap(), xe = new WeakMap(), Z = new WeakMap(), a(T, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
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"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
965
962
  v(T, "ROW_STATE", {
966
963
  EMPTY: "EMPTY",
967
964
  NORMAL: "NORMAL",
@@ -969,10 +966,10 @@ v(T, "ROW_STATE", {
969
966
  UPDATE: "UPDATE",
970
967
  DELETE: "DELETE"
971
968
  });
972
- let Ce = T;
973
- const Ne = class Ne {
969
+ let Le = T;
970
+ const De = class De {
974
971
  constructor(i) {
975
- 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 = () => {
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 = () => {
976
973
  var t;
977
974
  (t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
978
975
  }, this.setDataSource = (t) => {
@@ -989,22 +986,22 @@ const Ne = class Ne {
989
986
  }, this.setDataSource([]);
990
987
  }
991
988
  };
992
- a(Ne, "ngDataManager");
993
- let _e = Ne;
994
- var V, Se;
995
- const Be = class Be extends HTMLElement {
989
+ a(De, "ngDataManager");
990
+ let Ce = De;
991
+ var V, xe;
992
+ const Ne = class Ne extends HTMLElement {
996
993
  constructor() {
997
994
  super();
998
995
  //#created = false;
999
996
  c(this, V);
1000
- c(this, Se);
1001
- this.attachShadow({ mode: "open" }), g(this, V, new _e(this));
997
+ c(this, xe);
998
+ this.attachShadow({ mode: "open" }), g(this, V, new Ce(this));
1002
999
  }
1003
1000
  connectedCallback() {
1004
- g(this, Se, new ke(this)), j.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1001
+ g(this, xe, new Te(this)), F.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1005
1002
  }
1006
1003
  disconnectedCallback() {
1007
- j.log("NineTable disconnected.");
1004
+ F.log("NineTable disconnected.");
1008
1005
  }
1009
1006
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1010
1007
  get data() {
@@ -1019,7 +1016,7 @@ const Be = class Be extends HTMLElement {
1019
1016
  return e(this, V);
1020
1017
  }
1021
1018
  };
1022
- V = new WeakMap(), Se = new WeakMap(), a(Be, "NineTable");
1023
- let Ie = Be;
1024
- customElements.get("nine-table") || customElements.define("nine-table", Ie);
1019
+ V = new WeakMap(), xe = new WeakMap(), a(Ne, "NineTable");
1020
+ let _e = Ne;
1021
+ customElements.get("nine-table") || customElements.define("nine-table", _e);
1025
1022
  //# sourceMappingURL=nine-table.js.map