@ninebone/table 0.0.221 → 0.0.222

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,28 +23,28 @@ const Te = class Te extends ze.constructor {
23
23
  a(Te, "Trace");
24
24
  let pe = Te;
25
25
  const G = new pe();
26
- var k, z, y, B, D, N, ie, P, se;
26
+ var L, z, y, B, D, N, ie, P, se;
27
27
  const Ae = class Ae extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- f(this, k);
30
+ f(this, L);
31
31
  f(this, z, !1);
32
32
  f(this, y);
33
33
  f(this, B);
34
34
  f(this, D);
35
35
  f(this, N);
36
36
  f(this, ie, /* @__PURE__ */ a(() => {
37
- if (!e(this, k)) return;
38
- const t = e(this, k).querySelector(".ng-container-body");
37
+ if (!e(this, L)) return;
38
+ const t = e(this, L).querySelector(".ng-container-body");
39
39
  t && (p(this, N, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), e(this, N).observe(t));
42
42
  }, "#observeResize"));
43
43
  x(this, "refresh", /* @__PURE__ */ a(() => {
44
- if (!e(this, k) || !e(this, y) || e(this, z)) return;
44
+ if (!e(this, L) || !e(this, y) || e(this, z)) return;
45
45
  const t = e(this, y).container, s = t.querySelector("table");
46
46
  if (!s) return;
47
- const n = e(this, y).track, r = e(this, y).thumb, o = e(this, k).querySelector(".ng-container-bottom"), c = t.clientWidth, d = s.scrollWidth;
47
+ const n = e(this, y).track, r = e(this, y).thumb, o = e(this, L).querySelector(".ng-container-bottom"), c = t.clientWidth, d = s.scrollWidth;
48
48
  if (c !== 0 && d > c)
49
49
  o && (o.style.display = "flex");
50
50
  else {
@@ -113,7 +113,7 @@ const Ae = class Ae extends HTMLElement {
113
113
  }, "#init"));
114
114
  }
115
115
  connectedCallback() {
116
- if (p(this, k, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, k)) return;
116
+ if (p(this, L, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, L)) return;
117
117
  this.innerHTML = `
118
118
  <style>
119
119
  nine-table-hscrollbar {
@@ -178,7 +178,7 @@ const Ae = class Ae extends HTMLElement {
178
178
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
179
179
  `;
180
180
  const t = /* @__PURE__ */ a(() => {
181
- const s = e(this, k).querySelector(".ng-container-body");
181
+ const s = e(this, L).querySelector(".ng-container-body");
182
182
  if (!s) {
183
183
  setTimeout(t, 10);
184
184
  return;
@@ -197,7 +197,7 @@ const Ae = class Ae extends HTMLElement {
197
197
  e(this, N) && e(this, N).disconnect();
198
198
  }
199
199
  };
200
- k = new WeakMap(), z = new WeakMap(), y = new WeakMap(), B = new WeakMap(), D = new WeakMap(), N = new WeakMap(), ie = new WeakMap(), P = new WeakMap(), se = new WeakMap(), a(Ae, "NineTableHScrollBar");
200
+ L = new WeakMap(), z = new WeakMap(), y = new WeakMap(), B = new WeakMap(), D = new WeakMap(), N = new WeakMap(), ie = new WeakMap(), P = new WeakMap(), se = new WeakMap(), a(Ae, "NineTableHScrollBar");
201
201
  let ye = Ae;
202
202
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ye);
203
203
  var V, C, E, $, H, M, ne, re;
@@ -463,6 +463,15 @@ const j = class j extends HTMLElement {
463
463
  overflow-x: auto;
464
464
  background: #ffffff;
465
465
  position: relative;
466
+
467
+ /* 웹킷 브라우저(Chrome, Safari) 스크롤바 투명화 */
468
+ &::-webkit-scrollbar {
469
+ display: none;
470
+ height: 0px;
471
+ }
472
+
473
+ /* 파이어폭스 스크롤바 숨기기 */
474
+ scrollbar-width: none;
466
475
  }
467
476
 
468
477
  nine-table-sheet .ng-container-right {
@@ -546,7 +555,7 @@ I = new WeakMap(), X = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), a(
546
555
  let te = j;
547
556
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", te);
548
557
  var ae, J;
549
- const Le = class Le extends HTMLElement {
558
+ const ke = class ke extends HTMLElement {
550
559
  constructor() {
551
560
  super();
552
561
  f(this, ae, /* @__PURE__ */ a(() => {
@@ -593,11 +602,11 @@ const Le = class Le extends HTMLElement {
593
602
  e(this, ae).call(this);
594
603
  }
595
604
  };
596
- ae = new WeakMap(), J = new WeakMap(), a(Le, "NineTableSheets");
597
- let we = Le;
605
+ ae = new WeakMap(), J = new WeakMap(), a(ke, "NineTableSheets");
606
+ let we = ke;
598
607
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", we);
599
608
  var R, ce, Q, he;
600
- const ke = class ke {
609
+ const Le = class Le {
601
610
  constructor(i) {
602
611
  f(this, R);
603
612
  f(this, ce, /* @__PURE__ */ a(() => {
@@ -727,8 +736,8 @@ const ke = class ke {
727
736
  p(this, R, i), e(this, ce).call(this);
728
737
  }
729
738
  };
730
- R = new WeakMap(), ce = new WeakMap(), Q = new WeakMap(), he = new WeakMap(), a(ke, "LayoutManager");
731
- let ve = ke;
739
+ R = new WeakMap(), ce = new WeakMap(), Q = new WeakMap(), he = new WeakMap(), a(Le, "LayoutManager");
740
+ let ve = Le;
732
741
  var W, F;
733
742
  const Ce = class Ce {
734
743
  constructor(i) {
@@ -753,7 +762,7 @@ const Ce = class Ce {
753
762
  W = new WeakMap(), F = new WeakMap(), a(Ce, "ngRow");
754
763
  let xe = Ce;
755
764
  var A, v, q, K, de, O, fe, ee, ue, ge, Z;
756
- const L = class L {
765
+ const k = class k {
757
766
  constructor(i, t) {
758
767
  f(this, A);
759
768
  f(this, v);
@@ -775,13 +784,13 @@ const L = class L {
775
784
  this.clear(), this.add(i, !1);
776
785
  }, "set"));
777
786
  f(this, ee, /* @__PURE__ */ a(() => ({
778
- rowState: L.ROW_STATE.EMPTY,
787
+ rowState: k.ROW_STATE.EMPTY,
779
788
  deleted: !1,
780
789
  filtered: !1,
781
790
  height: e(this, O).slice(),
782
791
  o: {},
783
792
  c: {},
784
- _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, O).slice(), -1, {}, {}]
793
+ _: [0, 0, 0, 0, k.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, O).slice(), -1, {}, {}]
785
794
  }), "#getDefaultMeta"));
786
795
  x(this, "reset", /* @__PURE__ */ a(() => {
787
796
  p(this, q, []), p(this, K, []);
@@ -802,7 +811,7 @@ const L = class L {
802
811
  }), s;
803
812
  }, "#json2Array"));
804
813
  f(this, ge, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
805
- t.__ng = e(this, ee).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = L.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
814
+ t.__ng = e(this, ee).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
806
815
  }), i), "#defaultInsert"));
807
816
  x(this, "add", /* @__PURE__ */ a((i, t = !0) => {
808
817
  var r;
@@ -812,7 +821,7 @@ const L = class L {
812
821
  const n = this.count() - 1;
813
822
  return t || s.forEach((o, c) => {
814
823
  const d = e(this, v).rawRecords[n - c];
815
- d && (d.__ng.rowState = L.ROW_STATE.EMPTY);
824
+ d && (d.__ng.rowState = k.ROW_STATE.EMPTY);
816
825
  }), (r = e(this, v).viewRecords) != null && r.reset && e(this, v).viewRecords.reset(), n;
817
826
  }, "add"));
818
827
  x(this, "delete", /* @__PURE__ */ a((i) => {
@@ -821,8 +830,8 @@ const L = class L {
821
830
  Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this, v).owner.row.at] : t = [parseInt(i, 10)], t.sort((n, r) => r - n).forEach((n) => {
822
831
  if (e(this, q)[n]) {
823
832
  const r = e(this, q)[n].__ng.rowid;
824
- e(this, q)[n].__ng.rowState === L.ROW_STATE.INSERT ? e(this, v).rawRecords = e(this, v).rawRecords.filter((o) => o.__ng.rowid !== r) : e(this, v).rawRecords.forEach((o) => {
825
- o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = L.ROW_STATE.DELETE);
833
+ e(this, q)[n].__ng.rowState === k.ROW_STATE.INSERT ? e(this, v).rawRecords = e(this, v).rawRecords.filter((o) => o.__ng.rowid !== r) : e(this, v).rawRecords.forEach((o) => {
834
+ o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = k.ROW_STATE.DELETE);
826
835
  });
827
836
  }
828
837
  }), this.resetRecords(), (s = e(this, v).viewRecords) != null && s.reset && e(this, v).viewRecords.reset();
@@ -835,7 +844,7 @@ const L = class L {
835
844
  const o = this.getValidData()[i];
836
845
  if (!o) return;
837
846
  const c = o.v[r];
838
- c !== s && o.__ng.rowState !== L.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = c), o.__ng.rowState = L.ROW_STATE.UPDATE), o.v[r] = s, e(this, v).owner.refreshData && e(this, v).owner.refreshData(i);
847
+ c !== s && o.__ng.rowState !== k.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = c), o.__ng.rowState = k.ROW_STATE.UPDATE), o.v[r] = s, e(this, v).owner.refreshData && e(this, v).owner.refreshData(i);
839
848
  }, "setValue"));
840
849
  x(this, "resetRecords", /* @__PURE__ */ a(() => {
841
850
  p(this, K, e(this, v).rawRecords.filter((i) => !i.__ng.deleted)), p(this, q, e(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, v).rawRecords.forEach((i, t) => {
@@ -888,15 +897,15 @@ const L = class L {
888
897
  return this.length;
889
898
  }
890
899
  };
891
- A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), K = new WeakMap(), de = new WeakMap(), O = new WeakMap(), fe = new WeakMap(), ee = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), Z = new WeakMap(), a(L, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
892
- x(L, "ROW_STATE", {
900
+ A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), K = new WeakMap(), de = new WeakMap(), O = new WeakMap(), fe = new WeakMap(), ee = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), Z = new WeakMap(), a(k, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
901
+ x(k, "ROW_STATE", {
893
902
  EMPTY: "EMPTY",
894
903
  NORMAL: "NORMAL",
895
904
  INSERT: "INSERT",
896
905
  UPDATE: "UPDATE",
897
906
  DELETE: "DELETE"
898
907
  });
899
- let Re = L;
908
+ let Re = k;
900
909
  const _e = class _e {
901
910
  constructor(i) {
902
911
  this.owner = i, this.row = new xe(this), this.data = new Re(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {