@ninebone/table 0.0.436 β†’ 0.0.438

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- var pe = Object.defineProperty;
2
- var me = (x) => {
3
- throw TypeError(x);
1
+ var ye = Object.defineProperty;
2
+ var me = (v) => {
3
+ throw TypeError(v);
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 we = (v, i, e) => i in v ? ye(v, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : v[i] = e;
6
+ var c = (v, i) => ye(v, "name", { value: i, configurable: !0 });
7
+ var x = (v, i, e) => we(v, typeof i != "symbol" ? i + "" : i, e), ve = (v, i, e) => i.has(v) || me("Cannot " + e);
8
+ var t = (v, i, e) => (ve(v, i, "read from private field"), e ? e.call(v) : i.get(v)), d = (v, i, e) => i.has(v) ? me("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(v) : i.set(v, e), g = (v, i, e, n) => (ve(v, i, "write to private field"), n ? n.call(v, e) : i.set(v, e), e);
9
+ var xe = (v, i, e, n) => ({
10
+ set _(s) {
11
+ g(v, i, s, e);
12
12
  },
13
13
  get _() {
14
- return t(x, i, s);
14
+ return t(v, i, n);
15
15
  }
16
16
  });
17
17
  import { trace as Se } from "@ninebone/util";
@@ -20,99 +20,99 @@ const re = class re extends Se.constructor {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- a(re, "Trace");
23
+ c(re, "Trace");
24
24
  let jt = re;
25
- const H = new jt();
26
- var _, z, m, Y, V, X, St, U, Et;
25
+ const lt = new jt();
26
+ var M, W, y, P, D, B, Et, Y, Rt;
27
27
  const le = class le 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, y);
33
+ d(this, P);
34
+ d(this, D);
35
+ d(this, B);
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, B, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, X).observe(e));
41
+ })), t(this, B).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
+ x(this, "refresh", /* @__PURE__ */ c(() => {
44
+ if (!t(this, M) || !t(this, y) || t(this, W)) return;
45
+ const e = t(this, y).container, n = e.querySelector("table");
46
+ if (!n) return;
47
+ const s = t(this, y).track, r = t(this, y).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;
58
+ const u = e.scrollLeft, b = h - l;
59
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;
60
+ b > 0 && (p = parseInt(u / b * (a - f), 10)), p < 0 && (p = 0);
61
+ const m = a - f;
62
+ p > m && (p = m), r.style.left = `${p}px`, lt.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= 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, y)) return !1;
66
+ const n = t(this, y).container, s = n.querySelector("table");
67
+ if (!s) return !1;
68
+ const r = t(this, y).track.getBoundingClientRect(), o = t(this, y).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, y).thumb.style.left = `${l}px`, t(this, y).left.disabled = l === 0, t(this, y).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, P)), clearInterval(t(this, D));
79
+ const r = parseInt(t(this, y).thumb.style.left || 0, 10);
80
+ t(this, Y).call(this, r + s), g(this, P, setInterval(() => {
81
+ clearInterval(t(this, P)), g(this, D, setInterval(() => {
82
+ const o = parseInt(t(this, y).thumb.style.left || 0, 10);
83
+ t(this, Y).call(this, o + s) || clearInterval(t(this, D));
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, P)), clearInterval(t(this, D));
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, y).left.addEventListener(s, n), t(this, y).right.addEventListener(s, n), t(this, y).track.addEventListener(s, n);
91
+ }), t(this, y).left.addEventListener("mousedown", (s) => {
92
+ s.button === 0 && e(-20);
93
+ }), t(this, y).right.addEventListener("mousedown", (s) => {
94
+ s.button === 0 && e(20);
95
+ }), t(this, y).left.addEventListener("touchstart", () => e(-20)), t(this, y).right.addEventListener("touchstart", () => e(20)), t(this, y).track.addEventListener("mousedown", (s) => {
96
+ if (s.button !== 0) return;
97
+ s.preventDefault();
98
+ const r = t(this, y).track.getBoundingClientRect(), o = t(this, y).thumb.clientWidth;
99
+ t(this, Y).call(this, s.clientX - r.left - o / 2);
100
+ }), t(this, y).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, y).thumb.getBoundingClientRect().left;
103
+ const r = /* @__PURE__ */ c((l) => {
104
+ if (!t(this, W)) return;
105
+ const h = t(this, y).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, y, {
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, B) && t(this, B).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");
201
+ M = new WeakMap(), W = new WeakMap(), y = new WeakMap(), P = new WeakMap(), D = new WeakMap(), B = new WeakMap(), Et = new WeakMap(), Y = new WeakMap(), Rt = new WeakMap(), c(le, "NineTableHScrollBar");
202
202
  let Kt = le;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Kt);
204
- var F, Q, N, E, ct, ht, Rt;
204
+ var O, J, V, w, ht, dt, At;
205
205
  const ae = class ae 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, w);
212
+ d(this, ht, 0);
213
+ d(this, dt, 0);
214
+ x(this, "refresh", /* @__PURE__ */ c(() => {
215
+ if (!t(this, O) || !t(this, w)) return;
216
+ const e = t(this, w).container, n = t(this, w).track, s = t(this, w).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, w).top.disabled = !0, t(this, w).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, p = Math.max(a - r, 1);
227
+ let m = 0;
228
+ p > 0 && (m = b / p * (f - u));
229
+ const R = f - u;
230
+ m < 0 && (m = 0), m > R && (m = R), s.style.top = `${m}px`, t(this, w).top.disabled = b <= 0, t(this, w).bottom.disabled = b >= p - 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, w).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, w).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, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientHeight, u = h.height - a, b = l.clientY - t(this, ht), p = e.clientHeight, m = n(), R = Math.max(m - p, 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 - p);
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, w).track.addEventListener("mousedown", (s) => {
257
+ if (s.button !== 0 || s.target === t(this, w).thumb) return;
258
+ const r = t(this, w).track.getBoundingClientRect(), o = t(this, w).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 p = Math.max(0, Math.min(1, l / a));
261
+ e.scrollTop = p * b;
265
262
  }
266
263
  this.refresh();
267
- }), t(this, E).top.addEventListener("click", () => {
264
+ }), t(this, w).top.addEventListener("click", () => {
268
265
  e.scrollTop -= 40;
269
- }), t(this, E).bottom.addEventListener("click", () => {
266
+ }), t(this, w).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,365 @@ 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, w, {
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");
353
+ O = new WeakMap(), J = new WeakMap(), V = new WeakMap(), w = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), At = new WeakMap(), c(ae, "NineTableVScrollBar");
358
354
  let Zt = ae;
359
355
  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;
356
+ var I, S, _, q, z, X, ft, Q, qt, Tt, kt, ut, gt, Lt, Ct, bt, Ht, tt, pt;
432
357
  const ce = class ce {
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, S);
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
+ x(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, S).querySelector(".ng-container-body .ng-part-body");
371
+ i && (t(this, ut).call(this), t(this, tt).call(this, i.scrollTop), (e = t(this, S).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
+ x(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, S).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, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), n = t(this, S).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, S).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, S), 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, S).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, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), n = t(this, S).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
+ ], p = Math.max(...b);
457
+ p > 0 && (s[u] && (s[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), o[u] && (o[u].style.height = `${p}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, S) || !(t(this, S) 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, S)));
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
- const e = t(this, w).querySelector(i);
558
- e && e.querySelector("tbody.bindable-tbody") && t(this, Tt).call(this, e, i);
478
+ const e = t(this, S).querySelector(i);
479
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Tt).call(this, e, i);
559
480
  }), 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, S).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 p = t(this, I).data.get(b);
497
+ f.style.display = "", t(this, pt).call(this, f, p, 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, S).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) {
598
- y.style.display = "none";
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((p, m) => {
512
+ const R = r + Math.floor(m / l);
513
+ if (R >= s) {
514
+ p.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
+ p.style.display = "", t(this, pt).call(this, p, 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, pt, /* @__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
+ x(this, "destroy", /* @__PURE__ */ c(() => {
531
+ t(this, z) && (t(this, z).disconnect(), g(this, z, null));
616
532
  }, "destroy"));
617
- b(this, I, i.getRootNode().host), b(this, w, i), t(this, Ct).call(this);
533
+ g(this, I, i.getRootNode().host), g(this, S, i), t(this, Ct).call(this);
618
534
  }
619
535
  getRowHeight() {
620
536
  return t(this, q);
621
537
  }
622
538
  templateLength(i = ".ng-container-body") {
623
539
  var e;
624
- return ((e = t(this, W).get(i)) == null ? void 0 : e.length) || 1;
540
+ return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
541
+ }
542
+ };
543
+ I = new WeakMap(), S = 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(), pt = new WeakMap(), c(ce, "RowManager");
544
+ let Gt = ce;
545
+ var Mt, et;
546
+ const H = class H {
547
+ /**
548
+ * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
549
+ */
550
+ static compileAll(i) {
551
+ return Array.isArray(i) ? i.map((e) => H.compile(e)) : [];
552
+ }
553
+ /**
554
+ * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
555
+ */
556
+ static compile(i) {
557
+ var s, r, o, l;
558
+ if (!i) return null;
559
+ const e = i.cloneNode(!0);
560
+ return t(s = H, Mt).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) => {
561
+ const f = h.getAttribute("fixed");
562
+ f && e.querySelectorAll(`thead [data-col="${a}"], tbody [data-col="${a}"], tfoot [data-col="${a}"]`).forEach((u) => {
563
+ u.setAttribute("fixed", f);
564
+ });
565
+ }), e;
625
566
  }
626
567
  };
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 {
568
+ Mt = new WeakMap(), et = new WeakMap(), c(H, "TableCompiler"), d(H, Mt, /* @__PURE__ */ c((i) => {
569
+ if (!i.querySelector("colgroup")) {
570
+ 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);
571
+ for (let o = 0; o < n; o++) {
572
+ const l = document.createElement("col");
573
+ l.setAttribute("width", r), s.appendChild(l);
574
+ }
575
+ i.prepend(s);
576
+ }
577
+ if (!i.querySelector("thead")) {
578
+ const e = document.createElement("thead"), n = i.querySelector("colgroup");
579
+ n ? n.after(e) : i.prepend(e);
580
+ }
581
+ i.classList.add("nine-table-element"), i.style.display = "table";
582
+ }, "#ensureTableStructure")), d(H, et, /* @__PURE__ */ c((i, e) => {
583
+ const n = Array.from(i.querySelectorAll(e + " tr")), s = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = n.length;
584
+ if (r === 0 || s.length === 0) return;
585
+ let o = 0;
586
+ s.forEach((h) => {
587
+ o += h.colSpan || 1;
588
+ });
589
+ const l = Array.from(Array(r), () => Array(o).fill(null));
590
+ n.forEach((h) => {
591
+ const a = h.sectionRowIndex;
592
+ let f = 0;
593
+ Array.from(h.querySelectorAll("th,td")).forEach((u) => {
594
+ for (let m = 0; m < l[a].length; m++)
595
+ if (l[a][m] === null) {
596
+ f = m;
597
+ break;
598
+ }
599
+ const b = u.rowSpan || 1, p = u.colSpan || 1;
600
+ for (let m = 0; m < b; m++)
601
+ for (let R = 0; R < p; R++)
602
+ a + m < r && f + R < o && (l[a + m][f + R] = m === 0 && R === 0 ? "1" : "0");
603
+ });
604
+ }), n.forEach((h) => {
605
+ const a = h.sectionRowIndex;
606
+ Array.from(h.querySelectorAll("th,td")).forEach((f) => {
607
+ for (let u = 0; u < l[a].length; u++)
608
+ if (l[a][u] === "1") {
609
+ f.dataset.col = u, l[a][u] = "0";
610
+ break;
611
+ }
612
+ });
613
+ });
614
+ }, "#resetColIndex"));
615
+ let Jt = H;
616
+ var _t, U, F, It, $t, it, Wt, Ot;
617
+ const ct = class ct extends HTMLElement {
631
618
  constructor() {
632
619
  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();
620
+ d(this, _t);
621
+ d(this, U, null);
622
+ d(this, F);
623
+ x(this, "invalidate", /* @__PURE__ */ c(() => {
624
+ var e, n;
625
+ t(this, F).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (n = this.querySelector("nine-table-vscrollbar")) == null || n.refresh();
639
626
  }, "invalidate"));
640
- c(this, _t, /* @__PURE__ */ a(() => {
627
+ d(this, It, /* @__PURE__ */ c(() => {
641
628
  [
642
629
  { selector: ".ng-container-body", type: null },
643
630
  { selector: ".ng-container-left", type: "left" },
644
631
  { selector: ".ng-container-right", type: "right" }
645
- ].forEach(({ selector: s, type: o }) => {
646
- const r = this.querySelector(s);
632
+ ].forEach(({ selector: n, type: s }) => {
633
+ const r = this.querySelector(n);
647
634
  if (!r) return;
648
- const n = t(this, $t).call(this, t(this, st), o);
649
635
  r.innerHTML = "";
636
+ const o = document.createElement("div");
637
+ o.className = "ng-part-header", o.appendChild(t(this, it).call(this, t(this, U), s, "header"));
650
638
  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);
639
+ l.className = "ng-part-body";
640
+ const h = document.createElement("div");
641
+ 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"));
642
+ const a = document.createElement("div");
643
+ a.className = "ng-virtual-spacer", a.style.width = "100%", a.style.pointerEvents = "none", h.appendChild(a), l.appendChild(h);
644
+ const f = document.createElement("div");
645
+ 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
646
  });
655
647
  }, "#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;
648
+ d(this, $t, /* @__PURE__ */ c(() => {
649
+ ["left", "right", "body"].forEach((e) => {
650
+ const n = this.querySelector(`.ng-container-${e}`), s = n == null ? void 0 : n.querySelectorAll("table");
651
+ if (!n || !s || s.length === 0) return;
660
652
  let r = 0;
661
- o.querySelectorAll("col").forEach((n) => {
662
- const l = parseInt(n.getAttribute("width"), 10);
653
+ s[0].querySelectorAll("col").forEach((o) => {
654
+ const l = parseInt(o.getAttribute("width"), 10);
663
655
  isNaN(r) || (r += l);
664
- }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
656
+ }), e === "body" ? n.style.flex = "1" : (n.style.flex = `0 0 ${r}px`, n.style.width = `${r}px`);
665
657
  });
666
658
  }, "#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();
659
+ x(this, "generate", /* @__PURE__ */ c((e) => {
660
+ e && (g(this, U, Jt.compile(e)), t(this, It).call(this), t(this, $t).call(this), t(this, F).initialize(), setTimeout(() => {
661
+ var n;
662
+ (n = this.querySelector("nine-table-hscrollbar")) == null || n.refresh();
677
663
  }, 0));
678
664
  }, "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;
665
+ d(this, it, /* @__PURE__ */ c((e, n, s) => {
666
+ const r = e.cloneNode(!0), o = r.querySelector("thead"), l = r.querySelector("tbody"), h = r.querySelector("tfoot");
667
+ if (s === "header") {
668
+ if (l && l.remove(), h && h.remove(), e.querySelector("tbody")) {
669
+ const f = document.createElement("tbody");
670
+ f.className = "fixed-tbody", r.appendChild(f);
671
+ }
672
+ } else s === "body" ? (o && o.remove(), h && h.remove(), l && (l.className = "bindable-tbody")) : s === "footer" && (o && o.remove(), l && l.remove());
673
+ return n === "left" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
674
+ a.getAttribute("fixed") !== "left" && a.remove();
675
+ }) : n === "right" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
676
+ a.getAttribute("fixed") !== "right" && a.remove();
677
+ }) : r.querySelectorAll("[fixed=left], [fixed=right]").forEach((a) => {
678
+ a.remove();
679
+ }), r;
692
680
  }, "#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);
681
+ x(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, F).getRowHeight(), "getRowHeight"));
682
+ x(this, "scrollToX", /* @__PURE__ */ c((e) => {
683
+ const n = this.querySelector(".ng-container-body .ng-part-body");
684
+ n && (n.scrollLeft = e);
697
685
  }, "scrollToX"));
698
- v(this, "scrollToY", /* @__PURE__ */ a((e) => {
699
- const s = this.querySelector(".ng-container-body");
700
- s && (s.scrollTop = e);
686
+ x(this, "scrollToY", /* @__PURE__ */ c((e) => {
687
+ const n = this.querySelector(".ng-container-body .ng-part-body");
688
+ n && (n.scrollTop = e);
701
689
  }, "scrollToY"));
702
- c(this, Wt, /* @__PURE__ */ a(() => {
690
+ d(this, Wt, /* @__PURE__ */ c(() => {
703
691
  t(this, Ot).call(this);
704
692
  }, "#init"));
705
- c(this, Ot, /* @__PURE__ */ a(() => {
706
- const e = at.SCROLLBAR_SIZE;
693
+ d(this, Ot, /* @__PURE__ */ c(() => {
694
+ const e = ct.SCROLLBAR_SIZE;
707
695
  this.innerHTML = `
708
696
  <style>
709
697
  nine-table-sheet {
@@ -730,51 +718,56 @@ const at = class at extends HTMLElement {
730
718
  overflow: hidden;
731
719
  position: relative;
732
720
  }
733
-
734
- nine-table-sheet .ng-container-left {
721
+
722
+ /* 9λΆ„ν•  μ—΄ μ»¨ν…Œμ΄λ„ˆ 곡톡 μŠ€νƒ€μΌ */
723
+ nine-table-sheet .ng-container-left,
724
+ nine-table-sheet .ng-container-body,
725
+ nine-table-sheet .ng-container-right {
735
726
  display: flex;
736
727
  flex-direction: column;
737
- overflow-y: auto;
738
- overflow-x: hidden;
728
+ height: 100%;
739
729
  background: #ffffff;
730
+ position: relative;
731
+ overflow: hidden;
732
+ }
733
+
734
+ nine-table-sheet .ng-container-left {
740
735
  border-right: 1px solid #e5e7eb;
741
736
  flex-shrink: 0;
742
- scrollbar-width: none;
743
- &::-webkit-scrollbar { display: none; }
744
737
  }
745
738
 
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;
739
+ nine-table-sheet .ng-container-body {
740
+ flex: 1;
754
741
  }
755
742
 
756
- nine-table-sheet .ng-container-body {
757
- display: flex;
758
- flex-direction: column;
743
+ nine-table-sheet .ng-container-right {
744
+ border-left: 1px solid #e5e7eb;
745
+ flex-shrink: 0;
746
+ }
747
+
748
+ /* 9λΆ„ν•  3단 λ ˆμ΄μ–΄ (Header / Body / Footer) */
749
+ nine-table-sheet .ng-part-header {
750
+ flex-shrink: 0;
751
+ overflow: hidden;
752
+ background: #f9fafb;
753
+ z-index: 3;
754
+ }
755
+
756
+ nine-table-sheet .ng-part-body {
759
757
  flex: 1;
760
758
  overflow-y: auto;
761
759
  overflow-x: auto;
762
- background: #ffffff;
763
760
  position: relative;
764
761
  scrollbar-width: none;
765
762
  &::-webkit-scrollbar { display: none; height: 0px; }
766
763
  }
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;
764
+
765
+ nine-table-sheet .ng-part-footer {
775
766
  flex-shrink: 0;
776
- scrollbar-width: none;
777
- &::-webkit-scrollbar { display: none; }
767
+ overflow: hidden;
768
+ background: #f9fafb;
769
+ border-top: 2px solid #d1d5db;
770
+ z-index: 2;
778
771
  }
779
772
 
780
773
  nine-table-sheet .ng-container-bottom {
@@ -818,17 +811,8 @@ const at = class at extends HTMLElement {
818
811
  text-align: left;
819
812
  }
820
813
 
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
814
  nine-table-sheet tfoot td, nine-table-sheet tfoot th {
830
815
  font-weight: 600;
831
- border-top: 2px solid #d1d5db;
832
816
  }
833
817
 
834
818
  nine-splitter {
@@ -848,91 +832,91 @@ const at = class at extends HTMLElement {
848
832
  </div>
849
833
  `;
850
834
  }, "#render"));
851
- b(this, K, new Jt(this)), b(this, Mt, this.getRootNode().host);
835
+ g(this, F, new Gt(this)), g(this, _t, this.getRootNode().host);
852
836
  }
853
837
  connectedCallback() {
854
838
  t(this, Wt).call(this);
855
839
  }
856
840
  disconnectedCallback() {
857
- this.innerHTML = "", H.log("NineTableSheet destroyed.");
841
+ this.innerHTML = "", lt.log("NineTableSheet destroyed.");
858
842
  }
859
843
  };
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);
844
+ _t = new WeakMap(), U = new WeakMap(), F = new WeakMap(), It = new WeakMap(), $t = new WeakMap(), it = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), c(ct, "NineTableSheet"), x(ct, "SCROLLBAR_SIZE", 16);
845
+ let St = ct;
846
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", St);
863
847
  var zt, yt;
864
848
  const he = class he extends HTMLElement {
865
849
  constructor() {
866
850
  super();
867
- c(this, zt, /* @__PURE__ */ a(() => {
851
+ d(this, zt, /* @__PURE__ */ c(() => {
868
852
  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);
853
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
854
+ var o;
855
+ const s = n.ctrlKey || n.metaKey || n.shiftKey, r = parseInt((o = n.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
856
+ t(this, yt).call(this, r, s);
873
857
  }), t(this, yt).call(this, 0, !1);
874
858
  }, "#init"));
875
- c(this, yt, /* @__PURE__ */ a((e, s = !1) => {
876
- const o = /* @__PURE__ */ a(() => {
859
+ d(this, yt, /* @__PURE__ */ c((e, n = !1) => {
860
+ const s = /* @__PURE__ */ c(() => {
877
861
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
878
862
  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");
863
+ const b = f.filter((p) => p.classList.contains("active"));
864
+ b.length < 2 || b.forEach((p) => {
865
+ const m = parseInt(p.getAttribute("data-index"), 10), R = this.querySelector(`nine-splitter[data-split-index="${m}"]`), G = f[m + 1];
866
+ R && G && G.classList.contains("active") && R.style.setProperty("display", "flex");
883
867
  });
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");
868
+ }, "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
869
  if (!l[e]) return;
886
- if (!s)
870
+ if (!n)
887
871
  l.forEach((f, u) => {
888
872
  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%" : "";
873
+ }), h.forEach((f, u) => {
874
+ const b = u === e;
875
+ f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
892
876
  });
893
877
  else {
894
878
  const f = l[e], u = r.querySelectorAll(".nine-tab-item.active");
895
879
  if (f.classList.contains("active") && u.length <= 1)
896
880
  return;
897
881
  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 = ""));
882
+ const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
883
+ b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
900
884
  }
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();
885
+ const a = o.querySelectorAll("nine-table-sheet.active");
886
+ a == null || a.forEach((f) => {
887
+ f.style.flex = a.length > 1 ? "1 1 0%" : "1 1 100%";
888
+ }), s();
905
889
  }, "#switchSheet"));
906
890
  }
907
891
  connectedCallback() {
908
892
  t(this, zt).call(this);
909
893
  }
910
894
  };
911
- zt = new WeakMap(), yt = new WeakMap(), a(he, "NineTableSheets");
895
+ zt = new WeakMap(), yt = new WeakMap(), c(he, "NineTableSheets");
912
896
  let Qt = he;
913
897
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Qt);
914
- var T, Nt, pt, Bt;
898
+ var T, Nt, mt, Pt;
915
899
  const de = class de {
916
900
  constructor(i) {
917
- c(this, T);
918
- c(this, Nt, /* @__PURE__ */ a(() => {
919
- t(this, Bt).call(this), new ResizeObserver((i) => {
901
+ d(this, T);
902
+ d(this, Nt, /* @__PURE__ */ c(() => {
903
+ t(this, Pt).call(this), new ResizeObserver((i) => {
920
904
  for (let e of i)
921
- t(this, T).getAttribute("auto-height") === "true" && t(this, pt).call(this);
905
+ t(this, T).getAttribute("auto-height") === "true" && t(this, mt).call(this);
922
906
  }).observe(t(this, T));
923
907
  }, "#init"));
924
- c(this, pt, /* @__PURE__ */ a(() => {
925
- var d, h;
908
+ d(this, mt, /* @__PURE__ */ c(() => {
909
+ var h, a;
926
910
  const i = Array.from(t(this, T).shadowRoot.querySelectorAll("nine-table-sheet.active"));
927
911
  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;
912
+ 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
913
  t(this, T).style.height = `${l}px`;
930
914
  }, "#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("");
915
+ d(this, Pt, /* @__PURE__ */ c(() => {
916
+ 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) => {
917
+ 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>` : "";
918
+ return u + b;
919
+ }).join(""), o = e.map((h, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
936
920
  t(this, T).shadowRoot.innerHTML = `
937
921
  <style>
938
922
  :host {
@@ -940,7 +924,7 @@ const de = class de {
940
924
  flex-direction: column;
941
925
  position: relative;
942
926
  overflow: hidden;
943
- height: ${s ? "auto" : "100%"};
927
+ height: ${n ? "auto" : "100%"};
944
928
  background: #fff;
945
929
  }
946
930
 
@@ -1016,7 +1000,7 @@ const de = class de {
1016
1000
  <nine-table-sheets>
1017
1001
  <nine-table-sheets-body>${r}</nine-table-sheets-body>
1018
1002
  <nine-table-sheets-footer>
1019
- <div class="nine-tab-bar">${n}</div>
1003
+ <div class="nine-tab-bar">${o}</div>
1020
1004
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1021
1005
  </nine-table-sheets-footer>
1022
1006
  </nine-table-sheets>
@@ -1025,166 +1009,166 @@ const de = class de {
1025
1009
  <nine-table-footer></nine-table-footer>
1026
1010
  `;
1027
1011
  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);
1012
+ l == null || l.forEach((h, a) => {
1013
+ e[a] && setTimeout(() => {
1014
+ h.generate(e[a]), n && t(this, mt).call(this);
1031
1015
  });
1032
1016
  });
1033
1017
  }, "#render"));
1034
- b(this, T, i), t(this, Nt).call(this);
1018
+ g(this, T, i), t(this, Nt).call(this);
1035
1019
  }
1036
1020
  };
1037
- T = new WeakMap(), Nt = new WeakMap(), pt = new WeakMap(), Bt = new WeakMap(), a(de, "LayoutManager");
1021
+ T = new WeakMap(), Nt = new WeakMap(), mt = new WeakMap(), Pt = new WeakMap(), c(de, "LayoutManager");
1038
1022
  let te = de;
1039
- var mt, nt;
1023
+ var vt, nt;
1040
1024
  const fe = class fe {
1041
1025
  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);
1026
+ d(this, vt);
1027
+ d(this, nt, -1);
1028
+ x(this, "count", /* @__PURE__ */ c(() => t(this, vt).rawRecords.length, "count"));
1029
+ g(this, vt, i);
1046
1030
  }
1047
1031
  get at() {
1048
1032
  return t(this, nt);
1049
1033
  }
1050
1034
  set at(i) {
1051
- b(this, nt, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, nt)}"]`) && setTimeout(() => {
1035
+ g(this, nt, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, nt)}"]`) && setTimeout(() => {
1052
1036
  });
1053
1037
  }
1054
1038
  };
1055
- mt = new WeakMap(), nt = new WeakMap(), a(fe, "ngRow");
1039
+ vt = new WeakMap(), nt = new WeakMap(), c(fe, "ngRow");
1056
1040
  let ee = fe;
1057
- var k, R, L, ot, Dt, D, Pt, Z, xt, Yt, Vt, rt;
1041
+ var k, E, L, st, Dt, N, Bt, j, xt, Yt, Vt, ot;
1058
1042
  const C = class C {
1059
1043
  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, []);
1044
+ d(this, k);
1045
+ d(this, E);
1046
+ d(this, L, []);
1047
+ d(this, st, []);
1048
+ d(this, Dt, 0);
1049
+ d(this, N, []);
1050
+ d(this, Bt, /* @__PURE__ */ c(() => {
1051
+ g(this, N, []);
1068
1052
  const i = t(this, k).template || [];
1069
1053
  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();
1054
+ var n;
1055
+ t(this, N).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1056
+ }), (t(this, E).rawRecords || []).forEach((e) => {
1057
+ e.__ng || (e.__ng = t(this, xt).call(this)), e.__ng.height = t(this, N).slice();
1074
1058
  });
1075
1059
  }, "#initialize"));
1076
- c(this, Z, /* @__PURE__ */ a(() => {
1060
+ d(this, j, /* @__PURE__ */ c(() => {
1077
1061
  t(this, k).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1078
1062
  i.invalidate();
1079
1063
  });
1080
1064
  }, "#invalidate"));
1081
- v(this, "get", /* @__PURE__ */ a((i, e) => {
1065
+ x(this, "get", /* @__PURE__ */ c((i, e) => {
1082
1066
  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() : [];
1067
+ const n = this.getValidData();
1068
+ if (!n || n.length <= 0) return;
1069
+ if (i == null) return t(this, ot).call(this, n);
1070
+ if (i < 0 || i >= n.length) return null;
1071
+ const s = typeof ((r = t(this, k).fields) == null ? void 0 : r.get) == "function" ? t(this, k).fields.get() : [];
1088
1072
  if (e != null) {
1089
- const n = o.indexOf(e);
1090
- return n >= 0 ? s[i].v[n] : null;
1073
+ const o = s.indexOf(e);
1074
+ return o >= 0 ? n[i].v[o] : null;
1091
1075
  }
1092
- return t(this, rt).call(this, s[i]);
1076
+ return t(this, ot).call(this, n[i]);
1093
1077
  }, "get"));
1094
- v(this, "set", /* @__PURE__ */ a((i) => {
1095
- this.clear(), this.add(i, !1), t(this, Z).call(this);
1078
+ x(this, "set", /* @__PURE__ */ c((i) => {
1079
+ this.clear(), this.add(i, !1), t(this, j).call(this);
1096
1080
  }, "set"));
1097
- c(this, xt, /* @__PURE__ */ a(() => ({
1081
+ d(this, xt, /* @__PURE__ */ c(() => ({
1098
1082
  rowState: C.ROW_STATE.EMPTY,
1099
1083
  deleted: !1,
1100
1084
  filtered: !1,
1101
- height: t(this, D).slice(),
1085
+ height: t(this, N).slice(),
1102
1086
  o: {},
1103
1087
  c: {},
1104
- _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, D).slice(), -1, {}, {}]
1088
+ _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, N).slice(), -1, {}, {}]
1105
1089
  }), "#getDefaultMeta"));
1106
- v(this, "reset", /* @__PURE__ */ a(() => {
1107
- b(this, L, []), b(this, ot, []), t(this, Z).call(this);
1090
+ x(this, "reset", /* @__PURE__ */ c(() => {
1091
+ g(this, L, []), g(this, st, []), t(this, j).call(this);
1108
1092
  }, "reset"));
1109
- v(this, "clear", /* @__PURE__ */ a(() => {
1093
+ x(this, "clear", /* @__PURE__ */ c(() => {
1110
1094
  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();
1095
+ t(this, E).rawRecords = [], g(this, L, []), g(this, st, []), (i = t(this, E).viewRecords) != null && i.reset && t(this, E).viewRecords.reset();
1112
1096
  }, "clear"));
1113
- c(this, Yt, /* @__PURE__ */ a((i) => {
1114
- var o;
1097
+ d(this, Yt, /* @__PURE__ */ c((i) => {
1098
+ var s;
1115
1099
  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 = [];
1100
+ 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
1101
  return i.forEach((r) => {
1118
- const n = { v: [] };
1102
+ const o = { v: [] };
1119
1103
  e.forEach((l) => {
1120
- n.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1121
- }), s.push(n);
1122
- }), s;
1104
+ o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1105
+ }), n.push(o);
1106
+ }), n;
1123
1107
  }, "#json2Array"));
1124
- c(this, Vt, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1108
+ d(this, Vt, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1125
1109
  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;
1126
1110
  }), i), "#defaultInsert"));
1127
- v(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1111
+ x(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1128
1112
  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];
1113
+ const n = t(this, Yt).call(this, i);
1114
+ t(this, E).rawRecords = t(this, E).rawRecords.concat(t(this, Vt).call(this, n)), this.resetRecords();
1115
+ const s = this.count() - 1;
1116
+ return e || n.forEach((r, o) => {
1117
+ const l = t(this, E).rawRecords[s - o];
1134
1118
  l && (l.__ng.rowState = C.ROW_STATE.EMPTY);
1135
- }), t(this, Z).call(this), o;
1119
+ }), t(this, j).call(this), s;
1136
1120
  }, "add"));
1137
- v(this, "delete", /* @__PURE__ */ a((i) => {
1121
+ x(this, "delete", /* @__PURE__ */ c((i) => {
1138
1122
  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);
1123
+ 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) => {
1124
+ if (t(this, L)[n]) {
1125
+ const s = t(this, L)[n].__ng.rowid;
1126
+ 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) => {
1127
+ r.__ng.rowid === s && (r.__ng.deleted = !0, r.__ng.rowState = C.ROW_STATE.DELETE);
1144
1128
  });
1145
1129
  }
1146
- }), this.resetRecords(), t(this, Z).call(this);
1130
+ }), this.resetRecords(), t(this, j).call(this);
1147
1131
  }, "delete"));
1148
- v(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
1149
- var d;
1132
+ x(this, "setValue", /* @__PURE__ */ c((i, e, n) => {
1133
+ var h;
1150
1134
  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);
1135
+ const r = (typeof ((h = t(this, k).fields) == null ? void 0 : h.get) == "function" ? t(this, k).fields.get() : []).indexOf(e);
1152
1136
  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;
1137
+ const o = this.getValidData()[i];
1138
+ if (!o) return;
1139
+ const l = o.v[r];
1140
+ 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
1141
  }, "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) => {
1142
+ x(this, "resetRecords", /* @__PURE__ */ c(() => {
1143
+ 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
1144
  i.__ng.rowidx = e;
1161
1145
  }), t(this, L).forEach((i, e) => {
1162
1146
  i.__ng.i = e;
1163
1147
  });
1164
1148
  }, "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;
1149
+ x(this, "getValidData", /* @__PURE__ */ c(() => (t(this, L).length === 0 && t(this, E).rawRecords.length > 0 && this.resetRecords(), t(this, L)), "getValidData"));
1150
+ d(this, ot, /* @__PURE__ */ c((i) => {
1151
+ var o;
1168
1152
  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;
1153
+ 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) => {
1154
+ const h = {};
1155
+ return s.forEach((a, f) => {
1156
+ h[a] = l.v ? l.v[f] : l[a];
1157
+ }), h.__ng = l.__ng, h;
1174
1158
  });
1175
1159
  return e ? r[0] : r;
1176
1160
  }, "#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);
1161
+ x(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1162
+ g(this, k, i), g(this, E, e), t(this, Bt).call(this);
1179
1163
  }
1180
1164
  get source() {
1181
- return t(this, rt).call(this, t(this, R).rawRecords);
1165
+ return t(this, ot).call(this, t(this, E).rawRecords);
1182
1166
  }
1183
1167
  set source(i) {
1184
1168
  this.clear(), this.add(i, !1);
1185
1169
  }
1186
1170
  get nextId() {
1187
- return ++ve(this, Dt)._;
1171
+ return ++xe(this, Dt)._;
1188
1172
  }
1189
1173
  get length() {
1190
1174
  return t(this, L).length;
@@ -1193,8 +1177,8 @@ const C = class C {
1193
1177
  return this.length;
1194
1178
  }
1195
1179
  };
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"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1197
- v(C, "ROW_STATE", {
1180
+ k = new WeakMap(), E = new WeakMap(), L = new WeakMap(), st = new WeakMap(), Dt = new WeakMap(), N = new WeakMap(), Bt = new WeakMap(), j = new WeakMap(), xt = new WeakMap(), Yt = new WeakMap(), Vt = new WeakMap(), ot = new WeakMap(), c(C, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1181
+ x(C, "ROW_STATE", {
1198
1182
  EMPTY: "EMPTY",
1199
1183
  NORMAL: "NORMAL",
1200
1184
  INSERT: "INSERT",
@@ -1202,79 +1186,79 @@ v(C, "ROW_STATE", {
1202
1186
  DELETE: "DELETE"
1203
1187
  });
1204
1188
  let ie = C;
1205
- var G;
1189
+ var K;
1206
1190
  const ue = class ue {
1207
1191
  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 = () => {
1192
+ d(this, K);
1193
+ g(this, K, i), this.row = new ee(this), this.data = new ie(t(this, K), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1210
1194
  var e;
1211
- (e = t(this, G).view) != null && e.redraw && t(this, G).view.redraw();
1195
+ (e = t(this, K).view) != null && e.redraw && t(this, K).view.redraw();
1212
1196
  }, this.setDataSource = (e) => {
1213
1197
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1214
1198
  }, 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;
1199
+ var s, r;
1200
+ const n = parseInt(e, 10);
1201
+ if (!(n >= this.data.count()))
1202
+ return (r = (s = this.data.getValidData()[n]) == null ? void 0 : s.__ng) == null ? void 0 : r.rowState;
1219
1203
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1220
1204
  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);
1205
+ }, 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) => {
1206
+ e = parseInt(e, 10), this.data.setValue(e, n, s);
1223
1207
  }, this.setDataSource([]);
1224
1208
  }
1225
1209
  };
1226
- G = new WeakMap(), a(ue, "ngDataManager");
1227
- let se = ue;
1228
- var lt, A, vt, Xt;
1229
- const be = class be {
1210
+ K = new WeakMap(), c(ue, "ngDataManager");
1211
+ let ne = ue;
1212
+ var rt, A, wt, Xt;
1213
+ const ge = class ge {
1230
1214
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1231
1215
  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);
1216
+ d(this, rt);
1217
+ d(this, A, []);
1218
+ x(this, "add", /* @__PURE__ */ c((i, e = "string") => {
1219
+ i.forEach((n) => {
1220
+ t(this, A).some((s) => s.name === n) || t(this, A).push({ name: n, type: e });
1221
+ }), t(this, wt).call(this);
1238
1222
  }, "add"));
1239
- c(this, vt, /* @__PURE__ */ a(() => {
1223
+ d(this, wt, /* @__PURE__ */ c(() => {
1240
1224
  const i = /* @__PURE__ */ new Map();
1241
1225
  t(this, A).forEach((e) => {
1242
1226
  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);
1227
+ }), 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
1228
  }, "#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"));
1229
+ d(this, Xt, /* @__PURE__ */ c(() => {
1230
+ g(this, A, []), lt.log(t(this, rt).querySelectorAll("table"));
1231
+ const i = Array.from(t(this, rt).querySelectorAll("table"));
1248
1232
  if (!(!i || i.length === 0)) {
1249
1233
  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);
1234
+ lt.log(e), $("[data-bind]", e).each((n, s) => {
1235
+ const r = s.dataset.bind, o = s.getAttribute("data-type") || "string";
1236
+ r && t(this, A).push({ name: r, type: o });
1237
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
1238
+ $(`[${n}]`, e).each((s, r) => {
1239
+ var o = r.getAttribute(n);
1240
+ if (o.indexOf("data.") < 0) {
1241
+ const l = o.search(/[(]/g);
1258
1242
  if (l > 0)
1259
1243
  try {
1260
- n = String(window[n.substring(0, l).trim()]);
1244
+ o = String(window[o.substring(0, l).trim()]);
1261
1245
  } catch {
1262
- n = "";
1246
+ o = "";
1263
1247
  }
1264
1248
  }
1265
- n.split("data.").forEach((l) => {
1249
+ o.split("data.").forEach((l) => {
1266
1250
  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" });
1251
+ const h = l.search(/[^_A-Za-z0-9]/g);
1252
+ let a = "";
1253
+ h >= 0 ? a = l.substring(0, h) : o.startsWith("data.") && (a = l.replace("data.", "")), a && t(this, A).push({ name: a, type: "string" });
1270
1254
  }
1271
1255
  });
1272
1256
  });
1273
1257
  });
1274
- t(this, vt).call(this);
1258
+ t(this, wt).call(this);
1275
1259
  }
1276
1260
  }, "#init"));
1277
- b(this, lt, i), t(this, Xt).call(this);
1261
+ g(this, rt, i), t(this, Xt).call(this);
1278
1262
  }
1279
1263
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1280
1264
  get() {
@@ -1286,7 +1270,7 @@ const be = class be {
1286
1270
  }
1287
1271
  // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
1288
1272
  getType(i) {
1289
- const e = t(this, A).find((s) => s.name === i);
1273
+ const e = t(this, A).find((n) => n.name === i);
1290
1274
  return e ? e.type : "string";
1291
1275
  }
1292
1276
  indexOf(i) {
@@ -1296,40 +1280,40 @@ const be = class be {
1296
1280
  return t(this, A).some((e) => e.name === i);
1297
1281
  }
1298
1282
  };
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 {
1283
+ rt = new WeakMap(), A = new WeakMap(), wt = new WeakMap(), Xt = new WeakMap(), c(ge, "ngFields");
1284
+ let se = ge;
1285
+ var Z, Ut, Ft;
1286
+ const be = class be extends HTMLElement {
1303
1287
  constructor() {
1304
1288
  super();
1305
1289
  //#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 } }));
1290
+ d(this, Z);
1291
+ d(this, Ut);
1292
+ d(this, Ft, /* @__PURE__ */ c(() => {
1293
+ this.fields = new se(this), g(this, Ut, new te(this)), lt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1310
1294
  }, "#init"));
1311
- this.attachShadow({ mode: "open" }), b(this, J, new se(this));
1295
+ this.attachShadow({ mode: "open" }), g(this, Z, new ne(this));
1312
1296
  }
1313
1297
  connectedCallback() {
1314
1298
  t(this, Ft).call(this);
1315
1299
  }
1316
1300
  disconnectedCallback() {
1317
- H.log("NineTable disconnected.");
1301
+ lt.log("NineTable disconnected.");
1318
1302
  }
1319
1303
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1320
1304
  get data() {
1321
- return t(this, J).data;
1305
+ return t(this, Z).data;
1322
1306
  }
1323
1307
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1324
1308
  get row() {
1325
- return t(this, J).row;
1309
+ return t(this, Z).row;
1326
1310
  }
1327
1311
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1328
1312
  get dataManager() {
1329
- return t(this, J);
1313
+ return t(this, Z);
1330
1314
  }
1331
1315
  };
1332
- J = new WeakMap(), Ut = new WeakMap(), Ft = new WeakMap(), a(ge, "NineTable");
1333
- let oe = ge;
1316
+ Z = new WeakMap(), Ut = new WeakMap(), Ft = new WeakMap(), c(be, "NineTable");
1317
+ let oe = be;
1334
1318
  customElements.get("nine-table") || customElements.define("nine-table", oe);
1335
1319
  //# sourceMappingURL=nine-table.js.map