@ninebone/table 0.0.778 β†’ 0.0.779

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.
@@ -22,7 +22,7 @@ const ts = class ts extends Rs.constructor {
22
22
  };
23
23
  h(ts, "Trace");
24
24
  let qe = ts;
25
- const R = new qe();
25
+ const S = new qe();
26
26
  var j, G, E, tt, et, st, Jt, nt, Qt;
27
27
  const es = class es extends HTMLElement {
28
28
  constructor() {
@@ -212,7 +212,7 @@ const ss = class ss extends HTMLElement {
212
212
  d(this, kt, 0);
213
213
  d(this, It, 0);
214
214
  q(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (R.log("vscrollbar.refresh"), !t(this, rt) || !t(this, k)) return;
215
+ if (S.log("vscrollbar.refresh"), !t(this, rt) || !t(this, k)) return;
216
216
  const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb, i = e.clientHeight, o = t(this, rt).data.length, a = t(this, ot).getRowHeight(), c = o * a;
217
217
  if (c <= i || o === 0) {
218
218
  this.style.display = "none";
@@ -224,14 +224,14 @@ const ss = class ss extends HTMLElement {
224
224
  const u = Math.max(Math.min(l * (i / c), l), 20);
225
225
  r.style.height = `${u}px`;
226
226
  const f = e.scrollTop, b = Math.max(c - i, 1);
227
- R.log(e, f, b);
227
+ S.log(e, f, b);
228
228
  let g = 0;
229
229
  b > 0 && (g = f / b * (l - u));
230
230
  const p = l - u;
231
231
  g < 0 && (g = 0), g > p && (g = p), r.style.top = `${g}px`, t(this, k).top.disabled = f <= 0, t(this, k).bottom.disabled = f >= b - 1;
232
232
  }, "refresh"));
233
233
  d(this, te, /* @__PURE__ */ h(() => {
234
- R.log("nine-table-vscrollbar.#init");
234
+ S.log("nine-table-vscrollbar.#init");
235
235
  const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
236
236
  const i = (t(this, rt).data.get() || []).length, o = t(this, ot).getRowHeight();
237
237
  return i * o;
@@ -353,11 +353,11 @@ const ss = class ss extends HTMLElement {
353
353
  rt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), k = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), te = new WeakMap(), h(ss, "NineTableVScrollBar");
354
354
  let Te = ss;
355
355
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Te);
356
- var U, S, it, Y, O, Z, at, Lt, Ye, Ve, ee, se, Mt, Ht, $t, ne, re, Nt, Ue, mt, _t, oe;
356
+ var U, R, it, Y, O, Z, at, Lt, Ye, Ve, ee, se, Mt, $t, Ht, ne, re, Nt, Ue, mt, _t, oe;
357
357
  const ns = class ns {
358
358
  constructor(n) {
359
359
  d(this, U);
360
- d(this, S);
360
+ d(this, R);
361
361
  d(this, it);
362
362
  d(this, Y, /* @__PURE__ */ new Map());
363
363
  d(this, O, null);
@@ -370,16 +370,16 @@ const ns = class ns {
370
370
  d(this, ee, 3);
371
371
  q(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
- R.log("rowManager.refresh");
374
- const n = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
- n && (t(this, Mt).call(this), t(this, Ht).call(this), t(this, mt).call(this, n.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
373
+ S.log("rowManager.refresh");
374
+ const n = t(this, R).querySelector(".ng-container-body .ng-part-body");
375
+ n && (t(this, Mt).call(this), t(this, $t).call(this), t(this, mt).call(this, n.scrollTop), (e = t(this, R).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
377
  q(this, "initialize", /* @__PURE__ */ h(() => {
378
- R.log("rowManager.initialize"), y(this, it, {
379
- scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
380
- firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
378
+ S.log("rowManager.initialize"), y(this, it, {
379
+ scrollTables: t(this, R).querySelectorAll(".ng-part-body table"),
380
+ firstTr: t(this, R).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
381
  }), y(this, O, null), t(this, Y).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
382
- const i = t(this, S).querySelector(r);
382
+ const i = t(this, R).querySelector(r);
383
383
  if (!i) return;
384
384
  const o = i.querySelector(".ng-part-body table");
385
385
  if (!o) return;
@@ -388,28 +388,28 @@ const ns = class ns {
388
388
  const l = Array.from(a.querySelectorAll("tr")).map((u) => u.cloneNode(!0));
389
389
  t(this, Y).set(r, l);
390
390
  });
391
- const n = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body");
392
- if (t(this, S).querySelector(".ng-container-body .ng-part-header"), t(this, S).querySelector(".ng-container-body .ng-part-footer"), n) {
393
- t(this, Mt).call(this), t(this, Nt).call(this), t(this, Ht).call(this), t(this, mt).call(this, n.scrollTop);
391
+ const n = t(this, R).querySelector(".ng-container-body .ng-part-body"), e = t(this, R).querySelector(".ng-container-left .ng-part-body"), s = t(this, R).querySelector(".ng-container-right .ng-part-body");
392
+ if (t(this, R).querySelector(".ng-container-body .ng-part-header"), t(this, R).querySelector(".ng-container-body .ng-part-footer"), n) {
393
+ t(this, Mt).call(this), t(this, Nt).call(this), t(this, $t).call(this), t(this, mt).call(this, n.scrollTop);
394
394
  let r = !1;
395
395
  const i = /* @__PURE__ */ h((o) => {
396
396
  var f;
397
397
  if (r) return;
398
398
  r = !0;
399
399
  const a = o.scrollTop, c = o.scrollLeft;
400
- n && n.scrollTop !== a && (n.scrollTop = a), e && e.scrollTop !== a && (e.scrollTop = a), s && s.scrollTop !== a && (s.scrollTop = a);
401
- const l = t(this, S).querySelector(".ng-container-body .ng-part-header"), u = t(this, S).querySelector(".ng-container-body .ng-part-footer");
402
- l && l.scrollLeft !== c && (l.scrollLeft = c), u && u.scrollLeft !== c && (u.scrollLeft = c), t(this, mt).call(this, a), (f = t(this, S).querySelector("nine-table-vscrollbar")) == null || f.refresh(), r = !1;
400
+ S.log(`πŸ–±οΈ [Scroll Event] source: ${o.className}, scrollTop: ${a}, scrollLeft: ${c}`);
401
+ const l = t(this, R).querySelector(".ng-container-body .ng-part-header"), u = t(this, R).querySelector(".ng-container-left .ng-part-header");
402
+ t(this, R).querySelector(".ng-container-right .ng-part-header"), S.log(`헀더 μƒνƒœ 확인 -> bodyHeader.scrollLeft: ${l == null ? void 0 : l.scrollLeft}, leftHeader: ${u == null ? void 0 : u.scrollLeft}`), n && n.scrollTop !== a && (n.scrollTop = a), e && e.scrollTop !== a && (e.scrollTop = a), s && s.scrollTop !== a && (s.scrollTop = a), t(this, mt).call(this, a), (f = t(this, R).querySelector("nine-table-vscrollbar")) == null || f.refresh(), r = !1;
403
403
  }, "handleContainerScroll");
404
404
  [n, e, s].forEach((o) => {
405
405
  o == null || o.addEventListener("scroll", (a) => {
406
- R.log(a), R.log("rowManager.scroll event"), i(o);
406
+ S.log(a), S.log("rowManager.scroll event"), i(o);
407
407
  });
408
408
  });
409
409
  }
410
410
  }, "initialize"));
411
411
  d(this, se, /* @__PURE__ */ h((n, e) => {
412
- R.log("rowManager.#renderRows");
412
+ S.log("rowManager.#renderRows");
413
413
  const s = t(this, Y).get(e);
414
414
  if (!s || s.length === 0) return;
415
415
  const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
@@ -425,18 +425,18 @@ const ns = class ns {
425
425
  d(this, Mt, /* @__PURE__ */ h(() => {
426
426
  if (t(this, O) !== null && t(this, O) > 0)
427
427
  return t(this, O);
428
- const n = t(this, S).querySelector(".ng-container-body .ng-part-body");
429
- R.log("rowManager.#measureAndCacheHeight");
428
+ const n = t(this, R).querySelector(".ng-container-body .ng-part-body");
429
+ S.log("rowManager.#measureAndCacheHeight");
430
430
  const e = t(this, Y).get(".ng-container-body");
431
431
  if (!e || e.length === 0) throw new Error("invalid dom");
432
432
  const s = n.querySelector("tbody.bindable-tbody");
433
- if (R.log(s), !s) throw new Error("invalid dom");
433
+ if (S.log(s), !s) throw new Error("invalid dom");
434
434
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
435
435
  const r = s.querySelector("tr.nodata"), i = document.createDocumentFragment();
436
436
  e.forEach((b) => {
437
437
  i.appendChild(b.cloneNode(!0));
438
438
  }), r ? r.before(i) : s.appendChild(i);
439
- const o = t(this, S), a = o.style.display, c = o.style.visibility, l = o.style.position;
439
+ const o = t(this, R), a = o.style.display, c = o.style.visibility, l = o.style.position;
440
440
  (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
441
441
  let u = 0;
442
442
  const f = s.querySelectorAll("tr");
@@ -447,19 +447,19 @@ const ns = class ns {
447
447
  g = parseFloat(p.height) || parseFloat(p.minHeight) || 0;
448
448
  }
449
449
  u += g;
450
- }), f.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, u <= 0 ? -1 : (y(this, O, u), t(this, $t).call(this), t(this, O));
450
+ }), f.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, u <= 0 ? -1 : (y(this, O, u), t(this, Ht).call(this), t(this, O));
451
451
  }, "#measureAndCacheHeight"));
452
- d(this, Ht, /* @__PURE__ */ h(() => {
453
- R.log("rowManager.#updateVirtualScrollHeight");
452
+ d(this, $t, /* @__PURE__ */ h(() => {
453
+ S.log("rowManager.#updateVirtualScrollHeight");
454
454
  const e = (t(this, U).data.get() || []).length, s = t(this, O), r = e * s;
455
- R.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
456
- const o = t(this, S).querySelector(i);
455
+ S.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
456
+ const o = t(this, R).querySelector(i);
457
457
  if (!o) return;
458
458
  const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
459
459
  a && (a.style.height = `${r}px`);
460
460
  });
461
461
  }, "#updateVirtualScrollHeight"));
462
- d(this, $t, /* @__PURE__ */ h(() => {
462
+ d(this, Ht, /* @__PURE__ */ h(() => {
463
463
  if (t(this, at) > 0 && t(this, O) > 0) {
464
464
  const n = Math.ceil(t(this, at) / t(this, O));
465
465
  y(this, Lt, n + t(this, ee));
@@ -467,7 +467,7 @@ const ns = class ns {
467
467
  }, "#updateRowCount"));
468
468
  d(this, ne, /* @__PURE__ */ h(() => {
469
469
  var a, c, l, u, f, b;
470
- const n = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
470
+ const n = t(this, R).querySelector(".ng-container-left .ng-part-body table"), e = t(this, R).querySelector(".ng-container-body .ng-part-body table"), s = t(this, R).querySelector(".ng-container-right .ng-part-body table");
471
471
  if (e) {
472
472
  const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, p.length, x.length);
473
473
  for (let m = 0; m < w; m++) {
@@ -479,7 +479,7 @@ const ns = class ns {
479
479
  A > 0 && (g[m] && (g[m].style.height = `${A}px`), p[m] && (p[m].style.height = `${A}px`), x[m] && (x[m].style.height = `${A}px`));
480
480
  }
481
481
  }
482
- const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), i = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
482
+ const r = t(this, R).querySelector(".ng-container-left .ng-part-footer table"), i = t(this, R).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, R).querySelector(".ng-container-right .ng-part-footer table");
483
483
  if (i) {
484
484
  const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(i.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, p.length, x.length);
485
485
  for (let m = 0; m < w; m++) {
@@ -493,7 +493,7 @@ const ns = class ns {
493
493
  }
494
494
  }, "#syncRowHeights"));
495
495
  d(this, re, /* @__PURE__ */ h(() => {
496
- !t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, Z, new ResizeObserver((n) => {
496
+ !t(this, R) || !(t(this, R) instanceof HTMLElement) || (y(this, Z, new ResizeObserver((n) => {
497
497
  for (const e of n) {
498
498
  const s = e.target;
499
499
  if (!s.classList.contains("active")) continue;
@@ -503,21 +503,21 @@ const ns = class ns {
503
503
  const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
504
504
  o && (i += o.offsetHeight), a && (i += a.offsetHeight);
505
505
  const c = Math.max(r - i, 100);
506
- t(this, at) !== c && (y(this, at, c), t(this, $t).call(this), t(this, O) !== null && (t(this, Nt).call(this), this.refresh()));
506
+ t(this, at) !== c && (y(this, at, c), t(this, Ht).call(this), t(this, O) !== null && (t(this, Nt).call(this), this.refresh()));
507
507
  }
508
508
  }
509
- })), t(this, Z).observe(t(this, S)));
509
+ })), t(this, Z).observe(t(this, R)));
510
510
  }, "#initResizeObserver"));
511
511
  d(this, Nt, /* @__PURE__ */ h(() => {
512
- R.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
513
- const e = t(this, S).querySelector(n);
512
+ S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
513
+ const e = t(this, R).querySelector(n);
514
514
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, se).call(this, e, n);
515
515
  }), t(this, oe).call(this), t(this, ne).call(this);
516
516
  }, "#renderAllContainers"));
517
517
  d(this, Ue, /* @__PURE__ */ h((n) => {
518
518
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
519
519
  var l;
520
- const s = t(this, S).querySelector(e);
520
+ const s = t(this, R).querySelector(e);
521
521
  if (!s) return;
522
522
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
523
523
  if (!r) return;
@@ -539,16 +539,16 @@ const ns = class ns {
539
539
  if (!e || e <= 0) return;
540
540
  const s = t(this, U).data.length;
541
541
  if (s === 0) return;
542
- const r = ((f = t(this, Y).get(".ng-container-body")) == null ? void 0 : f.length) || 1, i = t(this, S).querySelector(".ng-container-body .ng-part-body");
543
- R.log("bodyContainer.clientHeight", i.clientHeight);
542
+ const r = ((f = t(this, Y).get(".ng-container-body")) == null ? void 0 : f.length) || 1, i = t(this, R).querySelector(".ng-container-body .ng-part-body");
543
+ S.log("bodyContainer.clientHeight", i.clientHeight);
544
544
  const o = Math.max(0, s - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(n / e)));
545
545
  let c = Math.floor(a * e);
546
- R.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && R.log(`πŸ“œ [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
546
+ S.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && S.log(`πŸ“œ [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
547
547
  const l = t(this, it).firstTr, u = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
548
548
  (b = t(this, it)) == null || b.scrollTables.forEach((g) => {
549
549
  g.style.transform = `translate3d(0, ${c}px, 0)`;
550
- }), u !== a && (R.log(`πŸ”„ [Row Bind Trigger] currentStartIndex(${u}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
551
- const p = t(this, S).querySelector(g);
550
+ }), u !== a && (S.log(`πŸ”„ [Row Bind Trigger] currentStartIndex(${u}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
551
+ const p = t(this, R).querySelector(g);
552
552
  if (!p) return;
553
553
  const x = p.querySelector(".ng-part-body tbody.bindable-tbody");
554
554
  if (!x) return;
@@ -586,8 +586,8 @@ const ns = class ns {
586
586
  }, "#bindRowData"));
587
587
  d(this, oe, /* @__PURE__ */ h(() => {
588
588
  var c, l, u;
589
- R.log("rowManager.#syncHeaderHeights");
590
- const n = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
589
+ S.log("rowManager.#syncHeaderHeights");
590
+ const n = t(this, R).querySelector(".ng-container-left .ng-part-header table"), e = t(this, R).querySelector(".ng-container-body .ng-part-header table"), s = t(this, R).querySelector(".ng-container-right .ng-part-header table");
591
591
  if (!e) return;
592
592
  const r = n ? Array.from(n.querySelectorAll("tr")) : [], i = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, i.length, o.length);
593
593
  for (let f = 0; f < a; f++) {
@@ -602,7 +602,7 @@ const ns = class ns {
602
602
  q(this, "destroy", /* @__PURE__ */ h(() => {
603
603
  t(this, Z) && (t(this, Z).disconnect(), y(this, Z, null));
604
604
  }, "destroy"));
605
- y(this, U, n.getRootNode().host), y(this, S, n), t(this, re).call(this);
605
+ y(this, U, n.getRootNode().host), y(this, R, n), t(this, re).call(this);
606
606
  }
607
607
  getRowHeight() {
608
608
  return t(this, O);
@@ -612,7 +612,7 @@ const ns = class ns {
612
612
  return ((e = t(this, Y).get(n)) == null ? void 0 : e.length) || 1;
613
613
  }
614
614
  };
615
- U = new WeakMap(), S = new WeakMap(), it = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), at = new WeakMap(), Lt = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), $t = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), Nt = new WeakMap(), Ue = new WeakMap(), mt = new WeakMap(), _t = new WeakMap(), oe = new WeakMap(), h(ns, "RowManager");
615
+ U = new WeakMap(), R = new WeakMap(), it = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), at = new WeakMap(), Lt = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), $t = new WeakMap(), Ht = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), Nt = new WeakMap(), Ue = new WeakMap(), mt = new WeakMap(), _t = new WeakMap(), oe = new WeakMap(), h(ns, "RowManager");
616
616
  let ke = ns;
617
617
  const ie = class ie {
618
618
  /**
@@ -703,7 +703,7 @@ const rs = class rs {
703
703
  d(this, X, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
704
704
  q(this, "render", /* @__PURE__ */ h(() => {
705
705
  const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, X);
706
- R.log("🎨 [CellSelection.render] Rendering range ->", t(this, X));
706
+ S.log("🎨 [CellSelection.render] Rendering range ->", t(this, X));
707
707
  const i = t(this, N).querySelectorAll(
708
708
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
709
709
  );
@@ -712,7 +712,7 @@ const rs = class rs {
712
712
  c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
713
713
  });
714
714
  }), n < 0 || e < 0) {
715
- R.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
715
+ S.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
716
716
  return;
717
717
  }
718
718
  let o = 0;
@@ -723,10 +723,10 @@ const rs = class rs {
723
723
  const f = parseInt(u.dataset.col, 10);
724
724
  if (isNaN(f)) return;
725
725
  const b = parseInt(u.rowSpan || 1, 10), g = parseInt(u.colSpan || 1, 10), p = l + b - 1, x = f + g - 1;
726
- p >= n && l <= s && x >= e && f <= r && (o++, u.classList.add("selected"), R.log(u, n, e, s, r), l <= n && u.classList.add("selected-top"), p >= s && u.classList.add("selected-bottom"), f <= e && u.classList.add("selected-left"), x >= r && u.classList.add("selected-right"));
726
+ p >= n && l <= s && x >= e && f <= r && (o++, u.classList.add("selected"), S.log(u, n, e, s, r), l <= n && u.classList.add("selected-top"), p >= s && u.classList.add("selected-bottom"), f <= e && u.classList.add("selected-left"), x >= r && u.classList.add("selected-right"));
727
727
  });
728
728
  });
729
- }), R.log(`✨ [CellSelection.render] Total rendered cells marked: ${o}`);
729
+ }), S.log(`✨ [CellSelection.render] Total rendered cells marked: ${o}`);
730
730
  }, "render"));
731
731
  y(this, N, n), V(this, K, ws).call(this), t(this, N).querySelectorAll(
732
732
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
@@ -734,10 +734,10 @@ const rs = class rs {
734
734
  s.addEventListener("scroll", () => {
735
735
  t(this, X).startRow >= 0 && t(this, X).startCol >= 0 && this.render();
736
736
  });
737
- }), R.log("🎯 [CellSelection] Initialized");
737
+ }), S.log("🎯 [CellSelection] Initialized");
738
738
  }
739
739
  setRange(n, e, s, r) {
740
- R.log(`πŸ” [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${r}`);
740
+ S.log(`πŸ” [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${r}`);
741
741
  let i = Math.min(n, s), o = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
742
742
  const l = t(this, N).querySelectorAll(
743
743
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
@@ -759,7 +759,7 @@ const rs = class rs {
759
759
  });
760
760
  });
761
761
  });
762
- y(this, X, { startRow: i, startCol: a, endRow: o, endCol: c }), R.log("πŸ“¦ [CellSelection.setRange] Final Range ->", t(this, X)), this.render();
762
+ y(this, X, { startRow: i, startCol: a, endRow: o, endCol: c }), S.log("πŸ“¦ [CellSelection.setRange] Final Range ->", t(this, X)), this.render();
763
763
  }
764
764
  };
765
765
  N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(function(n) {
@@ -771,7 +771,7 @@ N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(
771
771
  }, "#getMatrixRow"), ws = /* @__PURE__ */ h(function() {
772
772
  const n = t(this, N).querySelector(".ng-container-top");
773
773
  if (!n) {
774
- R.log("❌ [CellSelection] .ng-container-top not found!");
774
+ S.log("❌ [CellSelection] .ng-container-top not found!");
775
775
  return;
776
776
  }
777
777
  n.addEventListener("mousedown", (e) => {
@@ -784,7 +784,7 @@ N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(
784
784
  t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "";
785
785
  return;
786
786
  }
787
- R.log(`πŸ–±οΈ [MouseDown Success] startRow: ${i}, startCol: ${o}`), t(this, N).navigation.currentCell = s;
787
+ S.log(`πŸ–±οΈ [MouseDown Success] startRow: ${i}, startCol: ${o}`), t(this, N).navigation.currentCell = s;
788
788
  let a = i, c = o;
789
789
  const l = /* @__PURE__ */ h((f) => {
790
790
  const b = document.elementFromPoint(f.clientX, f.clientY);
@@ -803,13 +803,13 @@ N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(
803
803
  const p = g.closest("tr"), { matrixRow: x } = V(this, K, qt).call(this, p), w = parseInt(g.dataset.col, 10);
804
804
  x < 0 || a === x && c === w || (a = x, c = w, this.setRange(i, o, x, w));
805
805
  }, "onMouseMove"), u = /* @__PURE__ */ h(() => {
806
- R.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", u);
806
+ S.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", u);
807
807
  }, "onMouseUp");
808
808
  document.addEventListener("mousemove", l), document.addEventListener("mouseup", u);
809
809
  });
810
810
  }, "#initEvents"), h(rs, "CellSelection");
811
811
  let Le = rs;
812
- var F, lt, ae, le, pt, He, Ot, Dt, Bt, ct, Wt, vs;
812
+ var F, lt, ae, le, pt, $e, Ot, Dt, Bt, ct, Wt, vs;
813
813
  const os = class os {
814
814
  constructor(n) {
815
815
  d(this, pt);
@@ -895,7 +895,7 @@ const os = class os {
895
895
  }
896
896
  return null;
897
897
  }, "#getNearElement"));
898
- y(this, F, n), V(this, pt, vs).call(this), R.log("🎯 [CellNavigation] Initialized");
898
+ y(this, F, n), V(this, pt, vs).call(this), S.log("🎯 [CellNavigation] Initialized");
899
899
  }
900
900
  get currentCell() {
901
901
  return t(this, lt);
@@ -950,18 +950,18 @@ const os = class os {
950
950
  const p = Math.floor(b / l), x = b % l;
951
951
  let w = t(this, Wt).call(this, p, x, g, b);
952
952
  if (w)
953
- this.currentCell = w, V(this, pt, He).call(this, w);
953
+ this.currentCell = w, V(this, pt, $e).call(this, w);
954
954
  else if (p !== r && p >= 0) {
955
955
  const B = ((T = (m = t(this, F)).getRowHeight) == null ? void 0 : T.call(m)) || 40;
956
956
  (M = (A = t(this, F)).scrollToY) == null || M.call(A, p * B), setTimeout(() => {
957
957
  const z = t(this, Wt).call(this, p, x, g, b);
958
- z && (this.currentCell = z, V(this, pt, He).call(this, z));
958
+ z && (this.currentCell = z, V(this, pt, $e).call(this, z));
959
959
  }, 0);
960
960
  }
961
961
  }
962
962
  };
963
963
  F = new WeakMap(), lt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), pt = new WeakSet(), // 🎯 셀이 보이지 μ•ŠλŠ” μ˜μ—­μ— μžˆμ„ λ•Œ μ»¨ν…Œμ΄λ„ˆ μŠ€ν¬λ‘€μ„ λ™κΈ°ν™”ν•˜λŠ” ν•¨μˆ˜
964
- He = /* @__PURE__ */ h(function(n) {
964
+ $e = /* @__PURE__ */ h(function(n) {
965
965
  const e = t(this, F).querySelector(".ng-container-body .ng-part-body");
966
966
  if (!e) return;
967
967
  const s = n.getBoundingClientRect(), r = e.getBoundingClientRect();
@@ -982,10 +982,10 @@ const Ct = class Ct extends HTMLElement {
982
982
  d(this, zt);
983
983
  d(this, Pt);
984
984
  q(this, "invalidate", /* @__PURE__ */ h(() => {
985
- R.log("sheet.invalidate()"), t(this, dt).refresh();
985
+ S.log("sheet.invalidate()"), t(this, dt).refresh();
986
986
  }, "invalidate"));
987
987
  q(this, "generate", /* @__PURE__ */ h((e) => {
988
- if (R.log("sheet.generate()"), !e) return;
988
+ if (S.log("sheet.generate()"), !e) return;
989
989
  y(this, ht, Ie.compile(e)), t(this, he).call(this), t(this, de).call(this);
990
990
  const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), i = this.querySelector(".ng-nodata-overlay");
991
991
  s && i && (i.style.top = `${s.offsetHeight}px`), r && i && (i.style.bottom = `${r.offsetHeight}px`), t(this, dt).initialize(), setTimeout(() => {
@@ -1260,7 +1260,7 @@ const Ct = class Ct extends HTMLElement {
1260
1260
  return t(this, Pt);
1261
1261
  }
1262
1262
  disconnectedCallback() {
1263
- this.innerHTML = "", R.log("NineTableSheet destroyed.");
1263
+ this.innerHTML = "", S.log("NineTableSheet destroyed.");
1264
1264
  }
1265
1265
  };
1266
1266
  ce = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), he = new WeakMap(), de = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), ge = new WeakMap(), h(Ct, "NineTableSheet"), q(Ct, "SCROLLBAR_SIZE", 16);
@@ -1315,8 +1315,8 @@ const is = class is extends HTMLElement {
1315
1315
  }
1316
1316
  };
1317
1317
  ue = new WeakMap(), Ft = new WeakMap(), h(is, "NineTableSheets");
1318
- let $e = is;
1319
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", $e);
1318
+ let He = is;
1319
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", He);
1320
1320
  var _, be, jt, pe;
1321
1321
  const as = class as {
1322
1322
  constructor(n) {
@@ -1683,11 +1683,11 @@ const hs = class hs {
1683
1683
  }), y(this, H, Array.from(n, ([e, s]) => ({ name: e, type: s }))), y(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1684
1684
  }, "#adjust"));
1685
1685
  d(this, ve, /* @__PURE__ */ h(() => {
1686
- y(this, H, []), R.log(t(this, Rt).querySelectorAll("table"));
1686
+ y(this, H, []), S.log(t(this, Rt).querySelectorAll("table"));
1687
1687
  const n = Array.from(t(this, Rt).querySelectorAll("table"));
1688
1688
  if (!(!n || n.length === 0)) {
1689
1689
  for (const e of n)
1690
- R.log(e), $("[data-bind]", e).each((s, r) => {
1690
+ S.log(e), $("[data-bind]", e).each((s, r) => {
1691
1691
  const i = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1692
1692
  i && t(this, H).push({ name: i, type: o });
1693
1693
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
@@ -1746,7 +1746,7 @@ const ds = class ds extends HTMLElement {
1746
1746
  d(this, ut);
1747
1747
  d(this, Se);
1748
1748
  d(this, Re, /* @__PURE__ */ h(() => {
1749
- this.fields = new Be(this), y(this, Se, new Ne(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1749
+ this.fields = new Be(this), y(this, Se, new Ne(this)), S.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1750
1750
  }, "#init"));
1751
1751
  this.attachShadow({ mode: "open" }), y(this, ut, new De(this));
1752
1752
  }
@@ -1754,7 +1754,7 @@ const ds = class ds extends HTMLElement {
1754
1754
  t(this, Re).call(this);
1755
1755
  }
1756
1756
  disconnectedCallback() {
1757
- R.log("NineTable disconnected.");
1757
+ S.log("NineTable disconnected.");
1758
1758
  }
1759
1759
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1760
1760
  get data() {