@ninebone/table 0.0.271 β†’ 0.0.273

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,119 +1,119 @@
1
- var Pe = Object.defineProperty;
2
- var Ve = (w) => {
3
- throw TypeError(w);
1
+ var Be = Object.defineProperty;
2
+ var De = (p) => {
3
+ throw TypeError(p);
4
4
  };
5
- var Ue = (w, i, t) => i in w ? Pe(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
6
- var h = (w, i) => Pe(w, "name", { value: i, configurable: !0 });
7
- var S = (w, i, t) => Ue(w, typeof i != "symbol" ? i + "" : i, t), Xe = (w, i, t) => i.has(w) || Ve("Cannot " + t);
8
- var e = (w, i, t) => (Xe(w, i, "read from private field"), t ? t.call(w) : i.get(w)), g = (w, i, t) => i.has(w) ? Ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), y = (w, i, t, s) => (Xe(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
9
- var Ye = (w, i, t, s) => ({
10
- set _(r) {
11
- y(w, i, r, t);
5
+ var Ve = (p, i, t) => i in p ? Be(p, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[i] = t;
6
+ var c = (p, i) => Be(p, "name", { value: i, configurable: !0 });
7
+ var v = (p, i, t) => Ve(p, typeof i != "symbol" ? i + "" : i, t), Ne = (p, i, t) => i.has(p) || De("Cannot " + t);
8
+ var e = (p, i, t) => (Ne(p, i, "read from private field"), t ? t.call(p) : i.get(p)), f = (p, i, t) => i.has(p) ? De("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(p) : i.set(p, t), g = (p, i, t, s) => (Ne(p, i, "write to private field"), s ? s.call(p, t) : i.set(p, t), t);
9
+ var Pe = (p, i, t, s) => ({
10
+ set _(n) {
11
+ g(p, i, n, t);
12
12
  },
13
13
  get _() {
14
- return e(w, i, s);
14
+ return e(p, i, s);
15
15
  }
16
16
  });
17
- import { trace as Fe } from "@ninebone/util";
18
- const Ie = class Ie extends Fe.constructor {
17
+ import { trace as Xe } from "@ninebone/util";
18
+ const Ce = class Ce extends Xe.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(Ie, "Trace");
24
- let Se = Ie;
25
- const L = new Se();
26
- var _, D, p, N, P, V, ne, X, oe;
27
- const Me = class Me extends HTMLElement {
23
+ c(Ce, "Trace");
24
+ let xe = Ce;
25
+ const Z = new xe();
26
+ var T, z, y, B, D, N, se, P, ne;
27
+ const _e = class _e extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- g(this, _);
31
- g(this, D, !1);
32
- g(this, p);
33
- g(this, N);
34
- g(this, P);
35
- g(this, V);
36
- g(this, ne, /* @__PURE__ */ h(() => {
37
- if (!e(this, _)) return;
38
- const t = e(this, _).querySelector(".ng-container-body");
39
- t && (y(this, V, new ResizeObserver(() => {
30
+ f(this, T);
31
+ f(this, z, !1);
32
+ f(this, y);
33
+ f(this, B);
34
+ f(this, D);
35
+ f(this, N);
36
+ f(this, se, /* @__PURE__ */ c(() => {
37
+ if (!e(this, T)) return;
38
+ const t = e(this, T).querySelector(".ng-container-body");
39
+ t && (g(this, N, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), e(this, V).observe(t));
41
+ })), e(this, N).observe(t));
42
42
  }, "#observeResize"));
43
- S(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!e(this, _) || !e(this, p) || e(this, D)) return;
45
- const t = e(this, p).container, s = t.querySelector("table");
43
+ v(this, "refresh", /* @__PURE__ */ c(() => {
44
+ if (!e(this, T) || !e(this, y) || e(this, z)) return;
45
+ const t = e(this, y).container, s = t.querySelector("table");
46
46
  if (!s) return;
47
- const r = e(this, p).track, n = e(this, p).thumb, o = e(this, _).querySelector(".ng-container-bottom"), c = t.clientWidth, u = s.scrollWidth;
48
- if (c !== 0 && u > c)
47
+ const n = e(this, y).track, r = e(this, y).thumb, o = e(this, T).querySelector(".ng-container-bottom"), l = t.clientWidth, d = s.scrollWidth;
48
+ if (l !== 0 && d > l)
49
49
  o && (o.style.display = "flex");
50
50
  else {
51
51
  o && (o.style.display = "none");
52
52
  return;
53
53
  }
54
- const l = r.clientWidth;
55
- if (l <= 0) return;
56
- const a = Math.max(Math.min(l * (c / u), l), 20);
57
- n.style.width = `${a}px`;
58
- const d = t.scrollLeft, f = u - c;
59
- let b = 0;
60
- f > 0 && (b = parseInt(d / f * (l - a), 10)), b < 0 && (b = 0);
61
- const m = l - a;
62
- b > m && (b = m), n.style.left = `${b}px`, L.log(b), e(this, p).left.disabled = b === 0, e(this, p).right.disabled = b >= m - 1;
54
+ const h = n.clientWidth;
55
+ if (h <= 0) return;
56
+ const a = Math.max(Math.min(h * (l / d), h), 20);
57
+ r.style.width = `${a}px`;
58
+ const u = t.scrollLeft, b = d - l;
59
+ let w = 0;
60
+ b > 0 && (w = parseInt(u / b * (h - a), 10)), w < 0 && (w = 0);
61
+ const x = h - a;
62
+ w > x && (w = x), r.style.left = `${w}px`, Z.log(w), e(this, y).left.disabled = w === 0, e(this, y).right.disabled = w >= x - 1;
63
63
  }, "refresh"));
64
- g(this, X, /* @__PURE__ */ h((t) => {
65
- if (!e(this, p)) return !1;
66
- const s = e(this, p).container, r = s.querySelector("table");
67
- if (!r) return !1;
68
- const n = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
69
- let c = t;
70
- c < 0 && (c = 0);
71
- const u = n.width - o;
72
- c > u && (c = u), c = parseInt(c, 10), e(this, p).thumb.style.left = `${c}px`, e(this, p).left.disabled = c === 0, e(this, p).right.disabled = c >= u - 1;
73
- const l = s.clientWidth, a = r.scrollWidth;
74
- let d = u > 0 ? -c * (a - l) / u : 0;
75
- return -d > a - l && (d = -(a - l)), -d + 5 > a - l && (d = -(a - l)), l >= a && (d = 0), r.style.transform = `translateX(${d}px)`, c > 0 && c < u - 1;
64
+ f(this, P, /* @__PURE__ */ c((t) => {
65
+ if (!e(this, y)) return !1;
66
+ const s = e(this, y).container, n = s.querySelector("table");
67
+ if (!n) return !1;
68
+ const r = e(this, y).track.getBoundingClientRect(), o = e(this, y).thumb.clientWidth;
69
+ let l = t;
70
+ l < 0 && (l = 0);
71
+ const d = r.width - o;
72
+ l > d && (l = d), l = parseInt(l, 10), e(this, y).thumb.style.left = `${l}px`, e(this, y).left.disabled = l === 0, e(this, y).right.disabled = l >= d - 1;
73
+ const h = s.clientWidth, a = n.scrollWidth;
74
+ let u = d > 0 ? -l * (a - h) / d : 0;
75
+ return -u > a - h && (u = -(a - h)), -u + 5 > a - h && (u = -(a - h)), h >= a && (u = 0), n.style.transform = `translateX(${u}px)`, l > 0 && l < d - 1;
76
76
  }, "#thumbMoveTo"));
77
- g(this, oe, /* @__PURE__ */ h(() => {
78
- const t = /* @__PURE__ */ h((r) => {
79
- clearInterval(e(this, N)), clearInterval(e(this, P));
80
- const n = parseInt(e(this, p).thumb.style.left || 0, 10);
81
- e(this, X).call(this, n + r), y(this, N, setInterval(() => {
82
- clearInterval(e(this, N)), y(this, P, setInterval(() => {
83
- const o = parseInt(e(this, p).thumb.style.left || 0, 10);
84
- e(this, X).call(this, o + r) || clearInterval(e(this, P));
77
+ f(this, ne, /* @__PURE__ */ c(() => {
78
+ const t = /* @__PURE__ */ c((n) => {
79
+ clearInterval(e(this, B)), clearInterval(e(this, D));
80
+ const r = parseInt(e(this, y).thumb.style.left || 0, 10);
81
+ e(this, P).call(this, r + n), g(this, B, setInterval(() => {
82
+ clearInterval(e(this, B)), g(this, D, setInterval(() => {
83
+ const o = parseInt(e(this, y).thumb.style.left || 0, 10);
84
+ e(this, P).call(this, o + n) || clearInterval(e(this, D));
85
85
  }, 50));
86
86
  }, 500));
87
- }, "delayScroll"), s = /* @__PURE__ */ h(() => {
88
- clearInterval(e(this, N)), clearInterval(e(this, P));
87
+ }, "delayScroll"), s = /* @__PURE__ */ c(() => {
88
+ clearInterval(e(this, B)), clearInterval(e(this, D));
89
89
  }, "clearTimer");
90
- ["mouseup", "mouseleave", "touchend"].forEach((r) => {
91
- e(this, p).left.addEventListener(r, s), e(this, p).right.addEventListener(r, s), e(this, p).track.addEventListener(r, s);
92
- }), e(this, p).left.addEventListener("mousedown", (r) => {
93
- r.button === 0 && t(-20);
94
- }), e(this, p).right.addEventListener("mousedown", (r) => {
95
- r.button === 0 && t(20);
96
- }), e(this, p).left.addEventListener("touchstart", () => t(-20)), e(this, p).right.addEventListener("touchstart", () => t(20)), e(this, p).track.addEventListener("mousedown", (r) => {
97
- if (r.button !== 0) return;
98
- r.preventDefault();
99
- const n = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
100
- e(this, X).call(this, r.clientX - n.left - o / 2);
101
- }), e(this, p).thumb.addEventListener("mousedown", (r) => {
102
- if (r.button !== 0) return;
103
- r.stopPropagation(), r.preventDefault(), y(this, D, !0), this.shiftX = r.clientX - e(this, p).thumb.getBoundingClientRect().left;
104
- const n = /* @__PURE__ */ h((c) => {
105
- if (!e(this, D)) return;
106
- const u = e(this, p).track.getBoundingClientRect();
107
- e(this, X).call(this, c.clientX - u.left - this.shiftX);
108
- }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
109
- y(this, D, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
90
+ ["mouseup", "mouseleave", "touchend"].forEach((n) => {
91
+ e(this, y).left.addEventListener(n, s), e(this, y).right.addEventListener(n, s), e(this, y).track.addEventListener(n, s);
92
+ }), e(this, y).left.addEventListener("mousedown", (n) => {
93
+ n.button === 0 && t(-20);
94
+ }), e(this, y).right.addEventListener("mousedown", (n) => {
95
+ n.button === 0 && t(20);
96
+ }), e(this, y).left.addEventListener("touchstart", () => t(-20)), e(this, y).right.addEventListener("touchstart", () => t(20)), e(this, y).track.addEventListener("mousedown", (n) => {
97
+ if (n.button !== 0) return;
98
+ n.preventDefault();
99
+ const r = e(this, y).track.getBoundingClientRect(), o = e(this, y).thumb.clientWidth;
100
+ e(this, P).call(this, n.clientX - r.left - o / 2);
101
+ }), e(this, y).thumb.addEventListener("mousedown", (n) => {
102
+ if (n.button !== 0) return;
103
+ n.stopPropagation(), n.preventDefault(), g(this, z, !0), this.shiftX = n.clientX - e(this, y).thumb.getBoundingClientRect().left;
104
+ const r = /* @__PURE__ */ c((l) => {
105
+ if (!e(this, z)) return;
106
+ const d = e(this, y).track.getBoundingClientRect();
107
+ e(this, P).call(this, l.clientX - d.left - this.shiftX);
108
+ }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
109
+ g(this, z, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
110
110
  }, "onMouseUp");
111
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
111
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
112
112
  });
113
113
  }, "#init"));
114
114
  }
115
115
  connectedCallback() {
116
- if (y(this, _, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, _)) return;
116
+ if (g(this, T, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, T)) return;
117
117
  this.innerHTML = `
118
118
  <style>
119
119
  nine-table-hscrollbar {
@@ -177,99 +177,99 @@ const Me = class Me extends HTMLElement {
177
177
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
178
178
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
179
179
  `;
180
- const t = /* @__PURE__ */ h(() => {
181
- const s = e(this, _).querySelector(".ng-container-body");
180
+ const t = /* @__PURE__ */ c(() => {
181
+ const s = e(this, T).querySelector(".ng-container-body");
182
182
  if (!s) {
183
183
  setTimeout(t, 10);
184
184
  return;
185
185
  }
186
- y(this, p, {
186
+ g(this, y, {
187
187
  container: s,
188
188
  track: this.querySelector(".ng-scroll-track"),
189
189
  thumb: this.querySelector(".ng-scroll-thumb"),
190
190
  left: this.querySelector(".ng-scroll-left"),
191
191
  right: this.querySelector(".ng-scroll-right")
192
- }), e(this, oe).call(this), e(this, ne).call(this), this.refresh();
192
+ }), e(this, ne).call(this), e(this, se).call(this), this.refresh();
193
193
  }, "initWhenReady");
194
194
  t();
195
195
  }
196
196
  disconnectedCallback() {
197
- e(this, V) && e(this, V).disconnect();
197
+ e(this, N) && e(this, N).disconnect();
198
198
  }
199
199
  };
200
- _ = new WeakMap(), D = new WeakMap(), p = new WeakMap(), N = new WeakMap(), P = new WeakMap(), V = new WeakMap(), ne = new WeakMap(), X = new WeakMap(), oe = new WeakMap(), h(Me, "NineTableHScrollBar");
201
- let Ee = Me;
202
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ee);
203
- var W, M, A, z, H, $, le, ae, ce, he;
200
+ T = new WeakMap(), z = new WeakMap(), y = new WeakMap(), B = new WeakMap(), D = new WeakMap(), N = new WeakMap(), se = new WeakMap(), P = new WeakMap(), ne = new WeakMap(), c(_e, "NineTableHScrollBar");
201
+ let ve = _e;
202
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ve);
203
+ var M, L, R, $, C, _, re, oe, le, ae;
204
204
  const He = class He {
205
205
  constructor(i) {
206
- g(this, W);
207
- g(this, M, []);
208
- g(this, A, null);
209
- g(this, z, null);
210
- g(this, H, 0);
211
- g(this, $, 0);
212
- S(this, "getRowHeight", /* @__PURE__ */ h(() => e(this, A), "getRowHeight"));
213
- g(this, le, /* @__PURE__ */ h(() => {
214
- e(this, ae).call(this);
206
+ f(this, M);
207
+ f(this, L, []);
208
+ f(this, R, null);
209
+ f(this, $, null);
210
+ f(this, C, 0);
211
+ f(this, _, 0);
212
+ v(this, "getRowHeight", /* @__PURE__ */ c(() => e(this, R), "getRowHeight"));
213
+ f(this, re, /* @__PURE__ */ c(() => {
214
+ e(this, oe).call(this);
215
215
  }, "#init"));
216
216
  /**
217
217
  * 🎯 뷰포트 크기 λ³€ν™” μ‹œμ μ— 높이 계산 및 ν•„μš”ν•œ ν–‰ 개수 산정·캐싱을 μ™„κ²°
218
218
  */
219
- g(this, ae, /* @__PURE__ */ h(() => {
220
- !e(this, W) || !(e(this, W) instanceof HTMLElement) || (y(this, z, new ResizeObserver((i) => {
219
+ f(this, oe, /* @__PURE__ */ c(() => {
220
+ !e(this, M) || !(e(this, M) instanceof HTMLElement) || (g(this, $, new ResizeObserver((i) => {
221
221
  for (const t of i) {
222
222
  const s = t.target;
223
223
  if (!s.classList.contains("active"))
224
224
  continue;
225
- const r = t.contentRect.height || (t.borderBoxSize && t.borderBoxSize[0] ? t.borderBoxSize[0].blockSize : 0);
226
- if (r > 0) {
227
- const n = s.clientHeight || s.getBoundingClientRect().height || r;
225
+ const n = t.contentRect.height || (t.borderBoxSize && t.borderBoxSize[0] ? t.borderBoxSize[0].blockSize : 0);
226
+ if (n > 0) {
227
+ const r = s.clientHeight || s.getBoundingClientRect().height || n;
228
228
  let o = 0;
229
- const c = s.querySelector(".ng-container-body") || s, u = c.querySelector("thead"), l = c.querySelector("tfoot");
230
- u && (o += u.offsetHeight || u.getBoundingClientRect().height), l && (o += l.offsetHeight || l.getBoundingClientRect().height);
231
- const a = Math.max(n - o, 100);
232
- if (e(this, H) !== a && (y(this, H, a), e(this, A) !== null)) {
233
- const d = Math.ceil(e(this, H) / e(this, A));
234
- y(this, $, d + 20), L.log(`[RowManager] Resized. Height: ${e(this, H)}px | Target Rows: ${e(this, $)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((f) => {
235
- const b = s.querySelector(f);
236
- b && b.querySelector("tbody") && e(this, he).call(this, b);
229
+ const l = s.querySelector(".ng-container-body") || s, d = l.querySelector("thead"), h = l.querySelector("tfoot");
230
+ d && (o += d.offsetHeight || d.getBoundingClientRect().height), h && (o += h.offsetHeight || h.getBoundingClientRect().height);
231
+ const a = Math.max(r - o, 100);
232
+ if (e(this, C) !== a && (g(this, C, a), e(this, R) !== null)) {
233
+ const u = Math.ceil(e(this, C) / e(this, R));
234
+ g(this, _, u + 20), Z.log(`[RowManager] Resized. Height: ${e(this, C)}px | Target Rows: ${e(this, _)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
235
+ const w = s.querySelector(b);
236
+ w && w.querySelector("tbody") && e(this, ae).call(this, w);
237
237
  });
238
238
  }
239
239
  }
240
240
  }
241
- })), e(this, z).observe(e(this, W)));
241
+ })), e(this, $).observe(e(this, M)));
242
242
  }, "#initResizeObserver"));
243
243
  // 🎯 ν…œν”Œλ¦Ώ μΆ”μΆœ, 높이 μΈ‘μ •, 초기 λ Œλ”λ§μ„ μˆœμ„œμ— 맞게 λ‚΄λΆ€μ—μ„œ 일괄 처리
244
- S(this, "initialize", /* @__PURE__ */ h((i) => {
245
- L.log(i);
246
- const t = e(this, W).querySelector(".ng-container-body"), s = i.querySelector("tbody"), r = Array.from(s.querySelectorAll("tr"));
247
- y(this, M, r.map((n) => n.cloneNode(!0))), y(this, A, null), e(this, ce).call(this, t);
244
+ v(this, "initialize", /* @__PURE__ */ c((i) => {
245
+ Z.log(i);
246
+ const t = e(this, M).querySelector(".ng-container-body"), s = i.querySelector("tbody"), n = Array.from(s.querySelectorAll("tr"));
247
+ g(this, L, n.map((r) => r.cloneNode(!0))), g(this, R, null), e(this, le).call(this, t);
248
248
  }, "initialize"));
249
- g(this, ce, /* @__PURE__ */ h((i) => {
250
- if (e(this, A) !== null && e(this, A) > 0)
251
- return e(this, A);
252
- if (e(this, M).length === 0)
249
+ f(this, le, /* @__PURE__ */ c((i) => {
250
+ if (e(this, R) !== null && e(this, R) > 0)
251
+ return e(this, R);
252
+ if (e(this, L).length === 0)
253
253
  throw new Error("[RowManager] Template TRs are empty.");
254
254
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
255
255
  if (!t) return 24;
256
- t.querySelectorAll("tr:not(.nodata)").forEach((d) => d.remove());
257
- const s = t.querySelector("tr.nodata"), r = document.createDocumentFragment();
258
- e(this, M).forEach((d) => {
259
- r.appendChild(d.cloneNode(!0));
260
- }), s ? s.before(r) : t.appendChild(r);
261
- const n = i.closest("nine-table-sheet"), o = n ? n.style.display : "", c = n ? n.style.visibility : "", u = n ? n.style.position : "";
262
- n && (n.style.display === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
263
- let l = 0;
256
+ t.querySelectorAll("tr:not(.nodata)").forEach((u) => u.remove());
257
+ const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment();
258
+ e(this, L).forEach((u) => {
259
+ n.appendChild(u.cloneNode(!0));
260
+ }), s ? s.before(n) : t.appendChild(n);
261
+ const r = i.closest("nine-table-sheet"), o = r ? r.style.display : "", l = r ? r.style.visibility : "", d = r ? r.style.position : "";
262
+ r && (r.style.display === "none" || window.getComputedStyle(r).display === "none") && (r.style.display = "block", r.style.visibility = "hidden", r.style.position = "absolute");
263
+ let h = 0;
264
264
  const a = t.querySelectorAll("tr:not(.nodata)");
265
- if (a.forEach((d, f) => {
266
- l += d.offsetHeight || d.getBoundingClientRect().height;
267
- }), a.forEach((d) => d.remove()), n && (n.style.display = o, n.style.visibility = c, n.style.position = u), y(this, A, l), e(this, H) > 0) {
268
- const d = Math.ceil(e(this, H) / e(this, A));
269
- y(this, $, d + 20);
265
+ if (a.forEach((u, b) => {
266
+ h += u.offsetHeight || u.getBoundingClientRect().height;
267
+ }), a.forEach((u) => u.remove()), r && (r.style.display = o, r.style.visibility = l, r.style.position = d), g(this, R, h), e(this, C) > 0) {
268
+ const u = Math.ceil(e(this, C) / e(this, R));
269
+ g(this, _, u + 20);
270
270
  } else
271
- y(this, $, 40);
272
- return console.log(`[RowManager] Template Height Cached: ${e(this, A)}px | RowCount: ${e(this, $)}`), e(this, A);
271
+ g(this, _, 40);
272
+ return console.log(`[RowManager] Template Height Cached: ${e(this, R)}px | RowCount: ${e(this, _)}`), e(this, R);
273
273
  }, "#measureAndCacheHeight"));
274
274
  /**
275
275
  * 🎯 μΊμ‹œλœ ν–‰ 개수 λ°˜ν™˜ (없을 λ•Œλ§Œ μ΅œμ†Œν•œμ˜ λ°©μ–΄ μ—°μ‚°)
@@ -287,172 +287,115 @@ const He = class He {
287
287
  /**
288
288
  * 🎯 μΊμ‹œλœ ν–‰ 개수λ₯Ό κ³§λ°”λ‘œ κ°€μ Έμ™€μ„œ TR λΌˆλŒ€ μ£Όμž… (쀑볡 계산 제거)
289
289
  */
290
- g(this, he, /* @__PURE__ */ h((i) => {
291
- if (e(this, M).length === 0) return;
290
+ f(this, ae, /* @__PURE__ */ c((i) => {
291
+ if (e(this, L).length === 0) return;
292
292
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
293
293
  if (!t) return;
294
294
  t.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
295
- const s = t.querySelector("tr.nodata"), r = document.createDocumentFragment(), n = e(this, $);
296
- for (let o = 0; o < n; o++)
297
- e(this, M).forEach((c) => {
298
- r.appendChild(c.cloneNode(!0));
295
+ const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), r = e(this, _);
296
+ for (let o = 0; o < r; o++)
297
+ e(this, L).forEach((l) => {
298
+ n.appendChild(l.cloneNode(!0));
299
299
  });
300
- s ? s.before(r) : t.appendChild(r), console.log(`[RowManager] Rendered ${n} sets into DOM.`);
300
+ s ? s.before(n) : t.appendChild(n), console.log(`[RowManager] Rendered ${r} sets into DOM.`);
301
301
  }, "#renderRows"));
302
- S(this, "destroy", /* @__PURE__ */ h(() => {
303
- e(this, z) && (e(this, z).disconnect(), y(this, z, null));
302
+ v(this, "destroy", /* @__PURE__ */ c(() => {
303
+ e(this, $) && (e(this, $).disconnect(), g(this, $, null));
304
304
  }, "destroy"));
305
- y(this, W, i), e(this, le).call(this);
305
+ g(this, M, i), e(this, re).call(this);
306
306
  }
307
307
  get templateLength() {
308
- return e(this, M).length || 1;
308
+ return e(this, L).length || 1;
309
309
  }
310
310
  };
311
- W = new WeakMap(), M = new WeakMap(), A = new WeakMap(), z = new WeakMap(), H = new WeakMap(), $ = new WeakMap(), le = new WeakMap(), ae = new WeakMap(), ce = new WeakMap(), he = new WeakMap(), h(He, "RowManager");
312
- let Re = He;
313
- var E, F, J, K, Q, de, fe;
314
- const G = class G extends HTMLElement {
311
+ M = new WeakMap(), L = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), C = new WeakMap(), _ = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), ae = new WeakMap(), c(He, "RowManager");
312
+ let Se = He;
313
+ var H, Y, U, G, ce, he;
314
+ const j = class j extends HTMLElement {
315
315
  constructor() {
316
316
  super();
317
- g(this, E, null);
318
- g(this, F);
319
- /**
320
- * 🎯 2차원 μ…€ 격자 인덱슀λ₯Ό κ³„μ‚°ν•˜μ—¬ 병합(`rowSpan`/`colSpan`) μ…€μ˜ μ ˆλŒ€ 컬럼 μœ„μΉ˜λ₯Ό λΆ€μ—¬
321
- */
322
- g(this, J, /* @__PURE__ */ h((t, s) => {
323
- const r = Array.from(t.querySelectorAll(s + " tr")), n = Array.from(t.querySelectorAll(s + " th," + s + " td")), o = r.length;
324
- if (o === 0 || n.length === 0) return;
325
- let c = 0;
326
- n.forEach((l) => {
327
- c += l.colSpan || 1;
328
- });
329
- const u = Array.from(Array(o), () => Array(c).fill(null));
330
- r.forEach((l) => {
331
- const a = l.sectionRowIndex;
332
- let d = 0;
333
- Array.from(l.querySelectorAll("th,td")).forEach((f) => {
334
- for (let v = 0; v < u[a].length; v++)
335
- if (u[a][v] === null) {
336
- d = v;
337
- break;
338
- }
339
- const b = f.rowSpan || 1, m = f.colSpan || 1;
340
- for (let v = 0; v < b; v++)
341
- for (let C = 0; C < m; C++)
342
- a + v < o && d + C < c && (u[a + v][d + C] = v === 0 && C === 0 ? "1" : "0");
343
- });
344
- }), r.forEach((l) => {
345
- const a = l.sectionRowIndex;
346
- Array.from(l.querySelectorAll("th,td")).forEach((d) => {
347
- for (let f = 0; f < u[a].length; f++)
348
- if (u[a][f] === "1") {
349
- d.dataset.col = f, u[a][f] = "0";
350
- break;
351
- }
352
- });
353
- });
354
- }, "#resetColIndex"));
355
- /**
356
- * 🎯 순수 바닐라 μžλ°”μŠ€ν¬λ¦½νŠΈ(Vanilla JS) 기반의 κΉ”λ”ν•œ #createSplitTable
357
- */
358
- g(this, K, /* @__PURE__ */ h((t, s) => {
359
- const r = t.cloneNode(!0);
360
- return s === "left" ? r.querySelectorAll("col, th, td").forEach((n) => {
361
- n.getAttribute("fixed") !== "left" && n.remove();
362
- }) : s === "right" ? r.querySelectorAll("col, th, td").forEach((n) => {
363
- n.getAttribute("fixed") !== "right" && n.remove();
364
- }) : r.querySelectorAll("[fixed=left], [fixed=right]").forEach((n) => {
365
- n.remove();
366
- }), r;
367
- }, "#createSplitTable"));
368
- S(this, "generate", /* @__PURE__ */ h((t) => {
317
+ f(this, H, null);
318
+ f(this, Y);
319
+ v(this, "generate", /* @__PURE__ */ c((t) => {
369
320
  if (!t) return;
370
- const s = /* @__PURE__ */ h((l) => {
371
- const a = /* @__PURE__ */ h((f) => {
372
- if (f.querySelector("colgroup")) return;
373
- const b = f.querySelector("tbody tr") || f.querySelector("tr"), m = b ? b.querySelectorAll("th, td").length : 1, v = document.createElement("colgroup"), C = Math.max(Math.floor(f.clientWidth / m), 100);
374
- for (let De = 0; De < m; De++) {
375
- const Ne = document.createElement("col");
376
- Ne.setAttribute("width", C), v.appendChild(Ne);
377
- }
378
- f.prepend(v);
379
- }, "ensureColgroup"), d = /* @__PURE__ */ h((f) => {
380
- if (f.querySelector("thead")) return;
381
- const b = document.createElement("thead"), m = f.querySelector("colgroup");
382
- m ? m.after(b) : f.prepend(b);
383
- }, "ensureThead");
384
- return a(l), d(l), l.classList.add("nine-table-element"), l;
385
- }, "initializeTable"), r = t.cloneNode(!0);
386
- y(this, E, s(r)), e(this, E).style.display = "table", e(this, J).call(this, e(this, E), "thead"), e(this, J).call(this, e(this, E), "tbody"), Array.from(e(this, E).querySelectorAll("colgroup col")).forEach((l, a) => {
387
- const d = l.getAttribute("fixed");
388
- d && e(this, E).querySelectorAll(`[data-col="${a}"]`).forEach((f) => {
389
- f.setAttribute("fixed", d);
390
- });
391
- }), L.log(e(this, E));
392
- const o = this.querySelector(".ng-container-left"), c = this.querySelector(".ng-container-body"), u = this.querySelector(".ng-container-right");
393
- if (c) {
394
- const l = e(this, K).call(this, e(this, E), null);
395
- c.innerHTML = "", c.appendChild(l), L.log(e(this, E)), L.log(l), e(this, F).initialize(e(this, E));
321
+ g(this, H, t), e(this, H).style.display = "table";
322
+ const s = this.querySelector(".ng-container-left"), n = this.querySelector(".ng-container-body"), r = this.querySelector(".ng-container-right");
323
+ if (n) {
324
+ const o = e(this, U).call(this, e(this, H), null);
325
+ n.innerHTML = "", n.appendChild(o), e(this, Y).initialize(e(this, H));
396
326
  }
397
- if (o) {
398
- const l = e(this, K).call(this, e(this, E), "left");
399
- let a = 0;
400
- l.querySelectorAll("col").forEach((f) => {
401
- const b = parseInt(f.getAttribute("width"), 10);
402
- isNaN(b) || (a += b);
403
- }), o.innerHTML = "", o.appendChild(l);
404
- const d = a > 0 ? a : 0;
405
- o.style.flex = `0 0 ${d}px`, o.style.width = `${d}px`;
327
+ if (s) {
328
+ const o = e(this, U).call(this, e(this, H), "left");
329
+ let l = 0;
330
+ o.querySelectorAll("col").forEach((h) => {
331
+ const a = parseInt(h.getAttribute("width"), 10);
332
+ isNaN(a) || (l += a);
333
+ }), s.innerHTML = "", s.appendChild(o);
334
+ const d = l > 0 ? l : 0;
335
+ s.style.flex = `0 0 ${d}px`, s.style.width = `${d}px`;
406
336
  }
407
- if (u) {
408
- const l = e(this, K).call(this, e(this, E), "right");
409
- let a = 0;
410
- l.querySelectorAll("col").forEach((f) => {
411
- const b = parseInt(f.getAttribute("width"), 10);
412
- isNaN(b) || (a += b);
413
- }), u.innerHTML = "", u.appendChild(l);
414
- const d = a > 0 ? a : 0;
415
- u.style.flex = `0 0 ${d}px`, u.style.width = `${d}px`;
337
+ if (r) {
338
+ const o = e(this, U).call(this, e(this, H), "right");
339
+ let l = 0;
340
+ o.querySelectorAll("col").forEach((h) => {
341
+ const a = parseInt(h.getAttribute("width"), 10);
342
+ isNaN(a) || (l += a);
343
+ }), r.innerHTML = "", r.appendChild(o);
344
+ const d = l > 0 ? l : 0;
345
+ r.style.flex = `0 0 ${d}px`, r.style.width = `${d}px`;
416
346
  }
417
- c && c.addEventListener("scroll", () => {
418
- var l;
419
- (l = this.querySelector("nine-table-hscrollbar")) == null || l.refresh();
347
+ n && n.addEventListener("scroll", () => {
348
+ var o;
349
+ (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
420
350
  }), setTimeout(() => {
421
- var l;
422
- e(this, Q).call(this), (l = this.querySelector("nine-table-hscrollbar")) == null || l.refresh();
351
+ var o;
352
+ e(this, G).call(this), (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
423
353
  }, 0);
424
354
  }, "generate"));
425
- S(this, "getRowHeight", /* @__PURE__ */ h(() => e(this, F).getRowHeight(), "getRowHeight"));
426
- S(this, "scrollToX", /* @__PURE__ */ h((t) => {
355
+ /**
356
+ * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
357
+ */
358
+ f(this, U, /* @__PURE__ */ c((t, s) => {
359
+ const n = t.cloneNode(!0);
360
+ return s === "left" ? n.querySelectorAll("col, th, td").forEach((r) => {
361
+ r.getAttribute("fixed") !== "left" && r.remove();
362
+ }) : s === "right" ? n.querySelectorAll("col, th, td").forEach((r) => {
363
+ r.getAttribute("fixed") !== "right" && r.remove();
364
+ }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((r) => {
365
+ r.remove();
366
+ }), n;
367
+ }, "#createSplitTable"));
368
+ v(this, "getRowHeight", /* @__PURE__ */ c(() => e(this, Y).getRowHeight(), "getRowHeight"));
369
+ v(this, "scrollToX", /* @__PURE__ */ c((t) => {
427
370
  const s = this.querySelector(".ng-container-body");
428
371
  s && (s.scrollLeft = t);
429
372
  }, "scrollToX"));
430
- S(this, "scrollToY", /* @__PURE__ */ h((t) => {
373
+ v(this, "scrollToY", /* @__PURE__ */ c((t) => {
431
374
  const s = this.querySelector(".ng-container-body");
432
375
  s && (s.scrollTop = t);
433
376
  }, "scrollToY"));
434
- g(this, Q, /* @__PURE__ */ h(() => {
435
- var l, a, d;
436
- const t = this.querySelector(".ng-container-left table"), s = this.querySelector(".ng-container-body table"), r = this.querySelector(".ng-container-right table");
377
+ f(this, G, /* @__PURE__ */ c(() => {
378
+ var h, a, u;
379
+ const t = this.querySelector(".ng-container-left table"), s = this.querySelector(".ng-container-body table"), n = this.querySelector(".ng-container-right table");
437
380
  if (!s) return;
438
- const n = t ? Array.from(t.querySelectorAll("tr")) : [], o = Array.from(s.querySelectorAll("tr")), c = r ? Array.from(r.querySelectorAll("tr")) : [], u = Math.max(n.length, o.length, c.length);
439
- for (let f = 0; f < u; f++) {
440
- const b = [
441
- ((l = n[f]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
442
- ((a = o[f]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
443
- ((d = c[f]) == null ? void 0 : d.getBoundingClientRect().height) || 0
444
- ], m = Math.max(...b);
445
- m > 0 && (n[f] && (n[f].style.height = `${m}px`), o[f] && (o[f].style.height = `${m}px`), c[f] && (c[f].style.height = `${m}px`));
381
+ const r = t ? Array.from(t.querySelectorAll("tr")) : [], o = Array.from(s.querySelectorAll("tr")), l = n ? Array.from(n.querySelectorAll("tr")) : [], d = Math.max(r.length, o.length, l.length);
382
+ for (let b = 0; b < d; b++) {
383
+ const w = [
384
+ ((h = r[b]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
385
+ ((a = o[b]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
386
+ ((u = l[b]) == null ? void 0 : u.getBoundingClientRect().height) || 0
387
+ ], x = Math.max(...w);
388
+ x > 0 && (r[b] && (r[b].style.height = `${x}px`), o[b] && (o[b].style.height = `${x}px`), l[b] && (l[b].style.height = `${x}px`));
446
389
  }
447
390
  }, "#syncRowHeights"));
448
- g(this, de, /* @__PURE__ */ h(() => {
449
- e(this, fe).call(this), new MutationObserver((t) => {
391
+ f(this, ce, /* @__PURE__ */ c(() => {
392
+ e(this, he).call(this), new MutationObserver((t) => {
450
393
  for (const s of t)
451
- s.attributeName === "class" && this.classList.contains("active") && e(this, Q).call(this);
394
+ s.attributeName === "class" && this.classList.contains("active") && e(this, G).call(this);
452
395
  }).observe(this, { attributes: !0 });
453
396
  }, "#init"));
454
- g(this, fe, /* @__PURE__ */ h(() => {
455
- const t = G.SCROLLBAR_SIZE;
397
+ f(this, he, /* @__PURE__ */ c(() => {
398
+ const t = j.SCROLLBAR_SIZE;
456
399
  this.innerHTML = `
457
400
  <style>
458
401
  nine-table-sheet {
@@ -575,163 +518,163 @@ const G = class G extends HTMLElement {
575
518
  </div>
576
519
  `;
577
520
  }, "#render"));
578
- y(this, F, new Re(this));
521
+ g(this, Y, new Se(this));
579
522
  }
580
523
  connectedCallback() {
581
- e(this, de).call(this);
524
+ e(this, ce).call(this);
582
525
  }
583
526
  disconnectedCallback() {
584
- this.innerHTML = "", L.log("NineTableSheet destroyed.");
527
+ this.innerHTML = "", Z.log("NineTableSheet destroyed.");
585
528
  }
586
529
  };
587
- E = new WeakMap(), F = new WeakMap(), J = new WeakMap(), K = new WeakMap(), Q = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), h(G, "NineTableSheet"), S(G, "SCROLLBAR_SIZE", 16);
588
- let re = G;
589
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", re);
590
- var ue, ee;
591
- const $e = class $e extends HTMLElement {
530
+ H = new WeakMap(), Y = new WeakMap(), U = new WeakMap(), G = new WeakMap(), ce = new WeakMap(), he = new WeakMap(), c(j, "NineTableSheet"), v(j, "SCROLLBAR_SIZE", 16);
531
+ let ie = j;
532
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ie);
533
+ var de, J;
534
+ const Ie = class Ie extends HTMLElement {
592
535
  constructor() {
593
536
  super();
594
- g(this, ue, /* @__PURE__ */ h(() => {
537
+ f(this, de, /* @__PURE__ */ c(() => {
595
538
  var t;
596
539
  (t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
597
540
  var o;
598
- const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
599
- e(this, ee).call(this, n, r);
600
- }), e(this, ee).call(this, 0, !1);
541
+ const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
542
+ e(this, J).call(this, r, n);
543
+ }), e(this, J).call(this, 0, !1);
601
544
  }, "#init"));
602
- g(this, ee, /* @__PURE__ */ h((t, s = !1) => {
603
- const r = /* @__PURE__ */ h(() => {
545
+ f(this, J, /* @__PURE__ */ c((t, s = !1) => {
546
+ const n = /* @__PURE__ */ c(() => {
604
547
  const a = Array.from(this.querySelectorAll("nine-table-sheet"));
605
- Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
606
- const f = a.filter((b) => b.classList.contains("active"));
607
- f.length < 2 || f.forEach((b) => {
608
- const m = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${m}"]`), C = a[m + 1];
609
- v && C && C.classList.contains("active") && v.style.setProperty("display", "flex");
548
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((w) => w.style.setProperty("display", "none"));
549
+ const b = a.filter((w) => w.classList.contains("active"));
550
+ b.length < 2 || b.forEach((w) => {
551
+ const x = parseInt(w.getAttribute("data-index"), 10), I = this.querySelector(`nine-splitter[data-split-index="${x}"]`), ze = a[x + 1];
552
+ I && ze && ze.classList.contains("active") && I.style.setProperty("display", "flex");
610
553
  });
611
- }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), c = n.querySelectorAll(".nine-tab-item"), u = o.querySelectorAll("nine-table-sheet");
612
- if (!c[t]) return;
554
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), d = o.querySelectorAll("nine-table-sheet");
555
+ if (!l[t]) return;
613
556
  if (!s)
614
- c.forEach((a, d) => {
615
- a.classList.toggle("active", d === t);
616
- }), u.forEach((a, d) => {
617
- const f = d === t;
618
- a.classList.toggle("active", f), a.style.flex = f ? "1 1 100%" : "";
557
+ l.forEach((a, u) => {
558
+ a.classList.toggle("active", u === t);
559
+ }), d.forEach((a, u) => {
560
+ const b = u === t;
561
+ a.classList.toggle("active", b), a.style.flex = b ? "1 1 100%" : "";
619
562
  });
620
563
  else {
621
- const a = c[t], d = n.querySelectorAll(".nine-tab-item.active");
622
- if (a.classList.contains("active") && d.length <= 1)
564
+ const a = l[t], u = r.querySelectorAll(".nine-tab-item.active");
565
+ if (a.classList.contains("active") && u.length <= 1)
623
566
  return;
624
567
  a.classList.toggle("active");
625
- const f = o.querySelector(`nine-table-sheet[data-index="${t}"]`);
626
- f && (f.classList.toggle("active"), f.classList.contains("active") || (f.style.flex = ""));
568
+ const b = o.querySelector(`nine-table-sheet[data-index="${t}"]`);
569
+ b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
627
570
  }
628
- const l = o.querySelectorAll("nine-table-sheet.active");
629
- l == null || l.forEach((a) => {
630
- a.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
631
- }), r();
571
+ const h = o.querySelectorAll("nine-table-sheet.active");
572
+ h == null || h.forEach((a) => {
573
+ a.style.flex = h.length > 1 ? "1 1 0%" : "1 1 100%";
574
+ }), n();
632
575
  }, "#switchSheet"));
633
576
  }
634
577
  connectedCallback() {
635
- e(this, ue).call(this);
578
+ e(this, de).call(this);
636
579
  }
637
580
  };
638
- ue = new WeakMap(), ee = new WeakMap(), h($e, "NineTableSheets");
639
- let Ae = $e;
640
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Ae);
641
- var ge, te;
642
- const I = class I {
581
+ de = new WeakMap(), J = new WeakMap(), c(Ie, "NineTableSheets");
582
+ let Re = Ie;
583
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Re);
584
+ var fe, Q;
585
+ const k = class k {
643
586
  /**
644
587
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
645
588
  */
646
589
  static compileAll(i) {
647
- return Array.isArray(i) ? i.map((t) => I.compile(t)) : [];
590
+ return Array.isArray(i) ? i.map((t) => k.compile(t)) : [];
648
591
  }
649
592
  /**
650
593
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
651
594
  */
652
595
  static compile(i) {
653
- var r, n, o;
596
+ var n, r, o;
654
597
  if (!i) return null;
655
598
  const t = i.cloneNode(!0);
656
- return e(r = I, ge).call(r, t), e(n = I, te).call(n, t, "thead"), e(o = I, te).call(o, t, "tbody"), Array.from(t.querySelectorAll("colgroup col")).forEach((c, u) => {
657
- const l = c.getAttribute("fixed");
658
- l && t.querySelectorAll(`[data-col="${u}"]`).forEach((a) => {
659
- a.setAttribute("fixed", l);
599
+ return e(n = k, fe).call(n, t), e(r = k, Q).call(r, t, "thead"), e(o = k, Q).call(o, t, "tbody"), Array.from(t.querySelectorAll("colgroup col")).forEach((l, d) => {
600
+ const h = l.getAttribute("fixed");
601
+ h && t.querySelectorAll(`[data-col="${d}"]`).forEach((a) => {
602
+ a.setAttribute("fixed", h);
660
603
  });
661
604
  }), t;
662
605
  }
663
606
  };
664
- ge = new WeakMap(), te = new WeakMap(), h(I, "TableCompiler"), g(I, ge, /* @__PURE__ */ h((i) => {
607
+ fe = new WeakMap(), Q = new WeakMap(), c(k, "TableCompiler"), f(k, fe, /* @__PURE__ */ c((i) => {
665
608
  if (!i.querySelector("colgroup")) {
666
- const t = i.querySelector("tbody tr") || i.querySelector("tr"), s = t ? t.querySelectorAll("th, td").length : 1, r = document.createElement("colgroup"), n = Math.max(Math.floor(i.clientWidth / s), 100);
609
+ const t = i.querySelector("tbody tr") || i.querySelector("tr"), s = t ? t.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
667
610
  for (let o = 0; o < s; o++) {
668
- const c = document.createElement("col");
669
- c.setAttribute("width", n), r.appendChild(c);
611
+ const l = document.createElement("col");
612
+ l.setAttribute("width", r), n.appendChild(l);
670
613
  }
671
- i.prepend(r);
614
+ i.prepend(n);
672
615
  }
673
616
  if (!i.querySelector("thead")) {
674
617
  const t = document.createElement("thead"), s = i.querySelector("colgroup");
675
618
  s ? s.after(t) : i.prepend(t);
676
619
  }
677
620
  i.classList.add("nine-table-element"), i.style.display = "table";
678
- }, "#ensureTableStructure")), g(I, te, /* @__PURE__ */ h((i, t) => {
679
- const s = Array.from(i.querySelectorAll(t + " tr")), r = Array.from(i.querySelectorAll(t + " th," + t + " td")), n = s.length;
680
- if (n === 0 || r.length === 0) return;
621
+ }, "#ensureTableStructure")), f(k, Q, /* @__PURE__ */ c((i, t) => {
622
+ const s = Array.from(i.querySelectorAll(t + " tr")), n = Array.from(i.querySelectorAll(t + " th," + t + " td")), r = s.length;
623
+ if (r === 0 || n.length === 0) return;
681
624
  let o = 0;
682
- r.forEach((u) => {
683
- o += u.colSpan || 1;
625
+ n.forEach((d) => {
626
+ o += d.colSpan || 1;
684
627
  });
685
- const c = Array.from(Array(n), () => Array(o).fill(null));
686
- s.forEach((u) => {
687
- const l = u.sectionRowIndex;
628
+ const l = Array.from(Array(r), () => Array(o).fill(null));
629
+ s.forEach((d) => {
630
+ const h = d.sectionRowIndex;
688
631
  let a = 0;
689
- Array.from(u.querySelectorAll("th,td")).forEach((d) => {
690
- for (let m = 0; m < c[l].length; m++)
691
- if (c[l][m] === null) {
692
- a = m;
632
+ Array.from(d.querySelectorAll("th,td")).forEach((u) => {
633
+ for (let x = 0; x < l[h].length; x++)
634
+ if (l[h][x] === null) {
635
+ a = x;
693
636
  break;
694
637
  }
695
- const f = d.rowSpan || 1, b = d.colSpan || 1;
696
- for (let m = 0; m < f; m++)
697
- for (let v = 0; v < b; v++)
698
- l + m < n && a + v < o && (c[l + m][a + v] = m === 0 && v === 0 ? "1" : "0");
638
+ const b = u.rowSpan || 1, w = u.colSpan || 1;
639
+ for (let x = 0; x < b; x++)
640
+ for (let I = 0; I < w; I++)
641
+ h + x < r && a + I < o && (l[h + x][a + I] = x === 0 && I === 0 ? "1" : "0");
699
642
  });
700
- }), s.forEach((u) => {
701
- const l = u.sectionRowIndex;
702
- Array.from(u.querySelectorAll("th,td")).forEach((a) => {
703
- for (let d = 0; d < c[l].length; d++)
704
- if (c[l][d] === "1") {
705
- a.dataset.col = d, c[l][d] = "0";
643
+ }), s.forEach((d) => {
644
+ const h = d.sectionRowIndex;
645
+ Array.from(d.querySelectorAll("th,td")).forEach((a) => {
646
+ for (let u = 0; u < l[h].length; u++)
647
+ if (l[h][u] === "1") {
648
+ a.dataset.col = u, l[h][u] = "0";
706
649
  break;
707
650
  }
708
651
  });
709
652
  });
710
653
  }, "#resetColIndex"));
711
- let qe = I;
712
- var R, be, ie, ye;
713
- const We = class We {
654
+ let Ee = k;
655
+ var S, ue, ee, ge;
656
+ const Me = class Me {
714
657
  constructor(i) {
715
- g(this, R);
716
- g(this, be, /* @__PURE__ */ h(() => {
717
- e(this, ye).call(this), new ResizeObserver((i) => {
658
+ f(this, S);
659
+ f(this, ue, /* @__PURE__ */ c(() => {
660
+ e(this, ge).call(this), new ResizeObserver((i) => {
718
661
  for (let t of i)
719
- e(this, R).getAttribute("auto-height") === "true" && e(this, ie).call(this);
720
- }).observe(e(this, R));
662
+ e(this, S).getAttribute("auto-height") === "true" && e(this, ee).call(this);
663
+ }).observe(e(this, S));
721
664
  }, "#init"));
722
- g(this, ie, /* @__PURE__ */ h(() => {
723
- var u, l;
724
- const i = Array.from(e(this, R).shadowRoot.querySelectorAll("nine-table-sheet.active"));
665
+ f(this, ee, /* @__PURE__ */ c(() => {
666
+ var d, h;
667
+ const i = Array.from(e(this, S).shadowRoot.querySelectorAll("nine-table-sheet.active"));
725
668
  if (i.length === 0) return;
726
- const t = parseInt(e(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((a) => a.getRowHeight())), r = (u = e(this, R).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : u.getBoundingClientRect().height, n = (l = e(this, R).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = re.SCROLLBAR_SIZE, c = t * s + r + n + o;
727
- e(this, R).style.height = `${c}px`;
669
+ const t = parseInt(e(this, S).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((a) => a.getRowHeight())), n = (d = e(this, S).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (h = e(this, S).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : h.getBoundingClientRect().height, o = ie.SCROLLBAR_SIZE, l = t * s + n + r + o;
670
+ e(this, S).style.height = `${l}px`;
728
671
  }, "#applyAutoHeight"));
729
- g(this, ye, /* @__PURE__ */ h(() => {
730
- const t = Array.from(e(this, R).children).filter((l) => l.tagName === "TABLE"), s = e(this, R).getAttribute("auto-height") === "true", r = t.length, n = t.map((l, a) => {
731
- const f = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, b = a < r - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
732
- return f + b;
733
- }).join(""), o = t.map((l, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
734
- e(this, R).shadowRoot.innerHTML = `
672
+ f(this, ge, /* @__PURE__ */ c(() => {
673
+ const t = Array.from(e(this, S).children).filter((h) => h.tagName === "TABLE"), s = e(this, S).getAttribute("auto-height") === "true", n = t.length, r = t.map((h, a) => {
674
+ const b = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, w = a < n - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
675
+ return b + w;
676
+ }).join(""), o = t.map((h, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
677
+ e(this, S).shadowRoot.innerHTML = `
735
678
  <style>
736
679
  :host {
737
680
  display: flex;
@@ -820,7 +763,7 @@ const We = class We {
820
763
  <nine-table-body>
821
764
  <nine-table-summary></nine-table-summary>
822
765
  <nine-table-sheets>
823
- <nine-table-sheets-body>${n}</nine-table-sheets-body>
766
+ <nine-table-sheets-body>${r}</nine-table-sheets-body>
824
767
  <nine-table-sheets-footer>
825
768
  <div class="nine-tab-bar">${o}</div>
826
769
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
@@ -830,236 +773,236 @@ const We = class We {
830
773
  </nine-table-body>
831
774
  <nine-table-footer></nine-table-footer>
832
775
  `;
833
- const c = e(this, R).shadowRoot.querySelectorAll("nine-table-sheet"), u = qe.compileAll(t);
834
- L.log("==================="), L.log(u[0]), L.log("==================="), c == null || c.forEach((l, a) => {
835
- t[a] && setTimeout(() => {
836
- l.generate(t[a]), s && e(this, ie).call(this);
776
+ const l = e(this, S).shadowRoot.querySelectorAll("nine-table-sheet"), d = Ee.compileAll(t);
777
+ l == null || l.forEach((h, a) => {
778
+ d[a] && setTimeout(() => {
779
+ h.generate(d[a]), s && e(this, ee).call(this);
837
780
  });
838
781
  });
839
782
  }, "#render"));
840
- y(this, R, i), e(this, be).call(this);
783
+ g(this, S, i), e(this, ue).call(this);
841
784
  }
842
785
  };
843
- R = new WeakMap(), be = new WeakMap(), ie = new WeakMap(), ye = new WeakMap(), h(We, "LayoutManager");
844
- let Te = We;
845
- var O, Y;
846
- const ze = class ze {
786
+ S = new WeakMap(), ue = new WeakMap(), ee = new WeakMap(), ge = new WeakMap(), c(Me, "LayoutManager");
787
+ let Ae = Me;
788
+ var W, V;
789
+ const $e = class $e {
847
790
  constructor(i) {
848
- g(this, O);
849
- g(this, Y, -1);
850
- S(this, "count", /* @__PURE__ */ h(() => e(this, O).rawRecords.length, "count"));
851
- y(this, O, i);
791
+ f(this, W);
792
+ f(this, V, -1);
793
+ v(this, "count", /* @__PURE__ */ c(() => e(this, W).rawRecords.length, "count"));
794
+ g(this, W, i);
852
795
  }
853
796
  get at() {
854
- return e(this, Y);
797
+ return e(this, V);
855
798
  }
856
799
  set at(i) {
857
- var s, r;
858
- y(this, Y, parseInt(i, 10));
859
- const t = ((r = (s = e(this, O).owner).querySelector) == null ? void 0 : r.call(s, ".ng-container-body")) || e(this, O).owner.body;
860
- t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, Y)}"]`) && setTimeout(() => {
861
- var n, o;
862
- (o = (n = e(this, O).owner).scrollTo_V1) == null || o.call(n, e(this, Y));
800
+ var s, n;
801
+ g(this, V, parseInt(i, 10));
802
+ const t = ((n = (s = e(this, W).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, W).owner.body;
803
+ t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, V)}"]`) && setTimeout(() => {
804
+ var r, o;
805
+ (o = (r = e(this, W).owner).scrollTo_V1) == null || o.call(r, e(this, V));
863
806
  });
864
807
  }
865
808
  };
866
- O = new WeakMap(), Y = new WeakMap(), h(ze, "ngRow");
867
- let ke = ze;
868
- var q, x, T, Z, pe, B, me, se, we, xe, j;
869
- const k = class k {
809
+ W = new WeakMap(), V = new WeakMap(), c($e, "ngRow");
810
+ let qe = $e;
811
+ var E, m, A, F, be, O, ye, te, pe, me, K;
812
+ const q = class q {
870
813
  constructor(i, t) {
871
- g(this, q);
872
- g(this, x);
873
- g(this, T, []);
874
- g(this, Z, []);
875
- g(this, pe, 0);
876
- g(this, B, []);
877
- g(this, me, /* @__PURE__ */ h(() => {
878
- y(this, B, []);
879
- const i = e(this, q).template || [];
814
+ f(this, E);
815
+ f(this, m);
816
+ f(this, A, []);
817
+ f(this, F, []);
818
+ f(this, be, 0);
819
+ f(this, O, []);
820
+ f(this, ye, /* @__PURE__ */ c(() => {
821
+ g(this, O, []);
822
+ const i = e(this, E).template || [];
880
823
  Array.from(i).forEach((t) => {
881
824
  var s;
882
- e(this, B).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
883
- }), (e(this, x).rawRecords || []).forEach((t) => {
884
- t.__ng || (t.__ng = e(this, se).call(this)), t.__ng.height = e(this, B).slice();
825
+ e(this, O).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
826
+ }), (e(this, m).rawRecords || []).forEach((t) => {
827
+ t.__ng || (t.__ng = e(this, te).call(this)), t.__ng.height = e(this, O).slice();
885
828
  });
886
829
  }, "#initialize"));
887
- S(this, "set", /* @__PURE__ */ h((i) => {
830
+ v(this, "set", /* @__PURE__ */ c((i) => {
888
831
  this.clear(), this.add(i, !1);
889
832
  }, "set"));
890
- g(this, se, /* @__PURE__ */ h(() => ({
891
- rowState: k.ROW_STATE.EMPTY,
833
+ f(this, te, /* @__PURE__ */ c(() => ({
834
+ rowState: q.ROW_STATE.EMPTY,
892
835
  deleted: !1,
893
836
  filtered: !1,
894
- height: e(this, B).slice(),
837
+ height: e(this, O).slice(),
895
838
  o: {},
896
839
  c: {},
897
- _: [0, 0, 0, 0, k.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, B).slice(), -1, {}, {}]
840
+ _: [0, 0, 0, 0, q.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, O).slice(), -1, {}, {}]
898
841
  }), "#getDefaultMeta"));
899
- S(this, "reset", /* @__PURE__ */ h(() => {
900
- y(this, T, []), y(this, Z, []);
842
+ v(this, "reset", /* @__PURE__ */ c(() => {
843
+ g(this, A, []), g(this, F, []);
901
844
  }, "reset"));
902
- S(this, "clear", /* @__PURE__ */ h(() => {
845
+ v(this, "clear", /* @__PURE__ */ c(() => {
903
846
  var i;
904
- e(this, x).rawRecords = [], y(this, T, []), y(this, Z, []), (i = e(this, x).viewRecords) != null && i.reset && e(this, x).viewRecords.reset();
847
+ e(this, m).rawRecords = [], g(this, A, []), g(this, F, []), (i = e(this, m).viewRecords) != null && i.reset && e(this, m).viewRecords.reset();
905
848
  }, "clear"));
906
- g(this, we, /* @__PURE__ */ h((i) => {
907
- var r;
849
+ f(this, pe, /* @__PURE__ */ c((i) => {
850
+ var n;
908
851
  Array.isArray(i) || (i = [i]);
909
- const t = typeof ((r = e(this, q).fields) == null ? void 0 : r.get) == "function" ? e(this, q).fields.get() : Object.keys(i[0] || {}), s = [];
910
- return i.forEach((n) => {
852
+ const t = typeof ((n = e(this, E).fields) == null ? void 0 : n.get) == "function" ? e(this, E).fields.get() : Object.keys(i[0] || {}), s = [];
853
+ return i.forEach((r) => {
911
854
  const o = { v: [] };
912
- t.forEach((c) => {
913
- o.v.push(n[c] !== void 0 && n[c] !== null ? n[c] : "");
855
+ t.forEach((l) => {
856
+ o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
914
857
  }), s.push(o);
915
858
  }), s;
916
859
  }, "#json2Array"));
917
- g(this, xe, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
918
- t.__ng = e(this, se).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
860
+ f(this, me, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
861
+ t.__ng = e(this, te).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = q.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
919
862
  }), i), "#defaultInsert"));
920
- S(this, "add", /* @__PURE__ */ h((i, t = !0) => {
921
- var n;
863
+ v(this, "add", /* @__PURE__ */ c((i, t = !0) => {
864
+ var r;
922
865
  i === void 0 && (i = {});
923
- const s = e(this, we).call(this, i);
924
- e(this, x).rawRecords = e(this, x).rawRecords.concat(e(this, xe).call(this, s)), this.resetRecords();
925
- const r = this.count() - 1;
926
- return t || s.forEach((o, c) => {
927
- const u = e(this, x).rawRecords[r - c];
928
- u && (u.__ng.rowState = k.ROW_STATE.EMPTY);
929
- }), (n = e(this, x).viewRecords) != null && n.reset && e(this, x).viewRecords.reset(), r;
866
+ const s = e(this, pe).call(this, i);
867
+ e(this, m).rawRecords = e(this, m).rawRecords.concat(e(this, me).call(this, s)), this.resetRecords();
868
+ const n = this.count() - 1;
869
+ return t || s.forEach((o, l) => {
870
+ const d = e(this, m).rawRecords[n - l];
871
+ d && (d.__ng.rowState = q.ROW_STATE.EMPTY);
872
+ }), (r = e(this, m).viewRecords) != null && r.reset && e(this, m).viewRecords.reset(), n;
930
873
  }, "add"));
931
- S(this, "delete", /* @__PURE__ */ h((i) => {
874
+ v(this, "delete", /* @__PURE__ */ c((i) => {
932
875
  var s;
933
876
  let t = [];
934
- Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this, x).owner.row.at] : t = [parseInt(i, 10)], t.sort((r, n) => n - r).forEach((r) => {
935
- if (e(this, T)[r]) {
936
- const n = e(this, T)[r].__ng.rowid;
937
- e(this, T)[r].__ng.rowState === k.ROW_STATE.INSERT ? e(this, x).rawRecords = e(this, x).rawRecords.filter((o) => o.__ng.rowid !== n) : e(this, x).rawRecords.forEach((o) => {
938
- o.__ng.rowid === n && (o.__ng.deleted = !0, o.__ng.rowState = k.ROW_STATE.DELETE);
877
+ Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this, m).owner.row.at] : t = [parseInt(i, 10)], t.sort((n, r) => r - n).forEach((n) => {
878
+ if (e(this, A)[n]) {
879
+ const r = e(this, A)[n].__ng.rowid;
880
+ e(this, A)[n].__ng.rowState === q.ROW_STATE.INSERT ? e(this, m).rawRecords = e(this, m).rawRecords.filter((o) => o.__ng.rowid !== r) : e(this, m).rawRecords.forEach((o) => {
881
+ o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = q.ROW_STATE.DELETE);
939
882
  });
940
883
  }
941
- }), this.resetRecords(), (s = e(this, x).viewRecords) != null && s.reset && e(this, x).viewRecords.reset();
884
+ }), this.resetRecords(), (s = e(this, m).viewRecords) != null && s.reset && e(this, m).viewRecords.reset();
942
885
  }, "delete"));
943
- S(this, "setValue", /* @__PURE__ */ h((i, t, s) => {
944
- var u;
886
+ v(this, "setValue", /* @__PURE__ */ c((i, t, s) => {
887
+ var d;
945
888
  i = parseInt(i, 10);
946
- const n = (typeof ((u = e(this, q).fields) == null ? void 0 : u.get) == "function" ? e(this, q).fields.get() : []).indexOf(t);
947
- if (n < 0) return;
889
+ const r = (typeof ((d = e(this, E).fields) == null ? void 0 : d.get) == "function" ? e(this, E).fields.get() : []).indexOf(t);
890
+ if (r < 0) return;
948
891
  const o = this.getValidData()[i];
949
892
  if (!o) return;
950
- const c = o.v[n];
951
- c !== s && o.__ng.rowState !== k.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = c), o.__ng.rowState = k.ROW_STATE.UPDATE), o.v[n] = s, e(this, x).owner.refreshData && e(this, x).owner.refreshData(i);
893
+ const l = o.v[r];
894
+ l !== s && o.__ng.rowState !== q.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = l), o.__ng.rowState = q.ROW_STATE.UPDATE), o.v[r] = s, e(this, m).owner.refreshData && e(this, m).owner.refreshData(i);
952
895
  }, "setValue"));
953
- S(this, "resetRecords", /* @__PURE__ */ h(() => {
954
- y(this, Z, e(this, x).rawRecords.filter((i) => !i.__ng.deleted)), y(this, T, e(this, x).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, x).rawRecords.forEach((i, t) => {
896
+ v(this, "resetRecords", /* @__PURE__ */ c(() => {
897
+ g(this, F, e(this, m).rawRecords.filter((i) => !i.__ng.deleted)), g(this, A, e(this, m).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, m).rawRecords.forEach((i, t) => {
955
898
  i.__ng.rowidx = t;
956
- }), e(this, T).forEach((i, t) => {
899
+ }), e(this, A).forEach((i, t) => {
957
900
  i.__ng.i = t;
958
901
  });
959
902
  }, "resetRecords"));
960
- S(this, "getValidData", /* @__PURE__ */ h(() => (e(this, T).length === 0 && e(this, x).rawRecords.length > 0 && this.resetRecords(), e(this, T)), "getValidData"));
961
- g(this, j, /* @__PURE__ */ h((i) => {
903
+ v(this, "getValidData", /* @__PURE__ */ c(() => (e(this, A).length === 0 && e(this, m).rawRecords.length > 0 && this.resetRecords(), e(this, A)), "getValidData"));
904
+ f(this, K, /* @__PURE__ */ c((i) => {
962
905
  var s;
963
906
  if (!i) return i;
964
- const t = typeof ((s = e(this, q).fields) == null ? void 0 : s.get) == "function" ? e(this, q).fields.get() : [];
965
- return Array.isArray(i) ? i.filter((r) => !r.__ng.deleted).map((r) => {
966
- const n = {};
967
- return t.forEach((o, c) => {
968
- n[o] = r.v ? r.v[c] : r[o];
969
- }), n.__ng = r.__ng, n;
907
+ const t = typeof ((s = e(this, E).fields) == null ? void 0 : s.get) == "function" ? e(this, E).fields.get() : [];
908
+ return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
909
+ const r = {};
910
+ return t.forEach((o, l) => {
911
+ r[o] = n.v ? n.v[l] : n[o];
912
+ }), r.__ng = n.__ng, r;
970
913
  }) : i;
971
914
  }, "#conv2"));
972
- S(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
973
- S(this, "get", /* @__PURE__ */ h((i, t) => {
974
- var n;
915
+ v(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
916
+ v(this, "get", /* @__PURE__ */ c((i, t) => {
917
+ var r;
975
918
  const s = this.getValidData();
976
919
  if (!s || s.length <= 0) return;
977
- if (i == null) return e(this, j).call(this, s);
920
+ if (i == null) return e(this, K).call(this, s);
978
921
  if (i < 0 || i >= s.length) return null;
979
- const r = typeof ((n = e(this, q).fields) == null ? void 0 : n.get) == "function" ? e(this, q).fields.get() : [];
922
+ const n = typeof ((r = e(this, E).fields) == null ? void 0 : r.get) == "function" ? e(this, E).fields.get() : [];
980
923
  if (t != null) {
981
- const o = r.indexOf(t);
924
+ const o = n.indexOf(t);
982
925
  return o >= 0 ? s[i].v[o] : null;
983
926
  }
984
- return e(this, j).call(this, s[i]);
927
+ return e(this, K).call(this, s[i]);
985
928
  }, "get"));
986
- y(this, q, i), y(this, x, t), e(this, me).call(this);
929
+ g(this, E, i), g(this, m, t), e(this, ye).call(this);
987
930
  }
988
931
  get source() {
989
- return e(this, j).call(this, e(this, x).rawRecords);
932
+ return e(this, K).call(this, e(this, m).rawRecords);
990
933
  }
991
934
  set source(i) {
992
935
  this.clear(), this.add(i, !1);
993
936
  }
994
937
  get nextId() {
995
- return ++Ye(this, pe)._;
938
+ return ++Pe(this, be)._;
996
939
  }
997
940
  get length() {
998
- return e(this, T).length;
941
+ return e(this, A).length;
999
942
  }
1000
943
  getRowCount() {
1001
944
  return this.length;
1002
945
  }
1003
946
  };
1004
- q = new WeakMap(), x = new WeakMap(), T = new WeakMap(), Z = new WeakMap(), pe = new WeakMap(), B = new WeakMap(), me = new WeakMap(), se = new WeakMap(), we = new WeakMap(), xe = new WeakMap(), j = new WeakMap(), h(k, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1005
- S(k, "ROW_STATE", {
947
+ E = new WeakMap(), m = new WeakMap(), A = new WeakMap(), F = new WeakMap(), be = new WeakMap(), O = new WeakMap(), ye = new WeakMap(), te = new WeakMap(), pe = new WeakMap(), me = new WeakMap(), K = new WeakMap(), c(q, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
948
+ v(q, "ROW_STATE", {
1006
949
  EMPTY: "EMPTY",
1007
950
  NORMAL: "NORMAL",
1008
951
  INSERT: "INSERT",
1009
952
  UPDATE: "UPDATE",
1010
953
  DELETE: "DELETE"
1011
954
  });
1012
- let Le = k;
1013
- const Oe = class Oe {
955
+ let Te = q;
956
+ const We = class We {
1014
957
  constructor(i) {
1015
- this.owner = i, this.row = new ke(this), this.data = new Le(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
958
+ this.owner = i, this.row = new qe(this), this.data = new Te(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1016
959
  var t;
1017
960
  (t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
1018
961
  }, this.setDataSource = (t) => {
1019
962
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(t || []);
1020
963
  }, this.getRowState = (t) => {
1021
- var r, n;
964
+ var n, r;
1022
965
  const s = parseInt(t, 10);
1023
966
  if (!(s >= this.data.count()))
1024
- return (n = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : n.rowState;
967
+ return (r = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : r.rowState;
1025
968
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (t) => {
1026
969
  this.row.at = t;
1027
- }, this.scrollTo_V1 = (t) => (t < 0 && (t = 0), t >= this.rawRecords.length && (t = this.rawRecords.length - 1), this.viewRecords.rawIndex = t, this.viewRecords.reset && this.viewRecords.reset(), !(t <= 0 || t >= this.rawRecords.length - 1)), this.getColumn = (t, s) => this.data.get(t, s), this.setColumn = (t, s, r) => {
1028
- t = parseInt(t, 10), this.data.setValue(t, s, r);
970
+ }, this.scrollTo_V1 = (t) => (t < 0 && (t = 0), t >= this.rawRecords.length && (t = this.rawRecords.length - 1), this.viewRecords.rawIndex = t, this.viewRecords.reset && this.viewRecords.reset(), !(t <= 0 || t >= this.rawRecords.length - 1)), this.getColumn = (t, s) => this.data.get(t, s), this.setColumn = (t, s, n) => {
971
+ t = parseInt(t, 10), this.data.setValue(t, s, n);
1029
972
  }, this.setDataSource([]);
1030
973
  }
1031
974
  };
1032
- h(Oe, "ngDataManager");
1033
- let Ce = Oe;
1034
- var U, ve;
1035
- const Be = class Be extends HTMLElement {
975
+ c(We, "ngDataManager");
976
+ let ke = We;
977
+ var X, we;
978
+ const Oe = class Oe extends HTMLElement {
1036
979
  constructor() {
1037
980
  super();
1038
981
  //#created = false;
1039
- g(this, U);
1040
- g(this, ve);
1041
- this.attachShadow({ mode: "open" }), y(this, U, new Ce(this));
982
+ f(this, X);
983
+ f(this, we);
984
+ this.attachShadow({ mode: "open" }), g(this, X, new ke(this));
1042
985
  }
1043
986
  connectedCallback() {
1044
- y(this, ve, new Te(this)), L.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
987
+ g(this, we, new Ae(this)), Z.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1045
988
  }
1046
989
  disconnectedCallback() {
1047
- L.log("NineTable disconnected.");
990
+ Z.log("NineTable disconnected.");
1048
991
  }
1049
992
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1050
993
  get data() {
1051
- return e(this, U).data;
994
+ return e(this, X).data;
1052
995
  }
1053
996
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1054
997
  get row() {
1055
- return e(this, U).row;
998
+ return e(this, X).row;
1056
999
  }
1057
1000
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1058
1001
  get dataManager() {
1059
- return e(this, U);
1002
+ return e(this, X);
1060
1003
  }
1061
1004
  };
1062
- U = new WeakMap(), ve = new WeakMap(), h(Be, "NineTable");
1063
- let _e = Be;
1064
- customElements.get("nine-table") || customElements.define("nine-table", _e);
1005
+ X = new WeakMap(), we = new WeakMap(), c(Oe, "NineTable");
1006
+ let Le = Oe;
1007
+ customElements.get("nine-table") || customElements.define("nine-table", Le);
1065
1008
  //# sourceMappingURL=nine-table.js.map