@ninebone/table 0.0.482 → 0.0.485

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,222 +345,201 @@ 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);
397
397
  }));
398
398
  });
399
- }), this.refresh();
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
+ U.log("#handleScroll");
522
+ const e = t(this, M);
544
523
  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;
524
+ 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
525
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
547
- const g = t(this, w).querySelector(b);
526
+ const g = t(this, S).querySelector(b);
548
527
  if (!g) return;
549
528
  const m = g.querySelector(".ng-part-body tbody.bindable-tbody");
550
529
  m && (m.style.transform = `translateY(${o}px)`);
551
530
  }), f !== n && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
552
- const g = t(this, w).querySelector(b);
531
+ const g = t(this, S).querySelector(b);
553
532
  if (!g) return;
554
533
  const m = g.querySelector(".ng-part-body tbody.bindable-tbody");
555
534
  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";
535
+ Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((E, x) => {
536
+ const H = n + Math.floor(x / a);
537
+ if (H >= r) {
538
+ E.style.display = "none";
560
539
  return;
561
540
  }
562
- const k = t(this, O).data.get(M);
563
- S.style.display = "", t(this, ct).call(this, S, k, M);
541
+ const k = t(this, D).data.get(H);
542
+ E.style.display = "", t(this, qt).call(this, E, k, H);
564
543
  });
565
544
  });
566
545
  }, "#handleScroll"));
@@ -578,62 +557,62 @@ const Ie = class Ie {
578
557
  cell.dataset.row = dataIndex;
579
558
  });
580
559
  }; */
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");
560
+ d(this, qt, /* @__PURE__ */ h((i, e, s) => {
561
+ i.dataset.row = s, i.data = e, U.log(s), Array.from(i.cells).forEach((r, n) => {
562
+ r.dataset.row = s, r.querySelector(':scope > [is^="cell-"], :scope > [class*="cell-"], :scope > cell-');
563
+ const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
585
564
  o && typeof o.refresh == "function" && o.refresh();
586
565
  });
587
566
  }, "#bindRowData"));
588
- d(this, Ft, /* @__PURE__ */ h(() => {
567
+ d(this, Pt, /* @__PURE__ */ h(() => {
589
568
  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");
569
+ 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
570
  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);
571
+ 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
572
  for (let u = 0; u < a; u++) {
594
573
  const b = [
595
- ((c = i[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
574
+ ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
596
575
  ((l = n[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
597
576
  ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
598
577
  ], 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`));
578
+ 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
579
  }
601
580
  }, "#syncHeaderHeights"));
602
581
  A(this, "destroy", /* @__PURE__ */ h(() => {
603
582
  t(this, F) && (t(this, F).disconnect(), y(this, F, null));
604
583
  }, "destroy"));
605
- y(this, O, r.getRootNode().host), y(this, w, r), t(this, Pt).call(this);
584
+ y(this, D, i.getRootNode().host), y(this, S, i), t(this, Dt).call(this);
606
585
  }
607
586
  getRowHeight() {
608
- return t(this, H);
587
+ return t(this, M);
609
588
  }
610
- templateLength(r = ".ng-container-body") {
589
+ templateLength(i = ".ng-container-body") {
611
590
  var e;
612
- return ((e = t(this, B).get(r)) == null ? void 0 : e.length) || 1;
591
+ return ((e = t(this, z).get(i)) == null ? void 0 : e.length) || 1;
613
592
  }
614
593
  };
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 {
594
+ 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");
595
+ let ce = Me;
596
+ const jt = class jt {
618
597
  /**
619
598
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
620
599
  */
621
- static compileAll(r) {
622
- return Array.isArray(r) ? r.map((e) => Yt.compile(e)) : [];
600
+ static compileAll(i) {
601
+ return Array.isArray(i) ? i.map((e) => jt.compile(e)) : [];
623
602
  }
624
603
  /**
625
604
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
626
605
  */
627
- static compile(r) {
628
- if (!r) return null;
606
+ static compile(i) {
607
+ if (!i) return null;
629
608
  const e = /* @__PURE__ */ h((a) => {
630
609
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
631
610
  const f = l.getAttribute("cell-type") || "renderer";
632
611
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
633
612
  let u = `cell-${f}`;
634
613
  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}>`;
614
+ let E = [];
615
+ 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
616
  });
638
617
  }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
639
618
  if (!a.querySelector("colgroup")) {
@@ -649,7 +628,7 @@ const Yt = class Yt {
649
628
  l ? l.after(c) : a.prepend(c);
650
629
  }
651
630
  a.classList.add("nine-table-element"), a.style.display = "table";
652
- }, "ensureTableStructure"), i = /* @__PURE__ */ h((a, c) => {
631
+ }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
653
632
  const l = Array.from(a.querySelectorAll(c + " tr")), f = Array.from(a.querySelectorAll(c + " th," + c + " td")), u = l.length;
654
633
  if (u === 0 || f.length === 0) return;
655
634
  let b = 0;
@@ -659,30 +638,30 @@ const Yt = class Yt {
659
638
  const g = Array.from(Array(u), () => Array(b).fill(null));
660
639
  l.forEach((m) => {
661
640
  const v = m.sectionRowIndex;
662
- let S = 0;
641
+ let E = 0;
663
642
  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;
643
+ for (let O = 0; O < g[v].length; O++)
644
+ if (g[v][O] === null) {
645
+ E = O;
667
646
  break;
668
647
  }
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");
648
+ const H = x.rowSpan || 1, k = x.colSpan || 1;
649
+ for (let O = 0; O < H; O++)
650
+ for (let yt = 0; yt < k; yt++)
651
+ v + O < u && E + yt < b && (g[v + O][E + yt] = O === 0 && yt === 0 ? "1" : "0");
673
652
  });
674
653
  }), l.forEach((m) => {
675
654
  const v = m.sectionRowIndex;
676
- Array.from(m.querySelectorAll("th,td")).forEach((S) => {
655
+ Array.from(m.querySelectorAll("th,td")).forEach((E) => {
677
656
  for (let x = 0; x < g[v].length; x++)
678
657
  if (g[v][x] === "1") {
679
- S.dataset.col = x, g[v][x] = "0";
658
+ E.dataset.col = x, g[v][x] = "0";
680
659
  break;
681
660
  }
682
661
  });
683
662
  });
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) => {
663
+ }, "resetColIndex"), n = i.cloneNode(!0);
664
+ return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((a, c) => {
686
665
  const l = a.getAttribute("fixed");
687
666
  l && n.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
688
667
  f.setAttribute("fixed", l);
@@ -691,65 +670,65 @@ const Yt = class Yt {
691
670
  }
692
671
  // 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
693
672
  };
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 {
673
+ h(jt, "TableCompiler");
674
+ let he = jt;
675
+ var Ft, tt, et, Vt, Yt, ct, Ut, Xt;
676
+ const pt = class pt extends HTMLElement {
698
677
  constructor() {
699
678
  super();
700
- d(this, Vt);
701
- d(this, Q, null);
702
- d(this, tt);
679
+ d(this, Ft);
680
+ d(this, tt, null);
681
+ d(this, et);
703
682
  A(this, "invalidate", /* @__PURE__ */ h(() => {
704
683
  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();
684
+ t(this, et).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (s = this.querySelector("nine-table-vscrollbar")) == null || s.refresh();
706
685
  }, "invalidate"));
707
- d(this, Kt, /* @__PURE__ */ h(() => {
686
+ d(this, Vt, /* @__PURE__ */ h(() => {
708
687
  [
709
688
  { selector: ".ng-container-body", type: null },
710
689
  { selector: ".ng-container-left", type: "left" },
711
690
  { selector: ".ng-container-right", type: "right" }
712
- ].forEach(({ selector: s, type: i }) => {
691
+ ].forEach(({ selector: s, type: r }) => {
713
692
  const n = this.querySelector(s);
714
693
  if (!n) return;
715
694
  n.innerHTML = "";
716
695
  const o = document.createElement("div");
717
- o.className = "ng-part-header", o.appendChild(t(this, ht).call(this, t(this, Q), i, "header"));
696
+ o.className = "ng-part-header", o.appendChild(t(this, ct).call(this, t(this, tt), r, "header"));
718
697
  const a = document.createElement("div");
719
698
  a.className = "ng-part-body";
720
699
  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"));
700
+ 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
701
  const l = document.createElement("div");
723
702
  l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", c.appendChild(l), a.appendChild(c);
724
703
  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);
704
+ 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
705
  });
727
706
  }, "#renderSplitContainers"));
728
- d(this, Ut, /* @__PURE__ */ h(() => {
707
+ d(this, Yt, /* @__PURE__ */ h(() => {
729
708
  ["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;
709
+ const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
710
+ if (!s || !r || r.length === 0) return;
732
711
  let n = 0;
733
- i[0].querySelectorAll("col").forEach((o) => {
712
+ r[0].querySelectorAll("col").forEach((o) => {
734
713
  const a = parseInt(o.getAttribute("width"), 10);
735
714
  isNaN(n) || (n += a);
736
715
  }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
737
716
  });
738
717
  }, "#updateContainerWidths"));
739
718
  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(() => {
719
+ e && (y(this, tt, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this), t(this, et).initialize(), setTimeout(() => {
741
720
  var s;
742
721
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
743
722
  }, 0));
744
723
  }, "generate"));
745
- d(this, ht, /* @__PURE__ */ h((e, s, i) => {
724
+ d(this, ct, /* @__PURE__ */ h((e, s, r) => {
746
725
  const n = e.cloneNode(!0), o = n.querySelector("thead"), a = n.querySelector("tbody"), c = n.querySelector("tfoot");
747
- if (i === "header") {
726
+ if (r === "header") {
748
727
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
749
728
  const f = document.createElement("tbody");
750
729
  f.className = "fixed-tbody", n.appendChild(f);
751
730
  }
752
- } else i === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : i === "footer" && (o && o.remove(), a && a.remove());
731
+ } else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
753
732
  return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
754
733
  l.getAttribute("fixed") !== "left" && l.remove();
755
734
  }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -758,7 +737,7 @@ const xt = class xt extends HTMLElement {
758
737
  l.remove();
759
738
  }), n;
760
739
  }, "#createSplitTable"));
761
- A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, tt).getRowHeight(), "getRowHeight"));
740
+ A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, et).getRowHeight(), "getRowHeight"));
762
741
  A(this, "scrollToX", /* @__PURE__ */ h((e) => {
763
742
  const s = this.querySelector(".ng-container-body .ng-part-body");
764
743
  s && (s.scrollLeft = e);
@@ -767,11 +746,11 @@ const xt = class xt extends HTMLElement {
767
746
  const s = this.querySelector(".ng-container-body .ng-part-body");
768
747
  s && (s.scrollTop = e);
769
748
  }, "scrollToY"));
770
- d(this, Xt, /* @__PURE__ */ h(() => {
771
- t(this, Zt).call(this);
749
+ d(this, Ut, /* @__PURE__ */ h(() => {
750
+ t(this, Xt).call(this);
772
751
  }, "#init"));
773
- d(this, Zt, /* @__PURE__ */ h(() => {
774
- const e = xt.SCROLLBAR_SIZE;
752
+ d(this, Xt, /* @__PURE__ */ h(() => {
753
+ const e = pt.SCROLLBAR_SIZE;
775
754
  this.innerHTML = `
776
755
  <style>
777
756
  nine-table-sheet {
@@ -913,38 +892,38 @@ const xt = class xt extends HTMLElement {
913
892
  </div>
914
893
  `;
915
894
  }, "#render"));
916
- y(this, tt, new de(this)), y(this, Vt, this.getRootNode().host);
895
+ y(this, et, new ce(this)), y(this, Ft, this.getRootNode().host);
917
896
  }
918
897
  connectedCallback() {
919
- t(this, Xt).call(this);
898
+ t(this, Ut).call(this);
920
899
  }
921
900
  disconnectedCallback() {
922
- this.innerHTML = "", pt.log("NineTableSheet destroyed.");
901
+ this.innerHTML = "", U.log("NineTableSheet destroyed.");
923
902
  }
924
903
  };
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 {
904
+ 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);
905
+ let Mt = pt;
906
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Mt);
907
+ var Kt, Rt;
908
+ const Ie = class Ie extends HTMLElement {
930
909
  constructor() {
931
910
  super();
932
- d(this, Gt, /* @__PURE__ */ h(() => {
911
+ d(this, Kt, /* @__PURE__ */ h(() => {
933
912
  var e;
934
913
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
935
914
  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);
915
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
916
+ t(this, Rt).call(this, n, r);
917
+ }), t(this, Rt).call(this, 0, !1);
939
918
  }, "#init"));
940
- d(this, kt, /* @__PURE__ */ h((e, s = !1) => {
941
- const i = /* @__PURE__ */ h(() => {
919
+ d(this, Rt, /* @__PURE__ */ h((e, s = !1) => {
920
+ const r = /* @__PURE__ */ h(() => {
942
921
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
943
922
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
944
923
  const b = f.filter((g) => g.classList.contains("active"));
945
924
  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");
925
+ const m = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), E = f[m + 1];
926
+ v && E && E.classList.contains("active") && v.style.setProperty("display", "flex");
948
927
  });
949
928
  }, "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
929
  if (!a[e]) return;
@@ -966,36 +945,36 @@ const _e = class _e extends HTMLElement {
966
945
  const l = o.querySelectorAll("nine-table-sheet.active");
967
946
  l == null || l.forEach((f) => {
968
947
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
969
- }), i();
948
+ }), r();
970
949
  }, "#switchSheet"));
971
950
  }
972
951
  connectedCallback() {
973
- t(this, Gt).call(this);
952
+ t(this, Kt).call(this);
974
953
  }
975
954
  };
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) {
955
+ Kt = new WeakMap(), Rt = new WeakMap(), h(Ie, "NineTableSheets");
956
+ let de = Ie;
957
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
958
+ var I, Zt, kt, Gt;
959
+ const _e = class _e {
960
+ constructor(i) {
982
961
  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);
962
+ d(this, Zt, /* @__PURE__ */ h(() => {
963
+ t(this, Gt).call(this), new ResizeObserver((i) => {
964
+ for (let e of i)
965
+ t(this, I).getAttribute("auto-height") === "true" && t(this, kt).call(this);
987
966
  }).observe(t(this, I));
988
967
  }, "#init"));
989
- d(this, Tt, /* @__PURE__ */ h(() => {
968
+ d(this, kt, /* @__PURE__ */ h(() => {
990
969
  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;
970
+ const i = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
971
+ if (i.length === 0) return;
972
+ 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
973
  t(this, I).style.height = `${a}px`;
995
974
  }, "#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>` : "";
975
+ d(this, Gt, /* @__PURE__ */ h(() => {
976
+ 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) => {
977
+ 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
978
  return u + b;
1000
979
  }).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1001
980
  t(this, I).shadowRoot.innerHTML = `
@@ -1092,164 +1071,164 @@ const Ne = class Ne {
1092
1071
  const a = t(this, I).shadowRoot.querySelectorAll("nine-table-sheet");
1093
1072
  a == null || a.forEach((c, l) => {
1094
1073
  e[l] && setTimeout(() => {
1095
- c.generate(e[l]), s && t(this, Tt).call(this);
1074
+ c.generate(e[l]), s && t(this, kt).call(this);
1096
1075
  });
1097
1076
  });
1098
1077
  }, "#render"));
1099
- y(this, I, r), t(this, Jt).call(this);
1078
+ y(this, I, i), t(this, Zt).call(this);
1100
1079
  }
1101
1080
  };
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);
1081
+ I = new WeakMap(), Zt = new WeakMap(), kt = new WeakMap(), Gt = new WeakMap(), h(_e, "LayoutManager");
1082
+ let fe = _e;
1083
+ var Tt, ht;
1084
+ const Ne = class Ne {
1085
+ constructor(i) {
1086
+ d(this, Tt);
1087
+ d(this, ht, -1);
1088
+ A(this, "count", /* @__PURE__ */ h(() => t(this, Tt).rawRecords.length, "count"));
1089
+ y(this, Tt, i);
1111
1090
  }
1112
1091
  get at() {
1113
- return t(this, dt);
1092
+ return t(this, ht);
1114
1093
  }
1115
- set at(r) {
1116
- y(this, dt, parseInt(r, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, dt)}"]`) && setTimeout(() => {
1094
+ set at(i) {
1095
+ y(this, ht, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1117
1096
  });
1118
1097
  }
1119
1098
  };
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;
1099
+ Tt = new WeakMap(), ht = new WeakMap(), h(Ne, "ngRow");
1100
+ let ue = Ne;
1101
+ var _, T, N, dt, Jt, V, Qt, st, Ct, te, ee, ft;
1123
1102
  const W = class W {
1124
- constructor(r, e) {
1103
+ constructor(i, e) {
1125
1104
  d(this, _);
1126
1105
  d(this, T);
1127
1106
  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) => {
1107
+ d(this, dt, []);
1108
+ d(this, Jt, 0);
1109
+ d(this, V, []);
1110
+ d(this, Qt, /* @__PURE__ */ h(() => {
1111
+ y(this, V, []);
1112
+ const i = t(this, _).template || [];
1113
+ Array.from(i).forEach((e) => {
1135
1114
  var s;
1136
- t(this, Y).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1115
+ t(this, V).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1137
1116
  }), (t(this, T).rawRecords || []).forEach((e) => {
1138
- e.__ng || (e.__ng = t(this, Lt).call(this)), e.__ng.height = t(this, Y).slice();
1117
+ e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, V).slice();
1139
1118
  });
1140
1119
  }, "#initialize"));
1141
- d(this, et, /* @__PURE__ */ h(() => {
1142
- t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((r) => {
1143
- r.invalidate();
1120
+ d(this, st, /* @__PURE__ */ h(() => {
1121
+ t(this, _).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1122
+ i.invalidate();
1144
1123
  });
1145
1124
  }, "#invalidate"));
1146
- A(this, "get", /* @__PURE__ */ h((r, e) => {
1125
+ A(this, "get", /* @__PURE__ */ h((i, e) => {
1147
1126
  var n;
1148
1127
  const s = this.getValidData();
1149
1128
  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() : [];
1129
+ if (i == null) return t(this, ft).call(this, s);
1130
+ if (i < 0 || i >= s.length) return null;
1131
+ const r = typeof ((n = t(this, _).fields) == null ? void 0 : n.get) == "function" ? t(this, _).fields.get() : [];
1153
1132
  if (e != null) {
1154
- const o = i.indexOf(e);
1155
- return o >= 0 ? s[r].v[o] : null;
1133
+ const o = r.indexOf(e);
1134
+ return o >= 0 ? s[i].v[o] : null;
1156
1135
  }
1157
- return t(this, ut).call(this, s[r]);
1136
+ return t(this, ft).call(this, s[i]);
1158
1137
  }, "get"));
1159
- A(this, "set", /* @__PURE__ */ h((r) => {
1160
- this.clear(), this.add(r, !1), t(this, et).call(this);
1138
+ A(this, "set", /* @__PURE__ */ h((i) => {
1139
+ this.clear(), this.add(i, !1), t(this, st).call(this);
1161
1140
  }, "set"));
1162
- d(this, Lt, /* @__PURE__ */ h(() => ({
1141
+ d(this, Ct, /* @__PURE__ */ h(() => ({
1163
1142
  rowState: W.ROW_STATE.EMPTY,
1164
1143
  deleted: !1,
1165
1144
  filtered: !1,
1166
- height: t(this, Y).slice(),
1145
+ height: t(this, V).slice(),
1167
1146
  o: {},
1168
1147
  c: {},
1169
- _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1148
+ _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, V).slice(), -1, {}, {}]
1170
1149
  }), "#getDefaultMeta"));
1171
1150
  A(this, "reset", /* @__PURE__ */ h(() => {
1172
- y(this, N, []), y(this, ft, []), t(this, et).call(this);
1151
+ y(this, N, []), y(this, dt, []), t(this, st).call(this);
1173
1152
  }, "reset"));
1174
1153
  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
1154
  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) => {
1155
+ t(this, T).rawRecords = [], y(this, N, []), y(this, dt, []), (i = t(this, T).viewRecords) != null && i.reset && t(this, T).viewRecords.reset();
1156
+ }, "clear"));
1157
+ d(this, te, /* @__PURE__ */ h((i) => {
1158
+ var r;
1159
+ Array.isArray(i) || (i = [i]);
1160
+ const e = typeof ((r = t(this, _).fields) == null ? void 0 : r.get) == "function" ? t(this, _).fields.get() : Object.keys(i[0] || {}), s = [];
1161
+ return i.forEach((n) => {
1183
1162
  const o = { v: [] };
1184
1163
  e.forEach((a) => {
1185
1164
  o.v.push(n[a] !== void 0 && n[a] !== null ? n[a] : "");
1186
1165
  }), s.push(o);
1187
1166
  }), s;
1188
1167
  }, "#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;
1168
+ d(this, ee, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1169
+ 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;
1170
+ }), i), "#defaultInsert"));
1171
+ A(this, "add", /* @__PURE__ */ h((i, e = !0) => {
1172
+ i === void 0 && (i = {});
1173
+ const s = t(this, te).call(this, i);
1174
+ t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1175
+ const r = this.count() - 1;
1197
1176
  return e || s.forEach((n, o) => {
1198
- const a = t(this, T).rawRecords[i - o];
1177
+ const a = t(this, T).rawRecords[r - o];
1199
1178
  a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
1200
- }), t(this, et).call(this), i;
1179
+ }), t(this, st).call(this), r;
1201
1180
  }, "add"));
1202
- A(this, "delete", /* @__PURE__ */ h((r) => {
1181
+ A(this, "delete", /* @__PURE__ */ h((i) => {
1203
1182
  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) => {
1183
+ 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
1184
  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);
1185
+ const r = t(this, N)[s].__ng.rowid;
1186
+ 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) => {
1187
+ n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = W.ROW_STATE.DELETE);
1209
1188
  });
1210
1189
  }
1211
- }), this.resetRecords(), t(this, et).call(this);
1190
+ }), this.resetRecords(), t(this, st).call(this);
1212
1191
  }, "delete"));
1213
- A(this, "setValue", /* @__PURE__ */ h((r, e, s) => {
1192
+ A(this, "setValue", /* @__PURE__ */ h((i, e, s) => {
1214
1193
  var c;
1215
- r = parseInt(r, 10);
1194
+ i = parseInt(i, 10);
1216
1195
  const n = (typeof ((c = t(this, _).fields) == null ? void 0 : c.get) == "function" ? t(this, _).fields.get() : []).indexOf(e);
1217
1196
  if (n < 0) return;
1218
- const o = this.getValidData()[r];
1197
+ const o = this.getValidData()[i];
1219
1198
  if (!o) return;
1220
1199
  const a = o.v[n];
1221
1200
  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
1201
  }, "setValue"));
1223
1202
  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;
1203
+ 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) => {
1204
+ i.__ng.rowidx = e;
1205
+ }), t(this, N).forEach((i, e) => {
1206
+ i.__ng.i = e;
1228
1207
  });
1229
1208
  }, "resetRecords"));
1230
1209
  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) => {
1210
+ d(this, ft, /* @__PURE__ */ h((i) => {
1232
1211
  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) => {
1212
+ if (!i) return i;
1213
+ 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
1214
  const c = {};
1236
- return i.forEach((l, f) => {
1215
+ return r.forEach((l, f) => {
1237
1216
  c[l] = a.v ? a.v[f] : a[l];
1238
1217
  }), c.__ng = a.__ng, c;
1239
1218
  });
1240
1219
  return e ? n[0] : n;
1241
1220
  }, "#conv"));
1242
1221
  A(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1243
- y(this, _, r), y(this, T, e), t(this, ee).call(this);
1222
+ y(this, _, i), y(this, T, e), t(this, Qt).call(this);
1244
1223
  }
1245
1224
  get source() {
1246
- return t(this, ut).call(this, t(this, T).rawRecords);
1225
+ return t(this, ft).call(this, t(this, T).rawRecords);
1247
1226
  }
1248
- set source(r) {
1249
- this.clear(), this.add(r, !1);
1227
+ set source(i) {
1228
+ this.clear(), this.add(i, !1);
1250
1229
  }
1251
1230
  get nextId() {
1252
- return ++Ke(this, te)._;
1231
+ return ++Ye(this, Jt)._;
1253
1232
  }
1254
1233
  get length() {
1255
1234
  return t(this, N).length;
@@ -1258,7 +1237,7 @@ const W = class W {
1258
1237
  return this.length;
1259
1238
  }
1260
1239
  };
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"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1240
+ _ = 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
1241
  A(W, "ROW_STATE", {
1263
1242
  EMPTY: "EMPTY",
1264
1243
  NORMAL: "NORMAL",
@@ -1266,57 +1245,57 @@ A(W, "ROW_STATE", {
1266
1245
  UPDATE: "UPDATE",
1267
1246
  DELETE: "DELETE"
1268
1247
  });
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 = () => {
1248
+ let ge = W;
1249
+ var it;
1250
+ const We = class We {
1251
+ constructor(i) {
1252
+ d(this, it);
1253
+ 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
1254
  var e;
1276
- (e = t(this, st).view) != null && e.redraw && t(this, st).view.redraw();
1255
+ (e = t(this, it).view) != null && e.redraw && t(this, it).view.redraw();
1277
1256
  }, this.setDataSource = (e) => {
1278
1257
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1279
1258
  }, this.getRowState = (e) => {
1280
- var i, n;
1259
+ var r, n;
1281
1260
  const s = parseInt(e, 10);
1282
1261
  if (!(s >= this.data.count()))
1283
- return (n = (i = this.data.getValidData()[s]) == null ? void 0 : i.__ng) == null ? void 0 : n.rowState;
1262
+ return (n = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : n.rowState;
1284
1263
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1285
1264
  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);
1265
+ }, 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) => {
1266
+ e = parseInt(e, 10), this.data.setValue(e, s, r);
1288
1267
  }, this.setDataSource([]);
1289
1268
  }
1290
1269
  };
1291
- st = new WeakMap(), h(Oe, "ngDataManager");
1292
- let pe = Oe;
1293
- var gt, L, Ht, ie;
1294
- const Be = class Be {
1270
+ it = new WeakMap(), h(We, "ngDataManager");
1271
+ let be = We;
1272
+ var ut, L, Lt, se;
1273
+ const Oe = class Oe {
1295
1274
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1296
- constructor(r) {
1297
- d(this, gt);
1275
+ constructor(i) {
1276
+ d(this, ut);
1298
1277
  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);
1278
+ A(this, "add", /* @__PURE__ */ h((i, e = "string") => {
1279
+ i.forEach((s) => {
1280
+ t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
1281
+ }), t(this, Lt).call(this);
1303
1282
  }, "add"));
1304
- d(this, Ht, /* @__PURE__ */ h(() => {
1305
- const r = /* @__PURE__ */ new Map();
1283
+ d(this, Lt, /* @__PURE__ */ h(() => {
1284
+ const i = /* @__PURE__ */ new Map();
1306
1285
  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);
1286
+ i.set(e.name, e.type);
1287
+ }), 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
1288
  }, "#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";
1289
+ d(this, se, /* @__PURE__ */ h(() => {
1290
+ y(this, L, []), U.log(t(this, ut).querySelectorAll("table"));
1291
+ const i = Array.from(t(this, ut).querySelectorAll("table"));
1292
+ if (!(!i || i.length === 0)) {
1293
+ for (const e of i)
1294
+ U.log(e), $("[data-bind]", e).each((s, r) => {
1295
+ const n = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1317
1296
  n && t(this, L).push({ name: n, type: o });
1318
1297
  }), ["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) => {
1298
+ $(`[${s}]`, e).each((r, n) => {
1320
1299
  var o = n.getAttribute(s);
1321
1300
  if (o.indexOf("data.") < 0) {
1322
1301
  const a = o.search(/[(]/g);
@@ -1336,50 +1315,50 @@ const Be = class Be {
1336
1315
  });
1337
1316
  });
1338
1317
  });
1339
- t(this, Ht).call(this);
1318
+ t(this, Lt).call(this);
1340
1319
  }
1341
1320
  }, "#init"));
1342
- y(this, gt, r), t(this, ie).call(this);
1321
+ y(this, ut, i), t(this, se).call(this);
1343
1322
  }
1344
1323
  // 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
1345
1324
  get() {
1346
- return t(this, L).map((r) => r.name);
1325
+ return t(this, L).map((i) => i.name);
1347
1326
  }
1348
1327
  // 🎯 내부 객체 통째로 얻기
1349
1328
  getFields() {
1350
1329
  return t(this, L);
1351
1330
  }
1352
1331
  // 🎯 특정 필드의 데이터 타입 조회
1353
- getType(r) {
1354
- const e = t(this, L).find((s) => s.name === r);
1332
+ getType(i) {
1333
+ const e = t(this, L).find((s) => s.name === i);
1355
1334
  return e ? e.type : "string";
1356
1335
  }
1357
- indexOf(r) {
1358
- return t(this, L).findIndex((e) => e.name === r);
1336
+ indexOf(i) {
1337
+ return t(this, L).findIndex((e) => e.name === i);
1359
1338
  }
1360
- includes(r) {
1361
- return t(this, L).some((e) => e.name === r);
1339
+ includes(i) {
1340
+ return t(this, L).some((e) => e.name === i);
1362
1341
  }
1363
1342
  };
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 {
1343
+ ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), h(Oe, "ngFields");
1344
+ let ye = Oe;
1345
+ var rt, ie, re;
1346
+ const Be = class Be extends HTMLElement {
1368
1347
  constructor() {
1369
1348
  super();
1370
1349
  //#created = false;
1371
1350
  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 } }));
1351
+ d(this, ie);
1352
+ d(this, re, /* @__PURE__ */ h(() => {
1353
+ 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
1354
  }, "#init"));
1376
- this.attachShadow({ mode: "open" }), y(this, rt, new pe(this));
1355
+ this.attachShadow({ mode: "open" }), y(this, rt, new be(this));
1377
1356
  }
1378
1357
  connectedCallback() {
1379
- t(this, oe).call(this);
1358
+ t(this, re).call(this);
1380
1359
  }
1381
1360
  disconnectedCallback() {
1382
- pt.log("NineTable disconnected.");
1361
+ U.log("NineTable disconnected.");
1383
1362
  }
1384
1363
  // 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
1385
1364
  get data() {
@@ -1394,10 +1373,10 @@ const ze = class ze extends HTMLElement {
1394
1373
  return t(this, rt);
1395
1374
  }
1396
1375
  };
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 {
1376
+ rt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), h(Be, "NineTable");
1377
+ let pe = Be;
1378
+ customElements.get("nine-table") || customElements.define("nine-table", pe);
1379
+ const mt = class mt extends HTMLElement {
1401
1380
  // 👈 커스텀 스타일용 캐시 추가
1402
1381
  constructor() {
1403
1382
  super();
@@ -1408,29 +1387,29 @@ const vt = class vt extends HTMLElement {
1408
1387
  connectedCallback() {
1409
1388
  }
1410
1389
  };
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 {
1390
+ h(mt, "BasicCellElement"), A(mt, "_styleCache", /* @__PURE__ */ new Map()), A(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1391
+ let me = mt;
1392
+ var C, Ht, p, Ae, qe, Re, ke, Te;
1393
+ const ze = class ze extends me {
1415
1394
  constructor() {
1416
1395
  super();
1417
1396
  d(this, C);
1418
- d(this, Mt);
1397
+ d(this, Ht);
1419
1398
  d(this, p);
1399
+ d(this, Ae);
1420
1400
  d(this, qe);
1421
1401
  d(this, Re);
1422
1402
  d(this, ke);
1423
- d(this, Te);
1424
1403
  A(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1425
1404
  if (t(this, p))
1426
1405
  if (t(this, p).closest("tbody")) {
1427
- const s = t(this, p).closest("tr").data, i = parseInt(t(this, p).dataset.row);
1406
+ const s = t(this, p).closest("tr").data, r = parseInt(t(this, p).dataset.row);
1428
1407
  if (!s) return "";
1429
1408
  if (ninegrid.isNull(t(this, p).dataset.expr)) {
1430
1409
  if (!ninegrid.isNull(t(this, p).dataset.bind))
1431
1410
  return s[t(this, p).dataset.bind] || ninegrid.nvl(e, "");
1432
1411
  } else try {
1433
- return this.getExprValue(t(this, p).dataset.expr, s, i, t(this, p));
1412
+ return this.getExprValue(t(this, p).dataset.expr, s, r, t(this, p));
1434
1413
  } catch {
1435
1414
  console.error(t(this, p).dataset.expr, s, t(this, p).dataset.row);
1436
1415
  }
@@ -1441,18 +1420,18 @@ const De = class De extends ve {
1441
1420
  } catch {
1442
1421
  }
1443
1422
  }, "getDisplayText"));
1444
- d(this, Ce, /* @__PURE__ */ h(() => {
1423
+ d(this, Te, /* @__PURE__ */ h(() => {
1445
1424
  if (!(!t(this, C) || !t(this, C).template || !t(this, p).closest("tbody.bindable"))) {
1446
1425
  var e = ninegrid.j.querySelectorAll(t(this, p)).attr("suppress");
1447
1426
  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();
1427
+ var s = t(this, p).closest("tr"), r = [];
1428
+ $("th,td", s).each((x, H) => {
1429
+ var k = ninegrid.j.querySelectorAll(H).attr("suppress");
1430
+ k && H.dataset.row && (k = parseInt(k), !isNaN(k) && k <= e && r.push(k));
1431
+ }), r.sort();
1453
1432
  var n = !1;
1454
1433
  if (parseInt(s.sectionRowIndex / t(this, C).template.length) > 0)
1455
- for (var o of i) {
1434
+ for (var o of r) {
1456
1435
  if (o > e) break;
1457
1436
  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
1437
  t(this, p).dataset.matrixRow;
@@ -1465,17 +1444,17 @@ const De = class De extends ve {
1465
1444
  else
1466
1445
  n = !0;
1467
1446
  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");
1447
+ 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}"]`);
1448
+ $(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
1449
  }
1471
1450
  }
1472
1451
  }, "#resetSuppress"));
1473
- A(this, "getExprValue", /* @__PURE__ */ h((e, s, i, n) => {
1452
+ A(this, "getExprValue", /* @__PURE__ */ h((e, s, r, n) => {
1474
1453
  if (typeof e < "u")
1475
1454
  try {
1476
- i = parseInt(i);
1455
+ r = parseInt(r);
1477
1456
  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);
1457
+ 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
1458
  } catch {
1480
1459
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1481
1460
  }
@@ -1484,7 +1463,7 @@ const De = class De extends ve {
1484
1463
  }, "getExprValue"));
1485
1464
  }
1486
1465
  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"));
1466
+ super.connectedCallback(), y(this, C, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Ht, t(this, p).closest("tr"));
1488
1467
  }
1489
1468
  get value() {
1490
1469
  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 +1471,8 @@ const De = class De extends ve {
1492
1471
  }
1493
1472
  set value(e) {
1494
1473
  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);
1474
+ const r = this.getAttribute("update-row-state") != "false";
1475
+ 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
1476
  }
1498
1477
  get row() {
1499
1478
  return parseInt(t(this, p).dataset.row);
@@ -1502,12 +1481,12 @@ const De = class De extends ve {
1502
1481
  return t(this, p).closest("tr").data;
1503
1482
  }
1504
1483
  refresh() {
1505
- return t(this, p).dataset.bind, parseInt(t(this, p).dataset.row), t(this, Mt).data, t(this, p).dataset.row;
1484
+ return t(this, p).dataset.bind, parseInt(t(this, p).dataset.row), t(this, Ht).data, t(this, p).dataset.row;
1506
1485
  }
1507
1486
  };
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 {
1487
+ 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");
1488
+ let xe = ze;
1489
+ const De = class De extends xe {
1511
1490
  constructor() {
1512
1491
  super();
1513
1492
  }
@@ -1518,18 +1497,18 @@ const Pe = class Pe extends we {
1518
1497
  return super.refresh();
1519
1498
  }
1520
1499
  };
1521
- h(Pe, "EditableCellElement");
1522
- let Se = Pe;
1523
- var $t, it, bt, yt, ae, V, Le;
1524
- const je = class je extends Se {
1500
+ h(De, "EditableCellElement");
1501
+ let ve = De;
1502
+ var $t, nt, gt, bt, ne, Y, Ce;
1503
+ const Pe = class Pe extends ve {
1525
1504
  constructor() {
1526
1505
  super();
1527
1506
  d(this, $t);
1528
- d(this, it);
1507
+ d(this, nt);
1508
+ d(this, gt);
1529
1509
  d(this, bt);
1530
- d(this, yt);
1531
- d(this, ae);
1532
- d(this, V);
1510
+ d(this, ne);
1511
+ d(this, Y);
1533
1512
  A(this, "refresh", /* @__PURE__ */ h(() => {
1534
1513
  const e = super.refresh();
1535
1514
  t(this, $t).value = e;
@@ -1564,22 +1543,22 @@ const je = class je extends Se {
1564
1543
  if (!v) this.reset();
1565
1544
  };
1566
1545
  */
1567
- d(this, Le, /* @__PURE__ */ h((e) => {
1546
+ d(this, Ce, /* @__PURE__ */ h((e) => {
1568
1547
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1569
- if (t(this, it) == "number") {
1548
+ if (t(this, nt) == "number") {
1570
1549
  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();
1550
+ 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) {
1551
+ var s = e.target.value, r = s.indexOf(".");
1552
+ if (r >= 0) {
1553
+ var s = s.substr(r + 1, s.length);
1554
+ s.length >= Number(t(this, Y)) && e.preventDefault();
1576
1555
  }
1577
1556
  }
1578
1557
  }
1579
- t(this, bt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, bt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1558
+ t(this, gt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, gt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1580
1559
  }
1581
1560
  }, "#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)}`;
1561
+ 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
1562
  }
1584
1563
  connectedCallback() {
1585
1564
  for (var e = [], s = 0; s < this.attributes.length; s++)
@@ -1592,8 +1571,8 @@ const je = class je extends Se {
1592
1571
  `, super.connectedCallback(), y(this, $t, this.querySelector("input"));
1593
1572
  }
1594
1573
  };
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;
1574
+ $t = new WeakMap(), nt = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), Y = new WeakMap(), Ce = new WeakMap(), h(Pe, "CellInputText");
1575
+ let we = Pe;
1597
1576
  customElements.get("cell-input-text");
1598
- customElements.get("cell-input") || customElements.define("cell-input", Ee);
1577
+ customElements.get("cell-input") || customElements.define("cell-input", we);
1599
1578
  //# sourceMappingURL=nine-table.js.map