@ninebone/table 0.0.754 β†’ 0.0.755

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,17 +1,17 @@
1
1
  var fs = Object.defineProperty;
2
- var us = (q) => {
3
- throw TypeError(q);
2
+ var us = (T) => {
3
+ throw TypeError(T);
4
4
  };
5
- var ys = (q, s, e) => s in q ? fs(q, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[s] = e;
6
- var h = (q, s) => fs(q, "name", { value: s, configurable: !0 });
7
- var E = (q, s, e) => ys(q, typeof s != "symbol" ? s + "" : s, e), ve = (q, s, e) => s.has(q) || us("Cannot " + e);
8
- var t = (q, s, e) => (ve(q, s, "read from private field"), e ? e.call(q) : s.get(q)), d = (q, s, e) => s.has(q) ? us("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(q) : s.set(q, e), p = (q, s, e, n) => (ve(q, s, "write to private field"), n ? n.call(q, e) : s.set(q, e), e), Q = (q, s, e) => (ve(q, s, "access private method"), e);
9
- var gs = (q, s, e, n) => ({
5
+ var ys = (T, s, e) => s in T ? fs(T, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[s] = e;
6
+ var h = (T, s) => fs(T, "name", { value: s, configurable: !0 });
7
+ var q = (T, s, e) => ys(T, typeof s != "symbol" ? s + "" : s, e), we = (T, s, e) => s.has(T) || us("Cannot " + e);
8
+ var t = (T, s, e) => (we(T, s, "read from private field"), e ? e.call(T) : s.get(T)), d = (T, s, e) => s.has(T) ? us("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(T) : s.set(T, e), p = (T, s, e, n) => (we(T, s, "write to private field"), n ? n.call(T, e) : s.set(T, e), e), Q = (T, s, e) => (we(T, s, "access private method"), e);
9
+ var gs = (T, s, e, n) => ({
10
10
  set _(r) {
11
- p(q, s, r, e);
11
+ p(T, s, r, e);
12
12
  },
13
13
  get _() {
14
- return t(q, s, n);
14
+ return t(T, s, n);
15
15
  }
16
16
  });
17
17
  import { trace as ms } from "@ninebone/util";
@@ -21,15 +21,15 @@ const Xe = class Xe extends ms.constructor {
21
21
  }
22
22
  };
23
23
  h(Xe, "Trace");
24
- let we = Xe;
25
- const S = new we();
26
- var B, K, A, tt, et, st, Vt, nt, Ut;
24
+ let ve = Xe;
25
+ const S = new ve();
26
+ var B, K, E, tt, et, st, Vt, nt, Ut;
27
27
  const Ke = class Ke extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  d(this, B);
31
31
  d(this, K, !1);
32
- d(this, A);
32
+ d(this, E);
33
33
  d(this, tt);
34
34
  d(this, et);
35
35
  d(this, st);
@@ -40,11 +40,11 @@ const Ke = class Ke extends HTMLElement {
40
40
  this.refresh();
41
41
  })), t(this, st).observe(e));
42
42
  }, "#observeResize"));
43
- E(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!t(this, B) || !t(this, A) || t(this, K)) return;
45
- const e = t(this, A).container, n = e.querySelector("table");
43
+ q(this, "refresh", /* @__PURE__ */ h(() => {
44
+ if (!t(this, B) || !t(this, E) || t(this, K)) return;
45
+ const e = t(this, E).container, n = e.querySelector("table");
46
46
  if (!n) return;
47
- const r = t(this, A).track, o = t(this, A).thumb, i = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = n.scrollWidth;
47
+ const r = t(this, E).track, o = t(this, E).thumb, i = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = n.scrollWidth;
48
48
  if (a !== 0 && c > a)
49
49
  i && (i.style.display = "flex");
50
50
  else {
@@ -59,27 +59,27 @@ const Ke = class Ke extends HTMLElement {
59
59
  let g = 0;
60
60
  b > 0 && (g = parseInt(u / b * (l - f), 10)), g < 0 && (g = 0);
61
61
  const y = l - f;
62
- g > y && (g = y), o.style.left = `${g}px`, t(this, A).left.disabled = g === 0, t(this, A).right.disabled = g >= y - 1;
62
+ g > y && (g = y), o.style.left = `${g}px`, t(this, E).left.disabled = g === 0, t(this, E).right.disabled = g >= y - 1;
63
63
  }, "refresh"));
64
64
  d(this, nt, /* @__PURE__ */ h((e) => {
65
- if (!t(this, A)) return !1;
66
- const n = t(this, A).container, r = n.querySelector("table");
65
+ if (!t(this, E)) return !1;
66
+ const n = t(this, E).container, r = n.querySelector("table");
67
67
  if (!r) return !1;
68
- const o = t(this, A).track.getBoundingClientRect(), i = t(this, A).thumb.clientWidth;
68
+ const o = t(this, E).track.getBoundingClientRect(), i = t(this, E).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
71
  const c = o.width - i;
72
- a > c && (a = c), a = parseInt(a, 10), t(this, A).thumb.style.left = `${a}px`, t(this, A).left.disabled = a === 0, t(this, A).right.disabled = a >= c - 1;
72
+ a > c && (a = c), a = parseInt(a, 10), t(this, E).thumb.style.left = `${a}px`, t(this, E).left.disabled = a === 0, t(this, E).right.disabled = a >= c - 1;
73
73
  const l = n.clientWidth, u = r.scrollWidth - l;
74
74
  return c > 0 && u > 0 && (n.scrollLeft = a / c * u), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, Ut, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
78
  clearInterval(t(this, tt)), clearInterval(t(this, et));
79
- const o = parseInt(t(this, A).thumb.style.left || 0, 10);
79
+ const o = parseInt(t(this, E).thumb.style.left || 0, 10);
80
80
  t(this, nt).call(this, o + r), p(this, tt, setInterval(() => {
81
81
  clearInterval(t(this, tt)), p(this, et, setInterval(() => {
82
- const i = parseInt(t(this, A).thumb.style.left || 0, 10);
82
+ const i = parseInt(t(this, E).thumb.style.left || 0, 10);
83
83
  t(this, nt).call(this, i + r) || clearInterval(t(this, et));
84
84
  }, 50));
85
85
  }, 500));
@@ -87,22 +87,22 @@ const Ke = class Ke extends HTMLElement {
87
87
  clearInterval(t(this, tt)), clearInterval(t(this, et));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
- t(this, A).left.addEventListener(r, n), t(this, A).right.addEventListener(r, n), t(this, A).track.addEventListener(r, n);
91
- }), t(this, A).left.addEventListener("mousedown", (r) => {
90
+ t(this, E).left.addEventListener(r, n), t(this, E).right.addEventListener(r, n), t(this, E).track.addEventListener(r, n);
91
+ }), t(this, E).left.addEventListener("mousedown", (r) => {
92
92
  r.button === 0 && e(-20);
93
- }), t(this, A).right.addEventListener("mousedown", (r) => {
93
+ }), t(this, E).right.addEventListener("mousedown", (r) => {
94
94
  r.button === 0 && e(20);
95
- }), t(this, A).left.addEventListener("touchstart", () => e(-20)), t(this, A).right.addEventListener("touchstart", () => e(20)), t(this, A).track.addEventListener("mousedown", (r) => {
95
+ }), t(this, E).left.addEventListener("touchstart", () => e(-20)), t(this, E).right.addEventListener("touchstart", () => e(20)), t(this, E).track.addEventListener("mousedown", (r) => {
96
96
  if (r.button !== 0) return;
97
97
  r.preventDefault();
98
- const o = t(this, A).track.getBoundingClientRect(), i = t(this, A).thumb.clientWidth;
98
+ const o = t(this, E).track.getBoundingClientRect(), i = t(this, E).thumb.clientWidth;
99
99
  t(this, nt).call(this, r.clientX - o.left - i / 2);
100
- }), t(this, A).thumb.addEventListener("mousedown", (r) => {
100
+ }), t(this, E).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
- r.stopPropagation(), r.preventDefault(), p(this, K, !0), this.shiftX = r.clientX - t(this, A).thumb.getBoundingClientRect().left;
102
+ r.stopPropagation(), r.preventDefault(), p(this, K, !0), this.shiftX = r.clientX - t(this, E).thumb.getBoundingClientRect().left;
103
103
  const o = /* @__PURE__ */ h((a) => {
104
104
  if (!t(this, K)) return;
105
- const c = t(this, A).track.getBoundingClientRect();
105
+ const c = t(this, E).track.getBoundingClientRect();
106
106
  t(this, nt).call(this, a.clientX - c.left - this.shiftX);
107
107
  }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
108
108
  p(this, K, !1), n(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
@@ -182,7 +182,7 @@ const Ke = class Ke extends HTMLElement {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- p(this, A, {
185
+ p(this, E, {
186
186
  container: n,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -198,22 +198,22 @@ const Ke = class Ke extends HTMLElement {
198
198
  t(this, st) && t(this, st).disconnect();
199
199
  }
200
200
  };
201
- B = new WeakMap(), K = new WeakMap(), A = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), nt = new WeakMap(), Ut = new WeakMap(), h(Ke, "NineTableHScrollBar");
201
+ B = new WeakMap(), K = new WeakMap(), E = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), nt = new WeakMap(), Ut = new WeakMap(), h(Ke, "NineTableHScrollBar");
202
202
  let Se = Ke;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Se);
204
- var rt, ot, bt, C, Tt, Ct, Xt;
204
+ var rt, ot, bt, k, Tt, Ct, Xt;
205
205
  const Ge = class Ge extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
208
  d(this, rt);
209
209
  d(this, ot);
210
210
  d(this, bt, !1);
211
- d(this, C);
211
+ d(this, k);
212
212
  d(this, Tt, 0);
213
213
  d(this, Ct, 0);
214
- E(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (S.log("vscrollbar.refresh"), !t(this, rt) || !t(this, C)) return;
216
- const e = t(this, C).container, n = t(this, C).track, r = t(this, C).thumb, o = e.clientHeight, i = t(this, rt).data.length, a = t(this, ot).getRowHeight(), c = i * a;
214
+ q(this, "refresh", /* @__PURE__ */ h(() => {
215
+ if (S.log("vscrollbar.refresh"), !t(this, rt) || !t(this, k)) return;
216
+ const e = t(this, k).container, n = t(this, k).track, r = t(this, k).thumb, o = e.clientHeight, i = t(this, rt).data.length, a = t(this, ot).getRowHeight(), c = i * a;
217
217
  if (c <= o || i === 0) {
218
218
  this.style.display = "none";
219
219
  return;
@@ -228,42 +228,42 @@ const Ge = class Ge extends HTMLElement {
228
228
  let g = 0;
229
229
  b > 0 && (g = u / b * (l - f));
230
230
  const y = l - f;
231
- g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, C).top.disabled = u <= 0, t(this, C).bottom.disabled = u >= b - 1;
231
+ g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, k).top.disabled = u <= 0, t(this, k).bottom.disabled = u >= b - 1;
232
232
  }, "refresh"));
233
233
  d(this, Xt, /* @__PURE__ */ h(() => {
234
234
  S.log("nine-table-vscrollbar.#init");
235
- const e = t(this, C).container, n = /* @__PURE__ */ h(() => {
235
+ const e = t(this, k).container, n = /* @__PURE__ */ h(() => {
236
236
  const o = (t(this, rt).data.get() || []).length, i = t(this, ot).getRowHeight();
237
237
  return o * i;
238
238
  }, "getContentHeight");
239
- t(this, C).thumb.addEventListener("mousedown", (r) => {
239
+ t(this, k).thumb.addEventListener("mousedown", (r) => {
240
240
  if (r.button !== 0) return;
241
241
  r.stopPropagation(), r.preventDefault(), p(this, bt, !0), p(this, Tt, r.clientY), p(this, Ct, e.scrollTop);
242
242
  const o = /* @__PURE__ */ h((a) => {
243
243
  if (!t(this, bt)) return;
244
- const c = t(this, C).track.getBoundingClientRect(), l = t(this, C).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, Tt), g = e.clientHeight, y = n(), v = Math.max(y - g, 1);
245
- if (u > 0 && v > 0) {
246
- const w = b / u * v;
247
- let m = t(this, Ct) + w;
248
- const I = Math.max(0, y - g);
249
- m < 0 && (m = 0), m > I && (m = I), e.scrollTop = m;
244
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, Tt), g = e.clientHeight, y = n(), w = Math.max(y - g, 1);
245
+ if (u > 0 && w > 0) {
246
+ const v = b / u * w;
247
+ let m = t(this, Ct) + v;
248
+ const C = Math.max(0, y - g);
249
+ m < 0 && (m = 0), m > C && (m = C), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
252
252
  }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
253
253
  p(this, bt, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
254
254
  }, "onMouseUp");
255
255
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
256
- }), t(this, C).track.addEventListener("mousedown", (r) => {
257
- if (r.button !== 0 || r.target === t(this, C).thumb) return;
258
- const o = t(this, C).track.getBoundingClientRect(), i = t(this, C).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, f = e.clientHeight, u = n(), b = Math.max(u - f, 1);
256
+ }), t(this, k).track.addEventListener("mousedown", (r) => {
257
+ if (r.button !== 0 || r.target === t(this, k).thumb) return;
258
+ const o = t(this, k).track.getBoundingClientRect(), i = t(this, k).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, f = e.clientHeight, u = n(), b = Math.max(u - f, 1);
259
259
  if (l > 0 && b > 0) {
260
260
  const g = Math.max(0, Math.min(1, a / l));
261
261
  e.scrollTop = g * b;
262
262
  }
263
263
  this.refresh();
264
- }), t(this, C).top.addEventListener("click", () => {
264
+ }), t(this, k).top.addEventListener("click", () => {
265
265
  e.scrollTop -= 40;
266
- }), t(this, C).bottom.addEventListener("click", () => {
266
+ }), t(this, k).bottom.addEventListener("click", () => {
267
267
  e.scrollTop += 40;
268
268
  });
269
269
  }, "#init"));
@@ -339,7 +339,7 @@ const Ge = class Ge extends HTMLElement {
339
339
  setTimeout(e, 10);
340
340
  return;
341
341
  }
342
- p(this, C, {
342
+ p(this, k, {
343
343
  container: n,
344
344
  track: this.querySelector(".ng-scroll-track"),
345
345
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -350,7 +350,7 @@ const Ge = class Ge extends HTMLElement {
350
350
  e();
351
351
  }
352
352
  };
353
- rt = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), C = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Xt = new WeakMap(), h(Ge, "NineTableVScrollBar");
353
+ rt = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), k = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Xt = new WeakMap(), h(Ge, "NineTableVScrollBar");
354
354
  let Re = Ge;
355
355
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Re);
356
356
  var j, R, it, P, D, G, at, kt, ze, We, Kt, Gt, Lt, It, Ht, Zt, Jt, Mt, Be, pt, $t, Qt;
@@ -368,13 +368,13 @@ const Ze = class Ze {
368
368
  d(this, We, !1);
369
369
  //#ticking = false; // 🎯 고속 슀크둀 μŠ€λ‘œν‹€λ§μš© ν”Œλž˜κ·Έ
370
370
  d(this, Kt, 3);
371
- E(this, "refresh", /* @__PURE__ */ h(() => {
371
+ q(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
373
  S.log("rowManager.refresh");
374
374
  const s = t(this, R).querySelector(".ng-container-body .ng-part-body");
375
375
  s && (t(this, Lt).call(this), t(this, It).call(this), t(this, pt).call(this, s.scrollTop), (e = t(this, R).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
- E(this, "initialize", /* @__PURE__ */ h(() => {
377
+ q(this, "initialize", /* @__PURE__ */ h(() => {
378
378
  S.log("rowManager.initialize"), p(this, it, {
379
379
  scrollTables: t(this, R).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, R).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
@@ -467,26 +467,26 @@ const Ze = class Ze {
467
467
  var a, c, l, f, u, b;
468
468
  const s = t(this, R).querySelector(".ng-container-left .ng-part-body table"), e = t(this, R).querySelector(".ng-container-body .ng-part-body table"), n = t(this, R).querySelector(".ng-container-right .ng-part-body table");
469
469
  if (e) {
470
- const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), v = n ? Array.from(n.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, y.length, v.length);
471
- for (let m = 0; m < w; m++) {
472
- const I = [
470
+ const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), w = n ? Array.from(n.querySelectorAll("tbody tr")) : [], v = Math.max(g.length, y.length, w.length);
471
+ for (let m = 0; m < v; m++) {
472
+ const C = [
473
473
  ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
474
  ((c = y[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
- ((l = v[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
- ], T = Math.max(...I);
477
- T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`));
475
+ ((l = w[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
+ ], A = Math.max(...C);
477
+ A > 0 && (g[m] && (g[m].style.height = `${A}px`), y[m] && (y[m].style.height = `${A}px`), w[m] && (w[m].style.height = `${A}px`));
478
478
  }
479
479
  }
480
480
  const r = t(this, R).querySelector(".ng-container-left .ng-part-footer table"), o = t(this, R).querySelector(".ng-container-body .ng-part-footer table"), i = t(this, R).querySelector(".ng-container-right .ng-part-footer table");
481
481
  if (o) {
482
- const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, y.length, v.length);
483
- for (let m = 0; m < w; m++) {
484
- const I = [
482
+ const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), w = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], v = Math.max(g.length, y.length, w.length);
483
+ for (let m = 0; m < v; m++) {
484
+ const C = [
485
485
  ((f = g[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
486
  ((u = y[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
487
- ((b = v[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
- ], T = Math.max(...I);
489
- T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`));
487
+ ((b = w[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
+ ], A = Math.max(...C);
489
+ A > 0 && (g[m] && (g[m].style.height = `${A}px`), y[m] && (y[m].style.height = `${A}px`), w[m] && (w[m].style.height = `${A}px`));
490
490
  }
491
491
  }
492
492
  }, "#syncRowHeights"));
@@ -548,16 +548,16 @@ const Ze = class Ze {
548
548
  }), f !== a && (S.log(`πŸ”„ [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
549
549
  const y = t(this, R).querySelector(g);
550
550
  if (!y) return;
551
- const v = y.querySelector(".ng-part-body tbody.bindable-tbody");
552
- if (!v) return;
553
- Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((m, I) => {
554
- const T = a + Math.floor(I / r);
555
- if (T >= n) {
551
+ const w = y.querySelector(".ng-part-body tbody.bindable-tbody");
552
+ if (!w) return;
553
+ Array.from(w.querySelectorAll("tr:not(.nodata)")).forEach((m, C) => {
554
+ const A = a + Math.floor(C / r);
555
+ if (A >= n) {
556
556
  m.style.display = "none";
557
557
  return;
558
558
  }
559
- const H = t(this, j).data.get(T);
560
- m.style.display = "", t(this, $t).call(this, m, H, T);
559
+ const H = t(this, j).data.get(A);
560
+ m.style.display = "", t(this, $t).call(this, m, H, A);
561
561
  });
562
562
  }));
563
563
  }, "#handleScroll"));
@@ -597,7 +597,7 @@ const Ze = class Ze {
597
597
  g > 0 && (r[u] && (r[u].style.height = `${g}px`), o[u] && (o[u].style.height = `${g}px`), i[u] && (i[u].style.height = `${g}px`));
598
598
  }
599
599
  }, "#syncHeaderHeights"));
600
- E(this, "destroy", /* @__PURE__ */ h(() => {
600
+ q(this, "destroy", /* @__PURE__ */ h(() => {
601
601
  t(this, G) && (t(this, G).disconnect(), p(this, G, null));
602
602
  }, "destroy"));
603
603
  p(this, j, s.getRootNode().host), p(this, R, s), t(this, Jt).call(this);
@@ -629,9 +629,9 @@ const te = class te {
629
629
  const f = l.getAttribute("cell-type") || "renderer";
630
630
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
631
  let u = `cell-${f}`;
632
- const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), v = l.getAttribute("type");
633
- let w = [];
634
- b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), y && w.push(`maxbyte="${y}"`), v && w.push(`type="${v}"`), l.innerHTML = `<${u} ${w.join(" ")}></${u}>`;
632
+ const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), w = l.getAttribute("type");
633
+ let v = [];
634
+ b && v.push(`data-bind="${b}"`), g && v.push(`data-expr="${g}"`), y && v.push(`maxbyte="${y}"`), w && v.push(`type="${w}"`), l.innerHTML = `<${u} ${v.join(" ")}></${u}>`;
635
635
  }), a.querySelectorAll("tbody td, tfoot td").forEach((l) => {
636
636
  l.setAttribute("tabindex", "0");
637
637
  });
@@ -658,25 +658,25 @@ const te = class te {
658
658
  });
659
659
  const g = Array.from(Array(u), () => Array(b).fill(null));
660
660
  l.forEach((y) => {
661
- const v = y.sectionRowIndex;
662
- let w = 0;
661
+ const w = y.sectionRowIndex;
662
+ let v = 0;
663
663
  Array.from(y.querySelectorAll("th,td")).forEach((m) => {
664
- for (let H = 0; H < g[v].length; H++)
665
- if (g[v][H] === null) {
666
- w = H;
664
+ for (let H = 0; H < g[w].length; H++)
665
+ if (g[w][H] === null) {
666
+ v = H;
667
667
  break;
668
668
  }
669
- const I = m.rowSpan || 1, T = m.colSpan || 1;
670
- for (let H = 0; H < I; H++)
671
- for (let F = 0; F < T; F++)
672
- v + H < u && w + F < b && (g[v + H][w + F] = H === 0 && F === 0 ? "1" : "0");
669
+ const C = m.rowSpan || 1, A = m.colSpan || 1;
670
+ for (let H = 0; H < C; H++)
671
+ for (let F = 0; F < A; F++)
672
+ w + H < u && v + F < b && (g[w + H][v + F] = H === 0 && F === 0 ? "1" : "0");
673
673
  });
674
674
  }), l.forEach((y) => {
675
- const v = y.sectionRowIndex;
676
- Array.from(y.querySelectorAll("th,td")).forEach((w) => {
677
- for (let m = 0; m < g[v].length; m++)
678
- if (g[v][m] === "1") {
679
- w.dataset.col = m, g[v][m] = "0";
675
+ const w = y.sectionRowIndex;
676
+ Array.from(y.querySelectorAll("th,td")).forEach((v) => {
677
+ for (let m = 0; m < g[w].length; m++)
678
+ if (g[w][m] === "1") {
679
+ v.dataset.col = m, g[w][m] = "0";
680
680
  break;
681
681
  }
682
682
  });
@@ -699,7 +699,7 @@ const Je = class Je {
699
699
  d(this, U);
700
700
  d(this, _);
701
701
  d(this, Y, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
702
- E(this, "render", /* @__PURE__ */ h(() => {
702
+ q(this, "render", /* @__PURE__ */ h(() => {
703
703
  const { startRow: s, startCol: e, endRow: n, endCol: r } = t(this, Y);
704
704
  S.log("🎨 [CellSelection.render] Rendering range ->", t(this, Y));
705
705
  const o = t(this, _).querySelectorAll(
@@ -720,8 +720,8 @@ const Je = class Je {
720
720
  l < 0 || c.querySelectorAll("td, th").forEach((f) => {
721
721
  const u = parseInt(f.dataset.col, 10);
722
722
  if (isNaN(u)) return;
723
- const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), y = l + b - 1, v = u + g - 1;
724
- y >= s && l <= n && v >= e && u <= r && (i++, f.classList.add("selected"), S.log(f, s, e, n, r), l <= s && f.classList.add("selected-top"), y >= n && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), v >= r && f.classList.add("selected-right"));
723
+ const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), y = l + b - 1, w = u + g - 1;
724
+ y >= s && l <= n && w >= e && u <= r && (i++, f.classList.add("selected"), S.log(f, s, e, n, r), l <= s && f.classList.add("selected-top"), y >= n && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), w >= r && f.classList.add("selected-right"));
725
725
  });
726
726
  });
727
727
  }), S.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
@@ -746,12 +746,12 @@ const Je = class Je {
746
746
  b.querySelectorAll("tbody tr").forEach((g) => {
747
747
  if (g.classList.contains("nodata")) return;
748
748
  const { matrixRow: y } = Q(this, U, At).call(this, g);
749
- y < 0 || g.querySelectorAll("td, th").forEach((v) => {
750
- const w = parseInt(v.dataset.col, 10);
751
- if (isNaN(w)) return;
752
- const m = parseInt(v.rowSpan || 1, 10), I = parseInt(v.colSpan || 1, 10), T = y + m - 1, H = w + I - 1;
753
- if (T >= o && y <= i && H >= a && w <= c) {
754
- const X = Math.min(o, y), cs = Math.max(i, T), hs = Math.min(a, w), ds = Math.max(c, H);
749
+ y < 0 || g.querySelectorAll("td, th").forEach((w) => {
750
+ const v = parseInt(w.dataset.col, 10);
751
+ if (isNaN(v)) return;
752
+ const m = parseInt(w.rowSpan || 1, 10), C = parseInt(w.colSpan || 1, 10), A = y + m - 1, H = v + C - 1;
753
+ if (A >= o && y <= i && H >= a && v <= c) {
754
+ const X = Math.min(o, y), cs = Math.max(i, A), hs = Math.min(a, v), ds = Math.max(c, H);
755
755
  (X !== o || cs !== i || hs !== a || ds !== c) && (o = X, i = cs, a = hs, c = ds, f = !0);
756
756
  }
757
757
  });
@@ -783,26 +783,27 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
783
783
  return;
784
784
  }
785
785
  S.log(`πŸ–±οΈ [MouseDown Success] startRow: ${o}, startCol: ${i}`), this.setRange(o, i, o, i);
786
- const a = /* @__PURE__ */ h((l) => {
787
- const f = document.elementFromPoint(l.clientX, l.clientY);
788
- let u = f == null ? void 0 : f.closest("td, th");
789
- if (!u || !t(this, _).contains(u)) {
790
- const v = t(this, _).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
791
- for (const w of v) {
792
- const m = w.getBoundingClientRect();
793
- if (l.clientX >= m.left && l.clientX <= m.right && l.clientY >= m.top && l.clientY <= m.bottom) {
794
- u = w;
786
+ let a = o, c = i;
787
+ const l = /* @__PURE__ */ h((u) => {
788
+ const b = document.elementFromPoint(u.clientX, u.clientY);
789
+ let g = b == null ? void 0 : b.closest("td, th");
790
+ if (!g || !t(this, _).contains(g)) {
791
+ const m = t(this, _).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
792
+ for (const C of m) {
793
+ const A = C.getBoundingClientRect();
794
+ if (u.clientX >= A.left && u.clientX <= A.right && u.clientY >= A.top && u.clientY <= A.bottom) {
795
+ g = C;
795
796
  break;
796
797
  }
797
798
  }
798
799
  }
799
- if (!u || u.dataset.row === void 0 || u.dataset.col === void 0 || u.closest("tr").classList.contains("nodata")) return;
800
- const b = u.closest("tr"), { matrixRow: g } = Q(this, U, At).call(this, b), y = parseInt(u.dataset.col, 10);
801
- g < 0 || this.setRange(o, i, g, y);
802
- }, "onMouseMove"), c = /* @__PURE__ */ h(() => {
803
- S.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, _).style.userSelect = "", t(this, _).style.webkitUserSelect = "", document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c);
800
+ if (!g || g.dataset.row === void 0 || g.dataset.col === void 0 || g.closest("tr").classList.contains("nodata")) return;
801
+ const y = g.closest("tr"), { matrixRow: w } = Q(this, U, At).call(this, y), v = parseInt(g.dataset.col, 10);
802
+ w < 0 || a === w && c === v || (a = w, c = v, this.setRange(o, i, w, v));
803
+ }, "onMouseMove"), f = /* @__PURE__ */ h(() => {
804
+ S.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, _).style.userSelect = "", t(this, _).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", f);
804
805
  }, "onMouseUp");
805
- document.addEventListener("mousemove", a), document.addEventListener("mouseup", c);
806
+ document.addEventListener("mousemove", l), document.addEventListener("mouseup", f);
806
807
  });
807
808
  }, "#initEvents"), h(Je, "CellSelection");
808
809
  let qe = Je;
@@ -837,7 +838,7 @@ const Qe = class Qe {
837
838
  }
838
839
  }
839
840
  moveCell(s) {
840
- var I, T, H, F;
841
+ var C, A, H, F;
841
842
  if (!t(this, lt)) return;
842
843
  const e = t(this, lt), n = e.closest("tr"), r = parseInt(e.dataset.row, 10), o = parseInt(e.dataset.col, 10), i = n == null ? void 0 : n.closest("tbody"), c = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((X) => parseInt(X.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, f = c.indexOf(n);
843
844
  let u = r, b = f, g = o;
@@ -863,7 +864,7 @@ const Qe = class Qe {
863
864
  if (m && (y = m.querySelector(`[data-col="${g}"]`)), y)
864
865
  this.currentCell = y;
865
866
  else if (u !== r && u >= 0) {
866
- const X = ((T = (I = t(this, V)).getRowHeight) == null ? void 0 : T.call(I)) || 40;
867
+ const X = ((A = (C = t(this, V)).getRowHeight) == null ? void 0 : A.call(C)) || 40;
867
868
  (F = (H = t(this, V)).scrollToY) == null || F.call(H, u * X);
868
869
  }
869
870
  }
@@ -886,10 +887,10 @@ const Et = class Et extends HTMLElement {
886
887
  d(this, ht);
887
888
  d(this, Nt);
888
889
  d(this, Dt);
889
- E(this, "invalidate", /* @__PURE__ */ h(() => {
890
+ q(this, "invalidate", /* @__PURE__ */ h(() => {
890
891
  S.log("sheet.invalidate()"), t(this, ht).refresh();
891
892
  }, "invalidate"));
892
- E(this, "generate", /* @__PURE__ */ h((e) => {
893
+ q(this, "generate", /* @__PURE__ */ h((e) => {
893
894
  if (S.log("sheet.generate()"), !e) return;
894
895
  p(this, ct, Ee.compile(e)), t(this, oe).call(this), t(this, ie).call(this);
895
896
  const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
@@ -935,12 +936,12 @@ const Et = class Et extends HTMLElement {
935
936
  l.remove();
936
937
  }), o;
937
938
  }, "#createSplitTable"));
938
- E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, ht).getRowHeight(), "getRowHeight"));
939
- E(this, "scrollToX", /* @__PURE__ */ h((e) => {
939
+ q(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, ht).getRowHeight(), "getRowHeight"));
940
+ q(this, "scrollToX", /* @__PURE__ */ h((e) => {
940
941
  const n = this.querySelector(".ng-container-body .ng-part-body");
941
942
  n && (n.scrollLeft = e);
942
943
  }, "scrollToX"));
943
- E(this, "scrollToY", /* @__PURE__ */ h((e) => {
944
+ q(this, "scrollToY", /* @__PURE__ */ h((e) => {
944
945
  const n = this.querySelector(".ng-container-body .ng-part-body");
945
946
  n && (n.scrollTop = e);
946
947
  }, "scrollToY"));
@@ -1164,7 +1165,7 @@ const Et = class Et extends HTMLElement {
1164
1165
  this.innerHTML = "", S.log("NineTableSheet destroyed.");
1165
1166
  }
1166
1167
  };
1167
- re = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), Nt = new WeakMap(), Dt = new WeakMap(), oe = new WeakMap(), ie = new WeakMap(), yt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), h(Et, "NineTableSheet"), E(Et, "SCROLLBAR_SIZE", 16);
1168
+ re = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), Nt = new WeakMap(), Dt = new WeakMap(), oe = new WeakMap(), ie = new WeakMap(), yt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), h(Et, "NineTableSheet"), q(Et, "SCROLLBAR_SIZE", 16);
1168
1169
  let Yt = Et;
1169
1170
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Yt);
1170
1171
  var ce, Ot;
@@ -1185,8 +1186,8 @@ const ts = class ts extends HTMLElement {
1185
1186
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1186
1187
  const b = f.filter((g) => g.classList.contains("active"));
1187
1188
  b.length < 2 || b.forEach((g) => {
1188
- const y = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${y}"]`), w = f[y + 1];
1189
- v && w && w.classList.contains("active") && v.style.setProperty("display", "flex");
1189
+ const y = parseInt(g.getAttribute("data-index"), 10), w = this.querySelector(`nine-splitter[data-split-index="${y}"]`), v = f[y + 1];
1190
+ w && v && v.classList.contains("active") && w.style.setProperty("display", "flex");
1190
1191
  });
1191
1192
  }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), c = i.querySelectorAll("nine-table-sheet");
1192
1193
  if (!a[e]) return;
@@ -1378,7 +1379,7 @@ const ss = class ss {
1378
1379
  constructor(s) {
1379
1380
  d(this, Wt);
1380
1381
  d(this, mt, -1);
1381
- E(this, "count", /* @__PURE__ */ h(() => t(this, Wt).rawRecords.length, "count"));
1382
+ q(this, "count", /* @__PURE__ */ h(() => t(this, Wt).rawRecords.length, "count"));
1382
1383
  p(this, Wt, s);
1383
1384
  }
1384
1385
  get at() {
@@ -1391,11 +1392,11 @@ const ss = class ss {
1391
1392
  };
1392
1393
  Wt = new WeakMap(), mt = new WeakMap(), h(ss, "ngRow");
1393
1394
  let Le = ss;
1394
- var O, k, z, xt, fe, Z, ue, dt, Bt, ge, be, vt;
1395
+ var O, L, z, xt, fe, Z, ue, dt, Bt, ge, be, wt;
1395
1396
  const W = class W {
1396
1397
  constructor(s, e) {
1397
1398
  d(this, O);
1398
- d(this, k);
1399
+ d(this, L);
1399
1400
  d(this, z, []);
1400
1401
  d(this, xt, []);
1401
1402
  d(this, fe, 0);
@@ -1406,7 +1407,7 @@ const W = class W {
1406
1407
  Array.from(s).forEach((e) => {
1407
1408
  var n;
1408
1409
  t(this, Z).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1409
- }), (t(this, k).rawRecords || []).forEach((e) => {
1410
+ }), (t(this, L).rawRecords || []).forEach((e) => {
1410
1411
  e.__ng || (e.__ng = t(this, Bt).call(this)), e.__ng.height = t(this, Z).slice();
1411
1412
  });
1412
1413
  }, "#initialize"));
@@ -1416,20 +1417,20 @@ const W = class W {
1416
1417
  e.invalidate();
1417
1418
  });
1418
1419
  }, "#invalidate"));
1419
- E(this, "get", /* @__PURE__ */ h((s, e) => {
1420
+ q(this, "get", /* @__PURE__ */ h((s, e) => {
1420
1421
  var o;
1421
1422
  const n = this.getValidData();
1422
1423
  if (!n || n.length <= 0) return;
1423
- if (s == null) return t(this, vt).call(this, n);
1424
+ if (s == null) return t(this, wt).call(this, n);
1424
1425
  if (s < 0 || s >= n.length) return null;
1425
1426
  const r = typeof ((o = t(this, O).fields) == null ? void 0 : o.get) == "function" ? t(this, O).fields.get() : [];
1426
1427
  if (e != null) {
1427
1428
  const i = r.indexOf(e);
1428
1429
  return i >= 0 ? n[s].v[i] : null;
1429
1430
  }
1430
- return t(this, vt).call(this, n[s]);
1431
+ return t(this, wt).call(this, n[s]);
1431
1432
  }, "get"));
1432
- E(this, "set", /* @__PURE__ */ h((s) => {
1433
+ q(this, "set", /* @__PURE__ */ h((s) => {
1433
1434
  this.clear(), this.add(s, !1), t(this, dt).call(this);
1434
1435
  }, "set"));
1435
1436
  d(this, Bt, /* @__PURE__ */ h(() => ({
@@ -1441,12 +1442,12 @@ const W = class W {
1441
1442
  c: {},
1442
1443
  _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Z).slice(), -1, {}, {}]
1443
1444
  }), "#getDefaultMeta"));
1444
- E(this, "reset", /* @__PURE__ */ h(() => {
1445
+ q(this, "reset", /* @__PURE__ */ h(() => {
1445
1446
  p(this, z, []), p(this, xt, []), t(this, dt).call(this);
1446
1447
  }, "reset"));
1447
- E(this, "clear", /* @__PURE__ */ h(() => {
1448
+ q(this, "clear", /* @__PURE__ */ h(() => {
1448
1449
  var s;
1449
- t(this, k).rawRecords = [], p(this, z, []), p(this, xt, []), (s = t(this, k).viewRecords) != null && s.reset && t(this, k).viewRecords.reset();
1450
+ t(this, L).rawRecords = [], p(this, z, []), p(this, xt, []), (s = t(this, L).viewRecords) != null && s.reset && t(this, L).viewRecords.reset();
1450
1451
  }, "clear"));
1451
1452
  d(this, ge, /* @__PURE__ */ h((s) => {
1452
1453
  var r;
@@ -1462,28 +1463,28 @@ const W = class W {
1462
1463
  d(this, be, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1463
1464
  e.__ng = t(this, Bt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1464
1465
  }), s), "#defaultInsert"));
1465
- E(this, "add", /* @__PURE__ */ h((s, e = !0) => {
1466
+ q(this, "add", /* @__PURE__ */ h((s, e = !0) => {
1466
1467
  s === void 0 && (s = {});
1467
1468
  const n = t(this, ge).call(this, s);
1468
- t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, be).call(this, n)), this.resetRecords();
1469
+ t(this, L).rawRecords = t(this, L).rawRecords.concat(t(this, be).call(this, n)), this.resetRecords();
1469
1470
  const r = this.count() - 1;
1470
1471
  return e || n.forEach((o, i) => {
1471
- const a = t(this, k).rawRecords[r - i];
1472
+ const a = t(this, L).rawRecords[r - i];
1472
1473
  a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
1473
1474
  }), t(this, dt).call(this), r;
1474
1475
  }, "add"));
1475
- E(this, "delete", /* @__PURE__ */ h((s) => {
1476
+ q(this, "delete", /* @__PURE__ */ h((s) => {
1476
1477
  let e = [];
1477
- Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(s, 10)], e.sort((n, r) => r - n).forEach((n) => {
1478
+ Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, L).host.row.at] : e = [parseInt(s, 10)], e.sort((n, r) => r - n).forEach((n) => {
1478
1479
  if (t(this, z)[n]) {
1479
1480
  const r = t(this, z)[n].__ng.rowid;
1480
- t(this, z)[n].__ng.rowState === W.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, k).rawRecords.forEach((o) => {
1481
+ t(this, z)[n].__ng.rowState === W.ROW_STATE.INSERT ? t(this, L).rawRecords = t(this, L).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, L).rawRecords.forEach((o) => {
1481
1482
  o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = W.ROW_STATE.DELETE);
1482
1483
  });
1483
1484
  }
1484
1485
  }), this.resetRecords(), t(this, dt).call(this);
1485
1486
  }, "delete"));
1486
- E(this, "setValue", /* @__PURE__ */ h((s, e, n) => {
1487
+ q(this, "setValue", /* @__PURE__ */ h((s, e, n) => {
1487
1488
  var c;
1488
1489
  s = parseInt(s, 10);
1489
1490
  const o = (typeof ((c = t(this, O).fields) == null ? void 0 : c.get) == "function" ? t(this, O).fields.get() : []).indexOf(e);
@@ -1493,15 +1494,15 @@ const W = class W {
1493
1494
  const a = i.v[o];
1494
1495
  a !== n && i.__ng.rowState !== W.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = W.ROW_STATE.UPDATE), i.v[o] = n;
1495
1496
  }, "setValue"));
1496
- E(this, "resetRecords", /* @__PURE__ */ h(() => {
1497
- p(this, xt, t(this, k).rawRecords.filter((s) => !s.__ng.deleted)), p(this, z, t(this, k).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, k).rawRecords.forEach((s, e) => {
1497
+ q(this, "resetRecords", /* @__PURE__ */ h(() => {
1498
+ p(this, xt, t(this, L).rawRecords.filter((s) => !s.__ng.deleted)), p(this, z, t(this, L).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, L).rawRecords.forEach((s, e) => {
1498
1499
  s.__ng.rowidx = e;
1499
1500
  }), t(this, z).forEach((s, e) => {
1500
1501
  s.__ng.i = e;
1501
1502
  });
1502
1503
  }, "resetRecords"));
1503
- E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, z).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, z)), "getValidData"));
1504
- d(this, vt, /* @__PURE__ */ h((s) => {
1504
+ q(this, "getValidData", /* @__PURE__ */ h(() => (t(this, z).length === 0 && t(this, L).rawRecords.length > 0 && this.resetRecords(), t(this, z)), "getValidData"));
1505
+ d(this, wt, /* @__PURE__ */ h((s) => {
1505
1506
  var i;
1506
1507
  if (!s) return s;
1507
1508
  const e = !Array.isArray(s), n = e ? [s] : s, r = typeof ((i = t(this, O).fields) == null ? void 0 : i.get) == "function" ? t(this, O).fields.get() : [], o = n.filter((a) => !a.__ng.deleted).map((a) => {
@@ -1512,11 +1513,11 @@ const W = class W {
1512
1513
  });
1513
1514
  return e ? o[0] : o;
1514
1515
  }, "#conv"));
1515
- E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1516
- p(this, O, s), p(this, k, e), t(this, ue).call(this);
1516
+ q(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1517
+ p(this, O, s), p(this, L, e), t(this, ue).call(this);
1517
1518
  }
1518
1519
  get source() {
1519
- return t(this, vt).call(this, t(this, k).rawRecords);
1520
+ return t(this, wt).call(this, t(this, L).rawRecords);
1520
1521
  }
1521
1522
  set source(s) {
1522
1523
  this.clear(), this.add(s, !1);
@@ -1534,8 +1535,8 @@ const W = class W {
1534
1535
  return this.length;
1535
1536
  }
1536
1537
  };
1537
- O = new WeakMap(), k = new WeakMap(), z = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), Z = new WeakMap(), ue = new WeakMap(), dt = new WeakMap(), Bt = new WeakMap(), ge = new WeakMap(), be = new WeakMap(), vt = new WeakMap(), h(W, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1538
- E(W, "ROW_STATE", {
1538
+ O = new WeakMap(), L = new WeakMap(), z = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), Z = new WeakMap(), ue = new WeakMap(), dt = new WeakMap(), Bt = new WeakMap(), ge = new WeakMap(), be = new WeakMap(), wt = new WeakMap(), h(W, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1539
+ q(W, "ROW_STATE", {
1539
1540
  EMPTY: "EMPTY",
1540
1541
  NORMAL: "NORMAL",
1541
1542
  INSERT: "INSERT",
@@ -1566,13 +1567,13 @@ const ns = class ns {
1566
1567
  };
1567
1568
  ft = new WeakMap(), h(ns, "ngDataManager");
1568
1569
  let He = ns;
1569
- var wt, M, Pt, pe;
1570
+ var vt, M, Pt, pe;
1570
1571
  const rs = class rs {
1571
1572
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1572
1573
  constructor(s) {
1573
- d(this, wt);
1574
+ d(this, vt);
1574
1575
  d(this, M, []);
1575
- E(this, "add", /* @__PURE__ */ h((s, e = "string") => {
1576
+ q(this, "add", /* @__PURE__ */ h((s, e = "string") => {
1576
1577
  s.forEach((n) => {
1577
1578
  t(this, M).some((r) => r.name === n) || t(this, M).push({ name: n, type: e });
1578
1579
  }), t(this, Pt).call(this);
@@ -1584,8 +1585,8 @@ const rs = class rs {
1584
1585
  }), p(this, M, Array.from(s, ([e, n]) => ({ name: e, type: n }))), p(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
1585
1586
  }, "#adjust"));
1586
1587
  d(this, pe, /* @__PURE__ */ h(() => {
1587
- p(this, M, []), S.log(t(this, wt).querySelectorAll("table"));
1588
- const s = Array.from(t(this, wt).querySelectorAll("table"));
1588
+ p(this, M, []), S.log(t(this, vt).querySelectorAll("table"));
1589
+ const s = Array.from(t(this, vt).querySelectorAll("table"));
1589
1590
  if (!(!s || s.length === 0)) {
1590
1591
  for (const e of s)
1591
1592
  S.log(e), $("[data-bind]", e).each((n, r) => {
@@ -1615,7 +1616,7 @@ const rs = class rs {
1615
1616
  t(this, Pt).call(this);
1616
1617
  }
1617
1618
  }, "#init"));
1618
- p(this, wt, s), t(this, pe).call(this);
1619
+ p(this, vt, s), t(this, pe).call(this);
1619
1620
  }
1620
1621
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1621
1622
  get() {
@@ -1637,7 +1638,7 @@ const rs = class rs {
1637
1638
  return t(this, M).some((e) => e.name === s);
1638
1639
  }
1639
1640
  };
1640
- wt = new WeakMap(), M = new WeakMap(), Pt = new WeakMap(), pe = new WeakMap(), h(rs, "ngFields");
1641
+ vt = new WeakMap(), M = new WeakMap(), Pt = new WeakMap(), pe = new WeakMap(), h(rs, "ngFields");
1641
1642
  let Me = rs;
1642
1643
  var ut, ye, me;
1643
1644
  const os = class os extends HTMLElement {
@@ -1684,20 +1685,20 @@ const qt = class qt extends HTMLElement {
1684
1685
  connectedCallback() {
1685
1686
  }
1686
1687
  };
1687
- h(qt, "BasicCellElement"), E(qt, "_styleCache", /* @__PURE__ */ new Map()), E(qt, "_customStyleCache", /* @__PURE__ */ new Map());
1688
+ h(qt, "BasicCellElement"), q(qt, "_styleCache", /* @__PURE__ */ new Map()), q(qt, "_customStyleCache", /* @__PURE__ */ new Map());
1688
1689
  let _e = qt;
1689
- var L, Ft, x, Pe, Fe, je, Ye, Ve;
1690
+ var I, Ft, x, Pe, Fe, je, Ye, Ve;
1690
1691
  const is = class is extends _e {
1691
1692
  constructor() {
1692
1693
  super();
1693
- d(this, L);
1694
+ d(this, I);
1694
1695
  d(this, Ft);
1695
1696
  d(this, x);
1696
1697
  d(this, Pe);
1697
1698
  d(this, Fe);
1698
1699
  d(this, je);
1699
1700
  d(this, Ye);
1700
- E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1701
+ q(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1701
1702
  if (t(this, x))
1702
1703
  if (t(this, x).closest("tbody")) {
1703
1704
  const n = t(this, x).closest("tr").data, r = parseInt(t(this, x).dataset.row);
@@ -1713,26 +1714,26 @@ const is = class is extends _e {
1713
1714
  return ninegrid.nvl(e, "");
1714
1715
  } else
1715
1716
  try {
1716
- return t(this, L).exprFunction(t(this, x).dataset.expr).call(this, null, -1, t(this, L).data);
1717
+ return t(this, I).exprFunction(t(this, x).dataset.expr).call(this, null, -1, t(this, I).data);
1717
1718
  } catch {
1718
1719
  }
1719
1720
  }, "getDisplayText"));
1720
1721
  d(this, Ve, /* @__PURE__ */ h(() => {
1721
- if (!(!t(this, L) || !t(this, L).template || !t(this, x).closest("tbody.bindable"))) {
1722
+ if (!(!t(this, I) || !t(this, I).template || !t(this, x).closest("tbody.bindable"))) {
1722
1723
  var e = ninegrid.j.querySelectorAll(t(this, x)).attr("suppress");
1723
1724
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1724
1725
  var n = t(this, x).closest("tr"), r = [];
1725
- $("th,td", n).each((m, I) => {
1726
- var T = ninegrid.j.querySelectorAll(I).attr("suppress");
1727
- T && I.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && r.push(T));
1726
+ $("th,td", n).each((m, C) => {
1727
+ var A = ninegrid.j.querySelectorAll(C).attr("suppress");
1728
+ A && C.dataset.row && (A = parseInt(A), !isNaN(A) && A <= e && r.push(A));
1728
1729
  }), r.sort();
1729
1730
  var o = !1;
1730
- if (parseInt(n.sectionRowIndex / t(this, L).template.length) > 0)
1731
+ if (parseInt(n.sectionRowIndex / t(this, I).template.length) > 0)
1731
1732
  for (var i of r) {
1732
1733
  if (i > e) break;
1733
- var a = parseInt(t(this, x).dataset.row), c = a - 1, l = t(this, x).closest("tr").data, f = t(this, L).data.get(c);
1734
+ var a = parseInt(t(this, x).dataset.row), c = a - 1, l = t(this, x).closest("tr").data, f = t(this, I).data.get(c);
1734
1735
  t(this, x).dataset.matrixRow;
1735
- var u = t(this, L).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, x).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, a) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1736
+ var u = t(this, I).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, x).dataset.matrixRow}"]`), b = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, a) : l[u.dataset.bind], g = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1736
1737
  if (b != g) {
1737
1738
  o = !0;
1738
1739
  break;
@@ -1741,17 +1742,17 @@ const is = class is extends _e {
1741
1742
  else
1742
1743
  o = !0;
1743
1744
  o ? ninegrid.j.querySelectorAll(t(this, x)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, x)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, x)).hasClass("hidden") || (o ? ninegrid.j.querySelectorAll(t(this, x)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, x)).addClass("hidden"));
1744
- var y = parseInt(t(this, x).dataset.matrixRow), v = y - 1, w = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, x).dataset.col}"][data-matrix-row="${v}"]`);
1745
- $(w).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").addClass("last-suppress") : !$(w).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").removeClass("last-suppress");
1745
+ var y = parseInt(t(this, x).dataset.matrixRow), w = y - 1, v = t(this, I).body.querySelector(`tbody.bindable [data-col="${t(this, x).dataset.col}"][data-matrix-row="${w}"]`);
1746
+ $(v).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(v).removeClass("last-none-suppress").addClass("last-suppress") : !$(v).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(v).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(v).removeClass("last-none-suppress").removeClass("last-suppress");
1746
1747
  }
1747
1748
  }
1748
1749
  }, "#resetSuppress"));
1749
- E(this, "getExprValue", /* @__PURE__ */ h((e, n, r, o) => {
1750
+ q(this, "getExprValue", /* @__PURE__ */ h((e, n, r, o) => {
1750
1751
  if (typeof e < "u")
1751
1752
  try {
1752
1753
  r = parseInt(r);
1753
1754
  const i = e.replace("()", "");
1754
- return t(this, L)[i] ? t(this, L)[i].call(this, n, r, t(this, x)) : t(this, L).exprFunction(e).call(this, n, r, t(this, L).data);
1755
+ return t(this, I)[i] ? t(this, I)[i].call(this, n, r, t(this, x)) : t(this, I).exprFunction(e).call(this, n, r, t(this, I).data);
1755
1756
  } catch {
1756
1757
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1757
1758
  }
@@ -1760,16 +1761,16 @@ const is = class is extends _e {
1760
1761
  }, "getExprValue"));
1761
1762
  }
1762
1763
  connectedCallback() {
1763
- super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this, Ft, t(this, x).closest("tr"));
1764
+ super.connectedCallback(), p(this, I, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this, Ft, t(this, x).closest("tr"));
1764
1765
  }
1765
1766
  get value() {
1766
- var e = !t(this, L) || !t(this, L).dataManager || !t(this, x) || !t(this, x).dataset || !t(this, x).dataset.row || !t(this, x).dataset.bind ? "" : t(this, x).closest("tr").data[t(this, x).dataset.bind];
1767
+ var e = !t(this, I) || !t(this, I).dataManager || !t(this, x) || !t(this, x).dataset || !t(this, x).dataset.row || !t(this, x).dataset.bind ? "" : t(this, x).closest("tr").data[t(this, x).dataset.bind];
1767
1768
  return e ?? "";
1768
1769
  }
1769
1770
  set value(e) {
1770
1771
  var n = parseInt(t(this, x).dataset.row);
1771
1772
  const r = this.getAttribute("update-row-state") != "false";
1772
- n < 0 ? t(this, L).data.setValueNF(parseInt(t(this, x).dataset.index), t(this, x).dataset.bind, e, r) : t(this, L).data.setValue(n, t(this, x).dataset.bind, e, r);
1773
+ n < 0 ? t(this, I).data.setValueNF(parseInt(t(this, x).dataset.index), t(this, x).dataset.bind, e, r) : t(this, I).data.setValue(n, t(this, x).dataset.bind, e, r);
1773
1774
  }
1774
1775
  get row() {
1775
1776
  return parseInt(t(this, x).dataset.row);
@@ -1782,7 +1783,7 @@ const is = class is extends _e {
1782
1783
  return parseInt(t(this, x).dataset.row), t(this, Ft).data[e];
1783
1784
  }
1784
1785
  };
1785
- L = new WeakMap(), Ft = new WeakMap(), x = new WeakMap(), Pe = new WeakMap(), Fe = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), h(is, "CellElement");
1786
+ I = new WeakMap(), Ft = new WeakMap(), x = new WeakMap(), Pe = new WeakMap(), Fe = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), h(is, "CellElement");
1786
1787
  let Ne = is;
1787
1788
  const as = class as extends Ne {
1788
1789
  constructor() {
@@ -1807,7 +1808,7 @@ const ls = class ls extends De {
1807
1808
  d(this, Rt);
1808
1809
  d(this, xe);
1809
1810
  d(this, J);
1810
- E(this, "refresh", /* @__PURE__ */ h(() => {
1811
+ q(this, "refresh", /* @__PURE__ */ h(() => {
1811
1812
  const e = super.refresh();
1812
1813
  t(this, jt).value = e;
1813
1814
  }, "refresh"));