@ninebone/table 0.0.134 β†’ 0.0.136

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,11 +1,11 @@
1
- var Me = Object.defineProperty;
2
- var Ie = (w) => {
1
+ var $e = Object.defineProperty;
2
+ var Me = (w) => {
3
3
  throw TypeError(w);
4
4
  };
5
- var We = (w, i, t) => i in w ? Me(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
6
- var c = (w, i) => Me(w, "name", { value: i, configurable: !0 });
7
- var v = (w, i, t) => We(w, typeof i != "symbol" ? i + "" : i, t), $e = (w, i, t) => i.has(w) || Ie("Cannot " + t);
8
- var e = (w, i, t) => ($e(w, i, "read from private field"), t ? t.call(w) : i.get(w)), f = (w, i, t) => i.has(w) ? Ie("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), p = (w, i, t, s) => ($e(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
5
+ var ze = (w, i, t) => i in w ? $e(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
6
+ var a = (w, i) => $e(w, "name", { value: i, configurable: !0 });
7
+ var v = (w, i, t) => ze(w, typeof i != "symbol" ? i + "" : i, t), Ie = (w, i, t) => i.has(w) || Me("Cannot " + t);
8
+ var e = (w, i, t) => (Ie(w, i, "read from private field"), t ? t.call(w) : i.get(w)), u = (w, i, t) => i.has(w) ? Me("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), p = (w, i, t, s) => (Ie(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
9
9
  var He = (w, i, t, s) => ({
10
10
  set _(n) {
11
11
  p(w, i, n, t);
@@ -14,74 +14,74 @@ var He = (w, i, t, s) => ({
14
14
  return e(w, i, s);
15
15
  }
16
16
  });
17
- import { trace as ze } from "@ninebone/util";
18
- const Re = class Re extends ze.constructor {
17
+ import { trace as We } from "@ninebone/util";
18
+ const Re = class Re extends We.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- c(Re, "Trace");
23
+ a(Re, "Trace");
24
24
  let be = Re;
25
25
  const j = new be();
26
26
  var _, O, y, B, D, N, ee, P, te;
27
27
  const Te = class Te extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- f(this, _);
31
- f(this, O, !1);
32
- f(this, y);
33
- f(this, B);
34
- f(this, D);
35
- f(this, N);
36
- f(this, ee, /* @__PURE__ */ c(() => {
30
+ u(this, _);
31
+ u(this, O, !1);
32
+ u(this, y);
33
+ u(this, B);
34
+ u(this, D);
35
+ u(this, N);
36
+ u(this, ee, /* @__PURE__ */ a(() => {
37
37
  if (!e(this, _)) return;
38
38
  const t = e(this, _).querySelector(".ng-container-body");
39
39
  t && (p(this, N, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), e(this, N).observe(t));
42
42
  }, "#observeResize"));
43
- v(this, "refresh", /* @__PURE__ */ c(() => {
43
+ v(this, "refresh", /* @__PURE__ */ a(() => {
44
44
  if (!e(this, _) || !e(this, y) || e(this, O)) return;
45
45
  const t = e(this, y).container, s = t.querySelector("table");
46
46
  if (!s) return;
47
- const n = e(this, y).track, o = e(this, y).thumb, r = e(this, _).querySelector(".ng-container-bottom"), a = t.clientWidth, u = s.scrollWidth;
48
- if (a !== 0 && u > a)
47
+ const n = e(this, y).track, o = e(this, y).thumb, r = e(this, _).querySelector(".ng-container-bottom"), l = t.clientWidth, g = s.scrollWidth;
48
+ if (l !== 0 && g > l)
49
49
  r && (r.style.display = "flex");
50
50
  else {
51
51
  r && (r.style.display = "none");
52
52
  return;
53
53
  }
54
- const l = n.clientWidth;
55
- if (l <= 0) return;
56
- const g = Math.max(Math.min(l * (a / u), l), 20);
57
- o.style.width = `${g}px`;
58
- let h = 0;
54
+ const c = n.clientWidth;
55
+ if (c <= 0) return;
56
+ const h = Math.max(Math.min(c * (l / g), c), 20);
57
+ o.style.width = `${h}px`;
58
+ let d = 0;
59
59
  const b = s.style.transform;
60
60
  if (b && b.includes("translateX")) {
61
61
  const x = b.match(/translateX\(([-\d.]+)px\)/);
62
- x && x[1] && (h = parseFloat(x[1]));
62
+ x && x[1] && (d = parseFloat(x[1]));
63
63
  } else
64
- h = parseInt(s.style.left || 0, 10);
65
- let d = parseInt(Math.abs(h) * l / u, 10);
66
- d < 0 && (d = 0);
67
- const S = l - g;
68
- d > S && (d = S), o.style.left = `${d}px`, e(this, y).left.disabled = d === 0, e(this, y).right.disabled = d >= S - 1;
64
+ d = parseInt(s.style.left || 0, 10);
65
+ let f = parseInt(Math.abs(d) * c / g, 10);
66
+ f < 0 && (f = 0);
67
+ const S = c - h;
68
+ f > S && (f = S), o.style.left = `${f}px`, e(this, y).left.disabled = f === 0, e(this, y).right.disabled = f >= S - 1;
69
69
  }, "refresh"));
70
- f(this, P, /* @__PURE__ */ c((t) => {
70
+ u(this, P, /* @__PURE__ */ a((t) => {
71
71
  if (!e(this, y)) return !1;
72
72
  const s = e(this, y).container, n = s.querySelector("table");
73
73
  if (!n) return !1;
74
74
  const o = e(this, y).track.getBoundingClientRect(), r = e(this, y).thumb.clientWidth;
75
- let a = t;
76
- a < 0 && (a = 0);
77
- const u = o.width - r;
78
- a > u && (a = u), a = parseInt(a, 10), e(this, y).thumb.style.left = `${a}px`, e(this, y).left.disabled = a === 0, e(this, y).right.disabled = a >= u - 1;
79
- const l = s.clientWidth, g = n.scrollWidth;
80
- let h = u > 0 ? -a * (g - l) / u : 0;
81
- return -h > g - l && (h = -(g - l)), -h + 5 > g - l && (h = -(g - l)), l >= g && (h = 0), n.style.transform = `translateX(${h}px)`, a > 0 && a < u - 1;
75
+ let l = t;
76
+ l < 0 && (l = 0);
77
+ const g = o.width - r;
78
+ l > g && (l = g), 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 >= g - 1;
79
+ const c = s.clientWidth, h = n.scrollWidth;
80
+ let d = g > 0 ? -l * (h - c) / g : 0;
81
+ return -d > h - c && (d = -(h - c)), -d + 5 > h - c && (d = -(h - c)), c >= h && (d = 0), n.style.transform = `translateX(${d}px)`, l > 0 && l < g - 1;
82
82
  }, "#thumbMoveTo"));
83
- f(this, te, /* @__PURE__ */ c(() => {
84
- const t = /* @__PURE__ */ c((n) => {
83
+ u(this, te, /* @__PURE__ */ a(() => {
84
+ const t = /* @__PURE__ */ a((n) => {
85
85
  clearInterval(e(this, B)), clearInterval(e(this, D));
86
86
  const o = parseInt(e(this, y).thumb.style.left || 0, 10);
87
87
  e(this, P).call(this, o + n), p(this, B, setInterval(() => {
@@ -90,7 +90,7 @@ const Te = class Te extends HTMLElement {
90
90
  e(this, P).call(this, r + n) || clearInterval(e(this, D));
91
91
  }, 50));
92
92
  }, 500));
93
- }, "delayScroll"), s = /* @__PURE__ */ c(() => {
93
+ }, "delayScroll"), s = /* @__PURE__ */ a(() => {
94
94
  clearInterval(e(this, B)), clearInterval(e(this, D));
95
95
  }, "clearTimer");
96
96
  ["mouseup", "mouseleave", "touchend"].forEach((n) => {
@@ -107,11 +107,11 @@ const Te = class Te extends HTMLElement {
107
107
  }), e(this, y).thumb.addEventListener("mousedown", (n) => {
108
108
  if (n.button !== 0) return;
109
109
  n.stopPropagation(), n.preventDefault(), p(this, O, !0), this.shiftX = n.clientX - e(this, y).thumb.getBoundingClientRect().left;
110
- const o = /* @__PURE__ */ c((a) => {
110
+ const o = /* @__PURE__ */ a((l) => {
111
111
  if (!e(this, O)) return;
112
- const u = e(this, y).track.getBoundingClientRect();
113
- e(this, P).call(this, a.clientX - u.left - this.shiftX);
114
- }, "onMouseMove"), r = /* @__PURE__ */ c(() => {
112
+ const g = e(this, y).track.getBoundingClientRect();
113
+ e(this, P).call(this, l.clientX - g.left - this.shiftX);
114
+ }, "onMouseMove"), r = /* @__PURE__ */ a(() => {
115
115
  p(this, O, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
116
116
  }, "onMouseUp");
117
117
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
@@ -183,7 +183,7 @@ const Te = class Te extends HTMLElement {
183
183
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
184
184
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
185
185
  `;
186
- const t = /* @__PURE__ */ c(() => {
186
+ const t = /* @__PURE__ */ a(() => {
187
187
  const s = e(this, _).querySelector(".ng-container-body");
188
188
  if (!s) {
189
189
  setTimeout(t, 10);
@@ -203,26 +203,26 @@ const Te = class Te extends HTMLElement {
203
203
  e(this, N) && e(this, N).disconnect();
204
204
  }
205
205
  };
206
- _ = new WeakMap(), O = new WeakMap(), y = new WeakMap(), B = new WeakMap(), D = new WeakMap(), N = new WeakMap(), ee = new WeakMap(), P = new WeakMap(), te = new WeakMap(), c(Te, "NineTableHScrollBar");
206
+ _ = new WeakMap(), O = new WeakMap(), y = new WeakMap(), B = new WeakMap(), D = new WeakMap(), N = new WeakMap(), ee = new WeakMap(), P = new WeakMap(), te = new WeakMap(), a(Te, "NineTableHScrollBar");
207
207
  let ge = Te;
208
208
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ge);
209
- var X, M, q, $, I, H, ie, se;
209
+ var X, $, q, I, M, H, ie, se;
210
210
  const qe = class qe {
211
211
  constructor(i) {
212
- f(this, X);
213
- f(this, M, []);
214
- f(this, q, null);
215
- f(this, $, null);
216
- f(this, I, 0);
217
- f(this, H, 0);
218
- f(this, ie, /* @__PURE__ */ c(() => {
212
+ u(this, X);
213
+ u(this, $, []);
214
+ u(this, q, null);
215
+ u(this, I, null);
216
+ u(this, M, 0);
217
+ u(this, H, 0);
218
+ u(this, ie, /* @__PURE__ */ a(() => {
219
219
  e(this, se).call(this);
220
220
  }, "#init"));
221
221
  /**
222
222
  * 🎯 뷰포트 크기 λ³€ν™” μ‹œμ μ— 높이 계산 및 ν•„μš”ν•œ ν–‰ 개수 산정·캐싱을 μ™„κ²°
223
223
  */
224
- f(this, se, /* @__PURE__ */ c(() => {
225
- !e(this, X) || !(e(this, X) instanceof HTMLElement) || (p(this, $, new ResizeObserver((i) => {
224
+ u(this, se, /* @__PURE__ */ a(() => {
225
+ !e(this, X) || !(e(this, X) instanceof HTMLElement) || (p(this, I, new ResizeObserver((i) => {
226
226
  for (const t of i) {
227
227
  const s = t.target;
228
228
  if (!s.classList.contains("active"))
@@ -231,47 +231,47 @@ const qe = class qe {
231
231
  if (n > 0) {
232
232
  const o = s.clientHeight || s.getBoundingClientRect().height || n;
233
233
  let r = 0;
234
- const a = s.querySelector(".ng-container-body") || s, u = a.querySelector("thead"), l = a.querySelector("tfoot");
235
- u && (r += u.offsetHeight || u.getBoundingClientRect().height), l && (r += l.offsetHeight || l.getBoundingClientRect().height);
236
- const g = Math.max(o - r, 100);
237
- if (e(this, I) !== g && (p(this, I, g), e(this, q) !== null)) {
238
- const h = Math.ceil(e(this, I) / e(this, q));
239
- p(this, H, h + 20), j.log(`[RowManager] Resized. Height: ${e(this, I)}px | Target Rows: ${e(this, H)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
240
- const d = s.querySelector(b);
241
- d && d.querySelector("tbody") && this.renderRows(d);
234
+ const l = s.querySelector(".ng-container-body") || s, g = l.querySelector("thead"), c = l.querySelector("tfoot");
235
+ g && (r += g.offsetHeight || g.getBoundingClientRect().height), c && (r += c.offsetHeight || c.getBoundingClientRect().height);
236
+ const h = Math.max(o - r, 100);
237
+ if (e(this, M) !== h && (p(this, M, h), e(this, q) !== null)) {
238
+ const d = Math.ceil(e(this, M) / e(this, q));
239
+ p(this, H, d + 20), j.log(`[RowManager] Resized. Height: ${e(this, M)}px | Target Rows: ${e(this, H)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
240
+ const f = s.querySelector(b);
241
+ f && f.querySelector("tbody") && this.renderRows(f);
242
242
  });
243
243
  }
244
244
  }
245
245
  }
246
- })), e(this, $).observe(e(this, X)));
246
+ })), e(this, I).observe(e(this, X)));
247
247
  }, "#initResizeObserver"));
248
- v(this, "initTemplate", /* @__PURE__ */ c((i) => {
248
+ v(this, "initTemplate", /* @__PURE__ */ a((i) => {
249
249
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
250
250
  if (!t) return;
251
251
  const s = Array.from(t.querySelectorAll("tr")).filter((n) => !n.classList.contains("nodata"));
252
- p(this, M, s.map((n) => n.cloneNode(!0))), p(this, q, null), console.log(`[RowManager] Template initialized with ${e(this, M).length} row(s).`);
252
+ p(this, $, s.map((n) => n.cloneNode(!0))), p(this, q, null), console.log(`[RowManager] Template initialized with ${e(this, $).length} row(s).`);
253
253
  }, "initTemplate"));
254
- v(this, "measureAndCacheHeight", /* @__PURE__ */ c((i) => {
254
+ v(this, "measureAndCacheHeight", /* @__PURE__ */ a((i) => {
255
255
  if (e(this, q) !== null)
256
256
  return e(this, q);
257
- if (e(this, M).length === 0)
257
+ if (e(this, $).length === 0)
258
258
  throw new Error("[RowManager] Template TRs are empty.");
259
259
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
260
260
  if (!t) return 24;
261
- t.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
261
+ t.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
262
262
  const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment();
263
- e(this, M).forEach((a) => {
264
- n.appendChild(a.cloneNode(!0));
263
+ e(this, $).forEach((l) => {
264
+ n.appendChild(l.cloneNode(!0));
265
265
  }), s ? s.before(n) : t.appendChild(n);
266
266
  let o = 0;
267
- if (t.querySelectorAll("tr:not(.nodata)").forEach((a, u) => {
268
- const l = a.offsetHeight;
269
- if (l === 0)
270
- throw new Error(`[RowManager] Rendered TR[${u}] height is 0. Check CSS styles.`);
271
- o += l;
272
- }), p(this, q, o), e(this, I) > 0) {
273
- const a = Math.ceil(e(this, I) / e(this, q));
274
- p(this, H, a + 20);
267
+ if (t.querySelectorAll("tr:not(.nodata)").forEach((l, g) => {
268
+ const c = l.offsetHeight;
269
+ if (c === 0)
270
+ throw new Error(`[RowManager] Rendered TR[${g}] height is 0. Check CSS styles.`);
271
+ o += c;
272
+ }), p(this, q, o), e(this, M) > 0) {
273
+ const l = Math.ceil(e(this, M) / e(this, q));
274
+ p(this, H, l + 20);
275
275
  }
276
276
  return console.log(`[RowManager] Template Height Cached: ${e(this, q)}px | RowCount: ${e(this, H)}`), e(this, q);
277
277
  }, "measureAndCacheHeight"));
@@ -291,112 +291,112 @@ const qe = class qe {
291
291
  /**
292
292
  * 🎯 μΊμ‹œλœ ν–‰ 개수λ₯Ό κ³§λ°”λ‘œ κ°€μ Έμ™€μ„œ TR λΌˆλŒ€ μ£Όμž… (쀑볡 계산 제거)
293
293
  */
294
- v(this, "renderRows", /* @__PURE__ */ c((i) => {
295
- if (e(this, M).length === 0) return;
294
+ v(this, "renderRows", /* @__PURE__ */ a((i) => {
295
+ if (e(this, $).length === 0) return;
296
296
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
297
297
  if (!t) return;
298
298
  t.querySelectorAll("tr:not(.nodata)").forEach((r) => r.remove());
299
299
  const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), o = e(this, H);
300
300
  for (let r = 0; r < o; r++)
301
- e(this, M).forEach((a) => {
302
- n.appendChild(a.cloneNode(!0));
301
+ e(this, $).forEach((l) => {
302
+ n.appendChild(l.cloneNode(!0));
303
303
  });
304
304
  s ? s.before(n) : t.appendChild(n), console.log(`[RowManager] Rendered ${o} sets into DOM.`);
305
305
  }, "renderRows"));
306
- v(this, "destroy", /* @__PURE__ */ c(() => {
307
- e(this, $) && (e(this, $).disconnect(), p(this, $, null));
306
+ v(this, "destroy", /* @__PURE__ */ a(() => {
307
+ e(this, I) && (e(this, I).disconnect(), p(this, I, null));
308
308
  }, "destroy"));
309
309
  p(this, X, i), e(this, ie).call(this);
310
310
  }
311
311
  get templateLength() {
312
- return e(this, M).length || 1;
312
+ return e(this, $).length || 1;
313
313
  }
314
314
  };
315
- X = new WeakMap(), M = new WeakMap(), q = new WeakMap(), $ = new WeakMap(), I = new WeakMap(), H = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), c(qe, "RowManager");
315
+ X = new WeakMap(), $ = new WeakMap(), q = new WeakMap(), I = new WeakMap(), M = new WeakMap(), H = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), a(qe, "RowManager");
316
316
  let pe = qe;
317
317
  var A, F, ne;
318
318
  const Z = class Z extends HTMLElement {
319
319
  constructor() {
320
320
  super();
321
- f(this, A, null);
322
- f(this, F);
323
- v(this, "init", /* @__PURE__ */ c((t) => {
321
+ u(this, A, null);
322
+ u(this, F);
323
+ v(this, "init", /* @__PURE__ */ a((t) => {
324
324
  if (!t) return;
325
- const s = /* @__PURE__ */ c((l) => {
326
- const g = /* @__PURE__ */ c((b) => {
325
+ const s = /* @__PURE__ */ a((c) => {
326
+ const h = /* @__PURE__ */ a((b) => {
327
327
  if (b.querySelector("colgroup")) return;
328
- const d = b.querySelector("tbody tr") || b.querySelector("tr"), S = d ? d.querySelectorAll("th, td").length : 1, x = document.createElement("colgroup"), k = Math.max(Math.floor((b.clientWidth || 600) / S), 100);
328
+ const f = b.querySelector("tbody tr") || b.querySelector("tr"), S = f ? f.querySelectorAll("th, td").length : 1, x = document.createElement("colgroup"), C = Math.max(Math.floor((b.clientWidth || 600) / S), 100);
329
329
  for (let R = 0; R < S; R++) {
330
330
  const ue = document.createElement("col");
331
- ue.setAttribute("width", k), x.appendChild(ue);
331
+ ue.setAttribute("width", C), x.appendChild(ue);
332
332
  }
333
333
  b.prepend(x);
334
- }, "ensureColgroup"), h = /* @__PURE__ */ c((b) => {
334
+ }, "ensureColgroup"), d = /* @__PURE__ */ a((b) => {
335
335
  if (b.querySelector("thead")) return;
336
- const d = document.createElement("thead"), S = b.querySelector("colgroup");
337
- S ? S.after(d) : b.prepend(d);
336
+ const f = document.createElement("thead"), S = b.querySelector("colgroup");
337
+ S ? S.after(f) : b.prepend(f);
338
338
  }, "ensureThead");
339
- return g(l), h(l), l.classList.add("nine-table-element"), l;
339
+ return h(c), d(c), c.classList.add("nine-table-element"), c;
340
340
  }, "initializeTable"), n = t.cloneNode(!0);
341
341
  p(this, A, s(n)), e(this, A).style.display = "table", e(this, F).initTemplate(e(this, A));
342
- const o = this.querySelector(".ng-container-left"), r = this.querySelector(".ng-container-body"), a = this.querySelector(".ng-container-right"), u = /* @__PURE__ */ c((l, g, h = !1) => {
343
- const b = l.cloneNode(!0), d = Array.from(b.querySelectorAll("colgroup col")), S = [];
344
- return d.forEach((x, k) => {
342
+ const o = this.querySelector(".ng-container-left"), r = this.querySelector(".ng-container-body"), l = this.querySelector(".ng-container-right"), g = /* @__PURE__ */ a((c, h, d = !1) => {
343
+ const b = c.cloneNode(!0), f = Array.from(b.querySelectorAll("colgroup col")), S = [];
344
+ return f.forEach((x, C) => {
345
345
  const R = x.getAttribute("fixed");
346
- (h ? !R || R === "" : R === g) || S.push(k);
346
+ (d ? !R || R === "" : R === h) || S.push(C);
347
347
  }), S.reverse().forEach((x) => {
348
- d[x] && d[x].remove(), b.querySelectorAll("tr").forEach((k) => {
349
- const R = k.querySelectorAll("th, td");
348
+ f[x] && f[x].remove(), b.querySelectorAll("tr").forEach((C) => {
349
+ const R = C.querySelectorAll("th, td");
350
350
  R[x] && R[x].remove();
351
351
  });
352
352
  }), b;
353
353
  }, "filterTableByFixed");
354
354
  if (r) {
355
- const l = u(e(this, A), null, !0);
356
- r.innerHTML = "", r.appendChild(l), e(this, F).measureAndCacheHeight(r);
355
+ const c = g(e(this, A), null, !0);
356
+ r.innerHTML = "", r.appendChild(c), e(this, F).measureAndCacheHeight(r);
357
357
  }
358
358
  if (o) {
359
- const l = u(e(this, A), "left", !1);
360
- let g = 0;
361
- l.querySelectorAll("col").forEach((b) => {
362
- const d = parseInt(b.getAttribute("width"), 10);
363
- isNaN(d) || (g += d);
364
- }), o.innerHTML = "", o.appendChild(l);
365
- const h = g > 0 ? g : 0;
366
- o.style.flex = `0 0 ${h}px`, o.style.width = `${h}px`;
359
+ const c = g(e(this, A), "left", !1);
360
+ let h = 0;
361
+ c.querySelectorAll("col").forEach((b) => {
362
+ const f = parseInt(b.getAttribute("width"), 10);
363
+ isNaN(f) || (h += f);
364
+ }), o.innerHTML = "", o.appendChild(c);
365
+ const d = h > 0 ? h : 0;
366
+ o.style.flex = `0 0 ${d}px`, o.style.width = `${d}px`;
367
367
  }
368
- if (a) {
369
- const l = u(e(this, A), "right", !1);
370
- let g = 0;
371
- l.querySelectorAll("col").forEach((b) => {
372
- const d = parseInt(b.getAttribute("width"), 10);
373
- isNaN(d) || (g += d);
374
- }), a.innerHTML = "", a.appendChild(l);
375
- const h = g > 0 ? g : 0;
376
- a.style.flex = `0 0 ${h}px`, a.style.width = `${h}px`;
368
+ if (l) {
369
+ const c = g(e(this, A), "right", !1);
370
+ let h = 0;
371
+ c.querySelectorAll("col").forEach((b) => {
372
+ const f = parseInt(b.getAttribute("width"), 10);
373
+ isNaN(f) || (h += f);
374
+ }), l.innerHTML = "", l.appendChild(c);
375
+ const d = h > 0 ? h : 0;
376
+ l.style.flex = `0 0 ${d}px`, l.style.width = `${d}px`;
377
377
  }
378
378
  if (r) {
379
- const l = this.getRowCount();
380
- r.style.overflowY = l > 10 ? "auto" : "hidden", r.addEventListener("scroll", () => {
381
- const g = this.querySelector("nine-table-hscrollbar");
382
- g && typeof g.refresh == "function" && g.refresh();
379
+ const c = this.getRowCount();
380
+ r.style.overflowY = c > 10 ? "auto" : "hidden", r.addEventListener("scroll", () => {
381
+ const h = this.querySelector("nine-table-hscrollbar");
382
+ h && typeof h.refresh == "function" && h.refresh();
383
383
  });
384
384
  }
385
385
  setTimeout(() => {
386
- const l = this.querySelector("nine-table-hscrollbar");
387
- l && typeof l.refresh == "function" && l.refresh();
386
+ const c = this.querySelector("nine-table-hscrollbar");
387
+ c && typeof c.refresh == "function" && c.refresh();
388
388
  }, 0), j.log(`NineTableSheet 3-split initialized with rows: ${this.getRowCount()}`);
389
389
  }, "init"));
390
- v(this, "getRowCount", /* @__PURE__ */ c(() => e(this, A) ? e(this, A).querySelectorAll("tbody tr").length : 0, "getRowCount"));
391
- v(this, "scrollToX", /* @__PURE__ */ c((t) => {
390
+ v(this, "getRowCount", /* @__PURE__ */ a(() => e(this, A) ? e(this, A).querySelectorAll("tbody tr").length : 0, "getRowCount"));
391
+ v(this, "scrollToX", /* @__PURE__ */ a((t) => {
392
392
  const s = this.querySelector(".ng-container-body");
393
393
  s && (s.scrollLeft = t);
394
394
  }, "scrollToX"));
395
- v(this, "scrollToY", /* @__PURE__ */ c((t) => {
395
+ v(this, "scrollToY", /* @__PURE__ */ a((t) => {
396
396
  const s = this.querySelector(".ng-container-body");
397
397
  s && (s.scrollTop = t);
398
398
  }, "scrollToY"));
399
- f(this, ne, /* @__PURE__ */ c(() => {
399
+ u(this, ne, /* @__PURE__ */ a(() => {
400
400
  const t = Z.SCROLLBAR_SIZE;
401
401
  this.innerHTML = `
402
402
  <style>
@@ -522,14 +522,14 @@ const Z = class Z extends HTMLElement {
522
522
  this.innerHTML = "", j.log("NineTableSheet destroyed.");
523
523
  }
524
524
  };
525
- A = new WeakMap(), F = new WeakMap(), ne = new WeakMap(), c(Z, "NineTableSheet"), v(Z, "SCROLLBAR_SIZE", 16);
525
+ A = new WeakMap(), F = new WeakMap(), ne = new WeakMap(), a(Z, "NineTableSheet"), v(Z, "SCROLLBAR_SIZE", 16);
526
526
  let ye = Z;
527
527
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ye);
528
528
  var re;
529
- const Ce = class Ce extends HTMLElement {
529
+ const ke = class ke extends HTMLElement {
530
530
  constructor() {
531
531
  super();
532
- f(this, re, /* @__PURE__ */ c(() => {
532
+ u(this, re, /* @__PURE__ */ a(() => {
533
533
  const t = this.querySelector(".nine-tab-bar");
534
534
  t && (t.addEventListener("click", (s) => {
535
535
  const n = s.target.closest(".nine-tab-item");
@@ -538,46 +538,46 @@ const Ce = class Ce extends HTMLElement {
538
538
  this.switchSheet(r, o);
539
539
  }), this.switchSheet(0, !1));
540
540
  }, "#init"));
541
- v(this, "switchSheet", /* @__PURE__ */ c((t, s = !1) => {
542
- const n = /* @__PURE__ */ c(() => {
543
- const h = this.querySelector("nine-table-sheets-body");
544
- h.querySelectorAll("nine-splitter").forEach((d) => {
545
- const S = parseInt(d.dataset.splitIndex, 10), x = h.querySelector(`nine-table-sheet[data-index="${S - 1}"]`), k = h.querySelector(`nine-table-sheet[data-index="${S}"]`);
546
- x && k && x.classList.contains("active") && k.classList.contains("active") ? d.classList.add("active") : d.classList.remove("active");
541
+ v(this, "switchSheet", /* @__PURE__ */ a((t, s = !1) => {
542
+ const n = /* @__PURE__ */ a(() => {
543
+ const d = this.querySelector("nine-table-sheets-body");
544
+ d.querySelectorAll("nine-splitter").forEach((f) => {
545
+ const S = parseInt(f.dataset.splitIndex, 10), x = d.querySelector(`nine-table-sheet[data-index="${S - 1}"]`), C = d.querySelector(`nine-table-sheet[data-index="${S}"]`);
546
+ x && C && x.classList.contains("active") && C.classList.contains("active") ? f.classList.add("active") : f.classList.remove("active");
547
547
  });
548
- }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), u = r.querySelectorAll("nine-table-sheet");
549
- if (!a[t]) return;
548
+ }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), l = o.querySelectorAll(".nine-tab-item"), g = r.querySelectorAll("nine-table-sheet");
549
+ if (!l[t]) return;
550
550
  if (!s)
551
- a.forEach((h, b) => {
552
- h.classList.toggle("active", b === t);
553
- const d = r.querySelector(`nine-table-sheet[data-index="${b}"]`);
554
- d && (d.style.flex = "");
555
- }), u.forEach((h, b) => {
556
- h.classList.toggle("active", b === t);
551
+ l.forEach((d, b) => {
552
+ d.classList.toggle("active", b === t);
553
+ const f = r.querySelector(`nine-table-sheet[data-index="${b}"]`);
554
+ f && (f.style.flex = "");
555
+ }), g.forEach((d, b) => {
556
+ d.classList.toggle("active", b === t);
557
557
  });
558
558
  else {
559
- const h = a[t], b = o.querySelectorAll(".nine-tab-item.active");
560
- if (h.classList.contains("active") && b.length <= 1)
559
+ const d = l[t], b = o.querySelectorAll(".nine-tab-item.active");
560
+ if (d.classList.contains("active") && b.length <= 1)
561
561
  return;
562
- h.classList.toggle("active");
563
- const d = r.querySelector(`nine-table-sheet[data-index="${t}"]`);
564
- d && (d.classList.toggle("active"), d.classList.contains("active") || (d.style.flex = ""));
562
+ d.classList.toggle("active");
563
+ const f = r.querySelector(`nine-table-sheet[data-index="${t}"]`);
564
+ f && (f.classList.toggle("active"), f.classList.contains("active") || (f.style.flex = ""));
565
565
  }
566
- const l = Array.from(r.querySelectorAll("nine-table-sheet.active"));
567
- if (l.length > 1) {
568
- const h = 1 / l.length;
569
- l.forEach((b) => {
570
- (!b.style.flex || b.style.flex === "1 1 100%") && (b.style.flex = `${h} ${h} 0px`);
566
+ const c = Array.from(r.querySelectorAll("nine-table-sheet.active"));
567
+ if (c.length > 1) {
568
+ const d = 1 / c.length;
569
+ c.forEach((b) => {
570
+ (!b.style.flex || b.style.flex === "1 1 100%") && (b.style.flex = `${d} ${d} 0px`);
571
571
  });
572
572
  } else
573
- l.forEach((h) => {
574
- h.style.flex = "1 1 100%";
573
+ c.forEach((d) => {
574
+ d.style.flex = "1 1 100%";
575
575
  });
576
576
  n();
577
- const g = r.querySelector("nine-table-sheet.active");
578
- if (g && typeof g.getRowCount == "function") {
579
- const h = this.querySelector("#row-count");
580
- h && (h.textContent = g.getRowCount().toLocaleString());
577
+ const h = r.querySelector("nine-table-sheet.active");
578
+ if (h && typeof h.getRowCount == "function") {
579
+ const d = this.querySelector("#row-count");
580
+ d && (d.textContent = h.getRowCount().toLocaleString());
581
581
  }
582
582
  }, "switchSheet"));
583
583
  }
@@ -585,35 +585,35 @@ const Ce = class Ce extends HTMLElement {
585
585
  e(this, re).call(this);
586
586
  }
587
587
  };
588
- re = new WeakMap(), c(Ce, "NineTableSheets");
589
- let we = Ce;
588
+ re = new WeakMap(), a(ke, "NineTableSheets");
589
+ let we = ke;
590
590
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", we);
591
591
  var L, G, oe, J, le;
592
- const ke = class ke {
592
+ const Ce = class Ce {
593
593
  constructor(i) {
594
- f(this, L);
595
- f(this, G, null);
596
- f(this, oe, /* @__PURE__ */ c(() => {
594
+ u(this, L);
595
+ u(this, G, null);
596
+ u(this, oe, /* @__PURE__ */ a(() => {
597
597
  const i = e(this, L).host;
598
598
  i && (p(this, G, new ResizeObserver((t) => {
599
599
  for (let s of t)
600
600
  i.getAttribute("auto-height") === "true" && e(this, J).call(this, i);
601
601
  })), e(this, G).observe(i));
602
602
  }, "#observeResize"));
603
- f(this, J, /* @__PURE__ */ c((i) => {
604
- var k, R;
605
- const t = (k = i.shadowRoot) == null ? void 0 : k.querySelector("nine-table-sheet.active");
603
+ u(this, J, /* @__PURE__ */ a((i) => {
604
+ var C, R;
605
+ const t = (C = i.shadowRoot) == null ? void 0 : C.querySelector("nine-table-sheet.active");
606
606
  if (!t) return;
607
- const s = ((R = t.getRowCount) == null ? void 0 : R.call(t)) || 0, n = parseInt(i.getAttribute("max-display-row"), 10) || 10, o = Math.min(s, n), r = t.querySelector("tbody tr") || t.querySelector("tr"), a = r ? r.getBoundingClientRect().height : 32, u = e(this, L).querySelector("nine-table-header"), l = e(this, L).querySelector("nine-table-sheets-footer"), g = u ? u.getBoundingClientRect().height : 40, h = l ? l.getBoundingClientRect().height : 32, d = g + h + 16, S = o * a + d;
608
- i.style.height = `${S}px`, i.style.maxHeight = `${n * a + d}px`;
607
+ const s = ((R = t.getRowCount) == null ? void 0 : R.call(t)) || 0, n = parseInt(i.getAttribute("max-display-row"), 10) || 10, o = Math.min(s, n), r = t.querySelector("tbody tr") || t.querySelector("tr"), l = r ? r.getBoundingClientRect().height : 32, g = e(this, L).querySelector("nine-table-header"), c = e(this, L).querySelector("nine-table-sheets-footer"), h = g ? g.getBoundingClientRect().height : 40, d = c ? c.getBoundingClientRect().height : 32, f = h + d + 16, S = o * l + f;
608
+ i.style.height = `${S}px`, i.style.maxHeight = `${n * l + f}px`;
609
609
  const x = e(this, L).querySelector("nine-table-sheets-body");
610
610
  x && (x.style.overflowY = s > n ? "auto" : "hidden");
611
611
  }, "#applyAutoHeight"));
612
- f(this, le, /* @__PURE__ */ c(() => {
613
- const i = e(this, L).host, s = Array.from(i.children).filter((u) => u.tagName === "TABLE"), n = i.getAttribute("auto-height") === "true", o = s.map((u, l) => {
614
- const h = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < s.length - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
615
- return h + b;
616
- }).join(""), r = s.map((u, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
612
+ u(this, le, /* @__PURE__ */ a(() => {
613
+ const i = e(this, L).host, s = Array.from(i.children).filter((c) => c.tagName === "TABLE"), n = i.getAttribute("auto-height") === "true", o = s.length, r = s.map((c, h) => {
614
+ const b = `<nine-table-sheet class="${h === 0 ? "active" : ""}" data-index="${h}"></nine-table-sheet>`, f = h < o - 1 ? `<nine-splitter class="h" data-split-index="${h}"></nine-splitter>` : "";
615
+ return b + f;
616
+ }).join(""), l = s.map((c, h) => `<div class="nine-tab-item ${h === 0 ? "active" : ""}" data-index="${h}">Sheet ${h + 1}</div>`).join("");
617
617
  e(this, L).innerHTML = `
618
618
  <style>
619
619
  :host {
@@ -650,11 +650,21 @@ const ke = class ke {
650
650
  display: none !important;
651
651
  height: 100%;
652
652
  overflow: auto;
653
- flex: 1 1 100%;
653
+ /* 🎯 볡수 μ‹œνŠΈ λ™μ‹œ λ…ΈμΆœ μ‹œ κ· λ“± λ„ˆλΉ„ λ°°λΆ„ (1개일 땐 100%) */
654
+ flex: 1 1 ${o > 1 ? `${100 / o}%` : "100%"};
655
+ min-width: 150px;
654
656
  }
655
657
  nine-table-sheet.active {
656
658
  display: block !important;
657
659
  }
660
+ /* 🎯 μ‹œνŠΈ κ°„ κ°€λ‘œ λΆ„ν•  μŠ€ν”Œλ¦¬ν„°(h) μŠ€νƒ€μΌ 볡ꡬ */
661
+ nine-table-sheets-body nine-splitter.h {
662
+ width: 4px;
663
+ background: #e5e7eb;
664
+ cursor: col-resize;
665
+ flex-shrink: 0;
666
+ display: ${o > 1 ? "block" : "none"};
667
+ }
658
668
  nine-table-sheets-footer {
659
669
  display: flex;
660
670
  height: 32px;
@@ -702,9 +712,9 @@ const ke = class ke {
702
712
  <nine-table-body>
703
713
  <nine-table-summary></nine-table-summary>
704
714
  <nine-table-sheets>
705
- <nine-table-sheets-body>${o}</nine-table-sheets-body>
715
+ <nine-table-sheets-body>${r}</nine-table-sheets-body>
706
716
  <nine-table-sheets-footer>
707
- <div class="nine-tab-bar">${r}</div>
717
+ <div class="nine-tab-bar">${l}</div>
708
718
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
709
719
  </nine-table-sheets-footer>
710
720
  </nine-table-sheets>
@@ -712,25 +722,25 @@ const ke = class ke {
712
722
  </nine-table-body>
713
723
  <nine-table-footer></nine-table-footer>
714
724
  `;
715
- const a = e(this, L).querySelectorAll("nine-table-sheet");
716
- a == null || a.forEach((u, l) => {
717
- s[l] && setTimeout(() => {
718
- u.init(s[l]), n && e(this, J).call(this, i);
725
+ const g = e(this, L).querySelectorAll("nine-table-sheet");
726
+ g == null || g.forEach((c, h) => {
727
+ s[h] && setTimeout(() => {
728
+ c.init(s[h]), n && e(this, J).call(this, i);
719
729
  });
720
730
  });
721
731
  }, "#render"));
722
732
  p(this, L, i), e(this, le).call(this), e(this, oe).call(this);
723
733
  }
724
734
  };
725
- L = new WeakMap(), G = new WeakMap(), oe = new WeakMap(), J = new WeakMap(), le = new WeakMap(), c(ke, "LayoutManager");
726
- let me = ke;
727
- var W, V;
735
+ L = new WeakMap(), G = new WeakMap(), oe = new WeakMap(), J = new WeakMap(), le = new WeakMap(), a(Ce, "LayoutManager");
736
+ let me = Ce;
737
+ var z, V;
728
738
  const Ae = class Ae {
729
739
  constructor(i) {
730
- f(this, W);
731
- f(this, V, -1);
732
- v(this, "count", /* @__PURE__ */ c(() => e(this, W).rawRecords.length, "count"));
733
- p(this, W, i);
740
+ u(this, z);
741
+ u(this, V, -1);
742
+ v(this, "count", /* @__PURE__ */ a(() => e(this, z).rawRecords.length, "count"));
743
+ p(this, z, i);
734
744
  }
735
745
  get at() {
736
746
  return e(this, V);
@@ -738,121 +748,121 @@ const Ae = class Ae {
738
748
  set at(i) {
739
749
  var s, n;
740
750
  p(this, V, parseInt(i, 10));
741
- const t = ((n = (s = e(this, W).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, W).owner.body;
751
+ const t = ((n = (s = e(this, z).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, z).owner.body;
742
752
  t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, V)}"]`) && setTimeout(() => {
743
753
  var o, r;
744
- (r = (o = e(this, W).owner).scrollTo_V1) == null || r.call(o, e(this, V));
754
+ (r = (o = e(this, z).owner).scrollTo_V1) == null || r.call(o, e(this, V));
745
755
  });
746
756
  }
747
757
  };
748
- W = new WeakMap(), V = new WeakMap(), c(Ae, "ngRow");
758
+ z = new WeakMap(), V = new WeakMap(), a(Ae, "ngRow");
749
759
  let ve = Ae;
750
- var E, m, C, U, ae, z, ce, Q, he, de, K;
760
+ var E, m, k, U, ae, W, ce, Q, he, de, K;
751
761
  const T = class T {
752
762
  constructor(i, t) {
753
- f(this, E);
754
- f(this, m);
755
- f(this, C, []);
756
- f(this, U, []);
757
- f(this, ae, 0);
758
- f(this, z, []);
759
- f(this, ce, /* @__PURE__ */ c(() => {
760
- p(this, z, []);
763
+ u(this, E);
764
+ u(this, m);
765
+ u(this, k, []);
766
+ u(this, U, []);
767
+ u(this, ae, 0);
768
+ u(this, W, []);
769
+ u(this, ce, /* @__PURE__ */ a(() => {
770
+ p(this, W, []);
761
771
  const i = e(this, E).template || [];
762
772
  Array.from(i).forEach((t) => {
763
773
  var s;
764
- e(this, z).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
774
+ e(this, W).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
765
775
  }), (e(this, m).rawRecords || []).forEach((t) => {
766
- t.__ng || (t.__ng = e(this, Q).call(this)), t.__ng.height = e(this, z).slice();
776
+ t.__ng || (t.__ng = e(this, Q).call(this)), t.__ng.height = e(this, W).slice();
767
777
  });
768
778
  }, "#initialize"));
769
- v(this, "set", /* @__PURE__ */ c((i) => {
779
+ v(this, "set", /* @__PURE__ */ a((i) => {
770
780
  this.clear(), this.add(i, !1);
771
781
  }, "set"));
772
- f(this, Q, /* @__PURE__ */ c(() => ({
782
+ u(this, Q, /* @__PURE__ */ a(() => ({
773
783
  rowState: T.ROW_STATE.EMPTY,
774
784
  deleted: !1,
775
785
  filtered: !1,
776
- height: e(this, z).slice(),
786
+ height: e(this, W).slice(),
777
787
  o: {},
778
788
  c: {},
779
- _: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, z).slice(), -1, {}, {}]
789
+ _: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, W).slice(), -1, {}, {}]
780
790
  }), "#getDefaultMeta"));
781
- v(this, "reset", /* @__PURE__ */ c(() => {
782
- p(this, C, []), p(this, U, []);
791
+ v(this, "reset", /* @__PURE__ */ a(() => {
792
+ p(this, k, []), p(this, U, []);
783
793
  }, "reset"));
784
- v(this, "clear", /* @__PURE__ */ c(() => {
794
+ v(this, "clear", /* @__PURE__ */ a(() => {
785
795
  var i;
786
- e(this, m).rawRecords = [], p(this, C, []), p(this, U, []), (i = e(this, m).viewRecords) != null && i.reset && e(this, m).viewRecords.reset();
796
+ e(this, m).rawRecords = [], p(this, k, []), p(this, U, []), (i = e(this, m).viewRecords) != null && i.reset && e(this, m).viewRecords.reset();
787
797
  }, "clear"));
788
- f(this, he, /* @__PURE__ */ c((i) => {
798
+ u(this, he, /* @__PURE__ */ a((i) => {
789
799
  var n;
790
800
  Array.isArray(i) || (i = [i]);
791
801
  const t = typeof ((n = e(this, E).fields) == null ? void 0 : n.get) == "function" ? e(this, E).fields.get() : Object.keys(i[0] || {}), s = [];
792
802
  return i.forEach((o) => {
793
803
  const r = { v: [] };
794
- t.forEach((a) => {
795
- r.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
804
+ t.forEach((l) => {
805
+ r.v.push(o[l] !== void 0 && o[l] !== null ? o[l] : "");
796
806
  }), s.push(r);
797
807
  }), s;
798
808
  }, "#json2Array"));
799
- f(this, de, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
809
+ u(this, de, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
800
810
  t.__ng = e(this, Q).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = T.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
801
811
  }), i), "#defaultInsert"));
802
- v(this, "add", /* @__PURE__ */ c((i, t = !0) => {
812
+ v(this, "add", /* @__PURE__ */ a((i, t = !0) => {
803
813
  var o;
804
814
  i === void 0 && (i = {});
805
815
  const s = e(this, he).call(this, i);
806
816
  e(this, m).rawRecords = e(this, m).rawRecords.concat(e(this, de).call(this, s)), this.resetRecords();
807
817
  const n = this.count() - 1;
808
- return t || s.forEach((r, a) => {
809
- const u = e(this, m).rawRecords[n - a];
810
- u && (u.__ng.rowState = T.ROW_STATE.EMPTY);
818
+ return t || s.forEach((r, l) => {
819
+ const g = e(this, m).rawRecords[n - l];
820
+ g && (g.__ng.rowState = T.ROW_STATE.EMPTY);
811
821
  }), (o = e(this, m).viewRecords) != null && o.reset && e(this, m).viewRecords.reset(), n;
812
822
  }, "add"));
813
- v(this, "delete", /* @__PURE__ */ c((i) => {
823
+ v(this, "delete", /* @__PURE__ */ a((i) => {
814
824
  var s;
815
825
  let t = [];
816
826
  Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this, m).owner.row.at] : t = [parseInt(i, 10)], t.sort((n, o) => o - n).forEach((n) => {
817
- if (e(this, C)[n]) {
818
- const o = e(this, C)[n].__ng.rowid;
819
- e(this, C)[n].__ng.rowState === T.ROW_STATE.INSERT ? e(this, m).rawRecords = e(this, m).rawRecords.filter((r) => r.__ng.rowid !== o) : e(this, m).rawRecords.forEach((r) => {
827
+ if (e(this, k)[n]) {
828
+ const o = e(this, k)[n].__ng.rowid;
829
+ e(this, k)[n].__ng.rowState === T.ROW_STATE.INSERT ? e(this, m).rawRecords = e(this, m).rawRecords.filter((r) => r.__ng.rowid !== o) : e(this, m).rawRecords.forEach((r) => {
820
830
  r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = T.ROW_STATE.DELETE);
821
831
  });
822
832
  }
823
833
  }), this.resetRecords(), (s = e(this, m).viewRecords) != null && s.reset && e(this, m).viewRecords.reset();
824
834
  }, "delete"));
825
- v(this, "setValue", /* @__PURE__ */ c((i, t, s) => {
826
- var u;
835
+ v(this, "setValue", /* @__PURE__ */ a((i, t, s) => {
836
+ var g;
827
837
  i = parseInt(i, 10);
828
- const o = (typeof ((u = e(this, E).fields) == null ? void 0 : u.get) == "function" ? e(this, E).fields.get() : []).indexOf(t);
838
+ const o = (typeof ((g = e(this, E).fields) == null ? void 0 : g.get) == "function" ? e(this, E).fields.get() : []).indexOf(t);
829
839
  if (o < 0) return;
830
840
  const r = this.getValidData()[i];
831
841
  if (!r) return;
832
- const a = r.v[o];
833
- a !== s && r.__ng.rowState !== T.ROW_STATE.INSERT && (r.__ng.o.hasOwnProperty(t) || (r.__ng.o[t] = a), r.__ng.rowState = T.ROW_STATE.UPDATE), r.v[o] = s, e(this, m).owner.refreshData && e(this, m).owner.refreshData(i);
842
+ const l = r.v[o];
843
+ l !== s && r.__ng.rowState !== T.ROW_STATE.INSERT && (r.__ng.o.hasOwnProperty(t) || (r.__ng.o[t] = l), r.__ng.rowState = T.ROW_STATE.UPDATE), r.v[o] = s, e(this, m).owner.refreshData && e(this, m).owner.refreshData(i);
834
844
  }, "setValue"));
835
- v(this, "resetRecords", /* @__PURE__ */ c(() => {
836
- p(this, U, e(this, m).rawRecords.filter((i) => !i.__ng.deleted)), p(this, C, e(this, m).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, m).rawRecords.forEach((i, t) => {
845
+ v(this, "resetRecords", /* @__PURE__ */ a(() => {
846
+ p(this, U, e(this, m).rawRecords.filter((i) => !i.__ng.deleted)), p(this, k, e(this, m).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, m).rawRecords.forEach((i, t) => {
837
847
  i.__ng.rowidx = t;
838
- }), e(this, C).forEach((i, t) => {
848
+ }), e(this, k).forEach((i, t) => {
839
849
  i.__ng.i = t;
840
850
  });
841
851
  }, "resetRecords"));
842
- v(this, "getValidData", /* @__PURE__ */ c(() => (e(this, C).length === 0 && e(this, m).rawRecords.length > 0 && this.resetRecords(), e(this, C)), "getValidData"));
843
- f(this, K, /* @__PURE__ */ c((i) => {
852
+ v(this, "getValidData", /* @__PURE__ */ a(() => (e(this, k).length === 0 && e(this, m).rawRecords.length > 0 && this.resetRecords(), e(this, k)), "getValidData"));
853
+ u(this, K, /* @__PURE__ */ a((i) => {
844
854
  var s;
845
855
  if (!i) return i;
846
856
  const t = typeof ((s = e(this, E).fields) == null ? void 0 : s.get) == "function" ? e(this, E).fields.get() : [];
847
857
  return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
848
858
  const o = {};
849
- return t.forEach((r, a) => {
850
- o[r] = n.v ? n.v[a] : n[r];
859
+ return t.forEach((r, l) => {
860
+ o[r] = n.v ? n.v[l] : n[r];
851
861
  }), o.__ng = n.__ng, o;
852
862
  }) : i;
853
863
  }, "#conv2"));
854
- v(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
855
- v(this, "get", /* @__PURE__ */ c((i, t) => {
864
+ v(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
865
+ v(this, "get", /* @__PURE__ */ a((i, t) => {
856
866
  var o;
857
867
  const s = this.getValidData();
858
868
  if (!s || s.length <= 0) return;
@@ -877,7 +887,7 @@ const T = class T {
877
887
  return ++He(this, ae)._;
878
888
  }
879
889
  };
880
- E = new WeakMap(), m = new WeakMap(), C = new WeakMap(), U = new WeakMap(), ae = new WeakMap(), z = new WeakMap(), ce = new WeakMap(), Q = new WeakMap(), he = new WeakMap(), de = new WeakMap(), K = new WeakMap(), c(T, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
890
+ E = new WeakMap(), m = new WeakMap(), k = new WeakMap(), U = new WeakMap(), ae = new WeakMap(), W = new WeakMap(), ce = new WeakMap(), Q = new WeakMap(), he = new WeakMap(), de = new WeakMap(), K = new WeakMap(), a(T, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
881
891
  v(T, "ROW_STATE", {
882
892
  EMPTY: "EMPTY",
883
893
  NORMAL: "NORMAL",
@@ -905,15 +915,15 @@ const Le = class Le {
905
915
  }, this.setDataSource([]);
906
916
  }
907
917
  };
908
- c(Le, "ngDataManager");
918
+ a(Le, "ngDataManager");
909
919
  let Se = Le;
910
920
  var Y, fe;
911
921
  const _e = class _e extends HTMLElement {
912
922
  constructor() {
913
923
  super();
914
924
  //#created = false;
915
- f(this, Y);
916
- f(this, fe);
925
+ u(this, Y);
926
+ u(this, fe);
917
927
  this.attachShadow({ mode: "open" }), p(this, Y, new Se(this));
918
928
  }
919
929
  connectedCallback() {
@@ -935,7 +945,7 @@ const _e = class _e extends HTMLElement {
935
945
  return e(this, Y);
936
946
  }
937
947
  };
938
- Y = new WeakMap(), fe = new WeakMap(), c(_e, "NineTable");
948
+ Y = new WeakMap(), fe = new WeakMap(), a(_e, "NineTable");
939
949
  let Ee = _e;
940
950
  customElements.get("nine-table") || customElements.define("nine-table", Ee);
941
951
  //# sourceMappingURL=nine-table.js.map