@ninebone/table 0.0.437 β†’ 0.0.439

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,118 +1,118 @@
1
- var pe = Object.defineProperty;
2
- var me = (x) => {
1
+ var me = Object.defineProperty;
2
+ var xe = (x) => {
3
3
  throw TypeError(x);
4
4
  };
5
- var we = (x, i, e) => i in x ? pe(x, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[i] = e;
6
- var a = (x, i) => pe(x, "name", { value: i, configurable: !0 });
7
- var v = (x, i, e) => we(x, typeof i != "symbol" ? i + "" : i, e), xe = (x, i, e) => i.has(x) || me("Cannot " + e);
8
- var t = (x, i, e) => (xe(x, i, "read from private field"), e ? e.call(x) : i.get(x)), c = (x, i, e) => i.has(x) ? me("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), b = (x, i, e, s) => (xe(x, i, "write to private field"), s ? s.call(x, e) : i.set(x, e), e);
9
- var ve = (x, i, e, s) => ({
10
- set _(o) {
11
- b(x, i, o, e);
5
+ var Se = (x, i, e) => i in x ? me(x, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[i] = e;
6
+ var c = (x, i) => me(x, "name", { value: i, configurable: !0 });
7
+ var v = (x, i, e) => Se(x, typeof i != "symbol" ? i + "" : i, e), ve = (x, i, e) => i.has(x) || xe("Cannot " + e);
8
+ var t = (x, i, e) => (ve(x, i, "read from private field"), e ? e.call(x) : i.get(x)), d = (x, i, e) => i.has(x) ? xe("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), g = (x, i, e, n) => (ve(x, i, "write to private field"), n ? n.call(x, e) : i.set(x, e), e);
9
+ var we = (x, i, e, n) => ({
10
+ set _(s) {
11
+ g(x, i, s, e);
12
12
  },
13
13
  get _() {
14
- return t(x, i, s);
14
+ return t(x, i, n);
15
15
  }
16
16
  });
17
- import { trace as Se } from "@ninebone/util";
18
- const re = class re extends Se.constructor {
17
+ import { trace as Ee } from "@ninebone/util";
18
+ const le = class le extends Ee.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- a(re, "Trace");
24
- let jt = re;
25
- const H = new jt();
26
- var _, z, m, Y, V, X, St, U, Et;
27
- const le = class le extends HTMLElement {
23
+ c(le, "Trace");
24
+ let Kt = le;
25
+ const lt = new Kt();
26
+ var M, W, p, B, P, D, Et, Y, Rt;
27
+ const ae = class ae extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- c(this, _);
31
- c(this, z, !1);
32
- c(this, m);
33
- c(this, Y);
34
- c(this, V);
35
- c(this, X);
36
- c(this, St, /* @__PURE__ */ a(() => {
37
- if (!t(this, _)) return;
38
- const e = t(this, _).querySelector(".ng-container-body");
39
- e && (b(this, X, new ResizeObserver(() => {
30
+ d(this, M);
31
+ d(this, W, !1);
32
+ d(this, p);
33
+ d(this, B);
34
+ d(this, P);
35
+ d(this, D);
36
+ d(this, Et, /* @__PURE__ */ c(() => {
37
+ if (!t(this, M)) return;
38
+ const e = t(this, M).querySelector(".ng-container-body");
39
+ e && (g(this, D, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, X).observe(e));
41
+ })), t(this, D).observe(e));
42
42
  }, "#observeResize"));
43
- v(this, "refresh", /* @__PURE__ */ a(() => {
44
- if (!t(this, _) || !t(this, m) || t(this, z)) return;
45
- const e = t(this, m).container, s = e.querySelector("table");
46
- if (!s) return;
47
- const o = t(this, m).track, r = t(this, m).thumb, n = t(this, _).querySelector(".ng-container-bottom"), l = e.clientWidth, d = s.scrollWidth;
48
- if (l !== 0 && d > l)
49
- n && (n.style.display = "flex");
43
+ v(this, "refresh", /* @__PURE__ */ c(() => {
44
+ if (!t(this, M) || !t(this, p) || t(this, W)) return;
45
+ const e = t(this, p).container, n = e.querySelector("table");
46
+ if (!n) return;
47
+ const s = t(this, p).track, r = t(this, p).thumb, o = t(this, M).querySelector(".ng-container-bottom"), l = e.clientWidth, h = n.scrollWidth;
48
+ if (l !== 0 && h > l)
49
+ o && (o.style.display = "flex");
50
50
  else {
51
- n && (n.style.display = "none");
51
+ o && (o.style.display = "none");
52
52
  return;
53
53
  }
54
- const h = o.clientWidth;
55
- if (h <= 0) return;
56
- const f = Math.max(Math.min(h * (l / d), h), 20);
54
+ const a = s.clientWidth;
55
+ if (a <= 0) return;
56
+ const f = Math.max(Math.min(a * (l / h), a), 20);
57
57
  r.style.width = `${f}px`;
58
- const u = e.scrollLeft, g = d - l;
59
- let p = 0;
60
- g > 0 && (p = parseInt(u / g * (h - f), 10)), p < 0 && (p = 0);
61
- const y = h - f;
62
- p > y && (p = y), r.style.left = `${p}px`, H.log(p), t(this, m).left.disabled = p === 0, t(this, m).right.disabled = p >= y - 1;
58
+ const u = e.scrollLeft, b = h - l;
59
+ let y = 0;
60
+ b > 0 && (y = parseInt(u / b * (a - f), 10)), y < 0 && (y = 0);
61
+ const m = a - f;
62
+ y > m && (y = m), r.style.left = `${y}px`, lt.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= m - 1;
63
63
  }, "refresh"));
64
- c(this, U, /* @__PURE__ */ a((e) => {
65
- if (!t(this, m)) return !1;
66
- const s = t(this, m).container, o = s.querySelector("table");
67
- if (!o) return !1;
68
- const r = t(this, m).track.getBoundingClientRect(), n = t(this, m).thumb.clientWidth;
64
+ d(this, Y, /* @__PURE__ */ c((e) => {
65
+ if (!t(this, p)) return !1;
66
+ const n = t(this, p).container, s = n.querySelector("table");
67
+ if (!s) return !1;
68
+ const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
- const d = r.width - n;
72
- l > d && (l = d), l = parseInt(l, 10), t(this, m).thumb.style.left = `${l}px`, t(this, m).left.disabled = l === 0, t(this, m).right.disabled = l >= d - 1;
73
- const h = s.clientWidth, u = o.scrollWidth - h;
74
- return d > 0 && u > 0 && (s.scrollLeft = l / d * u), l > 0 && l < d - 1;
71
+ const h = r.width - o;
72
+ l > h && (l = h), l = parseInt(l, 10), t(this, p).thumb.style.left = `${l}px`, t(this, p).left.disabled = l === 0, t(this, p).right.disabled = l >= h - 1;
73
+ const a = n.clientWidth, u = s.scrollWidth - a;
74
+ return h > 0 && u > 0 && (n.scrollLeft = l / h * u), l > 0 && l < h - 1;
75
75
  }, "#thumbMoveTo"));
76
- c(this, Et, /* @__PURE__ */ a(() => {
77
- const e = /* @__PURE__ */ a((o) => {
78
- clearInterval(t(this, Y)), clearInterval(t(this, V));
79
- const r = parseInt(t(this, m).thumb.style.left || 0, 10);
80
- t(this, U).call(this, r + o), b(this, Y, setInterval(() => {
81
- clearInterval(t(this, Y)), b(this, V, setInterval(() => {
82
- const n = parseInt(t(this, m).thumb.style.left || 0, 10);
83
- t(this, U).call(this, n + o) || clearInterval(t(this, V));
76
+ d(this, Rt, /* @__PURE__ */ c(() => {
77
+ const e = /* @__PURE__ */ c((s) => {
78
+ clearInterval(t(this, B)), clearInterval(t(this, P));
79
+ const r = parseInt(t(this, p).thumb.style.left || 0, 10);
80
+ t(this, Y).call(this, r + s), g(this, B, setInterval(() => {
81
+ clearInterval(t(this, B)), g(this, P, setInterval(() => {
82
+ const o = parseInt(t(this, p).thumb.style.left || 0, 10);
83
+ t(this, Y).call(this, o + s) || clearInterval(t(this, P));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
- clearInterval(t(this, Y)), clearInterval(t(this, V));
86
+ }, "delayScroll"), n = /* @__PURE__ */ c(() => {
87
+ clearInterval(t(this, B)), clearInterval(t(this, P));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
- t(this, m).left.addEventListener(o, s), t(this, m).right.addEventListener(o, s), t(this, m).track.addEventListener(o, s);
91
- }), t(this, m).left.addEventListener("mousedown", (o) => {
92
- o.button === 0 && e(-20);
93
- }), t(this, m).right.addEventListener("mousedown", (o) => {
94
- o.button === 0 && e(20);
95
- }), t(this, m).left.addEventListener("touchstart", () => e(-20)), t(this, m).right.addEventListener("touchstart", () => e(20)), t(this, m).track.addEventListener("mousedown", (o) => {
96
- if (o.button !== 0) return;
97
- o.preventDefault();
98
- const r = t(this, m).track.getBoundingClientRect(), n = t(this, m).thumb.clientWidth;
99
- t(this, U).call(this, o.clientX - r.left - n / 2);
100
- }), t(this, m).thumb.addEventListener("mousedown", (o) => {
101
- if (o.button !== 0) return;
102
- o.stopPropagation(), o.preventDefault(), b(this, z, !0), this.shiftX = o.clientX - t(this, m).thumb.getBoundingClientRect().left;
103
- const r = /* @__PURE__ */ a((l) => {
104
- if (!t(this, z)) return;
105
- const d = t(this, m).track.getBoundingClientRect();
106
- t(this, U).call(this, l.clientX - d.left - this.shiftX);
107
- }, "onMouseMove"), n = /* @__PURE__ */ a(() => {
108
- b(this, z, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
89
+ ["mouseup", "mouseleave", "touchend"].forEach((s) => {
90
+ t(this, p).left.addEventListener(s, n), t(this, p).right.addEventListener(s, n), t(this, p).track.addEventListener(s, n);
91
+ }), t(this, p).left.addEventListener("mousedown", (s) => {
92
+ s.button === 0 && e(-20);
93
+ }), t(this, p).right.addEventListener("mousedown", (s) => {
94
+ s.button === 0 && e(20);
95
+ }), t(this, p).left.addEventListener("touchstart", () => e(-20)), t(this, p).right.addEventListener("touchstart", () => e(20)), t(this, p).track.addEventListener("mousedown", (s) => {
96
+ if (s.button !== 0) return;
97
+ s.preventDefault();
98
+ const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
99
+ t(this, Y).call(this, s.clientX - r.left - o / 2);
100
+ }), t(this, p).thumb.addEventListener("mousedown", (s) => {
101
+ if (s.button !== 0) return;
102
+ s.stopPropagation(), s.preventDefault(), g(this, W, !0), this.shiftX = s.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
+ const r = /* @__PURE__ */ c((l) => {
104
+ if (!t(this, W)) return;
105
+ const h = t(this, p).track.getBoundingClientRect();
106
+ t(this, Y).call(this, l.clientX - h.left - this.shiftX);
107
+ }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
108
+ g(this, W, !1), n(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", r), document.addEventListener("mouseup", n);
110
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (b(this, _, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, _)) return;
115
+ if (g(this, M, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, M)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -176,103 +176,100 @@ const le = class le extends HTMLElement {
176
176
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
- const e = /* @__PURE__ */ a(() => {
180
- const s = t(this, _).querySelector(".ng-container-body");
181
- if (!s) {
179
+ const e = /* @__PURE__ */ c(() => {
180
+ const n = t(this, M).querySelector(".ng-container-body");
181
+ if (!n) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- b(this, m, {
186
- container: s,
185
+ g(this, p, {
186
+ container: n,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
189
189
  left: this.querySelector(".ng-scroll-left"),
190
190
  right: this.querySelector(".ng-scroll-right")
191
- }), s.addEventListener("scroll", () => {
192
- t(this, z) || this.refresh();
193
- }), t(this, Et).call(this), t(this, St).call(this), this.refresh();
191
+ }), n.addEventListener("scroll", () => {
192
+ t(this, W) || this.refresh();
193
+ }), t(this, Rt).call(this), t(this, Et).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, D) && t(this, D).disconnect();
199
199
  }
200
200
  };
201
- _ = new WeakMap(), z = new WeakMap(), m = new WeakMap(), Y = new WeakMap(), V = new WeakMap(), X = new WeakMap(), St = new WeakMap(), U = new WeakMap(), Et = new WeakMap(), a(le, "NineTableHScrollBar");
202
- let Kt = le;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Kt);
204
- var F, Q, N, E, ct, ht, Rt;
205
- const ae = class ae extends HTMLElement {
201
+ M = new WeakMap(), W = new WeakMap(), p = new WeakMap(), B = new WeakMap(), P = new WeakMap(), D = new WeakMap(), Et = new WeakMap(), Y = new WeakMap(), Rt = new WeakMap(), c(ae, "NineTableHScrollBar");
202
+ let Zt = ae;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Zt);
204
+ var O, J, V, S, ht, dt, At;
205
+ const ce = class ce extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- c(this, F);
209
- c(this, Q);
210
- c(this, N, !1);
211
- c(this, E);
212
- c(this, ct, 0);
213
- c(this, ht, 0);
214
- /**
215
- * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
216
- */
217
- v(this, "refresh", /* @__PURE__ */ a(() => {
218
- H.log("refresh", t(this, N)), H.log("refresh2");
219
- const e = t(this, E).container, s = t(this, E).track, o = t(this, E).thumb, r = e.clientHeight, l = (t(this, F).data.get() || []).length, d = t(this, Q).getRowHeight(), h = l * d;
220
- if (h <= r) {
221
- o.style.display = "none", t(this, E).top.disabled = !0, t(this, E).bottom.disabled = !0;
208
+ d(this, O);
209
+ d(this, J);
210
+ d(this, V, !1);
211
+ d(this, S);
212
+ d(this, ht, 0);
213
+ d(this, dt, 0);
214
+ v(this, "refresh", /* @__PURE__ */ c(() => {
215
+ if (!t(this, O) || !t(this, S)) return;
216
+ const e = t(this, S).container, n = t(this, S).track, s = t(this, S).thumb, r = e.clientHeight, l = (t(this, O).data.get() || []).length, h = t(this, J).getRowHeight(), a = l * h;
217
+ if (a <= r) {
218
+ s.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
222
219
  return;
223
220
  } else
224
- o.style.display = "block";
225
- const f = s.clientHeight;
221
+ s.style.display = "block";
222
+ const f = n.clientHeight;
226
223
  if (f <= 0) return;
227
- const u = Math.max(Math.min(f * (r / h), f), 20);
228
- o.style.height = `${u}px`;
229
- const g = e.scrollTop, p = Math.max(h - r, 1);
230
- let y = 0;
231
- p > 0 && (y = g / p * (f - u));
232
- const S = f - u;
233
- y < 0 && (y = 0), y > S && (y = S), o.style.top = `${y}px`, H.log("currentScrollTop", g), H.log("maxScrollTop", p), H.log("trackHeight", f), H.log("thumbHeight", u), t(this, E).top.disabled = g <= 0, t(this, E).bottom.disabled = g >= p - 1;
224
+ const u = Math.max(Math.min(f * (r / a), f), 20);
225
+ s.style.height = `${u}px`;
226
+ const b = e.scrollTop, y = Math.max(a - r, 1);
227
+ let m = 0;
228
+ y > 0 && (m = b / y * (f - u));
229
+ const R = f - u;
230
+ m < 0 && (m = 0), m > R && (m = R), s.style.top = `${m}px`, t(this, S).top.disabled = b <= 0, t(this, S).bottom.disabled = b >= y - 1;
234
231
  }, "refresh"));
235
- c(this, Rt, /* @__PURE__ */ a(() => {
236
- const e = t(this, E).container, s = /* @__PURE__ */ a(() => {
237
- const r = (t(this, F).data.get() || []).length, n = t(this, Q).getRowHeight();
238
- return r * n;
232
+ d(this, At, /* @__PURE__ */ c(() => {
233
+ const e = t(this, S).container, n = /* @__PURE__ */ c(() => {
234
+ const r = (t(this, O).data.get() || []).length, o = t(this, J).getRowHeight();
235
+ return r * o;
239
236
  }, "getContentHeight");
240
237
  e.addEventListener("scroll", () => {
241
- t(this, N) || this.refresh();
242
- }), t(this, E).thumb.addEventListener("mousedown", (o) => {
243
- if (o.button !== 0) return;
244
- o.stopPropagation(), o.preventDefault(), b(this, N, !0), b(this, ct, o.clientY), b(this, ht, e.scrollTop);
245
- const r = /* @__PURE__ */ a((l) => {
246
- if (!t(this, N)) return;
247
- const d = t(this, E).track.getBoundingClientRect(), h = t(this, E).thumb.clientHeight, u = d.height - h, g = l.clientY - t(this, ct), p = e.clientHeight, y = s(), S = Math.max(y - p, 1);
248
- if (u > 0 && S > 0) {
249
- const O = g / u * S;
250
- let P = t(this, ht) + O;
251
- const ye = Math.max(0, y - p);
252
- P < 0 && (P = 0), P > ye && (P = ye), e.scrollTop = P;
238
+ t(this, V) || this.refresh();
239
+ }), t(this, S).thumb.addEventListener("mousedown", (s) => {
240
+ if (s.button !== 0) return;
241
+ s.stopPropagation(), s.preventDefault(), g(this, V, !0), g(this, ht, s.clientY), g(this, dt, e.scrollTop);
242
+ const r = /* @__PURE__ */ c((l) => {
243
+ if (!t(this, V)) return;
244
+ const h = t(this, S).track.getBoundingClientRect(), a = t(this, S).thumb.clientHeight, u = h.height - a, b = l.clientY - t(this, ht), y = e.clientHeight, m = n(), R = Math.max(m - y, 1);
245
+ if (u > 0 && R > 0) {
246
+ const G = b / u * R;
247
+ let at = t(this, dt) + G;
248
+ const pe = Math.max(0, m - y);
249
+ at < 0 && (at = 0), at > pe && (at = pe), e.scrollTop = at;
253
250
  }
254
251
  this.refresh();
255
- }, "onMouseMove"), n = /* @__PURE__ */ a(() => {
256
- b(this, N, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
252
+ }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
253
+ g(this, V, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
257
254
  }, "onMouseUp");
258
- document.addEventListener("mousemove", r), document.addEventListener("mouseup", n);
259
- }), t(this, E).track.addEventListener("mousedown", (o) => {
260
- if (o.button !== 0 || o.target === t(this, E).thumb) return;
261
- const r = t(this, E).track.getBoundingClientRect(), n = t(this, E).thumb.clientHeight, l = o.clientY - r.top - n / 2, h = r.height - n, f = e.clientHeight, u = s(), g = Math.max(u - f, 1);
262
- if (h > 0 && g > 0) {
263
- const p = Math.max(0, Math.min(1, l / h));
264
- e.scrollTop = p * g;
255
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
256
+ }), t(this, S).track.addEventListener("mousedown", (s) => {
257
+ if (s.button !== 0 || s.target === t(this, S).thumb) return;
258
+ const r = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientHeight, l = s.clientY - r.top - o / 2, a = r.height - o, f = e.clientHeight, u = n(), b = Math.max(u - f, 1);
259
+ if (a > 0 && b > 0) {
260
+ const y = Math.max(0, Math.min(1, l / a));
261
+ e.scrollTop = y * b;
265
262
  }
266
263
  this.refresh();
267
- }), t(this, E).top.addEventListener("click", () => {
264
+ }), t(this, S).top.addEventListener("click", () => {
268
265
  e.scrollTop -= 40;
269
- }), t(this, E).bottom.addEventListener("click", () => {
266
+ }), t(this, S).bottom.addEventListener("click", () => {
270
267
  e.scrollTop += 40;
271
268
  });
272
269
  }, "#init"));
273
270
  }
274
271
  connectedCallback() {
275
- b(this, F, this.getRootNode().host), b(this, Q, this.closest("nine-table-sheet")), this.innerHTML = `
272
+ g(this, O, this.getRootNode().host), g(this, J, this.closest("nine-table-sheet")), this.innerHTML = `
276
273
  <style>
277
274
  nine-table-vscrollbar {
278
275
  display: flex;
@@ -316,7 +313,6 @@ const ae = class ae extends HTMLElement {
316
313
  position: relative;
317
314
  background: #f3f4f6;
318
315
  overflow: hidden;
319
- border: 2px solid red;
320
316
  }
321
317
  nine-table-vscrollbar .ng-scroll-thumb {
322
318
  position: absolute;
@@ -337,373 +333,379 @@ const ae = class ae extends HTMLElement {
337
333
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
338
334
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
339
335
  `;
340
- const e = /* @__PURE__ */ a(() => {
341
- const s = t(this, F).shadowRoot.querySelector(".ng-container-body");
342
- if (!s) {
336
+ const e = /* @__PURE__ */ c(() => {
337
+ const n = t(this, O).shadowRoot.querySelector(".ng-container-body .ng-part-body");
338
+ if (!n) {
343
339
  setTimeout(e, 10);
344
340
  return;
345
341
  }
346
- b(this, E, {
347
- container: s,
342
+ g(this, S, {
343
+ container: n,
348
344
  track: this.querySelector(".ng-scroll-track"),
349
345
  thumb: this.querySelector(".ng-scroll-thumb"),
350
346
  top: this.querySelector(".ng-scroll-top"),
351
347
  bottom: this.querySelector(".ng-scroll-bottom")
352
- }), t(this, Rt).call(this), this.refresh();
348
+ }), t(this, At).call(this), this.refresh();
353
349
  }, "initWhenReady");
354
350
  e();
355
351
  }
356
352
  };
357
- F = new WeakMap(), Q = new WeakMap(), N = new WeakMap(), E = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), Rt = new WeakMap(), a(ae, "NineTableVScrollBar");
358
- let Zt = ae;
359
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Zt);
360
- var At, tt;
361
- const M = class M {
362
- /**
363
- * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
364
- */
365
- static compileAll(i) {
366
- return Array.isArray(i) ? i.map((e) => M.compile(e)) : [];
367
- }
368
- /**
369
- * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
370
- */
371
- static compile(i) {
372
- var o, r, n, l;
373
- if (!i) return null;
374
- const e = i.cloneNode(!0);
375
- return t(o = M, At).call(o, e), t(r = M, tt).call(r, e, "thead"), t(n = M, tt).call(n, e, "tbody"), t(l = M, tt).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((d, h) => {
376
- const f = d.getAttribute("fixed");
377
- f && e.querySelectorAll(`thead [data-col="${h}"], tbody [data-col="${h}"], tfoot [data-col="${h}"]`).forEach((u) => {
378
- u.setAttribute("fixed", f);
379
- });
380
- }), e;
381
- }
382
- };
383
- At = new WeakMap(), tt = new WeakMap(), a(M, "TableCompiler"), c(M, At, /* @__PURE__ */ a((i) => {
384
- if (!i.querySelector("colgroup")) {
385
- const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, o = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
386
- for (let n = 0; n < s; n++) {
387
- const l = document.createElement("col");
388
- l.setAttribute("width", r), o.appendChild(l);
389
- }
390
- i.prepend(o);
391
- }
392
- if (!i.querySelector("thead")) {
393
- const e = document.createElement("thead"), s = i.querySelector("colgroup");
394
- s ? s.after(e) : i.prepend(e);
395
- }
396
- i.classList.add("nine-table-element"), i.style.display = "table";
397
- }, "#ensureTableStructure")), c(M, tt, /* @__PURE__ */ a((i, e) => {
398
- const s = Array.from(i.querySelectorAll(e + " tr")), o = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
399
- if (r === 0 || o.length === 0) return;
400
- let n = 0;
401
- o.forEach((d) => {
402
- n += d.colSpan || 1;
403
- });
404
- const l = Array.from(Array(r), () => Array(n).fill(null));
405
- s.forEach((d) => {
406
- const h = d.sectionRowIndex;
407
- let f = 0;
408
- Array.from(d.querySelectorAll("th,td")).forEach((u) => {
409
- for (let y = 0; y < l[h].length; y++)
410
- if (l[h][y] === null) {
411
- f = y;
412
- break;
413
- }
414
- const g = u.rowSpan || 1, p = u.colSpan || 1;
415
- for (let y = 0; y < g; y++)
416
- for (let S = 0; S < p; S++)
417
- h + y < r && f + S < n && (l[h + y][f + S] = y === 0 && S === 0 ? "1" : "0");
418
- });
419
- }), s.forEach((d) => {
420
- const h = d.sectionRowIndex;
421
- Array.from(d.querySelectorAll("th,td")).forEach((f) => {
422
- for (let u = 0; u < l[h].length; u++)
423
- if (l[h][u] === "1") {
424
- f.dataset.col = u, l[h][u] = "0";
425
- break;
426
- }
427
- });
428
- });
429
- }, "#resetColIndex"));
430
- let Gt = M;
431
- var I, w, W, q, B, j, dt, et, qt, Tt, kt, ft, ut, Lt, Ct, bt, Ht, it, gt;
432
- const ce = class ce {
353
+ O = new WeakMap(), J = new WeakMap(), V = new WeakMap(), S = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), At = new WeakMap(), c(ce, "NineTableVScrollBar");
354
+ let Gt = ce;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Gt);
356
+ var I, w, _, q, z, X, ft, Q, qt, Tt, kt, ut, gt, Lt, Ct, bt, Ht, tt, yt, Mt;
357
+ const he = class he {
433
358
  constructor(i) {
434
- c(this, I);
435
- c(this, w);
436
- c(this, W, /* @__PURE__ */ new Map());
437
- c(this, q, null);
438
- c(this, B, null);
439
- c(this, j, 0);
440
- c(this, dt, 40);
441
- c(this, et, !1);
442
- c(this, qt, 3);
443
- v(this, "refresh", /* @__PURE__ */ a(() => {
359
+ d(this, I);
360
+ d(this, w);
361
+ d(this, _, /* @__PURE__ */ new Map());
362
+ d(this, q, null);
363
+ d(this, z, null);
364
+ d(this, X, 0);
365
+ d(this, ft, 40);
366
+ d(this, Q, !1);
367
+ d(this, qt, 3);
368
+ v(this, "refresh", /* @__PURE__ */ c(() => {
444
369
  var e;
445
- const i = t(this, w).querySelector(".ng-container-body");
446
- i && (t(this, ft).call(this), t(this, it).call(this, i.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
370
+ const i = t(this, w).querySelector(".ng-container-body .ng-part-body");
371
+ i && (t(this, ut).call(this), t(this, tt).call(this, i.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
447
372
  }, "refresh"));
448
- v(this, "initialize", /* @__PURE__ */ a(() => {
449
- b(this, q, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
450
- const r = t(this, w).querySelector(o);
373
+ v(this, "initialize", /* @__PURE__ */ c(() => {
374
+ g(this, q, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
375
+ const r = t(this, w).querySelector(s);
451
376
  if (!r) return;
452
- const n = r.querySelector("table");
453
- if (!n) return;
454
- const l = n.querySelector("tbody.bindable-tbody");
377
+ const o = r.querySelector(".ng-part-body table");
378
+ if (!o) return;
379
+ const l = o.querySelector("tbody.bindable-tbody");
455
380
  if (!l) return;
456
- const h = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
457
- t(this, W).set(o, h);
381
+ const a = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
382
+ t(this, _).set(s, a);
458
383
  });
459
- const i = t(this, w).querySelector(".ng-container-body"), e = t(this, w).querySelector(".ng-container-left"), s = t(this, w).querySelector(".ng-container-right");
384
+ const i = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), n = t(this, w).querySelector(".ng-container-right .ng-part-body");
460
385
  if (i) {
461
- t(this, kt).call(this, i), t(this, bt).call(this), t(this, ft).call(this), t(this, it).call(this, i.scrollTop);
462
- let o = i.scrollTop;
463
- const r = /* @__PURE__ */ a((n) => {
386
+ t(this, kt).call(this, i), t(this, bt).call(this), t(this, ut).call(this), t(this, tt).call(this, i.scrollTop);
387
+ let s = i.scrollTop;
388
+ const r = /* @__PURE__ */ c((o) => {
464
389
  var l;
465
- e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, it).call(this, n), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
390
+ e && e.scrollTop !== o && (e.scrollTop = o), n && n.scrollTop !== o && (n.scrollTop = o), t(this, tt).call(this, o), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
466
391
  }, "syncScroll");
467
392
  i.addEventListener("scroll", () => {
468
- const n = i.scrollTop;
469
- o !== n && (o = n, r(n));
393
+ const o = i.scrollTop;
394
+ s !== o && (s = o, r(o));
470
395
  });
471
396
  }
472
397
  }, "initialize"));
473
- c(this, Tt, /* @__PURE__ */ a((i, e) => {
474
- const s = t(this, W).get(e);
475
- if (!s || s.length === 0) return;
476
- const o = i.querySelector("tbody.bindable-tbody");
477
- if (!o) return;
478
- o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
479
- const r = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
480
- for (let l = 0; l < t(this, dt); l++)
481
- s.forEach((d) => {
482
- n.appendChild(d.cloneNode(!0));
398
+ d(this, Tt, /* @__PURE__ */ c((i, e) => {
399
+ const n = t(this, _).get(e);
400
+ if (!n || n.length === 0) return;
401
+ const s = i.querySelector(".ng-part-body tbody.bindable-tbody");
402
+ if (!s) return;
403
+ s.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
404
+ const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
405
+ for (let l = 0; l < t(this, ft); l++)
406
+ n.forEach((h) => {
407
+ o.appendChild(h.cloneNode(!0));
483
408
  });
484
- r ? r.before(n) : o.appendChild(n);
409
+ r ? r.before(o) : s.appendChild(o);
485
410
  }, "#renderRows"));
486
- c(this, kt, /* @__PURE__ */ a((i) => {
411
+ d(this, kt, /* @__PURE__ */ c((i) => {
487
412
  if (t(this, q) !== null && t(this, q) > 0)
488
413
  return t(this, q);
489
- const e = t(this, W).get(".ng-container-body");
414
+ const e = t(this, _).get(".ng-container-body");
490
415
  if (!e || e.length === 0) return 24;
491
- const s = i.querySelector("tbody.bindable-tbody") || i.querySelector("tbody.bindable-tbody:last-of-type");
492
- if (!s) return 24;
493
- s.querySelectorAll("tr:not(.nodata)").forEach((g) => g.remove());
494
- const o = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
495
- e.forEach((g) => {
496
- r.appendChild(g.cloneNode(!0));
497
- }), o ? o.before(r) : s.appendChild(r);
498
- const n = t(this, w), l = n.style.display, d = n.style.visibility, h = n.style.position;
499
- (l === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
416
+ const n = i.querySelector("tbody.bindable-tbody");
417
+ if (!n) return 24;
418
+ n.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
419
+ const s = n.querySelector("tr.nodata"), r = document.createDocumentFragment();
420
+ e.forEach((b) => {
421
+ r.appendChild(b.cloneNode(!0));
422
+ }), s ? s.before(r) : n.appendChild(r);
423
+ const o = t(this, w), l = o.style.display, h = o.style.visibility, a = o.style.position;
424
+ (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
500
425
  let f = 0;
501
- const u = s.querySelectorAll("tr:not(.nodata)");
502
- return u.forEach((g) => {
503
- f += g.offsetHeight || g.getBoundingClientRect().height;
504
- }), u.forEach((g) => g.remove()), n.style.display = l, n.style.visibility = d, n.style.position = h, b(this, q, f > 0 ? f : 24), t(this, ut).call(this), t(this, q);
426
+ const u = n.querySelectorAll("tr:not(.nodata)");
427
+ return u.forEach((b) => {
428
+ f += b.offsetHeight || b.getBoundingClientRect().height;
429
+ }), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = h, o.style.position = a, g(this, q, f > 0 ? f : 24), t(this, gt).call(this), t(this, q);
505
430
  }, "#measureAndCacheHeight"));
506
- // 🎯 ν…Œμ΄λΈ” 높이λ₯Ό 직접 ν‚€μš°λŠ” λŒ€μ‹ , 투λͺ… μŠ€νŽ˜μ΄μ„œ 높이와 translateY둜 슀크둀/μœ„μΉ˜ 정립
507
- c(this, ft, /* @__PURE__ */ a(() => {
508
- if (!t(this, w).querySelector(".ng-container-body")) return;
509
- const s = (t(this, I).data.get() || []).length, o = t(this, q) || 24, r = s * o;
510
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
511
- const l = t(this, w).querySelector(n);
512
- if (!l) return;
513
- const d = l.querySelector("table");
514
- d && (d.style.height = "auto");
515
- const h = l.querySelector(".ng-virtual-spacer");
516
- h && (h.style.height = `${r}px`);
431
+ d(this, ut, /* @__PURE__ */ c(() => {
432
+ const e = (t(this, I).data.get() || []).length, n = t(this, q) || 24, s = e * n;
433
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
434
+ const o = t(this, w).querySelector(r);
435
+ if (!o) return;
436
+ const l = o.querySelector(".ng-part-body .ng-virtual-spacer");
437
+ l && (l.style.height = `${s}px`);
517
438
  });
518
439
  }, "#updateVirtualScrollHeight"));
519
- c(this, ut, /* @__PURE__ */ a(() => {
520
- if ((t(this, I).data.get() || []).length, t(this, j) > 0 && t(this, q) > 0) {
521
- const e = Math.ceil(t(this, j) / t(this, q));
522
- b(this, dt, e + t(this, qt));
440
+ d(this, gt, /* @__PURE__ */ c(() => {
441
+ if (t(this, X) > 0 && t(this, q) > 0) {
442
+ const i = Math.ceil(t(this, X) / t(this, q));
443
+ g(this, ft, i + t(this, qt));
523
444
  }
524
445
  }, "#updateRowCount"));
525
- c(this, Lt, /* @__PURE__ */ a(() => {
526
- var d, h, f;
527
- const i = t(this, w).querySelector(".ng-container-left table"), e = t(this, w).querySelector(".ng-container-body table"), s = t(this, w).querySelector(".ng-container-right table");
446
+ d(this, Lt, /* @__PURE__ */ c(() => {
447
+ var h, a, f;
448
+ const i = t(this, w).querySelector(".ng-container-left .ng-part-body table"), e = t(this, w).querySelector(".ng-container-body .ng-part-body table"), n = t(this, w).querySelector(".ng-container-right .ng-part-body table");
528
449
  if (!e) return;
529
- const o = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), n = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(o.length, r.length, n.length);
450
+ const s = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = n ? Array.from(n.querySelectorAll("tr")) : [], l = Math.max(s.length, r.length, o.length);
530
451
  for (let u = 0; u < l; u++) {
531
- const g = [
532
- ((d = o[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
533
- ((h = r[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
534
- ((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
535
- ], p = Math.max(...g);
536
- p > 0 && (o[u] && (o[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), n[u] && (n[u].style.height = `${p}px`));
452
+ const b = [
453
+ ((h = s[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
454
+ ((a = r[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
455
+ ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
456
+ ], y = Math.max(...b);
457
+ y > 0 && (s[u] && (s[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), o[u] && (o[u].style.height = `${y}px`));
537
458
  }
538
459
  }, "#syncRowHeights"));
539
- c(this, Ct, /* @__PURE__ */ a(() => {
540
- !t(this, w) || !(t(this, w) instanceof HTMLElement) || (b(this, B, new ResizeObserver((i) => {
460
+ d(this, Ct, /* @__PURE__ */ c(() => {
461
+ !t(this, w) || !(t(this, w) instanceof HTMLElement) || (g(this, z, new ResizeObserver((i) => {
541
462
  for (const e of i) {
542
- const s = e.target;
543
- if (!s.classList.contains("active")) continue;
544
- const o = e.contentRect.height;
545
- if (o > 0) {
463
+ const n = e.target;
464
+ if (!n.classList.contains("active")) continue;
465
+ const s = e.contentRect.height;
466
+ if (s > 0) {
546
467
  let r = 0;
547
- const n = s.querySelector("thead");
548
- n && (r += n.offsetHeight || n.getBoundingClientRect().height);
549
- const l = Math.max(o - r, 100);
550
- t(this, j) !== l && (b(this, j, l), t(this, ut).call(this), t(this, q) !== null && t(this, bt).call(this));
468
+ const o = n.querySelector(".ng-part-header"), l = n.querySelector(".ng-part-footer");
469
+ o && (r += o.offsetHeight), l && (r += l.offsetHeight);
470
+ const h = Math.max(s - r, 100);
471
+ t(this, X) !== h && (g(this, X, h), t(this, gt).call(this), t(this, q) !== null && t(this, bt).call(this));
551
472
  }
552
473
  }
553
- })), t(this, B).observe(t(this, w)));
474
+ })), t(this, z).observe(t(this, w)));
554
475
  }, "#initResizeObserver"));
555
- c(this, bt, /* @__PURE__ */ a(() => {
476
+ d(this, bt, /* @__PURE__ */ c(() => {
556
477
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
557
478
  const e = t(this, w).querySelector(i);
558
- e && e.querySelector("tbody.bindable-tbody") && t(this, Tt).call(this, e, i);
559
- }), t(this, Lt).call(this);
479
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Tt).call(this, e, i);
480
+ }), t(this, Mt).call(this), t(this, Lt).call(this);
560
481
  }, "#renderAllContainers"));
561
- c(this, Ht, /* @__PURE__ */ a((i) => {
482
+ d(this, Ht, /* @__PURE__ */ c((i) => {
562
483
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
563
- var h;
564
- const s = t(this, w).querySelector(e);
484
+ var a;
485
+ const n = t(this, w).querySelector(e);
486
+ if (!n) return;
487
+ const s = n.querySelector(".ng-part-body tbody.bindable-tbody");
565
488
  if (!s) return;
566
- const o = s.querySelector("tbody.bindable-tbody");
567
- if (!o) return;
568
- const r = Array.from(o.querySelectorAll("tr:not(.nodata)")), n = ((h = t(this, W).get(e)) == null ? void 0 : h.length) || 1, d = (t(this, I).data.get() || []).length;
489
+ const r = Array.from(s.querySelectorAll("tr:not(.nodata)")), o = ((a = t(this, _).get(e)) == null ? void 0 : a.length) || 1, h = (t(this, I).data.get() || []).length;
569
490
  r.forEach((f, u) => {
570
- const g = i + Math.floor(u / n);
571
- if (g >= d) {
491
+ const b = i + Math.floor(u / o);
492
+ if (b >= h) {
572
493
  f.style.display = "none";
573
494
  return;
574
495
  }
575
- const p = t(this, I).data.get(g);
576
- f.style.display = "", t(this, gt).call(this, f, p, g);
496
+ const y = t(this, I).data.get(b);
497
+ f.style.display = "", t(this, yt).call(this, f, y, b);
577
498
  });
578
499
  });
579
500
  }, "#adjustBufferRows"));
580
- c(this, it, /* @__PURE__ */ a((i) => {
581
- var d;
501
+ d(this, tt, /* @__PURE__ */ c((i) => {
502
+ var h;
582
503
  const e = t(this, q);
583
504
  if (!e || e <= 0) return;
584
- const o = (t(this, I).data.get() || []).length, r = Math.max(0, Math.floor(i / e)), n = r * e, l = ((d = t(this, W).get(".ng-container-body")) == null ? void 0 : d.length) || 1;
585
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((h) => {
586
- const f = t(this, w).querySelector(h);
505
+ const s = (t(this, I).data.get() || []).length, r = Math.max(0, Math.floor(i / e)), o = r * e, l = ((h = t(this, _).get(".ng-container-body")) == null ? void 0 : h.length) || 1;
506
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
507
+ const f = t(this, w).querySelector(a);
587
508
  if (!f) return;
588
- const u = f.querySelector("table");
589
- if (u) {
590
- const y = u.querySelector("thead"), S = u.querySelector("tbody.fixed-tbody");
591
- y && (y.style.position = "relative", y.style.transform = `translateY(${i}px)`, y.style.zIndex = "5"), S && (S.style.position = "relative", S.style.transform = `translateY(${i}px)`, S.style.zIndex = "6");
592
- }
593
- const g = f.querySelector("tbody.bindable-tbody");
594
- if (!g) return;
595
- g.style.transform = `translateY(${n}px)`, Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((y, S) => {
596
- const O = r + Math.floor(S / l);
597
- if (O >= o) {
509
+ const u = f.querySelector(".ng-part-body tbody.bindable-tbody");
510
+ if (!u) return;
511
+ u.style.transform = `translateY(${o}px)`, Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((y, m) => {
512
+ const R = r + Math.floor(m / l);
513
+ if (R >= s) {
598
514
  y.style.display = "none";
599
515
  return;
600
516
  }
601
- const P = t(this, I).data.get(O);
602
- y.style.display = "", t(this, gt).call(this, y, P, O);
517
+ const G = t(this, I).data.get(R);
518
+ y.style.display = "", t(this, yt).call(this, y, G, R);
603
519
  });
604
- }), t(this, et) || (b(this, et, !0), setTimeout(() => {
605
- t(this, Ht).call(this, r), b(this, et, !1);
520
+ }), t(this, Q) || (g(this, Q, !0), setTimeout(() => {
521
+ t(this, Ht).call(this, r), g(this, Q, !1);
606
522
  }, 0));
607
523
  }, "#handleScroll"));
608
- c(this, gt, /* @__PURE__ */ a((i, e, s) => {
609
- i.dataset.row = s, Array.from(i.cells).forEach((o, r) => {
610
- const n = o.dataset.bind;
611
- n && e && e[n] !== void 0 ? o.textContent = e[n] : o.textContent = e ? e[Object.keys(e)[r]] ?? `R${s}C${r}` : `ν–‰ ${s + 1}`, o.dataset.row = s;
524
+ d(this, yt, /* @__PURE__ */ c((i, e, n) => {
525
+ i.dataset.row = n, Array.from(i.cells).forEach((s, r) => {
526
+ const o = s.dataset.bind;
527
+ o && e && e[o] !== void 0 ? s.textContent = e[o] : s.textContent = e ? e[Object.keys(e)[r]] ?? `R${n}C${r}` : `ν–‰ ${n + 1}`, s.dataset.row = n;
612
528
  });
613
529
  }, "#bindRowData"));
614
- v(this, "destroy", /* @__PURE__ */ a(() => {
615
- t(this, B) && (t(this, B).disconnect(), b(this, B, null));
530
+ d(this, Mt, /* @__PURE__ */ c(() => {
531
+ var h, a, f;
532
+ const i = t(this, w).querySelector(".ng-container-left .ng-part-header table"), e = t(this, w).querySelector(".ng-container-body .ng-part-header table"), n = t(this, w).querySelector(".ng-container-right .ng-part-header table");
533
+ if (!e) return;
534
+ const s = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = n ? Array.from(n.querySelectorAll("tr")) : [], l = Math.max(s.length, r.length, o.length);
535
+ for (let u = 0; u < l; u++) {
536
+ const b = [
537
+ ((h = s[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
538
+ ((a = r[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
539
+ ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
540
+ ], y = Math.max(...b);
541
+ y > 0 && (s[u] && (s[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), o[u] && (o[u].style.height = `${y}px`));
542
+ }
543
+ }, "#syncHeaderHeights"));
544
+ v(this, "destroy", /* @__PURE__ */ c(() => {
545
+ t(this, z) && (t(this, z).disconnect(), g(this, z, null));
616
546
  }, "destroy"));
617
- b(this, I, i.getRootNode().host), b(this, w, i), t(this, Ct).call(this);
547
+ g(this, I, i.getRootNode().host), g(this, w, i), t(this, Ct).call(this);
618
548
  }
619
549
  getRowHeight() {
620
550
  return t(this, q);
621
551
  }
622
552
  templateLength(i = ".ng-container-body") {
623
553
  var e;
624
- return ((e = t(this, W).get(i)) == null ? void 0 : e.length) || 1;
554
+ return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
625
555
  }
626
556
  };
627
- I = new WeakMap(), w = new WeakMap(), W = new WeakMap(), q = new WeakMap(), B = new WeakMap(), j = new WeakMap(), dt = new WeakMap(), et = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), ft = new WeakMap(), ut = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), Ht = new WeakMap(), it = new WeakMap(), gt = new WeakMap(), a(ce, "RowManager");
628
- let Jt = ce;
629
- var Mt, st, K, _t, It, $t, Wt, Ot;
630
- const at = class at extends HTMLElement {
557
+ I = new WeakMap(), w = new WeakMap(), _ = new WeakMap(), q = new WeakMap(), z = new WeakMap(), X = new WeakMap(), ft = new WeakMap(), Q = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), ut = new WeakMap(), gt = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), Ht = new WeakMap(), tt = new WeakMap(), yt = new WeakMap(), Mt = new WeakMap(), c(he, "RowManager");
558
+ let Jt = he;
559
+ var _t, et;
560
+ const H = class H {
561
+ /**
562
+ * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
563
+ */
564
+ static compileAll(i) {
565
+ return Array.isArray(i) ? i.map((e) => H.compile(e)) : [];
566
+ }
567
+ /**
568
+ * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
569
+ */
570
+ static compile(i) {
571
+ var s, r, o, l;
572
+ if (!i) return null;
573
+ const e = i.cloneNode(!0);
574
+ return t(s = H, _t).call(s, e), t(r = H, et).call(r, e, "thead"), t(o = H, et).call(o, e, "tbody"), t(l = H, et).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, a) => {
575
+ const f = h.getAttribute("fixed");
576
+ f && e.querySelectorAll(`thead [data-col="${a}"], tbody [data-col="${a}"], tfoot [data-col="${a}"]`).forEach((u) => {
577
+ u.setAttribute("fixed", f);
578
+ });
579
+ }), e;
580
+ }
581
+ };
582
+ _t = new WeakMap(), et = new WeakMap(), c(H, "TableCompiler"), d(H, _t, /* @__PURE__ */ c((i) => {
583
+ if (!i.querySelector("colgroup")) {
584
+ const e = i.querySelector("tbody tr") || i.querySelector("tr"), n = e ? e.querySelectorAll("th, td").length : 1, s = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / n), 100);
585
+ for (let o = 0; o < n; o++) {
586
+ const l = document.createElement("col");
587
+ l.setAttribute("width", r), s.appendChild(l);
588
+ }
589
+ i.prepend(s);
590
+ }
591
+ if (!i.querySelector("thead")) {
592
+ const e = document.createElement("thead"), n = i.querySelector("colgroup");
593
+ n ? n.after(e) : i.prepend(e);
594
+ }
595
+ i.classList.add("nine-table-element"), i.style.display = "table";
596
+ }, "#ensureTableStructure")), d(H, et, /* @__PURE__ */ c((i, e) => {
597
+ const n = Array.from(i.querySelectorAll(e + " tr")), s = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = n.length;
598
+ if (r === 0 || s.length === 0) return;
599
+ let o = 0;
600
+ s.forEach((h) => {
601
+ o += h.colSpan || 1;
602
+ });
603
+ const l = Array.from(Array(r), () => Array(o).fill(null));
604
+ n.forEach((h) => {
605
+ const a = h.sectionRowIndex;
606
+ let f = 0;
607
+ Array.from(h.querySelectorAll("th,td")).forEach((u) => {
608
+ for (let m = 0; m < l[a].length; m++)
609
+ if (l[a][m] === null) {
610
+ f = m;
611
+ break;
612
+ }
613
+ const b = u.rowSpan || 1, y = u.colSpan || 1;
614
+ for (let m = 0; m < b; m++)
615
+ for (let R = 0; R < y; R++)
616
+ a + m < r && f + R < o && (l[a + m][f + R] = m === 0 && R === 0 ? "1" : "0");
617
+ });
618
+ }), n.forEach((h) => {
619
+ const a = h.sectionRowIndex;
620
+ Array.from(h.querySelectorAll("th,td")).forEach((f) => {
621
+ for (let u = 0; u < l[a].length; u++)
622
+ if (l[a][u] === "1") {
623
+ f.dataset.col = u, l[a][u] = "0";
624
+ break;
625
+ }
626
+ });
627
+ });
628
+ }, "#resetColIndex"));
629
+ let Qt = H;
630
+ var $t, U, F, It, Wt, it, Ot, zt;
631
+ const ct = class ct extends HTMLElement {
631
632
  constructor() {
632
633
  super();
633
- c(this, Mt);
634
- c(this, st, null);
635
- c(this, K);
636
- v(this, "invalidate", /* @__PURE__ */ a(() => {
637
- var e, s;
638
- t(this, K).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (s = this.querySelector("nine-table-vscrollbar")) == null || s.refresh();
634
+ d(this, $t);
635
+ d(this, U, null);
636
+ d(this, F);
637
+ v(this, "invalidate", /* @__PURE__ */ c(() => {
638
+ var e, n;
639
+ t(this, F).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (n = this.querySelector("nine-table-vscrollbar")) == null || n.refresh();
639
640
  }, "invalidate"));
640
- c(this, _t, /* @__PURE__ */ a(() => {
641
+ d(this, It, /* @__PURE__ */ c(() => {
641
642
  [
642
643
  { selector: ".ng-container-body", type: null },
643
644
  { selector: ".ng-container-left", type: "left" },
644
645
  { selector: ".ng-container-right", type: "right" }
645
- ].forEach(({ selector: s, type: o }) => {
646
- const r = this.querySelector(s);
646
+ ].forEach(({ selector: n, type: s }) => {
647
+ const r = this.querySelector(n);
647
648
  if (!r) return;
648
- const n = t(this, $t).call(this, t(this, st), o);
649
649
  r.innerHTML = "";
650
+ const o = document.createElement("div");
651
+ o.className = "ng-part-header", o.appendChild(t(this, it).call(this, t(this, U), s, "header"));
650
652
  const l = document.createElement("div");
651
- l.className = "ng-scroll-content", l.style.position = "relative", l.style.width = "100%", l.appendChild(n);
652
- const d = document.createElement("div");
653
- d.className = "ng-virtual-spacer", d.style.width = "100%", d.style.pointerEvents = "none", l.appendChild(d), r.appendChild(l);
653
+ l.className = "ng-part-body";
654
+ const h = document.createElement("div");
655
+ h.className = "ng-scroll-content", h.style.position = "relative", h.style.width = "100%", h.appendChild(t(this, it).call(this, t(this, U), s, "body"));
656
+ const a = document.createElement("div");
657
+ a.className = "ng-virtual-spacer", a.style.width = "100%", a.style.pointerEvents = "none", h.appendChild(a), l.appendChild(h);
658
+ const f = document.createElement("div");
659
+ f.className = "ng-part-footer", f.appendChild(t(this, it).call(this, t(this, U), s, "footer")), r.appendChild(o), r.appendChild(l), r.appendChild(f);
654
660
  });
655
661
  }, "#renderSplitContainers"));
656
- c(this, It, /* @__PURE__ */ a(() => {
657
- ["left", "right"].forEach((e) => {
658
- const s = this.querySelector(`.ng-container-${e}`), o = s == null ? void 0 : s.querySelector("table");
659
- if (!s || !o) return;
662
+ d(this, Wt, /* @__PURE__ */ c(() => {
663
+ ["left", "right", "body"].forEach((e) => {
664
+ const n = this.querySelector(`.ng-container-${e}`), s = n == null ? void 0 : n.querySelectorAll("table");
665
+ if (!n || !s || s.length === 0) return;
660
666
  let r = 0;
661
- o.querySelectorAll("col").forEach((n) => {
662
- const l = parseInt(n.getAttribute("width"), 10);
667
+ s[0].querySelectorAll("col").forEach((o) => {
668
+ const l = parseInt(o.getAttribute("width"), 10);
663
669
  isNaN(r) || (r += l);
664
- }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
670
+ }), e === "body" ? n.style.flex = "1" : (n.style.flex = `0 0 ${r}px`, n.style.width = `${r}px`);
665
671
  });
666
672
  }, "#updateContainerWidths"));
667
- v(this, "generate", /* @__PURE__ */ a((e) => {
668
- e && (b(this, st, Gt.compile(e)), t(this, st).style.display = "table", t(this, _t).call(this), t(this, It).call(this), requestAnimationFrame(() => {
669
- var o;
670
- const s = (o = this.querySelector("thead")) == null ? void 0 : o.getBoundingClientRect().height;
671
- this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
672
- r.style.top = `${s}px`;
673
- });
674
- }), t(this, K).initialize(), setTimeout(() => {
675
- var s;
676
- (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
673
+ v(this, "generate", /* @__PURE__ */ c((e) => {
674
+ e && (g(this, U, Qt.compile(e)), t(this, It).call(this), t(this, Wt).call(this), t(this, F).initialize(), setTimeout(() => {
675
+ var n;
676
+ (n = this.querySelector("nine-table-hscrollbar")) == null || n.refresh();
677
677
  }, 0));
678
678
  }, "generate"));
679
- c(this, $t, /* @__PURE__ */ a((e, s) => {
680
- const o = e.cloneNode(!0), r = o.querySelector("tbody");
681
- if (r) {
682
- const n = document.createElement("tbody");
683
- n.className = "fixed-tbody", r.className = "bindable-tbody", r.before(n);
684
- }
685
- return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
686
- n.getAttribute("fixed") !== "left" && n.remove();
687
- }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
688
- n.getAttribute("fixed") !== "right" && n.remove();
689
- }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((n) => {
690
- n.remove();
691
- }), o;
679
+ d(this, it, /* @__PURE__ */ c((e, n, s) => {
680
+ const r = e.cloneNode(!0), o = r.querySelector("thead"), l = r.querySelector("tbody"), h = r.querySelector("tfoot");
681
+ if (s === "header") {
682
+ if (l && l.remove(), h && h.remove(), e.querySelector("tbody")) {
683
+ const f = document.createElement("tbody");
684
+ f.className = "fixed-tbody", r.appendChild(f);
685
+ }
686
+ } else s === "body" ? (o && o.remove(), h && h.remove(), l && (l.className = "bindable-tbody")) : s === "footer" && (o && o.remove(), l && l.remove());
687
+ return n === "left" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
688
+ a.getAttribute("fixed") !== "left" && a.remove();
689
+ }) : n === "right" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
690
+ a.getAttribute("fixed") !== "right" && a.remove();
691
+ }) : r.querySelectorAll("[fixed=left], [fixed=right]").forEach((a) => {
692
+ a.remove();
693
+ }), r;
692
694
  }, "#createSplitTable"));
693
- v(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, K).getRowHeight(), "getRowHeight"));
694
- v(this, "scrollToX", /* @__PURE__ */ a((e) => {
695
- const s = this.querySelector(".ng-container-body");
696
- s && (s.scrollLeft = e);
695
+ v(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, F).getRowHeight(), "getRowHeight"));
696
+ v(this, "scrollToX", /* @__PURE__ */ c((e) => {
697
+ const n = this.querySelector(".ng-container-body .ng-part-body");
698
+ n && (n.scrollLeft = e);
697
699
  }, "scrollToX"));
698
- v(this, "scrollToY", /* @__PURE__ */ a((e) => {
699
- const s = this.querySelector(".ng-container-body");
700
- s && (s.scrollTop = e);
700
+ v(this, "scrollToY", /* @__PURE__ */ c((e) => {
701
+ const n = this.querySelector(".ng-container-body .ng-part-body");
702
+ n && (n.scrollTop = e);
701
703
  }, "scrollToY"));
702
- c(this, Wt, /* @__PURE__ */ a(() => {
703
- t(this, Ot).call(this);
704
+ d(this, Ot, /* @__PURE__ */ c(() => {
705
+ t(this, zt).call(this);
704
706
  }, "#init"));
705
- c(this, Ot, /* @__PURE__ */ a(() => {
706
- const e = at.SCROLLBAR_SIZE;
707
+ d(this, zt, /* @__PURE__ */ c(() => {
708
+ const e = ct.SCROLLBAR_SIZE;
707
709
  this.innerHTML = `
708
710
  <style>
709
711
  nine-table-sheet {
@@ -730,51 +732,56 @@ const at = class at extends HTMLElement {
730
732
  overflow: hidden;
731
733
  position: relative;
732
734
  }
733
-
734
- nine-table-sheet .ng-container-left {
735
+
736
+ /* 9λΆ„ν•  μ—΄ μ»¨ν…Œμ΄λ„ˆ 곡톡 μŠ€νƒ€μΌ */
737
+ nine-table-sheet .ng-container-left,
738
+ nine-table-sheet .ng-container-body,
739
+ nine-table-sheet .ng-container-right {
735
740
  display: flex;
736
741
  flex-direction: column;
737
- overflow-y: auto;
738
- overflow-x: hidden;
742
+ height: 100%;
739
743
  background: #ffffff;
744
+ position: relative;
745
+ overflow: hidden;
746
+ }
747
+
748
+ nine-table-sheet .ng-container-left {
740
749
  border-right: 1px solid #e5e7eb;
741
750
  flex-shrink: 0;
742
- scrollbar-width: none;
743
- &::-webkit-scrollbar { display: none; }
744
751
  }
745
752
 
746
- nine-table-sheet thead {
747
- position: sticky;
748
- top: 0;
749
- z-index: 3;
750
- }
751
- nine-table-sheet tbody.fixed-tbody {
752
- position: sticky;
753
- z-index: 4;
753
+ nine-table-sheet .ng-container-body {
754
+ flex: 1;
754
755
  }
755
756
 
756
- nine-table-sheet .ng-container-body {
757
- display: flex;
758
- flex-direction: column;
757
+ nine-table-sheet .ng-container-right {
758
+ border-left: 1px solid #e5e7eb;
759
+ flex-shrink: 0;
760
+ }
761
+
762
+ /* 9λΆ„ν•  3단 λ ˆμ΄μ–΄ (Header / Body / Footer) */
763
+ nine-table-sheet .ng-part-header {
764
+ flex-shrink: 0;
765
+ overflow: hidden;
766
+ background: #f9fafb;
767
+ z-index: 3;
768
+ }
769
+
770
+ nine-table-sheet .ng-part-body {
759
771
  flex: 1;
760
772
  overflow-y: auto;
761
773
  overflow-x: auto;
762
- background: #ffffff;
763
774
  position: relative;
764
775
  scrollbar-width: none;
765
776
  &::-webkit-scrollbar { display: none; height: 0px; }
766
777
  }
767
-
768
- nine-table-sheet .ng-container-right {
769
- display: flex;
770
- flex-direction: column;
771
- overflow-y: auto;
772
- overflow-x: hidden;
773
- background: #ffffff;
774
- border-left: 1px solid #e5e7eb;
778
+
779
+ nine-table-sheet .ng-part-footer {
775
780
  flex-shrink: 0;
776
- scrollbar-width: none;
777
- &::-webkit-scrollbar { display: none; }
781
+ overflow: hidden;
782
+ background: #f9fafb;
783
+ border-top: 2px solid #d1d5db;
784
+ z-index: 2;
778
785
  }
779
786
 
780
787
  nine-table-sheet .ng-container-bottom {
@@ -818,17 +825,8 @@ const at = class at extends HTMLElement {
818
825
  text-align: left;
819
826
  }
820
827
 
821
- nine-table-sheet tfoot {
822
- display: table-footer-group;
823
- position: sticky;
824
- bottom: 0;
825
- z-index: 2;
826
- background: #f9fafb;
827
- }
828
-
829
828
  nine-table-sheet tfoot td, nine-table-sheet tfoot th {
830
829
  font-weight: 600;
831
- border-top: 2px solid #d1d5db;
832
830
  }
833
831
 
834
832
  nine-splitter {
@@ -848,91 +846,91 @@ const at = class at extends HTMLElement {
848
846
  </div>
849
847
  `;
850
848
  }, "#render"));
851
- b(this, K, new Jt(this)), b(this, Mt, this.getRootNode().host);
849
+ g(this, F, new Jt(this)), g(this, $t, this.getRootNode().host);
852
850
  }
853
851
  connectedCallback() {
854
- t(this, Wt).call(this);
852
+ t(this, Ot).call(this);
855
853
  }
856
854
  disconnectedCallback() {
857
- this.innerHTML = "", H.log("NineTableSheet destroyed.");
855
+ this.innerHTML = "", lt.log("NineTableSheet destroyed.");
858
856
  }
859
857
  };
860
- Mt = new WeakMap(), st = new WeakMap(), K = new WeakMap(), _t = new WeakMap(), It = new WeakMap(), $t = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), a(at, "NineTableSheet"), v(at, "SCROLLBAR_SIZE", 16);
861
- let wt = at;
862
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", wt);
863
- var zt, yt;
864
- const he = class he extends HTMLElement {
858
+ $t = new WeakMap(), U = new WeakMap(), F = new WeakMap(), It = new WeakMap(), Wt = new WeakMap(), it = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), c(ct, "NineTableSheet"), v(ct, "SCROLLBAR_SIZE", 16);
859
+ let St = ct;
860
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", St);
861
+ var Nt, pt;
862
+ const de = class de extends HTMLElement {
865
863
  constructor() {
866
864
  super();
867
- c(this, zt, /* @__PURE__ */ a(() => {
865
+ d(this, Nt, /* @__PURE__ */ c(() => {
868
866
  var e;
869
- (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
870
- var n;
871
- const o = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((n = s.target.closest(".nine-tab-item")) == null ? void 0 : n.dataset.index, 10);
872
- t(this, yt).call(this, r, o);
873
- }), t(this, yt).call(this, 0, !1);
867
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
868
+ var o;
869
+ const s = n.ctrlKey || n.metaKey || n.shiftKey, r = parseInt((o = n.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
870
+ t(this, pt).call(this, r, s);
871
+ }), t(this, pt).call(this, 0, !1);
874
872
  }, "#init"));
875
- c(this, yt, /* @__PURE__ */ a((e, s = !1) => {
876
- const o = /* @__PURE__ */ a(() => {
873
+ d(this, pt, /* @__PURE__ */ c((e, n = !1) => {
874
+ const s = /* @__PURE__ */ c(() => {
877
875
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
878
- Array.from(this.querySelectorAll("nine-splitter")).forEach((p) => p.style.setProperty("display", "none"));
879
- const g = f.filter((p) => p.classList.contains("active"));
880
- g.length < 2 || g.forEach((p) => {
881
- const y = parseInt(p.getAttribute("data-index"), 10), S = this.querySelector(`nine-splitter[data-split-index="${y}"]`), O = f[y + 1];
882
- S && O && O.classList.contains("active") && S.style.setProperty("display", "flex");
876
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
877
+ const b = f.filter((y) => y.classList.contains("active"));
878
+ b.length < 2 || b.forEach((y) => {
879
+ const m = parseInt(y.getAttribute("data-index"), 10), R = this.querySelector(`nine-splitter[data-split-index="${m}"]`), G = f[m + 1];
880
+ R && G && G.classList.contains("active") && R.style.setProperty("display", "flex");
883
881
  });
884
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), d = n.querySelectorAll("nine-table-sheet");
882
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
885
883
  if (!l[e]) return;
886
- if (!s)
884
+ if (!n)
887
885
  l.forEach((f, u) => {
888
886
  f.classList.toggle("active", u === e);
889
- }), d.forEach((f, u) => {
890
- const g = u === e;
891
- f.classList.toggle("active", g), f.style.flex = g ? "1 1 100%" : "";
887
+ }), h.forEach((f, u) => {
888
+ const b = u === e;
889
+ f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
892
890
  });
893
891
  else {
894
892
  const f = l[e], u = r.querySelectorAll(".nine-tab-item.active");
895
893
  if (f.classList.contains("active") && u.length <= 1)
896
894
  return;
897
895
  f.classList.toggle("active");
898
- const g = n.querySelector(`nine-table-sheet[data-index="${e}"]`);
899
- g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
896
+ const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
897
+ b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
900
898
  }
901
- const h = n.querySelectorAll("nine-table-sheet.active");
902
- h == null || h.forEach((f) => {
903
- f.style.flex = h.length > 1 ? "1 1 0%" : "1 1 100%";
904
- }), o();
899
+ const a = o.querySelectorAll("nine-table-sheet.active");
900
+ a == null || a.forEach((f) => {
901
+ f.style.flex = a.length > 1 ? "1 1 0%" : "1 1 100%";
902
+ }), s();
905
903
  }, "#switchSheet"));
906
904
  }
907
905
  connectedCallback() {
908
- t(this, zt).call(this);
906
+ t(this, Nt).call(this);
909
907
  }
910
908
  };
911
- zt = new WeakMap(), yt = new WeakMap(), a(he, "NineTableSheets");
912
- let Qt = he;
913
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Qt);
914
- var T, Nt, pt, Bt;
915
- const de = class de {
909
+ Nt = new WeakMap(), pt = new WeakMap(), c(de, "NineTableSheets");
910
+ let te = de;
911
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", te);
912
+ var T, Bt, mt, Pt;
913
+ const fe = class fe {
916
914
  constructor(i) {
917
- c(this, T);
918
- c(this, Nt, /* @__PURE__ */ a(() => {
919
- t(this, Bt).call(this), new ResizeObserver((i) => {
915
+ d(this, T);
916
+ d(this, Bt, /* @__PURE__ */ c(() => {
917
+ t(this, Pt).call(this), new ResizeObserver((i) => {
920
918
  for (let e of i)
921
- t(this, T).getAttribute("auto-height") === "true" && t(this, pt).call(this);
919
+ t(this, T).getAttribute("auto-height") === "true" && t(this, mt).call(this);
922
920
  }).observe(t(this, T));
923
921
  }, "#init"));
924
- c(this, pt, /* @__PURE__ */ a(() => {
925
- var d, h;
922
+ d(this, mt, /* @__PURE__ */ c(() => {
923
+ var h, a;
926
924
  const i = Array.from(t(this, T).shadowRoot.querySelectorAll("nine-table-sheet.active"));
927
925
  if (i.length === 0) return;
928
- const e = parseInt(t(this, T).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), o = (d = t(this, T).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (h = t(this, T).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : h.getBoundingClientRect().height, n = wt.SCROLLBAR_SIZE, l = e * s + o + r + n;
926
+ const e = parseInt(t(this, T).getAttribute("max-display-row"), 10) || 10, n = Math.max(...i.map((f) => f.getRowHeight())), s = (h = t(this, T).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, r = (a = t(this, T).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : a.getBoundingClientRect().height, o = St.SCROLLBAR_SIZE, l = e * n + s + r + o;
929
927
  t(this, T).style.height = `${l}px`;
930
928
  }, "#applyAutoHeight"));
931
- c(this, Bt, /* @__PURE__ */ a(() => {
932
- const e = Array.from(t(this, T).children).filter((d) => d.tagName === "TABLE"), s = t(this, T).getAttribute("auto-height") === "true", o = e.length, r = e.map((d, h) => {
933
- const u = `<nine-table-sheet class="${h === 0 ? "active" : ""}" data-index="${h}"></nine-table-sheet>`, g = h < o - 1 ? `<nine-splitter class="h" data-split-index="${h}"></nine-splitter>` : "";
934
- return u + g;
935
- }).join(""), n = e.map((d, h) => `<div class="nine-tab-item ${h === 0 ? "active" : ""}" data-index="${h}">Sheet ${h + 1}</div>`).join("");
929
+ d(this, Pt, /* @__PURE__ */ c(() => {
930
+ const e = Array.from(t(this, T).children).filter((h) => h.tagName === "TABLE"), n = t(this, T).getAttribute("auto-height") === "true", s = e.length, r = e.map((h, a) => {
931
+ const u = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, b = a < s - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
932
+ return u + b;
933
+ }).join(""), o = e.map((h, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
936
934
  t(this, T).shadowRoot.innerHTML = `
937
935
  <style>
938
936
  :host {
@@ -940,7 +938,7 @@ const de = class de {
940
938
  flex-direction: column;
941
939
  position: relative;
942
940
  overflow: hidden;
943
- height: ${s ? "auto" : "100%"};
941
+ height: ${n ? "auto" : "100%"};
944
942
  background: #fff;
945
943
  }
946
944
 
@@ -1016,7 +1014,7 @@ const de = class de {
1016
1014
  <nine-table-sheets>
1017
1015
  <nine-table-sheets-body>${r}</nine-table-sheets-body>
1018
1016
  <nine-table-sheets-footer>
1019
- <div class="nine-tab-bar">${n}</div>
1017
+ <div class="nine-tab-bar">${o}</div>
1020
1018
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1021
1019
  </nine-table-sheets-footer>
1022
1020
  </nine-table-sheets>
@@ -1025,166 +1023,166 @@ const de = class de {
1025
1023
  <nine-table-footer></nine-table-footer>
1026
1024
  `;
1027
1025
  const l = t(this, T).shadowRoot.querySelectorAll("nine-table-sheet");
1028
- l == null || l.forEach((d, h) => {
1029
- e[h] && setTimeout(() => {
1030
- d.generate(e[h]), s && t(this, pt).call(this);
1026
+ l == null || l.forEach((h, a) => {
1027
+ e[a] && setTimeout(() => {
1028
+ h.generate(e[a]), n && t(this, mt).call(this);
1031
1029
  });
1032
1030
  });
1033
1031
  }, "#render"));
1034
- b(this, T, i), t(this, Nt).call(this);
1032
+ g(this, T, i), t(this, Bt).call(this);
1035
1033
  }
1036
1034
  };
1037
- T = new WeakMap(), Nt = new WeakMap(), pt = new WeakMap(), Bt = new WeakMap(), a(de, "LayoutManager");
1038
- let te = de;
1039
- var mt, nt;
1040
- const fe = class fe {
1035
+ T = new WeakMap(), Bt = new WeakMap(), mt = new WeakMap(), Pt = new WeakMap(), c(fe, "LayoutManager");
1036
+ let ee = fe;
1037
+ var xt, nt;
1038
+ const ue = class ue {
1041
1039
  constructor(i) {
1042
- c(this, mt);
1043
- c(this, nt, -1);
1044
- v(this, "count", /* @__PURE__ */ a(() => t(this, mt).rawRecords.length, "count"));
1045
- b(this, mt, i);
1040
+ d(this, xt);
1041
+ d(this, nt, -1);
1042
+ v(this, "count", /* @__PURE__ */ c(() => t(this, xt).rawRecords.length, "count"));
1043
+ g(this, xt, i);
1046
1044
  }
1047
1045
  get at() {
1048
1046
  return t(this, nt);
1049
1047
  }
1050
1048
  set at(i) {
1051
- b(this, nt, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, nt)}"]`) && setTimeout(() => {
1049
+ g(this, nt, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, nt)}"]`) && setTimeout(() => {
1052
1050
  });
1053
1051
  }
1054
1052
  };
1055
- mt = new WeakMap(), nt = new WeakMap(), a(fe, "ngRow");
1056
- let ee = fe;
1057
- var k, R, L, ot, Dt, D, Pt, Z, xt, Yt, Vt, rt;
1053
+ xt = new WeakMap(), nt = new WeakMap(), c(ue, "ngRow");
1054
+ let ie = ue;
1055
+ var k, E, L, st, Dt, N, Yt, j, vt, Vt, Xt, ot;
1058
1056
  const C = class C {
1059
1057
  constructor(i, e) {
1060
- c(this, k);
1061
- c(this, R);
1062
- c(this, L, []);
1063
- c(this, ot, []);
1064
- c(this, Dt, 0);
1065
- c(this, D, []);
1066
- c(this, Pt, /* @__PURE__ */ a(() => {
1067
- b(this, D, []);
1058
+ d(this, k);
1059
+ d(this, E);
1060
+ d(this, L, []);
1061
+ d(this, st, []);
1062
+ d(this, Dt, 0);
1063
+ d(this, N, []);
1064
+ d(this, Yt, /* @__PURE__ */ c(() => {
1065
+ g(this, N, []);
1068
1066
  const i = t(this, k).template || [];
1069
1067
  Array.from(i).forEach((e) => {
1070
- var s;
1071
- t(this, D).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1072
- }), (t(this, R).rawRecords || []).forEach((e) => {
1073
- e.__ng || (e.__ng = t(this, xt).call(this)), e.__ng.height = t(this, D).slice();
1068
+ var n;
1069
+ t(this, N).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1070
+ }), (t(this, E).rawRecords || []).forEach((e) => {
1071
+ e.__ng || (e.__ng = t(this, vt).call(this)), e.__ng.height = t(this, N).slice();
1074
1072
  });
1075
1073
  }, "#initialize"));
1076
- c(this, Z, /* @__PURE__ */ a(() => {
1074
+ d(this, j, /* @__PURE__ */ c(() => {
1077
1075
  t(this, k).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1078
1076
  i.invalidate();
1079
1077
  });
1080
1078
  }, "#invalidate"));
1081
- v(this, "get", /* @__PURE__ */ a((i, e) => {
1079
+ v(this, "get", /* @__PURE__ */ c((i, e) => {
1082
1080
  var r;
1083
- const s = this.getValidData();
1084
- if (!s || s.length <= 0) return;
1085
- if (i == null) return t(this, rt).call(this, s);
1086
- if (i < 0 || i >= s.length) return null;
1087
- const o = typeof ((r = t(this, k).fields) == null ? void 0 : r.get) == "function" ? t(this, k).fields.get() : [];
1081
+ const n = this.getValidData();
1082
+ if (!n || n.length <= 0) return;
1083
+ if (i == null) return t(this, ot).call(this, n);
1084
+ if (i < 0 || i >= n.length) return null;
1085
+ const s = typeof ((r = t(this, k).fields) == null ? void 0 : r.get) == "function" ? t(this, k).fields.get() : [];
1088
1086
  if (e != null) {
1089
- const n = o.indexOf(e);
1090
- return n >= 0 ? s[i].v[n] : null;
1087
+ const o = s.indexOf(e);
1088
+ return o >= 0 ? n[i].v[o] : null;
1091
1089
  }
1092
- return t(this, rt).call(this, s[i]);
1090
+ return t(this, ot).call(this, n[i]);
1093
1091
  }, "get"));
1094
- v(this, "set", /* @__PURE__ */ a((i) => {
1095
- this.clear(), this.add(i, !1), t(this, Z).call(this);
1092
+ v(this, "set", /* @__PURE__ */ c((i) => {
1093
+ this.clear(), this.add(i, !1), t(this, j).call(this);
1096
1094
  }, "set"));
1097
- c(this, xt, /* @__PURE__ */ a(() => ({
1095
+ d(this, vt, /* @__PURE__ */ c(() => ({
1098
1096
  rowState: C.ROW_STATE.EMPTY,
1099
1097
  deleted: !1,
1100
1098
  filtered: !1,
1101
- height: t(this, D).slice(),
1099
+ height: t(this, N).slice(),
1102
1100
  o: {},
1103
1101
  c: {},
1104
- _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, D).slice(), -1, {}, {}]
1102
+ _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, N).slice(), -1, {}, {}]
1105
1103
  }), "#getDefaultMeta"));
1106
- v(this, "reset", /* @__PURE__ */ a(() => {
1107
- b(this, L, []), b(this, ot, []), t(this, Z).call(this);
1104
+ v(this, "reset", /* @__PURE__ */ c(() => {
1105
+ g(this, L, []), g(this, st, []), t(this, j).call(this);
1108
1106
  }, "reset"));
1109
- v(this, "clear", /* @__PURE__ */ a(() => {
1107
+ v(this, "clear", /* @__PURE__ */ c(() => {
1110
1108
  var i;
1111
- t(this, R).rawRecords = [], b(this, L, []), b(this, ot, []), (i = t(this, R).viewRecords) != null && i.reset && t(this, R).viewRecords.reset();
1109
+ t(this, E).rawRecords = [], g(this, L, []), g(this, st, []), (i = t(this, E).viewRecords) != null && i.reset && t(this, E).viewRecords.reset();
1112
1110
  }, "clear"));
1113
- c(this, Yt, /* @__PURE__ */ a((i) => {
1114
- var o;
1111
+ d(this, Vt, /* @__PURE__ */ c((i) => {
1112
+ var s;
1115
1113
  Array.isArray(i) || (i = [i]);
1116
- const e = typeof ((o = t(this, k).fields) == null ? void 0 : o.get) == "function" ? t(this, k).fields.get() : Object.keys(i[0] || {}), s = [];
1114
+ const e = typeof ((s = t(this, k).fields) == null ? void 0 : s.get) == "function" ? t(this, k).fields.get() : Object.keys(i[0] || {}), n = [];
1117
1115
  return i.forEach((r) => {
1118
- const n = { v: [] };
1116
+ const o = { v: [] };
1119
1117
  e.forEach((l) => {
1120
- n.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1121
- }), s.push(n);
1122
- }), s;
1118
+ o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1119
+ }), n.push(o);
1120
+ }), n;
1123
1121
  }, "#json2Array"));
1124
- c(this, Vt, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1125
- e.__ng = t(this, xt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = C.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1122
+ d(this, Xt, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1123
+ e.__ng = t(this, vt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = C.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1126
1124
  }), i), "#defaultInsert"));
1127
- v(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1125
+ v(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1128
1126
  i === void 0 && (i = {});
1129
- const s = t(this, Yt).call(this, i);
1130
- t(this, R).rawRecords = t(this, R).rawRecords.concat(t(this, Vt).call(this, s)), this.resetRecords();
1131
- const o = this.count() - 1;
1132
- return e || s.forEach((r, n) => {
1133
- const l = t(this, R).rawRecords[o - n];
1127
+ const n = t(this, Vt).call(this, i);
1128
+ t(this, E).rawRecords = t(this, E).rawRecords.concat(t(this, Xt).call(this, n)), this.resetRecords();
1129
+ const s = this.count() - 1;
1130
+ return e || n.forEach((r, o) => {
1131
+ const l = t(this, E).rawRecords[s - o];
1134
1132
  l && (l.__ng.rowState = C.ROW_STATE.EMPTY);
1135
- }), t(this, Z).call(this), o;
1133
+ }), t(this, j).call(this), s;
1136
1134
  }, "add"));
1137
- v(this, "delete", /* @__PURE__ */ a((i) => {
1135
+ v(this, "delete", /* @__PURE__ */ c((i) => {
1138
1136
  let e = [];
1139
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, R).host.row.at] : e = [parseInt(i, 10)], e.sort((s, o) => o - s).forEach((s) => {
1140
- if (t(this, L)[s]) {
1141
- const o = t(this, L)[s].__ng.rowid;
1142
- t(this, L)[s].__ng.rowState === C.ROW_STATE.INSERT ? t(this, R).rawRecords = t(this, R).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, R).rawRecords.forEach((r) => {
1143
- r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = C.ROW_STATE.DELETE);
1137
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, E).host.row.at] : e = [parseInt(i, 10)], e.sort((n, s) => s - n).forEach((n) => {
1138
+ if (t(this, L)[n]) {
1139
+ const s = t(this, L)[n].__ng.rowid;
1140
+ t(this, L)[n].__ng.rowState === C.ROW_STATE.INSERT ? t(this, E).rawRecords = t(this, E).rawRecords.filter((r) => r.__ng.rowid !== s) : t(this, E).rawRecords.forEach((r) => {
1141
+ r.__ng.rowid === s && (r.__ng.deleted = !0, r.__ng.rowState = C.ROW_STATE.DELETE);
1144
1142
  });
1145
1143
  }
1146
- }), this.resetRecords(), t(this, Z).call(this);
1144
+ }), this.resetRecords(), t(this, j).call(this);
1147
1145
  }, "delete"));
1148
- v(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
1149
- var d;
1146
+ v(this, "setValue", /* @__PURE__ */ c((i, e, n) => {
1147
+ var h;
1150
1148
  i = parseInt(i, 10);
1151
- const r = (typeof ((d = t(this, k).fields) == null ? void 0 : d.get) == "function" ? t(this, k).fields.get() : []).indexOf(e);
1149
+ const r = (typeof ((h = t(this, k).fields) == null ? void 0 : h.get) == "function" ? t(this, k).fields.get() : []).indexOf(e);
1152
1150
  if (r < 0) return;
1153
- const n = this.getValidData()[i];
1154
- if (!n) return;
1155
- const l = n.v[r];
1156
- l !== s && n.__ng.rowState !== C.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = l), n.__ng.rowState = C.ROW_STATE.UPDATE), n.v[r] = s;
1151
+ const o = this.getValidData()[i];
1152
+ if (!o) return;
1153
+ const l = o.v[r];
1154
+ l !== n && o.__ng.rowState !== C.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = C.ROW_STATE.UPDATE), o.v[r] = n;
1157
1155
  }, "setValue"));
1158
- v(this, "resetRecords", /* @__PURE__ */ a(() => {
1159
- b(this, ot, t(this, R).rawRecords.filter((i) => !i.__ng.deleted)), b(this, L, t(this, R).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, R).rawRecords.forEach((i, e) => {
1156
+ v(this, "resetRecords", /* @__PURE__ */ c(() => {
1157
+ g(this, st, t(this, E).rawRecords.filter((i) => !i.__ng.deleted)), g(this, L, t(this, E).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, E).rawRecords.forEach((i, e) => {
1160
1158
  i.__ng.rowidx = e;
1161
1159
  }), t(this, L).forEach((i, e) => {
1162
1160
  i.__ng.i = e;
1163
1161
  });
1164
1162
  }, "resetRecords"));
1165
- v(this, "getValidData", /* @__PURE__ */ a(() => (t(this, L).length === 0 && t(this, R).rawRecords.length > 0 && this.resetRecords(), t(this, L)), "getValidData"));
1166
- c(this, rt, /* @__PURE__ */ a((i) => {
1167
- var n;
1163
+ v(this, "getValidData", /* @__PURE__ */ c(() => (t(this, L).length === 0 && t(this, E).rawRecords.length > 0 && this.resetRecords(), t(this, L)), "getValidData"));
1164
+ d(this, ot, /* @__PURE__ */ c((i) => {
1165
+ var o;
1168
1166
  if (!i) return i;
1169
- const e = !Array.isArray(i), s = e ? [i] : i, o = typeof ((n = t(this, k).fields) == null ? void 0 : n.get) == "function" ? t(this, k).fields.get() : [], r = s.filter((l) => !l.__ng.deleted).map((l) => {
1170
- const d = {};
1171
- return o.forEach((h, f) => {
1172
- d[h] = l.v ? l.v[f] : l[h];
1173
- }), d.__ng = l.__ng, d;
1167
+ const e = !Array.isArray(i), n = e ? [i] : i, s = typeof ((o = t(this, k).fields) == null ? void 0 : o.get) == "function" ? t(this, k).fields.get() : [], r = n.filter((l) => !l.__ng.deleted).map((l) => {
1168
+ const h = {};
1169
+ return s.forEach((a, f) => {
1170
+ h[a] = l.v ? l.v[f] : l[a];
1171
+ }), h.__ng = l.__ng, h;
1174
1172
  });
1175
1173
  return e ? r[0] : r;
1176
1174
  }, "#conv"));
1177
- v(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
1178
- b(this, k, i), b(this, R, e), t(this, Pt).call(this);
1175
+ v(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1176
+ g(this, k, i), g(this, E, e), t(this, Yt).call(this);
1179
1177
  }
1180
1178
  get source() {
1181
- return t(this, rt).call(this, t(this, R).rawRecords);
1179
+ return t(this, ot).call(this, t(this, E).rawRecords);
1182
1180
  }
1183
1181
  set source(i) {
1184
1182
  this.clear(), this.add(i, !1);
1185
1183
  }
1186
1184
  get nextId() {
1187
- return ++ve(this, Dt)._;
1185
+ return ++we(this, Dt)._;
1188
1186
  }
1189
1187
  get length() {
1190
1188
  return t(this, L).length;
@@ -1193,7 +1191,7 @@ const C = class C {
1193
1191
  return this.length;
1194
1192
  }
1195
1193
  };
1196
- k = new WeakMap(), R = new WeakMap(), L = new WeakMap(), ot = new WeakMap(), Dt = new WeakMap(), D = new WeakMap(), Pt = new WeakMap(), Z = new WeakMap(), xt = new WeakMap(), Yt = new WeakMap(), Vt = new WeakMap(), rt = new WeakMap(), a(C, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1194
+ k = new WeakMap(), E = new WeakMap(), L = new WeakMap(), st = new WeakMap(), Dt = new WeakMap(), N = new WeakMap(), Yt = new WeakMap(), j = new WeakMap(), vt = new WeakMap(), Vt = new WeakMap(), Xt = new WeakMap(), ot = new WeakMap(), c(C, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1197
1195
  v(C, "ROW_STATE", {
1198
1196
  EMPTY: "EMPTY",
1199
1197
  NORMAL: "NORMAL",
@@ -1201,80 +1199,80 @@ v(C, "ROW_STATE", {
1201
1199
  UPDATE: "UPDATE",
1202
1200
  DELETE: "DELETE"
1203
1201
  });
1204
- let ie = C;
1205
- var G;
1206
- const ue = class ue {
1202
+ let ne = C;
1203
+ var K;
1204
+ const ge = class ge {
1207
1205
  constructor(i) {
1208
- c(this, G);
1209
- b(this, G, i), this.row = new ee(this), this.data = new ie(t(this, G), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1206
+ d(this, K);
1207
+ g(this, K, i), this.row = new ie(this), this.data = new ne(t(this, K), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1210
1208
  var e;
1211
- (e = t(this, G).view) != null && e.redraw && t(this, G).view.redraw();
1209
+ (e = t(this, K).view) != null && e.redraw && t(this, K).view.redraw();
1212
1210
  }, this.setDataSource = (e) => {
1213
1211
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1214
1212
  }, this.getRowState = (e) => {
1215
- var o, r;
1216
- const s = parseInt(e, 10);
1217
- if (!(s >= this.data.count()))
1218
- return (r = (o = this.data.getValidData()[s]) == null ? void 0 : o.__ng) == null ? void 0 : r.rowState;
1213
+ var s, r;
1214
+ const n = parseInt(e, 10);
1215
+ if (!(n >= this.data.count()))
1216
+ return (r = (s = this.data.getValidData()[n]) == null ? void 0 : s.__ng) == null ? void 0 : r.rowState;
1219
1217
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1220
1218
  this.row.at = e;
1221
- }, 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, o) => {
1222
- e = parseInt(e, 10), this.data.setValue(e, s, o);
1219
+ }, 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, n) => this.data.get(e, n), this.setColumn = (e, n, s) => {
1220
+ e = parseInt(e, 10), this.data.setValue(e, n, s);
1223
1221
  }, this.setDataSource([]);
1224
1222
  }
1225
1223
  };
1226
- G = new WeakMap(), a(ue, "ngDataManager");
1227
- let se = ue;
1228
- var lt, A, vt, Xt;
1224
+ K = new WeakMap(), c(ge, "ngDataManager");
1225
+ let se = ge;
1226
+ var rt, A, wt, Ut;
1229
1227
  const be = class be {
1230
1228
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1231
1229
  constructor(i) {
1232
- c(this, lt);
1233
- c(this, A, []);
1234
- v(this, "add", /* @__PURE__ */ a((i, e = "string") => {
1235
- i.forEach((s) => {
1236
- t(this, A).some((o) => o.name === s) || t(this, A).push({ name: s, type: e });
1237
- }), t(this, vt).call(this);
1230
+ d(this, rt);
1231
+ d(this, A, []);
1232
+ v(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1233
+ i.forEach((n) => {
1234
+ t(this, A).some((s) => s.name === n) || t(this, A).push({ name: n, type: e });
1235
+ }), t(this, wt).call(this);
1238
1236
  }, "add"));
1239
- c(this, vt, /* @__PURE__ */ a(() => {
1237
+ d(this, wt, /* @__PURE__ */ c(() => {
1240
1238
  const i = /* @__PURE__ */ new Map();
1241
1239
  t(this, A).forEach((e) => {
1242
1240
  i.set(e.name, e.type);
1243
- }), b(this, A, Array.from(i, ([e, s]) => ({ name: e, type: s }))), b(this, A, t(this, A).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, A).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1241
+ }), g(this, A, Array.from(i, ([e, n]) => ({ name: e, type: n }))), g(this, A, t(this, A).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, A).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
1244
1242
  }, "#adjust"));
1245
- c(this, Xt, /* @__PURE__ */ a(() => {
1246
- b(this, A, []), H.log(t(this, lt).querySelectorAll("table"));
1247
- const i = Array.from(t(this, lt).querySelectorAll("table"));
1243
+ d(this, Ut, /* @__PURE__ */ c(() => {
1244
+ g(this, A, []), lt.log(t(this, rt).querySelectorAll("table"));
1245
+ const i = Array.from(t(this, rt).querySelectorAll("table"));
1248
1246
  if (!(!i || i.length === 0)) {
1249
1247
  for (const e of i)
1250
- H.log(e), $("[data-bind]", e).each((s, o) => {
1251
- const r = o.dataset.bind, n = o.getAttribute("data-type") || "string";
1252
- r && t(this, A).push({ name: r, type: n });
1253
- }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1254
- $(`[${s}]`, e).each((o, r) => {
1255
- var n = r.getAttribute(s);
1256
- if (n.indexOf("data.") < 0) {
1257
- const l = n.search(/[(]/g);
1248
+ lt.log(e), $("[data-bind]", e).each((n, s) => {
1249
+ const r = s.dataset.bind, o = s.getAttribute("data-type") || "string";
1250
+ r && t(this, A).push({ name: r, type: o });
1251
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
1252
+ $(`[${n}]`, e).each((s, r) => {
1253
+ var o = r.getAttribute(n);
1254
+ if (o.indexOf("data.") < 0) {
1255
+ const l = o.search(/[(]/g);
1258
1256
  if (l > 0)
1259
1257
  try {
1260
- n = String(window[n.substring(0, l).trim()]);
1258
+ o = String(window[o.substring(0, l).trim()]);
1261
1259
  } catch {
1262
- n = "";
1260
+ o = "";
1263
1261
  }
1264
1262
  }
1265
- n.split("data.").forEach((l) => {
1263
+ o.split("data.").forEach((l) => {
1266
1264
  if (l.trim() != "") {
1267
- const d = l.search(/[^_A-Za-z0-9]/g);
1268
- let h = "";
1269
- d >= 0 ? h = l.substring(0, d) : n.startsWith("data.") && (h = l.replace("data.", "")), h && t(this, A).push({ name: h, type: "string" });
1265
+ const h = l.search(/[^_A-Za-z0-9]/g);
1266
+ let a = "";
1267
+ h >= 0 ? a = l.substring(0, h) : o.startsWith("data.") && (a = l.replace("data.", "")), a && t(this, A).push({ name: a, type: "string" });
1270
1268
  }
1271
1269
  });
1272
1270
  });
1273
1271
  });
1274
- t(this, vt).call(this);
1272
+ t(this, wt).call(this);
1275
1273
  }
1276
1274
  }, "#init"));
1277
- b(this, lt, i), t(this, Xt).call(this);
1275
+ g(this, rt, i), t(this, Ut).call(this);
1278
1276
  }
1279
1277
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1280
1278
  get() {
@@ -1286,7 +1284,7 @@ const be = class be {
1286
1284
  }
1287
1285
  // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
1288
1286
  getType(i) {
1289
- const e = t(this, A).find((s) => s.name === i);
1287
+ const e = t(this, A).find((n) => n.name === i);
1290
1288
  return e ? e.type : "string";
1291
1289
  }
1292
1290
  indexOf(i) {
@@ -1296,40 +1294,40 @@ const be = class be {
1296
1294
  return t(this, A).some((e) => e.name === i);
1297
1295
  }
1298
1296
  };
1299
- lt = new WeakMap(), A = new WeakMap(), vt = new WeakMap(), Xt = new WeakMap(), a(be, "ngFields");
1300
- let ne = be;
1301
- var J, Ut, Ft;
1302
- const ge = class ge extends HTMLElement {
1297
+ rt = new WeakMap(), A = new WeakMap(), wt = new WeakMap(), Ut = new WeakMap(), c(be, "ngFields");
1298
+ let oe = be;
1299
+ var Z, Ft, jt;
1300
+ const ye = class ye extends HTMLElement {
1303
1301
  constructor() {
1304
1302
  super();
1305
1303
  //#created = false;
1306
- c(this, J);
1307
- c(this, Ut);
1308
- c(this, Ft, /* @__PURE__ */ a(() => {
1309
- this.fields = new ne(this), b(this, Ut, new te(this)), H.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1304
+ d(this, Z);
1305
+ d(this, Ft);
1306
+ d(this, jt, /* @__PURE__ */ c(() => {
1307
+ this.fields = new oe(this), g(this, Ft, new ee(this)), lt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1310
1308
  }, "#init"));
1311
- this.attachShadow({ mode: "open" }), b(this, J, new se(this));
1309
+ this.attachShadow({ mode: "open" }), g(this, Z, new se(this));
1312
1310
  }
1313
1311
  connectedCallback() {
1314
- t(this, Ft).call(this);
1312
+ t(this, jt).call(this);
1315
1313
  }
1316
1314
  disconnectedCallback() {
1317
- H.log("NineTable disconnected.");
1315
+ lt.log("NineTable disconnected.");
1318
1316
  }
1319
1317
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1320
1318
  get data() {
1321
- return t(this, J).data;
1319
+ return t(this, Z).data;
1322
1320
  }
1323
1321
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1324
1322
  get row() {
1325
- return t(this, J).row;
1323
+ return t(this, Z).row;
1326
1324
  }
1327
1325
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1328
1326
  get dataManager() {
1329
- return t(this, J);
1327
+ return t(this, Z);
1330
1328
  }
1331
1329
  };
1332
- J = new WeakMap(), Ut = new WeakMap(), Ft = new WeakMap(), a(ge, "NineTable");
1333
- let oe = ge;
1334
- customElements.get("nine-table") || customElements.define("nine-table", oe);
1330
+ Z = new WeakMap(), Ft = new WeakMap(), jt = new WeakMap(), c(ye, "NineTable");
1331
+ let re = ye;
1332
+ customElements.get("nine-table") || customElements.define("nine-table", re);
1335
1333
  //# sourceMappingURL=nine-table.js.map