@ninebone/table 0.0.360 β†’ 0.0.362

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.
@@ -23,22 +23,22 @@ const ne = class ne extends xe.constructor {
23
23
  a(ne, "Trace");
24
24
  let Ut = ne;
25
25
  const I = new Ut();
26
- var _, W, y, D, N, P, vt, Y, wt;
26
+ var _, W, y, N, P, Y, vt, V, wt;
27
27
  const oe = class oe extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  c(this, _);
31
31
  c(this, W, !1);
32
32
  c(this, y);
33
- c(this, D);
34
33
  c(this, N);
35
34
  c(this, P);
35
+ c(this, Y);
36
36
  c(this, vt, /* @__PURE__ */ a(() => {
37
37
  if (!t(this, _)) return;
38
38
  const e = t(this, _).querySelector(".ng-container-body");
39
- e && (b(this, P, new ResizeObserver(() => {
39
+ e && (b(this, Y, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, P).observe(e));
41
+ })), t(this, Y).observe(e));
42
42
  }, "#observeResize"));
43
43
  x(this, "refresh", /* @__PURE__ */ a(() => {
44
44
  if (!t(this, _) || !t(this, y) || t(this, W)) return;
@@ -61,7 +61,7 @@ const oe = class oe extends HTMLElement {
61
61
  const E = d - f;
62
62
  p > E && (p = E), r.style.left = `${p}px`, I.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= E - 1;
63
63
  }, "refresh"));
64
- c(this, Y, /* @__PURE__ */ a((e) => {
64
+ c(this, V, /* @__PURE__ */ a((e) => {
65
65
  if (!t(this, y)) return !1;
66
66
  const s = t(this, y).container, o = s.querySelector("table");
67
67
  if (!o) return !1;
@@ -75,16 +75,16 @@ const oe = class oe extends HTMLElement {
75
75
  }, "#thumbMoveTo"));
76
76
  c(this, wt, /* @__PURE__ */ a(() => {
77
77
  const e = /* @__PURE__ */ a((o) => {
78
- clearInterval(t(this, D)), clearInterval(t(this, N));
78
+ clearInterval(t(this, N)), clearInterval(t(this, P));
79
79
  const r = parseInt(t(this, y).thumb.style.left || 0, 10);
80
- t(this, Y).call(this, r + o), b(this, D, setInterval(() => {
81
- clearInterval(t(this, D)), b(this, N, setInterval(() => {
80
+ t(this, V).call(this, r + o), b(this, N, setInterval(() => {
81
+ clearInterval(t(this, N)), b(this, P, setInterval(() => {
82
82
  const n = parseInt(t(this, y).thumb.style.left || 0, 10);
83
- t(this, Y).call(this, n + o) || clearInterval(t(this, N));
83
+ t(this, V).call(this, n + o) || clearInterval(t(this, P));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
- clearInterval(t(this, D)), clearInterval(t(this, N));
87
+ clearInterval(t(this, N)), clearInterval(t(this, P));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
90
  t(this, y).left.addEventListener(o, s), t(this, y).right.addEventListener(o, s), t(this, y).track.addEventListener(o, s);
@@ -96,14 +96,14 @@ const oe = class oe extends HTMLElement {
96
96
  if (o.button !== 0) return;
97
97
  o.preventDefault();
98
98
  const r = t(this, y).track.getBoundingClientRect(), n = t(this, y).thumb.clientWidth;
99
- t(this, Y).call(this, o.clientX - r.left - n / 2);
99
+ t(this, V).call(this, o.clientX - r.left - n / 2);
100
100
  }), t(this, y).thumb.addEventListener("mousedown", (o) => {
101
101
  if (o.button !== 0) return;
102
102
  o.stopPropagation(), o.preventDefault(), b(this, W, !0), this.shiftX = o.clientX - t(this, y).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ a((l) => {
104
104
  if (!t(this, W)) return;
105
105
  const h = t(this, y).track.getBoundingClientRect();
106
- t(this, Y).call(this, l.clientX - h.left - this.shiftX);
106
+ t(this, V).call(this, l.clientX - h.left - this.shiftX);
107
107
  }, "onMouseMove"), n = /* @__PURE__ */ a(() => {
108
108
  b(this, W, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
109
109
  }, "onMouseUp");
@@ -195,17 +195,17 @@ const oe = class oe extends HTMLElement {
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, P) && t(this, P).disconnect();
198
+ t(this, Y) && t(this, Y).disconnect();
199
199
  }
200
200
  };
201
- _ = new WeakMap(), W = new WeakMap(), y = new WeakMap(), D = new WeakMap(), N = new WeakMap(), P = new WeakMap(), vt = new WeakMap(), Y = new WeakMap(), wt = new WeakMap(), a(oe, "NineTableHScrollBar");
201
+ _ = new WeakMap(), W = new WeakMap(), y = new WeakMap(), N = new WeakMap(), P = new WeakMap(), Y = new WeakMap(), vt = new WeakMap(), V = new WeakMap(), wt = new WeakMap(), a(oe, "NineTableHScrollBar");
202
202
  let Ft = oe;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ft);
204
- var V, O, w, rt, lt, St;
204
+ var X, O, w, rt, lt, St;
205
205
  const re = class re extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- c(this, V);
208
+ c(this, X);
209
209
  c(this, O, !1);
210
210
  c(this, w);
211
211
  c(this, rt, 0);
@@ -214,7 +214,7 @@ const re = class re extends HTMLElement {
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
216
  x(this, "refresh", /* @__PURE__ */ a(() => {
217
- if (!t(this, V) || !t(this, w) || t(this, O)) return;
217
+ if (!t(this, X) || !t(this, w) || t(this, O)) return;
218
218
  const e = t(this, w).container, s = e.querySelector("table");
219
219
  if (!s) return;
220
220
  const o = t(this, w).track, r = t(this, w).thumb, n = e.clientHeight, l = s.scrollHeight;
@@ -270,7 +270,7 @@ const re = class re extends HTMLElement {
270
270
  }, "#init"));
271
271
  }
272
272
  connectedCallback() {
273
- if (b(this, V, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, V)) return;
273
+ if (b(this, X, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, X)) return;
274
274
  this.innerHTML = `
275
275
  <style>
276
276
  nine-table-vscrollbar {
@@ -335,7 +335,7 @@ const re = class re extends HTMLElement {
335
335
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
336
336
  `;
337
337
  const e = /* @__PURE__ */ a(() => {
338
- const s = t(this, V).querySelector(".ng-container-body");
338
+ const s = t(this, X).querySelector(".ng-container-body");
339
339
  if (!s) {
340
340
  setTimeout(e, 10);
341
341
  return;
@@ -351,7 +351,7 @@ const re = class re extends HTMLElement {
351
351
  e();
352
352
  }
353
353
  };
354
- V = new WeakMap(), O = new WeakMap(), w = new WeakMap(), rt = new WeakMap(), lt = new WeakMap(), St = new WeakMap(), a(re, "NineTableVScrollBar");
354
+ X = new WeakMap(), O = new WeakMap(), w = new WeakMap(), rt = new WeakMap(), lt = new WeakMap(), St = new WeakMap(), a(re, "NineTableVScrollBar");
355
355
  let jt = re;
356
356
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", jt);
357
357
  var Et, G;
@@ -425,14 +425,14 @@ Et = new WeakMap(), G = new WeakMap(), a(C, "TableCompiler"), c(C, Et, /* @__PUR
425
425
  });
426
426
  }, "#resetColIndex"));
427
427
  let Kt = C;
428
- var X, v, M, A, z, U, at, J, Rt, At, qt, ct, ht, Tt, kt, dt, Lt, Q, ft;
428
+ var z, v, M, A, B, U, at, J, Rt, At, qt, ct, ht, Tt, kt, dt, Lt, Q, ft;
429
429
  const le = class le {
430
430
  constructor(i) {
431
- c(this, X);
431
+ c(this, z);
432
432
  c(this, v);
433
433
  c(this, M, /* @__PURE__ */ new Map());
434
434
  c(this, A, null);
435
- c(this, z, null);
435
+ c(this, B, null);
436
436
  c(this, U, 0);
437
437
  c(this, at, 40);
438
438
  c(this, J, !1);
@@ -502,16 +502,17 @@ const le = class le {
502
502
  }, "#measureAndCacheHeight"));
503
503
  c(this, ct, /* @__PURE__ */ a(() => {
504
504
  if (!t(this, v).querySelector(".ng-container-body")) return;
505
- const e = t(this, X).data.get() || [], s = e.length > 0 ? e.length : 100, o = t(this, A), r = s * o;
505
+ const e = t(this, z).data.get() || [], s = e.length > 0 ? e.length : 100, o = t(this, A), r = s * o;
506
506
  I.log(":", s, r), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
507
507
  const l = t(this, v).querySelector(n), h = l == null ? void 0 : l.querySelector("table");
508
508
  h && (h.style.height = `${r}px`);
509
509
  });
510
510
  }, "#updateVirtualScrollHeight"));
511
511
  c(this, ht, /* @__PURE__ */ a(() => {
512
+ const i = t(this, z).data.get() || [], e = i.length > 0 ? i.length : 100;
512
513
  if (t(this, U) > 0 && t(this, A) > 0) {
513
- const i = Math.ceil(t(this, U) / t(this, A));
514
- b(this, at, i + t(this, Rt));
514
+ const s = Math.ceil(t(this, U) / t(this, A));
515
+ b(this, at, Math.min(e, s + t(this, Rt)));
515
516
  }
516
517
  }, "#updateRowCount"));
517
518
  c(this, Tt, /* @__PURE__ */ a(() => {
@@ -529,7 +530,7 @@ const le = class le {
529
530
  }
530
531
  }, "#syncRowHeights"));
531
532
  c(this, kt, /* @__PURE__ */ a(() => {
532
- !t(this, v) || !(t(this, v) instanceof HTMLElement) || (b(this, z, new ResizeObserver((i) => {
533
+ !t(this, v) || !(t(this, v) instanceof HTMLElement) || (b(this, B, new ResizeObserver((i) => {
533
534
  for (const e of i) {
534
535
  const s = e.target;
535
536
  if (!s.classList.contains("active")) continue;
@@ -542,7 +543,7 @@ const le = class le {
542
543
  t(this, U) !== l && (b(this, U, l), t(this, ht).call(this), t(this, A) !== null && t(this, dt).call(this));
543
544
  }
544
545
  }
545
- })), t(this, z).observe(t(this, v)));
546
+ })), t(this, B).observe(t(this, v)));
546
547
  }, "#initResizeObserver"));
547
548
  c(this, dt, /* @__PURE__ */ a(() => {
548
549
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
@@ -559,7 +560,7 @@ const le = class le {
559
560
  if (!o) return;
560
561
  const r = Array.from(o.querySelectorAll("tr:not(.nodata)")), n = ((l = t(this, M).get(e)) == null ? void 0 : l.length) || 1;
561
562
  r.forEach((h, d) => {
562
- const f = i + Math.floor(d / n), u = t(this, X).data.get(f);
563
+ const f = i + Math.floor(d / n), u = t(this, z).data.get(f);
563
564
  h.style.display = "", t(this, ft).call(this, h, u, f);
564
565
  });
565
566
  });
@@ -575,7 +576,7 @@ const le = class le {
575
576
  const h = l.querySelector("tbody.bindable-tbody");
576
577
  if (!h) return;
577
578
  Array.from(h.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
578
- const g = s + Math.floor(u / o), p = t(this, X).data.get(g);
579
+ const g = s + Math.floor(u / o), p = t(this, z).data.get(g);
579
580
  f.style.display = "", t(this, ft).call(this, f, p, g);
580
581
  });
581
582
  }), t(this, J) || (b(this, J, !0), setTimeout(() => {
@@ -589,9 +590,9 @@ const le = class le {
589
590
  });
590
591
  }, "#bindRowData"));
591
592
  x(this, "destroy", /* @__PURE__ */ a(() => {
592
- t(this, z) && (t(this, z).disconnect(), b(this, z, null));
593
+ t(this, B) && (t(this, B).disconnect(), b(this, B, null));
593
594
  }, "destroy"));
594
- b(this, X, i.getRootNode().host), b(this, v, i), t(this, kt).call(this);
595
+ b(this, z, i.getRootNode().host), b(this, v, i), t(this, kt).call(this);
595
596
  }
596
597
  getRowHeight() {
597
598
  return t(this, A);
@@ -601,7 +602,7 @@ const le = class le {
601
602
  return ((e = t(this, M).get(i)) == null ? void 0 : e.length) || 1;
602
603
  }
603
604
  };
604
- X = new WeakMap(), v = new WeakMap(), M = new WeakMap(), A = new WeakMap(), z = new WeakMap(), U = new WeakMap(), at = new WeakMap(), J = new WeakMap(), Rt = new WeakMap(), At = new WeakMap(), qt = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), dt = new WeakMap(), Lt = new WeakMap(), Q = new WeakMap(), ft = new WeakMap(), a(le, "RowManager");
605
+ z = new WeakMap(), v = new WeakMap(), M = new WeakMap(), A = new WeakMap(), B = new WeakMap(), U = new WeakMap(), at = new WeakMap(), J = new WeakMap(), Rt = new WeakMap(), At = new WeakMap(), qt = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), dt = new WeakMap(), Lt = new WeakMap(), Q = new WeakMap(), ft = new WeakMap(), a(le, "RowManager");
605
606
  let Zt = le;
606
607
  var Ht, tt, F, Ct, _t, Mt, It, $t;
607
608
  const ot = class ot extends HTMLElement {
@@ -1042,7 +1043,7 @@ const he = class he {
1042
1043
  };
1043
1044
  gt = new WeakMap(), et = new WeakMap(), a(he, "ngRow");
1044
1045
  let Qt = he;
1045
- var T, S, k, it, Bt, B, Dt, j, yt, Nt, Pt, st;
1046
+ var T, S, k, it, Bt, D, Dt, j, yt, Nt, Pt, st;
1046
1047
  const L = class L {
1047
1048
  constructor(i, e) {
1048
1049
  c(this, T);
@@ -1050,15 +1051,15 @@ const L = class L {
1050
1051
  c(this, k, []);
1051
1052
  c(this, it, []);
1052
1053
  c(this, Bt, 0);
1053
- c(this, B, []);
1054
+ c(this, D, []);
1054
1055
  c(this, Dt, /* @__PURE__ */ a(() => {
1055
- b(this, B, []);
1056
+ b(this, D, []);
1056
1057
  const i = t(this, T).template || [];
1057
1058
  Array.from(i).forEach((e) => {
1058
1059
  var s;
1059
- t(this, B).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1060
+ t(this, D).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1060
1061
  }), (t(this, S).rawRecords || []).forEach((e) => {
1061
- e.__ng || (e.__ng = t(this, yt).call(this)), e.__ng.height = t(this, B).slice();
1062
+ e.__ng || (e.__ng = t(this, yt).call(this)), e.__ng.height = t(this, D).slice();
1062
1063
  });
1063
1064
  }, "#initialize"));
1064
1065
  c(this, j, /* @__PURE__ */ a(() => {
@@ -1086,10 +1087,10 @@ const L = class L {
1086
1087
  rowState: L.ROW_STATE.EMPTY,
1087
1088
  deleted: !1,
1088
1089
  filtered: !1,
1089
- height: t(this, B).slice(),
1090
+ height: t(this, D).slice(),
1090
1091
  o: {},
1091
1092
  c: {},
1092
- _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, B).slice(), -1, {}, {}]
1093
+ _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, D).slice(), -1, {}, {}]
1093
1094
  }), "#getDefaultMeta"));
1094
1095
  x(this, "reset", /* @__PURE__ */ a(() => {
1095
1096
  b(this, k, []), b(this, it, []), t(this, j).call(this);
@@ -1181,7 +1182,7 @@ const L = class L {
1181
1182
  return this.length;
1182
1183
  }
1183
1184
  };
1184
- T = new WeakMap(), S = new WeakMap(), k = new WeakMap(), it = new WeakMap(), Bt = new WeakMap(), B = new WeakMap(), Dt = new WeakMap(), j = new WeakMap(), yt = new WeakMap(), Nt = new WeakMap(), Pt = new WeakMap(), st = new WeakMap(), a(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1185
+ T = new WeakMap(), S = new WeakMap(), k = new WeakMap(), it = new WeakMap(), Bt = new WeakMap(), D = new WeakMap(), Dt = new WeakMap(), j = new WeakMap(), yt = new WeakMap(), Nt = new WeakMap(), Pt = new WeakMap(), st = new WeakMap(), a(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1185
1186
  x(L, "ROW_STATE", {
1186
1187
  EMPTY: "EMPTY",
1187
1188
  NORMAL: "NORMAL",