@ninebone/table 0.0.229 β†’ 0.0.230

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.
@@ -2,49 +2,49 @@ var $e = Object.defineProperty;
2
2
  var We = (w) => {
3
3
  throw TypeError(w);
4
4
  };
5
- var Be = (w, i, t) => i in w ? $e(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
5
+ var De = (w, i, t) => i in w ? $e(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
6
6
  var a = (w, i) => $e(w, "name", { value: i, configurable: !0 });
7
- var x = (w, i, t) => Be(w, typeof i != "symbol" ? i + "" : i, t), ze = (w, i, t) => i.has(w) || We("Cannot " + t);
8
- var e = (w, i, t) => (ze(w, i, "read from private field"), t ? t.call(w) : i.get(w)), d = (w, i, t) => i.has(w) ? We("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), y = (w, i, t, s) => (ze(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
9
- var Oe = (w, i, t, s) => ({
7
+ var x = (w, i, t) => De(w, typeof i != "symbol" ? i + "" : i, t), Oe = (w, i, t) => i.has(w) || We("Cannot " + t);
8
+ var e = (w, i, t) => (Oe(w, i, "read from private field"), t ? t.call(w) : i.get(w)), d = (w, i, t) => i.has(w) ? We("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), g = (w, i, t, s) => (Oe(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
9
+ var ze = (w, i, t, s) => ({
10
10
  set _(n) {
11
- y(w, i, n, t);
11
+ g(w, i, n, t);
12
12
  },
13
13
  get _() {
14
14
  return e(w, i, s);
15
15
  }
16
16
  });
17
- import { trace as De } from "@ninebone/util";
18
- const qe = class qe extends De.constructor {
17
+ import { trace as Ne } from "@ninebone/util";
18
+ const qe = class qe extends Ne.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
23
  a(qe, "Trace");
24
24
  let me = qe;
25
- const G = new me();
26
- var L, B, p, D, N, P, se, V, ne;
25
+ const te = new me();
26
+ var L, D, y, N, B, P, se, V, ne;
27
27
  const ke = class ke extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  d(this, L);
31
- d(this, B, !1);
32
- d(this, p);
33
- d(this, D);
31
+ d(this, D, !1);
32
+ d(this, y);
34
33
  d(this, N);
34
+ d(this, B);
35
35
  d(this, P);
36
36
  d(this, se, /* @__PURE__ */ a(() => {
37
37
  if (!e(this, L)) return;
38
38
  const t = e(this, L).querySelector(".ng-container-body");
39
- t && (y(this, P, new ResizeObserver(() => {
39
+ t && (g(this, P, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), e(this, P).observe(t));
42
42
  }, "#observeResize"));
43
43
  x(this, "refresh", /* @__PURE__ */ a(() => {
44
- if (!e(this, L) || !e(this, p) || e(this, B)) return;
45
- const t = e(this, p).container, s = t.querySelector("table");
44
+ if (!e(this, L) || !e(this, y) || e(this, D)) return;
45
+ const t = e(this, y).container, s = t.querySelector("table");
46
46
  if (!s) return;
47
- const n = e(this, p).track, r = e(this, p).thumb, o = e(this, L).querySelector(".ng-container-bottom"), c = t.clientWidth, f = s.scrollWidth;
47
+ const n = e(this, y).track, r = e(this, y).thumb, o = e(this, L).querySelector(".ng-container-bottom"), c = t.clientWidth, f = s.scrollWidth;
48
48
  if (c !== 0 && f > c)
49
49
  o && (o.style.display = "flex");
50
50
  else {
@@ -56,64 +56,64 @@ const ke = class ke extends HTMLElement {
56
56
  const h = Math.max(Math.min(l * (c / f), l), 20);
57
57
  r.style.width = `${h}px`;
58
58
  const u = t.scrollLeft, b = f - c;
59
- let g = 0;
60
- b > 0 && (g = parseInt(u / b * (l - h), 10)), g < 0 && (g = 0);
59
+ let p = 0;
60
+ b > 0 && (p = parseInt(u / b * (l - h), 10)), p < 0 && (p = 0);
61
61
  const m = l - h;
62
- g > m && (g = m), r.style.left = `${g}px`, G.log(g), e(this, p).left.disabled = g === 0, e(this, p).right.disabled = g >= m - 1;
62
+ p > m && (p = m), r.style.left = `${p}px`, te.log(p), e(this, y).left.disabled = p === 0, e(this, y).right.disabled = p >= m - 1;
63
63
  }, "refresh"));
64
64
  d(this, V, /* @__PURE__ */ a((t) => {
65
- if (!e(this, p)) return !1;
66
- const s = e(this, p).container, n = s.querySelector("table");
65
+ if (!e(this, y)) return !1;
66
+ const s = e(this, y).container, n = s.querySelector("table");
67
67
  if (!n) return !1;
68
- const r = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
68
+ const r = e(this, y).track.getBoundingClientRect(), o = e(this, y).thumb.clientWidth;
69
69
  let c = t;
70
70
  c < 0 && (c = 0);
71
71
  const f = r.width - o;
72
- c > f && (c = f), 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 >= f - 1;
72
+ c > f && (c = f), c = parseInt(c, 10), e(this, y).thumb.style.left = `${c}px`, e(this, y).left.disabled = c === 0, e(this, y).right.disabled = c >= f - 1;
73
73
  const l = s.clientWidth, h = n.scrollWidth;
74
74
  let u = f > 0 ? -c * (h - l) / f : 0;
75
75
  return -u > h - l && (u = -(h - l)), -u + 5 > h - l && (u = -(h - l)), l >= h && (u = 0), n.style.transform = `translateX(${u}px)`, c > 0 && c < f - 1;
76
76
  }, "#thumbMoveTo"));
77
77
  d(this, ne, /* @__PURE__ */ a(() => {
78
78
  const t = /* @__PURE__ */ a((n) => {
79
- clearInterval(e(this, D)), clearInterval(e(this, N));
80
- const r = parseInt(e(this, p).thumb.style.left || 0, 10);
81
- e(this, V).call(this, r + n), y(this, D, setInterval(() => {
82
- clearInterval(e(this, D)), y(this, N, setInterval(() => {
83
- const o = parseInt(e(this, p).thumb.style.left || 0, 10);
84
- e(this, V).call(this, o + n) || clearInterval(e(this, N));
79
+ clearInterval(e(this, N)), clearInterval(e(this, B));
80
+ const r = parseInt(e(this, y).thumb.style.left || 0, 10);
81
+ e(this, V).call(this, r + n), g(this, N, setInterval(() => {
82
+ clearInterval(e(this, N)), g(this, B, setInterval(() => {
83
+ const o = parseInt(e(this, y).thumb.style.left || 0, 10);
84
+ e(this, V).call(this, o + n) || clearInterval(e(this, B));
85
85
  }, 50));
86
86
  }, 500));
87
87
  }, "delayScroll"), s = /* @__PURE__ */ a(() => {
88
- clearInterval(e(this, D)), clearInterval(e(this, N));
88
+ clearInterval(e(this, N)), clearInterval(e(this, B));
89
89
  }, "clearTimer");
90
90
  ["mouseup", "mouseleave", "touchend"].forEach((n) => {
91
- e(this, p).left.addEventListener(n, s), e(this, p).right.addEventListener(n, s), e(this, p).track.addEventListener(n, s);
92
- }), e(this, p).left.addEventListener("mousedown", (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
93
  n.button === 0 && t(-20);
94
- }), e(this, p).right.addEventListener("mousedown", (n) => {
94
+ }), e(this, y).right.addEventListener("mousedown", (n) => {
95
95
  n.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", (n) => {
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
97
  if (n.button !== 0) return;
98
98
  n.preventDefault();
99
- const r = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
99
+ const r = e(this, y).track.getBoundingClientRect(), o = e(this, y).thumb.clientWidth;
100
100
  e(this, V).call(this, n.clientX - r.left - o / 2);
101
- }), e(this, p).thumb.addEventListener("mousedown", (n) => {
101
+ }), e(this, y).thumb.addEventListener("mousedown", (n) => {
102
102
  if (n.button !== 0) return;
103
- n.stopPropagation(), n.preventDefault(), y(this, B, !0), this.shiftX = n.clientX - e(this, p).thumb.getBoundingClientRect().left;
103
+ n.stopPropagation(), n.preventDefault(), g(this, D, !0), this.shiftX = n.clientX - e(this, y).thumb.getBoundingClientRect().left;
104
104
  const r = /* @__PURE__ */ a((c) => {
105
- if (!e(this, B)) return;
106
- const f = e(this, p).track.getBoundingClientRect();
105
+ if (!e(this, D)) return;
106
+ const f = e(this, y).track.getBoundingClientRect();
107
107
  e(this, V).call(this, c.clientX - f.left - this.shiftX);
108
108
  }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
109
- y(this, B, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
109
+ g(this, D, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
110
110
  }, "onMouseUp");
111
111
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
112
112
  });
113
113
  }, "#init"));
114
114
  }
115
115
  connectedCallback() {
116
- if (y(this, L, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, L)) return;
116
+ if (g(this, L, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, L)) return;
117
117
  this.innerHTML = `
118
118
  <style>
119
119
  nine-table-hscrollbar {
@@ -183,7 +183,7 @@ const ke = class ke extends HTMLElement {
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"),
@@ -197,19 +197,19 @@ const ke = class ke extends HTMLElement {
197
197
  e(this, P) && e(this, P).disconnect();
198
198
  }
199
199
  };
200
- L = new WeakMap(), B = new WeakMap(), p = new WeakMap(), D = new WeakMap(), N = new WeakMap(), P = new WeakMap(), se = new WeakMap(), V = new WeakMap(), ne = new WeakMap(), a(ke, "NineTableHScrollBar");
200
+ L = new WeakMap(), D = new WeakMap(), y = new WeakMap(), N = new WeakMap(), B = new WeakMap(), P = new WeakMap(), se = new WeakMap(), V = new WeakMap(), ne = new WeakMap(), a(ke, "NineTableHScrollBar");
201
201
  let we = ke;
202
202
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", we);
203
- var $, _, E, W, H, M, re, oe, le, J;
203
+ var H, C, R, I, $, W, re, oe, le, G;
204
204
  const Le = class Le {
205
205
  constructor(i) {
206
- d(this, $);
207
- d(this, _, []);
208
- d(this, E, null);
209
- d(this, W, null);
210
- d(this, H, 0);
211
- d(this, M, 0);
212
- x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this, E), "getRowHeight"));
206
+ d(this, H);
207
+ d(this, C, []);
208
+ d(this, R, null);
209
+ d(this, I, null);
210
+ d(this, $, 0);
211
+ d(this, W, 0);
212
+ x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this, R), "getRowHeight"));
213
213
  d(this, re, /* @__PURE__ */ a(() => {
214
214
  e(this, oe).call(this);
215
215
  }, "#init"));
@@ -217,58 +217,58 @@ const Le = class Le {
217
217
  * 🎯 뷰포트 크기 λ³€ν™” μ‹œμ μ— 높이 계산 및 ν•„μš”ν•œ ν–‰ 개수 산정·캐싱을 μ™„κ²°
218
218
  */
219
219
  d(this, oe, /* @__PURE__ */ a(() => {
220
- !e(this, $) || !(e(this, $) instanceof HTMLElement) || (y(this, W, new ResizeObserver((i) => {
221
- for (const t of i) {
222
- const s = t.target;
223
- if (!s.classList.contains("active"))
224
- continue;
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
- let o = 0;
229
- const c = s.querySelector(".ng-container-body") || s, f = c.querySelector("thead"), l = c.querySelector("tfoot");
230
- f && (o += f.offsetHeight || f.getBoundingClientRect().height), l && (o += l.offsetHeight || l.getBoundingClientRect().height);
231
- const h = Math.max(r - o, 100);
232
- if (e(this, H) !== h && (y(this, H, h), e(this, E) !== null)) {
233
- const u = Math.ceil(e(this, H) / e(this, E));
234
- y(this, M, u + 20), G.log(`[RowManager] Resized. Height: ${e(this, H)}px | Target Rows: ${e(this, M)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
235
- const g = s.querySelector(b);
236
- g && g.querySelector("tbody") && e(this, J).call(this, g);
237
- });
220
+ if (!e(this, H) || !(e(this, H) instanceof HTMLElement)) return;
221
+ let i = null;
222
+ g(this, I, new ResizeObserver((t) => {
223
+ for (const s of t) {
224
+ const n = s.target;
225
+ n.classList.contains("active") && (clearTimeout(i), i = setTimeout(() => {
226
+ const r = s.contentRect.height;
227
+ if (r <= 0) return;
228
+ const o = n.clientHeight || r;
229
+ let c = 0;
230
+ const f = n.querySelector(".ng-container-body");
231
+ if (!f) return;
232
+ const l = f.querySelector("thead");
233
+ l && (c += l.offsetHeight);
234
+ const h = Math.max(o - c, 100);
235
+ if (e(this, $) !== h && e(this, R)) {
236
+ g(this, $, h);
237
+ const u = Math.ceil(e(this, $) / e(this, R));
238
+ g(this, W, u + 20), e(this, G).call(this, f);
238
239
  }
239
- }
240
+ }, 100));
240
241
  }
241
- })), e(this, W).observe(e(this, $)));
242
+ })), e(this, I).observe(e(this, H));
242
243
  }, "#initResizeObserver"));
243
244
  // 🎯 ν…œν”Œλ¦Ώ μΆ”μΆœ, 높이 μΈ‘μ •, 초기 λ Œλ”λ§μ„ μˆœμ„œμ— 맞게 λ‚΄λΆ€μ—μ„œ 일괄 처리
244
245
  x(this, "initialize", /* @__PURE__ */ a((i) => {
245
- const t = e(this, $).querySelector(".ng-container-body"), s = i.querySelector("tbody"), n = Array.from(s.querySelectorAll("tr"));
246
- y(this, _, n.map((r) => r.cloneNode(!0))), y(this, E, null), e(this, le).call(this, t), e(this, J).call(this, t);
246
+ const t = e(this, H).querySelector(".ng-container-body"), s = i.querySelector("tbody"), n = Array.from(s.querySelectorAll("tr"));
247
+ g(this, C, n.map((r) => r.cloneNode(!0))), g(this, R, null), e(this, le).call(this, t), e(this, G).call(this, t);
247
248
  }, "initialize"));
248
249
  d(this, le, /* @__PURE__ */ a((i) => {
249
- if (e(this, E) !== null && e(this, E) > 0)
250
- return e(this, E);
251
- if (e(this, _).length === 0)
250
+ if (e(this, R) !== null && e(this, R) > 0)
251
+ return e(this, R);
252
+ if (e(this, C).length === 0)
252
253
  throw new Error("[RowManager] Template TRs are empty.");
253
254
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
254
255
  if (!t) return 24;
255
256
  t.querySelectorAll("tr:not(.nodata)").forEach((u) => u.remove());
256
257
  const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment();
257
- e(this, _).forEach((u) => {
258
+ e(this, C).forEach((u) => {
258
259
  n.appendChild(u.cloneNode(!0));
259
260
  }), s ? s.before(n) : t.appendChild(n);
260
261
  const r = i.closest("nine-table-sheet"), o = r ? r.style.display : "", c = r ? r.style.visibility : "", f = r ? r.style.position : "";
261
262
  r && (r.style.display === "none" || window.getComputedStyle(r).display === "none") && (r.style.display = "block", r.style.visibility = "hidden", r.style.position = "absolute");
262
263
  let l = 0;
263
264
  if (t.querySelectorAll("tr:not(.nodata)").forEach((u, b) => {
264
- const g = u.offsetHeight || u.getBoundingClientRect().height;
265
- l += g;
266
- }), r && (r.style.display = o, r.style.visibility = c, r.style.position = f), y(this, E, l), e(this, H) > 0) {
267
- const u = Math.ceil(e(this, H) / e(this, E));
268
- y(this, M, u + 20);
265
+ l += u.offsetHeight || u.getBoundingClientRect().height;
266
+ }), r && (r.style.display = o, r.style.visibility = c, r.style.position = f), g(this, R, l), e(this, $) > 0) {
267
+ const u = Math.ceil(e(this, $) / e(this, R));
268
+ g(this, W, u + 20);
269
269
  } else
270
- y(this, M, 40);
271
- return console.log(`[RowManager] Template Height Cached: ${e(this, E)}px | RowCount: ${e(this, M)}`), e(this, E);
270
+ g(this, W, 40);
271
+ return console.log(`[RowManager] Template Height Cached: ${e(this, R)}px | RowCount: ${e(this, W)}`), e(this, R);
272
272
  }, "#measureAndCacheHeight"));
273
273
  /**
274
274
  * 🎯 μΊμ‹œλœ ν–‰ 개수 λ°˜ν™˜ (없을 λ•Œλ§Œ μ΅œμ†Œν•œμ˜ λ°©μ–΄ μ—°μ‚°)
@@ -286,87 +286,87 @@ const Le = class Le {
286
286
  /**
287
287
  * 🎯 μΊμ‹œλœ ν–‰ 개수λ₯Ό κ³§λ°”λ‘œ κ°€μ Έμ™€μ„œ TR λΌˆλŒ€ μ£Όμž… (쀑볡 계산 제거)
288
288
  */
289
- d(this, J, /* @__PURE__ */ a((i) => {
290
- if (e(this, _).length === 0) return;
289
+ d(this, G, /* @__PURE__ */ a((i) => {
290
+ if (e(this, C).length === 0) return;
291
291
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
292
292
  if (!t) return;
293
293
  t.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
294
- const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), r = e(this, M);
294
+ const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), r = e(this, W);
295
295
  for (let o = 0; o < r; o++)
296
- e(this, _).forEach((c) => {
296
+ e(this, C).forEach((c) => {
297
297
  n.appendChild(c.cloneNode(!0));
298
298
  });
299
299
  s ? s.before(n) : t.appendChild(n), console.log(`[RowManager] Rendered ${r} sets into DOM.`);
300
300
  }, "#renderRows"));
301
301
  x(this, "destroy", /* @__PURE__ */ a(() => {
302
- e(this, W) && (e(this, W).disconnect(), y(this, W, null));
302
+ e(this, I) && (e(this, I).disconnect(), g(this, I, null));
303
303
  }, "destroy"));
304
- y(this, $, i), e(this, re).call(this);
304
+ g(this, H, i), e(this, re).call(this);
305
305
  }
306
306
  get templateLength() {
307
- return e(this, _).length || 1;
307
+ return e(this, C).length || 1;
308
308
  }
309
309
  };
310
- $ = new WeakMap(), _ = new WeakMap(), E = new WeakMap(), W = new WeakMap(), H = new WeakMap(), M = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), J = new WeakMap(), a(Le, "RowManager");
310
+ H = new WeakMap(), C = new WeakMap(), R = new WeakMap(), I = new WeakMap(), $ = new WeakMap(), W = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), G = new WeakMap(), a(Le, "RowManager");
311
311
  let ve = Le;
312
- var I, U, ae, ce;
312
+ var M, U, ae, ce;
313
313
  const j = class j extends HTMLElement {
314
314
  constructor() {
315
315
  super();
316
- d(this, I, null);
316
+ d(this, M, null);
317
317
  d(this, U);
318
318
  x(this, "generate", /* @__PURE__ */ a((t) => {
319
319
  if (!t) return;
320
320
  const s = /* @__PURE__ */ a((l) => {
321
321
  const h = /* @__PURE__ */ a((b) => {
322
322
  if (b.querySelector("colgroup")) return;
323
- const g = b.querySelector("tbody tr") || b.querySelector("tr"), m = g ? g.querySelectorAll("th, td").length : 1, R = document.createElement("colgroup"), T = Math.max(Math.floor(b.clientWidth / m), 100);
324
- for (let C = 0; C < m; C++) {
323
+ const p = b.querySelector("tbody tr") || b.querySelector("tr"), m = p ? p.querySelectorAll("th, td").length : 1, E = document.createElement("colgroup"), T = Math.max(Math.floor(b.clientWidth / m), 100);
324
+ for (let _ = 0; _ < m; _++) {
325
325
  const Y = document.createElement("col");
326
- Y.setAttribute("width", T), R.appendChild(Y);
326
+ Y.setAttribute("width", T), E.appendChild(Y);
327
327
  }
328
- b.prepend(R);
328
+ b.prepend(E);
329
329
  }, "ensureColgroup"), u = /* @__PURE__ */ a((b) => {
330
330
  if (b.querySelector("thead")) return;
331
- const g = document.createElement("thead"), m = b.querySelector("colgroup");
332
- m ? m.after(g) : b.prepend(g);
331
+ const p = document.createElement("thead"), m = b.querySelector("colgroup");
332
+ m ? m.after(p) : b.prepend(p);
333
333
  }, "ensureThead");
334
334
  return h(l), u(l), l.classList.add("nine-table-element"), l;
335
335
  }, "initializeTable"), n = t.cloneNode(!0);
336
- y(this, I, s(n)), e(this, I).style.display = "table";
336
+ g(this, M, s(n)), e(this, M).style.display = "table";
337
337
  const r = this.querySelector(".ng-container-left"), o = this.querySelector(".ng-container-body"), c = this.querySelector(".ng-container-right"), f = /* @__PURE__ */ a((l, h, u = !1) => {
338
- const b = l.cloneNode(!0), g = Array.from(b.querySelectorAll("colgroup col")), m = [];
339
- return g.forEach((R, T) => {
340
- const C = R.getAttribute("fixed");
338
+ const b = l.cloneNode(!0), p = Array.from(b.querySelectorAll("colgroup col")), m = [];
339
+ return p.forEach((E, T) => {
340
+ const _ = E.getAttribute("fixed");
341
341
  let Y = !1;
342
- u ? Y = C !== "left" && C !== "right" : Y = C === h, Y || m.push(T);
343
- }), m.reverse().forEach((R) => {
344
- g[R] && g[R].remove(), b.querySelectorAll("tr").forEach((T) => {
345
- const C = T.querySelectorAll("th, td");
346
- C[R] && C[R].remove();
342
+ u ? Y = _ !== "left" && _ !== "right" : Y = _ === h, Y || m.push(T);
343
+ }), m.reverse().forEach((E) => {
344
+ p[E] && p[E].remove(), b.querySelectorAll("tr").forEach((T) => {
345
+ const _ = T.querySelectorAll("th, td");
346
+ _[E] && _[E].remove();
347
347
  });
348
348
  }), b;
349
349
  }, "filterTableByFixed");
350
350
  if (o) {
351
- const l = f(e(this, I), null, !0);
352
- o.innerHTML = "", o.appendChild(l), e(this, U).initialize(e(this, I));
351
+ const l = f(e(this, M), null, !0);
352
+ o.innerHTML = "", o.appendChild(l), e(this, U).initialize(e(this, M));
353
353
  }
354
354
  if (r) {
355
- const l = f(e(this, I), "left", !1);
355
+ const l = f(e(this, M), "left", !1);
356
356
  let h = 0;
357
357
  l.querySelectorAll("col").forEach((b) => {
358
- const g = parseInt(b.getAttribute("width"), 10);
359
- isNaN(g) || (h += g);
358
+ const p = parseInt(b.getAttribute("width"), 10);
359
+ isNaN(p) || (h += p);
360
360
  }), r.innerHTML = "", r.appendChild(l);
361
361
  const u = h > 0 ? h : 0;
362
362
  r.style.flex = `0 0 ${u}px`, r.style.width = `${u}px`;
363
363
  }
364
364
  if (c) {
365
- const l = f(e(this, I), "right", !1);
365
+ const l = f(e(this, M), "right", !1);
366
366
  let h = 0;
367
367
  l.querySelectorAll("col").forEach((b) => {
368
- const g = parseInt(b.getAttribute("width"), 10);
369
- isNaN(g) || (h += g);
368
+ const p = parseInt(b.getAttribute("width"), 10);
369
+ isNaN(p) || (h += p);
370
370
  }), c.innerHTML = "", c.appendChild(l);
371
371
  const u = h > 0 ? h : 0;
372
372
  c.style.flex = `0 0 ${u}px`, c.style.width = `${u}px`;
@@ -397,16 +397,16 @@ const j = class j extends HTMLElement {
397
397
  e(this, ce).call(this), new MutationObserver((t) => {
398
398
  const s = /* @__PURE__ */ a(() => {
399
399
  requestAnimationFrame(() => {
400
- var u, b, g;
400
+ var u, b, p;
401
401
  const n = this.querySelector(".ng-container-left table"), r = this.querySelector(".ng-container-body table"), o = this.querySelector(".ng-container-right table");
402
402
  if (!r) return;
403
403
  const c = n ? Array.from(n.querySelectorAll("tr")) : [], f = Array.from(r.querySelectorAll("tr")), l = o ? Array.from(o.querySelectorAll("tr")) : [], h = Math.max(c.length, f.length, l.length);
404
404
  for (let m = 0; m < h; m++) {
405
- const R = [
405
+ const E = [
406
406
  ((u = c[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
407
407
  ((b = f[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0,
408
- ((g = l[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0
409
- ], T = Math.max(...R);
408
+ ((p = l[m]) == null ? void 0 : p.getBoundingClientRect().height) || 0
409
+ ], T = Math.max(...E);
410
410
  T > 0 && (c[m] && (c[m].style.height = `${T}px`), f[m] && (f[m].style.height = `${T}px`), l[m] && (l[m].style.height = `${T}px`));
411
411
  }
412
412
  });
@@ -541,20 +541,20 @@ const j = class j extends HTMLElement {
541
541
  </div>
542
542
  `;
543
543
  }, "#render"));
544
- y(this, U, new ve(this));
544
+ g(this, U, new ve(this));
545
545
  }
546
546
  connectedCallback() {
547
547
  e(this, ae).call(this);
548
548
  }
549
549
  disconnectedCallback() {
550
- this.innerHTML = "", G.log("NineTableSheet destroyed.");
550
+ this.innerHTML = "", te.log("NineTableSheet destroyed.");
551
551
  }
552
552
  };
553
- I = new WeakMap(), U = new WeakMap(), ae = new WeakMap(), ce = new WeakMap(), a(j, "NineTableSheet"), x(j, "SCROLLBAR_SIZE", 16);
553
+ M = new WeakMap(), U = new WeakMap(), ae = new WeakMap(), ce = new WeakMap(), a(j, "NineTableSheet"), x(j, "SCROLLBAR_SIZE", 16);
554
554
  let ie = j;
555
555
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ie);
556
- var he, Q;
557
- const Ce = class Ce extends HTMLElement {
556
+ var he, J;
557
+ const _e = class _e extends HTMLElement {
558
558
  constructor() {
559
559
  super();
560
560
  d(this, he, /* @__PURE__ */ a(() => {
@@ -562,17 +562,17 @@ const Ce = class Ce extends HTMLElement {
562
562
  (t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
563
563
  var o;
564
564
  const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
565
- e(this, Q).call(this, r, n);
566
- }), e(this, Q).call(this, 0, !1);
565
+ e(this, J).call(this, r, n);
566
+ }), e(this, J).call(this, 0, !1);
567
567
  }, "#init"));
568
- d(this, Q, /* @__PURE__ */ a((t, s = !1) => {
568
+ d(this, J, /* @__PURE__ */ a((t, s = !1) => {
569
569
  const n = /* @__PURE__ */ a(() => {
570
570
  const h = Array.from(this.querySelectorAll("nine-table-sheet"));
571
- Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
572
- const b = h.filter((g) => g.classList.contains("active"));
573
- b.length < 2 || b.forEach((g) => {
574
- const m = parseInt(g.getAttribute("data-index"), 10), R = this.querySelector(`nine-splitter[data-split-index="${m}"]`), T = h[m + 1];
575
- R && T && T.classList.contains("active") && R.style.setProperty("display", "flex");
571
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((p) => p.style.setProperty("display", "none"));
572
+ const b = h.filter((p) => p.classList.contains("active"));
573
+ b.length < 2 || b.forEach((p) => {
574
+ const m = parseInt(p.getAttribute("data-index"), 10), E = this.querySelector(`nine-splitter[data-split-index="${m}"]`), T = h[m + 1];
575
+ E && T && T.classList.contains("active") && E.style.setProperty("display", "flex");
576
576
  });
577
577
  }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), c = r.querySelectorAll(".nine-tab-item"), f = o.querySelectorAll("nine-table-sheet");
578
578
  if (!c[t]) return;
@@ -601,20 +601,20 @@ const Ce = class Ce extends HTMLElement {
601
601
  e(this, he).call(this);
602
602
  }
603
603
  };
604
- he = new WeakMap(), Q = new WeakMap(), a(Ce, "NineTableSheets");
605
- let xe = Ce;
604
+ he = new WeakMap(), J = new WeakMap(), a(_e, "NineTableSheets");
605
+ let xe = _e;
606
606
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", xe);
607
- var S, de, ee, fe;
608
- const _e = class _e {
607
+ var S, de, Q, fe;
608
+ const Ce = class Ce {
609
609
  constructor(i) {
610
610
  d(this, S);
611
611
  d(this, de, /* @__PURE__ */ a(() => {
612
612
  e(this, fe).call(this), new ResizeObserver((i) => {
613
613
  for (let t of i)
614
- e(this, S).getAttribute("auto-height") === "true" && e(this, ee).call(this);
614
+ e(this, S).getAttribute("auto-height") === "true" && e(this, Q).call(this);
615
615
  }).observe(e(this, S));
616
616
  }, "#init"));
617
- d(this, ee, /* @__PURE__ */ a(() => {
617
+ d(this, Q, /* @__PURE__ */ a(() => {
618
618
  var f, l;
619
619
  const i = Array.from(e(this, S).shadowRoot.querySelectorAll("nine-table-sheet.active"));
620
620
  if (i.length === 0) return;
@@ -728,39 +728,39 @@ const _e = class _e {
728
728
  const c = e(this, S).shadowRoot.querySelectorAll("nine-table-sheet");
729
729
  c == null || c.forEach((f, l) => {
730
730
  t[l] && setTimeout(() => {
731
- f.generate(t[l]), s && e(this, ee).call(this);
731
+ f.generate(t[l]), s && e(this, Q).call(this);
732
732
  });
733
733
  });
734
734
  }, "#render"));
735
- y(this, S, i), e(this, de).call(this);
735
+ g(this, S, i), e(this, de).call(this);
736
736
  }
737
737
  };
738
- S = new WeakMap(), de = new WeakMap(), ee = new WeakMap(), fe = new WeakMap(), a(_e, "LayoutManager");
739
- let Se = _e;
740
- var z, X;
741
- const He = class He {
738
+ S = new WeakMap(), de = new WeakMap(), Q = new WeakMap(), fe = new WeakMap(), a(Ce, "LayoutManager");
739
+ let Se = Ce;
740
+ var O, X;
741
+ const Me = class Me {
742
742
  constructor(i) {
743
- d(this, z);
743
+ d(this, O);
744
744
  d(this, X, -1);
745
- x(this, "count", /* @__PURE__ */ a(() => e(this, z).rawRecords.length, "count"));
746
- y(this, z, i);
745
+ x(this, "count", /* @__PURE__ */ a(() => e(this, O).rawRecords.length, "count"));
746
+ g(this, O, i);
747
747
  }
748
748
  get at() {
749
749
  return e(this, X);
750
750
  }
751
751
  set at(i) {
752
752
  var s, n;
753
- y(this, X, parseInt(i, 10));
754
- const t = ((n = (s = e(this, z).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, z).owner.body;
753
+ g(this, X, parseInt(i, 10));
754
+ const t = ((n = (s = e(this, O).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, O).owner.body;
755
755
  t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, X)}"]`) && setTimeout(() => {
756
756
  var r, o;
757
- (o = (r = e(this, z).owner).scrollTo_V1) == null || o.call(r, e(this, X));
757
+ (o = (r = e(this, O).owner).scrollTo_V1) == null || o.call(r, e(this, X));
758
758
  });
759
759
  }
760
760
  };
761
- z = new WeakMap(), X = new WeakMap(), a(He, "ngRow");
762
- let Re = He;
763
- var A, v, q, K, ue, O, ge, te, be, ye, Z;
761
+ O = new WeakMap(), X = new WeakMap(), a(Me, "ngRow");
762
+ let Ee = Me;
763
+ var A, v, q, K, ue, z, be, ee, ge, pe, Z;
764
764
  const k = class k {
765
765
  constructor(i, t) {
766
766
  d(this, A);
@@ -768,37 +768,37 @@ const k = class k {
768
768
  d(this, q, []);
769
769
  d(this, K, []);
770
770
  d(this, ue, 0);
771
- d(this, O, []);
772
- d(this, ge, /* @__PURE__ */ a(() => {
773
- y(this, O, []);
771
+ d(this, z, []);
772
+ d(this, be, /* @__PURE__ */ a(() => {
773
+ g(this, z, []);
774
774
  const i = e(this, A).template || [];
775
775
  Array.from(i).forEach((t) => {
776
776
  var s;
777
- e(this, O).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
777
+ e(this, z).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
778
778
  }), (e(this, v).rawRecords || []).forEach((t) => {
779
- t.__ng || (t.__ng = e(this, te).call(this)), t.__ng.height = e(this, O).slice();
779
+ t.__ng || (t.__ng = e(this, ee).call(this)), t.__ng.height = e(this, z).slice();
780
780
  });
781
781
  }, "#initialize"));
782
782
  x(this, "set", /* @__PURE__ */ a((i) => {
783
783
  this.clear(), this.add(i, !1);
784
784
  }, "set"));
785
- d(this, te, /* @__PURE__ */ a(() => ({
785
+ d(this, ee, /* @__PURE__ */ a(() => ({
786
786
  rowState: k.ROW_STATE.EMPTY,
787
787
  deleted: !1,
788
788
  filtered: !1,
789
- height: e(this, O).slice(),
789
+ height: e(this, z).slice(),
790
790
  o: {},
791
791
  c: {},
792
- _: [0, 0, 0, 0, k.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, O).slice(), -1, {}, {}]
792
+ _: [0, 0, 0, 0, k.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, z).slice(), -1, {}, {}]
793
793
  }), "#getDefaultMeta"));
794
794
  x(this, "reset", /* @__PURE__ */ a(() => {
795
- y(this, q, []), y(this, K, []);
795
+ g(this, q, []), g(this, K, []);
796
796
  }, "reset"));
797
797
  x(this, "clear", /* @__PURE__ */ a(() => {
798
798
  var i;
799
- e(this, v).rawRecords = [], y(this, q, []), y(this, K, []), (i = e(this, v).viewRecords) != null && i.reset && e(this, v).viewRecords.reset();
799
+ e(this, v).rawRecords = [], g(this, q, []), g(this, K, []), (i = e(this, v).viewRecords) != null && i.reset && e(this, v).viewRecords.reset();
800
800
  }, "clear"));
801
- d(this, be, /* @__PURE__ */ a((i) => {
801
+ d(this, ge, /* @__PURE__ */ a((i) => {
802
802
  var n;
803
803
  Array.isArray(i) || (i = [i]);
804
804
  const t = typeof ((n = e(this, A).fields) == null ? void 0 : n.get) == "function" ? e(this, A).fields.get() : Object.keys(i[0] || {}), s = [];
@@ -809,14 +809,14 @@ const k = class k {
809
809
  }), s.push(o);
810
810
  }), s;
811
811
  }, "#json2Array"));
812
- d(this, ye, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
813
- t.__ng = e(this, te).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
812
+ d(this, pe, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
813
+ t.__ng = e(this, ee).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
814
814
  }), i), "#defaultInsert"));
815
815
  x(this, "add", /* @__PURE__ */ a((i, t = !0) => {
816
816
  var r;
817
817
  i === void 0 && (i = {});
818
- const s = e(this, be).call(this, i);
819
- e(this, v).rawRecords = e(this, v).rawRecords.concat(e(this, ye).call(this, s)), this.resetRecords();
818
+ const s = e(this, ge).call(this, i);
819
+ e(this, v).rawRecords = e(this, v).rawRecords.concat(e(this, pe).call(this, s)), this.resetRecords();
820
820
  const n = this.count() - 1;
821
821
  return t || s.forEach((o, c) => {
822
822
  const f = e(this, v).rawRecords[n - c];
@@ -846,7 +846,7 @@ const k = class k {
846
846
  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[r] = s, e(this, v).owner.refreshData && e(this, v).owner.refreshData(i);
847
847
  }, "setValue"));
848
848
  x(this, "resetRecords", /* @__PURE__ */ a(() => {
849
- y(this, K, e(this, v).rawRecords.filter((i) => !i.__ng.deleted)), y(this, q, e(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, v).rawRecords.forEach((i, t) => {
849
+ g(this, K, e(this, v).rawRecords.filter((i) => !i.__ng.deleted)), g(this, q, e(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, v).rawRecords.forEach((i, t) => {
850
850
  i.__ng.rowidx = t;
851
851
  }), e(this, q).forEach((i, t) => {
852
852
  i.__ng.i = t;
@@ -878,7 +878,7 @@ const k = class k {
878
878
  }
879
879
  return e(this, Z).call(this, s[i]);
880
880
  }, "get"));
881
- y(this, A, i), y(this, v, t), e(this, ge).call(this);
881
+ g(this, A, i), g(this, v, t), e(this, be).call(this);
882
882
  }
883
883
  get source() {
884
884
  return e(this, Z).call(this, e(this, v).rawRecords);
@@ -887,7 +887,7 @@ const k = class k {
887
887
  this.clear(), this.add(i, !1);
888
888
  }
889
889
  get nextId() {
890
- return ++Oe(this, ue)._;
890
+ return ++ze(this, ue)._;
891
891
  }
892
892
  get length() {
893
893
  return e(this, q).length;
@@ -896,7 +896,7 @@ const k = class k {
896
896
  return this.length;
897
897
  }
898
898
  };
899
- A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), K = new WeakMap(), ue = new WeakMap(), O = new WeakMap(), ge = new WeakMap(), te = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), Z = new WeakMap(), a(k, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
899
+ A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), K = new WeakMap(), ue = new WeakMap(), z = new WeakMap(), be = new WeakMap(), ee = new WeakMap(), ge = new WeakMap(), pe = new WeakMap(), Z = new WeakMap(), a(k, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
900
900
  x(k, "ROW_STATE", {
901
901
  EMPTY: "EMPTY",
902
902
  NORMAL: "NORMAL",
@@ -904,10 +904,10 @@ x(k, "ROW_STATE", {
904
904
  UPDATE: "UPDATE",
905
905
  DELETE: "DELETE"
906
906
  });
907
- let Ee = k;
908
- const Me = class Me {
907
+ let Re = k;
908
+ const He = class He {
909
909
  constructor(i) {
910
- this.owner = i, this.row = new Re(this), this.data = new Ee(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
910
+ this.owner = i, this.row = new Ee(this), this.data = new Re(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
911
911
  var t;
912
912
  (t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
913
913
  }, this.setDataSource = (t) => {
@@ -924,22 +924,22 @@ const Me = class Me {
924
924
  }, this.setDataSource([]);
925
925
  }
926
926
  };
927
- a(Me, "ngDataManager");
928
- let Te = Me;
929
- var F, pe;
927
+ a(He, "ngDataManager");
928
+ let Te = He;
929
+ var F, ye;
930
930
  const Ie = class Ie extends HTMLElement {
931
931
  constructor() {
932
932
  super();
933
933
  //#created = false;
934
934
  d(this, F);
935
- d(this, pe);
936
- this.attachShadow({ mode: "open" }), y(this, F, new Te(this));
935
+ d(this, ye);
936
+ this.attachShadow({ mode: "open" }), g(this, F, new Te(this));
937
937
  }
938
938
  connectedCallback() {
939
- y(this, pe, new Se(this)), G.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
939
+ g(this, ye, new Se(this)), te.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
940
940
  }
941
941
  disconnectedCallback() {
942
- G.log("NineTable disconnected.");
942
+ te.log("NineTable disconnected.");
943
943
  }
944
944
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
945
945
  get data() {
@@ -954,7 +954,7 @@ const Ie = class Ie extends HTMLElement {
954
954
  return e(this, F);
955
955
  }
956
956
  };
957
- F = new WeakMap(), pe = new WeakMap(), a(Ie, "NineTable");
957
+ F = new WeakMap(), ye = new WeakMap(), a(Ie, "NineTable");
958
958
  let Ae = Ie;
959
959
  customElements.get("nine-table") || customElements.define("nine-table", Ae);
960
960
  //# sourceMappingURL=nine-table.js.map