@ninebone/table 0.0.483 → 0.0.486

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,57 +1,57 @@
1
- var Fe = Object.defineProperty;
2
- var Ye = (q) => {
1
+ var je = Object.defineProperty;
2
+ var Fe = (q) => {
3
3
  throw TypeError(q);
4
4
  };
5
- var Ue = (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 A = (q, r, e) => Ue(q, typeof r != "symbol" ? r + "" : r, e), Ve = (q, r, e) => r.has(q) || Ye("Cannot " + e);
8
- var t = (q, r, e) => (Ve(q, r, "read from private field"), e ? e.call(q) : r.get(q)), d = (q, r, e) => r.has(q) ? Ye("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(q) : r.set(q, e), y = (q, r, e, s) => (Ve(q, r, "write to private field"), s ? s.call(q, e) : r.set(q, e), e);
9
- var Ke = (q, r, e, s) => ({
10
- set _(i) {
11
- y(q, r, i, e);
5
+ var Ue = (q, i, e) => i in q ? je(q, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[i] = e;
6
+ var h = (q, i) => je(q, "name", { value: i, configurable: !0 });
7
+ var A = (q, i, e) => Ue(q, typeof i != "symbol" ? i + "" : i, e), Ve = (q, i, e) => i.has(q) || Fe("Cannot " + e);
8
+ var t = (q, i, e) => (Ve(q, i, "read from private field"), e ? e.call(q) : i.get(q)), d = (q, i, e) => i.has(q) ? Fe("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(q) : i.set(q, e), y = (q, i, e, s) => (Ve(q, i, "write to private field"), s ? s.call(q, e) : i.set(q, e), e);
9
+ var Ye = (q, i, e, s) => ({
10
+ set _(r) {
11
+ y(q, i, r, e);
12
12
  },
13
13
  get _() {
14
- return t(q, r, s);
14
+ return t(q, i, s);
15
15
  }
16
16
  });
17
17
  import { trace as Xe } from "@ninebone/util";
18
- const He = class He extends Xe.constructor {
18
+ const Le = class Le extends Xe.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(He, "Trace");
24
- let le = He;
25
- const pt = new le();
26
- var D, P, E, K, U, X, _t, Z, Nt;
27
- const Me = class Me extends HTMLElement {
23
+ h(Le, "Trace");
24
+ let oe = Le;
25
+ const U = new oe();
26
+ var B, P, w, X, K, Z, It, G, _t;
27
+ const He = class He extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- d(this, D);
30
+ d(this, B);
31
31
  d(this, P, !1);
32
- d(this, E);
33
- d(this, K);
34
- d(this, U);
32
+ d(this, w);
35
33
  d(this, X);
36
- d(this, _t, /* @__PURE__ */ h(() => {
37
- if (!t(this, D)) return;
38
- const e = t(this, D).querySelector(".ng-container-body .ng-part-body");
39
- e && (y(this, X, new ResizeObserver(() => {
34
+ d(this, K);
35
+ d(this, Z);
36
+ d(this, It, /* @__PURE__ */ h(() => {
37
+ if (!t(this, B)) return;
38
+ const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
39
+ e && (y(this, Z, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, X).observe(e));
41
+ })), t(this, Z).observe(e));
42
42
  }, "#observeResize"));
43
43
  A(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!t(this, D) || !t(this, E) || t(this, P)) return;
45
- const e = t(this, E).container, s = e.querySelector("table");
44
+ if (!t(this, B) || !t(this, w) || t(this, P)) return;
45
+ const e = t(this, w).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const i = t(this, E).track, n = t(this, E).thumb, o = t(this, D).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
47
+ const r = t(this, w).track, n = t(this, w).thumb, o = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
48
48
  if (a !== 0 && c > a)
49
49
  o && (o.style.display = "flex");
50
50
  else {
51
51
  o && (o.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
57
  n.style.width = `${f}px`;
@@ -59,51 +59,51 @@ const Me = class Me extends HTMLElement {
59
59
  let g = 0;
60
60
  b > 0 && (g = parseInt(u / b * (l - f), 10)), g < 0 && (g = 0);
61
61
  const m = l - f;
62
- g > m && (g = m), n.style.left = `${g}px`, t(this, E).left.disabled = g === 0, t(this, E).right.disabled = g >= m - 1;
62
+ g > m && (g = m), n.style.left = `${g}px`, t(this, w).left.disabled = g === 0, t(this, w).right.disabled = g >= m - 1;
63
63
  }, "refresh"));
64
- d(this, Z, /* @__PURE__ */ h((e) => {
65
- if (!t(this, E)) return !1;
66
- const s = t(this, E).container, i = s.querySelector("table");
67
- if (!i) return !1;
68
- const n = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientWidth;
64
+ d(this, G, /* @__PURE__ */ h((e) => {
65
+ if (!t(this, w)) return !1;
66
+ const s = t(this, w).container, r = s.querySelector("table");
67
+ if (!r) return !1;
68
+ const n = t(this, w).track.getBoundingClientRect(), o = t(this, w).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
71
  const c = n.width - o;
72
- a > c && (a = c), a = parseInt(a, 10), t(this, E).thumb.style.left = `${a}px`, t(this, E).left.disabled = a === 0, t(this, E).right.disabled = a >= c - 1;
73
- const l = s.clientWidth, u = i.scrollWidth - l;
72
+ a > c && (a = c), a = parseInt(a, 10), t(this, w).thumb.style.left = `${a}px`, t(this, w).left.disabled = a === 0, t(this, w).right.disabled = a >= c - 1;
73
+ const l = s.clientWidth, u = r.scrollWidth - l;
74
74
  return c > 0 && u > 0 && (s.scrollLeft = a / c * u), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, Nt, /* @__PURE__ */ h(() => {
77
- const e = /* @__PURE__ */ h((i) => {
78
- clearInterval(t(this, K)), clearInterval(t(this, U));
79
- const n = parseInt(t(this, E).thumb.style.left || 0, 10);
80
- t(this, Z).call(this, n + i), y(this, K, setInterval(() => {
81
- clearInterval(t(this, K)), y(this, U, setInterval(() => {
82
- const o = parseInt(t(this, E).thumb.style.left || 0, 10);
83
- t(this, Z).call(this, o + i) || clearInterval(t(this, U));
76
+ d(this, _t, /* @__PURE__ */ h(() => {
77
+ const e = /* @__PURE__ */ h((r) => {
78
+ clearInterval(t(this, X)), clearInterval(t(this, K));
79
+ const n = parseInt(t(this, w).thumb.style.left || 0, 10);
80
+ t(this, G).call(this, n + r), y(this, X, setInterval(() => {
81
+ clearInterval(t(this, X)), y(this, K, setInterval(() => {
82
+ const o = parseInt(t(this, w).thumb.style.left || 0, 10);
83
+ t(this, G).call(this, o + r) || clearInterval(t(this, K));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
- clearInterval(t(this, K)), clearInterval(t(this, U));
87
+ clearInterval(t(this, X)), clearInterval(t(this, K));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((i) => {
90
- t(this, E).left.addEventListener(i, s), t(this, E).right.addEventListener(i, s), t(this, E).track.addEventListener(i, s);
91
- }), t(this, E).left.addEventListener("mousedown", (i) => {
92
- i.button === 0 && e(-20);
93
- }), t(this, E).right.addEventListener("mousedown", (i) => {
94
- i.button === 0 && e(20);
95
- }), t(this, E).left.addEventListener("touchstart", () => e(-20)), t(this, E).right.addEventListener("touchstart", () => e(20)), t(this, E).track.addEventListener("mousedown", (i) => {
96
- if (i.button !== 0) return;
97
- i.preventDefault();
98
- const n = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientWidth;
99
- t(this, Z).call(this, i.clientX - n.left - o / 2);
100
- }), t(this, E).thumb.addEventListener("mousedown", (i) => {
101
- if (i.button !== 0) return;
102
- i.stopPropagation(), i.preventDefault(), y(this, P, !0), this.shiftX = i.clientX - t(this, E).thumb.getBoundingClientRect().left;
89
+ ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
+ t(this, w).left.addEventListener(r, s), t(this, w).right.addEventListener(r, s), t(this, w).track.addEventListener(r, s);
91
+ }), t(this, w).left.addEventListener("mousedown", (r) => {
92
+ r.button === 0 && e(-20);
93
+ }), t(this, w).right.addEventListener("mousedown", (r) => {
94
+ r.button === 0 && e(20);
95
+ }), t(this, w).left.addEventListener("touchstart", () => e(-20)), t(this, w).right.addEventListener("touchstart", () => e(20)), t(this, w).track.addEventListener("mousedown", (r) => {
96
+ if (r.button !== 0) return;
97
+ r.preventDefault();
98
+ const n = t(this, w).track.getBoundingClientRect(), o = t(this, w).thumb.clientWidth;
99
+ t(this, G).call(this, r.clientX - n.left - o / 2);
100
+ }), t(this, w).thumb.addEventListener("mousedown", (r) => {
101
+ if (r.button !== 0) return;
102
+ r.stopPropagation(), r.preventDefault(), y(this, P, !0), this.shiftX = r.clientX - t(this, w).thumb.getBoundingClientRect().left;
103
103
  const n = /* @__PURE__ */ h((a) => {
104
104
  if (!t(this, P)) return;
105
- const c = t(this, E).track.getBoundingClientRect();
106
- t(this, Z).call(this, a.clientX - c.left - this.shiftX);
105
+ const c = t(this, w).track.getBoundingClientRect();
106
+ t(this, G).call(this, a.clientX - c.left - this.shiftX);
107
107
  }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
108
108
  y(this, P, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
@@ -112,7 +112,7 @@ const Me = class Me extends HTMLElement {
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (y(this, D, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, D)) return;
115
+ if (y(this, B, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, B)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -177,12 +177,12 @@ const Me = class Me extends HTMLElement {
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
179
  const e = /* @__PURE__ */ h(() => {
180
- const s = t(this, D).querySelector(".ng-container-body .ng-part-body");
180
+ const s = t(this, B).querySelector(".ng-container-body .ng-part-body");
181
181
  if (!s) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- y(this, E, {
185
+ y(this, w, {
186
186
  container: s,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -190,72 +190,72 @@ const Me = class Me extends HTMLElement {
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
192
  t(this, P) || this.refresh();
193
- }), t(this, Nt).call(this), t(this, _t).call(this), this.refresh();
193
+ }), t(this, _t).call(this), t(this, It).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, X) && t(this, X).disconnect();
198
+ t(this, Z) && t(this, Z).disconnect();
199
199
  }
200
200
  };
201
- D = new WeakMap(), P = new WeakMap(), E = new WeakMap(), K = new WeakMap(), U = new WeakMap(), X = new WeakMap(), _t = new WeakMap(), Z = new WeakMap(), Nt = new WeakMap(), h(Me, "NineTableHScrollBar");
202
- let ce = Me;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ce);
204
- var j, nt, G, R, wt, St, Wt;
201
+ B = new WeakMap(), P = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), h(He, "NineTableHScrollBar");
202
+ let ae = He;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
204
+ var j, ot, J, R, xt, vt, Nt;
205
205
  const $e = class $e extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
208
  d(this, j);
209
- d(this, nt);
210
- d(this, G, !1);
209
+ d(this, ot);
210
+ d(this, J, !1);
211
211
  d(this, R);
212
- d(this, wt, 0);
213
- d(this, St, 0);
212
+ d(this, xt, 0);
213
+ d(this, vt, 0);
214
214
  A(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (!t(this, j) || !t(this, R)) return;
216
- const e = t(this, R).container, s = t(this, R).track, i = t(this, R).thumb, n = e.clientHeight, a = (t(this, j).data.get() || []).length, c = t(this, nt).getRowHeight(), l = a * c;
216
+ const e = t(this, R).container, s = t(this, R).track, r = t(this, R).thumb, n = e.clientHeight, a = (t(this, j).data.get() || []).length, c = t(this, ot).getRowHeight(), l = a * c;
217
217
  if (l <= n) {
218
- i.style.display = "none", t(this, R).top.disabled = !0, t(this, R).bottom.disabled = !0;
218
+ r.style.display = "none", t(this, R).top.disabled = !0, t(this, R).bottom.disabled = !0;
219
219
  return;
220
220
  } else
221
- i.style.display = "block";
221
+ r.style.display = "block";
222
222
  const f = s.clientHeight;
223
223
  if (f <= 0) return;
224
224
  const u = Math.max(Math.min(f * (n / l), f), 20);
225
- i.style.height = `${u}px`;
225
+ r.style.height = `${u}px`;
226
226
  const b = e.scrollTop, g = Math.max(l - n, 1);
227
227
  let m = 0;
228
228
  g > 0 && (m = b / g * (f - u));
229
229
  const v = f - u;
230
- m < 0 && (m = 0), m > v && (m = v), i.style.top = `${m}px`, t(this, R).top.disabled = b <= 0, t(this, R).bottom.disabled = b >= g - 1;
230
+ m < 0 && (m = 0), m > v && (m = v), r.style.top = `${m}px`, t(this, R).top.disabled = b <= 0, t(this, R).bottom.disabled = b >= g - 1;
231
231
  }, "refresh"));
232
- d(this, Wt, /* @__PURE__ */ h(() => {
232
+ d(this, Nt, /* @__PURE__ */ h(() => {
233
233
  const e = t(this, R).container, s = /* @__PURE__ */ h(() => {
234
- const n = (t(this, j).data.get() || []).length, o = t(this, nt).getRowHeight();
234
+ const n = (t(this, j).data.get() || []).length, o = t(this, ot).getRowHeight();
235
235
  return n * o;
236
236
  }, "getContentHeight");
237
237
  e.addEventListener("scroll", () => {
238
- t(this, G) || this.refresh();
239
- }), t(this, R).thumb.addEventListener("mousedown", (i) => {
240
- if (i.button !== 0) return;
241
- i.stopPropagation(), i.preventDefault(), y(this, G, !0), y(this, wt, i.clientY), y(this, St, e.scrollTop);
238
+ t(this, J) || this.refresh();
239
+ }), t(this, R).thumb.addEventListener("mousedown", (r) => {
240
+ if (r.button !== 0) return;
241
+ r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this, xt, r.clientY), y(this, vt, e.scrollTop);
242
242
  const n = /* @__PURE__ */ h((a) => {
243
- if (!t(this, G)) return;
244
- const c = t(this, R).track.getBoundingClientRect(), l = t(this, R).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, wt), g = e.clientHeight, m = s(), v = Math.max(m - g, 1);
243
+ if (!t(this, J)) return;
244
+ const c = t(this, R).track.getBoundingClientRect(), l = t(this, R).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, xt), g = e.clientHeight, m = s(), v = Math.max(m - g, 1);
245
245
  if (u > 0 && v > 0) {
246
- const S = b / u * v;
247
- let x = t(this, St) + S;
248
- const M = Math.max(0, m - g);
249
- x < 0 && (x = 0), x > M && (x = M), e.scrollTop = x;
246
+ const E = b / u * v;
247
+ let x = t(this, vt) + E;
248
+ const H = Math.max(0, m - g);
249
+ x < 0 && (x = 0), x > H && (x = H), e.scrollTop = x;
250
250
  }
251
251
  this.refresh();
252
252
  }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
253
- y(this, G, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
253
+ y(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
254
254
  }, "onMouseUp");
255
255
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
256
- }), t(this, R).track.addEventListener("mousedown", (i) => {
257
- if (i.button !== 0 || i.target === t(this, R).thumb) return;
258
- const n = t(this, R).track.getBoundingClientRect(), o = t(this, R).thumb.clientHeight, a = i.clientY - n.top - o / 2, l = n.height - o, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
256
+ }), t(this, R).track.addEventListener("mousedown", (r) => {
257
+ if (r.button !== 0 || r.target === t(this, R).thumb) return;
258
+ const n = t(this, R).track.getBoundingClientRect(), o = t(this, R).thumb.clientHeight, a = r.clientY - n.top - o / 2, l = n.height - o, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
259
259
  if (l > 0 && b > 0) {
260
260
  const g = Math.max(0, Math.min(1, a / l));
261
261
  e.scrollTop = g * b;
@@ -269,7 +269,7 @@ const $e = class $e extends HTMLElement {
269
269
  }, "#init"));
270
270
  }
271
271
  connectedCallback() {
272
- y(this, j, this.getRootNode().host), y(this, nt, this.closest("nine-table-sheet")), this.innerHTML = `
272
+ y(this, j, this.getRootNode().host), y(this, ot, this.closest("nine-table-sheet")), this.innerHTML = `
273
273
  <style>
274
274
  nine-table-vscrollbar {
275
275
  display: flex;
@@ -345,52 +345,52 @@ const $e = class $e extends HTMLElement {
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, Nt).call(this), this.refresh();
349
349
  }, "initWhenReady");
350
350
  e();
351
351
  }
352
352
  };
353
- j = new WeakMap(), nt = new WeakMap(), G = new WeakMap(), R = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Wt = new WeakMap(), h($e, "NineTableVScrollBar");
354
- let he = $e;
355
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", he);
356
- var O, w, B, H, F, J, Et, ot, at, Ot, Bt, zt, At, qt, Dt, Pt, Rt, jt, Ae, lt, ct, Ft;
357
- const Ie = class Ie {
358
- constructor(r) {
359
- d(this, O);
360
- d(this, w);
361
- d(this, B, /* @__PURE__ */ new Map());
362
- d(this, H, null);
353
+ j = new WeakMap(), ot = new WeakMap(), J = new WeakMap(), R = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), Nt = new WeakMap(), h($e, "NineTableVScrollBar");
354
+ let le = $e;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
356
+ var D, S, z, M, F, Q, wt, Se, at, Wt, Ot, Bt, St, Et, zt, Dt, At, Ee, lt, qt, Pt;
357
+ const Me = class Me {
358
+ constructor(i) {
359
+ d(this, D);
360
+ d(this, S);
361
+ d(this, z, /* @__PURE__ */ new Map());
362
+ d(this, M, null);
363
363
  d(this, F, null);
364
- d(this, J, 0);
365
- d(this, Et, 40);
366
- d(this, ot, !1);
364
+ d(this, Q, 0);
365
+ d(this, wt, 40);
366
+ d(this, Se, !1);
367
367
  d(this, at, !1);
368
- d(this, Ot, 3);
368
+ d(this, Wt, 3);
369
369
  A(this, "refresh", /* @__PURE__ */ h(() => {
370
370
  var e;
371
- const r = t(this, w).querySelector(".ng-container-body .ng-part-body");
372
- r && (t(this, At).call(this), t(this, lt).call(this, r.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
371
+ const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
372
+ i && (t(this, St).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
373
373
  }, "refresh"));
374
374
  A(this, "initialize", /* @__PURE__ */ h(() => {
375
- y(this, H, null), t(this, B).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
376
- const a = t(this, w).querySelector(o);
375
+ y(this, M, null), t(this, z).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
376
+ const a = t(this, S).querySelector(o);
377
377
  if (!a) return;
378
378
  const c = a.querySelector(".ng-part-body table");
379
379
  if (!c) return;
380
380
  const l = c.querySelector("tbody.bindable-tbody");
381
381
  if (!l) return;
382
382
  const u = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
383
- t(this, B).set(o, u);
383
+ t(this, z).set(o, u);
384
384
  });
385
- const r = 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"), i = t(this, w).querySelector(".ng-container-body .ng-part-header"), n = t(this, w).querySelector(".ng-container-body .ng-part-footer");
386
- if (r) {
387
- t(this, zt).call(this, r), t(this, Rt).call(this), t(this, At).call(this), t(this, lt).call(this, r.scrollTop);
385
+ const i = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
386
+ if (i) {
387
+ t(this, Bt).call(this, i), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop);
388
388
  let o = !1;
389
389
  const a = /* @__PURE__ */ h((c, l, f) => {
390
390
  var u;
391
- o || (o = !0, r && r.scrollTop !== c && (r.scrollTop = c), e && e.scrollTop !== c && (e.scrollTop = c), s && s.scrollTop !== c && (s.scrollTop = c), i && i.scrollLeft !== l && (i.scrollLeft = l), n && n.scrollLeft !== l && (n.scrollLeft = l), t(this, lt).call(this, c), (u = t(this, w).querySelector("nine-table-vscrollbar")) == null || u.refresh(), o = !1);
391
+ o || (o = !0, i && i.scrollTop !== c && (i.scrollTop = c), e && e.scrollTop !== c && (e.scrollTop = c), s && s.scrollTop !== c && (s.scrollTop = c), r && r.scrollLeft !== l && (r.scrollLeft = l), n && n.scrollLeft !== l && (n.scrollLeft = l), t(this, lt).call(this, c), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), o = !1);
392
392
  }, "syncScroll");
393
- [r, e, s].forEach((c) => {
393
+ [i, e, s].forEach((c) => {
394
394
  c && c.addEventListener("scroll", () => {
395
395
  t(this, at) || (y(this, at, !0), requestAnimationFrame(() => {
396
396
  a(c.scrollTop, c.scrollLeft), y(this, at, !1);
@@ -399,168 +399,146 @@ const Ie = class Ie {
399
399
  });
400
400
  }
401
401
  }, "initialize"));
402
- d(this, Bt, /* @__PURE__ */ h((r, e) => {
403
- const s = t(this, B).get(e);
402
+ d(this, Ot, /* @__PURE__ */ h((i, e) => {
403
+ const s = t(this, z).get(e);
404
404
  if (!s || s.length === 0) return;
405
- const i = r.querySelector(".ng-part-body tbody.bindable-tbody");
406
- if (!i) return;
407
- i.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
408
- const n = i.querySelector("tr.nodata"), o = document.createDocumentFragment();
409
- for (let a = 0; a < t(this, Et); a++)
405
+ const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
406
+ if (!r) return;
407
+ r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
408
+ const n = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
409
+ for (let a = 0; a < t(this, wt); a++)
410
410
  s.forEach((c) => {
411
411
  o.appendChild(c.cloneNode(!0));
412
412
  });
413
- n ? n.before(o) : i.appendChild(o);
413
+ n ? n.before(o) : r.appendChild(o);
414
414
  }, "#renderRows"));
415
- d(this, zt, /* @__PURE__ */ h((r) => {
416
- if (t(this, H) !== null && t(this, H) > 0)
417
- return t(this, H);
418
- const e = t(this, B).get(".ng-container-body");
415
+ d(this, Bt, /* @__PURE__ */ h((i) => {
416
+ if (t(this, M) !== null && t(this, M) > 0)
417
+ return t(this, M);
418
+ U.log("#measureAndCacheHeight");
419
+ const e = t(this, z).get(".ng-container-body");
419
420
  if (!e || e.length === 0) return 24;
420
- const s = r.querySelector("tbody.bindable-tbody");
421
+ const s = i.querySelector("tbody.bindable-tbody");
421
422
  if (!s) return 24;
422
423
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
423
- const i = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
424
+ const r = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
424
425
  e.forEach((b) => {
425
426
  n.appendChild(b.cloneNode(!0));
426
- }), i ? i.before(n) : s.appendChild(n);
427
- const o = t(this, w), a = o.style.display, c = o.style.visibility, l = o.style.position;
427
+ }), r ? r.before(n) : s.appendChild(n);
428
+ const o = t(this, S), a = o.style.display, c = o.style.visibility, l = o.style.position;
428
429
  (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
429
430
  let f = 0;
430
431
  const u = s.querySelectorAll("tr:not(.nodata)");
431
432
  return u.forEach((b) => {
432
433
  f += b.offsetHeight || b.getBoundingClientRect().height;
433
- }), u.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, y(this, H, f > 0 ? f : 24), t(this, qt).call(this), t(this, H);
434
+ }), u.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, y(this, M, f > 0 ? f : 24), t(this, Et).call(this), t(this, M);
434
435
  }, "#measureAndCacheHeight"));
435
- d(this, At, /* @__PURE__ */ h(() => {
436
- const e = (t(this, O).data.get() || []).length, s = t(this, H), i = e * s;
436
+ d(this, St, /* @__PURE__ */ h(() => {
437
+ const e = (t(this, D).data.get() || []).length, s = t(this, M), r = e * s;
437
438
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
438
- const o = t(this, w).querySelector(n);
439
+ const o = t(this, S).querySelector(n);
439
440
  if (!o) return;
440
441
  const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
441
- a && (a.style.height = `${i}px`);
442
+ a && (a.style.height = `${r}px`);
442
443
  });
443
444
  }, "#updateVirtualScrollHeight"));
444
- d(this, qt, /* @__PURE__ */ h(() => {
445
- if (t(this, J) > 0 && t(this, H) > 0) {
446
- const r = Math.ceil(t(this, J) / t(this, H));
447
- y(this, Et, r + t(this, Ot));
445
+ d(this, Et, /* @__PURE__ */ h(() => {
446
+ if (t(this, Q) > 0 && t(this, M) > 0) {
447
+ const i = Math.ceil(t(this, Q) / t(this, M));
448
+ y(this, wt, i + t(this, Wt));
448
449
  }
449
450
  }, "#updateRowCount"));
450
- d(this, Dt, /* @__PURE__ */ h(() => {
451
+ d(this, zt, /* @__PURE__ */ h(() => {
451
452
  var a, c, l, f, u, b;
452
- const r = 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");
453
+ const i = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
453
454
  if (e) {
454
- const g = r ? Array.from(r.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], S = Math.max(g.length, m.length, v.length);
455
- for (let x = 0; x < S; x++) {
456
- const M = [
455
+ const g = i ? Array.from(i.querySelectorAll("tbody tr")) : [], m = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], E = Math.max(g.length, m.length, v.length);
456
+ for (let x = 0; x < E; x++) {
457
+ const H = [
457
458
  ((a = g[x]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
458
459
  ((c = m[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
459
460
  ((l = v[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0
460
- ], k = Math.max(...M);
461
+ ], k = Math.max(...H);
461
462
  k > 0 && (g[x] && (g[x].style.height = `${k}px`), m[x] && (m[x].style.height = `${k}px`), v[x] && (v[x].style.height = `${k}px`));
462
463
  }
463
464
  }
464
- const i = t(this, w).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, w).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, w).querySelector(".ng-container-right .ng-part-footer table");
465
+ const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
465
466
  if (n) {
466
- const g = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], m = Array.from(n.querySelectorAll("tfoot tr")), v = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], S = Math.max(g.length, m.length, v.length);
467
- for (let x = 0; x < S; x++) {
468
- const M = [
467
+ const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], m = Array.from(n.querySelectorAll("tfoot tr")), v = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], E = Math.max(g.length, m.length, v.length);
468
+ for (let x = 0; x < E; x++) {
469
+ const H = [
469
470
  ((f = g[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
470
471
  ((u = m[x]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
471
472
  ((b = v[x]) == null ? void 0 : b.getBoundingClientRect().height) || 0
472
- ], k = Math.max(...M);
473
+ ], k = Math.max(...H);
473
474
  k > 0 && (g[x] && (g[x].style.height = `${k}px`), m[x] && (m[x].style.height = `${k}px`), v[x] && (v[x].style.height = `${k}px`));
474
475
  }
475
476
  }
476
477
  }, "#syncRowHeights"));
477
- d(this, Pt, /* @__PURE__ */ h(() => {
478
- !t(this, w) || !(t(this, w) instanceof HTMLElement) || (y(this, F, new ResizeObserver((r) => {
479
- for (const e of r) {
478
+ d(this, Dt, /* @__PURE__ */ h(() => {
479
+ !t(this, S) || !(t(this, S) instanceof HTMLElement) || (y(this, F, new ResizeObserver((i) => {
480
+ for (const e of i) {
480
481
  const s = e.target;
481
482
  if (!s.classList.contains("active")) continue;
482
- const i = e.contentRect.height;
483
- if (i > 0) {
483
+ const r = e.contentRect.height;
484
+ if (r > 0) {
484
485
  let n = 0;
485
486
  const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
486
487
  o && (n += o.offsetHeight), a && (n += a.offsetHeight);
487
- const c = Math.max(i - n, 100);
488
- t(this, J) !== c && (y(this, J, c), t(this, qt).call(this), t(this, H) !== null && t(this, Rt).call(this));
488
+ const c = Math.max(r - n, 100);
489
+ t(this, Q) !== c && (y(this, Q, c), t(this, Et).call(this), t(this, M) !== null && t(this, At).call(this));
489
490
  }
490
491
  }
491
- })), t(this, F).observe(t(this, w)));
492
+ })), t(this, F).observe(t(this, S)));
492
493
  }, "#initResizeObserver"));
493
- d(this, Rt, /* @__PURE__ */ h(() => {
494
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
495
- const e = t(this, w).querySelector(r);
496
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Bt).call(this, e, r);
497
- }), t(this, Ft).call(this), t(this, Dt).call(this);
494
+ d(this, At, /* @__PURE__ */ h(() => {
495
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
496
+ const e = t(this, S).querySelector(i);
497
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, i);
498
+ }), t(this, Pt).call(this), t(this, zt).call(this);
498
499
  }, "#renderAllContainers"));
499
- d(this, jt, /* @__PURE__ */ h((r) => {
500
+ d(this, Ee, /* @__PURE__ */ h((i) => {
500
501
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
501
502
  var l;
502
- const s = t(this, w).querySelector(e);
503
+ const s = t(this, S).querySelector(e);
503
504
  if (!s) return;
504
- const i = s.querySelector(".ng-part-body tbody.bindable-tbody");
505
- if (!i) return;
506
- const n = Array.from(i.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, B).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, O).data.get() || []).length;
505
+ const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
506
+ if (!r) return;
507
+ const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, z).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, D).data.get() || []).length;
507
508
  n.forEach((f, u) => {
508
- const b = r + Math.floor(u / o);
509
+ const b = i + Math.floor(u / o);
509
510
  if (b >= c) {
510
511
  f.style.display = "none";
511
512
  return;
512
513
  }
513
- const g = t(this, O).data.get(b);
514
- f.style.display = "", t(this, ct).call(this, f, g, b);
514
+ const g = t(this, D).data.get(b);
515
+ f.style.display = "", t(this, qt).call(this, f, g, b);
515
516
  });
516
517
  });
517
518
  }, "#adjustBufferRows"));
518
- d(this, Ae, /* @__PURE__ */ h((r) => {
519
- var c;
520
- const e = t(this, H);
521
- if (!e || e <= 0) return;
522
- const i = (t(this, O).data.get() || []).length, n = Math.max(0, Math.floor(r / e)), o = n * e, a = ((c = t(this, B).get(".ng-container-body")) == null ? void 0 : c.length) || 1;
523
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((l) => {
524
- const f = t(this, w).querySelector(l);
525
- if (!f) return;
526
- const u = f.querySelector(".ng-part-body tbody.bindable-tbody");
527
- if (!u) return;
528
- u.style.transform = `translateY(${o}px)`, Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((g, m) => {
529
- const v = n + Math.floor(m / a);
530
- if (v >= i) {
531
- g.style.display = "none";
532
- return;
533
- }
534
- const S = t(this, O).data.get(v);
535
- g.style.display = "", t(this, ct).call(this, g, S, v);
536
- });
537
- }), t(this, ot) || (y(this, ot, !0), setTimeout(() => {
538
- t(this, jt).call(this, n), y(this, ot, !1);
539
- }, 0));
540
- }, "#handleScroll_BAK"));
541
- d(this, lt, /* @__PURE__ */ h((r) => {
519
+ d(this, lt, /* @__PURE__ */ h((i) => {
542
520
  var u;
543
- const e = t(this, H);
521
+ const e = t(this, M);
544
522
  if (!e || e <= 0) return;
545
- const i = (t(this, O).data.get() || []).length, n = Math.max(0, Math.floor(r / e)), o = n * e, a = ((u = t(this, B).get(".ng-container-body")) == null ? void 0 : u.length) || 1, c = t(this, w).querySelector(".ng-container-body"), l = c == null ? void 0 : c.querySelector(".ng-part-body tbody.bindable-tbody tr:not(.nodata)"), f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
523
+ const r = (t(this, D).data.get() || []).length, n = Math.max(0, Math.floor(i / e)), o = n * e, a = ((u = t(this, z).get(".ng-container-body")) == null ? void 0 : u.length) || 1, c = t(this, S).querySelector(".ng-container-body"), l = c == null ? void 0 : c.querySelector(".ng-part-body tbody.bindable-tbody tr:not(.nodata)"), f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
524
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
547
- const g = t(this, w).querySelector(b);
525
+ const g = t(this, S).querySelector(b);
548
526
  if (!g) return;
549
527
  const m = g.querySelector(".ng-part-body tbody.bindable-tbody");
550
528
  m && (m.style.transform = `translateY(${o}px)`);
551
- }), f !== n && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
552
- const g = t(this, w).querySelector(b);
529
+ }), U.log("#handleScroll", f, n), f !== n && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
530
+ const g = t(this, S).querySelector(b);
553
531
  if (!g) return;
554
532
  const m = g.querySelector(".ng-part-body tbody.bindable-tbody");
555
533
  if (!m) return;
556
- Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((S, x) => {
557
- const M = n + Math.floor(x / a);
558
- if (M >= i) {
559
- S.style.display = "none";
534
+ Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((E, x) => {
535
+ const H = n + Math.floor(x / a);
536
+ if (H >= r) {
537
+ E.style.display = "none";
560
538
  return;
561
539
  }
562
- const k = t(this, O).data.get(M);
563
- S.style.display = "", t(this, ct).call(this, S, k, M);
540
+ const k = t(this, D).data.get(H);
541
+ E.style.display = "", t(this, qt).call(this, E, k, H);
564
542
  });
565
543
  });
566
544
  }, "#handleScroll"));
@@ -578,62 +556,62 @@ const Ie = class Ie {
578
556
  cell.dataset.row = dataIndex;
579
557
  });
580
558
  }; */
581
- d(this, ct, /* @__PURE__ */ h((r, e, s) => {
582
- r.dataset.row = s, r.data = e, pt.log(s), Array.from(r.cells).forEach((i, n) => {
583
- i.dataset.row = s, i.querySelector(':scope > [is^="cell-"], :scope > [class*="cell-"], :scope > cell-');
584
- const o = Array.from(i.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
559
+ d(this, qt, /* @__PURE__ */ h((i, e, s) => {
560
+ i.dataset.row = s, i.data = e, U.log(s), Array.from(i.cells).forEach((r, n) => {
561
+ r.dataset.row = s, r.querySelector(':scope > [is^="cell-"], :scope > [class*="cell-"], :scope > cell-');
562
+ const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
585
563
  o && typeof o.refresh == "function" && o.refresh();
586
564
  });
587
565
  }, "#bindRowData"));
588
- d(this, Ft, /* @__PURE__ */ h(() => {
566
+ d(this, Pt, /* @__PURE__ */ h(() => {
589
567
  var c, l, f;
590
- const r = 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");
568
+ const i = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
591
569
  if (!e) return;
592
- 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);
570
+ const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, n.length, o.length);
593
571
  for (let u = 0; u < a; u++) {
594
572
  const b = [
595
- ((c = i[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
573
+ ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
596
574
  ((l = n[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
597
575
  ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
598
576
  ], g = Math.max(...b);
599
- g > 0 && (i[u] && (i[u].style.height = `${g}px`), n[u] && (n[u].style.height = `${g}px`), o[u] && (o[u].style.height = `${g}px`));
577
+ g > 0 && (r[u] && (r[u].style.height = `${g}px`), n[u] && (n[u].style.height = `${g}px`), o[u] && (o[u].style.height = `${g}px`));
600
578
  }
601
579
  }, "#syncHeaderHeights"));
602
580
  A(this, "destroy", /* @__PURE__ */ h(() => {
603
581
  t(this, F) && (t(this, F).disconnect(), y(this, F, null));
604
582
  }, "destroy"));
605
- y(this, O, r.getRootNode().host), y(this, w, r), t(this, Pt).call(this);
583
+ y(this, D, i.getRootNode().host), y(this, S, i), t(this, Dt).call(this);
606
584
  }
607
585
  getRowHeight() {
608
- return t(this, H);
586
+ return t(this, M);
609
587
  }
610
- templateLength(r = ".ng-container-body") {
588
+ templateLength(i = ".ng-container-body") {
611
589
  var e;
612
- return ((e = t(this, B).get(r)) == null ? void 0 : e.length) || 1;
590
+ return ((e = t(this, z).get(i)) == null ? void 0 : e.length) || 1;
613
591
  }
614
592
  };
615
- O = new WeakMap(), w = new WeakMap(), B = new WeakMap(), H = new WeakMap(), F = new WeakMap(), J = new WeakMap(), Et = new WeakMap(), ot = new WeakMap(), at = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), zt = new WeakMap(), At = new WeakMap(), qt = new WeakMap(), Dt = new WeakMap(), Pt = new WeakMap(), Rt = new WeakMap(), jt = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), Ft = new WeakMap(), h(Ie, "RowManager");
616
- let de = Ie;
617
- const Yt = class Yt {
593
+ D = new WeakMap(), S = new WeakMap(), z = new WeakMap(), M = new WeakMap(), F = new WeakMap(), Q = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), at = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), Dt = new WeakMap(), At = new WeakMap(), Ee = new WeakMap(), lt = new WeakMap(), qt = new WeakMap(), Pt = new WeakMap(), h(Me, "RowManager");
594
+ let ce = Me;
595
+ const jt = class jt {
618
596
  /**
619
597
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
620
598
  */
621
- static compileAll(r) {
622
- return Array.isArray(r) ? r.map((e) => Yt.compile(e)) : [];
599
+ static compileAll(i) {
600
+ return Array.isArray(i) ? i.map((e) => jt.compile(e)) : [];
623
601
  }
624
602
  /**
625
603
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
626
604
  */
627
- static compile(r) {
628
- if (!r) return null;
605
+ static compile(i) {
606
+ if (!i) return null;
629
607
  const e = /* @__PURE__ */ h((a) => {
630
608
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
631
609
  const f = l.getAttribute("cell-type") || "renderer";
632
610
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
633
611
  let u = `cell-${f}`;
634
612
  const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), m = l.getAttribute("maxbyte"), v = l.getAttribute("type");
635
- let S = [];
636
- b && S.push(`data-bind="${b}"`), g && S.push(`data-expr="${g}"`), m && S.push(`maxbyte="${m}"`), v && S.push(`type="${v}"`), l.innerHTML = `<${u} ${S.join(" ")}></${u}>`;
613
+ let E = [];
614
+ b && E.push(`data-bind="${b}"`), g && E.push(`data-expr="${g}"`), m && E.push(`maxbyte="${m}"`), v && E.push(`type="${v}"`), l.innerHTML = `<${u} ${E.join(" ")}></${u}>`;
637
615
  });
638
616
  }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
639
617
  if (!a.querySelector("colgroup")) {
@@ -649,7 +627,7 @@ const Yt = class Yt {
649
627
  l ? l.after(c) : a.prepend(c);
650
628
  }
651
629
  a.classList.add("nine-table-element"), a.style.display = "table";
652
- }, "ensureTableStructure"), i = /* @__PURE__ */ h((a, c) => {
630
+ }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
653
631
  const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")), u = l.length;
654
632
  if (u === 0 || f.length === 0) return;
655
633
  let b = 0;
@@ -659,30 +637,30 @@ const Yt = class Yt {
659
637
  const g = Array.from(Array(u), () => Array(b).fill(null));
660
638
  l.forEach((m) => {
661
639
  const v = m.sectionRowIndex;
662
- let S = 0;
640
+ let E = 0;
663
641
  Array.from(m.querySelectorAll("th,td")).forEach((x) => {
664
- for (let z = 0; z < g[v].length; z++)
665
- if (g[v][z] === null) {
666
- S = z;
642
+ for (let O = 0; O < g[v].length; O++)
643
+ if (g[v][O] === null) {
644
+ E = O;
667
645
  break;
668
646
  }
669
- const M = x.rowSpan || 1, k = x.colSpan || 1;
670
- for (let z = 0; z < M; z++)
671
- for (let mt = 0; mt < k; mt++)
672
- v + z < u && S + mt < b && (g[v + z][S + mt] = z === 0 && mt === 0 ? "1" : "0");
647
+ const H = x.rowSpan || 1, k = x.colSpan || 1;
648
+ for (let O = 0; O < H; O++)
649
+ for (let yt = 0; yt < k; yt++)
650
+ v + O < u && E + yt < b && (g[v + O][E + yt] = O === 0 && yt === 0 ? "1" : "0");
673
651
  });
674
652
  }), l.forEach((m) => {
675
653
  const v = m.sectionRowIndex;
676
- Array.from(m.querySelectorAll("th,td")).forEach((S) => {
654
+ Array.from(m.querySelectorAll("th,td")).forEach((E) => {
677
655
  for (let x = 0; x < g[v].length; x++)
678
656
  if (g[v][x] === "1") {
679
- S.dataset.col = x, g[v][x] = "0";
657
+ E.dataset.col = x, g[v][x] = "0";
680
658
  break;
681
659
  }
682
660
  });
683
661
  });
684
- }, "resetColIndex"), n = r.cloneNode(!0);
685
- return s(n), e(n), i(n, "thead"), i(n, "tbody"), i(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, c) => {
662
+ }, "resetColIndex"), n = i.cloneNode(!0);
663
+ return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, c) => {
686
664
  const l = a.getAttribute("fixed");
687
665
  l && n.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
688
666
  f.setAttribute("fixed", l);
@@ -691,65 +669,65 @@ const Yt = class Yt {
691
669
  }
692
670
  // 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
693
671
  };
694
- h(Yt, "TableCompiler");
695
- let fe = Yt;
696
- var Vt, Q, tt, Kt, Ut, ht, Xt, Zt;
697
- const xt = class xt extends HTMLElement {
672
+ h(jt, "TableCompiler");
673
+ let he = jt;
674
+ var Ft, tt, et, Vt, Yt, ct, Ut, Xt;
675
+ const pt = class pt extends HTMLElement {
698
676
  constructor() {
699
677
  super();
700
- d(this, Vt);
701
- d(this, Q, null);
702
- d(this, tt);
678
+ d(this, Ft);
679
+ d(this, tt, null);
680
+ d(this, et);
703
681
  A(this, "invalidate", /* @__PURE__ */ h(() => {
704
682
  var e, s;
705
- t(this, tt).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (s = this.querySelector("nine-table-vscrollbar")) == null || s.refresh();
683
+ t(this, et).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (s = this.querySelector("nine-table-vscrollbar")) == null || s.refresh();
706
684
  }, "invalidate"));
707
- d(this, Kt, /* @__PURE__ */ h(() => {
685
+ d(this, Vt, /* @__PURE__ */ h(() => {
708
686
  [
709
687
  { selector: ".ng-container-body", type: null },
710
688
  { selector: ".ng-container-left", type: "left" },
711
689
  { selector: ".ng-container-right", type: "right" }
712
- ].forEach(({ selector: s, type: i }) => {
690
+ ].forEach(({ selector: s, type: r }) => {
713
691
  const n = this.querySelector(s);
714
692
  if (!n) return;
715
693
  n.innerHTML = "";
716
694
  const o = document.createElement("div");
717
- o.className = "ng-part-header", o.appendChild(t(this, ht).call(this, t(this, Q), i, "header"));
695
+ o.className = "ng-part-header", o.appendChild(t(this, ct).call(this, t(this, tt), r, "header"));
718
696
  const a = document.createElement("div");
719
697
  a.className = "ng-part-body";
720
698
  const c = document.createElement("div");
721
- c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ht).call(this, t(this, Q), i, "body"));
699
+ c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ct).call(this, t(this, tt), r, "body"));
722
700
  const l = document.createElement("div");
723
701
  l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", c.appendChild(l), a.appendChild(c);
724
702
  const f = document.createElement("div");
725
- f.className = "ng-part-footer", f.appendChild(t(this, ht).call(this, t(this, Q), i, "footer")), n.appendChild(o), n.appendChild(a), n.appendChild(f);
703
+ f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, tt), r, "footer")), n.appendChild(o), n.appendChild(a), n.appendChild(f);
726
704
  });
727
705
  }, "#renderSplitContainers"));
728
- d(this, Ut, /* @__PURE__ */ h(() => {
706
+ d(this, Yt, /* @__PURE__ */ h(() => {
729
707
  ["left", "right", "body"].forEach((e) => {
730
- const s = this.querySelector(`.ng-container-${e}`), i = s == null ? void 0 : s.querySelectorAll("table");
731
- if (!s || !i || i.length === 0) return;
708
+ const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
709
+ if (!s || !r || r.length === 0) return;
732
710
  let n = 0;
733
- i[0].querySelectorAll("col").forEach((o) => {
711
+ r[0].querySelectorAll("col").forEach((o) => {
734
712
  const a = parseInt(o.getAttribute("width"), 10);
735
713
  isNaN(n) || (n += a);
736
714
  }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
737
715
  });
738
716
  }, "#updateContainerWidths"));
739
717
  A(this, "generate", /* @__PURE__ */ h((e) => {
740
- e && (y(this, Q, fe.compile(e)), t(this, Kt).call(this), t(this, Ut).call(this), t(this, tt).initialize(), setTimeout(() => {
718
+ e && (y(this, tt, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this), t(this, et).initialize(), setTimeout(() => {
741
719
  var s;
742
720
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
743
721
  }, 0));
744
722
  }, "generate"));
745
- d(this, ht, /* @__PURE__ */ h((e, s, i) => {
723
+ d(this, ct, /* @__PURE__ */ h((e, s, r) => {
746
724
  const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), c = n.querySelector("tfoot");
747
- if (i === "header") {
725
+ if (r === "header") {
748
726
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
749
727
  const f = document.createElement("tbody");
750
728
  f.className = "fixed-tbody", n.appendChild(f);
751
729
  }
752
- } else i === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : i === "footer" && (o && o.remove(), a && a.remove());
730
+ } else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
753
731
  return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
754
732
  l.getAttribute("fixed") !== "left" && l.remove();
755
733
  }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -758,7 +736,7 @@ const xt = class xt extends HTMLElement {
758
736
  l.remove();
759
737
  }), n;
760
738
  }, "#createSplitTable"));
761
- A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, tt).getRowHeight(), "getRowHeight"));
739
+ A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, et).getRowHeight(), "getRowHeight"));
762
740
  A(this, "scrollToX", /* @__PURE__ */ h((e) => {
763
741
  const s = this.querySelector(".ng-container-body .ng-part-body");
764
742
  s && (s.scrollLeft = e);
@@ -767,11 +745,11 @@ const xt = class xt extends HTMLElement {
767
745
  const s = this.querySelector(".ng-container-body .ng-part-body");
768
746
  s && (s.scrollTop = e);
769
747
  }, "scrollToY"));
770
- d(this, Xt, /* @__PURE__ */ h(() => {
771
- t(this, Zt).call(this);
748
+ d(this, Ut, /* @__PURE__ */ h(() => {
749
+ t(this, Xt).call(this);
772
750
  }, "#init"));
773
- d(this, Zt, /* @__PURE__ */ h(() => {
774
- const e = xt.SCROLLBAR_SIZE;
751
+ d(this, Xt, /* @__PURE__ */ h(() => {
752
+ const e = pt.SCROLLBAR_SIZE;
775
753
  this.innerHTML = `
776
754
  <style>
777
755
  nine-table-sheet {
@@ -913,38 +891,38 @@ const xt = class xt extends HTMLElement {
913
891
  </div>
914
892
  `;
915
893
  }, "#render"));
916
- y(this, tt, new de(this)), y(this, Vt, this.getRootNode().host);
894
+ y(this, et, new ce(this)), y(this, Ft, this.getRootNode().host);
917
895
  }
918
896
  connectedCallback() {
919
- t(this, Xt).call(this);
897
+ t(this, Ut).call(this);
920
898
  }
921
899
  disconnectedCallback() {
922
- this.innerHTML = "", pt.log("NineTableSheet destroyed.");
900
+ this.innerHTML = "", U.log("NineTableSheet destroyed.");
923
901
  }
924
902
  };
925
- Vt = new WeakMap(), Q = new WeakMap(), tt = new WeakMap(), Kt = new WeakMap(), Ut = new WeakMap(), ht = new WeakMap(), Xt = new WeakMap(), Zt = new WeakMap(), h(xt, "NineTableSheet"), A(xt, "SCROLLBAR_SIZE", 16);
926
- let It = xt;
927
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", It);
928
- var Gt, kt;
929
- const _e = class _e extends HTMLElement {
903
+ Ft = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), h(pt, "NineTableSheet"), A(pt, "SCROLLBAR_SIZE", 16);
904
+ let Mt = pt;
905
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Mt);
906
+ var Kt, Rt;
907
+ const Ie = class Ie extends HTMLElement {
930
908
  constructor() {
931
909
  super();
932
- d(this, Gt, /* @__PURE__ */ h(() => {
910
+ d(this, Kt, /* @__PURE__ */ h(() => {
933
911
  var e;
934
912
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
935
913
  var o;
936
- const i = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
937
- t(this, kt).call(this, n, i);
938
- }), t(this, kt).call(this, 0, !1);
914
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
915
+ t(this, Rt).call(this, n, r);
916
+ }), t(this, Rt).call(this, 0, !1);
939
917
  }, "#init"));
940
- d(this, kt, /* @__PURE__ */ h((e, s = !1) => {
941
- const i = /* @__PURE__ */ h(() => {
918
+ d(this, Rt, /* @__PURE__ */ h((e, s = !1) => {
919
+ const r = /* @__PURE__ */ h(() => {
942
920
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
943
921
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
944
922
  const b = f.filter((g) => g.classList.contains("active"));
945
923
  b.length < 2 || b.forEach((g) => {
946
- const m = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), S = f[m + 1];
947
- v && S && S.classList.contains("active") && v.style.setProperty("display", "flex");
924
+ const m = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), E = f[m + 1];
925
+ v && E && E.classList.contains("active") && v.style.setProperty("display", "flex");
948
926
  });
949
927
  }, "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");
950
928
  if (!a[e]) return;
@@ -966,36 +944,36 @@ const _e = class _e extends HTMLElement {
966
944
  const l = o.querySelectorAll("nine-table-sheet.active");
967
945
  l == null || l.forEach((f) => {
968
946
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
969
- }), i();
947
+ }), r();
970
948
  }, "#switchSheet"));
971
949
  }
972
950
  connectedCallback() {
973
- t(this, Gt).call(this);
951
+ t(this, Kt).call(this);
974
952
  }
975
953
  };
976
- Gt = new WeakMap(), kt = new WeakMap(), h(_e, "NineTableSheets");
977
- let ue = _e;
978
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", ue);
979
- var I, Jt, Tt, Qt;
980
- const Ne = class Ne {
981
- constructor(r) {
954
+ Kt = new WeakMap(), Rt = new WeakMap(), h(Ie, "NineTableSheets");
955
+ let de = Ie;
956
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
957
+ var I, Zt, kt, Gt;
958
+ const _e = class _e {
959
+ constructor(i) {
982
960
  d(this, I);
983
- d(this, Jt, /* @__PURE__ */ h(() => {
984
- t(this, Qt).call(this), new ResizeObserver((r) => {
985
- for (let e of r)
986
- t(this, I).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
961
+ d(this, Zt, /* @__PURE__ */ h(() => {
962
+ t(this, Gt).call(this), new ResizeObserver((i) => {
963
+ for (let e of i)
964
+ t(this, I).getAttribute("auto-height") === "true" && t(this, kt).call(this);
987
965
  }).observe(t(this, I));
988
966
  }, "#init"));
989
- d(this, Tt, /* @__PURE__ */ h(() => {
967
+ d(this, kt, /* @__PURE__ */ h(() => {
990
968
  var c, l;
991
- const r = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
992
- if (r.length === 0) return;
993
- const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, s = Math.max(...r.map((f) => f.getRowHeight())), i = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = It.SCROLLBAR_SIZE, a = e * s + i + n + o;
969
+ const i = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
970
+ if (i.length === 0) return;
971
+ const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Mt.SCROLLBAR_SIZE, a = e * s + r + n + o;
994
972
  t(this, I).style.height = `${a}px`;
995
973
  }, "#applyAutoHeight"));
996
- d(this, Qt, /* @__PURE__ */ h(() => {
997
- const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), s = t(this, I).getAttribute("auto-height") === "true", i = e.length, n = e.map((c, l) => {
998
- const u = `<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>` : "";
974
+ d(this, Gt, /* @__PURE__ */ h(() => {
975
+ const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), s = t(this, I).getAttribute("auto-height") === "true", r = e.length, n = e.map((c, l) => {
976
+ const u = `<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>` : "";
999
977
  return u + b;
1000
978
  }).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1001
979
  t(this, I).shadowRoot.innerHTML = `
@@ -1092,164 +1070,164 @@ const Ne = class Ne {
1092
1070
  const a = t(this, I).shadowRoot.querySelectorAll("nine-table-sheet");
1093
1071
  a == null || a.forEach((c, l) => {
1094
1072
  e[l] && setTimeout(() => {
1095
- c.generate(e[l]), s && t(this, Tt).call(this);
1073
+ c.generate(e[l]), s && t(this, kt).call(this);
1096
1074
  });
1097
1075
  });
1098
1076
  }, "#render"));
1099
- y(this, I, r), t(this, Jt).call(this);
1077
+ y(this, I, i), t(this, Zt).call(this);
1100
1078
  }
1101
1079
  };
1102
- I = new WeakMap(), Jt = new WeakMap(), Tt = new WeakMap(), Qt = new WeakMap(), h(Ne, "LayoutManager");
1103
- let ge = Ne;
1104
- var Ct, dt;
1105
- const We = class We {
1106
- constructor(r) {
1107
- d(this, Ct);
1108
- d(this, dt, -1);
1109
- A(this, "count", /* @__PURE__ */ h(() => t(this, Ct).rawRecords.length, "count"));
1110
- y(this, Ct, r);
1080
+ I = new WeakMap(), Zt = new WeakMap(), kt = new WeakMap(), Gt = new WeakMap(), h(_e, "LayoutManager");
1081
+ let fe = _e;
1082
+ var Tt, ht;
1083
+ const Ne = class Ne {
1084
+ constructor(i) {
1085
+ d(this, Tt);
1086
+ d(this, ht, -1);
1087
+ A(this, "count", /* @__PURE__ */ h(() => t(this, Tt).rawRecords.length, "count"));
1088
+ y(this, Tt, i);
1111
1089
  }
1112
1090
  get at() {
1113
- return t(this, dt);
1091
+ return t(this, ht);
1114
1092
  }
1115
- set at(r) {
1116
- y(this, dt, parseInt(r, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, dt)}"]`) && setTimeout(() => {
1093
+ set at(i) {
1094
+ y(this, ht, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1117
1095
  });
1118
1096
  }
1119
1097
  };
1120
- Ct = new WeakMap(), dt = new WeakMap(), h(We, "ngRow");
1121
- let be = We;
1122
- var _, T, N, ft, te, Y, ee, et, Lt, se, re, ut;
1098
+ Tt = new WeakMap(), ht = new WeakMap(), h(Ne, "ngRow");
1099
+ let ue = Ne;
1100
+ var _, T, N, dt, Jt, V, Qt, st, Ct, te, ee, ft;
1123
1101
  const W = class W {
1124
- constructor(r, e) {
1102
+ constructor(i, e) {
1125
1103
  d(this, _);
1126
1104
  d(this, T);
1127
1105
  d(this, N, []);
1128
- d(this, ft, []);
1129
- d(this, te, 0);
1130
- d(this, Y, []);
1131
- d(this, ee, /* @__PURE__ */ h(() => {
1132
- y(this, Y, []);
1133
- const r = t(this, _).template || [];
1134
- Array.from(r).forEach((e) => {
1106
+ d(this, dt, []);
1107
+ d(this, Jt, 0);
1108
+ d(this, V, []);
1109
+ d(this, Qt, /* @__PURE__ */ h(() => {
1110
+ y(this, V, []);
1111
+ const i = t(this, _).template || [];
1112
+ Array.from(i).forEach((e) => {
1135
1113
  var s;
1136
- t(this, Y).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1114
+ t(this, V).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1137
1115
  }), (t(this, T).rawRecords || []).forEach((e) => {
1138
- e.__ng || (e.__ng = t(this, Lt).call(this)), e.__ng.height = t(this, Y).slice();
1116
+ e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, V).slice();
1139
1117
  });
1140
1118
  }, "#initialize"));
1141
- d(this, et, /* @__PURE__ */ h(() => {
1142
- t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((r) => {
1143
- r.invalidate();
1119
+ d(this, st, /* @__PURE__ */ h(() => {
1120
+ t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1121
+ i.invalidate();
1144
1122
  });
1145
1123
  }, "#invalidate"));
1146
- A(this, "get", /* @__PURE__ */ h((r, e) => {
1124
+ A(this, "get", /* @__PURE__ */ h((i, e) => {
1147
1125
  var n;
1148
1126
  const s = this.getValidData();
1149
1127
  if (!s || s.length <= 0) return;
1150
- if (r == null) return t(this, ut).call(this, s);
1151
- if (r < 0 || r >= s.length) return null;
1152
- const i = typeof ((n = t(this, _).fields) == null ? void 0 : n.get) == "function" ? t(this, _).fields.get() : [];
1128
+ if (i == null) return t(this, ft).call(this, s);
1129
+ if (i < 0 || i >= s.length) return null;
1130
+ const r = typeof ((n = t(this, _).fields) == null ? void 0 : n.get) == "function" ? t(this, _).fields.get() : [];
1153
1131
  if (e != null) {
1154
- const o = i.indexOf(e);
1155
- return o >= 0 ? s[r].v[o] : null;
1132
+ const o = r.indexOf(e);
1133
+ return o >= 0 ? s[i].v[o] : null;
1156
1134
  }
1157
- return t(this, ut).call(this, s[r]);
1135
+ return t(this, ft).call(this, s[i]);
1158
1136
  }, "get"));
1159
- A(this, "set", /* @__PURE__ */ h((r) => {
1160
- this.clear(), this.add(r, !1), t(this, et).call(this);
1137
+ A(this, "set", /* @__PURE__ */ h((i) => {
1138
+ this.clear(), this.add(i, !1), t(this, st).call(this);
1161
1139
  }, "set"));
1162
- d(this, Lt, /* @__PURE__ */ h(() => ({
1140
+ d(this, Ct, /* @__PURE__ */ h(() => ({
1163
1141
  rowState: W.ROW_STATE.EMPTY,
1164
1142
  deleted: !1,
1165
1143
  filtered: !1,
1166
- height: t(this, Y).slice(),
1144
+ height: t(this, V).slice(),
1167
1145
  o: {},
1168
1146
  c: {},
1169
- _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1147
+ _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, V).slice(), -1, {}, {}]
1170
1148
  }), "#getDefaultMeta"));
1171
1149
  A(this, "reset", /* @__PURE__ */ h(() => {
1172
- y(this, N, []), y(this, ft, []), t(this, et).call(this);
1150
+ y(this, N, []), y(this, dt, []), t(this, st).call(this);
1173
1151
  }, "reset"));
1174
1152
  A(this, "clear", /* @__PURE__ */ h(() => {
1175
- var r;
1176
- t(this, T).rawRecords = [], y(this, N, []), y(this, ft, []), (r = t(this, T).viewRecords) != null && r.reset && t(this, T).viewRecords.reset();
1177
- }, "clear"));
1178
- d(this, se, /* @__PURE__ */ h((r) => {
1179
1153
  var i;
1180
- Array.isArray(r) || (r = [r]);
1181
- const e = typeof ((i = t(this, _).fields) == null ? void 0 : i.get) == "function" ? t(this, _).fields.get() : Object.keys(r[0] || {}), s = [];
1182
- return r.forEach((n) => {
1154
+ t(this, T).rawRecords = [], y(this, N, []), y(this, dt, []), (i = t(this, T).viewRecords) != null && i.reset && t(this, T).viewRecords.reset();
1155
+ }, "clear"));
1156
+ d(this, te, /* @__PURE__ */ h((i) => {
1157
+ var r;
1158
+ Array.isArray(i) || (i = [i]);
1159
+ const e = typeof ((r = t(this, _).fields) == null ? void 0 : r.get) == "function" ? t(this, _).fields.get() : Object.keys(i[0] || {}), s = [];
1160
+ return i.forEach((n) => {
1183
1161
  const o = { v: [] };
1184
1162
  e.forEach((a) => {
1185
1163
  o.v.push(n[a] !== void 0 && n[a] !== null ? n[a] : "");
1186
1164
  }), s.push(o);
1187
1165
  }), s;
1188
1166
  }, "#json2Array"));
1189
- d(this, re, /* @__PURE__ */ h((r) => (Array.isArray(r) || (r = [r]), r.forEach((e) => {
1190
- e.__ng = t(this, Lt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1191
- }), r), "#defaultInsert"));
1192
- A(this, "add", /* @__PURE__ */ h((r, e = !0) => {
1193
- r === void 0 && (r = {});
1194
- const s = t(this, se).call(this, r);
1195
- t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, re).call(this, s)), this.resetRecords();
1196
- const i = this.count() - 1;
1167
+ d(this, ee, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1168
+ e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1169
+ }), i), "#defaultInsert"));
1170
+ A(this, "add", /* @__PURE__ */ h((i, e = !0) => {
1171
+ i === void 0 && (i = {});
1172
+ const s = t(this, te).call(this, i);
1173
+ t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1174
+ const r = this.count() - 1;
1197
1175
  return e || s.forEach((n, o) => {
1198
- const a = t(this, T).rawRecords[i - o];
1176
+ const a = t(this, T).rawRecords[r - o];
1199
1177
  a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
1200
- }), t(this, et).call(this), i;
1178
+ }), t(this, st).call(this), r;
1201
1179
  }, "add"));
1202
- A(this, "delete", /* @__PURE__ */ h((r) => {
1180
+ A(this, "delete", /* @__PURE__ */ h((i) => {
1203
1181
  let e = [];
1204
- Array.isArray(r) ? e = r : typeof r > "u" ? e = [t(this, T).host.row.at] : e = [parseInt(r, 10)], e.sort((s, i) => i - s).forEach((s) => {
1182
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, T).host.row.at] : e = [parseInt(i, 10)], e.sort((s, r) => r - s).forEach((s) => {
1205
1183
  if (t(this, N)[s]) {
1206
- const i = t(this, N)[s].__ng.rowid;
1207
- t(this, N)[s].__ng.rowState === W.ROW_STATE.INSERT ? t(this, T).rawRecords = t(this, T).rawRecords.filter((n) => n.__ng.rowid !== i) : t(this, T).rawRecords.forEach((n) => {
1208
- n.__ng.rowid === i && (n.__ng.deleted = !0, n.__ng.rowState = W.ROW_STATE.DELETE);
1184
+ const r = t(this, N)[s].__ng.rowid;
1185
+ t(this, N)[s].__ng.rowState === W.ROW_STATE.INSERT ? t(this, T).rawRecords = t(this, T).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, T).rawRecords.forEach((n) => {
1186
+ n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = W.ROW_STATE.DELETE);
1209
1187
  });
1210
1188
  }
1211
- }), this.resetRecords(), t(this, et).call(this);
1189
+ }), this.resetRecords(), t(this, st).call(this);
1212
1190
  }, "delete"));
1213
- A(this, "setValue", /* @__PURE__ */ h((r, e, s) => {
1191
+ A(this, "setValue", /* @__PURE__ */ h((i, e, s) => {
1214
1192
  var c;
1215
- r = parseInt(r, 10);
1193
+ i = parseInt(i, 10);
1216
1194
  const n = (typeof ((c = t(this, _).fields) == null ? void 0 : c.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
1217
1195
  if (n < 0) return;
1218
- const o = this.getValidData()[r];
1196
+ const o = this.getValidData()[i];
1219
1197
  if (!o) return;
1220
1198
  const a = o.v[n];
1221
1199
  a !== s && o.__ng.rowState !== W.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = W.ROW_STATE.UPDATE), o.v[n] = s;
1222
1200
  }, "setValue"));
1223
1201
  A(this, "resetRecords", /* @__PURE__ */ h(() => {
1224
- y(this, ft, t(this, T).rawRecords.filter((r) => !r.__ng.deleted)), y(this, N, t(this, T).rawRecords.filter((r) => !r.__ng.deleted && !r.__ng.filtered)), t(this, T).rawRecords.forEach((r, e) => {
1225
- r.__ng.rowidx = e;
1226
- }), t(this, N).forEach((r, e) => {
1227
- r.__ng.i = e;
1202
+ y(this, dt, t(this, T).rawRecords.filter((i) => !i.__ng.deleted)), y(this, N, t(this, T).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, T).rawRecords.forEach((i, e) => {
1203
+ i.__ng.rowidx = e;
1204
+ }), t(this, N).forEach((i, e) => {
1205
+ i.__ng.i = e;
1228
1206
  });
1229
1207
  }, "resetRecords"));
1230
1208
  A(this, "getValidData", /* @__PURE__ */ h(() => (t(this, N).length === 0 && t(this, T).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
1231
- d(this, ut, /* @__PURE__ */ h((r) => {
1209
+ d(this, ft, /* @__PURE__ */ h((i) => {
1232
1210
  var o;
1233
- if (!r) return r;
1234
- 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) => {
1211
+ if (!i) return i;
1212
+ const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((o = t(this, _).fields) == null ? void 0 : o.get) == "function" ? t(this, _).fields.get() : [], n = s.filter((a) => !a.__ng.deleted).map((a) => {
1235
1213
  const c = {};
1236
- return i.forEach((l, f) => {
1214
+ return r.forEach((l, f) => {
1237
1215
  c[l] = a.v ? a.v[f] : a[l];
1238
1216
  }), c.__ng = a.__ng, c;
1239
1217
  });
1240
1218
  return e ? n[0] : n;
1241
1219
  }, "#conv"));
1242
1220
  A(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1243
- y(this, _, r), y(this, T, e), t(this, ee).call(this);
1221
+ y(this, _, i), y(this, T, e), t(this, Qt).call(this);
1244
1222
  }
1245
1223
  get source() {
1246
- return t(this, ut).call(this, t(this, T).rawRecords);
1224
+ return t(this, ft).call(this, t(this, T).rawRecords);
1247
1225
  }
1248
- set source(r) {
1249
- this.clear(), this.add(r, !1);
1226
+ set source(i) {
1227
+ this.clear(), this.add(i, !1);
1250
1228
  }
1251
1229
  get nextId() {
1252
- return ++Ke(this, te)._;
1230
+ return ++Ye(this, Jt)._;
1253
1231
  }
1254
1232
  get length() {
1255
1233
  return t(this, N).length;
@@ -1258,7 +1236,7 @@ const W = class W {
1258
1236
  return this.length;
1259
1237
  }
1260
1238
  };
1261
- _ = new WeakMap(), T = new WeakMap(), N = new WeakMap(), ft = new WeakMap(), te = new WeakMap(), Y = new WeakMap(), ee = new WeakMap(), et = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), re = new WeakMap(), ut = new WeakMap(), h(W, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1239
+ _ = new WeakMap(), T = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), V = new WeakMap(), Qt = new WeakMap(), st = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(W, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1262
1240
  A(W, "ROW_STATE", {
1263
1241
  EMPTY: "EMPTY",
1264
1242
  NORMAL: "NORMAL",
@@ -1266,57 +1244,57 @@ A(W, "ROW_STATE", {
1266
1244
  UPDATE: "UPDATE",
1267
1245
  DELETE: "DELETE"
1268
1246
  });
1269
- let ye = W;
1270
- var st;
1271
- const Oe = class Oe {
1272
- constructor(r) {
1273
- d(this, st);
1274
- y(this, st, r), this.row = new be(this), this.data = new ye(t(this, st), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1247
+ let ge = W;
1248
+ var it;
1249
+ const We = class We {
1250
+ constructor(i) {
1251
+ d(this, it);
1252
+ y(this, it, i), this.row = new ue(this), this.data = new ge(t(this, it), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1275
1253
  var e;
1276
- (e = t(this, st).view) != null && e.redraw && t(this, st).view.redraw();
1254
+ (e = t(this, it).view) != null && e.redraw && t(this, it).view.redraw();
1277
1255
  }, this.setDataSource = (e) => {
1278
1256
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1279
1257
  }, this.getRowState = (e) => {
1280
- var i, n;
1258
+ var r, n;
1281
1259
  const s = parseInt(e, 10);
1282
1260
  if (!(s >= this.data.count()))
1283
- return (n = (i = this.data.getValidData()[s]) == null ? void 0 : i.__ng) == null ? void 0 : n.rowState;
1261
+ return (n = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : n.rowState;
1284
1262
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1285
1263
  this.row.at = e;
1286
- }, 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) => {
1287
- e = parseInt(e, 10), this.data.setValue(e, s, i);
1264
+ }, 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) => {
1265
+ e = parseInt(e, 10), this.data.setValue(e, s, r);
1288
1266
  }, this.setDataSource([]);
1289
1267
  }
1290
1268
  };
1291
- st = new WeakMap(), h(Oe, "ngDataManager");
1292
- let pe = Oe;
1293
- var gt, L, Ht, ie;
1294
- const Be = class Be {
1269
+ it = new WeakMap(), h(We, "ngDataManager");
1270
+ let be = We;
1271
+ var ut, L, Lt, se;
1272
+ const Oe = class Oe {
1295
1273
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1296
- constructor(r) {
1297
- d(this, gt);
1274
+ constructor(i) {
1275
+ d(this, ut);
1298
1276
  d(this, L, []);
1299
- A(this, "add", /* @__PURE__ */ h((r, e = "string") => {
1300
- r.forEach((s) => {
1301
- t(this, L).some((i) => i.name === s) || t(this, L).push({ name: s, type: e });
1302
- }), t(this, Ht).call(this);
1277
+ A(this, "add", /* @__PURE__ */ h((i, e = "string") => {
1278
+ i.forEach((s) => {
1279
+ t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
1280
+ }), t(this, Lt).call(this);
1303
1281
  }, "add"));
1304
- d(this, Ht, /* @__PURE__ */ h(() => {
1305
- const r = /* @__PURE__ */ new Map();
1282
+ d(this, Lt, /* @__PURE__ */ h(() => {
1283
+ const i = /* @__PURE__ */ new Map();
1306
1284
  t(this, L).forEach((e) => {
1307
- r.set(e.name, e.type);
1308
- }), y(this, L, Array.from(r, ([e, s]) => ({ name: e, type: s }))), y(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1285
+ i.set(e.name, e.type);
1286
+ }), y(this, L, Array.from(i, ([e, s]) => ({ name: e, type: s }))), y(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1309
1287
  }, "#adjust"));
1310
- d(this, ie, /* @__PURE__ */ h(() => {
1311
- y(this, L, []), pt.log(t(this, gt).querySelectorAll("table"));
1312
- const r = Array.from(t(this, gt).querySelectorAll("table"));
1313
- if (!(!r || r.length === 0)) {
1314
- for (const e of r)
1315
- pt.log(e), $("[data-bind]", e).each((s, i) => {
1316
- const n = i.dataset.bind, o = i.getAttribute("data-type") || "string";
1288
+ d(this, se, /* @__PURE__ */ h(() => {
1289
+ y(this, L, []), U.log(t(this, ut).querySelectorAll("table"));
1290
+ const i = Array.from(t(this, ut).querySelectorAll("table"));
1291
+ if (!(!i || i.length === 0)) {
1292
+ for (const e of i)
1293
+ U.log(e), $("[data-bind]", e).each((s, r) => {
1294
+ const n = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1317
1295
  n && t(this, L).push({ name: n, type: o });
1318
1296
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1319
- $(`[${s}]`, e).each((i, n) => {
1297
+ $(`[${s}]`, e).each((r, n) => {
1320
1298
  var o = n.getAttribute(s);
1321
1299
  if (o.indexOf("data.") < 0) {
1322
1300
  const a = o.search(/[(]/g);
@@ -1336,50 +1314,50 @@ const Be = class Be {
1336
1314
  });
1337
1315
  });
1338
1316
  });
1339
- t(this, Ht).call(this);
1317
+ t(this, Lt).call(this);
1340
1318
  }
1341
1319
  }, "#init"));
1342
- y(this, gt, r), t(this, ie).call(this);
1320
+ y(this, ut, i), t(this, se).call(this);
1343
1321
  }
1344
1322
  // 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
1345
1323
  get() {
1346
- return t(this, L).map((r) => r.name);
1324
+ return t(this, L).map((i) => i.name);
1347
1325
  }
1348
1326
  // 🎯 내부 객체 통째로 얻기
1349
1327
  getFields() {
1350
1328
  return t(this, L);
1351
1329
  }
1352
1330
  // 🎯 특정 필드의 데이터 타입 조회
1353
- getType(r) {
1354
- const e = t(this, L).find((s) => s.name === r);
1331
+ getType(i) {
1332
+ const e = t(this, L).find((s) => s.name === i);
1355
1333
  return e ? e.type : "string";
1356
1334
  }
1357
- indexOf(r) {
1358
- return t(this, L).findIndex((e) => e.name === r);
1335
+ indexOf(i) {
1336
+ return t(this, L).findIndex((e) => e.name === i);
1359
1337
  }
1360
- includes(r) {
1361
- return t(this, L).some((e) => e.name === r);
1338
+ includes(i) {
1339
+ return t(this, L).some((e) => e.name === i);
1362
1340
  }
1363
1341
  };
1364
- gt = new WeakMap(), L = new WeakMap(), Ht = new WeakMap(), ie = new WeakMap(), h(Be, "ngFields");
1365
- let me = Be;
1366
- var rt, ne, oe;
1367
- const ze = class ze extends HTMLElement {
1342
+ ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), h(Oe, "ngFields");
1343
+ let ye = Oe;
1344
+ var rt, ie, re;
1345
+ const Be = class Be extends HTMLElement {
1368
1346
  constructor() {
1369
1347
  super();
1370
1348
  //#created = false;
1371
1349
  d(this, rt);
1372
- d(this, ne);
1373
- d(this, oe, /* @__PURE__ */ h(() => {
1374
- this.fields = new me(this), y(this, ne, new ge(this)), pt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1350
+ d(this, ie);
1351
+ d(this, re, /* @__PURE__ */ h(() => {
1352
+ this.fields = new ye(this), y(this, ie, new fe(this)), U.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1375
1353
  }, "#init"));
1376
- this.attachShadow({ mode: "open" }), y(this, rt, new pe(this));
1354
+ this.attachShadow({ mode: "open" }), y(this, rt, new be(this));
1377
1355
  }
1378
1356
  connectedCallback() {
1379
- t(this, oe).call(this);
1357
+ t(this, re).call(this);
1380
1358
  }
1381
1359
  disconnectedCallback() {
1382
- pt.log("NineTable disconnected.");
1360
+ U.log("NineTable disconnected.");
1383
1361
  }
1384
1362
  // 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
1385
1363
  get data() {
@@ -1394,10 +1372,10 @@ const ze = class ze extends HTMLElement {
1394
1372
  return t(this, rt);
1395
1373
  }
1396
1374
  };
1397
- rt = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), h(ze, "NineTable");
1398
- let xe = ze;
1399
- customElements.get("nine-table") || customElements.define("nine-table", xe);
1400
- const vt = class vt extends HTMLElement {
1375
+ rt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), h(Be, "NineTable");
1376
+ let pe = Be;
1377
+ customElements.get("nine-table") || customElements.define("nine-table", pe);
1378
+ const mt = class mt extends HTMLElement {
1401
1379
  // 👈 커스텀 스타일용 캐시 추가
1402
1380
  constructor() {
1403
1381
  super();
@@ -1408,29 +1386,29 @@ const vt = class vt extends HTMLElement {
1408
1386
  connectedCallback() {
1409
1387
  }
1410
1388
  };
1411
- h(vt, "BasicCellElement"), A(vt, "_styleCache", /* @__PURE__ */ new Map()), A(vt, "_customStyleCache", /* @__PURE__ */ new Map());
1412
- let ve = vt;
1413
- var C, Mt, p, qe, Re, ke, Te, Ce;
1414
- const De = class De extends ve {
1389
+ h(mt, "BasicCellElement"), A(mt, "_styleCache", /* @__PURE__ */ new Map()), A(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1390
+ let me = mt;
1391
+ var C, Ht, p, Ae, qe, Re, ke, Te;
1392
+ const ze = class ze extends me {
1415
1393
  constructor() {
1416
1394
  super();
1417
1395
  d(this, C);
1418
- d(this, Mt);
1396
+ d(this, Ht);
1419
1397
  d(this, p);
1398
+ d(this, Ae);
1420
1399
  d(this, qe);
1421
1400
  d(this, Re);
1422
1401
  d(this, ke);
1423
- d(this, Te);
1424
1402
  A(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1425
1403
  if (t(this, p))
1426
1404
  if (t(this, p).closest("tbody")) {
1427
- const s = t(this, p).closest("tr").data, i = parseInt(t(this, p).dataset.row);
1405
+ const s = t(this, p).closest("tr").data, r = parseInt(t(this, p).dataset.row);
1428
1406
  if (!s) return "";
1429
1407
  if (ninegrid.isNull(t(this, p).dataset.expr)) {
1430
1408
  if (!ninegrid.isNull(t(this, p).dataset.bind))
1431
1409
  return s[t(this, p).dataset.bind] || ninegrid.nvl(e, "");
1432
1410
  } else try {
1433
- return this.getExprValue(t(this, p).dataset.expr, s, i, t(this, p));
1411
+ return this.getExprValue(t(this, p).dataset.expr, s, r, t(this, p));
1434
1412
  } catch {
1435
1413
  console.error(t(this, p).dataset.expr, s, t(this, p).dataset.row);
1436
1414
  }
@@ -1441,18 +1419,18 @@ const De = class De extends ve {
1441
1419
  } catch {
1442
1420
  }
1443
1421
  }, "getDisplayText"));
1444
- d(this, Ce, /* @__PURE__ */ h(() => {
1422
+ d(this, Te, /* @__PURE__ */ h(() => {
1445
1423
  if (!(!t(this, C) || !t(this, C).template || !t(this, p).closest("tbody.bindable"))) {
1446
1424
  var e = ninegrid.j.querySelectorAll(t(this, p)).attr("suppress");
1447
1425
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1448
- var s = t(this, p).closest("tr"), i = [];
1449
- $("th,td", s).each((x, M) => {
1450
- var k = ninegrid.j.querySelectorAll(M).attr("suppress");
1451
- k && M.dataset.row && (k = parseInt(k), !isNaN(k) && k <= e && i.push(k));
1452
- }), i.sort();
1426
+ var s = t(this, p).closest("tr"), r = [];
1427
+ $("th,td", s).each((x, H) => {
1428
+ var k = ninegrid.j.querySelectorAll(H).attr("suppress");
1429
+ k && H.dataset.row && (k = parseInt(k), !isNaN(k) && k <= e && r.push(k));
1430
+ }), r.sort();
1453
1431
  var n = !1;
1454
1432
  if (parseInt(s.sectionRowIndex / t(this, C).template.length) > 0)
1455
- for (var o of i) {
1433
+ for (var o of r) {
1456
1434
  if (o > e) break;
1457
1435
  var a = parseInt(t(this, p).dataset.row), c = a - 1, l = t(this, p).closest("tr").data, f = t(this, C).data.get(c);
1458
1436
  t(this, p).dataset.matrixRow;
@@ -1465,17 +1443,17 @@ const De = class De extends ve {
1465
1443
  else
1466
1444
  n = !0;
1467
1445
  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"));
1468
- var m = parseInt(t(this, p).dataset.matrixRow), v = m - 1, S = t(this, C).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${v}"]`);
1469
- $(S).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(S).removeClass("last-none-suppress").addClass("last-suppress") : !$(S).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(S).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(S).removeClass("last-none-suppress").removeClass("last-suppress");
1446
+ var m = parseInt(t(this, p).dataset.matrixRow), v = m - 1, E = t(this, C).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${v}"]`);
1447
+ $(E).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").addClass("last-suppress") : !$(E).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(E).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(E).removeClass("last-none-suppress").removeClass("last-suppress");
1470
1448
  }
1471
1449
  }
1472
1450
  }, "#resetSuppress"));
1473
- A(this, "getExprValue", /* @__PURE__ */ h((e, s, i, n) => {
1451
+ A(this, "getExprValue", /* @__PURE__ */ h((e, s, r, n) => {
1474
1452
  if (typeof e < "u")
1475
1453
  try {
1476
- i = parseInt(i);
1454
+ r = parseInt(r);
1477
1455
  const o = e.replace("()", "");
1478
- return t(this, C)[o] ? t(this, C)[o].call(this, s, i, t(this, p)) : t(this, C).exprFunction(e).call(this, s, i, t(this, C).data);
1456
+ return t(this, C)[o] ? t(this, C)[o].call(this, s, r, t(this, p)) : t(this, C).exprFunction(e).call(this, s, r, t(this, C).data);
1479
1457
  } catch {
1480
1458
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1481
1459
  }
@@ -1484,7 +1462,7 @@ const De = class De extends ve {
1484
1462
  }, "getExprValue"));
1485
1463
  }
1486
1464
  connectedCallback() {
1487
- super.connectedCallback(), y(this, C, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Mt, t(this, p).closest("tr"));
1465
+ super.connectedCallback(), y(this, C, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Ht, t(this, p).closest("tr"));
1488
1466
  }
1489
1467
  get value() {
1490
1468
  var e = !t(this, C) || !t(this, C).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];
@@ -1492,8 +1470,8 @@ const De = class De extends ve {
1492
1470
  }
1493
1471
  set value(e) {
1494
1472
  var s = parseInt(t(this, p).dataset.row);
1495
- const i = this.getAttribute("update-row-state") != "false";
1496
- s < 0 ? t(this, C).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, i) : t(this, C).data.setValue(s, t(this, p).dataset.bind, e, i);
1473
+ const r = this.getAttribute("update-row-state") != "false";
1474
+ s < 0 ? t(this, C).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, r) : t(this, C).data.setValue(s, t(this, p).dataset.bind, e, r);
1497
1475
  }
1498
1476
  get row() {
1499
1477
  return parseInt(t(this, p).dataset.row);
@@ -1502,12 +1480,12 @@ const De = class De extends ve {
1502
1480
  return t(this, p).closest("tr").data;
1503
1481
  }
1504
1482
  refresh() {
1505
- return t(this, p).dataset.bind, parseInt(t(this, p).dataset.row), t(this, Mt).data, t(this, p).dataset.row;
1483
+ return t(this, p).dataset.bind, parseInt(t(this, p).dataset.row), t(this, Ht).data, t(this, p).dataset.row;
1506
1484
  }
1507
1485
  };
1508
- C = new WeakMap(), Mt = new WeakMap(), p = new WeakMap(), qe = new WeakMap(), Re = new WeakMap(), ke = new WeakMap(), Te = new WeakMap(), Ce = new WeakMap(), h(De, "CellElement");
1509
- let we = De;
1510
- const Pe = class Pe extends we {
1486
+ C = new WeakMap(), Ht = new WeakMap(), p = new WeakMap(), Ae = new WeakMap(), qe = new WeakMap(), Re = new WeakMap(), ke = new WeakMap(), Te = new WeakMap(), h(ze, "CellElement");
1487
+ let xe = ze;
1488
+ const De = class De extends xe {
1511
1489
  constructor() {
1512
1490
  super();
1513
1491
  }
@@ -1518,18 +1496,18 @@ const Pe = class Pe extends we {
1518
1496
  return super.refresh();
1519
1497
  }
1520
1498
  };
1521
- h(Pe, "EditableCellElement");
1522
- let Se = Pe;
1523
- var $t, it, bt, yt, ae, V, Le;
1524
- const je = class je extends Se {
1499
+ h(De, "EditableCellElement");
1500
+ let ve = De;
1501
+ var $t, nt, gt, bt, ne, Y, Ce;
1502
+ const Pe = class Pe extends ve {
1525
1503
  constructor() {
1526
1504
  super();
1527
1505
  d(this, $t);
1528
- d(this, it);
1506
+ d(this, nt);
1507
+ d(this, gt);
1529
1508
  d(this, bt);
1530
- d(this, yt);
1531
- d(this, ae);
1532
- d(this, V);
1509
+ d(this, ne);
1510
+ d(this, Y);
1533
1511
  A(this, "refresh", /* @__PURE__ */ h(() => {
1534
1512
  const e = super.refresh();
1535
1513
  t(this, $t).value = e;
@@ -1564,22 +1542,22 @@ const je = class je extends Se {
1564
1542
  if (!v) this.reset();
1565
1543
  };
1566
1544
  */
1567
- d(this, Le, /* @__PURE__ */ h((e) => {
1545
+ d(this, Ce, /* @__PURE__ */ h((e) => {
1568
1546
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1569
- if (t(this, it) == "number") {
1547
+ if (t(this, nt) == "number") {
1570
1548
  let n = [];
1571
- if (t(this, V) && Number(t(this, V)) > 0 && n.push("."), t(this, yt) && Number(t(this, yt)) >= 0 && n.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !n.includes(e.key) && e.preventDefault(), t(this, V) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1572
- var s = e.target.value, i = s.indexOf(".");
1573
- if (i >= 0) {
1574
- var s = s.substr(i + 1, s.length);
1575
- s.length >= Number(t(this, V)) && e.preventDefault();
1549
+ 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) {
1550
+ var s = e.target.value, r = s.indexOf(".");
1551
+ if (r >= 0) {
1552
+ var s = s.substr(r + 1, s.length);
1553
+ s.length >= Number(t(this, Y)) && e.preventDefault();
1576
1554
  }
1577
1555
  }
1578
1556
  }
1579
- t(this, bt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, bt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1557
+ t(this, gt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, gt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1580
1558
  }
1581
1559
  }, "#onKeyDown"));
1582
- if (this.applyBaseStyle(), y(this, it, this.getAttribute("type") || "text"), y(this, bt, this.getAttribute("maxbyte")), y(this, yt, this.getAttribute("min")), y(this, ae, this.getAttribute("max")), y(this, V, this.getAttribute("scale")), !["text", "number"].includes(t(this, it))) throw `invalid type : ${t(this, it)}`;
1560
+ if (this.applyBaseStyle(), y(this, nt, this.getAttribute("type") || "text"), y(this, gt, 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, nt))) throw `invalid type : ${t(this, nt)}`;
1583
1561
  }
1584
1562
  connectedCallback() {
1585
1563
  for (var e = [], s = 0; s < this.attributes.length; s++)
@@ -1592,8 +1570,8 @@ const je = class je extends Se {
1592
1570
  `, super.connectedCallback(), y(this, $t, this.querySelector("input"));
1593
1571
  }
1594
1572
  };
1595
- $t = new WeakMap(), it = new WeakMap(), bt = new WeakMap(), yt = new WeakMap(), ae = new WeakMap(), V = new WeakMap(), Le = new WeakMap(), h(je, "CellInputText");
1596
- let Ee = je;
1573
+ $t = new WeakMap(), nt = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), Y = new WeakMap(), Ce = new WeakMap(), h(Pe, "CellInputText");
1574
+ let we = Pe;
1597
1575
  customElements.get("cell-input-text");
1598
- customElements.get("cell-input") || customElements.define("cell-input", Ee);
1576
+ customElements.get("cell-input") || customElements.define("cell-input", we);
1599
1577
  //# sourceMappingURL=nine-table.js.map