@ninebone/table 0.0.364 β†’ 0.0.366

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, N, P, Y, vt, V, wt;
26
+ var _, W, y, D, N, P, vt, Y, 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);
33
34
  c(this, N);
34
35
  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, Y, new ResizeObserver(() => {
39
+ e && (b(this, P, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, Y).observe(e));
41
+ })), t(this, P).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, V, /* @__PURE__ */ a((e) => {
64
+ c(this, Y, /* @__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, N)), clearInterval(t(this, P));
78
+ clearInterval(t(this, D)), clearInterval(t(this, N));
79
79
  const r = parseInt(t(this, y).thumb.style.left || 0, 10);
80
- t(this, V).call(this, r + o), b(this, N, setInterval(() => {
81
- clearInterval(t(this, N)), b(this, P, setInterval(() => {
80
+ t(this, Y).call(this, r + o), b(this, D, setInterval(() => {
81
+ clearInterval(t(this, D)), b(this, N, setInterval(() => {
82
82
  const n = parseInt(t(this, y).thumb.style.left || 0, 10);
83
- t(this, V).call(this, n + o) || clearInterval(t(this, P));
83
+ t(this, Y).call(this, n + o) || clearInterval(t(this, N));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
- clearInterval(t(this, N)), clearInterval(t(this, P));
87
+ clearInterval(t(this, D)), clearInterval(t(this, N));
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, V).call(this, o.clientX - r.left - n / 2);
99
+ t(this, Y).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, V).call(this, l.clientX - h.left - this.shiftX);
106
+ t(this, Y).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, Y) && t(this, Y).disconnect();
198
+ t(this, P) && t(this, P).disconnect();
199
199
  }
200
200
  };
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");
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");
202
202
  let Ft = oe;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ft);
204
- var X, O, w, rt, lt, St;
204
+ var V, O, w, rt, lt, St;
205
205
  const re = class re extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- c(this, X);
208
+ c(this, V);
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, X) || !t(this, w) || t(this, O)) return;
217
+ if (!t(this, V) || !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, X, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, X)) return;
273
+ if (b(this, V, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, V)) 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, X).querySelector(".ng-container-body");
338
+ const s = t(this, V).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
- X = new WeakMap(), O = new WeakMap(), w = new WeakMap(), rt = new WeakMap(), lt = new WeakMap(), St = new WeakMap(), a(re, "NineTableVScrollBar");
354
+ V = 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 z, v, M, A, B, U, at, J, Rt, At, qt, ct, ht, Tt, kt, dt, Lt, Q, ft;
428
+ var X, v, M, A, z, 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, z);
431
+ c(this, X);
432
432
  c(this, v);
433
433
  c(this, M, /* @__PURE__ */ new Map());
434
434
  c(this, A, null);
435
- c(this, B, null);
435
+ c(this, z, null);
436
436
  c(this, U, 0);
437
437
  c(this, at, 40);
438
438
  c(this, J, !1);
@@ -502,17 +502,16 @@ 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, z).data.get() || [], s = e.length > 0 ? e.length : 100, o = t(this, A), r = s * o;
505
+ const e = t(this, X).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;
513
512
  if (t(this, U) > 0 && t(this, A) > 0) {
514
- const s = Math.ceil(t(this, U) / t(this, A));
515
- b(this, at, Math.min(e, s + t(this, Rt)));
513
+ const i = Math.ceil(t(this, U) / t(this, A));
514
+ b(this, at, i + t(this, Rt));
516
515
  }
517
516
  }, "#updateRowCount"));
518
517
  c(this, Tt, /* @__PURE__ */ a(() => {
@@ -530,7 +529,7 @@ const le = class le {
530
529
  }
531
530
  }, "#syncRowHeights"));
532
531
  c(this, kt, /* @__PURE__ */ a(() => {
533
- !t(this, v) || !(t(this, v) instanceof HTMLElement) || (b(this, B, new ResizeObserver((i) => {
532
+ !t(this, v) || !(t(this, v) instanceof HTMLElement) || (b(this, z, new ResizeObserver((i) => {
534
533
  for (const e of i) {
535
534
  const s = e.target;
536
535
  if (!s.classList.contains("active")) continue;
@@ -543,7 +542,7 @@ const le = class le {
543
542
  t(this, U) !== l && (b(this, U, l), t(this, ht).call(this), t(this, A) !== null && t(this, dt).call(this));
544
543
  }
545
544
  }
546
- })), t(this, B).observe(t(this, v)));
545
+ })), t(this, z).observe(t(this, v)));
547
546
  }, "#initResizeObserver"));
548
547
  c(this, dt, /* @__PURE__ */ a(() => {
549
548
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
@@ -560,7 +559,7 @@ const le = class le {
560
559
  if (!o) return;
561
560
  const r = Array.from(o.querySelectorAll("tr:not(.nodata)")), n = ((l = t(this, M).get(e)) == null ? void 0 : l.length) || 1;
562
561
  r.forEach((h, d) => {
563
- const f = i + Math.floor(d / n), u = t(this, z).data.get(f);
562
+ const f = i + Math.floor(d / n), u = t(this, X).data.get(f);
564
563
  h.style.display = "", t(this, ft).call(this, h, u, f);
565
564
  });
566
565
  });
@@ -576,7 +575,7 @@ const le = class le {
576
575
  const h = l.querySelector("tbody.bindable-tbody");
577
576
  if (!h) return;
578
577
  Array.from(h.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
579
- const g = s + Math.floor(u / o), p = t(this, z).data.get(g);
578
+ const g = s + Math.floor(u / o), p = t(this, X).data.get(g);
580
579
  f.style.display = "", t(this, ft).call(this, f, p, g);
581
580
  });
582
581
  }), t(this, J) || (b(this, J, !0), setTimeout(() => {
@@ -590,9 +589,9 @@ const le = class le {
590
589
  });
591
590
  }, "#bindRowData"));
592
591
  x(this, "destroy", /* @__PURE__ */ a(() => {
593
- t(this, B) && (t(this, B).disconnect(), b(this, B, null));
592
+ t(this, z) && (t(this, z).disconnect(), b(this, z, null));
594
593
  }, "destroy"));
595
- b(this, z, i.getRootNode().host), b(this, v, i), t(this, kt).call(this);
594
+ b(this, X, i.getRootNode().host), b(this, v, i), t(this, kt).call(this);
596
595
  }
597
596
  getRowHeight() {
598
597
  return t(this, A);
@@ -602,7 +601,7 @@ const le = class le {
602
601
  return ((e = t(this, M).get(i)) == null ? void 0 : e.length) || 1;
603
602
  }
604
603
  };
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");
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");
606
605
  let Zt = le;
607
606
  var Ht, tt, F, Ct, _t, Mt, It, $t;
608
607
  const ot = class ot extends HTMLElement {
@@ -1043,7 +1042,7 @@ const he = class he {
1043
1042
  };
1044
1043
  gt = new WeakMap(), et = new WeakMap(), a(he, "ngRow");
1045
1044
  let Qt = he;
1046
- var T, S, k, it, Bt, D, Dt, j, yt, Nt, Pt, st;
1045
+ var T, S, k, it, Bt, B, Dt, j, yt, Nt, Pt, st;
1047
1046
  const L = class L {
1048
1047
  constructor(i, e) {
1049
1048
  c(this, T);
@@ -1051,15 +1050,15 @@ const L = class L {
1051
1050
  c(this, k, []);
1052
1051
  c(this, it, []);
1053
1052
  c(this, Bt, 0);
1054
- c(this, D, []);
1053
+ c(this, B, []);
1055
1054
  c(this, Dt, /* @__PURE__ */ a(() => {
1056
- b(this, D, []);
1055
+ b(this, B, []);
1057
1056
  const i = t(this, T).template || [];
1058
1057
  Array.from(i).forEach((e) => {
1059
1058
  var s;
1060
- t(this, D).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1059
+ t(this, B).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1061
1060
  }), (t(this, S).rawRecords || []).forEach((e) => {
1062
- e.__ng || (e.__ng = t(this, yt).call(this)), e.__ng.height = t(this, D).slice();
1061
+ e.__ng || (e.__ng = t(this, yt).call(this)), e.__ng.height = t(this, B).slice();
1063
1062
  });
1064
1063
  }, "#initialize"));
1065
1064
  c(this, j, /* @__PURE__ */ a(() => {
@@ -1087,10 +1086,10 @@ const L = class L {
1087
1086
  rowState: L.ROW_STATE.EMPTY,
1088
1087
  deleted: !1,
1089
1088
  filtered: !1,
1090
- height: t(this, D).slice(),
1089
+ height: t(this, B).slice(),
1091
1090
  o: {},
1092
1091
  c: {},
1093
- _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, D).slice(), -1, {}, {}]
1092
+ _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, B).slice(), -1, {}, {}]
1094
1093
  }), "#getDefaultMeta"));
1095
1094
  x(this, "reset", /* @__PURE__ */ a(() => {
1096
1095
  b(this, k, []), b(this, it, []), t(this, j).call(this);
@@ -1182,7 +1181,7 @@ const L = class L {
1182
1181
  return this.length;
1183
1182
  }
1184
1183
  };
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"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
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"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1186
1185
  x(L, "ROW_STATE", {
1187
1186
  EMPTY: "EMPTY",
1188
1187
  NORMAL: "NORMAL",