@ninebone/table 0.0.694 → 0.0.696

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,118 +1,118 @@
1
- var Fe = Object.defineProperty;
2
- var Ve = (q) => {
3
- throw TypeError(q);
1
+ var es = Object.defineProperty;
2
+ var ss = (R) => {
3
+ throw TypeError(R);
4
4
  };
5
- var Xe = (q, r, e) => r in q ? Fe(q, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[r] = e;
6
- var h = (q, r) => Fe(q, "name", { value: r, configurable: !0 });
7
- var E = (q, r, e) => Xe(q, typeof r != "symbol" ? r + "" : r, e), Ye = (q, r, e) => r.has(q) || Ve("Cannot " + e);
8
- var t = (q, r, e) => (Ye(q, r, "read from private field"), e ? e.call(q) : r.get(q)), d = (q, r, e) => r.has(q) ? Ve("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(q) : r.set(q, e), y = (q, r, e, s) => (Ye(q, r, "write to private field"), s ? s.call(q, e) : r.set(q, e), e);
9
- var Ue = (q, r, e, s) => ({
10
- set _(i) {
11
- y(q, r, i, e);
5
+ var is = (R, n, e) => n in R ? es(R, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[n] = e;
6
+ var h = (R, n) => es(R, "name", { value: n, configurable: !0 });
7
+ var E = (R, n, e) => is(R, typeof n != "symbol" ? n + "" : n, e), he = (R, n, e) => n.has(R) || ss("Cannot " + e);
8
+ var t = (R, n, e) => (he(R, n, "read from private field"), e ? e.call(R) : n.get(R)), d = (R, n, e) => n.has(R) ? ss("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(R) : n.set(R, e), p = (R, n, e, s) => (he(R, n, "write to private field"), s ? s.call(R, e) : n.set(R, e), e), de = (R, n, e) => (he(R, n, "access private method"), e);
9
+ var ns = (R, n, e, s) => ({
10
+ set _(r) {
11
+ p(R, n, r, e);
12
12
  },
13
13
  get _() {
14
- return t(q, r, s);
14
+ return t(R, n, s);
15
15
  }
16
16
  });
17
- import { trace as Ke } from "@ninebone/util";
18
- const He = class He extends Ke.constructor {
17
+ import { trace as as } from "@ninebone/util";
18
+ const Oe = class Oe extends as.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(He, "Trace");
24
- let oe = He;
25
- const R = new oe();
26
- var z, j, S, U, X, K, _t, Z, Nt;
27
- const $e = class $e extends HTMLElement {
23
+ h(Oe, "Trace");
24
+ let fe = Oe;
25
+ const T = new fe();
26
+ var z, V, S, K, Z, G, Bt, J, zt;
27
+ const Be = class Be extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  d(this, z);
31
- d(this, j, !1);
31
+ d(this, V, !1);
32
32
  d(this, S);
33
- d(this, U);
34
- d(this, X);
35
33
  d(this, K);
36
- d(this, _t, /* @__PURE__ */ h(() => {
34
+ d(this, Z);
35
+ d(this, G);
36
+ d(this, Bt, /* @__PURE__ */ h(() => {
37
37
  if (!t(this, z)) return;
38
38
  const e = t(this, z).querySelector(".ng-container-body .ng-part-body");
39
- e && (y(this, K, new ResizeObserver(() => {
39
+ e && (p(this, G, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, K).observe(e));
41
+ })), t(this, G).observe(e));
42
42
  }, "#observeResize"));
43
43
  E(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!t(this, z) || !t(this, S) || t(this, j)) return;
44
+ if (!t(this, z) || !t(this, S) || t(this, V)) return;
45
45
  const e = t(this, S).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const i = t(this, S).track, n = t(this, S).thumb, o = t(this, z).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
47
+ const r = t(this, S).track, o = t(this, S).thumb, i = t(this, z).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
48
48
  if (a !== 0 && c > a)
49
- o && (o.style.display = "flex");
49
+ i && (i.style.display = "flex");
50
50
  else {
51
- o && (o.style.display = "none");
51
+ i && (i.style.display = "none");
52
52
  return;
53
53
  }
54
- const l = i.clientWidth;
54
+ const l = r.clientWidth;
55
55
  if (l <= 0) return;
56
56
  const f = Math.max(Math.min(l * (a / c), l), 20);
57
- n.style.width = `${f}px`;
57
+ o.style.width = `${f}px`;
58
58
  const g = e.scrollLeft, b = c - a;
59
59
  let u = 0;
60
60
  b > 0 && (u = parseInt(g / b * (l - f), 10)), u < 0 && (u = 0);
61
- const v = l - f;
62
- u > v && (u = v), n.style.left = `${u}px`, t(this, S).left.disabled = u === 0, t(this, S).right.disabled = u >= v - 1;
61
+ const y = l - f;
62
+ u > y && (u = y), o.style.left = `${u}px`, t(this, S).left.disabled = u === 0, t(this, S).right.disabled = u >= y - 1;
63
63
  }, "refresh"));
64
- d(this, Z, /* @__PURE__ */ h((e) => {
64
+ d(this, J, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, S)) return !1;
66
- const s = t(this, S).container, i = s.querySelector("table");
67
- if (!i) return !1;
68
- const n = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientWidth;
66
+ const s = t(this, S).container, r = s.querySelector("table");
67
+ if (!r) return !1;
68
+ const o = t(this, S).track.getBoundingClientRect(), i = t(this, S).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
- const c = n.width - o;
71
+ const c = o.width - i;
72
72
  a > c && (a = c), a = parseInt(a, 10), t(this, S).thumb.style.left = `${a}px`, t(this, S).left.disabled = a === 0, t(this, S).right.disabled = a >= c - 1;
73
- const l = s.clientWidth, g = i.scrollWidth - l;
73
+ const l = s.clientWidth, g = r.scrollWidth - l;
74
74
  return c > 0 && g > 0 && (s.scrollLeft = a / c * g), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, Nt, /* @__PURE__ */ h(() => {
77
- const e = /* @__PURE__ */ h((i) => {
78
- clearInterval(t(this, U)), clearInterval(t(this, X));
79
- const n = parseInt(t(this, S).thumb.style.left || 0, 10);
80
- t(this, Z).call(this, n + i), y(this, U, setInterval(() => {
81
- clearInterval(t(this, U)), y(this, X, setInterval(() => {
82
- const o = parseInt(t(this, S).thumb.style.left || 0, 10);
83
- t(this, Z).call(this, o + i) || clearInterval(t(this, X));
76
+ d(this, zt, /* @__PURE__ */ h(() => {
77
+ const e = /* @__PURE__ */ h((r) => {
78
+ clearInterval(t(this, K)), clearInterval(t(this, Z));
79
+ const o = parseInt(t(this, S).thumb.style.left || 0, 10);
80
+ t(this, J).call(this, o + r), p(this, K, setInterval(() => {
81
+ clearInterval(t(this, K)), p(this, Z, setInterval(() => {
82
+ const i = parseInt(t(this, S).thumb.style.left || 0, 10);
83
+ t(this, J).call(this, i + r) || clearInterval(t(this, Z));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
- clearInterval(t(this, U)), clearInterval(t(this, X));
87
+ clearInterval(t(this, K)), clearInterval(t(this, Z));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((i) => {
90
- t(this, S).left.addEventListener(i, s), t(this, S).right.addEventListener(i, s), t(this, S).track.addEventListener(i, s);
91
- }), t(this, S).left.addEventListener("mousedown", (i) => {
92
- i.button === 0 && e(-20);
93
- }), t(this, S).right.addEventListener("mousedown", (i) => {
94
- i.button === 0 && e(20);
95
- }), t(this, S).left.addEventListener("touchstart", () => e(-20)), t(this, S).right.addEventListener("touchstart", () => e(20)), t(this, S).track.addEventListener("mousedown", (i) => {
96
- if (i.button !== 0) return;
97
- i.preventDefault();
98
- const n = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientWidth;
99
- t(this, Z).call(this, i.clientX - n.left - o / 2);
100
- }), t(this, S).thumb.addEventListener("mousedown", (i) => {
101
- if (i.button !== 0) return;
102
- i.stopPropagation(), i.preventDefault(), y(this, j, !0), this.shiftX = i.clientX - t(this, S).thumb.getBoundingClientRect().left;
103
- const n = /* @__PURE__ */ h((a) => {
104
- if (!t(this, j)) return;
89
+ ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
+ t(this, S).left.addEventListener(r, s), t(this, S).right.addEventListener(r, s), t(this, S).track.addEventListener(r, s);
91
+ }), t(this, S).left.addEventListener("mousedown", (r) => {
92
+ r.button === 0 && e(-20);
93
+ }), t(this, S).right.addEventListener("mousedown", (r) => {
94
+ r.button === 0 && e(20);
95
+ }), t(this, S).left.addEventListener("touchstart", () => e(-20)), t(this, S).right.addEventListener("touchstart", () => e(20)), t(this, S).track.addEventListener("mousedown", (r) => {
96
+ if (r.button !== 0) return;
97
+ r.preventDefault();
98
+ const o = t(this, S).track.getBoundingClientRect(), i = t(this, S).thumb.clientWidth;
99
+ t(this, J).call(this, r.clientX - o.left - i / 2);
100
+ }), t(this, S).thumb.addEventListener("mousedown", (r) => {
101
+ if (r.button !== 0) return;
102
+ r.stopPropagation(), r.preventDefault(), p(this, V, !0), this.shiftX = r.clientX - t(this, S).thumb.getBoundingClientRect().left;
103
+ const o = /* @__PURE__ */ h((a) => {
104
+ if (!t(this, V)) return;
105
105
  const c = t(this, S).track.getBoundingClientRect();
106
- t(this, Z).call(this, a.clientX - c.left - this.shiftX);
107
- }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
108
- y(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
106
+ t(this, J).call(this, a.clientX - c.left - this.shiftX);
107
+ }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
108
+ p(this, V, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
110
+ document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (y(this, z, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, z)) return;
115
+ if (p(this, z, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, z)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -182,80 +182,80 @@ const $e = class $e extends HTMLElement {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- y(this, S, {
185
+ p(this, S, {
186
186
  container: s,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
189
189
  left: this.querySelector(".ng-scroll-left"),
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
- t(this, j) || this.refresh();
193
- }), t(this, Nt).call(this), t(this, _t).call(this), this.refresh();
192
+ t(this, V) || this.refresh();
193
+ }), t(this, zt).call(this), t(this, Bt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, K) && t(this, K).disconnect();
198
+ t(this, G) && t(this, G).disconnect();
199
199
  }
200
200
  };
201
- z = new WeakMap(), j = new WeakMap(), S = new WeakMap(), U = new WeakMap(), X = new WeakMap(), K = new WeakMap(), _t = new WeakMap(), Z = new WeakMap(), Nt = new WeakMap(), h($e, "NineTableHScrollBar");
202
- let ae = $e;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
204
- var G, J, at, k, vt, xt, Wt;
205
- const Me = class Me extends HTMLElement {
201
+ z = new WeakMap(), V = new WeakMap(), S = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), Bt = new WeakMap(), J = new WeakMap(), zt = new WeakMap(), h(Be, "NineTableHScrollBar");
202
+ let ue = Be;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ue);
204
+ var Q, tt, ct, k, wt, St, Pt;
205
+ const ze = class ze extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- d(this, G);
209
- d(this, J);
210
- d(this, at, !1);
208
+ d(this, Q);
209
+ d(this, tt);
210
+ d(this, ct, !1);
211
211
  d(this, k);
212
- d(this, vt, 0);
213
- d(this, xt, 0);
212
+ d(this, wt, 0);
213
+ d(this, St, 0);
214
214
  E(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (R.log("vscrollbar.refresh"), !t(this, G) || !t(this, k)) return;
216
- const e = t(this, k).container, s = t(this, k).track, i = t(this, k).thumb, n = e.clientHeight, o = t(this, G).data.length, a = t(this, J).getRowHeight(), c = o * a;
217
- if (c <= n || o === 0) {
215
+ if (T.log("vscrollbar.refresh"), !t(this, Q) || !t(this, k)) return;
216
+ const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb, o = e.clientHeight, i = t(this, Q).data.length, a = t(this, tt).getRowHeight(), c = i * a;
217
+ if (c <= o || i === 0) {
218
218
  this.style.display = "none";
219
219
  return;
220
220
  } else
221
221
  this.style.display = "flex";
222
222
  const l = s.clientHeight;
223
223
  if (l <= 0) return;
224
- const f = Math.max(Math.min(l * (n / c), l), 20);
225
- i.style.height = `${f}px`;
226
- const g = e.scrollTop, b = Math.max(c - n, 1);
227
- R.log(e, g, b);
224
+ const f = Math.max(Math.min(l * (o / c), l), 20);
225
+ r.style.height = `${f}px`;
226
+ const g = e.scrollTop, b = Math.max(c - o, 1);
227
+ T.log(e, g, b);
228
228
  let u = 0;
229
229
  b > 0 && (u = g / b * (l - f));
230
- const v = l - f;
231
- u < 0 && (u = 0), u > v && (u = v), i.style.top = `${u}px`, t(this, k).top.disabled = g <= 0, t(this, k).bottom.disabled = g >= b - 1;
230
+ const y = l - f;
231
+ u < 0 && (u = 0), u > y && (u = y), r.style.top = `${u}px`, t(this, k).top.disabled = g <= 0, t(this, k).bottom.disabled = g >= b - 1;
232
232
  }, "refresh"));
233
- d(this, Wt, /* @__PURE__ */ h(() => {
234
- R.log("nine-table-vscrollbar.#init");
233
+ d(this, Pt, /* @__PURE__ */ h(() => {
234
+ T.log("nine-table-vscrollbar.#init");
235
235
  const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
236
- const n = (t(this, G).data.get() || []).length, o = t(this, J).getRowHeight();
237
- return n * o;
236
+ const o = (t(this, Q).data.get() || []).length, i = t(this, tt).getRowHeight();
237
+ return o * i;
238
238
  }, "getContentHeight");
239
- t(this, k).thumb.addEventListener("mousedown", (i) => {
240
- if (i.button !== 0) return;
241
- i.stopPropagation(), i.preventDefault(), y(this, at, !0), y(this, vt, i.clientY), y(this, xt, e.scrollTop);
242
- const n = /* @__PURE__ */ h((a) => {
243
- if (!t(this, at)) return;
244
- const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, g = c.height - l, b = a.clientY - t(this, vt), u = e.clientHeight, v = s(), w = Math.max(v - u, 1);
245
- if (g > 0 && w > 0) {
246
- const A = b / g * w;
247
- let m = t(this, xt) + A;
248
- const W = Math.max(0, v - u);
249
- m < 0 && (m = 0), m > W && (m = W), e.scrollTop = m;
239
+ t(this, k).thumb.addEventListener("mousedown", (r) => {
240
+ if (r.button !== 0) return;
241
+ r.stopPropagation(), r.preventDefault(), p(this, ct, !0), p(this, wt, r.clientY), p(this, St, e.scrollTop);
242
+ const o = /* @__PURE__ */ h((a) => {
243
+ if (!t(this, ct)) return;
244
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, g = c.height - l, b = a.clientY - t(this, wt), u = e.clientHeight, y = s(), x = Math.max(y - u, 1);
245
+ if (g > 0 && x > 0) {
246
+ const A = b / g * x;
247
+ let v = t(this, St) + A;
248
+ const M = Math.max(0, y - u);
249
+ v < 0 && (v = 0), v > M && (v = M), e.scrollTop = v;
250
250
  }
251
251
  this.refresh();
252
- }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
253
- y(this, at, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
252
+ }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
253
+ p(this, ct, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
254
254
  }, "onMouseUp");
255
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
256
- }), t(this, k).track.addEventListener("mousedown", (i) => {
257
- if (i.button !== 0 || i.target === t(this, k).thumb) return;
258
- const n = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, a = i.clientY - n.top - o / 2, l = n.height - o, f = e.clientHeight, g = s(), b = Math.max(g - f, 1);
255
+ document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
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, g = s(), b = Math.max(g - f, 1);
259
259
  if (l > 0 && b > 0) {
260
260
  const u = Math.max(0, Math.min(1, a / l));
261
261
  e.scrollTop = u * b;
@@ -269,7 +269,7 @@ const Me = class Me extends HTMLElement {
269
269
  }, "#init"));
270
270
  }
271
271
  connectedCallback() {
272
- y(this, G, this.getRootNode().host), y(this, J, this.closest("nine-table-sheet")), this.innerHTML = `
272
+ p(this, Q, this.getRootNode().host), p(this, tt, this.closest("nine-table-sheet")), this.innerHTML = `
273
273
  <style>
274
274
  nine-table-vscrollbar {
275
275
  display: flex;
@@ -334,230 +334,230 @@ const Me = class Me extends HTMLElement {
334
334
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
335
335
  `;
336
336
  const e = /* @__PURE__ */ h(() => {
337
- const s = t(this, J).querySelector(".ng-container-body .ng-part-body");
337
+ const s = t(this, tt).querySelector(".ng-container-body .ng-part-body");
338
338
  if (!s) {
339
339
  setTimeout(e, 10);
340
340
  return;
341
341
  }
342
- y(this, k, {
342
+ p(this, k, {
343
343
  container: s,
344
344
  track: this.querySelector(".ng-scroll-track"),
345
345
  thumb: this.querySelector(".ng-scroll-thumb"),
346
346
  top: this.querySelector(".ng-scroll-top"),
347
347
  bottom: this.querySelector(".ng-scroll-bottom")
348
- }), t(this, Wt).call(this), this.refresh();
348
+ }), t(this, Pt).call(this), this.refresh();
349
349
  }, "initWhenReady");
350
350
  e();
351
351
  }
352
352
  };
353
- G = new WeakMap(), J = new WeakMap(), at = new WeakMap(), k = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(), Wt = new WeakMap(), h(Me, "NineTableVScrollBar");
354
- let le = Me;
355
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
356
- var P, x, Q, D, I, F, tt, wt, Se, Ee, Ot, Bt, St, Et, At, zt, Dt, qt, Ae, lt, Rt, Pt;
357
- const Ie = class Ie {
358
- constructor(r) {
359
- d(this, P);
360
- d(this, x);
361
- d(this, Q);
362
- d(this, D, /* @__PURE__ */ new Map());
363
- d(this, I, null);
364
- d(this, F, null);
365
- d(this, tt, 0);
366
- d(this, wt, 40);
367
- d(this, Se, !1);
368
- d(this, Ee, !1);
353
+ Q = new WeakMap(), tt = new WeakMap(), ct = new WeakMap(), k = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Pt = new WeakMap(), h(ze, "NineTableVScrollBar");
354
+ let ge = ze;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", ge);
356
+ var D, w, et, P, _, Y, st, Et, Ce, Le, Dt, Ft, At, Rt, qt, jt, Vt, Tt, He, ht, kt, Yt;
357
+ const Pe = class Pe {
358
+ constructor(n) {
359
+ d(this, D);
360
+ d(this, w);
361
+ d(this, et);
362
+ d(this, P, /* @__PURE__ */ new Map());
363
+ d(this, _, null);
364
+ d(this, Y, null);
365
+ d(this, st, 0);
366
+ d(this, Et, 40);
367
+ d(this, Ce, !1);
368
+ d(this, Le, !1);
369
369
  //#ticking = false; // 🎯 고속 스크롤 스로틀링용 플래그
370
- d(this, Ot, 3);
370
+ d(this, Dt, 3);
371
371
  E(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
- R.log("rowManager.refresh");
374
- const r = t(this, x).querySelector(".ng-container-body .ng-part-body");
375
- r && (t(this, St).call(this), t(this, Et).call(this), t(this, lt).call(this, r.scrollTop), (e = t(this, x).querySelector("nine-table-vscrollbar")) == null || e.refresh());
373
+ T.log("rowManager.refresh");
374
+ const n = t(this, w).querySelector(".ng-container-body .ng-part-body");
375
+ n && (t(this, At).call(this), t(this, Rt).call(this), t(this, ht).call(this, n.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
377
  E(this, "initialize", /* @__PURE__ */ h(() => {
378
- R.log("rowManager.initialize"), y(this, Q, {
379
- scrollTables: t(this, x).querySelectorAll(".ng-part-body table"),
380
- firstTr: t(this, x).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
- }), y(this, I, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
382
- const a = t(this, x).querySelector(o);
378
+ T.log("rowManager.initialize"), p(this, et, {
379
+ scrollTables: t(this, w).querySelectorAll(".ng-part-body table"),
380
+ firstTr: t(this, w).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
+ }), p(this, _, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
382
+ const a = t(this, w).querySelector(i);
383
383
  if (!a) return;
384
384
  const c = a.querySelector(".ng-part-body table");
385
385
  if (!c) return;
386
386
  const l = c.querySelector("tbody.bindable-tbody");
387
387
  if (!l) return;
388
388
  const g = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
- t(this, D).set(o, g);
389
+ t(this, P).set(i, g);
390
390
  });
391
- const r = t(this, x).querySelector(".ng-container-body .ng-part-body"), e = t(this, x).querySelector(".ng-container-left .ng-part-body"), s = t(this, x).querySelector(".ng-container-right .ng-part-body"), i = t(this, x).querySelector(".ng-container-body .ng-part-header"), n = t(this, x).querySelector(".ng-container-body .ng-part-footer");
392
- if (r) {
393
- t(this, St).call(this), t(this, qt).call(this), t(this, Et).call(this), t(this, lt).call(this, r.scrollTop);
394
- let o = !1;
391
+ const n = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), s = t(this, w).querySelector(".ng-container-right .ng-part-body"), r = t(this, w).querySelector(".ng-container-body .ng-part-header"), o = t(this, w).querySelector(".ng-container-body .ng-part-footer");
392
+ if (n) {
393
+ t(this, At).call(this), t(this, Tt).call(this), t(this, Rt).call(this), t(this, ht).call(this, n.scrollTop);
394
+ let i = !1;
395
395
  const a = /* @__PURE__ */ h((c) => {
396
396
  var g;
397
- if (o) return;
398
- o = !0;
397
+ if (i) return;
398
+ i = !0;
399
399
  const l = c.scrollTop, f = c.scrollLeft;
400
- r && r.scrollTop !== l && (r.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), i && i.scrollLeft !== f && (i.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this, lt).call(this, l), (g = t(this, x).querySelector("nine-table-vscrollbar")) == null || g.refresh(), o = !1;
400
+ n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), o && o.scrollLeft !== f && (o.scrollLeft = f), t(this, ht).call(this, l), (g = t(this, w).querySelector("nine-table-vscrollbar")) == null || g.refresh(), i = !1;
401
401
  }, "handleContainerScroll");
402
- [r, e, s].forEach((c) => {
402
+ [n, e, s].forEach((c) => {
403
403
  c == null || c.addEventListener("scroll", () => {
404
404
  a(c);
405
405
  });
406
406
  });
407
407
  }
408
408
  }, "initialize"));
409
- d(this, Bt, /* @__PURE__ */ h((r, e) => {
410
- R.log("rowManager.#renderRows");
411
- const s = t(this, D).get(e);
409
+ d(this, Ft, /* @__PURE__ */ h((n, e) => {
410
+ T.log("rowManager.#renderRows");
411
+ const s = t(this, P).get(e);
412
412
  if (!s || s.length === 0) return;
413
- const i = r.querySelector(".ng-part-body tbody.bindable-tbody");
414
- if (!i) return;
415
- i.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
- const n = i.querySelector("tr.nodata"), o = document.createDocumentFragment();
417
- for (let a = 0; a < t(this, wt); a++)
413
+ const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
414
+ if (!r) return;
415
+ r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
+ const o = r.querySelector("tr.nodata"), i = document.createDocumentFragment();
417
+ for (let a = 0; a < t(this, Et); a++)
418
418
  s.forEach((c) => {
419
- o.appendChild(c.cloneNode(!0));
419
+ i.appendChild(c.cloneNode(!0));
420
420
  });
421
- n ? n.before(o) : i.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = i.querySelector("tr:not(.nodata)"));
421
+ o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, et).firstTr = r.querySelector("tr:not(.nodata)"));
422
422
  }, "#renderRows"));
423
- d(this, St, /* @__PURE__ */ h(() => {
424
- if (t(this, I) !== null && t(this, I) > 0)
425
- return t(this, I);
426
- const r = t(this, x).querySelector(".ng-container-body .ng-part-body");
427
- R.log("rowManager.#measureAndCacheHeight");
428
- const e = t(this, D).get(".ng-container-body");
423
+ d(this, At, /* @__PURE__ */ h(() => {
424
+ if (t(this, _) !== null && t(this, _) > 0)
425
+ return t(this, _);
426
+ const n = t(this, w).querySelector(".ng-container-body .ng-part-body");
427
+ T.log("rowManager.#measureAndCacheHeight");
428
+ const e = t(this, P).get(".ng-container-body");
429
429
  if (!e || e.length === 0) throw new Error("invalid dom");
430
- const s = r.querySelector("tbody.bindable-tbody");
431
- if (R.log(s), !s) throw new Error("invalid dom");
430
+ const s = n.querySelector("tbody.bindable-tbody");
431
+ if (T.log(s), !s) throw new Error("invalid dom");
432
432
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
433
- const i = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
433
+ const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
434
434
  e.forEach((b) => {
435
- n.appendChild(b.cloneNode(!0));
436
- }), i ? i.before(n) : s.appendChild(n);
437
- const o = t(this, x), a = o.style.display, c = o.style.visibility, l = o.style.position;
438
- (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
435
+ o.appendChild(b.cloneNode(!0));
436
+ }), r ? r.before(o) : s.appendChild(o);
437
+ const i = t(this, w), a = i.style.display, c = i.style.visibility, l = i.style.position;
438
+ (a === "none" || window.getComputedStyle(i).display === "none") && (i.style.display = "block", i.style.visibility = "hidden", i.style.position = "absolute");
439
439
  let f = 0;
440
440
  const g = s.querySelectorAll("tr");
441
441
  return g.forEach((b) => {
442
442
  let u = b.offsetHeight || b.getBoundingClientRect().height;
443
443
  if (u === 0) {
444
- const v = window.getComputedStyle(b);
445
- u = parseFloat(v.height) || parseFloat(v.minHeight) || 0;
444
+ const y = window.getComputedStyle(b);
445
+ u = parseFloat(y.height) || parseFloat(y.minHeight) || 0;
446
446
  }
447
447
  f += u;
448
- }), g.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, f <= 0 ? -1 : (y(this, I, f), t(this, At).call(this), t(this, I));
448
+ }), g.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, _, f), t(this, qt).call(this), t(this, _));
449
449
  }, "#measureAndCacheHeight"));
450
- d(this, Et, /* @__PURE__ */ h(() => {
451
- R.log("rowManager.#updateVirtualScrollHeight");
452
- const e = (t(this, P).data.get() || []).length, s = t(this, I), i = e * s;
453
- R.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: i }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
454
- const o = t(this, x).querySelector(n);
455
- if (!o) return;
456
- const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
457
- a && (a.style.height = `${i}px`);
450
+ d(this, Rt, /* @__PURE__ */ h(() => {
451
+ T.log("rowManager.#updateVirtualScrollHeight");
452
+ const e = (t(this, D).data.get() || []).length, s = t(this, _), r = e * s;
453
+ T.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
454
+ const i = t(this, w).querySelector(o);
455
+ if (!i) return;
456
+ const a = i.querySelector(".ng-part-body .ng-virtual-spacer");
457
+ a && (a.style.height = `${r}px`);
458
458
  });
459
459
  }, "#updateVirtualScrollHeight"));
460
- d(this, At, /* @__PURE__ */ h(() => {
461
- if (t(this, tt) > 0 && t(this, I) > 0) {
462
- const r = Math.ceil(t(this, tt) / t(this, I));
463
- y(this, wt, r + t(this, Ot));
460
+ d(this, qt, /* @__PURE__ */ h(() => {
461
+ if (t(this, st) > 0 && t(this, _) > 0) {
462
+ const n = Math.ceil(t(this, st) / t(this, _));
463
+ p(this, Et, n + t(this, Dt));
464
464
  }
465
465
  }, "#updateRowCount"));
466
- d(this, zt, /* @__PURE__ */ h(() => {
466
+ d(this, jt, /* @__PURE__ */ h(() => {
467
467
  var a, c, l, f, g, b;
468
- const r = t(this, x).querySelector(".ng-container-left .ng-part-body table"), e = t(this, x).querySelector(".ng-container-body .ng-part-body table"), s = t(this, x).querySelector(".ng-container-right .ng-part-body table");
468
+ const n = t(this, w).querySelector(".ng-container-left .ng-part-body table"), e = t(this, w).querySelector(".ng-container-body .ng-part-body table"), s = t(this, w).querySelector(".ng-container-right .ng-part-body table");
469
469
  if (e) {
470
- const u = r ? Array.from(r.querySelectorAll("tbody tr")) : [], v = Array.from(e.querySelectorAll("tbody tr")), w = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(u.length, v.length, w.length);
471
- for (let m = 0; m < A; m++) {
472
- const W = [
473
- ((a = u[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
- ((c = v[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
- ((l = w[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
- ], T = Math.max(...W);
477
- T > 0 && (u[m] && (u[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`), w[m] && (w[m].style.height = `${T}px`));
470
+ const u = n ? Array.from(n.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(u.length, y.length, x.length);
471
+ for (let v = 0; v < A; v++) {
472
+ const M = [
473
+ ((a = u[v]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
+ ((c = y[v]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
+ ((l = x[v]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
+ ], q = Math.max(...M);
477
+ q > 0 && (u[v] && (u[v].style.height = `${q}px`), y[v] && (y[v].style.height = `${q}px`), x[v] && (x[v].style.height = `${q}px`));
478
478
  }
479
479
  }
480
- const i = t(this, x).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, x).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, x).querySelector(".ng-container-right .ng-part-footer table");
481
- if (n) {
482
- const u = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], v = Array.from(n.querySelectorAll("tfoot tr")), w = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], A = Math.max(u.length, v.length, w.length);
483
- for (let m = 0; m < A; m++) {
484
- const W = [
485
- ((f = u[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
- ((g = v[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
487
- ((b = w[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
- ], T = Math.max(...W);
489
- T > 0 && (u[m] && (u[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`), w[m] && (w[m].style.height = `${T}px`));
480
+ const r = t(this, w).querySelector(".ng-container-left .ng-part-footer table"), o = t(this, w).querySelector(".ng-container-body .ng-part-footer table"), i = t(this, w).querySelector(".ng-container-right .ng-part-footer table");
481
+ if (o) {
482
+ const u = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), x = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], A = Math.max(u.length, y.length, x.length);
483
+ for (let v = 0; v < A; v++) {
484
+ const M = [
485
+ ((f = u[v]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
+ ((g = y[v]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
487
+ ((b = x[v]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
+ ], q = Math.max(...M);
489
+ q > 0 && (u[v] && (u[v].style.height = `${q}px`), y[v] && (y[v].style.height = `${q}px`), x[v] && (x[v].style.height = `${q}px`));
490
490
  }
491
491
  }
492
492
  }, "#syncRowHeights"));
493
- d(this, Dt, /* @__PURE__ */ h(() => {
494
- !t(this, x) || !(t(this, x) instanceof HTMLElement) || (y(this, F, new ResizeObserver((r) => {
495
- for (const e of r) {
493
+ d(this, Vt, /* @__PURE__ */ h(() => {
494
+ !t(this, w) || !(t(this, w) instanceof HTMLElement) || (p(this, Y, new ResizeObserver((n) => {
495
+ for (const e of n) {
496
496
  const s = e.target;
497
497
  if (!s.classList.contains("active")) continue;
498
- const i = e.contentRect.height;
499
- if (i > 0) {
500
- let n = 0;
501
- const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
502
- o && (n += o.offsetHeight), a && (n += a.offsetHeight);
503
- const c = Math.max(i - n, 100);
504
- t(this, tt) !== c && (y(this, tt, c), t(this, At).call(this), t(this, I) !== null && (t(this, qt).call(this), this.refresh()));
498
+ const r = e.contentRect.height;
499
+ if (r > 0) {
500
+ let o = 0;
501
+ const i = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
502
+ i && (o += i.offsetHeight), a && (o += a.offsetHeight);
503
+ const c = Math.max(r - o, 100);
504
+ t(this, st) !== c && (p(this, st, c), t(this, qt).call(this), t(this, _) !== null && (t(this, Tt).call(this), this.refresh()));
505
505
  }
506
506
  }
507
- })), t(this, F).observe(t(this, x)));
507
+ })), t(this, Y).observe(t(this, w)));
508
508
  }, "#initResizeObserver"));
509
- d(this, qt, /* @__PURE__ */ h(() => {
510
- R.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
511
- const e = t(this, x).querySelector(r);
512
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Bt).call(this, e, r);
513
- }), t(this, Pt).call(this), t(this, zt).call(this);
509
+ d(this, Tt, /* @__PURE__ */ h(() => {
510
+ T.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
511
+ const e = t(this, w).querySelector(n);
512
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ft).call(this, e, n);
513
+ }), t(this, Yt).call(this), t(this, jt).call(this);
514
514
  }, "#renderAllContainers"));
515
- d(this, Ae, /* @__PURE__ */ h((r) => {
515
+ d(this, He, /* @__PURE__ */ h((n) => {
516
516
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
517
517
  var l;
518
- const s = t(this, x).querySelector(e);
518
+ const s = t(this, w).querySelector(e);
519
519
  if (!s) return;
520
- const i = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
- if (!i) return;
522
- const n = Array.from(i.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, D).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, P).data.get() || []).length;
523
- n.forEach((f, g) => {
524
- const b = r + Math.floor(g / o);
520
+ const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
+ if (!r) return;
522
+ const o = Array.from(r.querySelectorAll("tr:not(.nodata)")), i = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, D).data.get() || []).length;
523
+ o.forEach((f, g) => {
524
+ const b = n + Math.floor(g / i);
525
525
  if (b >= c) {
526
526
  f.style.visibility = "hidden";
527
527
  return;
528
528
  }
529
- const u = t(this, P).data.get(b);
530
- f.style.display = "", t(this, Rt).call(this, f, u, b);
529
+ const u = t(this, D).data.get(b);
530
+ f.style.display = "", t(this, kt).call(this, f, u, b);
531
531
  });
532
532
  });
533
533
  }, "#adjustBufferRows"));
534
- d(this, lt, /* @__PURE__ */ h((r) => {
534
+ d(this, ht, /* @__PURE__ */ h((n) => {
535
535
  var g, b;
536
- const e = t(this, I);
536
+ const e = t(this, _);
537
537
  if (!e || e <= 0) return;
538
- const s = t(this, P).data.length;
538
+ const s = t(this, D).data.length;
539
539
  if (s === 0) return;
540
- const i = ((g = t(this, D).get(".ng-container-body")) == null ? void 0 : g.length) || 1, n = t(this, x).querySelector(".ng-container-body .ng-part-body");
541
- R.log("bodyContainer.clientHeight", n.clientHeight);
542
- const o = Math.max(0, s - Math.floor(n.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(r / e)));
540
+ const r = ((g = t(this, P).get(".ng-container-body")) == null ? void 0 : g.length) || 1, o = t(this, w).querySelector(".ng-container-body .ng-part-body");
541
+ T.log("bodyContainer.clientHeight", o.clientHeight);
542
+ const i = Math.max(0, s - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(n / e)));
543
543
  let c = Math.floor(a * e);
544
- R.log(`📜 [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && R.log(`📜 [Scroll Inspect] scrollTop: ${r}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
545
- const l = t(this, Q).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
- (b = t(this, Q)) == null || b.scrollTables.forEach((u) => {
544
+ T.log(`📜 [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && T.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
+ const l = t(this, et).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
+ (b = t(this, et)) == null || b.scrollTables.forEach((u) => {
547
547
  u.style.transform = `translate3d(0, ${c}px, 0)`;
548
- }), f !== a && (R.log(`🔄 [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
549
- const v = t(this, x).querySelector(u);
550
- if (!v) return;
551
- const w = v.querySelector(".ng-part-body tbody.bindable-tbody");
552
- if (!w) return;
553
- Array.from(w.querySelectorAll("tr:not(.nodata)")).forEach((m, W) => {
554
- const T = a + Math.floor(W / i);
555
- if (T >= s) {
556
- m.style.display = "none";
548
+ }), f !== a && (T.log(`🔄 [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
549
+ const y = t(this, w).querySelector(u);
550
+ if (!y) return;
551
+ const x = y.querySelector(".ng-part-body tbody.bindable-tbody");
552
+ if (!x) return;
553
+ Array.from(x.querySelectorAll("tr:not(.nodata)")).forEach((v, M) => {
554
+ const q = a + Math.floor(M / r);
555
+ if (q >= s) {
556
+ v.style.display = "none";
557
557
  return;
558
558
  }
559
- const O = t(this, P).data.get(T);
560
- m.style.display = "", t(this, Rt).call(this, m, O, T);
559
+ const O = t(this, D).data.get(q);
560
+ v.style.display = "", t(this, kt).call(this, v, O, q);
561
561
  });
562
562
  }));
563
563
  }, "#handleScroll"));
@@ -575,63 +575,63 @@ const Ie = class Ie {
575
575
  cell.dataset.row = dataIndex;
576
576
  });
577
577
  }; */
578
- d(this, Rt, /* @__PURE__ */ h((r, e, s) => {
579
- r.dataset.row = s, r.data = e, Array.from(r.cells).forEach((i, n) => {
580
- i.dataset.row = s;
581
- const o = Array.from(i.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
582
- o && typeof o.refresh == "function" && o.refresh();
578
+ d(this, kt, /* @__PURE__ */ h((n, e, s) => {
579
+ n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, o) => {
580
+ r.dataset.row = s;
581
+ const i = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
582
+ i && typeof i.refresh == "function" && i.refresh();
583
583
  });
584
584
  }, "#bindRowData"));
585
- d(this, Pt, /* @__PURE__ */ h(() => {
585
+ d(this, Yt, /* @__PURE__ */ h(() => {
586
586
  var c, l, f;
587
- R.log("rowManager.#syncHeaderHeights");
588
- const r = t(this, x).querySelector(".ng-container-left .ng-part-header table"), e = t(this, x).querySelector(".ng-container-body .ng-part-header table"), s = t(this, x).querySelector(".ng-container-right .ng-part-header table");
587
+ T.log("rowManager.#syncHeaderHeights");
588
+ const n = t(this, w).querySelector(".ng-container-left .ng-part-header table"), e = t(this, w).querySelector(".ng-container-body .ng-part-header table"), s = t(this, w).querySelector(".ng-container-right .ng-part-header table");
589
589
  if (!e) return;
590
- const i = r ? Array.from(r.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(i.length, n.length, o.length);
590
+ const r = n ? Array.from(n.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
591
591
  for (let g = 0; g < a; g++) {
592
592
  const b = [
593
- ((c = i[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
594
- ((l = n[g]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
- ((f = o[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
593
+ ((c = r[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
594
+ ((l = o[g]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
+ ((f = i[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
596
596
  ], u = Math.max(...b);
597
- u > 0 && (i[g] && (i[g].style.height = `${u}px`), n[g] && (n[g].style.height = `${u}px`), o[g] && (o[g].style.height = `${u}px`));
597
+ u > 0 && (r[g] && (r[g].style.height = `${u}px`), o[g] && (o[g].style.height = `${u}px`), i[g] && (i[g].style.height = `${u}px`));
598
598
  }
599
599
  }, "#syncHeaderHeights"));
600
600
  E(this, "destroy", /* @__PURE__ */ h(() => {
601
- t(this, F) && (t(this, F).disconnect(), y(this, F, null));
601
+ t(this, Y) && (t(this, Y).disconnect(), p(this, Y, null));
602
602
  }, "destroy"));
603
- y(this, P, r.getRootNode().host), y(this, x, r), t(this, Dt).call(this);
603
+ p(this, D, n.getRootNode().host), p(this, w, n), t(this, Vt).call(this);
604
604
  }
605
605
  getRowHeight() {
606
- return t(this, I);
606
+ return t(this, _);
607
607
  }
608
- templateLength(r = ".ng-container-body") {
608
+ templateLength(n = ".ng-container-body") {
609
609
  var e;
610
- return ((e = t(this, D).get(r)) == null ? void 0 : e.length) || 1;
610
+ return ((e = t(this, P).get(n)) == null ? void 0 : e.length) || 1;
611
611
  }
612
612
  };
613
- P = new WeakMap(), x = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), I = new WeakMap(), F = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), zt = new WeakMap(), Dt = new WeakMap(), qt = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Pt = new WeakMap(), h(Ie, "RowManager");
614
- let ce = Ie;
615
- const jt = class jt {
613
+ D = new WeakMap(), w = new WeakMap(), et = new WeakMap(), P = new WeakMap(), _ = new WeakMap(), Y = new WeakMap(), st = new WeakMap(), Et = new WeakMap(), Ce = new WeakMap(), Le = new WeakMap(), Dt = new WeakMap(), Ft = new WeakMap(), At = new WeakMap(), Rt = new WeakMap(), qt = new WeakMap(), jt = new WeakMap(), Vt = new WeakMap(), Tt = new WeakMap(), He = new WeakMap(), ht = new WeakMap(), kt = new WeakMap(), Yt = new WeakMap(), h(Pe, "RowManager");
614
+ let be = Pe;
615
+ const Ut = class Ut {
616
616
  /**
617
617
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
618
618
  */
619
- static compileAll(r) {
620
- return Array.isArray(r) ? r.map((e) => jt.compile(e)) : [];
619
+ static compileAll(n) {
620
+ return Array.isArray(n) ? n.map((e) => Ut.compile(e)) : [];
621
621
  }
622
622
  /**
623
623
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
624
624
  */
625
- static compile(r) {
626
- if (!r) return null;
625
+ static compile(n) {
626
+ if (!n) return null;
627
627
  const e = /* @__PURE__ */ h((a) => {
628
628
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
629
629
  const f = l.getAttribute("cell-type") || "renderer";
630
630
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
631
  let g = `cell-${f}`;
632
- const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), v = l.getAttribute("maxbyte"), w = l.getAttribute("type");
632
+ const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), x = l.getAttribute("type");
633
633
  let A = [];
634
- b && A.push(`data-bind="${b}"`), u && A.push(`data-expr="${u}"`), v && A.push(`maxbyte="${v}"`), w && A.push(`type="${w}"`), l.innerHTML = `<${g} ${A.join(" ")}></${g}>`;
634
+ b && A.push(`data-bind="${b}"`), u && A.push(`data-expr="${u}"`), y && A.push(`maxbyte="${y}"`), x && A.push(`type="${x}"`), l.innerHTML = `<${g} ${A.join(" ")}></${g}>`;
635
635
  });
636
636
  }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
637
637
  if (!a.querySelector("colgroup")) {
@@ -647,107 +647,182 @@ const jt = class jt {
647
647
  l ? l.after(c) : a.prepend(c);
648
648
  }
649
649
  a.classList.add("nine-table-element");
650
- }, "ensureTableStructure"), i = /* @__PURE__ */ h((a, c) => {
650
+ }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
651
651
  const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")), g = l.length;
652
652
  if (g === 0 || f.length === 0) return;
653
653
  let b = 0;
654
- f.forEach((v) => {
655
- b += v.colSpan || 1;
654
+ f.forEach((y) => {
655
+ b += y.colSpan || 1;
656
656
  });
657
657
  const u = Array.from(Array(g), () => Array(b).fill(null));
658
- l.forEach((v) => {
659
- const w = v.sectionRowIndex;
658
+ l.forEach((y) => {
659
+ const x = y.sectionRowIndex;
660
660
  let A = 0;
661
- Array.from(v.querySelectorAll("th,td")).forEach((m) => {
662
- for (let O = 0; O < u[w].length; O++)
663
- if (u[w][O] === null) {
661
+ Array.from(y.querySelectorAll("th,td")).forEach((v) => {
662
+ for (let O = 0; O < u[x].length; O++)
663
+ if (u[x][O] === null) {
664
664
  A = O;
665
665
  break;
666
666
  }
667
- const W = m.rowSpan || 1, T = m.colSpan || 1;
668
- for (let O = 0; O < W; O++)
669
- for (let yt = 0; yt < T; yt++)
670
- w + O < g && A + yt < b && (u[w + O][A + yt] = O === 0 && yt === 0 ? "1" : "0");
667
+ const M = v.rowSpan || 1, q = v.colSpan || 1;
668
+ for (let O = 0; O < M; O++)
669
+ for (let j = 0; j < q; j++)
670
+ x + O < g && A + j < b && (u[x + O][A + j] = O === 0 && j === 0 ? "1" : "0");
671
671
  });
672
- }), l.forEach((v) => {
673
- const w = v.sectionRowIndex;
674
- Array.from(v.querySelectorAll("th,td")).forEach((A) => {
675
- for (let m = 0; m < u[w].length; m++)
676
- if (u[w][m] === "1") {
677
- A.dataset.col = m, u[w][m] = "0";
672
+ }), l.forEach((y) => {
673
+ const x = y.sectionRowIndex;
674
+ Array.from(y.querySelectorAll("th,td")).forEach((A) => {
675
+ for (let v = 0; v < u[x].length; v++)
676
+ if (u[x][v] === "1") {
677
+ A.dataset.col = v, u[x][v] = "0";
678
678
  break;
679
679
  }
680
680
  });
681
681
  });
682
- }, "resetColIndex"), n = r.cloneNode(!0);
683
- return s(n), e(n), i(n, "thead"), i(n, "tbody"), i(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, c) => {
682
+ }, "resetColIndex"), o = n.cloneNode(!0);
683
+ return s(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, c) => {
684
684
  const l = a.getAttribute("fixed");
685
- l && n.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
685
+ l && o.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
686
686
  f.setAttribute("fixed", l);
687
687
  });
688
- }), n;
688
+ }), o;
689
689
  }
690
690
  // 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
691
691
  };
692
- h(jt, "TableCompiler");
693
- let he = jt;
694
- var Ft, et, st, Vt, Yt, ct, Ut, Xt;
695
- const pt = class pt extends HTMLElement {
692
+ h(Ut, "TableCompiler");
693
+ let pe = Ut;
694
+ var F, Ct, mt, rs, os;
695
+ const De = class De {
696
+ constructor(n) {
697
+ d(this, mt);
698
+ d(this, F);
699
+ d(this, Ct, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
700
+ // 3. 뷰 렌더링 (9분할 전체를 순회하며 경계선 클래스 부여)
701
+ E(this, "render", /* @__PURE__ */ h(() => {
702
+ const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, Ct);
703
+ t(this, F).querySelectorAll(
704
+ ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
705
+ ).forEach((i) => {
706
+ i.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((a) => {
707
+ a.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
708
+ }), !(n < 0) && i.querySelectorAll("tbody tr").forEach((a) => {
709
+ const c = parseInt(a.dataset.row, 10);
710
+ isNaN(c) || a.querySelectorAll("td, th").forEach((l) => {
711
+ const f = parseInt(l.dataset.col, 10);
712
+ if (isNaN(f)) return;
713
+ const g = parseInt(l.rowSpan || 1, 10), b = parseInt(l.colSpan || 1, 10), u = c + g - 1, y = f + b - 1;
714
+ c <= s && u >= n && f <= r && y >= e && (l.classList.add("selected"), c === n && l.classList.add("selected-top"), u === s && l.classList.add("selected-bottom"), f === e && l.classList.add("selected-left"), y === r && l.classList.add("selected-right"));
715
+ });
716
+ });
717
+ });
718
+ }, "render"));
719
+ p(this, F, n), de(this, mt, os).call(this);
720
+ }
721
+ setRange(n, e, s, r) {
722
+ let o = Math.min(n, s), i = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
723
+ const l = de(this, mt, rs).call(this, o, a, i, c);
724
+ p(this, Ct, l), this.render();
725
+ }
726
+ };
727
+ F = new WeakMap(), Ct = new WeakMap(), mt = new WeakSet(), // 머지된 셀이 선택 영역에 걸쳐있으면 범위를 자동으로 넓혀주는 보정기
728
+ rs = /* @__PURE__ */ h(function(n, e, s, r) {
729
+ let o = n, i = e, a = s, c = r, l = !0;
730
+ const f = t(this, F).querySelectorAll(
731
+ ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
732
+ );
733
+ for (; l; )
734
+ l = !1, f.forEach((g) => {
735
+ g.querySelectorAll("tbody tr").forEach((b) => {
736
+ const u = parseInt(b.dataset.row, 10);
737
+ isNaN(u) || b.querySelectorAll("td, th").forEach((y) => {
738
+ const x = parseInt(y.dataset.col, 10);
739
+ if (isNaN(x)) return;
740
+ const A = parseInt(y.rowSpan || 1, 10), v = parseInt(y.colSpan || 1, 10), M = u + A - 1, q = x + v - 1;
741
+ if (u <= a && M >= o && x <= c && q >= i) {
742
+ const j = Math.min(o, u), Je = Math.max(a, M), Qe = Math.min(i, x), ts = Math.max(c, q);
743
+ (j !== o || Je !== a || Qe !== i || ts !== c) && (o = j, a = Je, i = Qe, c = ts, l = !0);
744
+ }
745
+ });
746
+ });
747
+ });
748
+ return { startRow: o, startCol: i, endRow: a, endCol: c };
749
+ }, "#expandRangeByMerge"), os = /* @__PURE__ */ h(function() {
750
+ const n = this.selector ? t(this, F).querySelector(".ng-container-top") : t(this, F).querySelector(".ng-container-top");
751
+ n && n.addEventListener("mousedown", (e) => {
752
+ const s = e.target.closest("td, th");
753
+ if (!s || s.dataset.row === void 0 || s.dataset.col === void 0 || s.closest("tr").classList.contains("nodata")) return;
754
+ const r = parseInt(s.dataset.row, 10), o = parseInt(s.dataset.col, 10);
755
+ this.setRange(r, o, r, o);
756
+ const i = /* @__PURE__ */ h((c) => {
757
+ const l = document.elementFromPoint(c.clientX, c.clientY), f = l == null ? void 0 : l.closest("td, th");
758
+ if (!f || !t(this, F).contains(f) || f.dataset.row === void 0 || f.dataset.col === void 0 || f.closest("tr").classList.contains("nodata")) return;
759
+ const g = parseInt(f.dataset.row, 10), b = parseInt(f.dataset.col, 10);
760
+ this.setRange(r, o, g, b);
761
+ }, "onMouseMove"), a = /* @__PURE__ */ h(() => {
762
+ document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", a);
763
+ }, "onMouseUp");
764
+ document.addEventListener("mousemove", i), document.addEventListener("mouseup", a);
765
+ });
766
+ }, "#initEvents"), h(De, "CellSelection");
767
+ let ye = De;
768
+ var Xt, nt, rt, Lt, Kt, Zt, dt, Gt, Jt;
769
+ const vt = class vt extends HTMLElement {
696
770
  constructor() {
697
771
  super();
698
- d(this, Ft);
699
- d(this, et, null);
700
- d(this, st);
772
+ d(this, Xt);
773
+ d(this, nt, null);
774
+ d(this, rt);
775
+ d(this, Lt);
701
776
  E(this, "invalidate", /* @__PURE__ */ h(() => {
702
- R.log("sheet.invalidate()"), t(this, st).refresh();
777
+ T.log("sheet.invalidate()"), t(this, rt).refresh();
703
778
  }, "invalidate"));
704
779
  E(this, "generate", /* @__PURE__ */ h((e) => {
705
- if (R.log("sheet.generate()"), !e) return;
706
- y(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this);
707
- const s = this.querySelector(".ng-container-body .ng-part-header"), i = this.querySelector(".ng-container-body .ng-part-footer"), n = this.querySelector(".ng-nodata-overlay");
708
- s && n && (n.style.top = `${s.offsetHeight}px`), i && n && (n.style.bottom = `${i.offsetHeight}px`), t(this, st).initialize(), setTimeout(() => {
709
- var o;
710
- (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
780
+ if (T.log("sheet.generate()"), !e) return;
781
+ p(this, nt, pe.compile(e)), t(this, Kt).call(this), t(this, Zt).call(this);
782
+ const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
783
+ s && o && (o.style.top = `${s.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, rt).initialize(), setTimeout(() => {
784
+ var i;
785
+ (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
711
786
  }, 0);
712
787
  }, "generate"));
713
- d(this, Vt, /* @__PURE__ */ h(() => {
788
+ d(this, Kt, /* @__PURE__ */ h(() => {
714
789
  [
715
790
  { selector: ".ng-container-body", type: null },
716
791
  { selector: ".ng-container-left", type: "left" },
717
792
  { selector: ".ng-container-right", type: "right" }
718
- ].forEach(({ selector: s, type: i }) => {
719
- var n, o, a;
720
- (n = this.querySelector(`${s} .ng-part-header`)) == null || n.appendChild(t(this, ct).call(this, t(this, et), i, "header")), (o = this.querySelector(`${s} .ng-virtual-spacer`)) == null || o.before(t(this, ct).call(this, t(this, et), i, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, ct).call(this, t(this, et), i, "footer"));
793
+ ].forEach(({ selector: s, type: r }) => {
794
+ var o, i, a;
795
+ (o = this.querySelector(`${s} .ng-part-header`)) == null || o.appendChild(t(this, dt).call(this, t(this, nt), r, "header")), (i = this.querySelector(`${s} .ng-virtual-spacer`)) == null || i.before(t(this, dt).call(this, t(this, nt), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, dt).call(this, t(this, nt), r, "footer"));
721
796
  });
722
797
  }, "#renderSplitContainers"));
723
- d(this, Yt, /* @__PURE__ */ h(() => {
798
+ d(this, Zt, /* @__PURE__ */ h(() => {
724
799
  ["left", "right", "body"].forEach((e) => {
725
- const s = this.querySelector(`.ng-container-${e}`), i = s == null ? void 0 : s.querySelectorAll("table");
726
- if (!s || !i || i.length === 0) return;
727
- let n = 0;
728
- i[0].querySelectorAll("col").forEach((o) => {
729
- const a = parseInt(o.getAttribute("width"), 10);
730
- isNaN(n) || (n += a);
731
- }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
800
+ const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
801
+ if (!s || !r || r.length === 0) return;
802
+ let o = 0;
803
+ r[0].querySelectorAll("col").forEach((i) => {
804
+ const a = parseInt(i.getAttribute("width"), 10);
805
+ isNaN(o) || (o += a);
806
+ }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`);
732
807
  });
733
808
  }, "#updateContainerWidths"));
734
- d(this, ct, /* @__PURE__ */ h((e, s, i) => {
735
- const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), c = n.querySelector("tfoot");
736
- if (i === "header") {
809
+ d(this, dt, /* @__PURE__ */ h((e, s, r) => {
810
+ const o = e.cloneNode(!0), i = o.querySelector("thead"), a = o.querySelector("tbody"), c = o.querySelector("tfoot");
811
+ if (r === "header") {
737
812
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
738
813
  const f = document.createElement("tbody");
739
- f.className = "fixed-tbody", n.appendChild(f);
814
+ f.className = "fixed-tbody", o.appendChild(f);
740
815
  }
741
- } else i === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : i === "footer" && (o && o.remove(), a && a.remove());
742
- return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
816
+ } else r === "body" ? (i && i.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (i && i.remove(), a && a.remove());
817
+ return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
743
818
  l.getAttribute("fixed") !== "left" && l.remove();
744
- }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
819
+ }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
745
820
  l.getAttribute("fixed") !== "right" && l.remove();
746
- }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
821
+ }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
747
822
  l.remove();
748
- }), n;
823
+ }), o;
749
824
  }, "#createSplitTable"));
750
- E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, st).getRowHeight(), "getRowHeight"));
825
+ E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, rt).getRowHeight(), "getRowHeight"));
751
826
  E(this, "scrollToX", /* @__PURE__ */ h((e) => {
752
827
  const s = this.querySelector(".ng-container-body .ng-part-body");
753
828
  s && (s.scrollLeft = e);
@@ -756,11 +831,11 @@ const pt = class pt extends HTMLElement {
756
831
  const s = this.querySelector(".ng-container-body .ng-part-body");
757
832
  s && (s.scrollTop = e);
758
833
  }, "scrollToY"));
759
- d(this, Ut, /* @__PURE__ */ h(() => {
760
- t(this, Xt).call(this);
834
+ d(this, Gt, /* @__PURE__ */ h(() => {
835
+ t(this, Jt).call(this), p(this, Lt, new ye(this));
761
836
  }, "#init"));
762
- d(this, Xt, /* @__PURE__ */ h(() => {
763
- const e = pt.SCROLLBAR_SIZE;
837
+ d(this, Jt, /* @__PURE__ */ h(() => {
838
+ const e = vt.SCROLLBAR_SIZE;
764
839
  this.innerHTML = `
765
840
  <style>
766
841
  nine-table-sheet {
@@ -907,6 +982,16 @@ const pt = class pt extends HTMLElement {
907
982
  --display: none;
908
983
  }
909
984
 
985
+ nine-table-sheet td.selected,
986
+ nine-table-sheet th.selected {
987
+ background-color: rgba(37, 99, 235, 0.08); /* 은은한 선택 배경 */
988
+ }
989
+
990
+ /* 외곽 경계선에만 적용되는 단단한 테두리 */
991
+ nine-table-sheet td.selected-top { border-top: 2px solid #2563eb !important; }
992
+ nine-table-sheet td.selected-bottom { border-bottom: 2px solid #2563eb !important; }
993
+ nine-table-sheet td.selected-left { border-left: 2px solid #2563eb !important; }
994
+ nine-table-sheet td.selected-right { border-right: 2px solid #2563eb !important; }
910
995
  </style>
911
996
 
912
997
  <div class='ng-container-top'>
@@ -950,40 +1035,43 @@ const pt = class pt extends HTMLElement {
950
1035
  </div>
951
1036
  `;
952
1037
  }, "#render"));
953
- y(this, st, new ce(this)), y(this, Ft, this.getRootNode().host);
1038
+ p(this, rt, new be(this)), p(this, Xt, this.getRootNode().host);
954
1039
  }
955
1040
  connectedCallback() {
956
- t(this, Ut).call(this);
1041
+ t(this, Gt).call(this);
1042
+ }
1043
+ get selection() {
1044
+ return t(this, Lt);
957
1045
  }
958
1046
  disconnectedCallback() {
959
- this.innerHTML = "", R.log("NineTableSheet destroyed.");
1047
+ this.innerHTML = "", T.log("NineTableSheet destroyed.");
960
1048
  }
961
1049
  };
962
- Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), h(pt, "NineTableSheet"), E(pt, "SCROLLBAR_SIZE", 16);
963
- let It = pt;
964
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", It);
965
- var Kt, Tt;
966
- const _e = class _e extends HTMLElement {
1050
+ Xt = new WeakMap(), nt = new WeakMap(), rt = new WeakMap(), Lt = new WeakMap(), Kt = new WeakMap(), Zt = new WeakMap(), dt = new WeakMap(), Gt = new WeakMap(), Jt = new WeakMap(), h(vt, "NineTableSheet"), E(vt, "SCROLLBAR_SIZE", 16);
1051
+ let Ot = vt;
1052
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Ot);
1053
+ var Qt, Ht;
1054
+ const Fe = class Fe extends HTMLElement {
967
1055
  constructor() {
968
1056
  super();
969
- d(this, Kt, /* @__PURE__ */ h(() => {
1057
+ d(this, Qt, /* @__PURE__ */ h(() => {
970
1058
  var e;
971
1059
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
972
- var o;
973
- const i = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
974
- t(this, Tt).call(this, n, i);
975
- }), t(this, Tt).call(this, 0, !1);
1060
+ var i;
1061
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((i = s.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1062
+ t(this, Ht).call(this, o, r);
1063
+ }), t(this, Ht).call(this, 0, !1);
976
1064
  }, "#init"));
977
- d(this, Tt, /* @__PURE__ */ h((e, s = !1) => {
978
- const i = /* @__PURE__ */ h(() => {
1065
+ d(this, Ht, /* @__PURE__ */ h((e, s = !1) => {
1066
+ const r = /* @__PURE__ */ h(() => {
979
1067
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
980
1068
  Array.from(this.querySelectorAll("nine-splitter")).forEach((u) => u.style.setProperty("display", "none"));
981
1069
  const b = f.filter((u) => u.classList.contains("active"));
982
1070
  b.length < 2 || b.forEach((u) => {
983
- const v = parseInt(u.getAttribute("data-index"), 10), w = this.querySelector(`nine-splitter[data-split-index="${v}"]`), A = f[v + 1];
984
- w && A && A.classList.contains("active") && w.style.setProperty("display", "flex");
1071
+ const y = parseInt(u.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${y}"]`), A = f[y + 1];
1072
+ x && A && A.classList.contains("active") && x.style.setProperty("display", "flex");
985
1073
  });
986
- }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = n.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
1074
+ }, "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");
987
1075
  if (!a[e]) return;
988
1076
  if (!s)
989
1077
  a.forEach((f, g) => {
@@ -993,49 +1081,49 @@ const _e = class _e extends HTMLElement {
993
1081
  f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
994
1082
  });
995
1083
  else {
996
- const f = a[e], g = n.querySelectorAll(".nine-tab-item.active");
1084
+ const f = a[e], g = o.querySelectorAll(".nine-tab-item.active");
997
1085
  if (f.classList.contains("active") && g.length <= 1)
998
1086
  return;
999
1087
  f.classList.toggle("active");
1000
- const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
1088
+ const b = i.querySelector(`nine-table-sheet[data-index="${e}"]`);
1001
1089
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
1002
1090
  }
1003
- const l = o.querySelectorAll("nine-table-sheet.active");
1091
+ const l = i.querySelectorAll("nine-table-sheet.active");
1004
1092
  l == null || l.forEach((f) => {
1005
1093
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1006
- }), i();
1094
+ }), r();
1007
1095
  }, "#switchSheet"));
1008
1096
  }
1009
1097
  connectedCallback() {
1010
- t(this, Kt).call(this);
1098
+ t(this, Qt).call(this);
1011
1099
  }
1012
1100
  };
1013
- Kt = new WeakMap(), Tt = new WeakMap(), h(_e, "NineTableSheets");
1014
- let de = _e;
1015
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
1016
- var M, Zt, kt, Gt;
1017
- const Ne = class Ne {
1018
- constructor(r) {
1019
- d(this, M);
1020
- d(this, Zt, /* @__PURE__ */ h(() => {
1021
- t(this, Gt).call(this), new ResizeObserver((r) => {
1022
- for (let e of r)
1023
- t(this, M).getAttribute("auto-height") === "true" && t(this, kt).call(this);
1024
- }).observe(t(this, M));
1101
+ Qt = new WeakMap(), Ht = new WeakMap(), h(Fe, "NineTableSheets");
1102
+ let me = Fe;
1103
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", me);
1104
+ var I, te, Mt, ee;
1105
+ const je = class je {
1106
+ constructor(n) {
1107
+ d(this, I);
1108
+ d(this, te, /* @__PURE__ */ h(() => {
1109
+ t(this, ee).call(this), new ResizeObserver((n) => {
1110
+ for (let e of n)
1111
+ t(this, I).getAttribute("auto-height") === "true" && t(this, Mt).call(this);
1112
+ }).observe(t(this, I));
1025
1113
  }, "#init"));
1026
- d(this, kt, /* @__PURE__ */ h(() => {
1114
+ d(this, Mt, /* @__PURE__ */ h(() => {
1027
1115
  var c, l;
1028
- const r = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1029
- if (r.length === 0) return;
1030
- const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...r.map((f) => f.getRowHeight())), i = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = It.SCROLLBAR_SIZE, a = e * s + i + n + o;
1031
- t(this, M).style.height = `${a}px`;
1116
+ const n = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1117
+ if (n.length === 0) return;
1118
+ const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), r = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Ot.SCROLLBAR_SIZE, a = e * s + r + o + i;
1119
+ t(this, I).style.height = `${a}px`;
1032
1120
  }, "#applyAutoHeight"));
1033
- d(this, Gt, /* @__PURE__ */ h(() => {
1034
- const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", i = e.length, n = e.map((c, l) => {
1035
- const g = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < i - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1121
+ d(this, ee, /* @__PURE__ */ h(() => {
1122
+ const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), s = t(this, I).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1123
+ const g = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1036
1124
  return g + b;
1037
- }).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1038
- t(this, M).shadowRoot.innerHTML = `
1125
+ }).join(""), i = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1126
+ t(this, I).shadowRoot.innerHTML = `
1039
1127
  <style>
1040
1128
  :host {
1041
1129
  display: flex;
@@ -1146,190 +1234,190 @@ const Ne = class Ne {
1146
1234
  <nine-table-body>
1147
1235
  <nine-table-summary></nine-table-summary>
1148
1236
  <nine-table-sheets>
1149
- <nine-table-sheets-body>${n}</nine-table-sheets-body>
1237
+ <nine-table-sheets-body>${o}</nine-table-sheets-body>
1150
1238
  <nine-table-sheets-footer>
1151
- <div class="nine-tab-bar">${o}</div>
1239
+ <div class="nine-tab-bar">${i}</div>
1152
1240
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1153
1241
  </nine-table-sheets-footer>
1154
1242
  </nine-table-sheets>
1155
1243
  <nine-table-analysis></nine-table-analysis>
1156
1244
  </nine-table-body>
1157
1245
  <nine-table-footer></nine-table-footer>
1158
- `, t(this, M).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1159
- const a = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1246
+ `, t(this, I).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1247
+ const a = t(this, I).shadowRoot.querySelectorAll("nine-table-sheet");
1160
1248
  a == null || a.forEach((c, l) => {
1161
1249
  e[l] && setTimeout(() => {
1162
- c.generate(e[l]), s && t(this, kt).call(this);
1250
+ c.generate(e[l]), s && t(this, Mt).call(this);
1163
1251
  });
1164
1252
  });
1165
1253
  }, "#render"));
1166
- y(this, M, r), t(this, Zt).call(this);
1254
+ p(this, I, n), t(this, te).call(this);
1167
1255
  }
1168
1256
  };
1169
- M = new WeakMap(), Zt = new WeakMap(), kt = new WeakMap(), Gt = new WeakMap(), h(Ne, "LayoutManager");
1170
- let fe = Ne;
1171
- var Ct, ht;
1172
- const We = class We {
1173
- constructor(r) {
1174
- d(this, Ct);
1175
- d(this, ht, -1);
1176
- E(this, "count", /* @__PURE__ */ h(() => t(this, Ct).rawRecords.length, "count"));
1177
- y(this, Ct, r);
1257
+ I = new WeakMap(), te = new WeakMap(), Mt = new WeakMap(), ee = new WeakMap(), h(je, "LayoutManager");
1258
+ let ve = je;
1259
+ var It, ft;
1260
+ const Ve = class Ve {
1261
+ constructor(n) {
1262
+ d(this, It);
1263
+ d(this, ft, -1);
1264
+ E(this, "count", /* @__PURE__ */ h(() => t(this, It).rawRecords.length, "count"));
1265
+ p(this, It, n);
1178
1266
  }
1179
1267
  get at() {
1180
- return t(this, ht);
1268
+ return t(this, ft);
1181
1269
  }
1182
- set at(r) {
1183
- y(this, ht, parseInt(r, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1270
+ set at(n) {
1271
+ p(this, ft, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ft)}"]`) && setTimeout(() => {
1184
1272
  });
1185
1273
  }
1186
1274
  };
1187
- Ct = new WeakMap(), ht = new WeakMap(), h(We, "ngRow");
1188
- let ge = We;
1189
- var _, C, N, dt, Jt, V, Qt, rt, Lt, te, ee, ft;
1275
+ It = new WeakMap(), ft = new WeakMap(), h(Ve, "ngRow");
1276
+ let xe = Ve;
1277
+ var N, C, W, ut, se, U, ne, ot, $t, re, oe, gt;
1190
1278
  const B = class B {
1191
- constructor(r, e) {
1192
- d(this, _);
1279
+ constructor(n, e) {
1280
+ d(this, N);
1193
1281
  d(this, C);
1194
- d(this, N, []);
1195
- d(this, dt, []);
1196
- d(this, Jt, 0);
1197
- d(this, V, []);
1198
- d(this, Qt, /* @__PURE__ */ h(() => {
1199
- y(this, V, []);
1200
- const r = t(this, _).template || [];
1201
- Array.from(r).forEach((e) => {
1282
+ d(this, W, []);
1283
+ d(this, ut, []);
1284
+ d(this, se, 0);
1285
+ d(this, U, []);
1286
+ d(this, ne, /* @__PURE__ */ h(() => {
1287
+ p(this, U, []);
1288
+ const n = t(this, N).template || [];
1289
+ Array.from(n).forEach((e) => {
1202
1290
  var s;
1203
- t(this, V).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1291
+ t(this, U).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1204
1292
  }), (t(this, C).rawRecords || []).forEach((e) => {
1205
- e.__ng || (e.__ng = t(this, Lt).call(this)), e.__ng.height = t(this, V).slice();
1293
+ e.__ng || (e.__ng = t(this, $t).call(this)), e.__ng.height = t(this, U).slice();
1206
1294
  });
1207
1295
  }, "#initialize"));
1208
- d(this, rt, /* @__PURE__ */ h(() => {
1209
- const r = t(this, _).shadowRoot.querySelector("nine-table-sheets");
1210
- r == null || r.classList.toggle("nodata", this.length === 0), t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1296
+ d(this, ot, /* @__PURE__ */ h(() => {
1297
+ const n = t(this, N).shadowRoot.querySelector("nine-table-sheets");
1298
+ n == null || n.classList.toggle("nodata", this.length === 0), t(this, N).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1211
1299
  e.invalidate();
1212
1300
  });
1213
1301
  }, "#invalidate"));
1214
- E(this, "get", /* @__PURE__ */ h((r, e) => {
1215
- var n;
1302
+ E(this, "get", /* @__PURE__ */ h((n, e) => {
1303
+ var o;
1216
1304
  const s = this.getValidData();
1217
1305
  if (!s || s.length <= 0) return;
1218
- if (r == null) return t(this, ft).call(this, s);
1219
- if (r < 0 || r >= s.length) return null;
1220
- const i = typeof ((n = t(this, _).fields) == null ? void 0 : n.get) == "function" ? t(this, _).fields.get() : [];
1306
+ if (n == null) return t(this, gt).call(this, s);
1307
+ if (n < 0 || n >= s.length) return null;
1308
+ const r = typeof ((o = t(this, N).fields) == null ? void 0 : o.get) == "function" ? t(this, N).fields.get() : [];
1221
1309
  if (e != null) {
1222
- const o = i.indexOf(e);
1223
- return o >= 0 ? s[r].v[o] : null;
1310
+ const i = r.indexOf(e);
1311
+ return i >= 0 ? s[n].v[i] : null;
1224
1312
  }
1225
- return t(this, ft).call(this, s[r]);
1313
+ return t(this, gt).call(this, s[n]);
1226
1314
  }, "get"));
1227
- E(this, "set", /* @__PURE__ */ h((r) => {
1228
- this.clear(), this.add(r, !1), t(this, rt).call(this);
1315
+ E(this, "set", /* @__PURE__ */ h((n) => {
1316
+ this.clear(), this.add(n, !1), t(this, ot).call(this);
1229
1317
  }, "set"));
1230
- d(this, Lt, /* @__PURE__ */ h(() => ({
1318
+ d(this, $t, /* @__PURE__ */ h(() => ({
1231
1319
  rowState: B.ROW_STATE.EMPTY,
1232
1320
  deleted: !1,
1233
1321
  filtered: !1,
1234
- height: t(this, V).slice(),
1322
+ height: t(this, U).slice(),
1235
1323
  o: {},
1236
1324
  c: {},
1237
- _: [0, 0, 0, 0, B.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, V).slice(), -1, {}, {}]
1325
+ _: [0, 0, 0, 0, B.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, U).slice(), -1, {}, {}]
1238
1326
  }), "#getDefaultMeta"));
1239
1327
  E(this, "reset", /* @__PURE__ */ h(() => {
1240
- y(this, N, []), y(this, dt, []), t(this, rt).call(this);
1328
+ p(this, W, []), p(this, ut, []), t(this, ot).call(this);
1241
1329
  }, "reset"));
1242
1330
  E(this, "clear", /* @__PURE__ */ h(() => {
1243
- var r;
1244
- t(this, C).rawRecords = [], y(this, N, []), y(this, dt, []), (r = t(this, C).viewRecords) != null && r.reset && t(this, C).viewRecords.reset();
1331
+ var n;
1332
+ t(this, C).rawRecords = [], p(this, W, []), p(this, ut, []), (n = t(this, C).viewRecords) != null && n.reset && t(this, C).viewRecords.reset();
1245
1333
  }, "clear"));
1246
- d(this, te, /* @__PURE__ */ h((r) => {
1247
- var i;
1248
- Array.isArray(r) || (r = [r]);
1249
- const e = typeof ((i = t(this, _).fields) == null ? void 0 : i.get) == "function" ? t(this, _).fields.get() : Object.keys(r[0] || {}), s = [];
1250
- return r.forEach((n) => {
1251
- const o = { v: [] };
1334
+ d(this, re, /* @__PURE__ */ h((n) => {
1335
+ var r;
1336
+ Array.isArray(n) || (n = [n]);
1337
+ const e = typeof ((r = t(this, N).fields) == null ? void 0 : r.get) == "function" ? t(this, N).fields.get() : Object.keys(n[0] || {}), s = [];
1338
+ return n.forEach((o) => {
1339
+ const i = { v: [] };
1252
1340
  e.forEach((a) => {
1253
- o.v.push(n[a] !== void 0 && n[a] !== null ? n[a] : "");
1254
- }), s.push(o);
1341
+ i.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
1342
+ }), s.push(i);
1255
1343
  }), s;
1256
1344
  }, "#json2Array"));
1257
- d(this, ee, /* @__PURE__ */ h((r) => (Array.isArray(r) || (r = [r]), r.forEach((e) => {
1258
- e.__ng = t(this, Lt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = B.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1259
- }), r), "#defaultInsert"));
1260
- E(this, "add", /* @__PURE__ */ h((r, e = !0) => {
1261
- r === void 0 && (r = {});
1262
- const s = t(this, te).call(this, r);
1263
- t(this, C).rawRecords = t(this, C).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1264
- const i = this.count() - 1;
1265
- return e || s.forEach((n, o) => {
1266
- const a = t(this, C).rawRecords[i - o];
1345
+ d(this, oe, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1346
+ e.__ng = t(this, $t).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = B.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1347
+ }), n), "#defaultInsert"));
1348
+ E(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1349
+ n === void 0 && (n = {});
1350
+ const s = t(this, re).call(this, n);
1351
+ t(this, C).rawRecords = t(this, C).rawRecords.concat(t(this, oe).call(this, s)), this.resetRecords();
1352
+ const r = this.count() - 1;
1353
+ return e || s.forEach((o, i) => {
1354
+ const a = t(this, C).rawRecords[r - i];
1267
1355
  a && (a.__ng.rowState = B.ROW_STATE.EMPTY);
1268
- }), t(this, rt).call(this), i;
1356
+ }), t(this, ot).call(this), r;
1269
1357
  }, "add"));
1270
- E(this, "delete", /* @__PURE__ */ h((r) => {
1358
+ E(this, "delete", /* @__PURE__ */ h((n) => {
1271
1359
  let e = [];
1272
- Array.isArray(r) ? e = r : typeof r > "u" ? e = [t(this, C).host.row.at] : e = [parseInt(r, 10)], e.sort((s, i) => i - s).forEach((s) => {
1273
- if (t(this, N)[s]) {
1274
- const i = t(this, N)[s].__ng.rowid;
1275
- t(this, N)[s].__ng.rowState === B.ROW_STATE.INSERT ? t(this, C).rawRecords = t(this, C).rawRecords.filter((n) => n.__ng.rowid !== i) : t(this, C).rawRecords.forEach((n) => {
1276
- n.__ng.rowid === i && (n.__ng.deleted = !0, n.__ng.rowState = B.ROW_STATE.DELETE);
1360
+ Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, C).host.row.at] : e = [parseInt(n, 10)], e.sort((s, r) => r - s).forEach((s) => {
1361
+ if (t(this, W)[s]) {
1362
+ const r = t(this, W)[s].__ng.rowid;
1363
+ t(this, W)[s].__ng.rowState === B.ROW_STATE.INSERT ? t(this, C).rawRecords = t(this, C).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, C).rawRecords.forEach((o) => {
1364
+ o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = B.ROW_STATE.DELETE);
1277
1365
  });
1278
1366
  }
1279
- }), this.resetRecords(), t(this, rt).call(this);
1367
+ }), this.resetRecords(), t(this, ot).call(this);
1280
1368
  }, "delete"));
1281
- E(this, "setValue", /* @__PURE__ */ h((r, e, s) => {
1369
+ E(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1282
1370
  var c;
1283
- r = parseInt(r, 10);
1284
- const n = (typeof ((c = t(this, _).fields) == null ? void 0 : c.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
1285
- if (n < 0) return;
1286
- const o = this.getValidData()[r];
1287
- if (!o) return;
1288
- const a = o.v[n];
1289
- a !== s && o.__ng.rowState !== B.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = B.ROW_STATE.UPDATE), o.v[n] = s;
1371
+ n = parseInt(n, 10);
1372
+ const o = (typeof ((c = t(this, N).fields) == null ? void 0 : c.get) == "function" ? t(this, N).fields.get() : []).indexOf(e);
1373
+ if (o < 0) return;
1374
+ const i = this.getValidData()[n];
1375
+ if (!i) return;
1376
+ const a = i.v[o];
1377
+ a !== s && i.__ng.rowState !== B.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = B.ROW_STATE.UPDATE), i.v[o] = s;
1290
1378
  }, "setValue"));
1291
1379
  E(this, "resetRecords", /* @__PURE__ */ h(() => {
1292
- y(this, dt, t(this, C).rawRecords.filter((r) => !r.__ng.deleted)), y(this, N, t(this, C).rawRecords.filter((r) => !r.__ng.deleted && !r.__ng.filtered)), t(this, C).rawRecords.forEach((r, e) => {
1293
- r.__ng.rowidx = e;
1294
- }), t(this, N).forEach((r, e) => {
1295
- r.__ng.i = e;
1380
+ p(this, ut, t(this, C).rawRecords.filter((n) => !n.__ng.deleted)), p(this, W, t(this, C).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, C).rawRecords.forEach((n, e) => {
1381
+ n.__ng.rowidx = e;
1382
+ }), t(this, W).forEach((n, e) => {
1383
+ n.__ng.i = e;
1296
1384
  });
1297
1385
  }, "resetRecords"));
1298
- E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, C).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
1299
- d(this, ft, /* @__PURE__ */ h((r) => {
1300
- var o;
1301
- if (!r) return r;
1302
- const e = !Array.isArray(r), s = e ? [r] : r, i = typeof ((o = t(this, _).fields) == null ? void 0 : o.get) == "function" ? t(this, _).fields.get() : [], n = s.filter((a) => !a.__ng.deleted).map((a) => {
1386
+ E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, W).length === 0 && t(this, C).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1387
+ d(this, gt, /* @__PURE__ */ h((n) => {
1388
+ var i;
1389
+ if (!n) return n;
1390
+ const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((i = t(this, N).fields) == null ? void 0 : i.get) == "function" ? t(this, N).fields.get() : [], o = s.filter((a) => !a.__ng.deleted).map((a) => {
1303
1391
  const c = {};
1304
- return i.forEach((l, f) => {
1392
+ return r.forEach((l, f) => {
1305
1393
  c[l] = a.v ? a.v[f] : a[l];
1306
1394
  }), c.__ng = a.__ng, c;
1307
1395
  });
1308
- return e ? n[0] : n;
1396
+ return e ? o[0] : o;
1309
1397
  }, "#conv"));
1310
1398
  E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1311
- y(this, _, r), y(this, C, e), t(this, Qt).call(this);
1399
+ p(this, N, n), p(this, C, e), t(this, ne).call(this);
1312
1400
  }
1313
1401
  get source() {
1314
- return t(this, ft).call(this, t(this, C).rawRecords);
1402
+ return t(this, gt).call(this, t(this, C).rawRecords);
1315
1403
  }
1316
- set source(r) {
1317
- this.clear(), this.add(r, !1);
1404
+ set source(n) {
1405
+ this.clear(), this.add(n, !1);
1318
1406
  }
1319
1407
  get nextId() {
1320
- return ++Ue(this, Jt)._;
1408
+ return ++ns(this, se)._;
1321
1409
  }
1322
1410
  get count() {
1323
- return t(this, N).length;
1411
+ return t(this, W).length;
1324
1412
  }
1325
1413
  get length() {
1326
- return t(this, N).length;
1414
+ return t(this, W).length;
1327
1415
  }
1328
1416
  getRowCount() {
1329
1417
  return this.length;
1330
1418
  }
1331
1419
  };
1332
- _ = new WeakMap(), C = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), V = new WeakMap(), Qt = new WeakMap(), rt = new WeakMap(), Lt = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(B, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1420
+ N = new WeakMap(), C = new WeakMap(), W = new WeakMap(), ut = new WeakMap(), se = new WeakMap(), U = new WeakMap(), ne = new WeakMap(), ot = new WeakMap(), $t = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), gt = new WeakMap(), h(B, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1333
1421
  E(B, "ROW_STATE", {
1334
1422
  EMPTY: "EMPTY",
1335
1423
  NORMAL: "NORMAL",
@@ -1337,138 +1425,138 @@ E(B, "ROW_STATE", {
1337
1425
  UPDATE: "UPDATE",
1338
1426
  DELETE: "DELETE"
1339
1427
  });
1340
- let ue = B;
1428
+ let we = B;
1341
1429
  var it;
1342
- const Oe = class Oe {
1343
- constructor(r) {
1430
+ const Ye = class Ye {
1431
+ constructor(n) {
1344
1432
  d(this, it);
1345
- y(this, it, r), this.row = new ge(this), this.data = new ue(t(this, it), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1433
+ p(this, it, n), this.row = new xe(this), this.data = new we(t(this, it), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1346
1434
  var e;
1347
1435
  (e = t(this, it).view) != null && e.redraw && t(this, it).view.redraw();
1348
1436
  }, this.setDataSource = (e) => {
1349
1437
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1350
1438
  }, this.getRowState = (e) => {
1351
- var i, n;
1439
+ var r, o;
1352
1440
  const s = parseInt(e, 10);
1353
1441
  if (!(s >= this.data.count()))
1354
- return (n = (i = this.data.getValidData()[s]) == null ? void 0 : i.__ng) == null ? void 0 : n.rowState;
1442
+ return (o = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1355
1443
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1356
1444
  this.row.at = e;
1357
- }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, i) => {
1358
- e = parseInt(e, 10), this.data.setValue(e, s, i);
1445
+ }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, r) => {
1446
+ e = parseInt(e, 10), this.data.setValue(e, s, r);
1359
1447
  }, this.setDataSource([]);
1360
1448
  }
1361
1449
  };
1362
- it = new WeakMap(), h(Oe, "ngDataManager");
1363
- let be = Oe;
1364
- var gt, H, Ht, se;
1365
- const Be = class Be {
1450
+ it = new WeakMap(), h(Ye, "ngDataManager");
1451
+ let Se = Ye;
1452
+ var bt, H, _t, ie;
1453
+ const Ue = class Ue {
1366
1454
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1367
- constructor(r) {
1368
- d(this, gt);
1455
+ constructor(n) {
1456
+ d(this, bt);
1369
1457
  d(this, H, []);
1370
- E(this, "add", /* @__PURE__ */ h((r, e = "string") => {
1371
- r.forEach((s) => {
1372
- t(this, H).some((i) => i.name === s) || t(this, H).push({ name: s, type: e });
1373
- }), t(this, Ht).call(this);
1458
+ E(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1459
+ n.forEach((s) => {
1460
+ t(this, H).some((r) => r.name === s) || t(this, H).push({ name: s, type: e });
1461
+ }), t(this, _t).call(this);
1374
1462
  }, "add"));
1375
- d(this, Ht, /* @__PURE__ */ h(() => {
1376
- const r = /* @__PURE__ */ new Map();
1463
+ d(this, _t, /* @__PURE__ */ h(() => {
1464
+ const n = /* @__PURE__ */ new Map();
1377
1465
  t(this, H).forEach((e) => {
1378
- r.set(e.name, e.type);
1379
- }), y(this, H, Array.from(r, ([e, s]) => ({ name: e, type: s }))), y(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1466
+ n.set(e.name, e.type);
1467
+ }), p(this, H, Array.from(n, ([e, s]) => ({ name: e, type: s }))), p(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1380
1468
  }, "#adjust"));
1381
- d(this, se, /* @__PURE__ */ h(() => {
1382
- y(this, H, []), R.log(t(this, gt).querySelectorAll("table"));
1383
- const r = Array.from(t(this, gt).querySelectorAll("table"));
1384
- if (!(!r || r.length === 0)) {
1385
- for (const e of r)
1386
- R.log(e), $("[data-bind]", e).each((s, i) => {
1387
- const n = i.dataset.bind, o = i.getAttribute("data-type") || "string";
1388
- n && t(this, H).push({ name: n, type: o });
1469
+ d(this, ie, /* @__PURE__ */ h(() => {
1470
+ p(this, H, []), T.log(t(this, bt).querySelectorAll("table"));
1471
+ const n = Array.from(t(this, bt).querySelectorAll("table"));
1472
+ if (!(!n || n.length === 0)) {
1473
+ for (const e of n)
1474
+ T.log(e), $("[data-bind]", e).each((s, r) => {
1475
+ const o = r.dataset.bind, i = r.getAttribute("data-type") || "string";
1476
+ o && t(this, H).push({ name: o, type: i });
1389
1477
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1390
- $(`[${s}]`, e).each((i, n) => {
1391
- var o = n.getAttribute(s);
1392
- if (o.indexOf("data.") < 0) {
1393
- const a = o.search(/[(]/g);
1478
+ $(`[${s}]`, e).each((r, o) => {
1479
+ var i = o.getAttribute(s);
1480
+ if (i.indexOf("data.") < 0) {
1481
+ const a = i.search(/[(]/g);
1394
1482
  if (a > 0)
1395
1483
  try {
1396
- o = String(window[o.substring(0, a).trim()]);
1484
+ i = String(window[i.substring(0, a).trim()]);
1397
1485
  } catch {
1398
- o = "";
1486
+ i = "";
1399
1487
  }
1400
1488
  }
1401
- o.split("data.").forEach((a) => {
1489
+ i.split("data.").forEach((a) => {
1402
1490
  if (a.trim() != "") {
1403
1491
  const c = a.search(/[^_A-Za-z0-9]/g);
1404
1492
  let l = "";
1405
- c >= 0 ? l = a.substring(0, c) : o.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1493
+ c >= 0 ? l = a.substring(0, c) : i.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1406
1494
  }
1407
1495
  });
1408
1496
  });
1409
1497
  });
1410
- t(this, Ht).call(this);
1498
+ t(this, _t).call(this);
1411
1499
  }
1412
1500
  }, "#init"));
1413
- y(this, gt, r), t(this, se).call(this);
1501
+ p(this, bt, n), t(this, ie).call(this);
1414
1502
  }
1415
1503
  // 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
1416
1504
  get() {
1417
- return t(this, H).map((r) => r.name);
1505
+ return t(this, H).map((n) => n.name);
1418
1506
  }
1419
1507
  // 🎯 내부 객체 통째로 얻기
1420
1508
  getFields() {
1421
1509
  return t(this, H);
1422
1510
  }
1423
1511
  // 🎯 특정 필드의 데이터 타입 조회
1424
- getType(r) {
1425
- const e = t(this, H).find((s) => s.name === r);
1512
+ getType(n) {
1513
+ const e = t(this, H).find((s) => s.name === n);
1426
1514
  return e ? e.type : "string";
1427
1515
  }
1428
- indexOf(r) {
1429
- return t(this, H).findIndex((e) => e.name === r);
1516
+ indexOf(n) {
1517
+ return t(this, H).findIndex((e) => e.name === n);
1430
1518
  }
1431
- includes(r) {
1432
- return t(this, H).some((e) => e.name === r);
1519
+ includes(n) {
1520
+ return t(this, H).some((e) => e.name === n);
1433
1521
  }
1434
1522
  };
1435
- gt = new WeakMap(), H = new WeakMap(), Ht = new WeakMap(), se = new WeakMap(), h(Be, "ngFields");
1436
- let ye = Be;
1437
- var nt, re, ie;
1438
- const ze = class ze extends HTMLElement {
1523
+ bt = new WeakMap(), H = new WeakMap(), _t = new WeakMap(), ie = new WeakMap(), h(Ue, "ngFields");
1524
+ let Ee = Ue;
1525
+ var at, ae, le;
1526
+ const Xe = class Xe extends HTMLElement {
1439
1527
  constructor() {
1440
1528
  super();
1441
1529
  //#created = false;
1442
- d(this, nt);
1443
- d(this, re);
1444
- d(this, ie, /* @__PURE__ */ h(() => {
1445
- this.fields = new ye(this), y(this, re, new fe(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1530
+ d(this, at);
1531
+ d(this, ae);
1532
+ d(this, le, /* @__PURE__ */ h(() => {
1533
+ this.fields = new Ee(this), p(this, ae, new ve(this)), T.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1446
1534
  }, "#init"));
1447
- this.attachShadow({ mode: "open" }), y(this, nt, new be(this));
1535
+ this.attachShadow({ mode: "open" }), p(this, at, new Se(this));
1448
1536
  }
1449
1537
  connectedCallback() {
1450
- t(this, ie).call(this);
1538
+ t(this, le).call(this);
1451
1539
  }
1452
1540
  disconnectedCallback() {
1453
- R.log("NineTable disconnected.");
1541
+ T.log("NineTable disconnected.");
1454
1542
  }
1455
1543
  // 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
1456
1544
  get data() {
1457
- return t(this, nt).data;
1545
+ return t(this, at).data;
1458
1546
  }
1459
1547
  // 🎯 행(row) 관련 제어 접근자 오픈
1460
1548
  get row() {
1461
- return t(this, nt).row;
1549
+ return t(this, at).row;
1462
1550
  }
1463
1551
  // 🎯 전체 데이터 매니저 접근 필요할 경우
1464
1552
  get dataManager() {
1465
- return t(this, nt);
1553
+ return t(this, at);
1466
1554
  }
1467
1555
  };
1468
- nt = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), h(ze, "NineTable");
1469
- let pe = ze;
1470
- customElements.get("nine-table") || customElements.define("nine-table", pe);
1471
- const mt = class mt extends HTMLElement {
1556
+ at = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), h(Xe, "NineTable");
1557
+ let Ae = Xe;
1558
+ customElements.get("nine-table") || customElements.define("nine-table", Ae);
1559
+ const xt = class xt extends HTMLElement {
1472
1560
  // 👈 커스텀 스타일용 캐시 추가
1473
1561
  constructor() {
1474
1562
  super();
@@ -1479,74 +1567,74 @@ const mt = class mt extends HTMLElement {
1479
1567
  connectedCallback() {
1480
1568
  }
1481
1569
  };
1482
- h(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1483
- let me = mt;
1484
- var L, $t, p, qe, Re, Te, ke, Ce;
1485
- const De = class De extends me {
1570
+ h(xt, "BasicCellElement"), E(xt, "_styleCache", /* @__PURE__ */ new Map()), E(xt, "_customStyleCache", /* @__PURE__ */ new Map());
1571
+ let Re = xt;
1572
+ var L, Nt, m, Me, Ie, $e, _e, Ne;
1573
+ const Ke = class Ke extends Re {
1486
1574
  constructor() {
1487
1575
  super();
1488
1576
  d(this, L);
1489
- d(this, $t);
1490
- d(this, p);
1491
- d(this, qe);
1492
- d(this, Re);
1493
- d(this, Te);
1494
- d(this, ke);
1577
+ d(this, Nt);
1578
+ d(this, m);
1579
+ d(this, Me);
1580
+ d(this, Ie);
1581
+ d(this, $e);
1582
+ d(this, _e);
1495
1583
  E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1496
- if (t(this, p))
1497
- if (t(this, p).closest("tbody")) {
1498
- const s = t(this, p).closest("tr").data, i = parseInt(t(this, p).dataset.row);
1584
+ if (t(this, m))
1585
+ if (t(this, m).closest("tbody")) {
1586
+ const s = t(this, m).closest("tr").data, r = parseInt(t(this, m).dataset.row);
1499
1587
  if (!s) return "";
1500
- if (ninegrid.isNull(t(this, p).dataset.expr)) {
1501
- if (!ninegrid.isNull(t(this, p).dataset.bind))
1502
- return s[t(this, p).dataset.bind] || ninegrid.nvl(e, "");
1588
+ if (ninegrid.isNull(t(this, m).dataset.expr)) {
1589
+ if (!ninegrid.isNull(t(this, m).dataset.bind))
1590
+ return s[t(this, m).dataset.bind] || ninegrid.nvl(e, "");
1503
1591
  } else try {
1504
- return this.getExprValue(t(this, p).dataset.expr, s, i, t(this, p));
1592
+ return this.getExprValue(t(this, m).dataset.expr, s, r, t(this, m));
1505
1593
  } catch {
1506
- console.error(t(this, p).dataset.expr, s, t(this, p).dataset.row);
1594
+ console.error(t(this, m).dataset.expr, s, t(this, m).dataset.row);
1507
1595
  }
1508
1596
  return ninegrid.nvl(e, "");
1509
1597
  } else
1510
1598
  try {
1511
- return t(this, L).exprFunction(t(this, p).dataset.expr).call(this, null, -1, t(this, L).data);
1599
+ return t(this, L).exprFunction(t(this, m).dataset.expr).call(this, null, -1, t(this, L).data);
1512
1600
  } catch {
1513
1601
  }
1514
1602
  }, "getDisplayText"));
1515
- d(this, Ce, /* @__PURE__ */ h(() => {
1516
- if (!(!t(this, L) || !t(this, L).template || !t(this, p).closest("tbody.bindable"))) {
1517
- var e = ninegrid.j.querySelectorAll(t(this, p)).attr("suppress");
1603
+ d(this, Ne, /* @__PURE__ */ h(() => {
1604
+ if (!(!t(this, L) || !t(this, L).template || !t(this, m).closest("tbody.bindable"))) {
1605
+ var e = ninegrid.j.querySelectorAll(t(this, m)).attr("suppress");
1518
1606
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1519
- var s = t(this, p).closest("tr"), i = [];
1520
- $("th,td", s).each((m, W) => {
1521
- var T = ninegrid.j.querySelectorAll(W).attr("suppress");
1522
- T && W.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && i.push(T));
1523
- }), i.sort();
1524
- var n = !1;
1607
+ var s = t(this, m).closest("tr"), r = [];
1608
+ $("th,td", s).each((v, M) => {
1609
+ var q = ninegrid.j.querySelectorAll(M).attr("suppress");
1610
+ q && M.dataset.row && (q = parseInt(q), !isNaN(q) && q <= e && r.push(q));
1611
+ }), r.sort();
1612
+ var o = !1;
1525
1613
  if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1526
- for (var o of i) {
1527
- if (o > e) break;
1528
- var a = parseInt(t(this, p).dataset.row), c = a - 1, l = t(this, p).closest("tr").data, f = t(this, L).data.get(c);
1529
- t(this, p).dataset.matrixRow;
1530
- var g = t(this, L).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, p).dataset.matrixRow}"]`), b = g.dataset.expr ? this.getExprValue(g.dataset.expr, l, a) : l[g.dataset.bind], u = g.dataset.expr ? this.getExprValue(g.dataset.expr, f, c) : f[g.dataset.bind];
1614
+ for (var i of r) {
1615
+ if (i > e) break;
1616
+ var a = parseInt(t(this, m).dataset.row), c = a - 1, l = t(this, m).closest("tr").data, f = t(this, L).data.get(c);
1617
+ t(this, m).dataset.matrixRow;
1618
+ var g = t(this, L).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, m).dataset.matrixRow}"]`), b = g.dataset.expr ? this.getExprValue(g.dataset.expr, l, a) : l[g.dataset.bind], u = g.dataset.expr ? this.getExprValue(g.dataset.expr, f, c) : f[g.dataset.bind];
1531
1619
  if (b != u) {
1532
- n = !0;
1620
+ o = !0;
1533
1621
  break;
1534
1622
  }
1535
1623
  }
1536
1624
  else
1537
- n = !0;
1538
- n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, p)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, p)).hasClass("hidden") || (n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, p)).addClass("hidden"));
1539
- var v = parseInt(t(this, p).dataset.matrixRow), w = v - 1, A = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${w}"]`);
1540
- $(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
1625
+ o = !0;
1626
+ o ? ninegrid.j.querySelectorAll(t(this, m)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, m)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, m)).hasClass("hidden") || (o ? ninegrid.j.querySelectorAll(t(this, m)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, m)).addClass("hidden"));
1627
+ var y = parseInt(t(this, m).dataset.matrixRow), x = y - 1, A = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, m).dataset.col}"][data-matrix-row="${x}"]`);
1628
+ $(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, m)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, m)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
1541
1629
  }
1542
1630
  }
1543
1631
  }, "#resetSuppress"));
1544
- E(this, "getExprValue", /* @__PURE__ */ h((e, s, i, n) => {
1632
+ E(this, "getExprValue", /* @__PURE__ */ h((e, s, r, o) => {
1545
1633
  if (typeof e < "u")
1546
1634
  try {
1547
- i = parseInt(i);
1548
- const o = e.replace("()", "");
1549
- return t(this, L)[o] ? t(this, L)[o].call(this, s, i, t(this, p)) : t(this, L).exprFunction(e).call(this, s, i, t(this, L).data);
1635
+ r = parseInt(r);
1636
+ const i = e.replace("()", "");
1637
+ return t(this, L)[i] ? t(this, L)[i].call(this, s, r, t(this, m)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
1550
1638
  } catch {
1551
1639
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1552
1640
  }
@@ -1555,31 +1643,31 @@ const De = class De extends me {
1555
1643
  }, "getExprValue"));
1556
1644
  }
1557
1645
  connectedCallback() {
1558
- super.connectedCallback(), y(this, L, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, $t, t(this, p).closest("tr"));
1646
+ super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, m, this.closest("th,td")), p(this, Nt, t(this, m).closest("tr"));
1559
1647
  }
1560
1648
  get value() {
1561
- var e = !t(this, L) || !t(this, L).dataManager || !t(this, p) || !t(this, p).dataset || !t(this, p).dataset.row || !t(this, p).dataset.bind ? "" : t(this, p).closest("tr").data[t(this, p).dataset.bind];
1649
+ var e = !t(this, L) || !t(this, L).dataManager || !t(this, m) || !t(this, m).dataset || !t(this, m).dataset.row || !t(this, m).dataset.bind ? "" : t(this, m).closest("tr").data[t(this, m).dataset.bind];
1562
1650
  return e ?? "";
1563
1651
  }
1564
1652
  set value(e) {
1565
- var s = parseInt(t(this, p).dataset.row);
1566
- const i = this.getAttribute("update-row-state") != "false";
1567
- s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, i) : t(this, L).data.setValue(s, t(this, p).dataset.bind, e, i);
1653
+ var s = parseInt(t(this, m).dataset.row);
1654
+ const r = this.getAttribute("update-row-state") != "false";
1655
+ s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, m).dataset.index), t(this, m).dataset.bind, e, r) : t(this, L).data.setValue(s, t(this, m).dataset.bind, e, r);
1568
1656
  }
1569
1657
  get row() {
1570
- return parseInt(t(this, p).dataset.row);
1658
+ return parseInt(t(this, m).dataset.row);
1571
1659
  }
1572
1660
  get data() {
1573
- return t(this, p).closest("tr").data;
1661
+ return t(this, m).closest("tr").data;
1574
1662
  }
1575
1663
  refresh() {
1576
- const e = t(this, p).dataset.bind;
1577
- return parseInt(t(this, p).dataset.row), t(this, $t).data[e];
1664
+ const e = t(this, m).dataset.bind;
1665
+ return parseInt(t(this, m).dataset.row), t(this, Nt).data[e];
1578
1666
  }
1579
1667
  };
1580
- L = new WeakMap(), $t = new WeakMap(), p = new WeakMap(), qe = new WeakMap(), Re = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), h(De, "CellElement");
1581
- let ve = De;
1582
- const Pe = class Pe extends ve {
1668
+ L = new WeakMap(), Nt = new WeakMap(), m = new WeakMap(), Me = new WeakMap(), Ie = new WeakMap(), $e = new WeakMap(), _e = new WeakMap(), Ne = new WeakMap(), h(Ke, "CellElement");
1669
+ let qe = Ke;
1670
+ const Ze = class Ze extends qe {
1583
1671
  constructor() {
1584
1672
  super();
1585
1673
  }
@@ -1590,21 +1678,21 @@ const Pe = class Pe extends ve {
1590
1678
  return super.refresh();
1591
1679
  }
1592
1680
  };
1593
- h(Pe, "EditableCellElement");
1594
- let xe = Pe;
1595
- var Mt, ot, ut, bt, ne, Y, Le;
1596
- const je = class je extends xe {
1681
+ h(Ze, "EditableCellElement");
1682
+ let Te = Ze;
1683
+ var Wt, lt, pt, yt, ce, X, We;
1684
+ const Ge = class Ge extends Te {
1597
1685
  constructor() {
1598
1686
  super();
1599
- d(this, Mt);
1600
- d(this, ot);
1601
- d(this, ut);
1602
- d(this, bt);
1603
- d(this, ne);
1604
- d(this, Y);
1687
+ d(this, Wt);
1688
+ d(this, lt);
1689
+ d(this, pt);
1690
+ d(this, yt);
1691
+ d(this, ce);
1692
+ d(this, X);
1605
1693
  E(this, "refresh", /* @__PURE__ */ h(() => {
1606
1694
  const e = super.refresh();
1607
- t(this, Mt).value = e;
1695
+ t(this, Wt).value = e;
1608
1696
  }, "refresh"));
1609
1697
  /**
1610
1698
  dataRefresh = (v) => {
@@ -1636,22 +1724,22 @@ const je = class je extends xe {
1636
1724
  if (!v) this.reset();
1637
1725
  };
1638
1726
  */
1639
- d(this, Le, /* @__PURE__ */ h((e) => {
1727
+ d(this, We, /* @__PURE__ */ h((e) => {
1640
1728
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1641
- if (t(this, ot) == "number") {
1642
- let n = [];
1643
- if (t(this, Y) && Number(t(this, Y)) > 0 && n.push("."), t(this, bt) && Number(t(this, bt)) >= 0 && n.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !n.includes(e.key) && e.preventDefault(), t(this, Y) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1644
- var s = e.target.value, i = s.indexOf(".");
1645
- if (i >= 0) {
1646
- var s = s.substr(i + 1, s.length);
1647
- s.length >= Number(t(this, Y)) && e.preventDefault();
1729
+ if (t(this, lt) == "number") {
1730
+ let o = [];
1731
+ if (t(this, X) && Number(t(this, X)) > 0 && o.push("."), t(this, yt) && Number(t(this, yt)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.includes(e.key) && e.preventDefault(), t(this, X) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1732
+ var s = e.target.value, r = s.indexOf(".");
1733
+ if (r >= 0) {
1734
+ var s = s.substr(r + 1, s.length);
1735
+ s.length >= Number(t(this, X)) && e.preventDefault();
1648
1736
  }
1649
1737
  }
1650
1738
  }
1651
- t(this, ut) && ninegrid.getByteLength(e.target.value) >= Number(t(this, ut)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1739
+ t(this, pt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, pt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1652
1740
  }
1653
1741
  }, "#onKeyDown"));
1654
- if (this.applyBaseStyle(), y(this, ot, this.getAttribute("type") || "text"), y(this, ut, this.getAttribute("maxbyte")), y(this, bt, this.getAttribute("min")), y(this, ne, this.getAttribute("max")), y(this, Y, this.getAttribute("scale")), !["text", "number"].includes(t(this, ot))) throw `invalid type : ${t(this, ot)}`;
1742
+ if (this.applyBaseStyle(), p(this, lt, this.getAttribute("type") || "text"), p(this, pt, this.getAttribute("maxbyte")), p(this, yt, this.getAttribute("min")), p(this, ce, this.getAttribute("max")), p(this, X, this.getAttribute("scale")), !["text", "number"].includes(t(this, lt))) throw `invalid type : ${t(this, lt)}`;
1655
1743
  }
1656
1744
  connectedCallback() {
1657
1745
  for (var e = [], s = 0; s < this.attributes.length; s++)
@@ -1661,11 +1749,11 @@ const je = class je extends xe {
1661
1749
  ${e.join(" ")}
1662
1750
  ondragstart="return false;"
1663
1751
  >
1664
- `, super.connectedCallback(), y(this, Mt, this.querySelector("input"));
1752
+ `, super.connectedCallback(), p(this, Wt, this.querySelector("input"));
1665
1753
  }
1666
1754
  };
1667
- Mt = new WeakMap(), ot = new WeakMap(), ut = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), Y = new WeakMap(), Le = new WeakMap(), h(je, "CellInputText");
1668
- let we = je;
1755
+ Wt = new WeakMap(), lt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), ce = new WeakMap(), X = new WeakMap(), We = new WeakMap(), h(Ge, "CellInputText");
1756
+ let ke = Ge;
1669
1757
  customElements.get("cell-input-text");
1670
- customElements.get("cell-input") || customElements.define("cell-input", we);
1758
+ customElements.get("cell-input") || customElements.define("cell-input", ke);
1671
1759
  //# sourceMappingURL=nine-table.js.map