@ninebone/table 0.0.817 β†’ 0.0.819

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.
@@ -5,7 +5,7 @@ var xs = (T) => {
5
5
  var Rs = (T, s, e) => s in T ? ms(T, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[s] = e;
6
6
  var h = (T, s) => ms(T, "name", { value: s, configurable: !0 });
7
7
  var E = (T, s, e) => Rs(T, typeof s != "symbol" ? s + "" : s, e), qe = (T, s, e) => s.has(T) || xs("Cannot " + e);
8
- var t = (T, s, e) => (qe(T, s, "read from private field"), e ? e.call(T) : s.get(T)), d = (T, s, e) => s.has(T) ? xs("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(T) : s.set(T, e), y = (T, s, e, n) => (qe(T, s, "write to private field"), n ? n.call(T, e) : s.set(T, e), e), Y = (T, s, e) => (qe(T, s, "access private method"), e);
8
+ var t = (T, s, e) => (qe(T, s, "read from private field"), e ? e.call(T) : s.get(T)), d = (T, s, e) => s.has(T) ? xs("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(T) : s.set(T, e), y = (T, s, e, n) => (qe(T, s, "write to private field"), n ? n.call(T, e) : s.set(T, e), e), V = (T, s, e) => (qe(T, s, "access private method"), e);
9
9
  var ws = (T, s, e, n) => ({
10
10
  set _(r) {
11
11
  y(T, s, r, e);
@@ -23,22 +23,22 @@ const es = class es extends As.constructor {
23
23
  h(es, "Trace");
24
24
  let Te = es;
25
25
  const q = new Te();
26
- var j, K, A, Q, tt, et, Zt, st, Jt;
26
+ var j, K, A, tt, et, st, Zt, nt, Jt;
27
27
  const ss = class ss extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  d(this, j);
31
31
  d(this, K, !1);
32
32
  d(this, A);
33
- d(this, Q);
34
33
  d(this, tt);
35
34
  d(this, et);
35
+ d(this, st);
36
36
  d(this, Zt, /* @__PURE__ */ h(() => {
37
37
  if (!t(this, j)) return;
38
38
  const e = t(this, j).querySelector(".ng-container-body .ng-part-body");
39
- e && (y(this, et, new ResizeObserver(() => {
39
+ e && (y(this, st, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, et).observe(e));
41
+ })), t(this, st).observe(e));
42
42
  }, "#observeResize"));
43
43
  E(this, "refresh", /* @__PURE__ */ h(() => {
44
44
  if (!t(this, j) || !t(this, A) || t(this, K)) return;
@@ -61,7 +61,7 @@ const ss = class ss extends HTMLElement {
61
61
  const p = l - g;
62
62
  u > p && (u = p), i.style.left = `${u}px`, t(this, A).left.disabled = u === 0, t(this, A).right.disabled = u >= p - 1;
63
63
  }, "refresh"));
64
- d(this, st, /* @__PURE__ */ h((e) => {
64
+ d(this, nt, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, A)) return !1;
66
66
  const n = t(this, A).container, r = n.querySelector("table");
67
67
  if (!r) return !1;
@@ -75,16 +75,16 @@ const ss = class ss extends HTMLElement {
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, Jt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
- clearInterval(t(this, Q)), clearInterval(t(this, tt));
78
+ clearInterval(t(this, tt)), clearInterval(t(this, et));
79
79
  const i = parseInt(t(this, A).thumb.style.left || 0, 10);
80
- t(this, st).call(this, i + r), y(this, Q, setInterval(() => {
81
- clearInterval(t(this, Q)), y(this, tt, setInterval(() => {
80
+ t(this, nt).call(this, i + r), y(this, tt, setInterval(() => {
81
+ clearInterval(t(this, tt)), y(this, et, setInterval(() => {
82
82
  const o = parseInt(t(this, A).thumb.style.left || 0, 10);
83
- t(this, st).call(this, o + r) || clearInterval(t(this, tt));
83
+ t(this, nt).call(this, o + r) || clearInterval(t(this, et));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), n = /* @__PURE__ */ h(() => {
87
- clearInterval(t(this, Q)), clearInterval(t(this, tt));
87
+ clearInterval(t(this, tt)), clearInterval(t(this, et));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
90
  t(this, A).left.addEventListener(r, n), t(this, A).right.addEventListener(r, n), t(this, A).track.addEventListener(r, n);
@@ -96,14 +96,14 @@ const ss = class ss extends HTMLElement {
96
96
  if (r.button !== 0) return;
97
97
  r.preventDefault();
98
98
  const i = t(this, A).track.getBoundingClientRect(), o = t(this, A).thumb.clientWidth;
99
- t(this, st).call(this, r.clientX - i.left - o / 2);
99
+ t(this, nt).call(this, r.clientX - i.left - o / 2);
100
100
  }), t(this, A).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
102
  r.stopPropagation(), r.preventDefault(), y(this, K, !0), this.shiftX = r.clientX - t(this, A).thumb.getBoundingClientRect().left;
103
103
  const i = /* @__PURE__ */ h((a) => {
104
104
  if (!t(this, K)) return;
105
105
  const c = t(this, A).track.getBoundingClientRect();
106
- t(this, st).call(this, a.clientX - c.left - this.shiftX);
106
+ t(this, nt).call(this, a.clientX - c.left - this.shiftX);
107
107
  }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
108
108
  y(this, K, !1), n(), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
@@ -195,25 +195,25 @@ const ss = class ss extends HTMLElement {
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, et) && t(this, et).disconnect();
198
+ t(this, st) && t(this, st).disconnect();
199
199
  }
200
200
  };
201
- j = new WeakMap(), K = new WeakMap(), A = new WeakMap(), Q = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Zt = new WeakMap(), st = new WeakMap(), Jt = new WeakMap(), h(ss, "NineTableHScrollBar");
201
+ j = new WeakMap(), K = new WeakMap(), A = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Zt = new WeakMap(), nt = new WeakMap(), Jt = new WeakMap(), h(ss, "NineTableHScrollBar");
202
202
  let Ce = ss;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ce);
204
- var nt, rt, yt, k, kt, Lt, Qt;
204
+ var rt, ot, yt, k, kt, Lt, Qt;
205
205
  const ns = class ns extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- d(this, nt);
209
208
  d(this, rt);
209
+ d(this, ot);
210
210
  d(this, yt, !1);
211
211
  d(this, k);
212
212
  d(this, kt, 0);
213
213
  d(this, Lt, 0);
214
214
  E(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (!t(this, nt) || !t(this, k)) return;
216
- const e = t(this, k).container, n = t(this, k).track, r = t(this, k).thumb, i = e.clientHeight, o = t(this, nt).data.length, a = t(this, rt).getRowHeight(), c = o * a;
215
+ if (!t(this, rt) || !t(this, k)) return;
216
+ const e = t(this, k).container, n = 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";
219
219
  return;
@@ -232,7 +232,7 @@ const ns = class ns extends HTMLElement {
232
232
  d(this, Qt, /* @__PURE__ */ h(() => {
233
233
  q.log("nine-table-vscrollbar.#init");
234
234
  const e = t(this, k).container, n = /* @__PURE__ */ h(() => {
235
- const i = (t(this, nt).data.get() || []).length, o = t(this, rt).getRowHeight();
235
+ const i = (t(this, rt).data.get() || []).length, o = t(this, ot).getRowHeight();
236
236
  return i * o;
237
237
  }, "getContentHeight");
238
238
  t(this, k).thumb.addEventListener("mousedown", (r) => {
@@ -268,7 +268,7 @@ const ns = class ns extends HTMLElement {
268
268
  }, "#init"));
269
269
  }
270
270
  connectedCallback() {
271
- y(this, nt, this.getRootNode().host), y(this, rt, this.closest("nine-table-sheet")), this.innerHTML = `
271
+ y(this, rt, this.getRootNode().host), y(this, ot, this.closest("nine-table-sheet")), this.innerHTML = `
272
272
  <style>
273
273
  nine-table-vscrollbar {
274
274
  display: flex;
@@ -333,7 +333,7 @@ const ns = class ns extends HTMLElement {
333
333
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
334
334
  `;
335
335
  const e = /* @__PURE__ */ h(() => {
336
- const n = t(this, rt).querySelector(".ng-container-body .ng-part-body");
336
+ const n = t(this, ot).querySelector(".ng-container-body .ng-part-body");
337
337
  if (!n) {
338
338
  setTimeout(e, 10);
339
339
  return;
@@ -349,19 +349,19 @@ const ns = class ns extends HTMLElement {
349
349
  e();
350
350
  }
351
351
  };
352
- nt = new WeakMap(), rt = new WeakMap(), yt = new WeakMap(), k = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), Qt = new WeakMap(), h(ns, "NineTableVScrollBar");
352
+ rt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), k = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), Qt = new WeakMap(), h(ns, "NineTableVScrollBar");
353
353
  let ke = ns;
354
354
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", ke);
355
- var ot, R, it, V, O, G, at, It, Ye, Ue, te, Xe, ee, se, Mt, Ht, $t, ne, re, Nt, mt, oe, ie;
355
+ var it, R, at, Y, O, G, lt, It, Ye, Ue, te, Xe, ee, se, Mt, Ht, $t, ne, re, Nt, mt, oe, ie;
356
356
  const rs = class rs {
357
357
  constructor(s) {
358
- d(this, ot);
359
- d(this, R);
360
358
  d(this, it);
361
- d(this, V, /* @__PURE__ */ new Map());
359
+ d(this, R);
360
+ d(this, at);
361
+ d(this, Y, /* @__PURE__ */ new Map());
362
362
  d(this, O, null);
363
363
  d(this, G, null);
364
- d(this, at, 0);
364
+ d(this, lt, 0);
365
365
  d(this, It, 40);
366
366
  d(this, Ye, !1);
367
367
  d(this, Ue, !1);
@@ -376,10 +376,10 @@ const rs = class rs {
376
376
  s && (t(this, Mt).call(this), t(this, Ht).call(this), t(this, mt).call(this, s.scrollTop), (e = t(this, R).querySelector("nine-table-vscrollbar")) == null || e.refresh());
377
377
  }, "refresh"));
378
378
  E(this, "initialize", /* @__PURE__ */ h(() => {
379
- q.log("rowManager.initialize"), y(this, it, {
379
+ q.log("rowManager.initialize"), y(this, at, {
380
380
  scrollTables: t(this, R).querySelectorAll(".ng-part-body table"),
381
381
  firstTr: t(this, R).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
382
- }), y(this, O, null), t(this, V).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
382
+ }), y(this, O, null), t(this, Y).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
383
383
  const a = t(this, R).querySelector(o);
384
384
  if (!a) return;
385
385
  const c = a.querySelector(".ng-part-body table");
@@ -387,10 +387,10 @@ const rs = class rs {
387
387
  const l = c.querySelector("tbody.bindable-tbody");
388
388
  if (!l) return;
389
389
  const f = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
390
- t(this, V).set(o, f);
390
+ t(this, Y).set(o, f);
391
391
  });
392
392
  const s = t(this, R).querySelector(".ng-container-body .ng-part-body"), e = t(this, R).querySelector(".ng-container-left .ng-part-body"), n = t(this, R).querySelector(".ng-container-right .ng-part-body"), r = t(this, R).querySelector(".ng-container-body .ng-part-header"), i = t(this, R).querySelector(".ng-container-body .ng-part-footer");
393
- if (q.log("********************"), q.log(t(this, V)), s) {
393
+ if (s) {
394
394
  t(this, Mt).call(this), t(this, Nt).call(this), t(this, Ht).call(this), t(this, mt).call(this, s.scrollTop);
395
395
  let o = !1;
396
396
  y(this, ee, s.scrollLeft);
@@ -415,7 +415,7 @@ const rs = class rs {
415
415
  }, "initialize"));
416
416
  d(this, se, /* @__PURE__ */ h((s, e) => {
417
417
  q.log("rowManager.#renderRows");
418
- const n = t(this, V).get(e);
418
+ const n = t(this, Y).get(e);
419
419
  if (!n || n.length === 0) return;
420
420
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
421
421
  if (!r) return;
@@ -425,14 +425,14 @@ const rs = class rs {
425
425
  n.forEach((c) => {
426
426
  o.appendChild(c.cloneNode(!0));
427
427
  });
428
- i ? i.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, it).firstTr = r.querySelector("tr:not(.nodata)"));
428
+ i ? i.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, at).firstTr = r.querySelector("tr:not(.nodata)"));
429
429
  }, "#renderRows"));
430
430
  d(this, Mt, /* @__PURE__ */ h(() => {
431
431
  if (t(this, O) !== null && t(this, O) > 0)
432
432
  return t(this, O);
433
433
  const s = t(this, R).querySelector(".ng-container-body .ng-part-body");
434
434
  q.log("rowManager.#measureAndCacheHeight");
435
- const e = t(this, V).get(".ng-container-body");
435
+ const e = t(this, Y).get(".ng-container-body");
436
436
  if (!e || e.length === 0) throw new Error("invalid dom");
437
437
  const n = s.querySelector("tbody.bindable-tbody");
438
438
  if (!n) throw new Error("invalid dom");
@@ -456,7 +456,7 @@ const rs = class rs {
456
456
  }, "#measureAndCacheHeight"));
457
457
  d(this, Ht, /* @__PURE__ */ h(() => {
458
458
  q.log("rowManager.#updateVirtualScrollHeight");
459
- const e = (t(this, ot).data.get() || []).length, n = t(this, O), r = e * n;
459
+ const e = (t(this, it).data.get() || []).length, n = t(this, O), r = e * n;
460
460
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
461
461
  const o = t(this, R).querySelector(i);
462
462
  if (!o) return;
@@ -465,8 +465,8 @@ const rs = class rs {
465
465
  });
466
466
  }, "#updateVirtualScrollHeight"));
467
467
  d(this, $t, /* @__PURE__ */ h(() => {
468
- if (t(this, at) > 0 && t(this, O) > 0) {
469
- const s = Math.ceil(t(this, at) / t(this, O));
468
+ if (t(this, lt) > 0 && t(this, O) > 0) {
469
+ const s = Math.ceil(t(this, lt) / t(this, O));
470
470
  y(this, It, s + t(this, te));
471
471
  }
472
472
  }, "#updateRowCount"));
@@ -508,7 +508,7 @@ const rs = class rs {
508
508
  const o = n.querySelector(".ng-part-header"), a = n.querySelector(".ng-part-footer");
509
509
  o && (i += o.offsetHeight), a && (i += a.offsetHeight);
510
510
  const c = Math.max(r - i, 100);
511
- t(this, at) !== c && (y(this, at, c), t(this, $t).call(this), t(this, O) !== null && (t(this, Nt).call(this), this.refresh()));
511
+ t(this, lt) !== c && (y(this, lt, c), t(this, $t).call(this), t(this, O) !== null && (t(this, Nt).call(this), this.refresh()));
512
512
  }
513
513
  }
514
514
  })), t(this, G).observe(t(this, R)));
@@ -523,12 +523,12 @@ const rs = class rs {
523
523
  var f, b;
524
524
  const e = t(this, O);
525
525
  if (!e || e <= 0) return;
526
- const n = t(this, ot).data.length;
526
+ const n = t(this, it).data.length;
527
527
  if (n === 0) return;
528
- const r = ((f = t(this, V).get(".ng-container-body")) == null ? void 0 : f.length) || 1, i = t(this, R).querySelector(".ng-container-body .ng-part-body"), o = Math.max(0, n - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(s / e)));
528
+ 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"), o = Math.max(0, n - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(s / e)));
529
529
  let c = Math.floor(a * e);
530
- const l = t(this, it).firstTr, g = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
531
- (b = t(this, it)) == null || b.scrollTables.forEach((u) => {
530
+ const l = t(this, at).firstTr, g = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
531
+ (b = t(this, at)) == null || b.scrollTables.forEach((u) => {
532
532
  u.style.transform = `translate3d(0, ${c}px, 0)`;
533
533
  }), g !== a && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
534
534
  const p = t(this, R).querySelector(u);
@@ -541,7 +541,7 @@ const rs = class rs {
541
541
  m.style.display = "none";
542
542
  return;
543
543
  }
544
- const M = t(this, ot).data.get(S);
544
+ const M = t(this, it).data.get(S);
545
545
  m.style.display = "", t(this, oe).call(this, m, M, S);
546
546
  });
547
547
  });
@@ -585,17 +585,17 @@ const rs = class rs {
585
585
  E(this, "destroy", /* @__PURE__ */ h(() => {
586
586
  t(this, G) && (t(this, G).disconnect(), y(this, G, null));
587
587
  }, "destroy"));
588
- y(this, ot, s.getRootNode().host), y(this, R, s), t(this, re).call(this);
588
+ y(this, it, s.getRootNode().host), y(this, R, s), t(this, re).call(this);
589
589
  }
590
590
  getRowHeight() {
591
591
  return t(this, O);
592
592
  }
593
593
  templateLength(s = ".ng-container-body") {
594
594
  var e;
595
- return ((e = t(this, V).get(s)) == null ? void 0 : e.length) || 1;
595
+ return ((e = t(this, Y).get(s)) == null ? void 0 : e.length) || 1;
596
596
  }
597
597
  };
598
- ot = new WeakMap(), R = new WeakMap(), it = new WeakMap(), V = new WeakMap(), O = new WeakMap(), G = new WeakMap(), at = new WeakMap(), It = new WeakMap(), Ye = new WeakMap(), Ue = new WeakMap(), te = new WeakMap(), Xe = 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(), mt = new WeakMap(), oe = new WeakMap(), ie = new WeakMap(), h(rs, "RowManager");
598
+ it = new WeakMap(), R = new WeakMap(), at = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), G = new WeakMap(), lt = new WeakMap(), It = new WeakMap(), Ye = new WeakMap(), Ue = new WeakMap(), te = new WeakMap(), Xe = 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(), mt = new WeakMap(), oe = new WeakMap(), ie = new WeakMap(), h(rs, "RowManager");
599
599
  let Le = rs;
600
600
  const ae = class ae {
601
601
  /**
@@ -701,7 +701,7 @@ const os = class os {
701
701
  let o = 0;
702
702
  i.forEach((a) => {
703
703
  a.querySelectorAll("tbody tr").forEach((c) => {
704
- const { matrixRow: l } = Y(this, X, qt).call(this, c);
704
+ const { matrixRow: l } = V(this, X, qt).call(this, c);
705
705
  l < 0 || c.querySelectorAll("td, th").forEach((g) => {
706
706
  const f = parseInt(g.dataset.col, 10);
707
707
  if (isNaN(f)) return;
@@ -711,7 +711,7 @@ const os = class os {
711
711
  });
712
712
  }), q.log(`✨ [CellSelection.render] Total rendered cells marked: ${o}`);
713
713
  }, "render"));
714
- y(this, N, s), Y(this, X, vs).call(this), t(this, N).querySelectorAll(
714
+ y(this, N, s), V(this, X, vs).call(this), t(this, N).querySelectorAll(
715
715
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
716
716
  ).forEach((n) => {
717
717
  n.addEventListener("scroll", () => {
@@ -730,7 +730,7 @@ const os = class os {
730
730
  g = !1, f++, l.forEach((b) => {
731
731
  b.querySelectorAll("tbody tr").forEach((u) => {
732
732
  if (u.classList.contains("nodata")) return;
733
- const { matrixRow: p } = Y(this, X, qt).call(this, u);
733
+ const { matrixRow: p } = V(this, X, qt).call(this, u);
734
734
  p < 0 || u.querySelectorAll("td, th").forEach((x) => {
735
735
  const w = parseInt(x.dataset.col, 10);
736
736
  if (isNaN(w)) return;
@@ -762,7 +762,7 @@ N = new WeakMap(), U = new WeakMap(), X = new WeakSet(), qt = /* @__PURE__ */ h(
762
762
  const n = e.target.closest("td, th");
763
763
  if (!n || n.dataset.row === void 0 || n.dataset.col === void 0 || n.closest("tr").classList.contains("nodata")) return;
764
764
  t(this, N).style.userSelect = "none", t(this, N).style.webkitUserSelect = "none";
765
- const r = n.closest("tr"), { matrixRow: i } = Y(this, X, qt).call(this, r), o = parseInt(n.dataset.col, 10);
765
+ const r = n.closest("tr"), { matrixRow: i } = V(this, X, qt).call(this, r), o = parseInt(n.dataset.col, 10);
766
766
  if (i < 0) {
767
767
  t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "";
768
768
  return;
@@ -783,7 +783,7 @@ N = new WeakMap(), U = new WeakMap(), X = new WeakSet(), qt = /* @__PURE__ */ h(
783
783
  }
784
784
  }
785
785
  if (!u || u.dataset.row === void 0 || u.dataset.col === void 0 || u.closest("tr").classList.contains("nodata")) return;
786
- const p = u.closest("tr"), { matrixRow: x } = Y(this, X, qt).call(this, p), w = parseInt(u.dataset.col, 10);
786
+ const p = u.closest("tr"), { matrixRow: x } = V(this, X, qt).call(this, p), w = parseInt(u.dataset.col, 10);
787
787
  x < 0 || a === x && c === w || (a = x, c = w, this.setRange(i, o, x, w));
788
788
  }, "onMouseMove"), g = /* @__PURE__ */ h(() => {
789
789
  q.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", g);
@@ -792,12 +792,12 @@ N = new WeakMap(), U = new WeakMap(), X = new WeakSet(), qt = /* @__PURE__ */ h(
792
792
  });
793
793
  }, "#initEvents"), h(os, "CellSelection");
794
794
  let Me = os;
795
- var F, lt, le, ce, pt, $e, _t, Ot, Dt, ct, Wt, Ss;
795
+ var F, ct, le, ce, pt, $e, _t, Ot, Dt, ht, Wt, Ss;
796
796
  const is = class is {
797
797
  constructor(s) {
798
798
  d(this, pt);
799
799
  d(this, F);
800
- d(this, lt, null);
800
+ d(this, ct, null);
801
801
  d(this, le, -1);
802
802
  d(this, ce, -1);
803
803
  d(this, _t, /* @__PURE__ */ h((s) => {
@@ -805,7 +805,7 @@ const is = class is {
805
805
  return s.forEach((n) => e.push(...Array.from(n.querySelectorAll("td")))), e.length === 0 ? null : (e.sort((n, r) => parseInt(n.dataset.col, 10) - parseInt(r.dataset.col, 10)), e[e.length - 1]);
806
806
  }, "#getMaxColCell"));
807
807
  d(this, Ot, /* @__PURE__ */ h((s, e) => {
808
- const n = t(this, ct).call(this, s);
808
+ const n = t(this, ht).call(this, s);
809
809
  if (n.length === 0) return e + 1;
810
810
  let r = e + 1;
811
811
  const i = [];
@@ -820,7 +820,7 @@ const is = class is {
820
820
  return r;
821
821
  }, "#getNextCol"));
822
822
  d(this, Dt, /* @__PURE__ */ h((s, e) => {
823
- const n = t(this, ct).call(this, s);
823
+ const n = t(this, ht).call(this, s);
824
824
  if (n.length === 0) return Math.max(0, e - 1);
825
825
  let r = -1;
826
826
  const i = [];
@@ -835,7 +835,7 @@ const is = class is {
835
835
  return r;
836
836
  }, "#getPreviousCol"));
837
837
  // 🎯 λ ˆκ±°μ‹œμ˜ 병합 μ…€(rowSpan) 블둝 포용 탐색 둜직 이식
838
- d(this, ct, /* @__PURE__ */ h((s) => {
838
+ d(this, ht, /* @__PURE__ */ h((s) => {
839
839
  const e = t(this, F).querySelectorAll(
840
840
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
841
841
  ), n = [];
@@ -878,14 +878,14 @@ const is = class is {
878
878
  }
879
879
  return null;
880
880
  }, "#getNearElement"));
881
- y(this, F, s), Y(this, pt, Ss).call(this), q.log("🎯 [CellNavigation] Initialized");
881
+ y(this, F, s), V(this, pt, Ss).call(this), q.log("🎯 [CellNavigation] Initialized");
882
882
  }
883
883
  get currentCell() {
884
- return t(this, lt);
884
+ return t(this, ct);
885
885
  }
886
886
  set currentCell(s) {
887
887
  if (!s) return;
888
- y(this, lt, s), s.focus({ preventScroll: !0 });
888
+ y(this, ct, s), s.focus({ preventScroll: !0 });
889
889
  const e = parseInt(s.dataset.row, 10), n = parseInt(s.dataset.col, 10);
890
890
  if (!isNaN(e) && !isNaN(n)) {
891
891
  y(this, le, e), y(this, ce, n);
@@ -898,8 +898,8 @@ const is = class is {
898
898
  }
899
899
  moveCell(s) {
900
900
  var m, C, S, M;
901
- if (!t(this, lt)) return;
902
- const e = t(this, lt), n = e.closest("tr"), r = parseInt(e.dataset.row, 10), i = parseInt(e.dataset.col, 10), o = n == null ? void 0 : n.closest("tbody");
901
+ if (!t(this, ct)) return;
902
+ const e = t(this, ct), n = e.closest("tr"), r = parseInt(e.dataset.row, 10), i = parseInt(e.dataset.col, 10), o = n == null ? void 0 : n.closest("tbody");
903
903
  if (!o) return;
904
904
  const c = Array.from(o.querySelectorAll("tr")).filter((W) => parseInt(W.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, g = c.indexOf(n), f = r * l + (g >= 0 ? g : 0);
905
905
  let b = f, u = i;
@@ -908,12 +908,12 @@ const is = class is {
908
908
  if (s.preventDefault(), s.shiftKey) {
909
909
  if (u = t(this, Dt).call(this, f, i), u < 0 && f > 0) {
910
910
  b = f - 1;
911
- const W = t(this, ct).call(this, b), B = t(this, _t).call(this, W);
911
+ const W = t(this, ht).call(this, b), B = t(this, _t).call(this, W);
912
912
  u = B ? parseInt(B.dataset.col, 10) : 0;
913
913
  }
914
914
  } else {
915
915
  u = t(this, Ot).call(this, f, i);
916
- const W = t(this, ct).call(this, f), B = t(this, _t).call(this, W), Kt = B ? parseInt(B.dataset.col, 10) + parseInt(B.colSpan || 1, 10) : 0;
916
+ const W = t(this, ht).call(this, f), B = t(this, _t).call(this, W), Kt = B ? parseInt(B.dataset.col, 10) + parseInt(B.colSpan || 1, 10) : 0;
917
917
  u >= Kt && (b = f + 1, u = 0);
918
918
  }
919
919
  break;
@@ -933,34 +933,34 @@ const is = class is {
933
933
  const p = Math.floor(b / l), x = b % l;
934
934
  let w = t(this, Wt).call(this, p, x, u, b);
935
935
  if (q.log(w, p, x, u, b), w)
936
- this.currentCell = w, Y(this, pt, $e).call(this, w);
936
+ this.currentCell = w, V(this, pt, $e).call(this, w);
937
937
  else if (p !== r && p >= 0) {
938
938
  const W = ((C = (m = t(this, F)).getRowHeight) == null ? void 0 : C.call(m)) || 40;
939
939
  (M = (S = t(this, F)).scrollToY) == null || M.call(S, p * W), setTimeout(() => {
940
940
  const B = t(this, Wt).call(this, p, x, u, b);
941
- B && (this.currentCell = B, Y(this, pt, $e).call(this, B));
941
+ B && (this.currentCell = B, V(this, pt, $e).call(this, B));
942
942
  }, 0);
943
943
  }
944
944
  }
945
945
  };
946
- F = new WeakMap(), lt = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), pt = new WeakSet(), // 🎯 셀이 보이지 μ•ŠλŠ” μ˜μ—­μ— μžˆμ„ λ•Œ μ»¨ν…Œμ΄λ„ˆ μŠ€ν¬λ‘€μ„ λ™κΈ°ν™”ν•˜λŠ” ν•¨μˆ˜
946
+ F = new WeakMap(), ct = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), pt = new WeakSet(), // 🎯 셀이 보이지 μ•ŠλŠ” μ˜μ—­μ— μžˆμ„ λ•Œ μ»¨ν…Œμ΄λ„ˆ μŠ€ν¬λ‘€μ„ λ™κΈ°ν™”ν•˜λŠ” ν•¨μˆ˜
947
947
  $e = /* @__PURE__ */ h(function(s) {
948
948
  const e = t(this, F).querySelector(".ng-container-body .ng-part-body");
949
949
  if (!e) return;
950
950
  const n = s.getBoundingClientRect(), r = e.getBoundingClientRect();
951
951
  n.top < r.top ? e.scrollTop -= r.top - n.top : n.bottom > r.bottom && (e.scrollTop += n.bottom - r.bottom), n.left < r.left ? e.scrollLeft -= r.left - n.left : n.right > r.right && (e.scrollLeft += n.right - r.right);
952
- }, "#ensureCellVisible"), _t = new WeakMap(), Ot = new WeakMap(), Dt = new WeakMap(), ct = new WeakMap(), Wt = new WeakMap(), Ss = /* @__PURE__ */ h(function() {
952
+ }, "#ensureCellVisible"), _t = new WeakMap(), Ot = new WeakMap(), Dt = new WeakMap(), ht = new WeakMap(), Wt = new WeakMap(), Ss = /* @__PURE__ */ h(function() {
953
953
  t(this, F).addEventListener("keydown", (s) => {
954
954
  ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(s.code) && this.moveCell(s);
955
955
  });
956
956
  }, "#initEvents"), h(is, "CellNavigation");
957
957
  let He = is;
958
- var he, ht, dt, zt, Bt, de, fe, xt, ue, ge;
958
+ var he, Z, dt, zt, Bt, de, fe, xt, ue, ge;
959
959
  const Tt = class Tt extends HTMLElement {
960
960
  constructor() {
961
961
  super();
962
962
  d(this, he);
963
- d(this, ht, null);
963
+ d(this, Z, null);
964
964
  d(this, dt);
965
965
  d(this, zt);
966
966
  d(this, Bt);
@@ -969,7 +969,7 @@ const Tt = class Tt extends HTMLElement {
969
969
  }, "invalidate"));
970
970
  E(this, "generate", /* @__PURE__ */ h((e) => {
971
971
  if (q.log("sheet.generate()"), !e) return;
972
- y(this, ht, Ie.compile(e)), t(this, de).call(this), t(this, fe).call(this);
972
+ y(this, Z, Ie.compile(e)), q.log(t(this, Z)), t(this, de).call(this), t(this, fe).call(this);
973
973
  const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), i = this.querySelector(".ng-nodata-overlay");
974
974
  n && i && (i.style.top = `${n.offsetHeight}px`), r && i && (i.style.bottom = `${r.offsetHeight}px`), t(this, dt).initialize(), setTimeout(() => {
975
975
  var o;
@@ -983,7 +983,7 @@ const Tt = class Tt extends HTMLElement {
983
983
  { selector: ".ng-container-right", type: "right" }
984
984
  ].forEach(({ selector: n, type: r }) => {
985
985
  var i, o, a;
986
- (i = this.querySelector(`${n} .ng-part-header`)) == null || i.appendChild(t(this, xt).call(this, t(this, ht), r, "header")), (o = this.querySelector(`${n} .ng-virtual-spacer`)) == null || o.before(t(this, xt).call(this, t(this, ht), r, "body")), (a = this.querySelector(`${n} .ng-part-footer`)) == null || a.appendChild(t(this, xt).call(this, t(this, ht), r, "footer"));
986
+ (i = this.querySelector(`${n} .ng-part-header`)) == null || i.appendChild(t(this, xt).call(this, t(this, Z), r, "header")), (o = this.querySelector(`${n} .ng-virtual-spacer`)) == null || o.before(t(this, xt).call(this, t(this, Z), r, "body")), (a = this.querySelector(`${n} .ng-part-footer`)) == null || a.appendChild(t(this, xt).call(this, t(this, Z), r, "footer"));
987
987
  });
988
988
  }, "#renderSplitContainers"));
989
989
  d(this, fe, /* @__PURE__ */ h(() => {
@@ -1246,7 +1246,7 @@ const Tt = class Tt extends HTMLElement {
1246
1246
  this.innerHTML = "", q.log("NineTableSheet destroyed.");
1247
1247
  }
1248
1248
  };
1249
- he = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), Bt = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), xt = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), h(Tt, "NineTableSheet"), E(Tt, "SCROLLBAR_SIZE", 16);
1249
+ he = new WeakMap(), Z = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), Bt = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), xt = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), h(Tt, "NineTableSheet"), E(Tt, "SCROLLBAR_SIZE", 16);
1250
1250
  let Gt = Tt;
1251
1251
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Gt);
1252
1252
  var be, Pt;
@@ -1473,7 +1473,7 @@ const cs = class cs {
1473
1473
  };
1474
1474
  jt = new WeakMap(), wt = new WeakMap(), h(cs, "ngRow");
1475
1475
  let Oe = cs;
1476
- var D, L, z, vt, me, Z, xe, ft, Vt, we, ve, St;
1476
+ var D, L, z, vt, me, J, xe, ft, Vt, we, ve, St;
1477
1477
  const P = class P {
1478
1478
  constructor(s, e) {
1479
1479
  d(this, D);
@@ -1481,15 +1481,15 @@ const P = class P {
1481
1481
  d(this, z, []);
1482
1482
  d(this, vt, []);
1483
1483
  d(this, me, 0);
1484
- d(this, Z, []);
1484
+ d(this, J, []);
1485
1485
  d(this, xe, /* @__PURE__ */ h(() => {
1486
- y(this, Z, []);
1486
+ y(this, J, []);
1487
1487
  const s = t(this, D).template || [];
1488
1488
  Array.from(s).forEach((e) => {
1489
1489
  var n;
1490
- t(this, Z).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1490
+ t(this, J).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1491
1491
  }), (t(this, L).rawRecords || []).forEach((e) => {
1492
- e.__ng || (e.__ng = t(this, Vt).call(this)), e.__ng.height = t(this, Z).slice();
1492
+ e.__ng || (e.__ng = t(this, Vt).call(this)), e.__ng.height = t(this, J).slice();
1493
1493
  });
1494
1494
  }, "#initialize"));
1495
1495
  d(this, ft, /* @__PURE__ */ h(() => {
@@ -1518,10 +1518,10 @@ const P = class P {
1518
1518
  rowState: P.ROW_STATE.EMPTY,
1519
1519
  deleted: !1,
1520
1520
  filtered: !1,
1521
- height: t(this, Z).slice(),
1521
+ height: t(this, J).slice(),
1522
1522
  o: {},
1523
1523
  c: {},
1524
- _: [0, 0, 0, 0, P.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Z).slice(), -1, {}, {}]
1524
+ _: [0, 0, 0, 0, P.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, J).slice(), -1, {}, {}]
1525
1525
  }), "#getDefaultMeta"));
1526
1526
  E(this, "reset", /* @__PURE__ */ h(() => {
1527
1527
  y(this, z, []), y(this, vt, []), t(this, ft).call(this);
@@ -1616,7 +1616,7 @@ const P = class P {
1616
1616
  return this.length;
1617
1617
  }
1618
1618
  };
1619
- D = new WeakMap(), L = new WeakMap(), z = new WeakMap(), vt = new WeakMap(), me = new WeakMap(), Z = new WeakMap(), xe = new WeakMap(), ft = new WeakMap(), Vt = new WeakMap(), we = new WeakMap(), ve = new WeakMap(), St = new WeakMap(), h(P, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1619
+ D = new WeakMap(), L = new WeakMap(), z = new WeakMap(), vt = new WeakMap(), me = new WeakMap(), J = new WeakMap(), xe = new WeakMap(), ft = new WeakMap(), Vt = new WeakMap(), we = new WeakMap(), ve = new WeakMap(), St = new WeakMap(), h(P, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1620
1620
  E(P, "ROW_STATE", {
1621
1621
  EMPTY: "EMPTY",
1622
1622
  NORMAL: "NORMAL",
@@ -1879,7 +1879,7 @@ const gs = class gs extends Fe {
1879
1879
  };
1880
1880
  h(gs, "EditableCellElement");
1881
1881
  let je = gs;
1882
- var Xt, bt, At, Et, Ee, J, ts;
1882
+ var Xt, bt, At, Et, Ee, Q, ts;
1883
1883
  const bs = class bs extends je {
1884
1884
  constructor() {
1885
1885
  super();
@@ -1888,7 +1888,7 @@ const bs = class bs extends je {
1888
1888
  d(this, At);
1889
1889
  d(this, Et);
1890
1890
  d(this, Ee);
1891
- d(this, J);
1891
+ d(this, Q);
1892
1892
  E(this, "refresh", /* @__PURE__ */ h(() => {
1893
1893
  const e = super.refresh();
1894
1894
  t(this, Xt).value = e;
@@ -1927,18 +1927,18 @@ const bs = class bs extends je {
1927
1927
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1928
1928
  if (t(this, bt) == "number") {
1929
1929
  let i = [];
1930
- if (t(this, J) && Number(t(this, J)) > 0 && i.push("."), t(this, Et) && Number(t(this, Et)) >= 0 && i.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !i.includes(e.key) && e.preventDefault(), t(this, J) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1930
+ if (t(this, Q) && Number(t(this, Q)) > 0 && i.push("."), t(this, Et) && Number(t(this, Et)) >= 0 && i.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !i.includes(e.key) && e.preventDefault(), t(this, Q) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1931
1931
  var n = e.target.value, r = n.indexOf(".");
1932
1932
  if (r >= 0) {
1933
1933
  var n = n.substr(r + 1, n.length);
1934
- n.length >= Number(t(this, J)) && e.preventDefault();
1934
+ n.length >= Number(t(this, Q)) && e.preventDefault();
1935
1935
  }
1936
1936
  }
1937
1937
  }
1938
1938
  t(this, At) && ninegrid.getByteLength(e.target.value) >= Number(t(this, At)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1939
1939
  }
1940
1940
  }, "#onKeyDown"));
1941
- if (this.applyBaseStyle(), y(this, bt, this.getAttribute("type") || "text"), y(this, At, this.getAttribute("maxbyte")), y(this, Et, this.getAttribute("min")), y(this, Ee, this.getAttribute("max")), y(this, J, this.getAttribute("scale")), !["text", "number"].includes(t(this, bt))) throw `invalid type : ${t(this, bt)}`;
1941
+ if (this.applyBaseStyle(), y(this, bt, this.getAttribute("type") || "text"), y(this, At, this.getAttribute("maxbyte")), y(this, Et, this.getAttribute("min")), y(this, Ee, this.getAttribute("max")), y(this, Q, this.getAttribute("scale")), !["text", "number"].includes(t(this, bt))) throw `invalid type : ${t(this, bt)}`;
1942
1942
  }
1943
1943
  connectedCallback() {
1944
1944
  for (var e = [], n = 0; n < this.attributes.length; n++)
@@ -1951,7 +1951,7 @@ const bs = class bs extends je {
1951
1951
  `, super.connectedCallback(), y(this, Xt, this.querySelector("input"));
1952
1952
  }
1953
1953
  };
1954
- Xt = new WeakMap(), bt = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), Ee = new WeakMap(), J = new WeakMap(), ts = new WeakMap(), h(bs, "CellInputText");
1954
+ Xt = new WeakMap(), bt = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), Ee = new WeakMap(), Q = new WeakMap(), ts = new WeakMap(), h(bs, "CellInputText");
1955
1955
  let Ve = bs;
1956
1956
  customElements.get("cell-input-text");
1957
1957
  customElements.get("cell-input") || customElements.define("cell-input", Ve);