@ninebone/table 0.0.438 β†’ 0.0.440

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.
@@ -1,50 +1,50 @@
1
- var ye = Object.defineProperty;
2
- var me = (v) => {
3
- throw TypeError(v);
1
+ var me = Object.defineProperty;
2
+ var xe = (x) => {
3
+ throw TypeError(x);
4
4
  };
5
- var we = (v, i, e) => i in v ? ye(v, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : v[i] = e;
6
- var c = (v, i) => ye(v, "name", { value: i, configurable: !0 });
7
- var x = (v, i, e) => we(v, typeof i != "symbol" ? i + "" : i, e), ve = (v, i, e) => i.has(v) || me("Cannot " + e);
8
- var t = (v, i, e) => (ve(v, i, "read from private field"), e ? e.call(v) : i.get(v)), d = (v, i, e) => i.has(v) ? me("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(v) : i.set(v, e), g = (v, i, e, n) => (ve(v, i, "write to private field"), n ? n.call(v, e) : i.set(v, e), e);
9
- var xe = (v, i, e, n) => ({
5
+ var Se = (x, i, e) => i in x ? me(x, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[i] = e;
6
+ var c = (x, i) => me(x, "name", { value: i, configurable: !0 });
7
+ var v = (x, i, e) => Se(x, typeof i != "symbol" ? i + "" : i, e), ve = (x, i, e) => i.has(x) || xe("Cannot " + e);
8
+ var t = (x, i, e) => (ve(x, i, "read from private field"), e ? e.call(x) : i.get(x)), d = (x, i, e) => i.has(x) ? xe("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), g = (x, i, e, n) => (ve(x, i, "write to private field"), n ? n.call(x, e) : i.set(x, e), e);
9
+ var we = (x, i, e, n) => ({
10
10
  set _(s) {
11
- g(v, i, s, e);
11
+ g(x, i, s, e);
12
12
  },
13
13
  get _() {
14
- return t(v, i, n);
14
+ return t(x, i, n);
15
15
  }
16
16
  });
17
- import { trace as Se } from "@ninebone/util";
18
- const re = class re extends Se.constructor {
17
+ import { trace as Ee } from "@ninebone/util";
18
+ const le = class le extends Ee.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- c(re, "Trace");
24
- let jt = re;
25
- const lt = new jt();
26
- var M, W, y, P, D, B, Et, Y, Rt;
27
- const le = class le extends HTMLElement {
23
+ c(le, "Trace");
24
+ let Kt = le;
25
+ const lt = new Kt();
26
+ var M, W, p, B, P, D, Et, Y, Rt;
27
+ const ae = class ae extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  d(this, M);
31
31
  d(this, W, !1);
32
- d(this, y);
32
+ d(this, p);
33
+ d(this, B);
33
34
  d(this, P);
34
35
  d(this, D);
35
- d(this, B);
36
36
  d(this, Et, /* @__PURE__ */ c(() => {
37
37
  if (!t(this, M)) return;
38
38
  const e = t(this, M).querySelector(".ng-container-body");
39
- e && (g(this, B, new ResizeObserver(() => {
39
+ e && (g(this, D, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, B).observe(e));
41
+ })), t(this, D).observe(e));
42
42
  }, "#observeResize"));
43
- x(this, "refresh", /* @__PURE__ */ c(() => {
44
- if (!t(this, M) || !t(this, y) || t(this, W)) return;
45
- const e = t(this, y).container, n = e.querySelector("table");
43
+ v(this, "refresh", /* @__PURE__ */ c(() => {
44
+ if (!t(this, M) || !t(this, p) || t(this, W)) return;
45
+ const e = t(this, p).container, n = e.querySelector("table");
46
46
  if (!n) return;
47
- const s = t(this, y).track, r = t(this, y).thumb, o = t(this, M).querySelector(".ng-container-bottom"), l = e.clientWidth, h = n.scrollWidth;
47
+ const s = t(this, p).track, r = t(this, p).thumb, o = t(this, M).querySelector(".ng-container-bottom"), l = e.clientWidth, h = n.scrollWidth;
48
48
  if (l !== 0 && h > l)
49
49
  o && (o.style.display = "flex");
50
50
  else {
@@ -56,53 +56,53 @@ const le = class le extends HTMLElement {
56
56
  const f = Math.max(Math.min(a * (l / h), a), 20);
57
57
  r.style.width = `${f}px`;
58
58
  const u = e.scrollLeft, b = h - l;
59
- let p = 0;
60
- b > 0 && (p = parseInt(u / b * (a - f), 10)), p < 0 && (p = 0);
59
+ let y = 0;
60
+ b > 0 && (y = parseInt(u / b * (a - f), 10)), y < 0 && (y = 0);
61
61
  const m = a - f;
62
- p > m && (p = m), r.style.left = `${p}px`, lt.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= m - 1;
62
+ y > m && (y = m), r.style.left = `${y}px`, lt.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= m - 1;
63
63
  }, "refresh"));
64
64
  d(this, Y, /* @__PURE__ */ c((e) => {
65
- if (!t(this, y)) return !1;
66
- const n = t(this, y).container, s = n.querySelector("table");
65
+ if (!t(this, p)) return !1;
66
+ const n = t(this, p).container, s = n.querySelector("table");
67
67
  if (!s) return !1;
68
- const r = t(this, y).track.getBoundingClientRect(), o = t(this, y).thumb.clientWidth;
68
+ const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
71
  const h = r.width - o;
72
- l > h && (l = h), l = parseInt(l, 10), t(this, y).thumb.style.left = `${l}px`, t(this, y).left.disabled = l === 0, t(this, y).right.disabled = l >= h - 1;
72
+ l > h && (l = h), l = parseInt(l, 10), t(this, p).thumb.style.left = `${l}px`, t(this, p).left.disabled = l === 0, t(this, p).right.disabled = l >= h - 1;
73
73
  const a = n.clientWidth, u = s.scrollWidth - a;
74
74
  return h > 0 && u > 0 && (n.scrollLeft = l / h * u), l > 0 && l < h - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, Rt, /* @__PURE__ */ c(() => {
77
77
  const e = /* @__PURE__ */ c((s) => {
78
- clearInterval(t(this, P)), clearInterval(t(this, D));
79
- const r = parseInt(t(this, y).thumb.style.left || 0, 10);
80
- t(this, Y).call(this, r + s), g(this, P, setInterval(() => {
81
- clearInterval(t(this, P)), g(this, D, setInterval(() => {
82
- const o = parseInt(t(this, y).thumb.style.left || 0, 10);
83
- t(this, Y).call(this, o + s) || clearInterval(t(this, D));
78
+ clearInterval(t(this, B)), clearInterval(t(this, P));
79
+ const r = parseInt(t(this, p).thumb.style.left || 0, 10);
80
+ t(this, Y).call(this, r + s), g(this, B, setInterval(() => {
81
+ clearInterval(t(this, B)), g(this, P, setInterval(() => {
82
+ const o = parseInt(t(this, p).thumb.style.left || 0, 10);
83
+ t(this, Y).call(this, o + s) || clearInterval(t(this, P));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), n = /* @__PURE__ */ c(() => {
87
- clearInterval(t(this, P)), clearInterval(t(this, D));
87
+ clearInterval(t(this, B)), clearInterval(t(this, P));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((s) => {
90
- t(this, y).left.addEventListener(s, n), t(this, y).right.addEventListener(s, n), t(this, y).track.addEventListener(s, n);
91
- }), t(this, y).left.addEventListener("mousedown", (s) => {
90
+ t(this, p).left.addEventListener(s, n), t(this, p).right.addEventListener(s, n), t(this, p).track.addEventListener(s, n);
91
+ }), t(this, p).left.addEventListener("mousedown", (s) => {
92
92
  s.button === 0 && e(-20);
93
- }), t(this, y).right.addEventListener("mousedown", (s) => {
93
+ }), t(this, p).right.addEventListener("mousedown", (s) => {
94
94
  s.button === 0 && e(20);
95
- }), t(this, y).left.addEventListener("touchstart", () => e(-20)), t(this, y).right.addEventListener("touchstart", () => e(20)), t(this, y).track.addEventListener("mousedown", (s) => {
95
+ }), t(this, p).left.addEventListener("touchstart", () => e(-20)), t(this, p).right.addEventListener("touchstart", () => e(20)), t(this, p).track.addEventListener("mousedown", (s) => {
96
96
  if (s.button !== 0) return;
97
97
  s.preventDefault();
98
- const r = t(this, y).track.getBoundingClientRect(), o = t(this, y).thumb.clientWidth;
98
+ const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
99
99
  t(this, Y).call(this, s.clientX - r.left - o / 2);
100
- }), t(this, y).thumb.addEventListener("mousedown", (s) => {
100
+ }), t(this, p).thumb.addEventListener("mousedown", (s) => {
101
101
  if (s.button !== 0) return;
102
- s.stopPropagation(), s.preventDefault(), g(this, W, !0), this.shiftX = s.clientX - t(this, y).thumb.getBoundingClientRect().left;
102
+ s.stopPropagation(), s.preventDefault(), g(this, W, !0), this.shiftX = s.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ c((l) => {
104
104
  if (!t(this, W)) return;
105
- const h = t(this, y).track.getBoundingClientRect();
105
+ const h = t(this, p).track.getBoundingClientRect();
106
106
  t(this, Y).call(this, l.clientX - h.left - this.shiftX);
107
107
  }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
108
108
  g(this, W, !1), n(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
@@ -182,7 +182,7 @@ const le = class le extends HTMLElement {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- g(this, y, {
185
+ g(this, p, {
186
186
  container: n,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -195,27 +195,27 @@ const le = class le extends HTMLElement {
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, B) && t(this, B).disconnect();
198
+ t(this, D) && t(this, D).disconnect();
199
199
  }
200
200
  };
201
- M = new WeakMap(), W = new WeakMap(), y = new WeakMap(), P = new WeakMap(), D = new WeakMap(), B = new WeakMap(), Et = new WeakMap(), Y = new WeakMap(), Rt = new WeakMap(), c(le, "NineTableHScrollBar");
202
- let Kt = le;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Kt);
204
- var O, J, V, w, ht, dt, At;
205
- const ae = class ae extends HTMLElement {
201
+ M = new WeakMap(), W = new WeakMap(), p = new WeakMap(), B = new WeakMap(), P = new WeakMap(), D = new WeakMap(), Et = new WeakMap(), Y = new WeakMap(), Rt = new WeakMap(), c(ae, "NineTableHScrollBar");
202
+ let Zt = ae;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Zt);
204
+ var O, J, V, S, ht, dt, At;
205
+ const ce = class ce extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
208
  d(this, O);
209
209
  d(this, J);
210
210
  d(this, V, !1);
211
- d(this, w);
211
+ d(this, S);
212
212
  d(this, ht, 0);
213
213
  d(this, dt, 0);
214
- x(this, "refresh", /* @__PURE__ */ c(() => {
215
- if (!t(this, O) || !t(this, w)) return;
216
- const e = t(this, w).container, n = t(this, w).track, s = t(this, w).thumb, r = e.clientHeight, l = (t(this, O).data.get() || []).length, h = t(this, J).getRowHeight(), a = l * h;
214
+ v(this, "refresh", /* @__PURE__ */ c(() => {
215
+ if (!t(this, O) || !t(this, S)) return;
216
+ const e = t(this, S).container, n = t(this, S).track, s = t(this, S).thumb, r = e.clientHeight, l = (t(this, O).data.get() || []).length, h = t(this, J).getRowHeight(), a = l * h;
217
217
  if (a <= r) {
218
- s.style.display = "none", t(this, w).top.disabled = !0, t(this, w).bottom.disabled = !0;
218
+ s.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
219
219
  return;
220
220
  } else
221
221
  s.style.display = "block";
@@ -223,29 +223,29 @@ const ae = class ae extends HTMLElement {
223
223
  if (f <= 0) return;
224
224
  const u = Math.max(Math.min(f * (r / a), f), 20);
225
225
  s.style.height = `${u}px`;
226
- const b = e.scrollTop, p = Math.max(a - r, 1);
226
+ const b = e.scrollTop, y = Math.max(a - r, 1);
227
227
  let m = 0;
228
- p > 0 && (m = b / p * (f - u));
228
+ y > 0 && (m = b / y * (f - u));
229
229
  const R = f - u;
230
- m < 0 && (m = 0), m > R && (m = R), s.style.top = `${m}px`, t(this, w).top.disabled = b <= 0, t(this, w).bottom.disabled = b >= p - 1;
230
+ m < 0 && (m = 0), m > R && (m = R), s.style.top = `${m}px`, t(this, S).top.disabled = b <= 0, t(this, S).bottom.disabled = b >= y - 1;
231
231
  }, "refresh"));
232
232
  d(this, At, /* @__PURE__ */ c(() => {
233
- const e = t(this, w).container, n = /* @__PURE__ */ c(() => {
233
+ const e = t(this, S).container, n = /* @__PURE__ */ c(() => {
234
234
  const r = (t(this, O).data.get() || []).length, o = t(this, J).getRowHeight();
235
235
  return r * o;
236
236
  }, "getContentHeight");
237
237
  e.addEventListener("scroll", () => {
238
238
  t(this, V) || this.refresh();
239
- }), t(this, w).thumb.addEventListener("mousedown", (s) => {
239
+ }), t(this, S).thumb.addEventListener("mousedown", (s) => {
240
240
  if (s.button !== 0) return;
241
241
  s.stopPropagation(), s.preventDefault(), g(this, V, !0), g(this, ht, s.clientY), g(this, dt, e.scrollTop);
242
242
  const r = /* @__PURE__ */ c((l) => {
243
243
  if (!t(this, V)) return;
244
- const h = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientHeight, u = h.height - a, b = l.clientY - t(this, ht), p = e.clientHeight, m = n(), R = Math.max(m - p, 1);
244
+ const h = t(this, S).track.getBoundingClientRect(), a = t(this, S).thumb.clientHeight, u = h.height - a, b = l.clientY - t(this, ht), y = e.clientHeight, m = n(), R = Math.max(m - y, 1);
245
245
  if (u > 0 && R > 0) {
246
246
  const G = b / u * R;
247
247
  let at = t(this, dt) + G;
248
- const pe = Math.max(0, m - p);
248
+ const pe = Math.max(0, m - y);
249
249
  at < 0 && (at = 0), at > pe && (at = pe), e.scrollTop = at;
250
250
  }
251
251
  this.refresh();
@@ -253,17 +253,17 @@ const ae = class ae extends HTMLElement {
253
253
  g(this, V, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
254
254
  }, "onMouseUp");
255
255
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
256
- }), t(this, w).track.addEventListener("mousedown", (s) => {
257
- if (s.button !== 0 || s.target === t(this, w).thumb) return;
258
- const r = t(this, w).track.getBoundingClientRect(), o = t(this, w).thumb.clientHeight, l = s.clientY - r.top - o / 2, a = r.height - o, f = e.clientHeight, u = n(), b = Math.max(u - f, 1);
256
+ }), t(this, S).track.addEventListener("mousedown", (s) => {
257
+ if (s.button !== 0 || s.target === t(this, S).thumb) return;
258
+ const r = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientHeight, l = s.clientY - r.top - o / 2, a = r.height - o, f = e.clientHeight, u = n(), b = Math.max(u - f, 1);
259
259
  if (a > 0 && b > 0) {
260
- const p = Math.max(0, Math.min(1, l / a));
261
- e.scrollTop = p * b;
260
+ const y = Math.max(0, Math.min(1, l / a));
261
+ e.scrollTop = y * b;
262
262
  }
263
263
  this.refresh();
264
- }), t(this, w).top.addEventListener("click", () => {
264
+ }), t(this, S).top.addEventListener("click", () => {
265
265
  e.scrollTop -= 40;
266
- }), t(this, w).bottom.addEventListener("click", () => {
266
+ }), t(this, S).bottom.addEventListener("click", () => {
267
267
  e.scrollTop += 40;
268
268
  });
269
269
  }, "#init"));
@@ -339,7 +339,7 @@ const ae = class ae extends HTMLElement {
339
339
  setTimeout(e, 10);
340
340
  return;
341
341
  }
342
- g(this, w, {
342
+ g(this, S, {
343
343
  container: n,
344
344
  track: this.querySelector(".ng-scroll-track"),
345
345
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -350,14 +350,14 @@ const ae = class ae extends HTMLElement {
350
350
  e();
351
351
  }
352
352
  };
353
- O = new WeakMap(), J = new WeakMap(), V = new WeakMap(), w = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), At = new WeakMap(), c(ae, "NineTableVScrollBar");
354
- let Zt = ae;
355
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Zt);
356
- var I, S, _, q, z, X, ft, Q, qt, Tt, kt, ut, gt, Lt, Ct, bt, Ht, tt, pt;
357
- const ce = class ce {
353
+ O = new WeakMap(), J = new WeakMap(), V = new WeakMap(), S = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), At = new WeakMap(), c(ce, "NineTableVScrollBar");
354
+ let Gt = ce;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Gt);
356
+ var I, w, _, q, z, X, ft, Q, qt, Tt, kt, ut, gt, Lt, Ct, bt, Ht, tt, yt, Mt;
357
+ const he = class he {
358
358
  constructor(i) {
359
359
  d(this, I);
360
- d(this, S);
360
+ d(this, w);
361
361
  d(this, _, /* @__PURE__ */ new Map());
362
362
  d(this, q, null);
363
363
  d(this, z, null);
@@ -365,14 +365,14 @@ const ce = class ce {
365
365
  d(this, ft, 40);
366
366
  d(this, Q, !1);
367
367
  d(this, qt, 3);
368
- x(this, "refresh", /* @__PURE__ */ c(() => {
368
+ v(this, "refresh", /* @__PURE__ */ c(() => {
369
369
  var e;
370
- const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
371
- i && (t(this, ut).call(this), t(this, tt).call(this, i.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
370
+ const i = t(this, w).querySelector(".ng-container-body .ng-part-body");
371
+ i && (t(this, ut).call(this), t(this, tt).call(this, i.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
372
372
  }, "refresh"));
373
- x(this, "initialize", /* @__PURE__ */ c(() => {
373
+ v(this, "initialize", /* @__PURE__ */ c(() => {
374
374
  g(this, q, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
375
- const r = t(this, S).querySelector(s);
375
+ const r = t(this, w).querySelector(s);
376
376
  if (!r) return;
377
377
  const o = r.querySelector(".ng-part-body table");
378
378
  if (!o) return;
@@ -381,13 +381,13 @@ const ce = class ce {
381
381
  const a = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
382
382
  t(this, _).set(s, a);
383
383
  });
384
- const i = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), n = t(this, S).querySelector(".ng-container-right .ng-part-body");
384
+ const i = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), n = t(this, w).querySelector(".ng-container-right .ng-part-body");
385
385
  if (i) {
386
386
  t(this, kt).call(this, i), t(this, bt).call(this), t(this, ut).call(this), t(this, tt).call(this, i.scrollTop);
387
387
  let s = i.scrollTop;
388
388
  const r = /* @__PURE__ */ c((o) => {
389
389
  var l;
390
- e && e.scrollTop !== o && (e.scrollTop = o), n && n.scrollTop !== o && (n.scrollTop = o), t(this, tt).call(this, o), (l = t(this, S).querySelector("nine-table-vscrollbar")) == null || l.refresh();
390
+ e && e.scrollTop !== o && (e.scrollTop = o), n && n.scrollTop !== o && (n.scrollTop = o), t(this, tt).call(this, o), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
391
391
  }, "syncScroll");
392
392
  i.addEventListener("scroll", () => {
393
393
  const o = i.scrollTop;
@@ -420,7 +420,7 @@ const ce = class ce {
420
420
  e.forEach((b) => {
421
421
  r.appendChild(b.cloneNode(!0));
422
422
  }), s ? s.before(r) : n.appendChild(r);
423
- const o = t(this, S), l = o.style.display, h = o.style.visibility, a = o.style.position;
423
+ const o = t(this, w), l = o.style.display, h = o.style.visibility, a = o.style.position;
424
424
  (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
425
425
  let f = 0;
426
426
  const u = n.querySelectorAll("tr:not(.nodata)");
@@ -431,7 +431,7 @@ const ce = class ce {
431
431
  d(this, ut, /* @__PURE__ */ c(() => {
432
432
  const e = (t(this, I).data.get() || []).length, n = t(this, q) || 24, s = e * n;
433
433
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
434
- const o = t(this, S).querySelector(r);
434
+ const o = t(this, w).querySelector(r);
435
435
  if (!o) return;
436
436
  const l = o.querySelector(".ng-part-body .ng-virtual-spacer");
437
437
  l && (l.style.height = `${s}px`);
@@ -445,7 +445,7 @@ const ce = class ce {
445
445
  }, "#updateRowCount"));
446
446
  d(this, Lt, /* @__PURE__ */ c(() => {
447
447
  var h, a, f;
448
- const i = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), n = t(this, S).querySelector(".ng-container-right .ng-part-body table");
448
+ const i = t(this, w).querySelector(".ng-container-left .ng-part-body table"), e = t(this, w).querySelector(".ng-container-body .ng-part-body table"), n = t(this, w).querySelector(".ng-container-right .ng-part-body table");
449
449
  if (!e) return;
450
450
  const s = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = n ? Array.from(n.querySelectorAll("tr")) : [], l = Math.max(s.length, r.length, o.length);
451
451
  for (let u = 0; u < l; u++) {
@@ -453,12 +453,12 @@ const ce = class ce {
453
453
  ((h = s[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
454
454
  ((a = r[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
455
455
  ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
456
- ], p = Math.max(...b);
457
- p > 0 && (s[u] && (s[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), o[u] && (o[u].style.height = `${p}px`));
456
+ ], y = Math.max(...b);
457
+ y > 0 && (s[u] && (s[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), o[u] && (o[u].style.height = `${y}px`));
458
458
  }
459
459
  }, "#syncRowHeights"));
460
460
  d(this, Ct, /* @__PURE__ */ c(() => {
461
- !t(this, S) || !(t(this, S) instanceof HTMLElement) || (g(this, z, new ResizeObserver((i) => {
461
+ !t(this, w) || !(t(this, w) instanceof HTMLElement) || (g(this, z, new ResizeObserver((i) => {
462
462
  for (const e of i) {
463
463
  const n = e.target;
464
464
  if (!n.classList.contains("active")) continue;
@@ -471,18 +471,18 @@ const ce = class ce {
471
471
  t(this, X) !== h && (g(this, X, h), t(this, gt).call(this), t(this, q) !== null && t(this, bt).call(this));
472
472
  }
473
473
  }
474
- })), t(this, z).observe(t(this, S)));
474
+ })), t(this, z).observe(t(this, w)));
475
475
  }, "#initResizeObserver"));
476
476
  d(this, bt, /* @__PURE__ */ c(() => {
477
477
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
478
- const e = t(this, S).querySelector(i);
478
+ const e = t(this, w).querySelector(i);
479
479
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Tt).call(this, e, i);
480
- }), t(this, Lt).call(this);
480
+ }), t(this, Mt).call(this), t(this, Lt).call(this);
481
481
  }, "#renderAllContainers"));
482
482
  d(this, Ht, /* @__PURE__ */ c((i) => {
483
483
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
484
484
  var a;
485
- const n = t(this, S).querySelector(e);
485
+ const n = t(this, w).querySelector(e);
486
486
  if (!n) return;
487
487
  const s = n.querySelector(".ng-part-body tbody.bindable-tbody");
488
488
  if (!s) return;
@@ -493,8 +493,8 @@ const ce = class ce {
493
493
  f.style.display = "none";
494
494
  return;
495
495
  }
496
- const p = t(this, I).data.get(b);
497
- f.style.display = "", t(this, pt).call(this, f, p, b);
496
+ const y = t(this, I).data.get(b);
497
+ f.style.display = "", t(this, yt).call(this, f, y, b);
498
498
  });
499
499
  });
500
500
  }, "#adjustBufferRows"));
@@ -504,33 +504,47 @@ const ce = class ce {
504
504
  if (!e || e <= 0) return;
505
505
  const s = (t(this, I).data.get() || []).length, r = Math.max(0, Math.floor(i / e)), o = r * e, l = ((h = t(this, _).get(".ng-container-body")) == null ? void 0 : h.length) || 1;
506
506
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
507
- const f = t(this, S).querySelector(a);
507
+ const f = t(this, w).querySelector(a);
508
508
  if (!f) return;
509
509
  const u = f.querySelector(".ng-part-body tbody.bindable-tbody");
510
510
  if (!u) return;
511
- u.style.transform = `translateY(${o}px)`, Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((p, m) => {
511
+ u.style.transform = `translateY(${o}px)`, Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((y, m) => {
512
512
  const R = r + Math.floor(m / l);
513
513
  if (R >= s) {
514
- p.style.display = "none";
514
+ y.style.display = "none";
515
515
  return;
516
516
  }
517
517
  const G = t(this, I).data.get(R);
518
- p.style.display = "", t(this, pt).call(this, p, G, R);
518
+ y.style.display = "", t(this, yt).call(this, y, G, R);
519
519
  });
520
520
  }), t(this, Q) || (g(this, Q, !0), setTimeout(() => {
521
521
  t(this, Ht).call(this, r), g(this, Q, !1);
522
522
  }, 0));
523
523
  }, "#handleScroll"));
524
- d(this, pt, /* @__PURE__ */ c((i, e, n) => {
524
+ d(this, yt, /* @__PURE__ */ c((i, e, n) => {
525
525
  i.dataset.row = n, Array.from(i.cells).forEach((s, r) => {
526
526
  const o = s.dataset.bind;
527
527
  o && e && e[o] !== void 0 ? s.textContent = e[o] : s.textContent = e ? e[Object.keys(e)[r]] ?? `R${n}C${r}` : `ν–‰ ${n + 1}`, s.dataset.row = n;
528
528
  });
529
529
  }, "#bindRowData"));
530
- x(this, "destroy", /* @__PURE__ */ c(() => {
530
+ d(this, Mt, /* @__PURE__ */ c(() => {
531
+ var h, a, f;
532
+ const i = t(this, w).querySelector(".ng-container-left .ng-part-header table"), e = t(this, w).querySelector(".ng-container-body .ng-part-header table"), n = t(this, w).querySelector(".ng-container-right .ng-part-header table");
533
+ if (!e) return;
534
+ const s = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = n ? Array.from(n.querySelectorAll("tr")) : [], l = Math.max(s.length, r.length, o.length);
535
+ for (let u = 0; u < l; u++) {
536
+ const b = [
537
+ ((h = s[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
538
+ ((a = r[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
539
+ ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
540
+ ], y = Math.max(...b);
541
+ y > 0 && (s[u] && (s[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), o[u] && (o[u].style.height = `${y}px`));
542
+ }
543
+ }, "#syncHeaderHeights"));
544
+ v(this, "destroy", /* @__PURE__ */ c(() => {
531
545
  t(this, z) && (t(this, z).disconnect(), g(this, z, null));
532
546
  }, "destroy"));
533
- g(this, I, i.getRootNode().host), g(this, S, i), t(this, Ct).call(this);
547
+ g(this, I, i.getRootNode().host), g(this, w, i), t(this, Ct).call(this);
534
548
  }
535
549
  getRowHeight() {
536
550
  return t(this, q);
@@ -540,9 +554,9 @@ const ce = class ce {
540
554
  return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
541
555
  }
542
556
  };
543
- I = new WeakMap(), S = new WeakMap(), _ = new WeakMap(), q = new WeakMap(), z = new WeakMap(), X = new WeakMap(), ft = new WeakMap(), Q = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), ut = new WeakMap(), gt = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), Ht = new WeakMap(), tt = new WeakMap(), pt = new WeakMap(), c(ce, "RowManager");
544
- let Gt = ce;
545
- var Mt, et;
557
+ I = new WeakMap(), w = new WeakMap(), _ = new WeakMap(), q = new WeakMap(), z = new WeakMap(), X = new WeakMap(), ft = new WeakMap(), Q = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), ut = new WeakMap(), gt = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), Ht = new WeakMap(), tt = new WeakMap(), yt = new WeakMap(), Mt = new WeakMap(), c(he, "RowManager");
558
+ let Jt = he;
559
+ var _t, et;
546
560
  const H = class H {
547
561
  /**
548
562
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
@@ -557,7 +571,7 @@ const H = class H {
557
571
  var s, r, o, l;
558
572
  if (!i) return null;
559
573
  const e = i.cloneNode(!0);
560
- return t(s = H, Mt).call(s, e), t(r = H, et).call(r, e, "thead"), t(o = H, et).call(o, e, "tbody"), t(l = H, et).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, a) => {
574
+ return t(s = H, _t).call(s, e), t(r = H, et).call(r, e, "thead"), t(o = H, et).call(o, e, "tbody"), t(l = H, et).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, a) => {
561
575
  const f = h.getAttribute("fixed");
562
576
  f && e.querySelectorAll(`thead [data-col="${a}"], tbody [data-col="${a}"], tfoot [data-col="${a}"]`).forEach((u) => {
563
577
  u.setAttribute("fixed", f);
@@ -565,7 +579,7 @@ const H = class H {
565
579
  }), e;
566
580
  }
567
581
  };
568
- Mt = new WeakMap(), et = new WeakMap(), c(H, "TableCompiler"), d(H, Mt, /* @__PURE__ */ c((i) => {
582
+ _t = new WeakMap(), et = new WeakMap(), c(H, "TableCompiler"), d(H, _t, /* @__PURE__ */ c((i) => {
569
583
  if (!i.querySelector("colgroup")) {
570
584
  const e = i.querySelector("tbody tr") || i.querySelector("tr"), n = e ? e.querySelectorAll("th, td").length : 1, s = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / n), 100);
571
585
  for (let o = 0; o < n; o++) {
@@ -596,9 +610,9 @@ Mt = new WeakMap(), et = new WeakMap(), c(H, "TableCompiler"), d(H, Mt, /* @__PU
596
610
  f = m;
597
611
  break;
598
612
  }
599
- const b = u.rowSpan || 1, p = u.colSpan || 1;
613
+ const b = u.rowSpan || 1, y = u.colSpan || 1;
600
614
  for (let m = 0; m < b; m++)
601
- for (let R = 0; R < p; R++)
615
+ for (let R = 0; R < y; R++)
602
616
  a + m < r && f + R < o && (l[a + m][f + R] = m === 0 && R === 0 ? "1" : "0");
603
617
  });
604
618
  }), n.forEach((h) => {
@@ -612,15 +626,15 @@ Mt = new WeakMap(), et = new WeakMap(), c(H, "TableCompiler"), d(H, Mt, /* @__PU
612
626
  });
613
627
  });
614
628
  }, "#resetColIndex"));
615
- let Jt = H;
616
- var _t, U, F, It, $t, it, Wt, Ot;
629
+ let Qt = H;
630
+ var $t, U, F, It, Wt, it, Ot, zt;
617
631
  const ct = class ct extends HTMLElement {
618
632
  constructor() {
619
633
  super();
620
- d(this, _t);
634
+ d(this, $t);
621
635
  d(this, U, null);
622
636
  d(this, F);
623
- x(this, "invalidate", /* @__PURE__ */ c(() => {
637
+ v(this, "invalidate", /* @__PURE__ */ c(() => {
624
638
  var e, n;
625
639
  t(this, F).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (n = this.querySelector("nine-table-vscrollbar")) == null || n.refresh();
626
640
  }, "invalidate"));
@@ -645,7 +659,7 @@ const ct = class ct extends HTMLElement {
645
659
  f.className = "ng-part-footer", f.appendChild(t(this, it).call(this, t(this, U), s, "footer")), r.appendChild(o), r.appendChild(l), r.appendChild(f);
646
660
  });
647
661
  }, "#renderSplitContainers"));
648
- d(this, $t, /* @__PURE__ */ c(() => {
662
+ d(this, Wt, /* @__PURE__ */ c(() => {
649
663
  ["left", "right", "body"].forEach((e) => {
650
664
  const n = this.querySelector(`.ng-container-${e}`), s = n == null ? void 0 : n.querySelectorAll("table");
651
665
  if (!n || !s || s.length === 0) return;
@@ -656,8 +670,8 @@ const ct = class ct extends HTMLElement {
656
670
  }), e === "body" ? n.style.flex = "1" : (n.style.flex = `0 0 ${r}px`, n.style.width = `${r}px`);
657
671
  });
658
672
  }, "#updateContainerWidths"));
659
- x(this, "generate", /* @__PURE__ */ c((e) => {
660
- e && (g(this, U, Jt.compile(e)), t(this, It).call(this), t(this, $t).call(this), t(this, F).initialize(), setTimeout(() => {
673
+ v(this, "generate", /* @__PURE__ */ c((e) => {
674
+ e && (g(this, U, Qt.compile(e)), t(this, It).call(this), t(this, Wt).call(this), t(this, F).initialize(), setTimeout(() => {
661
675
  var n;
662
676
  (n = this.querySelector("nine-table-hscrollbar")) == null || n.refresh();
663
677
  }, 0));
@@ -678,19 +692,19 @@ const ct = class ct extends HTMLElement {
678
692
  a.remove();
679
693
  }), r;
680
694
  }, "#createSplitTable"));
681
- x(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, F).getRowHeight(), "getRowHeight"));
682
- x(this, "scrollToX", /* @__PURE__ */ c((e) => {
695
+ v(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, F).getRowHeight(), "getRowHeight"));
696
+ v(this, "scrollToX", /* @__PURE__ */ c((e) => {
683
697
  const n = this.querySelector(".ng-container-body .ng-part-body");
684
698
  n && (n.scrollLeft = e);
685
699
  }, "scrollToX"));
686
- x(this, "scrollToY", /* @__PURE__ */ c((e) => {
700
+ v(this, "scrollToY", /* @__PURE__ */ c((e) => {
687
701
  const n = this.querySelector(".ng-container-body .ng-part-body");
688
702
  n && (n.scrollTop = e);
689
703
  }, "scrollToY"));
690
- d(this, Wt, /* @__PURE__ */ c(() => {
691
- t(this, Ot).call(this);
692
- }, "#init"));
693
704
  d(this, Ot, /* @__PURE__ */ c(() => {
705
+ t(this, zt).call(this);
706
+ }, "#init"));
707
+ d(this, zt, /* @__PURE__ */ c(() => {
694
708
  const e = ct.SCROLLBAR_SIZE;
695
709
  this.innerHTML = `
696
710
  <style>
@@ -832,37 +846,37 @@ const ct = class ct extends HTMLElement {
832
846
  </div>
833
847
  `;
834
848
  }, "#render"));
835
- g(this, F, new Gt(this)), g(this, _t, this.getRootNode().host);
849
+ g(this, F, new Jt(this)), g(this, $t, this.getRootNode().host);
836
850
  }
837
851
  connectedCallback() {
838
- t(this, Wt).call(this);
852
+ t(this, Ot).call(this);
839
853
  }
840
854
  disconnectedCallback() {
841
855
  this.innerHTML = "", lt.log("NineTableSheet destroyed.");
842
856
  }
843
857
  };
844
- _t = new WeakMap(), U = new WeakMap(), F = new WeakMap(), It = new WeakMap(), $t = new WeakMap(), it = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), c(ct, "NineTableSheet"), x(ct, "SCROLLBAR_SIZE", 16);
858
+ $t = new WeakMap(), U = new WeakMap(), F = new WeakMap(), It = new WeakMap(), Wt = new WeakMap(), it = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), c(ct, "NineTableSheet"), v(ct, "SCROLLBAR_SIZE", 16);
845
859
  let St = ct;
846
860
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", St);
847
- var zt, yt;
848
- const he = class he extends HTMLElement {
861
+ var Nt, pt;
862
+ const de = class de extends HTMLElement {
849
863
  constructor() {
850
864
  super();
851
- d(this, zt, /* @__PURE__ */ c(() => {
865
+ d(this, Nt, /* @__PURE__ */ c(() => {
852
866
  var e;
853
867
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
854
868
  var o;
855
869
  const s = n.ctrlKey || n.metaKey || n.shiftKey, r = parseInt((o = n.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
856
- t(this, yt).call(this, r, s);
857
- }), t(this, yt).call(this, 0, !1);
870
+ t(this, pt).call(this, r, s);
871
+ }), t(this, pt).call(this, 0, !1);
858
872
  }, "#init"));
859
- d(this, yt, /* @__PURE__ */ c((e, n = !1) => {
873
+ d(this, pt, /* @__PURE__ */ c((e, n = !1) => {
860
874
  const s = /* @__PURE__ */ c(() => {
861
875
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
862
- Array.from(this.querySelectorAll("nine-splitter")).forEach((p) => p.style.setProperty("display", "none"));
863
- const b = f.filter((p) => p.classList.contains("active"));
864
- b.length < 2 || b.forEach((p) => {
865
- const m = parseInt(p.getAttribute("data-index"), 10), R = this.querySelector(`nine-splitter[data-split-index="${m}"]`), G = f[m + 1];
876
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
877
+ const b = f.filter((y) => y.classList.contains("active"));
878
+ b.length < 2 || b.forEach((y) => {
879
+ const m = parseInt(y.getAttribute("data-index"), 10), R = this.querySelector(`nine-splitter[data-split-index="${m}"]`), G = f[m + 1];
866
880
  R && G && G.classList.contains("active") && R.style.setProperty("display", "flex");
867
881
  });
868
882
  }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
@@ -889,17 +903,17 @@ const he = class he extends HTMLElement {
889
903
  }, "#switchSheet"));
890
904
  }
891
905
  connectedCallback() {
892
- t(this, zt).call(this);
906
+ t(this, Nt).call(this);
893
907
  }
894
908
  };
895
- zt = new WeakMap(), yt = new WeakMap(), c(he, "NineTableSheets");
896
- let Qt = he;
897
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Qt);
898
- var T, Nt, mt, Pt;
899
- const de = class de {
909
+ Nt = new WeakMap(), pt = new WeakMap(), c(de, "NineTableSheets");
910
+ let te = de;
911
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", te);
912
+ var T, Bt, mt, Pt;
913
+ const fe = class fe {
900
914
  constructor(i) {
901
915
  d(this, T);
902
- d(this, Nt, /* @__PURE__ */ c(() => {
916
+ d(this, Bt, /* @__PURE__ */ c(() => {
903
917
  t(this, Pt).call(this), new ResizeObserver((i) => {
904
918
  for (let e of i)
905
919
  t(this, T).getAttribute("auto-height") === "true" && t(this, mt).call(this);
@@ -1015,18 +1029,18 @@ const de = class de {
1015
1029
  });
1016
1030
  });
1017
1031
  }, "#render"));
1018
- g(this, T, i), t(this, Nt).call(this);
1032
+ g(this, T, i), t(this, Bt).call(this);
1019
1033
  }
1020
1034
  };
1021
- T = new WeakMap(), Nt = new WeakMap(), mt = new WeakMap(), Pt = new WeakMap(), c(de, "LayoutManager");
1022
- let te = de;
1023
- var vt, nt;
1024
- const fe = class fe {
1035
+ T = new WeakMap(), Bt = new WeakMap(), mt = new WeakMap(), Pt = new WeakMap(), c(fe, "LayoutManager");
1036
+ let ee = fe;
1037
+ var xt, nt;
1038
+ const ue = class ue {
1025
1039
  constructor(i) {
1026
- d(this, vt);
1040
+ d(this, xt);
1027
1041
  d(this, nt, -1);
1028
- x(this, "count", /* @__PURE__ */ c(() => t(this, vt).rawRecords.length, "count"));
1029
- g(this, vt, i);
1042
+ v(this, "count", /* @__PURE__ */ c(() => t(this, xt).rawRecords.length, "count"));
1043
+ g(this, xt, i);
1030
1044
  }
1031
1045
  get at() {
1032
1046
  return t(this, nt);
@@ -1036,9 +1050,9 @@ const fe = class fe {
1036
1050
  });
1037
1051
  }
1038
1052
  };
1039
- vt = new WeakMap(), nt = new WeakMap(), c(fe, "ngRow");
1040
- let ee = fe;
1041
- var k, E, L, st, Dt, N, Bt, j, xt, Yt, Vt, ot;
1053
+ xt = new WeakMap(), nt = new WeakMap(), c(ue, "ngRow");
1054
+ let ie = ue;
1055
+ var k, E, L, st, Dt, N, Yt, j, vt, Vt, Xt, ot;
1042
1056
  const C = class C {
1043
1057
  constructor(i, e) {
1044
1058
  d(this, k);
@@ -1047,14 +1061,14 @@ const C = class C {
1047
1061
  d(this, st, []);
1048
1062
  d(this, Dt, 0);
1049
1063
  d(this, N, []);
1050
- d(this, Bt, /* @__PURE__ */ c(() => {
1064
+ d(this, Yt, /* @__PURE__ */ c(() => {
1051
1065
  g(this, N, []);
1052
1066
  const i = t(this, k).template || [];
1053
1067
  Array.from(i).forEach((e) => {
1054
1068
  var n;
1055
1069
  t(this, N).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1056
1070
  }), (t(this, E).rawRecords || []).forEach((e) => {
1057
- e.__ng || (e.__ng = t(this, xt).call(this)), e.__ng.height = t(this, N).slice();
1071
+ e.__ng || (e.__ng = t(this, vt).call(this)), e.__ng.height = t(this, N).slice();
1058
1072
  });
1059
1073
  }, "#initialize"));
1060
1074
  d(this, j, /* @__PURE__ */ c(() => {
@@ -1062,7 +1076,7 @@ const C = class C {
1062
1076
  i.invalidate();
1063
1077
  });
1064
1078
  }, "#invalidate"));
1065
- x(this, "get", /* @__PURE__ */ c((i, e) => {
1079
+ v(this, "get", /* @__PURE__ */ c((i, e) => {
1066
1080
  var r;
1067
1081
  const n = this.getValidData();
1068
1082
  if (!n || n.length <= 0) return;
@@ -1075,10 +1089,10 @@ const C = class C {
1075
1089
  }
1076
1090
  return t(this, ot).call(this, n[i]);
1077
1091
  }, "get"));
1078
- x(this, "set", /* @__PURE__ */ c((i) => {
1092
+ v(this, "set", /* @__PURE__ */ c((i) => {
1079
1093
  this.clear(), this.add(i, !1), t(this, j).call(this);
1080
1094
  }, "set"));
1081
- d(this, xt, /* @__PURE__ */ c(() => ({
1095
+ d(this, vt, /* @__PURE__ */ c(() => ({
1082
1096
  rowState: C.ROW_STATE.EMPTY,
1083
1097
  deleted: !1,
1084
1098
  filtered: !1,
@@ -1087,14 +1101,14 @@ const C = class C {
1087
1101
  c: {},
1088
1102
  _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, N).slice(), -1, {}, {}]
1089
1103
  }), "#getDefaultMeta"));
1090
- x(this, "reset", /* @__PURE__ */ c(() => {
1104
+ v(this, "reset", /* @__PURE__ */ c(() => {
1091
1105
  g(this, L, []), g(this, st, []), t(this, j).call(this);
1092
1106
  }, "reset"));
1093
- x(this, "clear", /* @__PURE__ */ c(() => {
1107
+ v(this, "clear", /* @__PURE__ */ c(() => {
1094
1108
  var i;
1095
1109
  t(this, E).rawRecords = [], g(this, L, []), g(this, st, []), (i = t(this, E).viewRecords) != null && i.reset && t(this, E).viewRecords.reset();
1096
1110
  }, "clear"));
1097
- d(this, Yt, /* @__PURE__ */ c((i) => {
1111
+ d(this, Vt, /* @__PURE__ */ c((i) => {
1098
1112
  var s;
1099
1113
  Array.isArray(i) || (i = [i]);
1100
1114
  const e = typeof ((s = t(this, k).fields) == null ? void 0 : s.get) == "function" ? t(this, k).fields.get() : Object.keys(i[0] || {}), n = [];
@@ -1105,20 +1119,20 @@ const C = class C {
1105
1119
  }), n.push(o);
1106
1120
  }), n;
1107
1121
  }, "#json2Array"));
1108
- d(this, Vt, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1109
- e.__ng = t(this, xt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = C.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1122
+ d(this, Xt, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1123
+ e.__ng = t(this, vt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = C.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1110
1124
  }), i), "#defaultInsert"));
1111
- x(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1125
+ v(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1112
1126
  i === void 0 && (i = {});
1113
- const n = t(this, Yt).call(this, i);
1114
- t(this, E).rawRecords = t(this, E).rawRecords.concat(t(this, Vt).call(this, n)), this.resetRecords();
1127
+ const n = t(this, Vt).call(this, i);
1128
+ t(this, E).rawRecords = t(this, E).rawRecords.concat(t(this, Xt).call(this, n)), this.resetRecords();
1115
1129
  const s = this.count() - 1;
1116
1130
  return e || n.forEach((r, o) => {
1117
1131
  const l = t(this, E).rawRecords[s - o];
1118
1132
  l && (l.__ng.rowState = C.ROW_STATE.EMPTY);
1119
1133
  }), t(this, j).call(this), s;
1120
1134
  }, "add"));
1121
- x(this, "delete", /* @__PURE__ */ c((i) => {
1135
+ v(this, "delete", /* @__PURE__ */ c((i) => {
1122
1136
  let e = [];
1123
1137
  Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, E).host.row.at] : e = [parseInt(i, 10)], e.sort((n, s) => s - n).forEach((n) => {
1124
1138
  if (t(this, L)[n]) {
@@ -1129,7 +1143,7 @@ const C = class C {
1129
1143
  }
1130
1144
  }), this.resetRecords(), t(this, j).call(this);
1131
1145
  }, "delete"));
1132
- x(this, "setValue", /* @__PURE__ */ c((i, e, n) => {
1146
+ v(this, "setValue", /* @__PURE__ */ c((i, e, n) => {
1133
1147
  var h;
1134
1148
  i = parseInt(i, 10);
1135
1149
  const r = (typeof ((h = t(this, k).fields) == null ? void 0 : h.get) == "function" ? t(this, k).fields.get() : []).indexOf(e);
@@ -1139,14 +1153,14 @@ const C = class C {
1139
1153
  const l = o.v[r];
1140
1154
  l !== n && o.__ng.rowState !== C.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = C.ROW_STATE.UPDATE), o.v[r] = n;
1141
1155
  }, "setValue"));
1142
- x(this, "resetRecords", /* @__PURE__ */ c(() => {
1156
+ v(this, "resetRecords", /* @__PURE__ */ c(() => {
1143
1157
  g(this, st, t(this, E).rawRecords.filter((i) => !i.__ng.deleted)), g(this, L, t(this, E).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, E).rawRecords.forEach((i, e) => {
1144
1158
  i.__ng.rowidx = e;
1145
1159
  }), t(this, L).forEach((i, e) => {
1146
1160
  i.__ng.i = e;
1147
1161
  });
1148
1162
  }, "resetRecords"));
1149
- x(this, "getValidData", /* @__PURE__ */ c(() => (t(this, L).length === 0 && t(this, E).rawRecords.length > 0 && this.resetRecords(), t(this, L)), "getValidData"));
1163
+ v(this, "getValidData", /* @__PURE__ */ c(() => (t(this, L).length === 0 && t(this, E).rawRecords.length > 0 && this.resetRecords(), t(this, L)), "getValidData"));
1150
1164
  d(this, ot, /* @__PURE__ */ c((i) => {
1151
1165
  var o;
1152
1166
  if (!i) return i;
@@ -1158,8 +1172,8 @@ const C = class C {
1158
1172
  });
1159
1173
  return e ? r[0] : r;
1160
1174
  }, "#conv"));
1161
- x(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1162
- g(this, k, i), g(this, E, e), t(this, Bt).call(this);
1175
+ v(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1176
+ g(this, k, i), g(this, E, e), t(this, Yt).call(this);
1163
1177
  }
1164
1178
  get source() {
1165
1179
  return t(this, ot).call(this, t(this, E).rawRecords);
@@ -1168,7 +1182,7 @@ const C = class C {
1168
1182
  this.clear(), this.add(i, !1);
1169
1183
  }
1170
1184
  get nextId() {
1171
- return ++xe(this, Dt)._;
1185
+ return ++we(this, Dt)._;
1172
1186
  }
1173
1187
  get length() {
1174
1188
  return t(this, L).length;
@@ -1177,20 +1191,20 @@ const C = class C {
1177
1191
  return this.length;
1178
1192
  }
1179
1193
  };
1180
- k = new WeakMap(), E = new WeakMap(), L = new WeakMap(), st = new WeakMap(), Dt = new WeakMap(), N = new WeakMap(), Bt = new WeakMap(), j = new WeakMap(), xt = new WeakMap(), Yt = new WeakMap(), Vt = new WeakMap(), ot = new WeakMap(), c(C, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1181
- x(C, "ROW_STATE", {
1194
+ k = new WeakMap(), E = new WeakMap(), L = new WeakMap(), st = new WeakMap(), Dt = new WeakMap(), N = new WeakMap(), Yt = new WeakMap(), j = new WeakMap(), vt = new WeakMap(), Vt = new WeakMap(), Xt = new WeakMap(), ot = new WeakMap(), c(C, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1195
+ v(C, "ROW_STATE", {
1182
1196
  EMPTY: "EMPTY",
1183
1197
  NORMAL: "NORMAL",
1184
1198
  INSERT: "INSERT",
1185
1199
  UPDATE: "UPDATE",
1186
1200
  DELETE: "DELETE"
1187
1201
  });
1188
- let ie = C;
1202
+ let ne = C;
1189
1203
  var K;
1190
- const ue = class ue {
1204
+ const ge = class ge {
1191
1205
  constructor(i) {
1192
1206
  d(this, K);
1193
- g(this, K, i), this.row = new ee(this), this.data = new ie(t(this, K), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1207
+ g(this, K, i), this.row = new ie(this), this.data = new ne(t(this, K), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1194
1208
  var e;
1195
1209
  (e = t(this, K).view) != null && e.redraw && t(this, K).view.redraw();
1196
1210
  }, this.setDataSource = (e) => {
@@ -1207,15 +1221,15 @@ const ue = class ue {
1207
1221
  }, this.setDataSource([]);
1208
1222
  }
1209
1223
  };
1210
- K = new WeakMap(), c(ue, "ngDataManager");
1211
- let ne = ue;
1212
- var rt, A, wt, Xt;
1213
- const ge = class ge {
1224
+ K = new WeakMap(), c(ge, "ngDataManager");
1225
+ let se = ge;
1226
+ var rt, A, wt, Ut;
1227
+ const be = class be {
1214
1228
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1215
1229
  constructor(i) {
1216
1230
  d(this, rt);
1217
1231
  d(this, A, []);
1218
- x(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1232
+ v(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1219
1233
  i.forEach((n) => {
1220
1234
  t(this, A).some((s) => s.name === n) || t(this, A).push({ name: n, type: e });
1221
1235
  }), t(this, wt).call(this);
@@ -1226,7 +1240,7 @@ const ge = class ge {
1226
1240
  i.set(e.name, e.type);
1227
1241
  }), g(this, A, Array.from(i, ([e, n]) => ({ name: e, type: n }))), g(this, A, t(this, A).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, A).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
1228
1242
  }, "#adjust"));
1229
- d(this, Xt, /* @__PURE__ */ c(() => {
1243
+ d(this, Ut, /* @__PURE__ */ c(() => {
1230
1244
  g(this, A, []), lt.log(t(this, rt).querySelectorAll("table"));
1231
1245
  const i = Array.from(t(this, rt).querySelectorAll("table"));
1232
1246
  if (!(!i || i.length === 0)) {
@@ -1258,7 +1272,7 @@ const ge = class ge {
1258
1272
  t(this, wt).call(this);
1259
1273
  }
1260
1274
  }, "#init"));
1261
- g(this, rt, i), t(this, Xt).call(this);
1275
+ g(this, rt, i), t(this, Ut).call(this);
1262
1276
  }
1263
1277
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1264
1278
  get() {
@@ -1280,22 +1294,22 @@ const ge = class ge {
1280
1294
  return t(this, A).some((e) => e.name === i);
1281
1295
  }
1282
1296
  };
1283
- rt = new WeakMap(), A = new WeakMap(), wt = new WeakMap(), Xt = new WeakMap(), c(ge, "ngFields");
1284
- let se = ge;
1285
- var Z, Ut, Ft;
1286
- const be = class be extends HTMLElement {
1297
+ rt = new WeakMap(), A = new WeakMap(), wt = new WeakMap(), Ut = new WeakMap(), c(be, "ngFields");
1298
+ let oe = be;
1299
+ var Z, Ft, jt;
1300
+ const ye = class ye extends HTMLElement {
1287
1301
  constructor() {
1288
1302
  super();
1289
1303
  //#created = false;
1290
1304
  d(this, Z);
1291
- d(this, Ut);
1292
- d(this, Ft, /* @__PURE__ */ c(() => {
1293
- this.fields = new se(this), g(this, Ut, new te(this)), lt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1305
+ d(this, Ft);
1306
+ d(this, jt, /* @__PURE__ */ c(() => {
1307
+ this.fields = new oe(this), g(this, Ft, new ee(this)), lt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1294
1308
  }, "#init"));
1295
- this.attachShadow({ mode: "open" }), g(this, Z, new ne(this));
1309
+ this.attachShadow({ mode: "open" }), g(this, Z, new se(this));
1296
1310
  }
1297
1311
  connectedCallback() {
1298
- t(this, Ft).call(this);
1312
+ t(this, jt).call(this);
1299
1313
  }
1300
1314
  disconnectedCallback() {
1301
1315
  lt.log("NineTable disconnected.");
@@ -1313,7 +1327,7 @@ const be = class be extends HTMLElement {
1313
1327
  return t(this, Z);
1314
1328
  }
1315
1329
  };
1316
- Z = new WeakMap(), Ut = new WeakMap(), Ft = new WeakMap(), c(be, "NineTable");
1317
- let oe = be;
1318
- customElements.get("nine-table") || customElements.define("nine-table", oe);
1330
+ Z = new WeakMap(), Ft = new WeakMap(), jt = new WeakMap(), c(ye, "NineTable");
1331
+ let re = ye;
1332
+ customElements.get("nine-table") || customElements.define("nine-table", re);
1319
1333
  //# sourceMappingURL=nine-table.js.map